public class EcmaScript extends java.lang.Object implements EcmaScriptTreeConstants, EcmaScriptConstants
Modifier and Type | Field and Description |
---|---|
Token |
jj_nt
Next token.
|
protected JJTEcmaScriptState |
jjtree |
Token |
token
Current token.
|
EcmaScriptTokenManager |
token_source
Generated Token Manager.
|
JJTALLOCATIONEXPRESSION, JJTANDEXPRESSIONSEQUENCE, JJTARRAYLITERAL, JJTASSIGNMENTEXPRESSION, JJTBINARYEXPRESSIONSEQUENCE, JJTBLOCK, JJTBREAKSTATEMENT, JJTCASEGROUP, JJTCASEGROUPS, JJTCASEGUARD, JJTCATCHCLAUSE, JJTCOMPOSITEREFERENCE, JJTCONDITIONALEXPRESSION, JJTCONTINUESTATEMENT, JJTDOSTATEMENT, JJTEMPTYEXPRESSION, JJTEMPTYSTATEMENT, JJTEXPRESSIONLIST, JJTEXPRESSIONSTATEMENT, JJTFINALLYCLAUSE, JJTFORINSTATEMENT, JJTFORMALPARAMETERLIST, JJTFORSTATEMENT, JJTFORVARINSTATEMENT, JJTFORVARSTATEMENT, JJTFUNCTIONCALLPARAMETERS, JJTFUNCTIONDECLARATION, JJTFUNCTIONEXPRESSION, JJTIDENTIFIER, JJTIFSTATEMENT, JJTLITERAL, JJTLITERALFIELD, jjtNodeName, JJTOBJECTLITERAL, JJTOPERATOR, JJTOREXPRESSIONSEQUENCE, JJTPARENEXPRESSION, JJTPOSTFIXEXPRESSION, JJTPROGRAM, JJTPROPERTYIDENTIFIERREFERENCE, JJTPROPERTYVALUEREFERENCE, JJTRETURNSTATEMENT, JJTSTATEMENTLIST, JJTSWITCHSTATEMENT, JJTTHISREFERENCE, JJTTHROWSTATEMENT, JJTTRYSTATEMENT, JJTUNARYEXPRESSION, JJTVARIABLEDECLARATION, JJTVARIABLEDECLARATIONLIST, JJTVARIABLESTATEMENT, JJTVOID, JJTWHILESTATEMENT, JJTWITHSTATEMENT
_DEFAULT, ANDASSIGN, ASSIGN, BACKSLASH_SEQUENCE, BANG, BIT_AND, BIT_OR, BOOLEAN_LITERAL, BREAK, CASE, CATCH, CHARACTER_ESCAPE_SEQUENCE, CLASS, COLON, COMMA, CONST, CONTINUE, CR, DEBUGGER, DECIMAL_DIGIT, DECIMAL_DIGITS, DECIMAL_INTEGER_LITERAL, DECIMAL_LITERAL, DECR, DEFAULT, DELETE, DO, DOLLAR_SIGN, DOT, DOUBLE_STRING_CHARACTER, DOUBLE_STRING_CHARACTERS, ELSE, ENUM, EOF, EQ, ESCAPE_SEQUENCE, EXPONENT_PART, EXPORT, EXTENDS, FF, FINALLY, FOR, FUNCTION, GE, GT, HEX_DIGIT, HEX_ESCAPE_SEQUENCE, HEX_INTEGER_LITERAL, HOOK, IDENTIFIER_NAME, IDENTIFIER_PART, IDENTIFIER_START, IF, IMPORT, IN, IN_JSP_TAG, IN_MULTI_LINE_COMMENT, IN_PATTERN, IN_REGEX, IN_SINGLE_LINE_COMMENT, INCR, INTANCE_OF, JSP_TAG, LBRACE, LBRACKET, LE, LF, LINE_TERMINATOR, LPAREN, LS, LSHIFT, LSHIFTASSIGN, LT, MC, MINUS, MINUSASSIGN, MN, MULTI_LINE_COMMENT, NBSP, NE, NEW, NON_ESCAPE_CHARACTER, NON_ZERO_DIGIT, NULL_LITERAL, ORASSIGN, PLUS, PLUSASSIGN, PS, RBRACE, RBRACKET, REGULAR_EXPRESSION_LITERAL, REM, REMASSIGN, RETURN, RPAREN, RSHIFT, RSIGNEDSHIFTASSIGN, RUNSHIFT, RUNSIGNEDSHIFTASSIGN, SC_AND, SC_OR, SEMICOLON, SEQ, SINGLE_ESCAPE_CHARACTER, SINGLE_LINE_COMMENT, SINGLE_STRING_CHARACTER, SINGLE_STRING_CHARACTERS, SLASH, SLASHASSIGN, SNEQ, SP, STAR, STARASSIGN, STRING_LITERAL, SUPER, SWITCH, TAB, THIS, THROW, TILDE, tokenImage, TRY, TYPEOF, UNDER_SCORE, UNICODE_COMBINING_MARK, UNICODE_CONNECTOR_PUNCTUATION, UNICODE_DIGIT, UNICODE_ESCAPE_SEQUENCE, UNICODE_LETTER, USP, VAR, VOID, VT, WHILE, WHITE_SPACE, WITH, XOR, XORASSIGN
Constructor and Description |
---|
EcmaScript(EcmaScriptTokenManager tm)
Constructor with generated Token Manager.
|
EcmaScript(java.io.InputStream stream)
Constructor with InputStream.
|
EcmaScript(java.io.InputStream stream,
java.lang.String encoding)
Constructor with InputStream and supplied encoding
|
EcmaScript(java.io.Reader stream)
Constructor.
|
protected JJTEcmaScriptState jjtree
public EcmaScriptTokenManager token_source
public Token token
public Token jj_nt
public EcmaScript(java.io.InputStream stream)
public EcmaScript(java.io.InputStream stream, java.lang.String encoding)
public EcmaScript(java.io.Reader stream)
public EcmaScript(EcmaScriptTokenManager tm)
public static void main(java.lang.String[] args)
public sidekick.util.Location getStartLocation(Token t)
public sidekick.util.Location getEndLocation(Token t)
public void setLineOffset(int offset)
public void setTabSize(int size)
public int getTabSize()
public java.util.List<sidekick.util.ParseError> getParseErrors()
public final void PrimaryExpression() throws ParseException
ParseException
public final void Literal() throws ParseException
ParseException
public final void Identifier() throws ParseException
ParseException
public final void ArrayLiteral() throws ParseException
ParseException
public final void ElementList() throws ParseException
ParseException
public final void Elision() throws ParseException
ParseException
public final void ObjectLiteral() throws ParseException
ParseException
public final void PropertyNameAndValueList() throws ParseException
ParseException
public final void PropertyNameAndValue() throws ParseException
ParseException
public final void PropertyName() throws ParseException
ParseException
public final void MemberExpression() throws ParseException
ParseException
public final void MemberExpressionForIn() throws ParseException
ParseException
public final void AllocationExpression() throws ParseException
ParseException
public final void MemberExpressionPart() throws ParseException
ParseException
public final void CallExpression() throws ParseException
ParseException
public final void CallExpressionForIn() throws ParseException
ParseException
public final void CallExpressionPart() throws ParseException
ParseException
public final void Arguments() throws ParseException
ParseException
public final void ArgumentList() throws ParseException
ParseException
public final void LeftHandSideExpression() throws ParseException
ParseException
public final void LeftHandSideExpressionForIn() throws ParseException
ParseException
public final void PostfixExpression() throws ParseException
ParseException
public final void PostfixOperator() throws ParseException
ParseException
public final void UnaryExpression() throws ParseException
ParseException
public final void UnaryOperator() throws ParseException
ParseException
public final void MultiplicativeExpression() throws ParseException
ParseException
public final void MultiplicativeOperator() throws ParseException
ParseException
public final void AdditiveExpression() throws ParseException
ParseException
public final void AdditiveOperator() throws ParseException
ParseException
public final void ShiftExpression() throws ParseException
ParseException
public final void ShiftOperator() throws ParseException
ParseException
public final void RelationalExpression() throws ParseException
ParseException
public final void RelationalOperator() throws ParseException
ParseException
public final void RelationalExpressionNoIn() throws ParseException
ParseException
public final void RelationalNoInOperator() throws ParseException
ParseException
public final void EqualityExpression() throws ParseException
ParseException
public final void EqualityExpressionNoIn() throws ParseException
ParseException
public final void EqualityOperator() throws ParseException
ParseException
public final void BitwiseANDExpression() throws ParseException
ParseException
public final void BitwiseANDExpressionNoIn() throws ParseException
ParseException
public final void BitwiseANDOperator() throws ParseException
ParseException
public final void BitwiseXORExpression() throws ParseException
ParseException
public final void BitwiseXORExpressionNoIn() throws ParseException
ParseException
public final void BitwiseXOROperator() throws ParseException
ParseException
public final void BitwiseORExpression() throws ParseException
ParseException
public final void BitwiseORExpressionNoIn() throws ParseException
ParseException
public final void BitwiseOROperator() throws ParseException
ParseException
public final void LogicalANDExpression() throws ParseException
ParseException
public final void LogicalANDExpressionNoIn() throws ParseException
ParseException
public final void LogicalANDOperator() throws ParseException
ParseException
public final void LogicalORExpression() throws ParseException
ParseException
public final void LogicalORExpressionNoIn() throws ParseException
ParseException
public final void LogicalOROperator() throws ParseException
ParseException
public final void ConditionalExpression() throws ParseException
ParseException
public final void ConditionalExpressionNoIn() throws ParseException
ParseException
public final void AssignmentExpression() throws ParseException
ParseException
public final void AssignmentExpressionNoIn() throws ParseException
ParseException
public final void AssignmentOperator() throws ParseException
ParseException
public final void Expression() throws ParseException
ParseException
public final void ExpressionNoIn() throws ParseException
ParseException
public final void Statement() throws ParseException
ParseException
public final void Block() throws ParseException
ParseException
public final void StatementList() throws ParseException
ParseException
public final void VariableStatement() throws ParseException
ParseException
public final void VariableDeclarationList() throws ParseException
ParseException
public final void VariableDeclarationListNoIn() throws ParseException
ParseException
public final void VariableDeclaration() throws ParseException
ParseException
public final void VariableDeclarationNoIn() throws ParseException
ParseException
public final void Initialiser() throws ParseException
ParseException
public final void InitialiserNoIn() throws ParseException
ParseException
public final void EmptyStatement() throws ParseException
ParseException
public final void ExpressionStatement() throws ParseException
ParseException
public final void IfStatement() throws ParseException
ParseException
public final void IterationStatement() throws ParseException
ParseException
public final void ContinueStatement() throws ParseException
ParseException
public final void BreakStatement() throws ParseException
ParseException
public final void ReturnStatement() throws ParseException
ParseException
public final void WithStatement() throws ParseException
ParseException
public final void SwitchStatement() throws ParseException
ParseException
public final void CaseBlock() throws ParseException
ParseException
public final void CaseClauses() throws ParseException
ParseException
public final void CaseClause() throws ParseException
ParseException
public final void DefaultClause() throws ParseException
ParseException
public final void LabelledStatement() throws ParseException
ParseException
public final void ThrowStatement() throws ParseException
ParseException
public final void TryStatement() throws ParseException
ParseException
public final void Catch() throws ParseException
ParseException
public final void Finally() throws ParseException
ParseException
public final void FunctionDeclaration() throws ParseException
ParseException
public final void FunctionExpression() throws ParseException
ParseException
public final void FormalParameterList() throws ParseException
ParseException
public final void FunctionBody() throws ParseException
ParseException
public final ASTProgram Program() throws ParseException
ParseException
public final void SourceElements() throws ParseException
ParseException
public final void SourceElement() throws ParseException
ParseException
public final void ImportStatement() throws ParseException
ParseException
public final void Name() throws ParseException
ParseException
public final void JScriptVarStatement() throws ParseException
ParseException
public final void JScriptVarDeclarationList() throws ParseException
ParseException
public final void JScriptVarDeclaration() throws ParseException
ParseException
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
public void ReInit(java.io.Reader stream)
public void ReInit(EcmaScriptTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()