public Object[] run(Position position, Reader src) throws IOException {
        Node node;

        load();
        oag.setEnvironment(environment);
        oag.setLogging(logAttribution);
        parser.setErrorHandler(errorHandler);
        // casting is ok: the Treebuilder used in a mapper always creates Nodes
        node = (Node) parser.run(position, src, oag, logParsing);
        src.close();
        errorHandler.close();
        if (node == null) {
            throw new IllegalStateException("errorHandler.close expected to throw an exception");
        } else {
            return node.attrs;
        }
    }
public Object [ ] run ( Position position , Reader src ) throws IOException { Node node ; load ( ) ; oag . setEnvironment ( environment ) ; oag . setLogging ( logAttribution ) ; parser . setErrorHandler ( errorHandler ) ; node = ( Node ) parser . run ( position , src , oag , logParsing ) ; src . close ( ) ; errorHandler . close ( ) ; if ( node == null ) { throw new IllegalStateException ( "errorHandler.close expected to throw an exception" ) ; } else { return node . attrs ; } }
Reads an stream, creates the syntax tree, computes the attributes and returns
the attributes of the start symbol. Main functionality of this class, all other
<code>run</code> methods use it.  Reports errors to the registered errorHander;
if there is no errorHandler defined, this method defines a PrintWriterErrorHandler
for System.err.

@param  src when the method returns, src is always closed.
@return never null
@throws IOException to report errors