Logo Search packages:      
Sourcecode: yui-compressor version File versions  Download package

org::mozilla::javascript::Parser Class Reference

List of all members.


Detailed Description

This class implements the JavaScript parser.

It is based on the C source files jsparse.c and jsparse.h in the jsref package.

See also:
TokenStream
Author:
Mike McCabe

Brendan Eich

Definition at line 66 of file Parser.java.


Public Member Functions

boolean eof ()
int getCurrentLineNumber ()
String getEncodedSource ()
ScriptOrFnNode parse (Reader sourceReader, String sourceURI, int lineno) throws IOException
ScriptOrFnNode parse (String sourceString, String sourceURI, int lineno)
 Parser (CompilerEnvirons compilerEnv, ErrorReporter errorReporter)

Protected Member Functions

Decompiler createDecompiler (CompilerEnvirons compilerEnv)

Package Functions

void addError (String messageId, String messageArg)
void addError (String messageId)
void addStrictWarning (String messageId, String messageArg)
void addWarning (String messageId, String messageArg)
void defineSymbol (int declType, boolean ignoreNotInBlock, String name)
boolean insideFunction ()
void popScope ()
void pushScope (Node node)
RuntimeException reportError (String messageId)

Package Attributes

boolean calledByCompileFunction
CompilerEnvirons compilerEnv
Node.Scope currentScope
ScriptOrFnNode currentScriptOrFn

Static Package Attributes

static final int CLEAR_TI_MASK = 0xFFFF
static final int TI_AFTER_EOL = 1 << 16
static final int TI_CHECK_LABEL = 1 << 17

Private Member Functions

Node addExpr () throws IOException, ParserException
Node andExpr (boolean inForInit) throws IOException, ParserException
void argumentList (Node listNode) throws IOException, ParserException
Node arrayComprehension (String arrayName, Node expr) throws IOException, ParserException
Node assignExpr (boolean inForInit) throws IOException, ParserException
Node attributeAccess (Node pn, int memberTypeFlags) throws IOException
Node bitAndExpr (boolean inForInit) throws IOException, ParserException
Node bitOrExpr (boolean inForInit) throws IOException, ParserException
Node bitXorExpr (boolean inForInit) throws IOException, ParserException
Node condExpr (boolean inForInit) throws IOException, ParserException
Node condition () throws IOException, ParserException
void consumeToken ()
Node enterLoop (Node loopLabel, boolean doPushScope)
Node enterSwitch (Node switchSelector, int lineno)
Node eqExpr (boolean inForInit) throws IOException, ParserException
void exitLoop (boolean doPopScope)
void exitSwitch ()
Node expr (boolean inForInit) throws IOException, ParserException
Node function (int functionType) throws IOException, ParserException
boolean getterSetterProperty (ObjArray elems, Object property, boolean isGetter) throws IOException
Node let (boolean isStatement) throws IOException, ParserException
Node matchJumpLabelName () throws IOException, ParserException
boolean matchToken (int toMatch) throws IOException
Node memberExpr (boolean allowCallSyntax) throws IOException, ParserException
Node memberExprTail (boolean allowCallSyntax, Node pn) throws IOException, ParserException
Node mulExpr () throws IOException, ParserException
void mustHaveXML ()
void mustMatchToken (int toMatch, String messageId) throws IOException, ParserException
int nextFlaggedToken () throws IOException
int nextToken () throws IOException
Node orExpr (boolean inForInit) throws IOException, ParserException
ScriptOrFnNode parse () throws IOException
Node parseFunctionBody () throws IOException
int peekFlaggedToken () throws IOException
int peekToken () throws IOException
int peekTokenOrEOL () throws IOException
void plainProperty (ObjArray elems, Object property) throws IOException
Node primaryExpr () throws IOException, ParserException
Node propertyName (Node pn, String name, int memberTypeFlags) throws IOException, ParserException
Node relExpr (boolean inForInit) throws IOException, ParserException
Node returnOrYield (int tt, boolean exprContext) throws IOException, ParserException
void setCheckForLabel ()
Node shiftExpr () throws IOException, ParserException
Node statement () throws IOException
Node statementHelper (Node statementLabel) throws IOException, ParserException
Node statements (Node scope) throws IOException
Node unaryExpr () throws IOException, ParserException
Node variables (boolean inFor, int declType) throws IOException, ParserException
Node xmlInitializer () throws IOException

Static Private Member Functions

static final boolean nowAllSet (int before, int after, int mask)

Private Attributes

int currentFlaggedToken
Decompiler decompiler
String encodedSource
int endFlags
ErrorReporter errorReporter
Map< String, Node > labelSet
ObjArray loopAndSwitchSet
ObjArray loopSet
int nestingOfFunction
int nestingOfWith
IRFactory nf
String sourceURI
int syntaxErrorCount
TokenStream ts

Classes

class  ParserException

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index