org.mozilla.javascript
Class Parser1

java.lang.Object
  extended by org.mozilla.javascript.Parser1

public class Parser1
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:
TokenStream1

Constructor Summary
Parser1(org.mozilla.javascript.CompilerEnvirons compilerEnv, org.mozilla.javascript.ErrorReporter errorReporter)
           
 
Method Summary
protected  org.mozilla.javascript.Decompiler createDecompiler(org.mozilla.javascript.CompilerEnvirons compilerEnv)
           
 boolean eof()
           
 int getCurrentLineNumber()
           
 String getEncodedSource()
           
 org.mozilla.javascript.ScriptOrFnNode parse(Reader sourceReader, String sourceURI, int lineno)
           
 org.mozilla.javascript.ScriptOrFnNode parse(String sourceString, String sourceURI, int lineno)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser1

public Parser1(org.mozilla.javascript.CompilerEnvirons compilerEnv,
               org.mozilla.javascript.ErrorReporter errorReporter)
Method Detail

getCurrentLineNumber

public int getCurrentLineNumber()

createDecompiler

protected org.mozilla.javascript.Decompiler createDecompiler(org.mozilla.javascript.CompilerEnvirons compilerEnv)

getEncodedSource

public String getEncodedSource()

eof

public boolean eof()

parse

public org.mozilla.javascript.ScriptOrFnNode parse(String sourceString,
                                                   String sourceURI,
                                                   int lineno)

parse

public org.mozilla.javascript.ScriptOrFnNode parse(Reader sourceReader,
                                                   String sourceURI,
                                                   int lineno)
                                            throws IOException
Throws:
IOException


Copyright © 2012. All Rights Reserved.