org.mozilla.javascript

Class Parser

public class Parser extends Object

This class implements the JavaScript parser. It is based on the C source files jsparse.c and jsparse.h in the jsref package.

Author: Mike McCabe Brendan Eich

See Also:

Constructor Summary
Parser(CompilerEnvirons compilerEnv, ErrorReporter errorReporter)
Method Summary
protected DecompilercreateDecompiler(CompilerEnvirons compilerEnv)
booleaneof()
StringgetEncodedSource()
ScriptOrFnNodeparse(String sourceString, String sourceURI, int lineno)
ScriptOrFnNodeparse(Reader sourceReader, String sourceURI, int lineno)

Constructor Detail

Parser

public Parser(CompilerEnvirons compilerEnv, ErrorReporter errorReporter)

Method Detail

createDecompiler

protected Decompiler createDecompiler(CompilerEnvirons compilerEnv)

eof

public boolean eof()

getEncodedSource

public String getEncodedSource()

parse

public ScriptOrFnNode parse(String sourceString, String sourceURI, int lineno)

parse

public ScriptOrFnNode parse(Reader sourceReader, String sourceURI, int lineno)