org.mozilla.javascript
Class Parser
java.lang.Object
org.mozilla.javascript.Parser
public class Parser
- extends java.lang.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:
TokenStream
Constructor Summary |
Parser(org.mozilla.javascript.CompilerEnvirons compilerEnv,
org.mozilla.javascript.ErrorReporter errorReporter)
|
Method Summary |
protected Decompiler |
createDecompiler(org.mozilla.javascript.CompilerEnvirons compilerEnv)
|
boolean |
eof()
|
java.lang.String |
getEncodedSource()
|
org.mozilla.javascript.ScriptOrFnNode |
parse(java.io.Reader sourceReader,
java.lang.String sourceURI,
int lineno)
|
org.mozilla.javascript.ScriptOrFnNode |
parse(java.lang.String sourceString,
java.lang.String sourceURI,
int lineno)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Parser
public Parser(org.mozilla.javascript.CompilerEnvirons compilerEnv,
org.mozilla.javascript.ErrorReporter errorReporter)
createDecompiler
protected Decompiler createDecompiler(org.mozilla.javascript.CompilerEnvirons compilerEnv)
getEncodedSource
public java.lang.String getEncodedSource()
eof
public boolean eof()
parse
public org.mozilla.javascript.ScriptOrFnNode parse(java.lang.String sourceString,
java.lang.String sourceURI,
int lineno)
parse
public org.mozilla.javascript.ScriptOrFnNode parse(java.io.Reader sourceReader,
java.lang.String sourceURI,
int lineno)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2009. All Rights Reserved.