[or-cvs] r19224: {torflow} Remove pypy in favor of prebuilt antlr javascript parser. (in torflow/trunk/NetworkScanners/libs: . jsparser jsparser/antlr3)
mikeperry at seul.org
mikeperry at seul.org
Mon Apr 6 10:36:55 UTC 2009
Author: mikeperry
Date: 2009-04-06 06:36:54 -0400 (Mon, 06 Apr 2009)
New Revision: 19224
Added:
torflow/trunk/NetworkScanners/libs/jsparser/
torflow/trunk/NetworkScanners/libs/jsparser/JavaScript.g
torflow/trunk/NetworkScanners/libs/jsparser/JavaScriptLexer.py
torflow/trunk/NetworkScanners/libs/jsparser/JavaScriptParser.py
torflow/trunk/NetworkScanners/libs/jsparser/README.build
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/__init__.py
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/compat.py
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/constants.py
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/debug.py
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/dfa.py
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/dottreegen.py
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/exceptions.py
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/extras.py
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/main.py
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/recognizers.py
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/streams.py
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/tokens.py
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/tree.py
torflow/trunk/NetworkScanners/libs/jsparser/antlr3/treewizard.py
torflow/trunk/NetworkScanners/libs/jsparser/test.py
Modified:
torflow/trunk/NetworkScanners/libs/
Log:
Remove pypy in favor of prebuilt antlr javascript parser.
Property changes on: torflow/trunk/NetworkScanners/libs
___________________________________________________________________
Modified: svn:externals
- pypy-svn -r61451 https://codespeak.net/svn/pypy/dist
+
Added: torflow/trunk/NetworkScanners/libs/jsparser/JavaScript.g
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/JavaScript.g (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/JavaScript.g 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,902 @@
+/*
+ Copyright 2008 Chris Lambrou.
+ All rights reserved.
+
+
+ Original source:
+ http://www.antlr.org/grammar/1206736738015/JavaScript.g
+
+ Licensing terms:
+ http://www.antlr.org/pipermail/antlr-interest/2008-April/027771.html
+*/
+
+grammar JavaScript;
+
+options
+{
+ output=AST;
+ backtrack=true;
+ memoize=true;
+ language=Python;
+}
+
+program
+ : LT!* sourceElements LT!* EOF!
+ ;
+
+sourceElements
+ : sourceElement (LT!* sourceElement)*
+ ;
+
+sourceElement
+ : functionDeclaration
+ | statement
+ ;
+
+// functions
+functionDeclaration
+ : 'function' LT!* Identifier LT!* formalParameterList LT!* functionBody
+ ;
+
+functionExpression
+ : 'function' LT!* Identifier? LT!* formalParameterList LT!* functionBody
+ ;
+
+formalParameterList
+ : '(' (LT!* Identifier (LT!* ',' LT!* Identifier)*)? LT!* ')'
+ ;
+
+functionBody
+ : '{' LT!* sourceElements LT!* '}'
+ ;
+
+// statements
+statement
+ : statementBlock
+ | variableStatement
+ | emptyStatement
+ | expressionStatement
+ | ifStatement
+ | iterationStatement
+ | continueStatement
+ | breakStatement
+ | returnStatement
+ | withStatement
+ | labelledStatement
+ | switchStatement
+ | throwStatement
+ | tryStatement
+ ;
+
+statementBlock
+ : '{' LT!* statementList? LT!* '}'
+ ;
+
+statementList
+ : statement (LT!* statement)*
+ ;
+
+variableStatement
+ : 'var' LT!* variableDeclarationList (LT | ';')!
+ ;
+
+variableDeclarationList
+ : variableDeclaration (LT!* ',' LT!* variableDeclaration)*
+ ;
+
+variableDeclarationListNoIn
+ : variableDeclarationNoIn (LT!* ',' LT!* variableDeclarationNoIn)*
+ ;
+
+variableDeclaration
+ : Identifier LT!* initialiser?
+ ;
+
+variableDeclarationNoIn
+ : Identifier LT!* initialiserNoIn?
+ ;
+
+initialiser
+ : '=' LT!* assignmentExpression
+ ;
+
+initialiserNoIn
+ : '=' LT!* assignmentExpressionNoIn
+ ;
+
+emptyStatement
+ : ';'
+ ;
+
+expressionStatement
+ : expression (LT | ';')!
+ ;
+
+ifStatement
+ : 'if' LT!* '(' LT!* expression LT!* ')' LT!* statement (LT!* 'else' LT!* statement)?
+ ;
+
+iterationStatement
+ : doWhileStatement
+ | whileStatement
+ | forStatement
+ | forInStatement
+ ;
+
+doWhileStatement
+ : 'do' LT!* statement LT!* 'while' LT!* '(' expression ')' (LT | ';')!
+ ;
+
+whileStatement
+ : 'while' LT!* '(' LT!* expression LT!* ')' LT!* statement
+ ;
+
+forStatement
+ : 'for' LT!* '(' (LT!* forStatementInitialiserPart)? LT!* ';' (LT!* expression)? LT!* ';' (LT!* expression)? LT!* ')' LT!* statement
+ ;
+
+forStatementInitialiserPart
+ : expressionNoIn
+ | 'var' LT!* variableDeclarationListNoIn
+ ;
+
+forInStatement
+ : 'for' LT!* '(' LT!* forInStatementInitialiserPart LT!* 'in' LT!* expression LT!* ')' LT!* statement
+ ;
+
+forInStatementInitialiserPart
+ : leftHandSideExpression
+ | 'var' LT!* variableDeclarationNoIn
+ ;
+
+continueStatement
+ : 'continue' Identifier? (LT | ';')!
+ ;
+
+breakStatement
+ : 'break' Identifier? (LT | ';')!
+ ;
+
+returnStatement
+ : 'return' expression? (LT | ';')!
+ ;
+
+withStatement
+ : 'with' LT!* '(' LT!* expression LT!* ')' LT!* statement
+ ;
+
+labelledStatement
+ : Identifier LT!* ':' LT!* statement
+ ;
+
+switchStatement
+ : 'switch' LT!* '(' LT!* expression LT!* ')' LT!* caseBlock
+ ;
+
+caseBlock
+ : '{' (LT!* caseClause)* (LT!* defaultClause (LT!* caseClause)*)? LT!* '}'
+ ;
+
+caseClause
+ : 'case' LT!* expression LT!* ':' LT!* statementList?
+ ;
+
+defaultClause
+ : 'default' LT!* ':' LT!* statementList?
+ ;
+
+throwStatement
+ : 'throw' expression (LT | ';')!
+ ;
+
+tryStatement
+ : 'try' LT!* statementBlock LT!* (finallyClause | catchClause (LT!* finallyClause)?)
+ ;
+
+catchClause
+ : 'catch' LT!* '(' LT!* Identifier LT!* ')' LT!* statementBlock
+ ;
+
+finallyClause
+ : 'finally' LT!* statementBlock
+ ;
+
+// expressions
+expression
+ : assignmentExpression (LT!* ',' LT!* assignmentExpression)*
+ ;
+
+expressionNoIn
+ : assignmentExpressionNoIn (LT!* ',' LT!* assignmentExpressionNoIn)*
+ ;
+
+assignmentExpression
+ : conditionalExpression
+ | leftHandSideExpression LT!* assignmentOperator LT!* assignmentExpression
+ ;
+
+assignmentExpressionNoIn
+ : conditionalExpressionNoIn
+ | leftHandSideExpression LT!* assignmentOperator LT!* assignmentExpressionNoIn
+ ;
+
+leftHandSideExpression
+ : callExpression
+ | newExpression
+ ;
+
+newExpression
+ : memberExpression
+ | 'new' LT!* newExpression
+ ;
+
+memberExpression
+ : (primaryExpression | functionExpression | 'new' LT!* memberExpression LT!* arguments) (LT!* memberExpressionSuffix)*
+ ;
+
+memberExpressionSuffix
+ : indexSuffix
+ | propertyReferenceSuffix
+ ;
+
+callExpression
+ : memberExpression LT!* arguments (LT!* callExpressionSuffix)*
+ ;
+
+callExpressionSuffix
+ : arguments
+ | indexSuffix
+ | propertyReferenceSuffix
+ ;
+
+arguments
+ : '(' (LT!* assignmentExpression (LT!* ',' LT!* assignmentExpression)*)? LT!* ')'
+ ;
+
+indexSuffix
+ : '[' LT!* expression LT!* ']'
+ ;
+
+propertyReferenceSuffix
+ : '.' LT!* Identifier
+ ;
+
+assignmentOperator
+ : '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '>>>=' | '&=' | '^=' | '|='
+ ;
+
+conditionalExpression
+ : logicalORExpression (LT!* '?' LT!* assignmentExpression LT!* ':' LT!* assignmentExpression)?
+ ;
+
+conditionalExpressionNoIn
+ : logicalORExpressionNoIn (LT!* '?' LT!* assignmentExpressionNoIn LT!* ':' LT!* assignmentExpressionNoIn)?
+ ;
+
+logicalORExpression
+ : logicalANDExpression (LT!* '||' LT!* logicalANDExpression)*
+ ;
+
+logicalORExpressionNoIn
+ : logicalANDExpressionNoIn (LT!* '||' LT!* logicalANDExpressionNoIn)*
+ ;
+
+logicalANDExpression
+ : bitwiseORExpression (LT!* '&&' LT!* bitwiseORExpression)*
+ ;
+
+logicalANDExpressionNoIn
+ : bitwiseORExpressionNoIn (LT!* '&&' LT!* bitwiseORExpressionNoIn)*
+ ;
+
+bitwiseORExpression
+ : bitwiseXORExpression (LT!* '|' LT!* bitwiseXORExpression)*
+ ;
+
+bitwiseORExpressionNoIn
+ : bitwiseXORExpressionNoIn (LT!* '|' LT!* bitwiseXORExpressionNoIn)*
+ ;
+
+bitwiseXORExpression
+ : bitwiseANDExpression (LT!* '^' LT!* bitwiseANDExpression)*
+ ;
+
+bitwiseXORExpressionNoIn
+ : bitwiseANDExpressionNoIn (LT!* '^' LT!* bitwiseANDExpressionNoIn)*
+ ;
+
+bitwiseANDExpression
+ : equalityExpression (LT!* '&' LT!* equalityExpression)*
+ ;
+
+bitwiseANDExpressionNoIn
+ : equalityExpressionNoIn (LT!* '&' LT!* equalityExpressionNoIn)*
+ ;
+
+equalityExpression
+ : relationalExpression (LT!* ('==' | '!=' | '===' | '!==') LT!* relationalExpression)*
+ ;
+
+equalityExpressionNoIn
+ : relationalExpressionNoIn (LT!* ('==' | '!=' | '===' | '!==') LT!* relationalExpressionNoIn)*
+ ;
+
+relationalExpression
+ : shiftExpression (LT!* ('<' | '>' | '<=' | '>=' | 'instanceof' | 'in') LT!* shiftExpression)*
+ ;
+
+relationalExpressionNoIn
+ : shiftExpression (LT!* ('<' | '>' | '<=' | '>=' | 'instanceof') LT!* shiftExpression)*
+ ;
+
+shiftExpression
+ : additiveExpression (LT!* ('<<' | '>>' | '>>>') LT!* additiveExpression)*
+ ;
+
+additiveExpression
+ : multiplicativeExpression (LT!* ('+' | '-') LT!* multiplicativeExpression)*
+ ;
+
+multiplicativeExpression
+ : unaryExpression (LT!* ('*' | '/' | '%') LT!* unaryExpression)*
+ ;
+
+unaryExpression
+ : postfixExpression
+ | ('delete' | 'void' | 'typeof' | '++' | '--' | '+' | '-' | '~' | '!') unaryExpression
+ ;
+
+postfixExpression
+ : leftHandSideExpression ('++' | '--')?
+ ;
+
+primaryExpression
+ : 'this'
+ | Identifier
+ | literal
+ | arrayLiteral
+ | objectLiteral
+ | '(' LT!* expression LT!* ')'
+ ;
+
+// arrayLiteral definition.
+arrayLiteral
+ : '[' LT!* assignmentExpression? (LT!* ',' (LT!* assignmentExpression)?)* LT!* ']'
+ ;
+
+// objectLiteral definition.
+objectLiteral
+ : '{' LT!* propertyNameAndValue (LT!* ',' LT!* propertyNameAndValue)* LT!* '}'
+ ;
+
+propertyNameAndValue
+ : propertyName LT!* ':' LT!* assignmentExpression
+ ;
+
+propertyName
+ : Identifier
+ | StringLiteral
+ | NumericLiteral
+ ;
+
+// primitive literal definition.
+literal
+ : 'null'
+ | 'true'
+ | 'false'
+ | StringLiteral
+ | NumericLiteral
+ ;
+
+// lexer rules.
+StringLiteral
+ : '"' DoubleStringCharacter* '"'
+ | '\'' SingleStringCharacter* '\''
+ ;
+
+fragment DoubleStringCharacter
+ : ~('"' | '\\' | LT)
+ | '\\' EscapeSequence
+ ;
+
+fragment SingleStringCharacter
+ : ~('\'' | '\\' | LT)
+ | '\\' EscapeSequence
+ ;
+
+fragment EscapeSequence
+ : CharacterEscapeSequence
+ | '0'
+ | HexEscapeSequence
+ | UnicodeEscapeSequence
+ ;
+
+fragment CharacterEscapeSequence
+ : SingleEscapeCharacter
+ | NonEscapeCharacter
+ ;
+
+fragment NonEscapeCharacter
+ : ~(EscapeCharacter | LT)
+ ;
+
+fragment SingleEscapeCharacter
+ : '\'' | '"' | '\\' | 'b' | 'f' | 'n' | 'r' | 't' | 'v'
+ ;
+
+fragment EscapeCharacter
+ : SingleEscapeCharacter
+ | DecimalDigit
+ | 'x'
+ | 'u'
+ ;
+
+fragment HexEscapeSequence
+ : 'x' HexDigit HexDigit
+ ;
+
+fragment UnicodeEscapeSequence
+ : 'u' HexDigit HexDigit HexDigit HexDigit
+ ;
+
+NumericLiteral
+ : DecimalLiteral
+ | HexIntegerLiteral
+ ;
+
+fragment HexIntegerLiteral
+ : '0' ('x' | 'X') HexDigit+
+ ;
+
+fragment HexDigit
+ : DecimalDigit | ('a'..'f') | ('A'..'F')
+ ;
+
+fragment DecimalLiteral
+ : DecimalDigit+ '.' DecimalDigit* ExponentPart?
+ | '.'? DecimalDigit+ ExponentPart?
+ ;
+
+fragment DecimalDigit
+ : ('0'..'9')
+ ;
+
+fragment ExponentPart
+ : ('e' | 'E') ('+' | '-') ? DecimalDigit+
+ ;
+
+Identifier
+ : IdentifierStart IdentifierPart*
+ ;
+
+fragment IdentifierStart
+ : UnicodeLetter
+ | '$'
+ | '_'
+ | '\\' UnicodeEscapeSequence
+ ;
+
+fragment IdentifierPart
+ : (IdentifierStart) => IdentifierStart // Avoids ambiguity, as some IdentifierStart chars also match following alternatives.
+ | UnicodeDigit
+ | UnicodeConnectorPunctuation
+ ;
+
+fragment UnicodeLetter // Any character in the Unicode categories "Uppercase letter (Lu)",
+ : '\u0041'..'\u005A' // "Lowercase letter (Ll)", "Titlecase letter (Lt)",
+ | '\u0061'..'\u007A' // "Modifier letter (Lm)", "Other letter (Lo)", or "Letter number (Nl)".
+ | '\u00AA'
+ | '\u00B5'
+ | '\u00BA'
+ | '\u00C0'..'\u00D6'
+ | '\u00D8'..'\u00F6'
+ | '\u00F8'..'\u021F'
+ | '\u0222'..'\u0233'
+ | '\u0250'..'\u02AD'
+ | '\u02B0'..'\u02B8'
+ | '\u02BB'..'\u02C1'
+ | '\u02D0'..'\u02D1'
+ | '\u02E0'..'\u02E4'
+ | '\u02EE'
+ | '\u037A'
+ | '\u0386'
+ | '\u0388'..'\u038A'
+ | '\u038C'
+ | '\u038E'..'\u03A1'
+ | '\u03A3'..'\u03CE'
+ | '\u03D0'..'\u03D7'
+ | '\u03DA'..'\u03F3'
+ | '\u0400'..'\u0481'
+ | '\u048C'..'\u04C4'
+ | '\u04C7'..'\u04C8'
+ | '\u04CB'..'\u04CC'
+ | '\u04D0'..'\u04F5'
+ | '\u04F8'..'\u04F9'
+ | '\u0531'..'\u0556'
+ | '\u0559'
+ | '\u0561'..'\u0587'
+ | '\u05D0'..'\u05EA'
+ | '\u05F0'..'\u05F2'
+ | '\u0621'..'\u063A'
+ | '\u0640'..'\u064A'
+ | '\u0671'..'\u06D3'
+ | '\u06D5'
+ | '\u06E5'..'\u06E6'
+ | '\u06FA'..'\u06FC'
+ | '\u0710'
+ | '\u0712'..'\u072C'
+ | '\u0780'..'\u07A5'
+ | '\u0905'..'\u0939'
+ | '\u093D'
+ | '\u0950'
+ | '\u0958'..'\u0961'
+ | '\u0985'..'\u098C'
+ | '\u098F'..'\u0990'
+ | '\u0993'..'\u09A8'
+ | '\u09AA'..'\u09B0'
+ | '\u09B2'
+ | '\u09B6'..'\u09B9'
+ | '\u09DC'..'\u09DD'
+ | '\u09DF'..'\u09E1'
+ | '\u09F0'..'\u09F1'
+ | '\u0A05'..'\u0A0A'
+ | '\u0A0F'..'\u0A10'
+ | '\u0A13'..'\u0A28'
+ | '\u0A2A'..'\u0A30'
+ | '\u0A32'..'\u0A33'
+ | '\u0A35'..'\u0A36'
+ | '\u0A38'..'\u0A39'
+ | '\u0A59'..'\u0A5C'
+ | '\u0A5E'
+ | '\u0A72'..'\u0A74'
+ | '\u0A85'..'\u0A8B'
+ | '\u0A8D'
+ | '\u0A8F'..'\u0A91'
+ | '\u0A93'..'\u0AA8'
+ | '\u0AAA'..'\u0AB0'
+ | '\u0AB2'..'\u0AB3'
+ | '\u0AB5'..'\u0AB9'
+ | '\u0ABD'
+ | '\u0AD0'
+ | '\u0AE0'
+ | '\u0B05'..'\u0B0C'
+ | '\u0B0F'..'\u0B10'
+ | '\u0B13'..'\u0B28'
+ | '\u0B2A'..'\u0B30'
+ | '\u0B32'..'\u0B33'
+ | '\u0B36'..'\u0B39'
+ | '\u0B3D'
+ | '\u0B5C'..'\u0B5D'
+ | '\u0B5F'..'\u0B61'
+ | '\u0B85'..'\u0B8A'
+ | '\u0B8E'..'\u0B90'
+ | '\u0B92'..'\u0B95'
+ | '\u0B99'..'\u0B9A'
+ | '\u0B9C'
+ | '\u0B9E'..'\u0B9F'
+ | '\u0BA3'..'\u0BA4'
+ | '\u0BA8'..'\u0BAA'
+ | '\u0BAE'..'\u0BB5'
+ | '\u0BB7'..'\u0BB9'
+ | '\u0C05'..'\u0C0C'
+ | '\u0C0E'..'\u0C10'
+ | '\u0C12'..'\u0C28'
+ | '\u0C2A'..'\u0C33'
+ | '\u0C35'..'\u0C39'
+ | '\u0C60'..'\u0C61'
+ | '\u0C85'..'\u0C8C'
+ | '\u0C8E'..'\u0C90'
+ | '\u0C92'..'\u0CA8'
+ | '\u0CAA'..'\u0CB3'
+ | '\u0CB5'..'\u0CB9'
+ | '\u0CDE'
+ | '\u0CE0'..'\u0CE1'
+ | '\u0D05'..'\u0D0C'
+ | '\u0D0E'..'\u0D10'
+ | '\u0D12'..'\u0D28'
+ | '\u0D2A'..'\u0D39'
+ | '\u0D60'..'\u0D61'
+ | '\u0D85'..'\u0D96'
+ | '\u0D9A'..'\u0DB1'
+ | '\u0DB3'..'\u0DBB'
+ | '\u0DBD'
+ | '\u0DC0'..'\u0DC6'
+ | '\u0E01'..'\u0E30'
+ | '\u0E32'..'\u0E33'
+ | '\u0E40'..'\u0E46'
+ | '\u0E81'..'\u0E82'
+ | '\u0E84'
+ | '\u0E87'..'\u0E88'
+ | '\u0E8A'
+ | '\u0E8D'
+ | '\u0E94'..'\u0E97'
+ | '\u0E99'..'\u0E9F'
+ | '\u0EA1'..'\u0EA3'
+ | '\u0EA5'
+ | '\u0EA7'
+ | '\u0EAA'..'\u0EAB'
+ | '\u0EAD'..'\u0EB0'
+ | '\u0EB2'..'\u0EB3'
+ | '\u0EBD'..'\u0EC4'
+ | '\u0EC6'
+ | '\u0EDC'..'\u0EDD'
+ | '\u0F00'
+ | '\u0F40'..'\u0F6A'
+ | '\u0F88'..'\u0F8B'
+ | '\u1000'..'\u1021'
+ | '\u1023'..'\u1027'
+ | '\u1029'..'\u102A'
+ | '\u1050'..'\u1055'
+ | '\u10A0'..'\u10C5'
+ | '\u10D0'..'\u10F6'
+ | '\u1100'..'\u1159'
+ | '\u115F'..'\u11A2'
+ | '\u11A8'..'\u11F9'
+ | '\u1200'..'\u1206'
+ | '\u1208'..'\u1246'
+ | '\u1248'
+ | '\u124A'..'\u124D'
+ | '\u1250'..'\u1256'
+ | '\u1258'
+ | '\u125A'..'\u125D'
+ | '\u1260'..'\u1286'
+ | '\u1288'
+ | '\u128A'..'\u128D'
+ | '\u1290'..'\u12AE'
+ | '\u12B0'
+ | '\u12B2'..'\u12B5'
+ | '\u12B8'..'\u12BE'
+ | '\u12C0'
+ | '\u12C2'..'\u12C5'
+ | '\u12C8'..'\u12CE'
+ | '\u12D0'..'\u12D6'
+ | '\u12D8'..'\u12EE'
+ | '\u12F0'..'\u130E'
+ | '\u1310'
+ | '\u1312'..'\u1315'
+ | '\u1318'..'\u131E'
+ | '\u1320'..'\u1346'
+ | '\u1348'..'\u135A'
+ | '\u13A0'..'\u13B0'
+ | '\u13B1'..'\u13F4'
+ | '\u1401'..'\u1676'
+ | '\u1681'..'\u169A'
+ | '\u16A0'..'\u16EA'
+ | '\u1780'..'\u17B3'
+ | '\u1820'..'\u1877'
+ | '\u1880'..'\u18A8'
+ | '\u1E00'..'\u1E9B'
+ | '\u1EA0'..'\u1EE0'
+ | '\u1EE1'..'\u1EF9'
+ | '\u1F00'..'\u1F15'
+ | '\u1F18'..'\u1F1D'
+ | '\u1F20'..'\u1F39'
+ | '\u1F3A'..'\u1F45'
+ | '\u1F48'..'\u1F4D'
+ | '\u1F50'..'\u1F57'
+ | '\u1F59'
+ | '\u1F5B'
+ | '\u1F5D'
+ | '\u1F5F'..'\u1F7D'
+ | '\u1F80'..'\u1FB4'
+ | '\u1FB6'..'\u1FBC'
+ | '\u1FBE'
+ | '\u1FC2'..'\u1FC4'
+ | '\u1FC6'..'\u1FCC'
+ | '\u1FD0'..'\u1FD3'
+ | '\u1FD6'..'\u1FDB'
+ | '\u1FE0'..'\u1FEC'
+ | '\u1FF2'..'\u1FF4'
+ | '\u1FF6'..'\u1FFC'
+ | '\u207F'
+ | '\u2102'
+ | '\u2107'
+ | '\u210A'..'\u2113'
+ | '\u2115'
+ | '\u2119'..'\u211D'
+ | '\u2124'
+ | '\u2126'
+ | '\u2128'
+ | '\u212A'..'\u212D'
+ | '\u212F'..'\u2131'
+ | '\u2133'..'\u2139'
+ | '\u2160'..'\u2183'
+ | '\u3005'..'\u3007'
+ | '\u3021'..'\u3029'
+ | '\u3031'..'\u3035'
+ | '\u3038'..'\u303A'
+ | '\u3041'..'\u3094'
+ | '\u309D'..'\u309E'
+ | '\u30A1'..'\u30FA'
+ | '\u30FC'..'\u30FE'
+ | '\u3105'..'\u312C'
+ | '\u3131'..'\u318E'
+ | '\u31A0'..'\u31B7'
+ | '\u3400'
+ | '\u4DB5'
+ | '\u4E00'
+ | '\u9FA5'
+ | '\uA000'..'\uA48C'
+ | '\uAC00'
+ | '\uD7A3'
+ | '\uF900'..'\uFA2D'
+ | '\uFB00'..'\uFB06'
+ | '\uFB13'..'\uFB17'
+ | '\uFB1D'
+ | '\uFB1F'..'\uFB28'
+ | '\uFB2A'..'\uFB36'
+ | '\uFB38'..'\uFB3C'
+ | '\uFB3E'
+ | '\uFB40'..'\uFB41'
+ | '\uFB43'..'\uFB44'
+ | '\uFB46'..'\uFBB1'
+ | '\uFBD3'..'\uFD3D'
+ | '\uFD50'..'\uFD8F'
+ | '\uFD92'..'\uFDC7'
+ | '\uFDF0'..'\uFDFB'
+ | '\uFE70'..'\uFE72'
+ | '\uFE74'
+ | '\uFE76'..'\uFEFC'
+ | '\uFF21'..'\uFF3A'
+ | '\uFF41'..'\uFF5A'
+ | '\uFF66'..'\uFFBE'
+ | '\uFFC2'..'\uFFC7'
+ | '\uFFCA'..'\uFFCF'
+ | '\uFFD2'..'\uFFD7'
+ | '\uFFDA'..'\uFFDC'
+ ;
+
+fragment UnicodeCombiningMark // Any character in the Unicode categories "Non-spacing mark (Mn)"
+ : '\u0300'..'\u034E' // or "Combining spacing mark (Mc)".
+ | '\u0360'..'\u0362'
+ | '\u0483'..'\u0486'
+ | '\u0591'..'\u05A1'
+ | '\u05A3'..'\u05B9'
+ | '\u05BB'..'\u05BD'
+ | '\u05BF'
+ | '\u05C1'..'\u05C2'
+ | '\u05C4'
+ | '\u064B'..'\u0655'
+ | '\u0670'
+ | '\u06D6'..'\u06DC'
+ | '\u06DF'..'\u06E4'
+ | '\u06E7'..'\u06E8'
+ | '\u06EA'..'\u06ED'
+ | '\u0711'
+ | '\u0730'..'\u074A'
+ | '\u07A6'..'\u07B0'
+ | '\u0901'..'\u0903'
+ | '\u093C'
+ | '\u093E'..'\u094D'
+ | '\u0951'..'\u0954'
+ | '\u0962'..'\u0963'
+ | '\u0981'..'\u0983'
+ | '\u09BC'..'\u09C4'
+ | '\u09C7'..'\u09C8'
+ | '\u09CB'..'\u09CD'
+ | '\u09D7'
+ | '\u09E2'..'\u09E3'
+ | '\u0A02'
+ | '\u0A3C'
+ | '\u0A3E'..'\u0A42'
+ | '\u0A47'..'\u0A48'
+ | '\u0A4B'..'\u0A4D'
+ | '\u0A70'..'\u0A71'
+ | '\u0A81'..'\u0A83'
+ | '\u0ABC'
+ | '\u0ABE'..'\u0AC5'
+ | '\u0AC7'..'\u0AC9'
+ | '\u0ACB'..'\u0ACD'
+ | '\u0B01'..'\u0B03'
+ | '\u0B3C'
+ | '\u0B3E'..'\u0B43'
+ | '\u0B47'..'\u0B48'
+ | '\u0B4B'..'\u0B4D'
+ | '\u0B56'..'\u0B57'
+ | '\u0B82'..'\u0B83'
+ | '\u0BBE'..'\u0BC2'
+ | '\u0BC6'..'\u0BC8'
+ | '\u0BCA'..'\u0BCD'
+ | '\u0BD7'
+ | '\u0C01'..'\u0C03'
+ | '\u0C3E'..'\u0C44'
+ | '\u0C46'..'\u0C48'
+ | '\u0C4A'..'\u0C4D'
+ | '\u0C55'..'\u0C56'
+ | '\u0C82'..'\u0C83'
+ | '\u0CBE'..'\u0CC4'
+ | '\u0CC6'..'\u0CC8'
+ | '\u0CCA'..'\u0CCD'
+ | '\u0CD5'..'\u0CD6'
+ | '\u0D02'..'\u0D03'
+ | '\u0D3E'..'\u0D43'
+ | '\u0D46'..'\u0D48'
+ | '\u0D4A'..'\u0D4D'
+ | '\u0D57'
+ | '\u0D82'..'\u0D83'
+ | '\u0DCA'
+ | '\u0DCF'..'\u0DD4'
+ | '\u0DD6'
+ | '\u0DD8'..'\u0DDF'
+ | '\u0DF2'..'\u0DF3'
+ | '\u0E31'
+ | '\u0E34'..'\u0E3A'
+ | '\u0E47'..'\u0E4E'
+ | '\u0EB1'
+ | '\u0EB4'..'\u0EB9'
+ | '\u0EBB'..'\u0EBC'
+ | '\u0EC8'..'\u0ECD'
+ | '\u0F18'..'\u0F19'
+ | '\u0F35'
+ | '\u0F37'
+ | '\u0F39'
+ | '\u0F3E'..'\u0F3F'
+ | '\u0F71'..'\u0F84'
+ | '\u0F86'..'\u0F87'
+ | '\u0F90'..'\u0F97'
+ | '\u0F99'..'\u0FBC'
+ | '\u0FC6'
+ | '\u102C'..'\u1032'
+ | '\u1036'..'\u1039'
+ | '\u1056'..'\u1059'
+ | '\u17B4'..'\u17D3'
+ | '\u18A9'
+ | '\u20D0'..'\u20DC'
+ | '\u20E1'
+ | '\u302A'..'\u302F'
+ | '\u3099'..'\u309A'
+ | '\uFB1E'
+ | '\uFE20'..'\uFE23'
+ ;
+
+fragment UnicodeDigit // Any character in the Unicode category "Decimal number (Nd)".
+ : '\u0030'..'\u0039'
+ | '\u0660'..'\u0669'
+ | '\u06F0'..'\u06F9'
+ | '\u0966'..'\u096F'
+ | '\u09E6'..'\u09EF'
+ | '\u0A66'..'\u0A6F'
+ | '\u0AE6'..'\u0AEF'
+ | '\u0B66'..'\u0B6F'
+ | '\u0BE7'..'\u0BEF'
+ | '\u0C66'..'\u0C6F'
+ | '\u0CE6'..'\u0CEF'
+ | '\u0D66'..'\u0D6F'
+ | '\u0E50'..'\u0E59'
+ | '\u0ED0'..'\u0ED9'
+ | '\u0F20'..'\u0F29'
+ | '\u1040'..'\u1049'
+ | '\u1369'..'\u1371'
+ | '\u17E0'..'\u17E9'
+ | '\u1810'..'\u1819'
+ | '\uFF10'..'\uFF19'
+ ;
+
+fragment UnicodeConnectorPunctuation // Any character in the Unicode category "Connector punctuation (Pc)".
+ : '\u005F'
+ | '\u203F'..'\u2040'
+ | '\u30FB'
+ | '\uFE33'..'\uFE34'
+ | '\uFE4D'..'\uFE4F'
+ | '\uFF3F'
+ | '\uFF65'
+ ;
+
+Comment
+ : '/*' (options {greedy=false;} : .)* '*/' {$channel=HIDDEN;}
+ ;
+
+LineComment
+ : '//' ~(LT)* {$channel=HIDDEN;}
+ ;
+
+LT
+ : '\n' // Line feed.
+ | '\r' // Carriage return.
+ | '\u2028' // Line separator.
+ | '\u2029' // Paragraph separator.
+ ;
+
+WhiteSpace // Tab, vertical tab, form feed, space, non-breaking space and any other unicode "space separator".
+ : ('\t' | '\v' | '\f' | ' ' | '\u00A0') {$channel=HIDDEN;}
+ ;
Added: torflow/trunk/NetworkScanners/libs/jsparser/JavaScriptLexer.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/JavaScriptLexer.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/JavaScriptLexer.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,6039 @@
+# $ANTLR 3.1.3 Mar 18, 2009 10:09:25 JavaScript.g 2009-04-05 22:38:03
+
+import sys
+from antlr3 import *
+from antlr3.compat import set, frozenset
+
+
+# for convenience in actions
+HIDDEN = BaseRecognizer.HIDDEN
+
+# token types
+LT=4
+DecimalDigit=17
+EOF=-1
+Identifier=5
+SingleStringCharacter=9
+T__93=93
+T__94=94
+T__91=91
+T__92=92
+T__90=90
+Comment=28
+SingleEscapeCharacter=14
+UnicodeLetter=24
+ExponentPart=21
+WhiteSpace=30
+T__99=99
+T__98=98
+T__97=97
+T__96=96
+T__95=95
+UnicodeCombiningMark=27
+UnicodeDigit=25
+T__80=80
+NumericLiteral=7
+T__81=81
+T__82=82
+T__83=83
+IdentifierStart=22
+DoubleStringCharacter=8
+T__85=85
+T__84=84
+T__87=87
+T__86=86
+T__89=89
+T__88=88
+T__71=71
+T__72=72
+T__70=70
+CharacterEscapeSequence=11
+T__76=76
+T__75=75
+T__74=74
+T__73=73
+EscapeSequence=10
+T__79=79
+UnicodeConnectorPunctuation=26
+T__78=78
+T__77=77
+T__68=68
+T__69=69
+T__66=66
+T__67=67
+T__64=64
+T__65=65
+T__62=62
+T__63=63
+HexEscapeSequence=12
+LineComment=29
+T__61=61
+T__60=60
+HexDigit=18
+T__55=55
+T__56=56
+T__57=57
+T__58=58
+T__51=51
+T__52=52
+T__53=53
+T__54=54
+T__59=59
+T__103=103
+T__104=104
+T__105=105
+T__106=106
+EscapeCharacter=16
+T__50=50
+IdentifierPart=23
+T__42=42
+T__43=43
+T__40=40
+T__41=41
+T__46=46
+T__47=47
+T__44=44
+T__45=45
+T__48=48
+T__49=49
+UnicodeEscapeSequence=13
+T__102=102
+T__101=101
+T__100=100
+DecimalLiteral=19
+StringLiteral=6
+T__31=31
+T__32=32
+T__33=33
+T__34=34
+T__35=35
+T__36=36
+T__37=37
+T__38=38
+T__39=39
+HexIntegerLiteral=20
+NonEscapeCharacter=15
+
+
+class JavaScriptLexer(Lexer):
+
+ grammarFileName = "JavaScript.g"
+ antlr_version = version_str_to_tuple("3.1.3 Mar 18, 2009 10:09:25")
+ antlr_version_str = "3.1.3 Mar 18, 2009 10:09:25"
+
+ def __init__(self, input=None, state=None):
+ if state is None:
+ state = RecognizerSharedState()
+ super(JavaScriptLexer, self).__init__(input, state)
+
+
+ self.dfa18 = self.DFA18(
+ self, 18,
+ eot = self.DFA18_eot,
+ eof = self.DFA18_eof,
+ min = self.DFA18_min,
+ max = self.DFA18_max,
+ accept = self.DFA18_accept,
+ special = self.DFA18_special,
+ transition = self.DFA18_transition
+ )
+
+ self.dfa26 = self.DFA26(
+ self, 26,
+ eot = self.DFA26_eot,
+ eof = self.DFA26_eof,
+ min = self.DFA26_min,
+ max = self.DFA26_max,
+ accept = self.DFA26_accept,
+ special = self.DFA26_special,
+ transition = self.DFA26_transition
+ )
+
+
+
+
+
+
+ # $ANTLR start "T__31"
+ def mT__31(self, ):
+
+ try:
+ _type = T__31
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:7:7: ( 'function' )
+ # JavaScript.g:7:9: 'function'
+ pass
+ self.match("function")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__31"
+
+
+
+ # $ANTLR start "T__32"
+ def mT__32(self, ):
+
+ try:
+ _type = T__32
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:8:7: ( '(' )
+ # JavaScript.g:8:9: '('
+ pass
+ self.match(40)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__32"
+
+
+
+ # $ANTLR start "T__33"
+ def mT__33(self, ):
+
+ try:
+ _type = T__33
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:9:7: ( ',' )
+ # JavaScript.g:9:9: ','
+ pass
+ self.match(44)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__33"
+
+
+
+ # $ANTLR start "T__34"
+ def mT__34(self, ):
+
+ try:
+ _type = T__34
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:10:7: ( ')' )
+ # JavaScript.g:10:9: ')'
+ pass
+ self.match(41)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__34"
+
+
+
+ # $ANTLR start "T__35"
+ def mT__35(self, ):
+
+ try:
+ _type = T__35
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:11:7: ( '{' )
+ # JavaScript.g:11:9: '{'
+ pass
+ self.match(123)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__35"
+
+
+
+ # $ANTLR start "T__36"
+ def mT__36(self, ):
+
+ try:
+ _type = T__36
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:12:7: ( '}' )
+ # JavaScript.g:12:9: '}'
+ pass
+ self.match(125)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__36"
+
+
+
+ # $ANTLR start "T__37"
+ def mT__37(self, ):
+
+ try:
+ _type = T__37
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:13:7: ( 'var' )
+ # JavaScript.g:13:9: 'var'
+ pass
+ self.match("var")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__37"
+
+
+
+ # $ANTLR start "T__38"
+ def mT__38(self, ):
+
+ try:
+ _type = T__38
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:14:7: ( ';' )
+ # JavaScript.g:14:9: ';'
+ pass
+ self.match(59)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__38"
+
+
+
+ # $ANTLR start "T__39"
+ def mT__39(self, ):
+
+ try:
+ _type = T__39
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:15:7: ( '=' )
+ # JavaScript.g:15:9: '='
+ pass
+ self.match(61)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__39"
+
+
+
+ # $ANTLR start "T__40"
+ def mT__40(self, ):
+
+ try:
+ _type = T__40
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:16:7: ( 'if' )
+ # JavaScript.g:16:9: 'if'
+ pass
+ self.match("if")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__40"
+
+
+
+ # $ANTLR start "T__41"
+ def mT__41(self, ):
+
+ try:
+ _type = T__41
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:17:7: ( 'else' )
+ # JavaScript.g:17:9: 'else'
+ pass
+ self.match("else")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__41"
+
+
+
+ # $ANTLR start "T__42"
+ def mT__42(self, ):
+
+ try:
+ _type = T__42
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:18:7: ( 'do' )
+ # JavaScript.g:18:9: 'do'
+ pass
+ self.match("do")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__42"
+
+
+
+ # $ANTLR start "T__43"
+ def mT__43(self, ):
+
+ try:
+ _type = T__43
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:19:7: ( 'while' )
+ # JavaScript.g:19:9: 'while'
+ pass
+ self.match("while")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__43"
+
+
+
+ # $ANTLR start "T__44"
+ def mT__44(self, ):
+
+ try:
+ _type = T__44
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:20:7: ( 'for' )
+ # JavaScript.g:20:9: 'for'
+ pass
+ self.match("for")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__44"
+
+
+
+ # $ANTLR start "T__45"
+ def mT__45(self, ):
+
+ try:
+ _type = T__45
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:21:7: ( 'in' )
+ # JavaScript.g:21:9: 'in'
+ pass
+ self.match("in")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__45"
+
+
+
+ # $ANTLR start "T__46"
+ def mT__46(self, ):
+
+ try:
+ _type = T__46
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:22:7: ( 'continue' )
+ # JavaScript.g:22:9: 'continue'
+ pass
+ self.match("continue")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__46"
+
+
+
+ # $ANTLR start "T__47"
+ def mT__47(self, ):
+
+ try:
+ _type = T__47
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:23:7: ( 'break' )
+ # JavaScript.g:23:9: 'break'
+ pass
+ self.match("break")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__47"
+
+
+
+ # $ANTLR start "T__48"
+ def mT__48(self, ):
+
+ try:
+ _type = T__48
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:24:7: ( 'return' )
+ # JavaScript.g:24:9: 'return'
+ pass
+ self.match("return")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__48"
+
+
+
+ # $ANTLR start "T__49"
+ def mT__49(self, ):
+
+ try:
+ _type = T__49
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:25:7: ( 'with' )
+ # JavaScript.g:25:9: 'with'
+ pass
+ self.match("with")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__49"
+
+
+
+ # $ANTLR start "T__50"
+ def mT__50(self, ):
+
+ try:
+ _type = T__50
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:26:7: ( ':' )
+ # JavaScript.g:26:9: ':'
+ pass
+ self.match(58)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__50"
+
+
+
+ # $ANTLR start "T__51"
+ def mT__51(self, ):
+
+ try:
+ _type = T__51
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:27:7: ( 'switch' )
+ # JavaScript.g:27:9: 'switch'
+ pass
+ self.match("switch")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__51"
+
+
+
+ # $ANTLR start "T__52"
+ def mT__52(self, ):
+
+ try:
+ _type = T__52
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:28:7: ( 'case' )
+ # JavaScript.g:28:9: 'case'
+ pass
+ self.match("case")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__52"
+
+
+
+ # $ANTLR start "T__53"
+ def mT__53(self, ):
+
+ try:
+ _type = T__53
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:29:7: ( 'default' )
+ # JavaScript.g:29:9: 'default'
+ pass
+ self.match("default")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__53"
+
+
+
+ # $ANTLR start "T__54"
+ def mT__54(self, ):
+
+ try:
+ _type = T__54
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:30:7: ( 'throw' )
+ # JavaScript.g:30:9: 'throw'
+ pass
+ self.match("throw")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__54"
+
+
+
+ # $ANTLR start "T__55"
+ def mT__55(self, ):
+
+ try:
+ _type = T__55
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:31:7: ( 'try' )
+ # JavaScript.g:31:9: 'try'
+ pass
+ self.match("try")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__55"
+
+
+
+ # $ANTLR start "T__56"
+ def mT__56(self, ):
+
+ try:
+ _type = T__56
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:32:7: ( 'catch' )
+ # JavaScript.g:32:9: 'catch'
+ pass
+ self.match("catch")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__56"
+
+
+
+ # $ANTLR start "T__57"
+ def mT__57(self, ):
+
+ try:
+ _type = T__57
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:33:7: ( 'finally' )
+ # JavaScript.g:33:9: 'finally'
+ pass
+ self.match("finally")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__57"
+
+
+
+ # $ANTLR start "T__58"
+ def mT__58(self, ):
+
+ try:
+ _type = T__58
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:34:7: ( 'new' )
+ # JavaScript.g:34:9: 'new'
+ pass
+ self.match("new")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__58"
+
+
+
+ # $ANTLR start "T__59"
+ def mT__59(self, ):
+
+ try:
+ _type = T__59
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:35:7: ( '[' )
+ # JavaScript.g:35:9: '['
+ pass
+ self.match(91)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__59"
+
+
+
+ # $ANTLR start "T__60"
+ def mT__60(self, ):
+
+ try:
+ _type = T__60
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:36:7: ( ']' )
+ # JavaScript.g:36:9: ']'
+ pass
+ self.match(93)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__60"
+
+
+
+ # $ANTLR start "T__61"
+ def mT__61(self, ):
+
+ try:
+ _type = T__61
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:37:7: ( '.' )
+ # JavaScript.g:37:9: '.'
+ pass
+ self.match(46)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__61"
+
+
+
+ # $ANTLR start "T__62"
+ def mT__62(self, ):
+
+ try:
+ _type = T__62
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:38:7: ( '*=' )
+ # JavaScript.g:38:9: '*='
+ pass
+ self.match("*=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__62"
+
+
+
+ # $ANTLR start "T__63"
+ def mT__63(self, ):
+
+ try:
+ _type = T__63
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:39:7: ( '/=' )
+ # JavaScript.g:39:9: '/='
+ pass
+ self.match("/=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__63"
+
+
+
+ # $ANTLR start "T__64"
+ def mT__64(self, ):
+
+ try:
+ _type = T__64
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:40:7: ( '%=' )
+ # JavaScript.g:40:9: '%='
+ pass
+ self.match("%=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__64"
+
+
+
+ # $ANTLR start "T__65"
+ def mT__65(self, ):
+
+ try:
+ _type = T__65
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:41:7: ( '+=' )
+ # JavaScript.g:41:9: '+='
+ pass
+ self.match("+=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__65"
+
+
+
+ # $ANTLR start "T__66"
+ def mT__66(self, ):
+
+ try:
+ _type = T__66
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:42:7: ( '-=' )
+ # JavaScript.g:42:9: '-='
+ pass
+ self.match("-=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__66"
+
+
+
+ # $ANTLR start "T__67"
+ def mT__67(self, ):
+
+ try:
+ _type = T__67
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:43:7: ( '<<=' )
+ # JavaScript.g:43:9: '<<='
+ pass
+ self.match("<<=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__67"
+
+
+
+ # $ANTLR start "T__68"
+ def mT__68(self, ):
+
+ try:
+ _type = T__68
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:44:7: ( '>>=' )
+ # JavaScript.g:44:9: '>>='
+ pass
+ self.match(">>=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__68"
+
+
+
+ # $ANTLR start "T__69"
+ def mT__69(self, ):
+
+ try:
+ _type = T__69
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:45:7: ( '>>>=' )
+ # JavaScript.g:45:9: '>>>='
+ pass
+ self.match(">>>=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__69"
+
+
+
+ # $ANTLR start "T__70"
+ def mT__70(self, ):
+
+ try:
+ _type = T__70
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:46:7: ( '&=' )
+ # JavaScript.g:46:9: '&='
+ pass
+ self.match("&=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__70"
+
+
+
+ # $ANTLR start "T__71"
+ def mT__71(self, ):
+
+ try:
+ _type = T__71
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:47:7: ( '^=' )
+ # JavaScript.g:47:9: '^='
+ pass
+ self.match("^=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__71"
+
+
+
+ # $ANTLR start "T__72"
+ def mT__72(self, ):
+
+ try:
+ _type = T__72
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:48:7: ( '|=' )
+ # JavaScript.g:48:9: '|='
+ pass
+ self.match("|=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__72"
+
+
+
+ # $ANTLR start "T__73"
+ def mT__73(self, ):
+
+ try:
+ _type = T__73
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:49:7: ( '?' )
+ # JavaScript.g:49:9: '?'
+ pass
+ self.match(63)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__73"
+
+
+
+ # $ANTLR start "T__74"
+ def mT__74(self, ):
+
+ try:
+ _type = T__74
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:50:7: ( '||' )
+ # JavaScript.g:50:9: '||'
+ pass
+ self.match("||")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__74"
+
+
+
+ # $ANTLR start "T__75"
+ def mT__75(self, ):
+
+ try:
+ _type = T__75
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:51:7: ( '&&' )
+ # JavaScript.g:51:9: '&&'
+ pass
+ self.match("&&")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__75"
+
+
+
+ # $ANTLR start "T__76"
+ def mT__76(self, ):
+
+ try:
+ _type = T__76
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:52:7: ( '|' )
+ # JavaScript.g:52:9: '|'
+ pass
+ self.match(124)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__76"
+
+
+
+ # $ANTLR start "T__77"
+ def mT__77(self, ):
+
+ try:
+ _type = T__77
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:53:7: ( '^' )
+ # JavaScript.g:53:9: '^'
+ pass
+ self.match(94)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__77"
+
+
+
+ # $ANTLR start "T__78"
+ def mT__78(self, ):
+
+ try:
+ _type = T__78
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:54:7: ( '&' )
+ # JavaScript.g:54:9: '&'
+ pass
+ self.match(38)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__78"
+
+
+
+ # $ANTLR start "T__79"
+ def mT__79(self, ):
+
+ try:
+ _type = T__79
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:55:7: ( '==' )
+ # JavaScript.g:55:9: '=='
+ pass
+ self.match("==")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__79"
+
+
+
+ # $ANTLR start "T__80"
+ def mT__80(self, ):
+
+ try:
+ _type = T__80
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:56:7: ( '!=' )
+ # JavaScript.g:56:9: '!='
+ pass
+ self.match("!=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__80"
+
+
+
+ # $ANTLR start "T__81"
+ def mT__81(self, ):
+
+ try:
+ _type = T__81
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:57:7: ( '===' )
+ # JavaScript.g:57:9: '==='
+ pass
+ self.match("===")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__81"
+
+
+
+ # $ANTLR start "T__82"
+ def mT__82(self, ):
+
+ try:
+ _type = T__82
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:58:7: ( '!==' )
+ # JavaScript.g:58:9: '!=='
+ pass
+ self.match("!==")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__82"
+
+
+
+ # $ANTLR start "T__83"
+ def mT__83(self, ):
+
+ try:
+ _type = T__83
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:59:7: ( '<' )
+ # JavaScript.g:59:9: '<'
+ pass
+ self.match(60)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__83"
+
+
+
+ # $ANTLR start "T__84"
+ def mT__84(self, ):
+
+ try:
+ _type = T__84
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:60:7: ( '>' )
+ # JavaScript.g:60:9: '>'
+ pass
+ self.match(62)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__84"
+
+
+
+ # $ANTLR start "T__85"
+ def mT__85(self, ):
+
+ try:
+ _type = T__85
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:61:7: ( '<=' )
+ # JavaScript.g:61:9: '<='
+ pass
+ self.match("<=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__85"
+
+
+
+ # $ANTLR start "T__86"
+ def mT__86(self, ):
+
+ try:
+ _type = T__86
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:62:7: ( '>=' )
+ # JavaScript.g:62:9: '>='
+ pass
+ self.match(">=")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__86"
+
+
+
+ # $ANTLR start "T__87"
+ def mT__87(self, ):
+
+ try:
+ _type = T__87
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:63:7: ( 'instanceof' )
+ # JavaScript.g:63:9: 'instanceof'
+ pass
+ self.match("instanceof")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__87"
+
+
+
+ # $ANTLR start "T__88"
+ def mT__88(self, ):
+
+ try:
+ _type = T__88
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:64:7: ( '<<' )
+ # JavaScript.g:64:9: '<<'
+ pass
+ self.match("<<")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__88"
+
+
+
+ # $ANTLR start "T__89"
+ def mT__89(self, ):
+
+ try:
+ _type = T__89
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:65:7: ( '>>' )
+ # JavaScript.g:65:9: '>>'
+ pass
+ self.match(">>")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__89"
+
+
+
+ # $ANTLR start "T__90"
+ def mT__90(self, ):
+
+ try:
+ _type = T__90
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:66:7: ( '>>>' )
+ # JavaScript.g:66:9: '>>>'
+ pass
+ self.match(">>>")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__90"
+
+
+
+ # $ANTLR start "T__91"
+ def mT__91(self, ):
+
+ try:
+ _type = T__91
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:67:7: ( '+' )
+ # JavaScript.g:67:9: '+'
+ pass
+ self.match(43)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__91"
+
+
+
+ # $ANTLR start "T__92"
+ def mT__92(self, ):
+
+ try:
+ _type = T__92
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:68:7: ( '-' )
+ # JavaScript.g:68:9: '-'
+ pass
+ self.match(45)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__92"
+
+
+
+ # $ANTLR start "T__93"
+ def mT__93(self, ):
+
+ try:
+ _type = T__93
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:69:7: ( '*' )
+ # JavaScript.g:69:9: '*'
+ pass
+ self.match(42)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__93"
+
+
+
+ # $ANTLR start "T__94"
+ def mT__94(self, ):
+
+ try:
+ _type = T__94
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:70:7: ( '/' )
+ # JavaScript.g:70:9: '/'
+ pass
+ self.match(47)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__94"
+
+
+
+ # $ANTLR start "T__95"
+ def mT__95(self, ):
+
+ try:
+ _type = T__95
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:71:7: ( '%' )
+ # JavaScript.g:71:9: '%'
+ pass
+ self.match(37)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__95"
+
+
+
+ # $ANTLR start "T__96"
+ def mT__96(self, ):
+
+ try:
+ _type = T__96
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:72:7: ( 'delete' )
+ # JavaScript.g:72:9: 'delete'
+ pass
+ self.match("delete")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__96"
+
+
+
+ # $ANTLR start "T__97"
+ def mT__97(self, ):
+
+ try:
+ _type = T__97
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:73:7: ( 'void' )
+ # JavaScript.g:73:9: 'void'
+ pass
+ self.match("void")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__97"
+
+
+
+ # $ANTLR start "T__98"
+ def mT__98(self, ):
+
+ try:
+ _type = T__98
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:74:7: ( 'typeof' )
+ # JavaScript.g:74:9: 'typeof'
+ pass
+ self.match("typeof")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__98"
+
+
+
+ # $ANTLR start "T__99"
+ def mT__99(self, ):
+
+ try:
+ _type = T__99
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:75:7: ( '++' )
+ # JavaScript.g:75:9: '++'
+ pass
+ self.match("++")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__99"
+
+
+
+ # $ANTLR start "T__100"
+ def mT__100(self, ):
+
+ try:
+ _type = T__100
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:76:8: ( '--' )
+ # JavaScript.g:76:10: '--'
+ pass
+ self.match("--")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__100"
+
+
+
+ # $ANTLR start "T__101"
+ def mT__101(self, ):
+
+ try:
+ _type = T__101
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:77:8: ( '~' )
+ # JavaScript.g:77:10: '~'
+ pass
+ self.match(126)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__101"
+
+
+
+ # $ANTLR start "T__102"
+ def mT__102(self, ):
+
+ try:
+ _type = T__102
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:78:8: ( '!' )
+ # JavaScript.g:78:10: '!'
+ pass
+ self.match(33)
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__102"
+
+
+
+ # $ANTLR start "T__103"
+ def mT__103(self, ):
+
+ try:
+ _type = T__103
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:79:8: ( 'this' )
+ # JavaScript.g:79:10: 'this'
+ pass
+ self.match("this")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__103"
+
+
+
+ # $ANTLR start "T__104"
+ def mT__104(self, ):
+
+ try:
+ _type = T__104
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:80:8: ( 'null' )
+ # JavaScript.g:80:10: 'null'
+ pass
+ self.match("null")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__104"
+
+
+
+ # $ANTLR start "T__105"
+ def mT__105(self, ):
+
+ try:
+ _type = T__105
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:81:8: ( 'true' )
+ # JavaScript.g:81:10: 'true'
+ pass
+ self.match("true")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__105"
+
+
+
+ # $ANTLR start "T__106"
+ def mT__106(self, ):
+
+ try:
+ _type = T__106
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:82:8: ( 'false' )
+ # JavaScript.g:82:10: 'false'
+ pass
+ self.match("false")
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "T__106"
+
+
+
+ # $ANTLR start "StringLiteral"
+ def mStringLiteral(self, ):
+
+ try:
+ _type = StringLiteral
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:393:2: ( '\"' ( DoubleStringCharacter )* '\"' | '\\'' ( SingleStringCharacter )* '\\'' )
+ alt3 = 2
+ LA3_0 = self.input.LA(1)
+
+ if (LA3_0 == 34) :
+ alt3 = 1
+ elif (LA3_0 == 39) :
+ alt3 = 2
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 3, 0, self.input)
+
+ raise nvae
+
+ if alt3 == 1:
+ # JavaScript.g:393:4: '\"' ( DoubleStringCharacter )* '\"'
+ pass
+ self.match(34)
+ # JavaScript.g:393:8: ( DoubleStringCharacter )*
+ while True: #loop1
+ alt1 = 2
+ LA1_0 = self.input.LA(1)
+
+ if ((0 <= LA1_0 <= 9) or (11 <= LA1_0 <= 12) or (14 <= LA1_0 <= 33) or (35 <= LA1_0 <= 8231) or (8234 <= LA1_0 <= 65535)) :
+ alt1 = 1
+
+
+ if alt1 == 1:
+ # JavaScript.g:393:8: DoubleStringCharacter
+ pass
+ self.mDoubleStringCharacter()
+
+
+ else:
+ break #loop1
+ self.match(34)
+
+
+ elif alt3 == 2:
+ # JavaScript.g:394:4: '\\'' ( SingleStringCharacter )* '\\''
+ pass
+ self.match(39)
+ # JavaScript.g:394:9: ( SingleStringCharacter )*
+ while True: #loop2
+ alt2 = 2
+ LA2_0 = self.input.LA(1)
+
+ if ((0 <= LA2_0 <= 9) or (11 <= LA2_0 <= 12) or (14 <= LA2_0 <= 38) or (40 <= LA2_0 <= 8231) or (8234 <= LA2_0 <= 65535)) :
+ alt2 = 1
+
+
+ if alt2 == 1:
+ # JavaScript.g:394:9: SingleStringCharacter
+ pass
+ self.mSingleStringCharacter()
+
+
+ else:
+ break #loop2
+ self.match(39)
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "StringLiteral"
+
+
+
+ # $ANTLR start "DoubleStringCharacter"
+ def mDoubleStringCharacter(self, ):
+
+ try:
+ # JavaScript.g:398:2: (~ ( '\"' | '\\\\' | LT ) | '\\\\' EscapeSequence )
+ alt4 = 2
+ LA4_0 = self.input.LA(1)
+
+ if ((0 <= LA4_0 <= 9) or (11 <= LA4_0 <= 12) or (14 <= LA4_0 <= 33) or (35 <= LA4_0 <= 91) or (93 <= LA4_0 <= 8231) or (8234 <= LA4_0 <= 65535)) :
+ alt4 = 1
+ elif (LA4_0 == 92) :
+ alt4 = 2
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 4, 0, self.input)
+
+ raise nvae
+
+ if alt4 == 1:
+ # JavaScript.g:398:4: ~ ( '\"' | '\\\\' | LT )
+ pass
+ if (0 <= self.input.LA(1) <= 9) or (11 <= self.input.LA(1) <= 12) or (14 <= self.input.LA(1) <= 33) or (35 <= self.input.LA(1) <= 91) or (93 <= self.input.LA(1) <= 8231) or (8234 <= self.input.LA(1) <= 65535):
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+ elif alt4 == 2:
+ # JavaScript.g:399:4: '\\\\' EscapeSequence
+ pass
+ self.match(92)
+ self.mEscapeSequence()
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "DoubleStringCharacter"
+
+
+
+ # $ANTLR start "SingleStringCharacter"
+ def mSingleStringCharacter(self, ):
+
+ try:
+ # JavaScript.g:403:2: (~ ( '\\'' | '\\\\' | LT ) | '\\\\' EscapeSequence )
+ alt5 = 2
+ LA5_0 = self.input.LA(1)
+
+ if ((0 <= LA5_0 <= 9) or (11 <= LA5_0 <= 12) or (14 <= LA5_0 <= 38) or (40 <= LA5_0 <= 91) or (93 <= LA5_0 <= 8231) or (8234 <= LA5_0 <= 65535)) :
+ alt5 = 1
+ elif (LA5_0 == 92) :
+ alt5 = 2
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 5, 0, self.input)
+
+ raise nvae
+
+ if alt5 == 1:
+ # JavaScript.g:403:4: ~ ( '\\'' | '\\\\' | LT )
+ pass
+ if (0 <= self.input.LA(1) <= 9) or (11 <= self.input.LA(1) <= 12) or (14 <= self.input.LA(1) <= 38) or (40 <= self.input.LA(1) <= 91) or (93 <= self.input.LA(1) <= 8231) or (8234 <= self.input.LA(1) <= 65535):
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+ elif alt5 == 2:
+ # JavaScript.g:404:4: '\\\\' EscapeSequence
+ pass
+ self.match(92)
+ self.mEscapeSequence()
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "SingleStringCharacter"
+
+
+
+ # $ANTLR start "EscapeSequence"
+ def mEscapeSequence(self, ):
+
+ try:
+ # JavaScript.g:408:2: ( CharacterEscapeSequence | '0' | HexEscapeSequence | UnicodeEscapeSequence )
+ alt6 = 4
+ LA6_0 = self.input.LA(1)
+
+ if ((0 <= LA6_0 <= 9) or (11 <= LA6_0 <= 12) or (14 <= LA6_0 <= 47) or (58 <= LA6_0 <= 116) or (118 <= LA6_0 <= 119) or (121 <= LA6_0 <= 8231) or (8234 <= LA6_0 <= 65535)) :
+ alt6 = 1
+ elif (LA6_0 == 48) :
+ alt6 = 2
+ elif (LA6_0 == 120) :
+ alt6 = 3
+ elif (LA6_0 == 117) :
+ alt6 = 4
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 6, 0, self.input)
+
+ raise nvae
+
+ if alt6 == 1:
+ # JavaScript.g:408:4: CharacterEscapeSequence
+ pass
+ self.mCharacterEscapeSequence()
+
+
+ elif alt6 == 2:
+ # JavaScript.g:409:4: '0'
+ pass
+ self.match(48)
+
+
+ elif alt6 == 3:
+ # JavaScript.g:410:4: HexEscapeSequence
+ pass
+ self.mHexEscapeSequence()
+
+
+ elif alt6 == 4:
+ # JavaScript.g:411:4: UnicodeEscapeSequence
+ pass
+ self.mUnicodeEscapeSequence()
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "EscapeSequence"
+
+
+
+ # $ANTLR start "CharacterEscapeSequence"
+ def mCharacterEscapeSequence(self, ):
+
+ try:
+ # JavaScript.g:415:2: ( SingleEscapeCharacter | NonEscapeCharacter )
+ alt7 = 2
+ LA7_0 = self.input.LA(1)
+
+ if (LA7_0 == 34 or LA7_0 == 39 or LA7_0 == 92 or LA7_0 == 98 or LA7_0 == 102 or LA7_0 == 110 or LA7_0 == 114 or LA7_0 == 116 or LA7_0 == 118) :
+ alt7 = 1
+ elif ((0 <= LA7_0 <= 9) or (11 <= LA7_0 <= 12) or (14 <= LA7_0 <= 33) or (35 <= LA7_0 <= 38) or (40 <= LA7_0 <= 47) or (58 <= LA7_0 <= 91) or (93 <= LA7_0 <= 97) or (99 <= LA7_0 <= 101) or (103 <= LA7_0 <= 109) or (111 <= LA7_0 <= 113) or LA7_0 == 115 or LA7_0 == 119 or (121 <= LA7_0 <= 8231) or (8234 <= LA7_0 <= 65535)) :
+ alt7 = 2
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 7, 0, self.input)
+
+ raise nvae
+
+ if alt7 == 1:
+ # JavaScript.g:415:4: SingleEscapeCharacter
+ pass
+ self.mSingleEscapeCharacter()
+
+
+ elif alt7 == 2:
+ # JavaScript.g:416:4: NonEscapeCharacter
+ pass
+ self.mNonEscapeCharacter()
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "CharacterEscapeSequence"
+
+
+
+ # $ANTLR start "NonEscapeCharacter"
+ def mNonEscapeCharacter(self, ):
+
+ try:
+ # JavaScript.g:420:2: (~ ( EscapeCharacter | LT ) )
+ # JavaScript.g:420:4: ~ ( EscapeCharacter | LT )
+ pass
+ if (0 <= self.input.LA(1) <= 9) or (11 <= self.input.LA(1) <= 12) or (14 <= self.input.LA(1) <= 33) or (35 <= self.input.LA(1) <= 38) or (40 <= self.input.LA(1) <= 47) or (58 <= self.input.LA(1) <= 91) or (93 <= self.input.LA(1) <= 97) or (99 <= self.input.LA(1) <= 101) or (103 <= self.input.LA(1) <= 109) or (111 <= self.input.LA(1) <= 113) or self.input.LA(1) == 115 or self.input.LA(1) == 119 or (121 <= self.input.LA(1) <= 8231) or (8234 <= self.input.LA(1) <= 65535):
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "NonEscapeCharacter"
+
+
+
+ # $ANTLR start "SingleEscapeCharacter"
+ def mSingleEscapeCharacter(self, ):
+
+ try:
+ # JavaScript.g:424:2: ( '\\'' | '\"' | '\\\\' | 'b' | 'f' | 'n' | 'r' | 't' | 'v' )
+ # JavaScript.g:
+ pass
+ if self.input.LA(1) == 34 or self.input.LA(1) == 39 or self.input.LA(1) == 92 or self.input.LA(1) == 98 or self.input.LA(1) == 102 or self.input.LA(1) == 110 or self.input.LA(1) == 114 or self.input.LA(1) == 116 or self.input.LA(1) == 118:
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "SingleEscapeCharacter"
+
+
+
+ # $ANTLR start "EscapeCharacter"
+ def mEscapeCharacter(self, ):
+
+ try:
+ # JavaScript.g:428:2: ( SingleEscapeCharacter | DecimalDigit | 'x' | 'u' )
+ alt8 = 4
+ LA8 = self.input.LA(1)
+ if LA8 == 34 or LA8 == 39 or LA8 == 92 or LA8 == 98 or LA8 == 102 or LA8 == 110 or LA8 == 114 or LA8 == 116 or LA8 == 118:
+ alt8 = 1
+ elif LA8 == 48 or LA8 == 49 or LA8 == 50 or LA8 == 51 or LA8 == 52 or LA8 == 53 or LA8 == 54 or LA8 == 55 or LA8 == 56 or LA8 == 57:
+ alt8 = 2
+ elif LA8 == 120:
+ alt8 = 3
+ elif LA8 == 117:
+ alt8 = 4
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 8, 0, self.input)
+
+ raise nvae
+
+ if alt8 == 1:
+ # JavaScript.g:428:4: SingleEscapeCharacter
+ pass
+ self.mSingleEscapeCharacter()
+
+
+ elif alt8 == 2:
+ # JavaScript.g:429:4: DecimalDigit
+ pass
+ self.mDecimalDigit()
+
+
+ elif alt8 == 3:
+ # JavaScript.g:430:4: 'x'
+ pass
+ self.match(120)
+
+
+ elif alt8 == 4:
+ # JavaScript.g:431:4: 'u'
+ pass
+ self.match(117)
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "EscapeCharacter"
+
+
+
+ # $ANTLR start "HexEscapeSequence"
+ def mHexEscapeSequence(self, ):
+
+ try:
+ # JavaScript.g:435:2: ( 'x' HexDigit HexDigit )
+ # JavaScript.g:435:4: 'x' HexDigit HexDigit
+ pass
+ self.match(120)
+ self.mHexDigit()
+ self.mHexDigit()
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "HexEscapeSequence"
+
+
+
+ # $ANTLR start "UnicodeEscapeSequence"
+ def mUnicodeEscapeSequence(self, ):
+
+ try:
+ # JavaScript.g:439:2: ( 'u' HexDigit HexDigit HexDigit HexDigit )
+ # JavaScript.g:439:4: 'u' HexDigit HexDigit HexDigit HexDigit
+ pass
+ self.match(117)
+ self.mHexDigit()
+ self.mHexDigit()
+ self.mHexDigit()
+ self.mHexDigit()
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "UnicodeEscapeSequence"
+
+
+
+ # $ANTLR start "NumericLiteral"
+ def mNumericLiteral(self, ):
+
+ try:
+ _type = NumericLiteral
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:443:2: ( DecimalLiteral | HexIntegerLiteral )
+ alt9 = 2
+ LA9_0 = self.input.LA(1)
+
+ if (LA9_0 == 48) :
+ LA9_1 = self.input.LA(2)
+
+ if (LA9_1 == 88 or LA9_1 == 120) :
+ alt9 = 2
+ else:
+ alt9 = 1
+ elif (LA9_0 == 46 or (49 <= LA9_0 <= 57)) :
+ alt9 = 1
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 9, 0, self.input)
+
+ raise nvae
+
+ if alt9 == 1:
+ # JavaScript.g:443:4: DecimalLiteral
+ pass
+ self.mDecimalLiteral()
+
+
+ elif alt9 == 2:
+ # JavaScript.g:444:4: HexIntegerLiteral
+ pass
+ self.mHexIntegerLiteral()
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "NumericLiteral"
+
+
+
+ # $ANTLR start "HexIntegerLiteral"
+ def mHexIntegerLiteral(self, ):
+
+ try:
+ # JavaScript.g:448:2: ( '0' ( 'x' | 'X' ) ( HexDigit )+ )
+ # JavaScript.g:448:4: '0' ( 'x' | 'X' ) ( HexDigit )+
+ pass
+ self.match(48)
+ if self.input.LA(1) == 88 or self.input.LA(1) == 120:
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+ # JavaScript.g:448:20: ( HexDigit )+
+ cnt10 = 0
+ while True: #loop10
+ alt10 = 2
+ LA10_0 = self.input.LA(1)
+
+ if ((48 <= LA10_0 <= 57) or (65 <= LA10_0 <= 70) or (97 <= LA10_0 <= 102)) :
+ alt10 = 1
+
+
+ if alt10 == 1:
+ # JavaScript.g:448:20: HexDigit
+ pass
+ self.mHexDigit()
+
+
+ else:
+ if cnt10 >= 1:
+ break #loop10
+
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ eee = EarlyExitException(10, self.input)
+ raise eee
+
+ cnt10 += 1
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "HexIntegerLiteral"
+
+
+
+ # $ANTLR start "HexDigit"
+ def mHexDigit(self, ):
+
+ try:
+ # JavaScript.g:452:2: ( DecimalDigit | ( 'a' .. 'f' ) | ( 'A' .. 'F' ) )
+ alt11 = 3
+ LA11 = self.input.LA(1)
+ if LA11 == 48 or LA11 == 49 or LA11 == 50 or LA11 == 51 or LA11 == 52 or LA11 == 53 or LA11 == 54 or LA11 == 55 or LA11 == 56 or LA11 == 57:
+ alt11 = 1
+ elif LA11 == 97 or LA11 == 98 or LA11 == 99 or LA11 == 100 or LA11 == 101 or LA11 == 102:
+ alt11 = 2
+ elif LA11 == 65 or LA11 == 66 or LA11 == 67 or LA11 == 68 or LA11 == 69 or LA11 == 70:
+ alt11 = 3
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 11, 0, self.input)
+
+ raise nvae
+
+ if alt11 == 1:
+ # JavaScript.g:452:4: DecimalDigit
+ pass
+ self.mDecimalDigit()
+
+
+ elif alt11 == 2:
+ # JavaScript.g:452:19: ( 'a' .. 'f' )
+ pass
+ # JavaScript.g:452:19: ( 'a' .. 'f' )
+ # JavaScript.g:452:20: 'a' .. 'f'
+ pass
+ self.matchRange(97, 102)
+
+
+
+
+
+ elif alt11 == 3:
+ # JavaScript.g:452:32: ( 'A' .. 'F' )
+ pass
+ # JavaScript.g:452:32: ( 'A' .. 'F' )
+ # JavaScript.g:452:33: 'A' .. 'F'
+ pass
+ self.matchRange(65, 70)
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "HexDigit"
+
+
+
+ # $ANTLR start "DecimalLiteral"
+ def mDecimalLiteral(self, ):
+
+ try:
+ # JavaScript.g:456:2: ( ( DecimalDigit )+ '.' ( DecimalDigit )* ( ExponentPart )? | ( '.' )? ( DecimalDigit )+ ( ExponentPart )? )
+ alt18 = 2
+ alt18 = self.dfa18.predict(self.input)
+ if alt18 == 1:
+ # JavaScript.g:456:4: ( DecimalDigit )+ '.' ( DecimalDigit )* ( ExponentPart )?
+ pass
+ # JavaScript.g:456:4: ( DecimalDigit )+
+ cnt12 = 0
+ while True: #loop12
+ alt12 = 2
+ LA12_0 = self.input.LA(1)
+
+ if ((48 <= LA12_0 <= 57)) :
+ alt12 = 1
+
+
+ if alt12 == 1:
+ # JavaScript.g:456:4: DecimalDigit
+ pass
+ self.mDecimalDigit()
+
+
+ else:
+ if cnt12 >= 1:
+ break #loop12
+
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ eee = EarlyExitException(12, self.input)
+ raise eee
+
+ cnt12 += 1
+ self.match(46)
+ # JavaScript.g:456:22: ( DecimalDigit )*
+ while True: #loop13
+ alt13 = 2
+ LA13_0 = self.input.LA(1)
+
+ if ((48 <= LA13_0 <= 57)) :
+ alt13 = 1
+
+
+ if alt13 == 1:
+ # JavaScript.g:456:22: DecimalDigit
+ pass
+ self.mDecimalDigit()
+
+
+ else:
+ break #loop13
+ # JavaScript.g:456:36: ( ExponentPart )?
+ alt14 = 2
+ LA14_0 = self.input.LA(1)
+
+ if (LA14_0 == 69 or LA14_0 == 101) :
+ alt14 = 1
+ if alt14 == 1:
+ # JavaScript.g:456:36: ExponentPart
+ pass
+ self.mExponentPart()
+
+
+
+
+
+ elif alt18 == 2:
+ # JavaScript.g:457:4: ( '.' )? ( DecimalDigit )+ ( ExponentPart )?
+ pass
+ # JavaScript.g:457:4: ( '.' )?
+ alt15 = 2
+ LA15_0 = self.input.LA(1)
+
+ if (LA15_0 == 46) :
+ alt15 = 1
+ if alt15 == 1:
+ # JavaScript.g:457:4: '.'
+ pass
+ self.match(46)
+
+
+
+ # JavaScript.g:457:9: ( DecimalDigit )+
+ cnt16 = 0
+ while True: #loop16
+ alt16 = 2
+ LA16_0 = self.input.LA(1)
+
+ if ((48 <= LA16_0 <= 57)) :
+ alt16 = 1
+
+
+ if alt16 == 1:
+ # JavaScript.g:457:9: DecimalDigit
+ pass
+ self.mDecimalDigit()
+
+
+ else:
+ if cnt16 >= 1:
+ break #loop16
+
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ eee = EarlyExitException(16, self.input)
+ raise eee
+
+ cnt16 += 1
+ # JavaScript.g:457:23: ( ExponentPart )?
+ alt17 = 2
+ LA17_0 = self.input.LA(1)
+
+ if (LA17_0 == 69 or LA17_0 == 101) :
+ alt17 = 1
+ if alt17 == 1:
+ # JavaScript.g:457:23: ExponentPart
+ pass
+ self.mExponentPart()
+
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "DecimalLiteral"
+
+
+
+ # $ANTLR start "DecimalDigit"
+ def mDecimalDigit(self, ):
+
+ try:
+ # JavaScript.g:461:2: ( ( '0' .. '9' ) )
+ # JavaScript.g:461:4: ( '0' .. '9' )
+ pass
+ if (48 <= self.input.LA(1) <= 57):
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "DecimalDigit"
+
+
+
+ # $ANTLR start "ExponentPart"
+ def mExponentPart(self, ):
+
+ try:
+ # JavaScript.g:465:2: ( ( 'e' | 'E' ) ( '+' | '-' )? ( DecimalDigit )+ )
+ # JavaScript.g:465:4: ( 'e' | 'E' ) ( '+' | '-' )? ( DecimalDigit )+
+ pass
+ if self.input.LA(1) == 69 or self.input.LA(1) == 101:
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+ # JavaScript.g:465:16: ( '+' | '-' )?
+ alt19 = 2
+ LA19_0 = self.input.LA(1)
+
+ if (LA19_0 == 43 or LA19_0 == 45) :
+ alt19 = 1
+ if alt19 == 1:
+ # JavaScript.g:
+ pass
+ if self.input.LA(1) == 43 or self.input.LA(1) == 45:
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+ # JavaScript.g:465:30: ( DecimalDigit )+
+ cnt20 = 0
+ while True: #loop20
+ alt20 = 2
+ LA20_0 = self.input.LA(1)
+
+ if ((48 <= LA20_0 <= 57)) :
+ alt20 = 1
+
+
+ if alt20 == 1:
+ # JavaScript.g:465:30: DecimalDigit
+ pass
+ self.mDecimalDigit()
+
+
+ else:
+ if cnt20 >= 1:
+ break #loop20
+
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ eee = EarlyExitException(20, self.input)
+ raise eee
+
+ cnt20 += 1
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "ExponentPart"
+
+
+
+ # $ANTLR start "Identifier"
+ def mIdentifier(self, ):
+
+ try:
+ _type = Identifier
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:469:2: ( IdentifierStart ( IdentifierPart )* )
+ # JavaScript.g:469:4: IdentifierStart ( IdentifierPart )*
+ pass
+ self.mIdentifierStart()
+ # JavaScript.g:469:20: ( IdentifierPart )*
+ while True: #loop21
+ alt21 = 2
+ LA21_0 = self.input.LA(1)
+
+ if (LA21_0 == 36 or (48 <= LA21_0 <= 57) or (65 <= LA21_0 <= 90) or LA21_0 == 92 or LA21_0 == 95 or (97 <= LA21_0 <= 122) or LA21_0 == 170 or LA21_0 == 181 or LA21_0 == 186 or (192 <= LA21_0 <= 214) or (216 <= LA21_0 <= 246) or (248 <= LA21_0 <= 543) or (546 <= LA21_0 <= 563) or (592 <= LA21_0 <= 685) or (688 <= LA21_0 <= 696) or (699 <= LA21_0 <= 705) or (720 <= LA21_0 <= 721) or (736 <= LA21_0 <= 740) or LA21_0 == 750 or LA21_0 == 890 or LA21_0 == 902 or (904 <= LA21_0 <= 906) or LA21_0 == 908 or (910 <= LA21_0 <= 929) or (931 <= LA21_0 <= 974) or (976 <= LA21_0 <= 983) or (986 <= LA21_0 <= 1011) or (1024 <= LA21_0 <= 1153) or (1164 <= LA21_0 <= 1220) or (1223 <= LA21_0 <= 1224) or (1227 <= LA21_0 <= 1228) or (1232 <= LA21_0 <= 1269) or (1272 <= LA21_0 <= 1273) or (1329 <= LA21_0 <= 1366) or LA21_0 == 1369 or (1377 <= LA21_0 <= 1415) or (1488 <= LA21_0 <= 1514) or (1520 <= LA21_0 <= 1522) or (1569 <= LA21_0 <= 1594) or (1600 <= LA21_0 <= 1610) or (1632 <= LA21_0 <= 1641) or (1649 <= LA21_0 <= 1747) or LA21_0 == 1749 or (1765 <= LA21_0 <= 1766) or (1776 <= LA21_0 <= 1788) or LA21_0 == 1808 or (1810 <= LA21_0 <= 1836) or (1920 <= LA21_0 <= 1957) or (2309 <= LA21_0 <= 2361) or LA21_0 == 2365 or LA21_0 == 2384 or (2392 <= LA21_0 <= 2401) or (2406 <= LA21_0 <= 2415) or (2437 <= LA21_0 <= 2444) or (2447 <= LA21_0 <= 2448) or (2451 <= LA21_0 <= 2472) or (2474 <= LA21_0 <= 2480) or LA21_0 == 2482 or (2486 <= LA21_0 <= 2489) or (2524 <= LA21_0 <= 2525) or (2527 <= LA21_0 <= 2529) or (2534 <= LA21_0 <= 2545) or (2565 <= LA21_0 <= 2570) or (2575 <= LA21_0 <= 2576) or (2579 <= LA21_0 <= 2600) or (2602 <= LA21_0 <= 2608) or (2610 <= LA21_0 <= 2611) or (2613 <= LA21_0 <= 2614) or (2616 <= LA21_0 <= 2617) or (2649 <= LA21_0 <= 2652) or LA21_0 == 2654 or (2662 <= LA21_0 <= 2671) or (2674 <= LA21_0 <= 2676) or (2693 <= LA21_0 <= 2699) or LA21_0 == 2701 or (2703 <= LA21_0 <= 2705) or (2707 <= LA21_0 <= 2728) or (2730 <= LA21_0 <= 2736) or (2738 <= LA21_0 <= 2739) or (2741 <= LA21_0 <= 2745) or LA21_0 == 2749 or LA21_0 == 2768 or LA21_0 == 2784 or (2790 <= LA21_0 <= 2799) or (2821 <= LA21_0 <= 2828) or (2831 <= LA21_0 <= 2832) or (2835 <= LA21_0 <= 2856) or (2858 <= LA21_0 <= 2864) or (2866 <= LA21_0 <= 2867) or (2870 <= LA21_0 <= 2873) or LA21_0 == 2877 or (2908 <= LA21_0 <= 2909) or (2911 <= LA21_0 <= 2913) or (2918 <= LA21_0 <= 2927) or (2949 <= LA21_0 <= 2954) or (2958 <= LA21_0 <= 2960) or (2962 <= LA21_0 <= 2965) or (2969 <= LA21_0 <= 2970) or LA21_0 == 2972 or (2974 <= LA21_0 <= 2975) or (2979 <= LA21_0 <= 2980) or (2984 <= LA21_0 <= 2986) or (2990 <= LA21_0 <= 2997) or (2999 <= LA21_0 <= 3001) or (3047 <= LA21_0 <= 3055) or (3077 <= LA21_0 <= 3084) or (3086 <= LA21_0 <= 3088) or (3090 <= LA21_0 <= 3112) or (3114 <= LA21_0 <= 3123) or (3125 <= LA21_0 <= 3129) or (3168 <= LA21_0 <= 3169) or (3174 <= LA21_0 <= 3183) or (3205 <= LA21_0 <= 3212) or (3214 <= LA21_0 <= 3216) or (3218 <= LA21_0 <= 3240) or (3242 <= LA21_0 <= 3251) or (3253 <= LA21_0 <= 3257) or LA21_0 == 3294 or (3296 <= LA21_0 <= 3297) or (3302 <= LA21_0 <= 3311) or (3333 <= LA21_0 <= 3340) or (3342 <= LA21_0 <= 3344) or (3346 <= LA21_0 <= 3368) or (3370 <= LA21_0 <= 3385) or (3424 <= LA21_0 <= 3425) or (3430 <= LA21_0 <= 3439) or (3461 <= LA21_0 <= 3478) or (3482 <= LA21_0 <= 3505) or (3507 <= LA21_0 <= 3515) or LA21_0 == 3517 or (3520 <= LA21_0 <= 3526) or (3585 <= LA21_0 <= 3632) or (3634 <= LA21_0 <= 3635) or (3648 <= LA21_0 <= 3654) or (3664 <= LA21_0 <= 3673) or (3713 <= LA21_0 <= 3714) or LA21_0 == 3716 or (3719 <= LA21_0 <= 3720) or LA21_0 == 3722 or LA21_0 == 3725 or (3732 <= LA21_0 <= 3735) or (3737 <= LA21_0 <= 3743) or (3745 <= LA21_0 <= 3747) or LA21_0 == 3749 or LA21_0 == 3751 or (3754 <= LA21_0 <= 3755) or (3757 <= LA21_0 <= 3760) or (3762 <= LA21_0 <= 3763) or (3773 <= LA21_0 <= 3780) or LA21_0 == 3782 or (3792 <= LA21_0 <= 3801) or (3804 <= LA21_0 <= 3805) or LA21_0 == 3840 or (3872 <= LA21_0 <= 3881) or (3904 <= LA21_0 <= 3946) or (3976 <= LA21_0 <= 3979) or (4096 <= LA21_0 <= 4129) or (4131 <= LA21_0 <= 4135) or (4137 <= LA21_0 <= 4138) or (4160 <= LA21_0 <= 4169) or (4176 <= LA21_0 <= 4181) or (4256 <= LA21_0 <= 4293) or (4304 <= LA21_0 <= 4342) or (4352 <= LA21_0 <= 4441) or (4447 <= LA21_0 <= 4514) or (4520 <= LA21_0 <= 4601) or (4608 <= LA21_0 <= 4614) or (4616 <= LA21_0 <= 4678) or LA21_0 == 4680 or (4682 <= LA21_0 <= 4685) or (4688 <= LA21_0 <= 4694) or LA21_0 == 4696 or (4698 <= LA21_0 <= 4701) or (4704 <= LA21_0 <= 4742) or LA21_0 == 4744 or (4746 <= LA21_0 <= 4749) or (4752 <= LA21_0 <= 4782) or LA21_0 == 4784 or (4786 <= LA21_0 <= 4789) or (4792 <= LA21_0 <= 4798) or LA21_0 == 4800 or (4802 <= LA21_0 <= 4805) or (4808 <= LA21_0 <= 4814) or (4816 <= LA21_0 <= 4822) or (4824 <= LA21_0 <= 4846) or (4848 <= LA21_0 <= 4878) or LA21_0 == 4880 or (4882 <= LA21_0 <= 4885) or (4888 <= LA21_0 <= 4894) or (4896 <= LA21_0 <= 4934) or (4936 <= LA21_0 <= 4954) or (4969 <= LA21_0 <= 4977) or (5024 <= LA21_0 <= 5108) or (5121 <= LA21_0 <= 5750) or (5761 <= LA21_0 <= 5786) or (5792 <= LA21_0 <= 5866) or (6016 <= LA21_0 <= 6067) or (6112 <= LA21_0 <= 6121) or (6160 <= LA21_0 <= 6169) or (6176 <= LA21_0 <= 6263) or (6272 <= LA21_0 <= 6312) or (7680 <= LA21_0 <= 7835) or (7840 <= LA21_0 <= 7929) or (7936 <= LA21_0 <= 7957) or (7960 <= LA21_0 <= 7965) or (7968 <= LA21_0 <= 8005) or (8008 <= LA21_0 <= 8013) or (8016 <= LA21_0 <= 8023) or LA21_0 == 8025 or LA21_0 == 8027 or LA21_0 == 8029 or (8031 <= LA21_0 <= 8061) or (8064 <= LA21_0 <= 8116) or (8118 <= LA21_0 <= 8124) or LA21_0 == 8126 or (8130 <= LA21_0 <= 8132) or (8134 <= LA21_0 <= 8140) or (8144 <= LA21_0 <= 8147) or (8150 <= LA21_0 <= 8155) or (8160 <= LA21_0 <= 8172) or (8178 <= LA21_0 <= 8180) or (8182 <= LA21_0 <= 8188) or (8255 <= LA21_0 <= 8256) or LA21_0 == 8319 or LA21_0 == 8450 or LA21_0 == 8455 or (8458 <= LA21_0 <= 8467) or LA21_0 == 8469 or (8473 <= LA21_0 <= 8477) or LA21_0 == 8484 or LA21_0 == 8486 or LA21_0 == 8488 or (8490 <= LA21_0 <= 8493) or (8495 <= LA21_0 <= 8497) or (8499 <= LA21_0 <= 8505) or (8544 <= LA21_0 <= 8579) or (12293 <= LA21_0 <= 12295) or (12321 <= LA21_0 <= 12329) or (12337 <= LA21_0 <= 12341) or (12344 <= LA21_0 <= 12346) or (12353 <= LA21_0 <= 12436) or (12445 <= LA21_0 <= 12446) or (12449 <= LA21_0 <= 12542) or (12549 <= LA21_0 <= 12588) or (12593 <= LA21_0 <= 12686) or (12704 <= LA21_0 <= 12727) or LA21_0 == 13312 or LA21_0 == 19893 or LA21_0 == 19968 or LA21_0 == 40869 or (40960 <= LA21_0 <= 42124) or LA21_0 == 44032 or LA21_0 == 55203 or (63744 <= LA21_0 <= 64045) or (64256 <= LA21_0 <= 64262) or (64275 <= LA21_0 <= 64279) or LA21_0 == 64285 or (64287 <= LA21_0 <= 64296) or (64298 <= LA21_0 <= 64310) or (64312 <= LA21_0 <= 64316) or LA21_0 == 64318 or (64320 <= LA21_0 <= 64321) or (64323 <= LA21_0 <= 64324) or (64326 <= LA21_0 <= 64433) or (64467 <= LA21_0 <= 64829) or (64848 <= LA21_0 <= 64911) or (64914 <= LA21_0 <= 64967) or (65008 <= LA21_0 <= 65019) or (65075 <= LA21_0 <= 65076) or (65101 <= LA21_0 <= 65103) or (65136 <= LA21_0 <= 65138) or LA21_0 == 65140 or (65142 <= LA21_0 <= 65276) or (65296 <= LA21_0 <= 65305) or (65313 <= LA21_0 <= 65338) or LA21_0 == 65343 or (65345 <= LA21_0 <= 65370) or (65381 <= LA21_0 <= 65470) or (65474 <= LA21_0 <= 65479) or (65482 <= LA21_0 <= 65487) or (65490 <= LA21_0 <= 65495) or (65498 <= LA21_0 <= 65500)) :
+ alt21 = 1
+
+
+ if alt21 == 1:
+ # JavaScript.g:469:20: IdentifierPart
+ pass
+ self.mIdentifierPart()
+
+
+ else:
+ break #loop21
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "Identifier"
+
+
+
+ # $ANTLR start "IdentifierStart"
+ def mIdentifierStart(self, ):
+
+ try:
+ # JavaScript.g:473:2: ( UnicodeLetter | '$' | '_' | '\\\\' UnicodeEscapeSequence )
+ alt22 = 4
+ LA22_0 = self.input.LA(1)
+
+ if ((65 <= LA22_0 <= 90) or (97 <= LA22_0 <= 122) or LA22_0 == 170 or LA22_0 == 181 or LA22_0 == 186 or (192 <= LA22_0 <= 214) or (216 <= LA22_0 <= 246) or (248 <= LA22_0 <= 543) or (546 <= LA22_0 <= 563) or (592 <= LA22_0 <= 685) or (688 <= LA22_0 <= 696) or (699 <= LA22_0 <= 705) or (720 <= LA22_0 <= 721) or (736 <= LA22_0 <= 740) or LA22_0 == 750 or LA22_0 == 890 or LA22_0 == 902 or (904 <= LA22_0 <= 906) or LA22_0 == 908 or (910 <= LA22_0 <= 929) or (931 <= LA22_0 <= 974) or (976 <= LA22_0 <= 983) or (986 <= LA22_0 <= 1011) or (1024 <= LA22_0 <= 1153) or (1164 <= LA22_0 <= 1220) or (1223 <= LA22_0 <= 1224) or (1227 <= LA22_0 <= 1228) or (1232 <= LA22_0 <= 1269) or (1272 <= LA22_0 <= 1273) or (1329 <= LA22_0 <= 1366) or LA22_0 == 1369 or (1377 <= LA22_0 <= 1415) or (1488 <= LA22_0 <= 1514) or (1520 <= LA22_0 <= 1522) or (1569 <= LA22_0 <= 1594) or (1600 <= LA22_0 <= 1610) or (1649 <= LA22_0 <= 1747) or LA22_0 == 1749 or (1765 <= LA22_0 <= 1766) or (1786 <= LA22_0 <= 1788) or LA22_0 == 1808 or (1810 <= LA22_0 <= 1836) or (1920 <= LA22_0 <= 1957) or (2309 <= LA22_0 <= 2361) or LA22_0 == 2365 or LA22_0 == 2384 or (2392 <= LA22_0 <= 2401) or (2437 <= LA22_0 <= 2444) or (2447 <= LA22_0 <= 2448) or (2451 <= LA22_0 <= 2472) or (2474 <= LA22_0 <= 2480) or LA22_0 == 2482 or (2486 <= LA22_0 <= 2489) or (2524 <= LA22_0 <= 2525) or (2527 <= LA22_0 <= 2529) or (2544 <= LA22_0 <= 2545) or (2565 <= LA22_0 <= 2570) or (2575 <= LA22_0 <= 2576) or (2579 <= LA22_0 <= 2600) or (2602 <= LA22_0 <= 2608) or (2610 <= LA22_0 <= 2611) or (2613 <= LA22_0 <= 2614) or (2616 <= LA22_0 <= 2617) or (2649 <= LA22_0 <= 2652) or LA22_0 == 2654 or (2674 <= LA22_0 <= 2676) or (2693 <= LA22_0 <= 2699) or LA22_0 == 2701 or (2703 <= LA22_0 <= 2705) or (2707 <= LA22_0 <= 2728) or (2730 <= LA22_0 <= 2736) or (2738 <= LA22_0 <= 2739) or (2741 <= LA22_0 <= 2745) or LA22_0 == 2749 or LA22_0 == 2768 or LA22_0 == 2784 or (2821 <= LA22_0 <= 2828) or (2831 <= LA22_0 <= 2832) or (2835 <= LA22_0 <= 2856) or (2858 <= LA22_0 <= 2864) or (2866 <= LA22_0 <= 2867) or (2870 <= LA22_0 <= 2873) or LA22_0 == 2877 or (2908 <= LA22_0 <= 2909) or (2911 <= LA22_0 <= 2913) or (2949 <= LA22_0 <= 2954) or (2958 <= LA22_0 <= 2960) or (2962 <= LA22_0 <= 2965) or (2969 <= LA22_0 <= 2970) or LA22_0 == 2972 or (2974 <= LA22_0 <= 2975) or (2979 <= LA22_0 <= 2980) or (2984 <= LA22_0 <= 2986) or (2990 <= LA22_0 <= 2997) or (2999 <= LA22_0 <= 3001) or (3077 <= LA22_0 <= 3084) or (3086 <= LA22_0 <= 3088) or (3090 <= LA22_0 <= 3112) or (3114 <= LA22_0 <= 3123) or (3125 <= LA22_0 <= 3129) or (3168 <= LA22_0 <= 3169) or (3205 <= LA22_0 <= 3212) or (3214 <= LA22_0 <= 3216) or (3218 <= LA22_0 <= 3240) or (3242 <= LA22_0 <= 3251) or (3253 <= LA22_0 <= 3257) or LA22_0 == 3294 or (3296 <= LA22_0 <= 3297) or (3333 <= LA22_0 <= 3340) or (3342 <= LA22_0 <= 3344) or (3346 <= LA22_0 <= 3368) or (3370 <= LA22_0 <= 3385) or (3424 <= LA22_0 <= 3425) or (3461 <= LA22_0 <= 3478) or (3482 <= LA22_0 <= 3505) or (3507 <= LA22_0 <= 3515) or LA22_0 == 3517 or (3520 <= LA22_0 <= 3526) or (3585 <= LA22_0 <= 3632) or (3634 <= LA22_0 <= 3635) or (3648 <= LA22_0 <= 3654) or (3713 <= LA22_0 <= 3714) or LA22_0 == 3716 or (3719 <= LA22_0 <= 3720) or LA22_0 == 3722 or LA22_0 == 3725 or (3732 <= LA22_0 <= 3735) or (3737 <= LA22_0 <= 3743) or (3745 <= LA22_0 <= 3747) or LA22_0 == 3749 or LA22_0 == 3751 or (3754 <= LA22_0 <= 3755) or (3757 <= LA22_0 <= 3760) or (3762 <= LA22_0 <= 3763) or (3773 <= LA22_0 <= 3780) or LA22_0 == 3782 or (3804 <= LA22_0 <= 3805) or LA22_0 == 3840 or (3904 <= LA22_0 <= 3946) or (3976 <= LA22_0 <= 3979) or (4096 <= LA22_0 <= 4129) or (4131 <= LA22_0 <= 4135) or (4137 <= LA22_0 <= 4138) or (4176 <= LA22_0 <= 4181) or (4256 <= LA22_0 <= 4293) or (4304 <= LA22_0 <= 4342) or (4352 <= LA22_0 <= 4441) or (4447 <= LA22_0 <= 4514) or (4520 <= LA22_0 <= 4601) or (4608 <= LA22_0 <= 4614) or (4616 <= LA22_0 <= 4678) or LA22_0 == 4680 or (4682 <= LA22_0 <= 4685) or (4688 <= LA22_0 <= 4694) or LA22_0 == 4696 or (4698 <= LA22_0 <= 4701) or (4704 <= LA22_0 <= 4742) or LA22_0 == 4744 or (4746 <= LA22_0 <= 4749) or (4752 <= LA22_0 <= 4782) or LA22_0 == 4784 or (4786 <= LA22_0 <= 4789) or (4792 <= LA22_0 <= 4798) or LA22_0 == 4800 or (4802 <= LA22_0 <= 4805) or (4808 <= LA22_0 <= 4814) or (4816 <= LA22_0 <= 4822) or (4824 <= LA22_0 <= 4846) or (4848 <= LA22_0 <= 4878) or LA22_0 == 4880 or (4882 <= LA22_0 <= 4885) or (4888 <= LA22_0 <= 4894) or (4896 <= LA22_0 <= 4934) or (4936 <= LA22_0 <= 4954) or (5024 <= LA22_0 <= 5108) or (5121 <= LA22_0 <= 5750) or (5761 <= LA22_0 <= 5786) or (5792 <= LA22_0 <= 5866) or (6016 <= LA22_0 <= 6067) or (6176 <= LA22_0 <= 6263) or (6272 <= LA22_0 <= 6312) or (7680 <= LA22_0 <= 7835) or (7840 <= LA22_0 <= 7929) or (7936 <= LA22_0 <= 7957) or (7960 <= LA22_0 <= 7965) or (7968 <= LA22_0 <= 8005) or (8008 <= LA22_0 <= 8013) or (8016 <= LA22_0 <= 8023) or LA22_0 == 8025 or LA22_0 == 8027 or LA22_0 == 8029 or (8031 <= LA22_0 <= 8061) or (8064 <= LA22_0 <= 8116) or (8118 <= LA22_0 <= 8124) or LA22_0 == 8126 or (8130 <= LA22_0 <= 8132) or (8134 <= LA22_0 <= 8140) or (8144 <= LA22_0 <= 8147) or (8150 <= LA22_0 <= 8155) or (8160 <= LA22_0 <= 8172) or (8178 <= LA22_0 <= 8180) or (8182 <= LA22_0 <= 8188) or LA22_0 == 8319 or LA22_0 == 8450 or LA22_0 == 8455 or (8458 <= LA22_0 <= 8467) or LA22_0 == 8469 or (8473 <= LA22_0 <= 8477) or LA22_0 == 8484 or LA22_0 == 8486 or LA22_0 == 8488 or (8490 <= LA22_0 <= 8493) or (8495 <= LA22_0 <= 8497) or (8499 <= LA22_0 <= 8505) or (8544 <= LA22_0 <= 8579) or (12293 <= LA22_0 <= 12295) or (12321 <= LA22_0 <= 12329) or (12337 <= LA22_0 <= 12341) or (12344 <= LA22_0 <= 12346) or (12353 <= LA22_0 <= 12436) or (12445 <= LA22_0 <= 12446) or (12449 <= LA22_0 <= 12538) or (12540 <= LA22_0 <= 12542) or (12549 <= LA22_0 <= 12588) or (12593 <= LA22_0 <= 12686) or (12704 <= LA22_0 <= 12727) or LA22_0 == 13312 or LA22_0 == 19893 or LA22_0 == 19968 or LA22_0 == 40869 or (40960 <= LA22_0 <= 42124) or LA22_0 == 44032 or LA22_0 == 55203 or (63744 <= LA22_0 <= 64045) or (64256 <= LA22_0 <= 64262) or (64275 <= LA22_0 <= 64279) or LA22_0 == 64285 or (64287 <= LA22_0 <= 64296) or (64298 <= LA22_0 <= 64310) or (64312 <= LA22_0 <= 64316) or LA22_0 == 64318 or (64320 <= LA22_0 <= 64321) or (64323 <= LA22_0 <= 64324) or (64326 <= LA22_0 <= 64433) or (64467 <= LA22_0 <= 64829) or (64848 <= LA22_0 <= 64911) or (64914 <= LA22_0 <= 64967) or (65008 <= LA22_0 <= 65019) or (65136 <= LA22_0 <= 65138) or LA22_0 == 65140 or (65142 <= LA22_0 <= 65276) or (65313 <= LA22_0 <= 65338) or (65345 <= LA22_0 <= 65370) or (65382 <= LA22_0 <= 65470) or (65474 <= LA22_0 <= 65479) or (65482 <= LA22_0 <= 65487) or (65490 <= LA22_0 <= 65495) or (65498 <= LA22_0 <= 65500)) :
+ alt22 = 1
+ elif (LA22_0 == 36) :
+ alt22 = 2
+ elif (LA22_0 == 95) :
+ alt22 = 3
+ elif (LA22_0 == 92) :
+ alt22 = 4
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 22, 0, self.input)
+
+ raise nvae
+
+ if alt22 == 1:
+ # JavaScript.g:473:4: UnicodeLetter
+ pass
+ self.mUnicodeLetter()
+
+
+ elif alt22 == 2:
+ # JavaScript.g:474:4: '$'
+ pass
+ self.match(36)
+
+
+ elif alt22 == 3:
+ # JavaScript.g:475:4: '_'
+ pass
+ self.match(95)
+
+
+ elif alt22 == 4:
+ # JavaScript.g:476:11: '\\\\' UnicodeEscapeSequence
+ pass
+ self.match(92)
+ self.mUnicodeEscapeSequence()
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "IdentifierStart"
+
+
+
+ # $ANTLR start "IdentifierPart"
+ def mIdentifierPart(self, ):
+
+ try:
+ # JavaScript.g:480:2: ( ( IdentifierStart )=> IdentifierStart | UnicodeDigit | UnicodeConnectorPunctuation )
+ alt23 = 3
+ LA23_0 = self.input.LA(1)
+
+ if ((65 <= LA23_0 <= 90) or (97 <= LA23_0 <= 122) or LA23_0 == 170 or LA23_0 == 181 or LA23_0 == 186 or (192 <= LA23_0 <= 214) or (216 <= LA23_0 <= 246) or (248 <= LA23_0 <= 543) or (546 <= LA23_0 <= 563) or (592 <= LA23_0 <= 685) or (688 <= LA23_0 <= 696) or (699 <= LA23_0 <= 705) or (720 <= LA23_0 <= 721) or (736 <= LA23_0 <= 740) or LA23_0 == 750 or LA23_0 == 890 or LA23_0 == 902 or (904 <= LA23_0 <= 906) or LA23_0 == 908 or (910 <= LA23_0 <= 929) or (931 <= LA23_0 <= 974) or (976 <= LA23_0 <= 983) or (986 <= LA23_0 <= 1011) or (1024 <= LA23_0 <= 1153) or (1164 <= LA23_0 <= 1220) or (1223 <= LA23_0 <= 1224) or (1227 <= LA23_0 <= 1228) or (1232 <= LA23_0 <= 1269) or (1272 <= LA23_0 <= 1273) or (1329 <= LA23_0 <= 1366) or LA23_0 == 1369 or (1377 <= LA23_0 <= 1415) or (1488 <= LA23_0 <= 1514) or (1520 <= LA23_0 <= 1522) or (1569 <= LA23_0 <= 1594) or (1600 <= LA23_0 <= 1610) or (1649 <= LA23_0 <= 1747) or LA23_0 == 1749 or (1765 <= LA23_0 <= 1766) or (1786 <= LA23_0 <= 1788) or LA23_0 == 1808 or (1810 <= LA23_0 <= 1836) or (1920 <= LA23_0 <= 1957) or (2309 <= LA23_0 <= 2361) or LA23_0 == 2365 or LA23_0 == 2384 or (2392 <= LA23_0 <= 2401) or (2437 <= LA23_0 <= 2444) or (2447 <= LA23_0 <= 2448) or (2451 <= LA23_0 <= 2472) or (2474 <= LA23_0 <= 2480) or LA23_0 == 2482 or (2486 <= LA23_0 <= 2489) or (2524 <= LA23_0 <= 2525) or (2527 <= LA23_0 <= 2529) or (2544 <= LA23_0 <= 2545) or (2565 <= LA23_0 <= 2570) or (2575 <= LA23_0 <= 2576) or (2579 <= LA23_0 <= 2600) or (2602 <= LA23_0 <= 2608) or (2610 <= LA23_0 <= 2611) or (2613 <= LA23_0 <= 2614) or (2616 <= LA23_0 <= 2617) or (2649 <= LA23_0 <= 2652) or LA23_0 == 2654 or (2674 <= LA23_0 <= 2676) or (2693 <= LA23_0 <= 2699) or LA23_0 == 2701 or (2703 <= LA23_0 <= 2705) or (2707 <= LA23_0 <= 2728) or (2730 <= LA23_0 <= 2736) or (2738 <= LA23_0 <= 2739) or (2741 <= LA23_0 <= 2745) or LA23_0 == 2749 or LA23_0 == 2768 or LA23_0 == 2784 or (2821 <= LA23_0 <= 2828) or (2831 <= LA23_0 <= 2832) or (2835 <= LA23_0 <= 2856) or (2858 <= LA23_0 <= 2864) or (2866 <= LA23_0 <= 2867) or (2870 <= LA23_0 <= 2873) or LA23_0 == 2877 or (2908 <= LA23_0 <= 2909) or (2911 <= LA23_0 <= 2913) or (2949 <= LA23_0 <= 2954) or (2958 <= LA23_0 <= 2960) or (2962 <= LA23_0 <= 2965) or (2969 <= LA23_0 <= 2970) or LA23_0 == 2972 or (2974 <= LA23_0 <= 2975) or (2979 <= LA23_0 <= 2980) or (2984 <= LA23_0 <= 2986) or (2990 <= LA23_0 <= 2997) or (2999 <= LA23_0 <= 3001) or (3077 <= LA23_0 <= 3084) or (3086 <= LA23_0 <= 3088) or (3090 <= LA23_0 <= 3112) or (3114 <= LA23_0 <= 3123) or (3125 <= LA23_0 <= 3129) or (3168 <= LA23_0 <= 3169) or (3205 <= LA23_0 <= 3212) or (3214 <= LA23_0 <= 3216) or (3218 <= LA23_0 <= 3240) or (3242 <= LA23_0 <= 3251) or (3253 <= LA23_0 <= 3257) or LA23_0 == 3294 or (3296 <= LA23_0 <= 3297) or (3333 <= LA23_0 <= 3340) or (3342 <= LA23_0 <= 3344) or (3346 <= LA23_0 <= 3368) or (3370 <= LA23_0 <= 3385) or (3424 <= LA23_0 <= 3425) or (3461 <= LA23_0 <= 3478) or (3482 <= LA23_0 <= 3505) or (3507 <= LA23_0 <= 3515) or LA23_0 == 3517 or (3520 <= LA23_0 <= 3526) or (3585 <= LA23_0 <= 3632) or (3634 <= LA23_0 <= 3635) or (3648 <= LA23_0 <= 3654) or (3713 <= LA23_0 <= 3714) or LA23_0 == 3716 or (3719 <= LA23_0 <= 3720) or LA23_0 == 3722 or LA23_0 == 3725 or (3732 <= LA23_0 <= 3735) or (3737 <= LA23_0 <= 3743) or (3745 <= LA23_0 <= 3747) or LA23_0 == 3749 or LA23_0 == 3751 or (3754 <= LA23_0 <= 3755) or (3757 <= LA23_0 <= 3760) or (3762 <= LA23_0 <= 3763) or (3773 <= LA23_0 <= 3780) or LA23_0 == 3782 or (3804 <= LA23_0 <= 3805) or LA23_0 == 3840 or (3904 <= LA23_0 <= 3946) or (3976 <= LA23_0 <= 3979) or (4096 <= LA23_0 <= 4129) or (4131 <= LA23_0 <= 4135) or (4137 <= LA23_0 <= 4138) or (4176 <= LA23_0 <= 4181) or (4256 <= LA23_0 <= 4293) or (4304 <= LA23_0 <= 4342) or (4352 <= LA23_0 <= 4441) or (4447 <= LA23_0 <= 4514) or (4520 <= LA23_0 <= 4601) or (4608 <= LA23_0 <= 4614) or (4616 <= LA23_0 <= 4678) or LA23_0 == 4680 or (4682 <= LA23_0 <= 4685) or (4688 <= LA23_0 <= 4694) or LA23_0 == 4696 or (4698 <= LA23_0 <= 4701) or (4704 <= LA23_0 <= 4742) or LA23_0 == 4744 or (4746 <= LA23_0 <= 4749) or (4752 <= LA23_0 <= 4782) or LA23_0 == 4784 or (4786 <= LA23_0 <= 4789) or (4792 <= LA23_0 <= 4798) or LA23_0 == 4800 or (4802 <= LA23_0 <= 4805) or (4808 <= LA23_0 <= 4814) or (4816 <= LA23_0 <= 4822) or (4824 <= LA23_0 <= 4846) or (4848 <= LA23_0 <= 4878) or LA23_0 == 4880 or (4882 <= LA23_0 <= 4885) or (4888 <= LA23_0 <= 4894) or (4896 <= LA23_0 <= 4934) or (4936 <= LA23_0 <= 4954) or (5024 <= LA23_0 <= 5108) or (5121 <= LA23_0 <= 5750) or (5761 <= LA23_0 <= 5786) or (5792 <= LA23_0 <= 5866) or (6016 <= LA23_0 <= 6067) or (6176 <= LA23_0 <= 6263) or (6272 <= LA23_0 <= 6312) or (7680 <= LA23_0 <= 7835) or (7840 <= LA23_0 <= 7929) or (7936 <= LA23_0 <= 7957) or (7960 <= LA23_0 <= 7965) or (7968 <= LA23_0 <= 8005) or (8008 <= LA23_0 <= 8013) or (8016 <= LA23_0 <= 8023) or LA23_0 == 8025 or LA23_0 == 8027 or LA23_0 == 8029 or (8031 <= LA23_0 <= 8061) or (8064 <= LA23_0 <= 8116) or (8118 <= LA23_0 <= 8124) or LA23_0 == 8126 or (8130 <= LA23_0 <= 8132) or (8134 <= LA23_0 <= 8140) or (8144 <= LA23_0 <= 8147) or (8150 <= LA23_0 <= 8155) or (8160 <= LA23_0 <= 8172) or (8178 <= LA23_0 <= 8180) or (8182 <= LA23_0 <= 8188) or LA23_0 == 8319 or LA23_0 == 8450 or LA23_0 == 8455 or (8458 <= LA23_0 <= 8467) or LA23_0 == 8469 or (8473 <= LA23_0 <= 8477) or LA23_0 == 8484 or LA23_0 == 8486 or LA23_0 == 8488 or (8490 <= LA23_0 <= 8493) or (8495 <= LA23_0 <= 8497) or (8499 <= LA23_0 <= 8505) or (8544 <= LA23_0 <= 8579) or (12293 <= LA23_0 <= 12295) or (12321 <= LA23_0 <= 12329) or (12337 <= LA23_0 <= 12341) or (12344 <= LA23_0 <= 12346) or (12353 <= LA23_0 <= 12436) or (12445 <= LA23_0 <= 12446) or (12449 <= LA23_0 <= 12538) or (12540 <= LA23_0 <= 12542) or (12549 <= LA23_0 <= 12588) or (12593 <= LA23_0 <= 12686) or (12704 <= LA23_0 <= 12727) or LA23_0 == 13312 or LA23_0 == 19893 or LA23_0 == 19968 or LA23_0 == 40869 or (40960 <= LA23_0 <= 42124) or LA23_0 == 44032 or LA23_0 == 55203 or (63744 <= LA23_0 <= 64045) or (64256 <= LA23_0 <= 64262) or (64275 <= LA23_0 <= 64279) or LA23_0 == 64285 or (64287 <= LA23_0 <= 64296) or (64298 <= LA23_0 <= 64310) or (64312 <= LA23_0 <= 64316) or LA23_0 == 64318 or (64320 <= LA23_0 <= 64321) or (64323 <= LA23_0 <= 64324) or (64326 <= LA23_0 <= 64433) or (64467 <= LA23_0 <= 64829) or (64848 <= LA23_0 <= 64911) or (64914 <= LA23_0 <= 64967) or (65008 <= LA23_0 <= 65019) or (65136 <= LA23_0 <= 65138) or LA23_0 == 65140 or (65142 <= LA23_0 <= 65276) or (65313 <= LA23_0 <= 65338) or (65345 <= LA23_0 <= 65370) or (65382 <= LA23_0 <= 65470) or (65474 <= LA23_0 <= 65479) or (65482 <= LA23_0 <= 65487) or (65490 <= LA23_0 <= 65495) or (65498 <= LA23_0 <= 65500)) and (self.synpred1_JavaScript()):
+ alt23 = 1
+ elif (LA23_0 == 36) and (self.synpred1_JavaScript()):
+ alt23 = 1
+ elif (LA23_0 == 95) :
+ LA23_3 = self.input.LA(2)
+
+ if (self.synpred1_JavaScript()) :
+ alt23 = 1
+ elif (True) :
+ alt23 = 3
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 23, 3, self.input)
+
+ raise nvae
+
+ elif (LA23_0 == 92) and (self.synpred1_JavaScript()):
+ alt23 = 1
+ elif ((48 <= LA23_0 <= 57) or (1632 <= LA23_0 <= 1641) or (1776 <= LA23_0 <= 1785) or (2406 <= LA23_0 <= 2415) or (2534 <= LA23_0 <= 2543) or (2662 <= LA23_0 <= 2671) or (2790 <= LA23_0 <= 2799) or (2918 <= LA23_0 <= 2927) or (3047 <= LA23_0 <= 3055) or (3174 <= LA23_0 <= 3183) or (3302 <= LA23_0 <= 3311) or (3430 <= LA23_0 <= 3439) or (3664 <= LA23_0 <= 3673) or (3792 <= LA23_0 <= 3801) or (3872 <= LA23_0 <= 3881) or (4160 <= LA23_0 <= 4169) or (4969 <= LA23_0 <= 4977) or (6112 <= LA23_0 <= 6121) or (6160 <= LA23_0 <= 6169) or (65296 <= LA23_0 <= 65305)) :
+ alt23 = 2
+ elif ((8255 <= LA23_0 <= 8256) or LA23_0 == 12539 or (65075 <= LA23_0 <= 65076) or (65101 <= LA23_0 <= 65103) or LA23_0 == 65343 or LA23_0 == 65381) :
+ alt23 = 3
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 23, 0, self.input)
+
+ raise nvae
+
+ if alt23 == 1:
+ # JavaScript.g:480:4: ( IdentifierStart )=> IdentifierStart
+ pass
+ self.mIdentifierStart()
+
+
+ elif alt23 == 2:
+ # JavaScript.g:481:4: UnicodeDigit
+ pass
+ self.mUnicodeDigit()
+
+
+ elif alt23 == 3:
+ # JavaScript.g:482:4: UnicodeConnectorPunctuation
+ pass
+ self.mUnicodeConnectorPunctuation()
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "IdentifierPart"
+
+
+
+ # $ANTLR start "UnicodeLetter"
+ def mUnicodeLetter(self, ):
+
+ try:
+ # JavaScript.g:486:2: ( '\\u0041' .. '\\u005A' | '\\u0061' .. '\\u007A' | '\\u00AA' | '\\u00B5' | '\\u00BA' | '\\u00C0' .. '\\u00D6' | '\\u00D8' .. '\\u00F6' | '\\u00F8' .. '\\u021F' | '\\u0222' .. '\\u0233' | '\\u0250' .. '\\u02AD' | '\\u02B0' .. '\\u02B8' | '\\u02BB' .. '\\u02C1' | '\\u02D0' .. '\\u02D1' | '\\u02E0' .. '\\u02E4' | '\\u02EE' | '\\u037A' | '\\u0386' | '\\u0388' .. '\\u038A' | '\\u038C' | '\\u038E' .. '\\u03A1' | '\\u03A3' .. '\\u03CE' | '\\u03D0' .. '\\u03D7' | '\\u03DA' .. '\\u03F3' | '\\u0400' .. '\\u0481' | '\\u048C' .. '\\u04C4' | '\\u04C7' .. '\\u04C8' | '\\u04CB' .. '\\u04CC' | '\\u04D0' .. '\\u04F5' | '\\u04F8' .. '\\u04F9' | '\\u0531' .. '\\u0556' | '\\u0559' | '\\u0561' .. '\\u0587' | '\\u05D0' .. '\\u05EA' | '\\u05F0' .. '\\u05F2' | '\\u0621' .. '\\u063A' | '\\u0640' .. '\\u064A' | '\\u0671' .. '\\u06D3' | '\\u06D5' | '\\u06E5' .. '\\u06E6' | '\\u06FA' .. '\\u06FC' | '\\u0710' | '\\u0712' .. '\\u072C' | '\\u0780' .. '\\u07A5' | '\\u0905' .. '\\u0939' | '\\u093D' | '\\u0950' | '\\u0958' .. '\\u0961' | '\\u0985' .. '\\u098C' | '\\u098F' .. '\\u0990' | '\\u0993' .. '\\u09A8' | '\\u09AA' .. '\\u09B0' | '\\u09B2' | '\\u09B6' .. '\\u09B9' | '\\u09DC' .. '\\u09DD' | '\\u09DF' .. '\\u09E1' | '\\u09F0' .. '\\u09F1' | '\\u0A05' .. '\\u0A0A' | '\\u0A0F' .. '\\u0A10' | '\\u0A13' .. '\\u0A28' | '\\u0A2A' .. '\\u0A30' | '\\u0A32' .. '\\u0A33' | '\\u0A35' .. '\\u0A36' | '\\u0A38' .. '\\u0A39' | '\\u0A59' .. '\\u0A5C' | '\\u0A5E' | '\\u0A72' .. '\\u0A74' | '\\u0A85' .. '\\u0A8B' | '\\u0A8D' | '\\u0A8F' .. '\\u0A91' | '\\u0A93' .. '\\u0AA8' | '\\u0AAA' .. '\\u0AB0' | '\\u0AB2' .. '\\u0AB3' | '\\u0AB5' .. '\\u0AB9' | '\\u0ABD' | '\\u0AD0' | '\\u0AE0' | '\\u0B05' .. '\\u0B0C' | '\\u0B0F' .. '\\u0B10' | '\\u0B13' .. '\\u0B28' | '\\u0B2A' .. '\\u0B30' | '\\u0B32' .. '\\u0B33' | '\\u0B36' .. '\\u0B39' | '\\u0B3D' | '\\u0B5C' .. '\\u0B5D' | '\\u0B5F' .. '\\u0B61' | '\\u0B85' .. '\\u0B8A' | '\\u0B8E' .. '\\u0B90' | '\\u0B92' .. '\\u0B95' | '\\u0B99' .. '\\u0B9A' | '\\u0B9C' | '\\u0B9E' .. '\\u0B9F' | '\\u0BA3' .. '\\u0BA4' | '\\u0BA8' .. '\\u0BAA' | '\\u0BAE' .. '\\u0BB5' | '\\u0BB7' .. '\\u0BB9' | '\\u0C05' .. '\\u0C0C' | '\\u0C0E' .. '\\u0C10' | '\\u0C12' .. '\\u0C28' | '\\u0C2A' .. '\\u0C33' | '\\u0C35' .. '\\u0C39' | '\\u0C60' .. '\\u0C61' | '\\u0C85' .. '\\u0C8C' | '\\u0C8E' .. '\\u0C90' | '\\u0C92' .. '\\u0CA8' | '\\u0CAA' .. '\\u0CB3' | '\\u0CB5' .. '\\u0CB9' | '\\u0CDE' | '\\u0CE0' .. '\\u0CE1' | '\\u0D05' .. '\\u0D0C' | '\\u0D0E' .. '\\u0D10' | '\\u0D12' .. '\\u0D28' | '\\u0D2A' .. '\\u0D39' | '\\u0D60' .. '\\u0D61' | '\\u0D85' .. '\\u0D96' | '\\u0D9A' .. '\\u0DB1' | '\\u0DB3' .. '\\u0DBB' | '\\u0DBD' | '\\u0DC0' .. '\\u0DC6' | '\\u0E01' .. '\\u0E30' | '\\u0E32' .. '\\u0E33' | '\\u0E40' .. '\\u0E46' | '\\u0E81' .. '\\u0E82' | '\\u0E84' | '\\u0E87' .. '\\u0E88' | '\\u0E8A' | '\\u0E8D' | '\\u0E94' .. '\\u0E97' | '\\u0E99' .. '\\u0E9F' | '\\u0EA1' .. '\\u0EA3' | '\\u0EA5' | '\\u0EA7' | '\\u0EAA' .. '\\u0EAB' | '\\u0EAD' .. '\\u0EB0' | '\\u0EB2' .. '\\u0EB3' | '\\u0EBD' .. '\\u0EC4' | '\\u0EC6' | '\\u0EDC' .. '\\u0EDD' | '\\u0F00' | '\\u0F40' .. '\\u0F6A' | '\\u0F88' .. '\\u0F8B' | '\\u1000' .. '\\u1021' | '\\u1023' .. '\\u1027' | '\\u1029' .. '\\u102A' | '\\u1050' .. '\\u1055' | '\\u10A0' .. '\\u10C5' | '\\u10D0' .. '\\u10F6' | '\\u1100' .. '\\u1159' | '\\u115F' .. '\\u11A2' | '\\u11A8' .. '\\u11F9' | '\\u1200' .. '\\u1206' | '\\u1208' .. '\\u1246' | '\\u1248' | '\\u124A' .. '\\u124D' | '\\u1250' .. '\\u1256' | '\\u1258' | '\\u125A' .. '\\u125D' | '\\u1260' .. '\\u1286' | '\\u1288' | '\\u128A' .. '\\u128D' | '\\u1290' .. '\\u12AE' | '\\u12B0' | '\\u12B2' .. '\\u12B5' | '\\u12B8' .. '\\u12BE' | '\\u12C0' | '\\u12C2' .. '\\u12C5' | '\\u12C8' .. '\\u12CE' | '\\u12D0' .. '\\u12D6' | '\\u12D8' .. '\\u12EE' | '\\u12F0' .. '\\u130E' | '\\u1310' | '\\u1312' .. '\\u1315' | '\\u1318' .. '\\u131E' | '\\u1320' .. '\\u1346' | '\\u1348' .. '\\u135A' | '\\u13A0' .. '\\u13B0' | '\\u13B1' .. '\\u13F4' | '\\u1401' .. '\\u1676' | '\\u1681' .. '\\u169A' | '\\u16A0' .. '\\u16EA' | '\\u1780' .. '\\u17B3' | '\\u1820' .. '\\u1877' | '\\u1880' .. '\\u18A8' | '\\u1E00' .. '\\u1E9B' | '\\u1EA0' .. '\\u1EE0' | '\\u1EE1' .. '\\u1EF9' | '\\u1F00' .. '\\u1F15' | '\\u1F18' .. '\\u1F1D' | '\\u1F20' .. '\\u1F39' | '\\u1F3A' .. '\\u1F45' | '\\u1F48' .. '\\u1F4D' | '\\u1F50' .. '\\u1F57' | '\\u1F59' | '\\u1F5B' | '\\u1F5D' | '\\u1F5F' .. '\\u1F7D' | '\\u1F80' .. '\\u1FB4' | '\\u1FB6' .. '\\u1FBC' | '\\u1FBE' | '\\u1FC2' .. '\\u1FC4' | '\\u1FC6' .. '\\u1FCC' | '\\u1FD0' .. '\\u1FD3' | '\\u1FD6' .. '\\u1FDB' | '\\u1FE0' .. '\\u1FEC' | '\\u1FF2' .. '\\u1FF4' | '\\u1FF6' .. '\\u1FFC' | '\\u207F' | '\\u2102' | '\\u2107' | '\\u210A' .. '\\u2113' | '\\u2115' | '\\u2119' .. '\\u211D' | '\\u2124' | '\\u2126' | '\\u2128' | '\\u212A' .. '\\u212D' | '\\u212F' .. '\\u2131' | '\\u2133' .. '\\u2139' | '\\u2160' .. '\\u2183' | '\\u3005' .. '\\u3007' | '\\u3021' .. '\\u3029' | '\\u3031' .. '\\u3035' | '\\u3038' .. '\\u303A' | '\\u3041' .. '\\u3094' | '\\u309D' .. '\\u309E' | '\\u30A1' .. '\\u30FA' | '\\u30FC' .. '\\u30FE' | '\\u3105' .. '\\u312C' | '\\u3131' .. '\\u318E' | '\\u31A0' .. '\\u31B7' | '\\u3400' | '\\u4DB5' | '\\u4E00' | '\\u9FA5' | '\\uA000' .. '\\uA48C' | '\\uAC00' | '\\uD7A3' | '\\uF900' .. '\\uFA2D' | '\\uFB00' .. '\\uFB06' | '\\uFB13' .. '\\uFB17' | '\\uFB1D' | '\\uFB1F' .. '\\uFB28' | '\\uFB2A' .. '\\uFB36' | '\\uFB38' .. '\\uFB3C' | '\\uFB3E' | '\\uFB40' .. '\\uFB41' | '\\uFB43' .. '\\uFB44' | '\\uFB46' .. '\\uFBB1' | '\\uFBD3' .. '\\uFD3D' | '\\uFD50' .. '\\uFD8F' | '\\uFD92' .. '\\uFDC7' | '\\uFDF0' .. '\\uFDFB' | '\\uFE70' .. '\\uFE72' | '\\uFE74' | '\\uFE76' .. '\\uFEFC' | '\\uFF21' .. '\\uFF3A' | '\\uFF41' .. '\\uFF5A' | '\\uFF66' .. '\\uFFBE' | '\\uFFC2' .. '\\uFFC7' | '\\uFFCA' .. '\\uFFCF' | '\\uFFD2' .. '\\uFFD7' | '\\uFFDA' .. '\\uFFDC' )
+ # JavaScript.g:
+ pass
+ if (65 <= self.input.LA(1) <= 90) or (97 <= self.input.LA(1) <= 122) or self.input.LA(1) == 170 or self.input.LA(1) == 181 or self.input.LA(1) == 186 or (192 <= self.input.LA(1) <= 214) or (216 <= self.input.LA(1) <= 246) or (248 <= self.input.LA(1) <= 543) or (546 <= self.input.LA(1) <= 563) or (592 <= self.input.LA(1) <= 685) or (688 <= self.input.LA(1) <= 696) or (699 <= self.input.LA(1) <= 705) or (720 <= self.input.LA(1) <= 721) or (736 <= self.input.LA(1) <= 740) or self.input.LA(1) == 750 or self.input.LA(1) == 890 or self.input.LA(1) == 902 or (904 <= self.input.LA(1) <= 906) or self.input.LA(1) == 908 or (910 <= self.input.LA(1) <= 929) or (931 <= self.input.LA(1) <= 974) or (976 <= self.input.LA(1) <= 983) or (986 <= self.input.LA(1) <= 1011) or (1024 <= self.input.LA(1) <= 1153) or (1164 <= self.input.LA(1) <= 1220) or (1223 <= self.input.LA(1) <= 1224) or (1227 <= self.input.LA(1) <= 1228) or (1232 <= self.input.LA(1) <= 1269) or (1272 <= self.input.LA(1) <= 1273) or (1329 <= self.input.LA(1) <= 1366) or self.input.LA(1) == 1369 or (1377 <= self.input.LA(1) <= 1415) or (1488 <= self.input.LA(1) <= 1514) or (1520 <= self.input.LA(1) <= 1522) or (1569 <= self.input.LA(1) <= 1594) or (1600 <= self.input.LA(1) <= 1610) or (1649 <= self.input.LA(1) <= 1747) or self.input.LA(1) == 1749 or (1765 <= self.input.LA(1) <= 1766) or (1786 <= self.input.LA(1) <= 1788) or self.input.LA(1) == 1808 or (1810 <= self.input.LA(1) <= 1836) or (1920 <= self.input.LA(1) <= 1957) or (2309 <= self.input.LA(1) <= 2361) or self.input.LA(1) == 2365 or self.input.LA(1) == 2384 or (2392 <= self.input.LA(1) <= 2401) or (2437 <= self.input.LA(1) <= 2444) or (2447 <= self.input.LA(1) <= 2448) or (2451 <= self.input.LA(1) <= 2472) or (2474 <= self.input.LA(1) <= 2480) or self.input.LA(1) == 2482 or (2486 <= self.input.LA(1) <= 2489) or (2524 <= self.input.LA(1) <= 2525) or (2527 <= self.input.LA(1) <= 2529) or (2544 <= self.input.LA(1) <= 2545) or (2565 <= self.input.LA(1) <= 2570) or (2575 <= self.input.LA(1) <= 2576) or (2579 <= self.input.LA(1) <= 2600) or (2602 <= self.input.LA(1) <= 2608) or (2610 <= self.input.LA(1) <= 2611) or (2613 <= self.input.LA(1) <= 2614) or (2616 <= self.input.LA(1) <= 2617) or (2649 <= self.input.LA(1) <= 2652) or self.input.LA(1) == 2654 or (2674 <= self.input.LA(1) <= 2676) or (2693 <= self.input.LA(1) <= 2699) or self.input.LA(1) == 2701 or (2703 <= self.input.LA(1) <= 2705) or (2707 <= self.input.LA(1) <= 2728) or (2730 <= self.input.LA(1) <= 2736) or (2738 <= self.input.LA(1) <= 2739) or (2741 <= self.input.LA(1) <= 2745) or self.input.LA(1) == 2749 or self.input.LA(1) == 2768 or self.input.LA(1) == 2784 or (2821 <= self.input.LA(1) <= 2828) or (2831 <= self.input.LA(1) <= 2832) or (2835 <= self.input.LA(1) <= 2856) or (2858 <= self.input.LA(1) <= 2864) or (2866 <= self.input.LA(1) <= 2867) or (2870 <= self.input.LA(1) <= 2873) or self.input.LA(1) == 2877 or (2908 <= self.input.LA(1) <= 2909) or (2911 <= self.input.LA(1) <= 2913) or (2949 <= self.input.LA(1) <= 2954) or (2958 <= self.input.LA(1) <= 2960) or (2962 <= self.input.LA(1) <= 2965) or (2969 <= self.input.LA(1) <= 2970) or self.input.LA(1) == 2972 or (2974 <= self.input.LA(1) <= 2975) or (2979 <= self.input.LA(1) <= 2980) or (2984 <= self.input.LA(1) <= 2986) or (2990 <= self.input.LA(1) <= 2997) or (2999 <= self.input.LA(1) <= 3001) or (3077 <= self.input.LA(1) <= 3084) or (3086 <= self.input.LA(1) <= 3088) or (3090 <= self.input.LA(1) <= 3112) or (3114 <= self.input.LA(1) <= 3123) or (3125 <= self.input.LA(1) <= 3129) or (3168 <= self.input.LA(1) <= 3169) or (3205 <= self.input.LA(1) <= 3212) or (3214 <= self.input.LA(1) <= 3216) or (3218 <= self.input.LA(1) <= 3240) or (3242 <= self.input.LA(1) <= 3251) or (3253 <= self.input.LA(1) <= 3257) or self.input.LA(1) == 3294 or (3296 <= self.input.LA(1) <= 3297) or (3333 <= self.input.LA(1) <= 3340) or (3342 <= self.input.LA(1) <= 3344) or (3346 <= self.input.LA(1) <= 3368) or (3370 <= self.input.LA(1) <= 3385) or (3424 <= self.input.LA(1) <= 3425) or (3461 <= self.input.LA(1) <= 3478) or (3482 <= self.input.LA(1) <= 3505) or (3507 <= self.input.LA(1) <= 3515) or self.input.LA(1) == 3517 or (3520 <= self.input.LA(1) <= 3526) or (3585 <= self.input.LA(1) <= 3632) or (3634 <= self.input.LA(1) <= 3635) or (3648 <= self.input.LA(1) <= 3654) or (3713 <= self.input.LA(1) <= 3714) or self.input.LA(1) == 3716 or (3719 <= self.input.LA(1) <= 3720) or self.input.LA(1) == 3722 or self.input.LA(1) == 3725 or (3732 <= self.input.LA(1) <= 3735) or (3737 <= self.input.LA(1) <= 3743) or (3745 <= self.input.LA(1) <= 3747) or self.input.LA(1) == 3749 or self.input.LA(1) == 3751 or (3754 <= self.input.LA(1) <= 3755) or (3757 <= self.input.LA(1) <= 3760) or (3762 <= self.input.LA(1) <= 3763) or (3773 <= self.input.LA(1) <= 3780) or self.input.LA(1) == 3782 or (3804 <= self.input.LA(1) <= 3805) or self.input.LA(1) == 3840 or (3904 <= self.input.LA(1) <= 3946) or (3976 <= self.input.LA(1) <= 3979) or (4096 <= self.input.LA(1) <= 4129) or (4131 <= self.input.LA(1) <= 4135) or (4137 <= self.input.LA(1) <= 4138) or (4176 <= self.input.LA(1) <= 4181) or (4256 <= self.input.LA(1) <= 4293) or (4304 <= self.input.LA(1) <= 4342) or (4352 <= self.input.LA(1) <= 4441) or (4447 <= self.input.LA(1) <= 4514) or (4520 <= self.input.LA(1) <= 4601) or (4608 <= self.input.LA(1) <= 4614) or (4616 <= self.input.LA(1) <= 4678) or self.input.LA(1) == 4680 or (4682 <= self.input.LA(1) <= 4685) or (4688 <= self.input.LA(1) <= 4694) or self.input.LA(1) == 4696 or (4698 <= self.input.LA(1) <= 4701) or (4704 <= self.input.LA(1) <= 4742) or self.input.LA(1) == 4744 or (4746 <= self.input.LA(1) <= 4749) or (4752 <= self.input.LA(1) <= 4782) or self.input.LA(1) == 4784 or (4786 <= self.input.LA(1) <= 4789) or (4792 <= self.input.LA(1) <= 4798) or self.input.LA(1) == 4800 or (4802 <= self.input.LA(1) <= 4805) or (4808 <= self.input.LA(1) <= 4814) or (4816 <= self.input.LA(1) <= 4822) or (4824 <= self.input.LA(1) <= 4846) or (4848 <= self.input.LA(1) <= 4878) or self.input.LA(1) == 4880 or (4882 <= self.input.LA(1) <= 4885) or (4888 <= self.input.LA(1) <= 4894) or (4896 <= self.input.LA(1) <= 4934) or (4936 <= self.input.LA(1) <= 4954) or (5024 <= self.input.LA(1) <= 5108) or (5121 <= self.input.LA(1) <= 5750) or (5761 <= self.input.LA(1) <= 5786) or (5792 <= self.input.LA(1) <= 5866) or (6016 <= self.input.LA(1) <= 6067) or (6176 <= self.input.LA(1) <= 6263) or (6272 <= self.input.LA(1) <= 6312) or (7680 <= self.input.LA(1) <= 7835) or (7840 <= self.input.LA(1) <= 7929) or (7936 <= self.input.LA(1) <= 7957) or (7960 <= self.input.LA(1) <= 7965) or (7968 <= self.input.LA(1) <= 8005) or (8008 <= self.input.LA(1) <= 8013) or (8016 <= self.input.LA(1) <= 8023) or self.input.LA(1) == 8025 or self.input.LA(1) == 8027 or self.input.LA(1) == 8029 or (8031 <= self.input.LA(1) <= 8061) or (8064 <= self.input.LA(1) <= 8116) or (8118 <= self.input.LA(1) <= 8124) or self.input.LA(1) == 8126 or (8130 <= self.input.LA(1) <= 8132) or (8134 <= self.input.LA(1) <= 8140) or (8144 <= self.input.LA(1) <= 8147) or (8150 <= self.input.LA(1) <= 8155) or (8160 <= self.input.LA(1) <= 8172) or (8178 <= self.input.LA(1) <= 8180) or (8182 <= self.input.LA(1) <= 8188) or self.input.LA(1) == 8319 or self.input.LA(1) == 8450 or self.input.LA(1) == 8455 or (8458 <= self.input.LA(1) <= 8467) or self.input.LA(1) == 8469 or (8473 <= self.input.LA(1) <= 8477) or self.input.LA(1) == 8484 or self.input.LA(1) == 8486 or self.input.LA(1) == 8488 or (8490 <= self.input.LA(1) <= 8493) or (8495 <= self.input.LA(1) <= 8497) or (8499 <= self.input.LA(1) <= 8505) or (8544 <= self.input.LA(1) <= 8579) or (12293 <= self.input.LA(1) <= 12295) or (12321 <= self.input.LA(1) <= 12329) or (12337 <= self.input.LA(1) <= 12341) or (12344 <= self.input.LA(1) <= 12346) or (12353 <= self.input.LA(1) <= 12436) or (12445 <= self.input.LA(1) <= 12446) or (12449 <= self.input.LA(1) <= 12538) or (12540 <= self.input.LA(1) <= 12542) or (12549 <= self.input.LA(1) <= 12588) or (12593 <= self.input.LA(1) <= 12686) or (12704 <= self.input.LA(1) <= 12727) or self.input.LA(1) == 13312 or self.input.LA(1) == 19893 or self.input.LA(1) == 19968 or self.input.LA(1) == 40869 or (40960 <= self.input.LA(1) <= 42124) or self.input.LA(1) == 44032 or self.input.LA(1) == 55203 or (63744 <= self.input.LA(1) <= 64045) or (64256 <= self.input.LA(1) <= 64262) or (64275 <= self.input.LA(1) <= 64279) or self.input.LA(1) == 64285 or (64287 <= self.input.LA(1) <= 64296) or (64298 <= self.input.LA(1) <= 64310) or (64312 <= self.input.LA(1) <= 64316) or self.input.LA(1) == 64318 or (64320 <= self.input.LA(1) <= 64321) or (64323 <= self.input.LA(1) <= 64324) or (64326 <= self.input.LA(1) <= 64433) or (64467 <= self.input.LA(1) <= 64829) or (64848 <= self.input.LA(1) <= 64911) or (64914 <= self.input.LA(1) <= 64967) or (65008 <= self.input.LA(1) <= 65019) or (65136 <= self.input.LA(1) <= 65138) or self.input.LA(1) == 65140 or (65142 <= self.input.LA(1) <= 65276) or (65313 <= self.input.LA(1) <= 65338) or (65345 <= self.input.LA(1) <= 65370) or (65382 <= self.input.LA(1) <= 65470) or (65474 <= self.input.LA(1) <= 65479) or (65482 <= self.input.LA(1) <= 65487) or (65490 <= self.input.LA(1) <= 65495) or (65498 <= self.input.LA(1) <= 65500):
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "UnicodeLetter"
+
+
+
+ # $ANTLR start "UnicodeCombiningMark"
+ def mUnicodeCombiningMark(self, ):
+
+ try:
+ # JavaScript.g:750:2: ( '\\u0300' .. '\\u034E' | '\\u0360' .. '\\u0362' | '\\u0483' .. '\\u0486' | '\\u0591' .. '\\u05A1' | '\\u05A3' .. '\\u05B9' | '\\u05BB' .. '\\u05BD' | '\\u05BF' | '\\u05C1' .. '\\u05C2' | '\\u05C4' | '\\u064B' .. '\\u0655' | '\\u0670' | '\\u06D6' .. '\\u06DC' | '\\u06DF' .. '\\u06E4' | '\\u06E7' .. '\\u06E8' | '\\u06EA' .. '\\u06ED' | '\\u0711' | '\\u0730' .. '\\u074A' | '\\u07A6' .. '\\u07B0' | '\\u0901' .. '\\u0903' | '\\u093C' | '\\u093E' .. '\\u094D' | '\\u0951' .. '\\u0954' | '\\u0962' .. '\\u0963' | '\\u0981' .. '\\u0983' | '\\u09BC' .. '\\u09C4' | '\\u09C7' .. '\\u09C8' | '\\u09CB' .. '\\u09CD' | '\\u09D7' | '\\u09E2' .. '\\u09E3' | '\\u0A02' | '\\u0A3C' | '\\u0A3E' .. '\\u0A42' | '\\u0A47' .. '\\u0A48' | '\\u0A4B' .. '\\u0A4D' | '\\u0A70' .. '\\u0A71' | '\\u0A81' .. '\\u0A83' | '\\u0ABC' | '\\u0ABE' .. '\\u0AC5' | '\\u0AC7' .. '\\u0AC9' | '\\u0ACB' .. '\\u0ACD' | '\\u0B01' .. '\\u0B03' | '\\u0B3C' | '\\u0B3E' .. '\\u0B43' | '\\u0B47' .. '\\u0B48' | '\\u0B4B' .. '\\u0B4D' | '\\u0B56' .. '\\u0B57' | '\\u0B82' .. '\\u0B83' | '\\u0BBE' .. '\\u0BC2' | '\\u0BC6' .. '\\u0BC8' | '\\u0BCA' .. '\\u0BCD' | '\\u0BD7' | '\\u0C01' .. '\\u0C03' | '\\u0C3E' .. '\\u0C44' | '\\u0C46' .. '\\u0C48' | '\\u0C4A' .. '\\u0C4D' | '\\u0C55' .. '\\u0C56' | '\\u0C82' .. '\\u0C83' | '\\u0CBE' .. '\\u0CC4' | '\\u0CC6' .. '\\u0CC8' | '\\u0CCA' .. '\\u0CCD' | '\\u0CD5' .. '\\u0CD6' | '\\u0D02' .. '\\u0D03' | '\\u0D3E' .. '\\u0D43' | '\\u0D46' .. '\\u0D48' | '\\u0D4A' .. '\\u0D4D' | '\\u0D57' | '\\u0D82' .. '\\u0D83' | '\\u0DCA' | '\\u0DCF' .. '\\u0DD4' | '\\u0DD6' | '\\u0DD8' .. '\\u0DDF' | '\\u0DF2' .. '\\u0DF3' | '\\u0E31' | '\\u0E34' .. '\\u0E3A' | '\\u0E47' .. '\\u0E4E' | '\\u0EB1' | '\\u0EB4' .. '\\u0EB9' | '\\u0EBB' .. '\\u0EBC' | '\\u0EC8' .. '\\u0ECD' | '\\u0F18' .. '\\u0F19' | '\\u0F35' | '\\u0F37' | '\\u0F39' | '\\u0F3E' .. '\\u0F3F' | '\\u0F71' .. '\\u0F84' | '\\u0F86' .. '\\u0F87' | '\\u0F90' .. '\\u0F97' | '\\u0F99' .. '\\u0FBC' | '\\u0FC6' | '\\u102C' .. '\\u1032' | '\\u1036' .. '\\u1039' | '\\u1056' .. '\\u1059' | '\\u17B4' .. '\\u17D3' | '\\u18A9' | '\\u20D0' .. '\\u20DC' | '\\u20E1' | '\\u302A' .. '\\u302F' | '\\u3099' .. '\\u309A' | '\\uFB1E' | '\\uFE20' .. '\\uFE23' )
+ # JavaScript.g:
+ pass
+ if (768 <= self.input.LA(1) <= 846) or (864 <= self.input.LA(1) <= 866) or (1155 <= self.input.LA(1) <= 1158) or (1425 <= self.input.LA(1) <= 1441) or (1443 <= self.input.LA(1) <= 1465) or (1467 <= self.input.LA(1) <= 1469) or self.input.LA(1) == 1471 or (1473 <= self.input.LA(1) <= 1474) or self.input.LA(1) == 1476 or (1611 <= self.input.LA(1) <= 1621) or self.input.LA(1) == 1648 or (1750 <= self.input.LA(1) <= 1756) or (1759 <= self.input.LA(1) <= 1764) or (1767 <= self.input.LA(1) <= 1768) or (1770 <= self.input.LA(1) <= 1773) or self.input.LA(1) == 1809 or (1840 <= self.input.LA(1) <= 1866) or (1958 <= self.input.LA(1) <= 1968) or (2305 <= self.input.LA(1) <= 2307) or self.input.LA(1) == 2364 or (2366 <= self.input.LA(1) <= 2381) or (2385 <= self.input.LA(1) <= 2388) or (2402 <= self.input.LA(1) <= 2403) or (2433 <= self.input.LA(1) <= 2435) or (2492 <= self.input.LA(1) <= 2500) or (2503 <= self.input.LA(1) <= 2504) or (2507 <= self.input.LA(1) <= 2509) or self.input.LA(1) == 2519 or (2530 <= self.input.LA(1) <= 2531) or self.input.LA(1) == 2562 or self.input.LA(1) == 2620 or (2622 <= self.input.LA(1) <= 2626) or (2631 <= self.input.LA(1) <= 2632) or (2635 <= self.input.LA(1) <= 2637) or (2672 <= self.input.LA(1) <= 2673) or (2689 <= self.input.LA(1) <= 2691) or self.input.LA(1) == 2748 or (2750 <= self.input.LA(1) <= 2757) or (2759 <= self.input.LA(1) <= 2761) or (2763 <= self.input.LA(1) <= 2765) or (2817 <= self.input.LA(1) <= 2819) or self.input.LA(1) == 2876 or (2878 <= self.input.LA(1) <= 2883) or (2887 <= self.input.LA(1) <= 2888) or (2891 <= self.input.LA(1) <= 2893) or (2902 <= self.input.LA(1) <= 2903) or (2946 <= self.input.LA(1) <= 2947) or (3006 <= self.input.LA(1) <= 3010) or (3014 <= self.input.LA(1) <= 3016) or (3018 <= self.input.LA(1) <= 3021) or self.input.LA(1) == 3031 or (3073 <= self.input.LA(1) <= 3075) or (3134 <= self.input.LA(1) <= 3140) or (3142 <= self.input.LA(1) <= 3144) or (3146 <= self.input.LA(1) <= 3149) or (3157 <= self.input.LA(1) <= 3158) or (3202 <= self.input.LA(1) <= 3203) or (3262 <= self.input.LA(1) <= 3268) or (3270 <= self.input.LA(1) <= 3272) or (3274 <= self.input.LA(1) <= 3277) or (3285 <= self.input.LA(1) <= 3286) or (3330 <= self.input.LA(1) <= 3331) or (3390 <= self.input.LA(1) <= 3395) or (3398 <= self.input.LA(1) <= 3400) or (3402 <= self.input.LA(1) <= 3405) or self.input.LA(1) == 3415 or (3458 <= self.input.LA(1) <= 3459) or self.input.LA(1) == 3530 or (3535 <= self.input.LA(1) <= 3540) or self.input.LA(1) == 3542 or (3544 <= self.input.LA(1) <= 3551) or (3570 <= self.input.LA(1) <= 3571) or self.input.LA(1) == 3633 or (3636 <= self.input.LA(1) <= 3642) or (3655 <= self.input.LA(1) <= 3662) or self.input.LA(1) == 3761 or (3764 <= self.input.LA(1) <= 3769) or (3771 <= self.input.LA(1) <= 3772) or (3784 <= self.input.LA(1) <= 3789) or (3864 <= self.input.LA(1) <= 3865) or self.input.LA(1) == 3893 or self.input.LA(1) == 3895 or self.input.LA(1) == 3897 or (3902 <= self.input.LA(1) <= 3903) or (3953 <= self.input.LA(1) <= 3972) or (3974 <= self.input.LA(1) <= 3975) or (3984 <= self.input.LA(1) <= 3991) or (3993 <= self.input.LA(1) <= 4028) or self.input.LA(1) == 4038 or (4140 <= self.input.LA(1) <= 4146) or (4150 <= self.input.LA(1) <= 4153) or (4182 <= self.input.LA(1) <= 4185) or (6068 <= self.input.LA(1) <= 6099) or self.input.LA(1) == 6313 or (8400 <= self.input.LA(1) <= 8412) or self.input.LA(1) == 8417 or (12330 <= self.input.LA(1) <= 12335) or (12441 <= self.input.LA(1) <= 12442) or self.input.LA(1) == 64286 or (65056 <= self.input.LA(1) <= 65059):
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "UnicodeCombiningMark"
+
+
+
+ # $ANTLR start "UnicodeDigit"
+ def mUnicodeDigit(self, ):
+
+ try:
+ # JavaScript.g:853:2: ( '\\u0030' .. '\\u0039' | '\\u0660' .. '\\u0669' | '\\u06F0' .. '\\u06F9' | '\\u0966' .. '\\u096F' | '\\u09E6' .. '\\u09EF' | '\\u0A66' .. '\\u0A6F' | '\\u0AE6' .. '\\u0AEF' | '\\u0B66' .. '\\u0B6F' | '\\u0BE7' .. '\\u0BEF' | '\\u0C66' .. '\\u0C6F' | '\\u0CE6' .. '\\u0CEF' | '\\u0D66' .. '\\u0D6F' | '\\u0E50' .. '\\u0E59' | '\\u0ED0' .. '\\u0ED9' | '\\u0F20' .. '\\u0F29' | '\\u1040' .. '\\u1049' | '\\u1369' .. '\\u1371' | '\\u17E0' .. '\\u17E9' | '\\u1810' .. '\\u1819' | '\\uFF10' .. '\\uFF19' )
+ # JavaScript.g:
+ pass
+ if (48 <= self.input.LA(1) <= 57) or (1632 <= self.input.LA(1) <= 1641) or (1776 <= self.input.LA(1) <= 1785) or (2406 <= self.input.LA(1) <= 2415) or (2534 <= self.input.LA(1) <= 2543) or (2662 <= self.input.LA(1) <= 2671) or (2790 <= self.input.LA(1) <= 2799) or (2918 <= self.input.LA(1) <= 2927) or (3047 <= self.input.LA(1) <= 3055) or (3174 <= self.input.LA(1) <= 3183) or (3302 <= self.input.LA(1) <= 3311) or (3430 <= self.input.LA(1) <= 3439) or (3664 <= self.input.LA(1) <= 3673) or (3792 <= self.input.LA(1) <= 3801) or (3872 <= self.input.LA(1) <= 3881) or (4160 <= self.input.LA(1) <= 4169) or (4969 <= self.input.LA(1) <= 4977) or (6112 <= self.input.LA(1) <= 6121) or (6160 <= self.input.LA(1) <= 6169) or (65296 <= self.input.LA(1) <= 65305):
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "UnicodeDigit"
+
+
+
+ # $ANTLR start "UnicodeConnectorPunctuation"
+ def mUnicodeConnectorPunctuation(self, ):
+
+ try:
+ # JavaScript.g:876:2: ( '\\u005F' | '\\u203F' .. '\\u2040' | '\\u30FB' | '\\uFE33' .. '\\uFE34' | '\\uFE4D' .. '\\uFE4F' | '\\uFF3F' | '\\uFF65' )
+ # JavaScript.g:
+ pass
+ if self.input.LA(1) == 95 or (8255 <= self.input.LA(1) <= 8256) or self.input.LA(1) == 12539 or (65075 <= self.input.LA(1) <= 65076) or (65101 <= self.input.LA(1) <= 65103) or self.input.LA(1) == 65343 or self.input.LA(1) == 65381:
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+
+ finally:
+
+ pass
+
+ # $ANTLR end "UnicodeConnectorPunctuation"
+
+
+
+ # $ANTLR start "Comment"
+ def mComment(self, ):
+
+ try:
+ _type = Comment
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:886:2: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ # JavaScript.g:886:4: '/*' ( options {greedy=false; } : . )* '*/'
+ pass
+ self.match("/*")
+ # JavaScript.g:886:9: ( options {greedy=false; } : . )*
+ while True: #loop24
+ alt24 = 2
+ LA24_0 = self.input.LA(1)
+
+ if (LA24_0 == 42) :
+ LA24_1 = self.input.LA(2)
+
+ if (LA24_1 == 47) :
+ alt24 = 2
+ elif ((0 <= LA24_1 <= 46) or (48 <= LA24_1 <= 65535)) :
+ alt24 = 1
+
+
+ elif ((0 <= LA24_0 <= 41) or (43 <= LA24_0 <= 65535)) :
+ alt24 = 1
+
+
+ if alt24 == 1:
+ # JavaScript.g:886:36: .
+ pass
+ self.matchAny()
+
+
+ else:
+ break #loop24
+ self.match("*/")
+ if self._state.backtracking == 0:
+ _channel=HIDDEN;
+
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "Comment"
+
+
+
+ # $ANTLR start "LineComment"
+ def mLineComment(self, ):
+
+ try:
+ _type = LineComment
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:890:2: ( '//' (~ ( LT ) )* )
+ # JavaScript.g:890:4: '//' (~ ( LT ) )*
+ pass
+ self.match("//")
+ # JavaScript.g:890:9: (~ ( LT ) )*
+ while True: #loop25
+ alt25 = 2
+ LA25_0 = self.input.LA(1)
+
+ if ((0 <= LA25_0 <= 9) or (11 <= LA25_0 <= 12) or (14 <= LA25_0 <= 8231) or (8234 <= LA25_0 <= 65535)) :
+ alt25 = 1
+
+
+ if alt25 == 1:
+ # JavaScript.g:890:9: ~ ( LT )
+ pass
+ if (0 <= self.input.LA(1) <= 9) or (11 <= self.input.LA(1) <= 12) or (14 <= self.input.LA(1) <= 8231) or (8234 <= self.input.LA(1) <= 65535):
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+ else:
+ break #loop25
+ if self._state.backtracking == 0:
+ _channel=HIDDEN;
+
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "LineComment"
+
+
+
+ # $ANTLR start "LT"
+ def mLT(self, ):
+
+ try:
+ _type = LT
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:894:2: ( '\\n' | '\\r' | '\\u2028' | '\\u2029' )
+ # JavaScript.g:
+ pass
+ if self.input.LA(1) == 10 or self.input.LA(1) == 13 or (8232 <= self.input.LA(1) <= 8233):
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "LT"
+
+
+
+ # $ANTLR start "WhiteSpace"
+ def mWhiteSpace(self, ):
+
+ try:
+ _type = WhiteSpace
+ _channel = DEFAULT_CHANNEL
+
+ # JavaScript.g:901:2: ( ( '\\t' | '\\v' | '\\f' | ' ' | '\\u00A0' ) )
+ # JavaScript.g:901:4: ( '\\t' | '\\v' | '\\f' | ' ' | '\\u00A0' )
+ pass
+ if self.input.LA(1) == 9 or self.input.LA(1) == 12 or self.input.LA(1) == 32 or self.input.LA(1) == 118 or self.input.LA(1) == 160:
+ self.input.consume()
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ self.recover(mse)
+ raise mse
+
+ if self._state.backtracking == 0:
+ _channel=HIDDEN;
+
+
+
+
+ self._state.type = _type
+ self._state.channel = _channel
+
+ finally:
+
+ pass
+
+ # $ANTLR end "WhiteSpace"
+
+
+
+ def mTokens(self):
+ # JavaScript.g:1:8: ( T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | T__40 | T__41 | T__42 | T__43 | T__44 | T__45 | T__46 | T__47 | T__48 | T__49 | T__50 | T__51 | T__52 | T__53 | T__54 | T__55 | T__56 | T__57 | T__58 | T__59 | T__60 | T__61 | T__62 | T__63 | T__64 | T__65 | T__66 | T__67 | T__68 | T__69 | T__70 | T__71 | T__72 | T__73 | T__74 | T__75 | T__76 | T__77 | T__78 | T__79 | T__80 | T__81 | T__82 | T__83 | T__84 | T__85 | T__86 | T__87 | T__88 | T__89 | T__90 | T__91 | T__92 | T__93 | T__94 | T__95 | T__96 | T__97 | T__98 | T__99 | T__100 | T__101 | T__102 | T__103 | T__104 | T__105 | T__106 | StringLiteral | NumericLiteral | Identifier | Comment | LineComment | LT | WhiteSpace )
+ alt26 = 83
+ alt26 = self.dfa26.predict(self.input)
+ if alt26 == 1:
+ # JavaScript.g:1:10: T__31
+ pass
+ self.mT__31()
+
+
+ elif alt26 == 2:
+ # JavaScript.g:1:16: T__32
+ pass
+ self.mT__32()
+
+
+ elif alt26 == 3:
+ # JavaScript.g:1:22: T__33
+ pass
+ self.mT__33()
+
+
+ elif alt26 == 4:
+ # JavaScript.g:1:28: T__34
+ pass
+ self.mT__34()
+
+
+ elif alt26 == 5:
+ # JavaScript.g:1:34: T__35
+ pass
+ self.mT__35()
+
+
+ elif alt26 == 6:
+ # JavaScript.g:1:40: T__36
+ pass
+ self.mT__36()
+
+
+ elif alt26 == 7:
+ # JavaScript.g:1:46: T__37
+ pass
+ self.mT__37()
+
+
+ elif alt26 == 8:
+ # JavaScript.g:1:52: T__38
+ pass
+ self.mT__38()
+
+
+ elif alt26 == 9:
+ # JavaScript.g:1:58: T__39
+ pass
+ self.mT__39()
+
+
+ elif alt26 == 10:
+ # JavaScript.g:1:64: T__40
+ pass
+ self.mT__40()
+
+
+ elif alt26 == 11:
+ # JavaScript.g:1:70: T__41
+ pass
+ self.mT__41()
+
+
+ elif alt26 == 12:
+ # JavaScript.g:1:76: T__42
+ pass
+ self.mT__42()
+
+
+ elif alt26 == 13:
+ # JavaScript.g:1:82: T__43
+ pass
+ self.mT__43()
+
+
+ elif alt26 == 14:
+ # JavaScript.g:1:88: T__44
+ pass
+ self.mT__44()
+
+
+ elif alt26 == 15:
+ # JavaScript.g:1:94: T__45
+ pass
+ self.mT__45()
+
+
+ elif alt26 == 16:
+ # JavaScript.g:1:100: T__46
+ pass
+ self.mT__46()
+
+
+ elif alt26 == 17:
+ # JavaScript.g:1:106: T__47
+ pass
+ self.mT__47()
+
+
+ elif alt26 == 18:
+ # JavaScript.g:1:112: T__48
+ pass
+ self.mT__48()
+
+
+ elif alt26 == 19:
+ # JavaScript.g:1:118: T__49
+ pass
+ self.mT__49()
+
+
+ elif alt26 == 20:
+ # JavaScript.g:1:124: T__50
+ pass
+ self.mT__50()
+
+
+ elif alt26 == 21:
+ # JavaScript.g:1:130: T__51
+ pass
+ self.mT__51()
+
+
+ elif alt26 == 22:
+ # JavaScript.g:1:136: T__52
+ pass
+ self.mT__52()
+
+
+ elif alt26 == 23:
+ # JavaScript.g:1:142: T__53
+ pass
+ self.mT__53()
+
+
+ elif alt26 == 24:
+ # JavaScript.g:1:148: T__54
+ pass
+ self.mT__54()
+
+
+ elif alt26 == 25:
+ # JavaScript.g:1:154: T__55
+ pass
+ self.mT__55()
+
+
+ elif alt26 == 26:
+ # JavaScript.g:1:160: T__56
+ pass
+ self.mT__56()
+
+
+ elif alt26 == 27:
+ # JavaScript.g:1:166: T__57
+ pass
+ self.mT__57()
+
+
+ elif alt26 == 28:
+ # JavaScript.g:1:172: T__58
+ pass
+ self.mT__58()
+
+
+ elif alt26 == 29:
+ # JavaScript.g:1:178: T__59
+ pass
+ self.mT__59()
+
+
+ elif alt26 == 30:
+ # JavaScript.g:1:184: T__60
+ pass
+ self.mT__60()
+
+
+ elif alt26 == 31:
+ # JavaScript.g:1:190: T__61
+ pass
+ self.mT__61()
+
+
+ elif alt26 == 32:
+ # JavaScript.g:1:196: T__62
+ pass
+ self.mT__62()
+
+
+ elif alt26 == 33:
+ # JavaScript.g:1:202: T__63
+ pass
+ self.mT__63()
+
+
+ elif alt26 == 34:
+ # JavaScript.g:1:208: T__64
+ pass
+ self.mT__64()
+
+
+ elif alt26 == 35:
+ # JavaScript.g:1:214: T__65
+ pass
+ self.mT__65()
+
+
+ elif alt26 == 36:
+ # JavaScript.g:1:220: T__66
+ pass
+ self.mT__66()
+
+
+ elif alt26 == 37:
+ # JavaScript.g:1:226: T__67
+ pass
+ self.mT__67()
+
+
+ elif alt26 == 38:
+ # JavaScript.g:1:232: T__68
+ pass
+ self.mT__68()
+
+
+ elif alt26 == 39:
+ # JavaScript.g:1:238: T__69
+ pass
+ self.mT__69()
+
+
+ elif alt26 == 40:
+ # JavaScript.g:1:244: T__70
+ pass
+ self.mT__70()
+
+
+ elif alt26 == 41:
+ # JavaScript.g:1:250: T__71
+ pass
+ self.mT__71()
+
+
+ elif alt26 == 42:
+ # JavaScript.g:1:256: T__72
+ pass
+ self.mT__72()
+
+
+ elif alt26 == 43:
+ # JavaScript.g:1:262: T__73
+ pass
+ self.mT__73()
+
+
+ elif alt26 == 44:
+ # JavaScript.g:1:268: T__74
+ pass
+ self.mT__74()
+
+
+ elif alt26 == 45:
+ # JavaScript.g:1:274: T__75
+ pass
+ self.mT__75()
+
+
+ elif alt26 == 46:
+ # JavaScript.g:1:280: T__76
+ pass
+ self.mT__76()
+
+
+ elif alt26 == 47:
+ # JavaScript.g:1:286: T__77
+ pass
+ self.mT__77()
+
+
+ elif alt26 == 48:
+ # JavaScript.g:1:292: T__78
+ pass
+ self.mT__78()
+
+
+ elif alt26 == 49:
+ # JavaScript.g:1:298: T__79
+ pass
+ self.mT__79()
+
+
+ elif alt26 == 50:
+ # JavaScript.g:1:304: T__80
+ pass
+ self.mT__80()
+
+
+ elif alt26 == 51:
+ # JavaScript.g:1:310: T__81
+ pass
+ self.mT__81()
+
+
+ elif alt26 == 52:
+ # JavaScript.g:1:316: T__82
+ pass
+ self.mT__82()
+
+
+ elif alt26 == 53:
+ # JavaScript.g:1:322: T__83
+ pass
+ self.mT__83()
+
+
+ elif alt26 == 54:
+ # JavaScript.g:1:328: T__84
+ pass
+ self.mT__84()
+
+
+ elif alt26 == 55:
+ # JavaScript.g:1:334: T__85
+ pass
+ self.mT__85()
+
+
+ elif alt26 == 56:
+ # JavaScript.g:1:340: T__86
+ pass
+ self.mT__86()
+
+
+ elif alt26 == 57:
+ # JavaScript.g:1:346: T__87
+ pass
+ self.mT__87()
+
+
+ elif alt26 == 58:
+ # JavaScript.g:1:352: T__88
+ pass
+ self.mT__88()
+
+
+ elif alt26 == 59:
+ # JavaScript.g:1:358: T__89
+ pass
+ self.mT__89()
+
+
+ elif alt26 == 60:
+ # JavaScript.g:1:364: T__90
+ pass
+ self.mT__90()
+
+
+ elif alt26 == 61:
+ # JavaScript.g:1:370: T__91
+ pass
+ self.mT__91()
+
+
+ elif alt26 == 62:
+ # JavaScript.g:1:376: T__92
+ pass
+ self.mT__92()
+
+
+ elif alt26 == 63:
+ # JavaScript.g:1:382: T__93
+ pass
+ self.mT__93()
+
+
+ elif alt26 == 64:
+ # JavaScript.g:1:388: T__94
+ pass
+ self.mT__94()
+
+
+ elif alt26 == 65:
+ # JavaScript.g:1:394: T__95
+ pass
+ self.mT__95()
+
+
+ elif alt26 == 66:
+ # JavaScript.g:1:400: T__96
+ pass
+ self.mT__96()
+
+
+ elif alt26 == 67:
+ # JavaScript.g:1:406: T__97
+ pass
+ self.mT__97()
+
+
+ elif alt26 == 68:
+ # JavaScript.g:1:412: T__98
+ pass
+ self.mT__98()
+
+
+ elif alt26 == 69:
+ # JavaScript.g:1:418: T__99
+ pass
+ self.mT__99()
+
+
+ elif alt26 == 70:
+ # JavaScript.g:1:424: T__100
+ pass
+ self.mT__100()
+
+
+ elif alt26 == 71:
+ # JavaScript.g:1:431: T__101
+ pass
+ self.mT__101()
+
+
+ elif alt26 == 72:
+ # JavaScript.g:1:438: T__102
+ pass
+ self.mT__102()
+
+
+ elif alt26 == 73:
+ # JavaScript.g:1:445: T__103
+ pass
+ self.mT__103()
+
+
+ elif alt26 == 74:
+ # JavaScript.g:1:452: T__104
+ pass
+ self.mT__104()
+
+
+ elif alt26 == 75:
+ # JavaScript.g:1:459: T__105
+ pass
+ self.mT__105()
+
+
+ elif alt26 == 76:
+ # JavaScript.g:1:466: T__106
+ pass
+ self.mT__106()
+
+
+ elif alt26 == 77:
+ # JavaScript.g:1:473: StringLiteral
+ pass
+ self.mStringLiteral()
+
+
+ elif alt26 == 78:
+ # JavaScript.g:1:487: NumericLiteral
+ pass
+ self.mNumericLiteral()
+
+
+ elif alt26 == 79:
+ # JavaScript.g:1:502: Identifier
+ pass
+ self.mIdentifier()
+
+
+ elif alt26 == 80:
+ # JavaScript.g:1:513: Comment
+ pass
+ self.mComment()
+
+
+ elif alt26 == 81:
+ # JavaScript.g:1:521: LineComment
+ pass
+ self.mLineComment()
+
+
+ elif alt26 == 82:
+ # JavaScript.g:1:533: LT
+ pass
+ self.mLT()
+
+
+ elif alt26 == 83:
+ # JavaScript.g:1:536: WhiteSpace
+ pass
+ self.mWhiteSpace()
+
+
+
+
+
+
+ # $ANTLR start "synpred1_JavaScript"
+ def synpred1_JavaScript_fragment(self, ):
+ # JavaScript.g:480:4: ( IdentifierStart )
+ # JavaScript.g:480:5: IdentifierStart
+ pass
+ self.mIdentifierStart()
+
+
+ # $ANTLR end "synpred1_JavaScript"
+
+
+
+ def synpred1_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred1_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+
+
+ # lookup tables for DFA #18
+
+ DFA18_eot = DFA.unpack(
+ u"\1\uffff\1\2\2\uffff"
+ )
+
+ DFA18_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA18_min = DFA.unpack(
+ u"\2\56\2\uffff"
+ )
+
+ DFA18_max = DFA.unpack(
+ u"\2\71\2\uffff"
+ )
+
+ DFA18_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA18_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA18_transition = [
+ DFA.unpack(u"\1\2\1\uffff\12\1"),
+ DFA.unpack(u"\1\3\1\uffff\12\1"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #18
+
+ class DFA18(DFA):
+ pass
+
+
+ # lookup tables for DFA #26
+
+ DFA26_eot = DFA.unpack(
+ u"\1\uffff\1\47\5\uffff\1\47\1\uffff\1\61\7\47\1\uffff\3\47\2\uffff"
+ u"\1\103\1\105\1\111\1\113\1\116\1\121\1\124\1\127\1\132\1\134\1"
+ u"\137\1\uffff\1\141\6\uffff\6\47\1\151\1\uffff\1\152\1\154\1\47"
+ u"\1\156\15\47\17\uffff\1\u0081\2\uffff\1\u0084\12\uffff\1\u0086"
+ u"\1\uffff\1\47\1\u0088\2\47\1\u008b\1\47\3\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\14\47\1\u009b\2\47\1\u009e\1\47\3\uffff\1\u00a1\3\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\1\u00a5\1\47\1\u00a7\3\47\1\u00ab\1"
+ u"\47\1\u00ad\5\47\1\u00b3\1\uffff\1\u00b4\1\47\1\uffff\1\u00b6\2"
+ u"\uffff\2\47\1\u00b9\1\uffff\1\47\1\uffff\2\47\1\u00bd\1\uffff\1"
+ u"\47\1\uffff\1\u00bf\1\u00c0\2\47\1\u00c3\2\uffff\1\47\1\uffff\2"
+ u"\47\1\uffff\2\47\1\u00c9\1\uffff\1\47\2\uffff\1\u00cb\1\u00cc\1"
+ u"\uffff\1\u00cd\1\47\1\u00cf\1\47\1\u00d1\1\uffff\1\47\3\uffff\1"
+ u"\u00d3\1\uffff\1\47\1\uffff\1\u00d5\1\uffff\1\47\1\uffff\1\u00d7"
+ u"\1\uffff"
+ )
+
+ DFA26_eof = DFA.unpack(
+ u"\u00d8\uffff"
+ )
+
+ DFA26_min = DFA.unpack(
+ u"\1\11\1\141\5\uffff\1\141\1\uffff\1\75\1\146\1\154\1\145\1\150"
+ u"\1\141\1\162\1\145\1\uffff\1\167\1\150\1\145\2\uffff\1\60\1\75"
+ u"\1\52\1\75\1\53\1\55\1\74\1\75\1\46\2\75\1\uffff\1\75\6\uffff\1"
+ u"\156\1\162\1\156\1\154\1\162\1\151\1\75\1\uffff\2\44\1\163\1\44"
+ u"\1\146\1\151\1\164\1\156\1\163\1\145\1\164\2\151\1\165\1\160\1"
+ u"\167\1\154\17\uffff\1\75\2\uffff\1\75\12\uffff\1\75\1\uffff\1\143"
+ u"\1\44\1\141\1\163\1\44\1\144\3\uffff\1\164\1\uffff\1\145\1\uffff"
+ u"\1\141\1\145\1\154\1\150\1\164\1\145\1\143\1\141\1\165\1\164\1"
+ u"\157\1\163\1\44\2\145\1\44\1\154\3\uffff\1\75\3\uffff\1\164\1\uffff"
+ u"\1\154\1\145\1\uffff\1\44\1\141\1\44\1\165\1\164\1\145\1\44\1\151"
+ u"\1\44\1\150\1\153\1\162\1\143\1\167\1\44\1\uffff\1\44\1\157\1\uffff"
+ u"\1\44\2\uffff\1\151\1\154\1\44\1\uffff\1\156\1\uffff\1\154\1\145"
+ u"\1\44\1\uffff\1\156\1\uffff\2\44\1\156\1\150\1\44\2\uffff\1\146"
+ u"\1\uffff\1\157\1\171\1\uffff\1\143\1\164\1\44\1\uffff\1\165\2\uffff"
+ u"\2\44\1\uffff\1\44\1\156\1\44\1\145\1\44\1\uffff\1\145\3\uffff"
+ u"\1\44\1\uffff\1\157\1\uffff\1\44\1\uffff\1\146\1\uffff\1\44\1\uffff"
+ )
+
+ DFA26_max = DFA.unpack(
+ u"\1\uffdc\1\165\5\uffff\1\157\1\uffff\1\75\1\156\1\154\1\157\1\151"
+ u"\1\157\1\162\1\145\1\uffff\1\167\1\171\1\165\2\uffff\1\71\6\75"
+ u"\1\76\2\75\1\174\1\uffff\1\75\6\uffff\1\156\1\162\1\156\1\154\1"
+ u"\162\1\151\1\75\1\uffff\2\uffdc\1\163\1\uffdc\1\154\1\151\1\164"
+ u"\1\156\1\164\1\145\1\164\1\151\1\162\1\171\1\160\1\167\1\154\17"
+ u"\uffff\1\75\2\uffff\1\76\12\uffff\1\75\1\uffff\1\143\1\uffdc\1"
+ u"\141\1\163\1\uffdc\1\144\3\uffff\1\164\1\uffff\1\145\1\uffff\1"
+ u"\141\1\145\1\154\1\150\1\164\1\145\1\143\1\141\1\165\1\164\1\157"
+ u"\1\163\1\uffdc\2\145\1\uffdc\1\154\3\uffff\1\75\3\uffff\1\164\1"
+ u"\uffff\1\154\1\145\1\uffff\1\uffdc\1\141\1\uffdc\1\165\1\164\1"
+ u"\145\1\uffdc\1\151\1\uffdc\1\150\1\153\1\162\1\143\1\167\1\uffdc"
+ u"\1\uffff\1\uffdc\1\157\1\uffff\1\uffdc\2\uffff\1\151\1\154\1\uffdc"
+ u"\1\uffff\1\156\1\uffff\1\154\1\145\1\uffdc\1\uffff\1\156\1\uffff"
+ u"\2\uffdc\1\156\1\150\1\uffdc\2\uffff\1\146\1\uffff\1\157\1\171"
+ u"\1\uffff\1\143\1\164\1\uffdc\1\uffff\1\165\2\uffff\2\uffdc\1\uffff"
+ u"\1\uffdc\1\156\1\uffdc\1\145\1\uffdc\1\uffff\1\145\3\uffff\1\uffdc"
+ u"\1\uffff\1\157\1\uffff\1\uffdc\1\uffff\1\146\1\uffff\1\uffdc\1"
+ u"\uffff"
+ )
+
+ DFA26_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\3\1\4\1\5\1\6\1\uffff\1\10\10\uffff\1\24\3\uffff"
+ u"\1\35\1\36\13\uffff\1\53\1\uffff\1\107\1\115\1\116\1\117\1\122"
+ u"\1\123\7\uffff\1\11\21\uffff\1\37\1\40\1\77\1\41\1\120\1\121\1"
+ u"\100\1\42\1\101\1\43\1\105\1\75\1\44\1\106\1\76\1\uffff\1\67\1"
+ u"\65\1\uffff\1\70\1\66\1\50\1\55\1\60\1\51\1\57\1\52\1\54\1\56\1"
+ u"\uffff\1\110\6\uffff\1\63\1\61\1\12\1\uffff\1\17\1\uffff\1\14\21"
+ u"\uffff\1\45\1\72\1\46\1\uffff\1\73\1\64\1\62\1\uffff\1\16\2\uffff"
+ u"\1\7\17\uffff\1\31\2\uffff\1\34\1\uffff\1\47\1\74\3\uffff\1\103"
+ u"\1\uffff\1\13\3\uffff\1\23\1\uffff\1\26\5\uffff\1\111\1\113\1\uffff"
+ u"\1\112\2\uffff\1\114\3\uffff\1\15\1\uffff\1\32\1\21\2\uffff\1\30"
+ u"\5\uffff\1\102\1\uffff\1\22\1\25\1\104\1\uffff\1\33\1\uffff\1\27"
+ u"\1\uffff\1\1\1\uffff\1\20\1\uffff\1\71"
+ )
+
+ DFA26_special = DFA.unpack(
+ u"\u00d8\uffff"
+ )
+
+
+ DFA26_transition = [
+ DFA.unpack(u"\1\51\1\50\1\uffff\1\51\1\50\22\uffff\1\51\1\43\1\45"
+ u"\1\uffff\1\47\1\32\1\37\1\45\1\2\1\4\1\30\1\33\1\3\1\34\1\27\1"
+ u"\31\12\46\1\21\1\10\1\35\1\11\1\36\1\42\1\uffff\32\47\1\25\1\47"
+ u"\1\26\1\40\1\47\1\uffff\1\47\1\17\1\16\1\14\1\13\1\1\2\47\1\12"
+ u"\4\47\1\24\3\47\1\20\1\22\1\23\1\47\1\7\1\15\3\47\1\5\1\41\1\6"
+ u"\1\44\41\uffff\1\51\11\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\46\uffff"
+ u"\143\47\1\uffff\1\47\17\uffff\2\47\23\uffff\3\47\23\uffff\1\47"
+ u"\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47\3\uffff\1\47\22"
+ u"\uffff\1\47\7\uffff\12\47\43\uffff\10\47\2\uffff\2\47\2\uffff\26"
+ u"\47\1\uffff\7\47\1\uffff\1\47\3\uffff\4\47\42\uffff\2\47\1\uffff"
+ u"\3\47\16\uffff\2\47\23\uffff\6\47\4\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\1\uffff\2\47\1\uffff\2\47\37\uffff\4\47"
+ u"\1\uffff\1\47\23\uffff\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff"
+ u"\3\47\1\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff"
+ u"\1\47\22\uffff\1\47\17\uffff\1\47\44\uffff\10\47\2\uffff\2\47\2"
+ u"\uffff\26\47\1\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47"
+ u"\36\uffff\2\47\1\uffff\3\47\43\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\113\uffff\10\47\1\uffff\3\47\1"
+ u"\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff\2\47\43\uffff"
+ u"\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\44"
+ u"\uffff\1\47\1\uffff\2\47\43\uffff\10\47\1\uffff\3\47\1\uffff\27"
+ u"\47\1\uffff\20\47\46\uffff\2\47\43\uffff\22\47\3\uffff\30\47\1"
+ u"\uffff\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2"
+ u"\47\14\uffff\7\47\72\uffff\2\47\1\uffff\1\47\2\uffff\2\47\1\uffff"
+ u"\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff\2\47\11\uffff"
+ u"\10\47\1\uffff\1\47\25\uffff\2\47\42\uffff\1\47\77\uffff\53\47"
+ u"\35\uffff\4\47\164\uffff\42\47\1\uffff\5\47\1\uffff\2\47\45\uffff"
+ u"\6\47\112\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104"
+ u"\47\5\uffff\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff"
+ u"\4\47\2\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff"
+ u"\1\47\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff"
+ u"\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\105\uffff\125\47\14\uffff\u0276\47\12\uffff"
+ u"\32\47\5\uffff\113\47\u0095\uffff\64\47\154\uffff\130\47\10\uffff"
+ u"\51\47\u0557\uffff\u009c\47\4\uffff\132\47\6\uffff\26\47\2\uffff"
+ u"\6\47\2\uffff\46\47\2\uffff\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff"
+ u"\1\47\1\uffff\1\47\1\uffff\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff"
+ u"\1\47\3\uffff\3\47\1\uffff\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff"
+ u"\15\47\5\uffff\3\47\1\uffff\7\47\53\uffff\2\50\125\uffff\1\47\u0082"
+ u"\uffff\1\47\4\uffff\1\47\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47"
+ u"\6\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3"
+ u"\47\1\uffff\7\47\46\uffff\44\47\u0e81\uffff\3\47\31\uffff\11\47"
+ u"\7\uffff\5\47\2\uffff\3\47\6\uffff\124\47\10\uffff\2\47\2\uffff"
+ u"\132\47\1\uffff\3\47\6\uffff\50\47\4\uffff\136\47\21\uffff\30\47"
+ u"\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff\1\47\u51a4\uffff\1"
+ u"\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2\uffff\1\47\u215c"
+ u"\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47\5\uffff\1\47\1\uffff"
+ u"\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff\1\47\1\uffff\2\47\1\uffff"
+ u"\2\47\1\uffff\154\47\41\uffff\u016b\47\22\uffff\100\47\2\uffff"
+ u"\66\47\50\uffff\14\47\164\uffff\3\47\1\uffff\1\47\1\uffff\u0087"
+ u"\47\44\uffff\32\47\6\uffff\32\47\13\uffff\131\47\3\uffff\6\47\2"
+ u"\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\55\7\uffff\1\54\5\uffff\1\53\5\uffff\1\52"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\56\15\uffff\1\57"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\60"),
+ DFA.unpack(u"\1\62\7\uffff\1\63"),
+ DFA.unpack(u"\1\64"),
+ DFA.unpack(u"\1\66\11\uffff\1\65"),
+ DFA.unpack(u"\1\67\1\70"),
+ DFA.unpack(u"\1\72\15\uffff\1\71"),
+ DFA.unpack(u"\1\73"),
+ DFA.unpack(u"\1\74"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\75"),
+ DFA.unpack(u"\1\76\11\uffff\1\77\6\uffff\1\100"),
+ DFA.unpack(u"\1\101\17\uffff\1\102"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\12\46"),
+ DFA.unpack(u"\1\104"),
+ DFA.unpack(u"\1\107\4\uffff\1\110\15\uffff\1\106"),
+ DFA.unpack(u"\1\112"),
+ DFA.unpack(u"\1\115\21\uffff\1\114"),
+ DFA.unpack(u"\1\120\17\uffff\1\117"),
+ DFA.unpack(u"\1\122\1\123"),
+ DFA.unpack(u"\1\126\1\125"),
+ DFA.unpack(u"\1\131\26\uffff\1\130"),
+ DFA.unpack(u"\1\133"),
+ DFA.unpack(u"\1\135\76\uffff\1\136"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\140"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\142"),
+ DFA.unpack(u"\1\143"),
+ DFA.unpack(u"\1\144"),
+ DFA.unpack(u"\1\145"),
+ DFA.unpack(u"\1\146"),
+ DFA.unpack(u"\1\147"),
+ DFA.unpack(u"\1\150"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\22\47\1\153\7\47\57\uffff\1\47\12\uffff\1\47\4\uffff"
+ u"\1\47\5\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47"
+ u"\34\uffff\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff"
+ u"\5\47\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47"
+ u"\1\uffff\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff"
+ u"\32\47\14\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2"
+ u"\47\3\uffff\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff"
+ u"\47\47\110\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47"
+ u"\25\uffff\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff"
+ u"\15\47\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff"
+ u"\65\47\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25"
+ u"\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1"
+ u"\47\3\uffff\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff"
+ u"\6\47\4\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff"
+ u"\2\47\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\155"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\157\5\uffff\1\160"),
+ DFA.unpack(u"\1\161"),
+ DFA.unpack(u"\1\162"),
+ DFA.unpack(u"\1\163"),
+ DFA.unpack(u"\1\164\1\165"),
+ DFA.unpack(u"\1\166"),
+ DFA.unpack(u"\1\167"),
+ DFA.unpack(u"\1\170"),
+ DFA.unpack(u"\1\172\10\uffff\1\171"),
+ DFA.unpack(u"\1\174\3\uffff\1\173"),
+ DFA.unpack(u"\1\175"),
+ DFA.unpack(u"\1\176"),
+ DFA.unpack(u"\1\177"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0080"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0082\1\u0083"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0085"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u0087"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\u0089"),
+ DFA.unpack(u"\1\u008a"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\u008c"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u008d"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u008e"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u008f"),
+ DFA.unpack(u"\1\u0090"),
+ DFA.unpack(u"\1\u0091"),
+ DFA.unpack(u"\1\u0092"),
+ DFA.unpack(u"\1\u0093"),
+ DFA.unpack(u"\1\u0094"),
+ DFA.unpack(u"\1\u0095"),
+ DFA.unpack(u"\1\u0096"),
+ DFA.unpack(u"\1\u0097"),
+ DFA.unpack(u"\1\u0098"),
+ DFA.unpack(u"\1\u0099"),
+ DFA.unpack(u"\1\u009a"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\u009c"),
+ DFA.unpack(u"\1\u009d"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\u009f"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00a0"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00a2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00a3"),
+ DFA.unpack(u"\1\u00a4"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\u00a6"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\u00a8"),
+ DFA.unpack(u"\1\u00a9"),
+ DFA.unpack(u"\1\u00aa"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\u00ac"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\u00ae"),
+ DFA.unpack(u"\1\u00af"),
+ DFA.unpack(u"\1\u00b0"),
+ DFA.unpack(u"\1\u00b1"),
+ DFA.unpack(u"\1\u00b2"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\u00b5"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00b7"),
+ DFA.unpack(u"\1\u00b8"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00ba"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00bb"),
+ DFA.unpack(u"\1\u00bc"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00be"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\u00c1"),
+ DFA.unpack(u"\1\u00c2"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00c4"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00c5"),
+ DFA.unpack(u"\1\u00c6"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00c7"),
+ DFA.unpack(u"\1\u00c8"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00ca"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\u00ce"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"\1\u00d0"),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00d2"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00d4"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\u00d6"),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\47\13\uffff\12\47\7\uffff\32\47\1\uffff\1\47\2\uffff"
+ u"\1\47\1\uffff\32\47\57\uffff\1\47\12\uffff\1\47\4\uffff\1\47\5"
+ u"\uffff\27\47\1\uffff\37\47\1\uffff\u0128\47\2\uffff\22\47\34\uffff"
+ u"\136\47\2\uffff\11\47\2\uffff\7\47\16\uffff\2\47\16\uffff\5\47"
+ u"\11\uffff\1\47\u008b\uffff\1\47\13\uffff\1\47\1\uffff\3\47\1\uffff"
+ u"\1\47\1\uffff\24\47\1\uffff\54\47\1\uffff\10\47\2\uffff\32\47\14"
+ u"\uffff\u0082\47\12\uffff\71\47\2\uffff\2\47\2\uffff\2\47\3\uffff"
+ u"\46\47\2\uffff\2\47\67\uffff\46\47\2\uffff\1\47\7\uffff\47\47\110"
+ u"\uffff\33\47\5\uffff\3\47\56\uffff\32\47\5\uffff\13\47\25\uffff"
+ u"\12\47\7\uffff\143\47\1\uffff\1\47\17\uffff\2\47\11\uffff\15\47"
+ u"\23\uffff\1\47\1\uffff\33\47\123\uffff\46\47\u015f\uffff\65\47"
+ u"\3\uffff\1\47\22\uffff\1\47\7\uffff\12\47\4\uffff\12\47\25\uffff"
+ u"\10\47\2\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\1\47\3\uffff"
+ u"\4\47\42\uffff\2\47\1\uffff\3\47\4\uffff\14\47\23\uffff\6\47\4"
+ u"\uffff\2\47\2\uffff\26\47\1\uffff\7\47\1\uffff\2\47\1\uffff\2\47"
+ u"\1\uffff\2\47\37\uffff\4\47\1\uffff\1\47\7\uffff\12\47\2\uffff"
+ u"\3\47\20\uffff\7\47\1\uffff\1\47\1\uffff\3\47\1\uffff\26\47\1\uffff"
+ u"\7\47\1\uffff\2\47\1\uffff\5\47\3\uffff\1\47\22\uffff\1\47\17\uffff"
+ u"\1\47\5\uffff\12\47\25\uffff\10\47\2\uffff\2\47\2\uffff\26\47\1"
+ u"\uffff\7\47\1\uffff\2\47\2\uffff\4\47\3\uffff\1\47\36\uffff\2\47"
+ u"\1\uffff\3\47\4\uffff\12\47\25\uffff\6\47\3\uffff\3\47\1\uffff"
+ u"\4\47\3\uffff\2\47\1\uffff\1\47\1\uffff\2\47\3\uffff\2\47\3\uffff"
+ u"\3\47\3\uffff\10\47\1\uffff\3\47\55\uffff\11\47\25\uffff\10\47"
+ u"\1\uffff\3\47\1\uffff\27\47\1\uffff\12\47\1\uffff\5\47\46\uffff"
+ u"\2\47\4\uffff\12\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1"
+ u"\uffff\12\47\1\uffff\5\47\44\uffff\1\47\1\uffff\2\47\4\uffff\12"
+ u"\47\25\uffff\10\47\1\uffff\3\47\1\uffff\27\47\1\uffff\20\47\46"
+ u"\uffff\2\47\4\uffff\12\47\25\uffff\22\47\3\uffff\30\47\1\uffff"
+ u"\11\47\1\uffff\1\47\2\uffff\7\47\72\uffff\60\47\1\uffff\2\47\14"
+ u"\uffff\7\47\11\uffff\12\47\47\uffff\2\47\1\uffff\1\47\2\uffff\2"
+ u"\47\1\uffff\1\47\2\uffff\1\47\6\uffff\4\47\1\uffff\7\47\1\uffff"
+ u"\3\47\1\uffff\1\47\1\uffff\1\47\2\uffff\2\47\1\uffff\4\47\1\uffff"
+ u"\2\47\11\uffff\10\47\1\uffff\1\47\11\uffff\12\47\2\uffff\2\47\42"
+ u"\uffff\1\47\37\uffff\12\47\26\uffff\53\47\35\uffff\4\47\164\uffff"
+ u"\42\47\1\uffff\5\47\1\uffff\2\47\25\uffff\12\47\6\uffff\6\47\112"
+ u"\uffff\46\47\12\uffff\47\47\11\uffff\132\47\5\uffff\104\47\5\uffff"
+ u"\122\47\6\uffff\7\47\1\uffff\77\47\1\uffff\1\47\1\uffff\4\47\2"
+ u"\uffff\7\47\1\uffff\1\47\1\uffff\4\47\2\uffff\47\47\1\uffff\1\47"
+ u"\1\uffff\4\47\2\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7"
+ u"\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff\7\47\1\uffff"
+ u"\27\47\1\uffff\37\47\1\uffff\1\47\1\uffff\4\47\2\uffff\7\47\1\uffff"
+ u"\47\47\1\uffff\23\47\16\uffff\11\47\56\uffff\125\47\14\uffff\u0276"
+ u"\47\12\uffff\32\47\5\uffff\113\47\u0095\uffff\64\47\54\uffff\12"
+ u"\47\46\uffff\12\47\6\uffff\130\47\10\uffff\51\47\u0557\uffff\u009c"
+ u"\47\4\uffff\132\47\6\uffff\26\47\2\uffff\6\47\2\uffff\46\47\2\uffff"
+ u"\6\47\2\uffff\10\47\1\uffff\1\47\1\uffff\1\47\1\uffff\1\47\1\uffff"
+ u"\37\47\2\uffff\65\47\1\uffff\7\47\1\uffff\1\47\3\uffff\3\47\1\uffff"
+ u"\7\47\3\uffff\4\47\2\uffff\6\47\4\uffff\15\47\5\uffff\3\47\1\uffff"
+ u"\7\47\102\uffff\2\47\76\uffff\1\47\u0082\uffff\1\47\4\uffff\1\47"
+ u"\2\uffff\12\47\1\uffff\1\47\3\uffff\5\47\6\uffff\1\47\1\uffff\1"
+ u"\47\1\uffff\1\47\1\uffff\4\47\1\uffff\3\47\1\uffff\7\47\46\uffff"
+ u"\44\47\u0e81\uffff\3\47\31\uffff\11\47\7\uffff\5\47\2\uffff\3\47"
+ u"\6\uffff\124\47\10\uffff\2\47\2\uffff\136\47\6\uffff\50\47\4\uffff"
+ u"\136\47\21\uffff\30\47\u0248\uffff\1\47\u19b4\uffff\1\47\112\uffff"
+ u"\1\47\u51a4\uffff\1\47\132\uffff\u048d\47\u0773\uffff\1\47\u2ba2"
+ u"\uffff\1\47\u215c\uffff\u012e\47\u00d2\uffff\7\47\14\uffff\5\47"
+ u"\5\uffff\1\47\1\uffff\12\47\1\uffff\15\47\1\uffff\5\47\1\uffff"
+ u"\1\47\1\uffff\2\47\1\uffff\2\47\1\uffff\154\47\41\uffff\u016b\47"
+ u"\22\uffff\100\47\2\uffff\66\47\50\uffff\14\47\67\uffff\2\47\30"
+ u"\uffff\3\47\40\uffff\3\47\1\uffff\1\47\1\uffff\u0087\47\23\uffff"
+ u"\12\47\7\uffff\32\47\4\uffff\1\47\1\uffff\32\47\12\uffff\132\47"
+ u"\3\uffff\6\47\2\uffff\6\47\2\uffff\6\47\2\uffff\3\47"),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #26
+
+ class DFA26(DFA):
+ pass
+
+
+
+
+
+
+def main(argv, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr):
+ from antlr3.main import LexerMain
+ main = LexerMain(JavaScriptLexer)
+ main.stdin = stdin
+ main.stdout = stdout
+ main.stderr = stderr
+ main.execute(argv)
+
+
+if __name__ == '__main__':
+ main(sys.argv)
Added: torflow/trunk/NetworkScanners/libs/jsparser/JavaScriptParser.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/JavaScriptParser.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/JavaScriptParser.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,15814 @@
+# $ANTLR 3.1.3 Mar 18, 2009 10:09:25 JavaScript.g 2009-04-05 22:38:00
+
+import sys
+from antlr3 import *
+from antlr3.compat import set, frozenset
+
+from antlr3.tree import *
+
+
+
+# for convenience in actions
+HIDDEN = BaseRecognizer.HIDDEN
+
+# token types
+LT=4
+DecimalDigit=17
+EOF=-1
+Identifier=5
+SingleStringCharacter=9
+T__93=93
+T__94=94
+T__91=91
+T__92=92
+T__90=90
+Comment=28
+SingleEscapeCharacter=14
+UnicodeLetter=24
+ExponentPart=21
+WhiteSpace=30
+T__99=99
+T__98=98
+T__97=97
+T__96=96
+UnicodeCombiningMark=27
+T__95=95
+UnicodeDigit=25
+T__80=80
+T__81=81
+NumericLiteral=7
+T__82=82
+T__83=83
+IdentifierStart=22
+DoubleStringCharacter=8
+T__85=85
+T__84=84
+T__87=87
+T__86=86
+T__89=89
+T__88=88
+T__71=71
+T__72=72
+T__70=70
+CharacterEscapeSequence=11
+T__76=76
+T__75=75
+T__74=74
+T__73=73
+EscapeSequence=10
+T__79=79
+UnicodeConnectorPunctuation=26
+T__78=78
+T__77=77
+T__68=68
+T__69=69
+T__66=66
+T__67=67
+T__64=64
+T__65=65
+T__62=62
+T__63=63
+HexEscapeSequence=12
+LineComment=29
+T__61=61
+T__60=60
+HexDigit=18
+T__55=55
+T__56=56
+T__57=57
+T__58=58
+T__51=51
+T__52=52
+T__53=53
+T__54=54
+T__59=59
+T__103=103
+T__104=104
+T__105=105
+T__106=106
+EscapeCharacter=16
+T__50=50
+IdentifierPart=23
+T__42=42
+T__43=43
+T__40=40
+T__41=41
+T__46=46
+T__47=47
+T__44=44
+T__45=45
+T__48=48
+T__49=49
+UnicodeEscapeSequence=13
+T__102=102
+T__101=101
+T__100=100
+DecimalLiteral=19
+StringLiteral=6
+T__31=31
+T__32=32
+T__33=33
+T__34=34
+T__35=35
+T__36=36
+T__37=37
+T__38=38
+T__39=39
+HexIntegerLiteral=20
+NonEscapeCharacter=15
+
+# token names
+tokenNames = [
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>",
+ "LT", "Identifier", "StringLiteral", "NumericLiteral", "DoubleStringCharacter",
+ "SingleStringCharacter", "EscapeSequence", "CharacterEscapeSequence",
+ "HexEscapeSequence", "UnicodeEscapeSequence", "SingleEscapeCharacter",
+ "NonEscapeCharacter", "EscapeCharacter", "DecimalDigit", "HexDigit",
+ "DecimalLiteral", "HexIntegerLiteral", "ExponentPart", "IdentifierStart",
+ "IdentifierPart", "UnicodeLetter", "UnicodeDigit", "UnicodeConnectorPunctuation",
+ "UnicodeCombiningMark", "Comment", "LineComment", "WhiteSpace", "'function'",
+ "'('", "','", "')'", "'{'", "'}'", "'var'", "';'", "'='", "'if'", "'else'",
+ "'do'", "'while'", "'for'", "'in'", "'continue'", "'break'", "'return'",
+ "'with'", "':'", "'switch'", "'case'", "'default'", "'throw'", "'try'",
+ "'catch'", "'finally'", "'new'", "'['", "']'", "'.'", "'*='", "'/='",
+ "'%='", "'+='", "'-='", "'<<='", "'>>='", "'>>>='", "'&='", "'^='",
+ "'|='", "'?'", "'||'", "'&&'", "'|'", "'^'", "'&'", "'=='", "'!='",
+ "'==='", "'!=='", "'<'", "'>'", "'<='", "'>='", "'instanceof'", "'<<'",
+ "'>>'", "'>>>'", "'+'", "'-'", "'*'", "'/'", "'%'", "'delete'", "'void'",
+ "'typeof'", "'++'", "'--'", "'~'", "'!'", "'this'", "'null'", "'true'",
+ "'false'"
+]
+
+
+
+
+class JavaScriptParser(Parser):
+ grammarFileName = "JavaScript.g"
+ antlr_version = version_str_to_tuple("3.1.3 Mar 18, 2009 10:09:25")
+ antlr_version_str = "3.1.3 Mar 18, 2009 10:09:25"
+ tokenNames = tokenNames
+
+ def __init__(self, input, state=None, *args, **kwargs):
+ if state is None:
+ state = RecognizerSharedState()
+
+ super(JavaScriptParser, self).__init__(input, state, *args, **kwargs)
+
+ self._state.ruleMemo = {}
+ self.dfa4 = self.DFA4(
+ self, 4,
+ eot = self.DFA4_eot,
+ eof = self.DFA4_eof,
+ min = self.DFA4_min,
+ max = self.DFA4_max,
+ accept = self.DFA4_accept,
+ special = self.DFA4_special,
+ transition = self.DFA4_transition
+ )
+
+ self.dfa5 = self.DFA5(
+ self, 5,
+ eot = self.DFA5_eot,
+ eof = self.DFA5_eof,
+ min = self.DFA5_min,
+ max = self.DFA5_max,
+ accept = self.DFA5_accept,
+ special = self.DFA5_special,
+ transition = self.DFA5_transition
+ )
+
+ self.dfa17 = self.DFA17(
+ self, 17,
+ eot = self.DFA17_eot,
+ eof = self.DFA17_eof,
+ min = self.DFA17_min,
+ max = self.DFA17_max,
+ accept = self.DFA17_accept,
+ special = self.DFA17_special,
+ transition = self.DFA17_transition
+ )
+
+ self.dfa16 = self.DFA16(
+ self, 16,
+ eot = self.DFA16_eot,
+ eof = self.DFA16_eof,
+ min = self.DFA16_min,
+ max = self.DFA16_max,
+ accept = self.DFA16_accept,
+ special = self.DFA16_special,
+ transition = self.DFA16_transition
+ )
+
+ self.dfa21 = self.DFA21(
+ self, 21,
+ eot = self.DFA21_eot,
+ eof = self.DFA21_eof,
+ min = self.DFA21_min,
+ max = self.DFA21_max,
+ accept = self.DFA21_accept,
+ special = self.DFA21_special,
+ transition = self.DFA21_transition
+ )
+
+ self.dfa26 = self.DFA26(
+ self, 26,
+ eot = self.DFA26_eot,
+ eof = self.DFA26_eof,
+ min = self.DFA26_min,
+ max = self.DFA26_max,
+ accept = self.DFA26_accept,
+ special = self.DFA26_special,
+ transition = self.DFA26_transition
+ )
+
+ self.dfa30 = self.DFA30(
+ self, 30,
+ eot = self.DFA30_eot,
+ eof = self.DFA30_eof,
+ min = self.DFA30_min,
+ max = self.DFA30_max,
+ accept = self.DFA30_accept,
+ special = self.DFA30_special,
+ transition = self.DFA30_transition
+ )
+
+ self.dfa33 = self.DFA33(
+ self, 33,
+ eot = self.DFA33_eot,
+ eof = self.DFA33_eof,
+ min = self.DFA33_min,
+ max = self.DFA33_max,
+ accept = self.DFA33_accept,
+ special = self.DFA33_special,
+ transition = self.DFA33_transition
+ )
+
+ self.dfa57 = self.DFA57(
+ self, 57,
+ eot = self.DFA57_eot,
+ eof = self.DFA57_eof,
+ min = self.DFA57_min,
+ max = self.DFA57_max,
+ accept = self.DFA57_accept,
+ special = self.DFA57_special,
+ transition = self.DFA57_transition
+ )
+
+ self.dfa60 = self.DFA60(
+ self, 60,
+ eot = self.DFA60_eot,
+ eof = self.DFA60_eof,
+ min = self.DFA60_min,
+ max = self.DFA60_max,
+ accept = self.DFA60_accept,
+ special = self.DFA60_special,
+ transition = self.DFA60_transition
+ )
+
+ self.dfa63 = self.DFA63(
+ self, 63,
+ eot = self.DFA63_eot,
+ eof = self.DFA63_eof,
+ min = self.DFA63_min,
+ max = self.DFA63_max,
+ accept = self.DFA63_accept,
+ special = self.DFA63_special,
+ transition = self.DFA63_transition
+ )
+
+ self.dfa90 = self.DFA90(
+ self, 90,
+ eot = self.DFA90_eot,
+ eof = self.DFA90_eof,
+ min = self.DFA90_min,
+ max = self.DFA90_max,
+ accept = self.DFA90_accept,
+ special = self.DFA90_special,
+ transition = self.DFA90_transition
+ )
+
+ self.dfa94 = self.DFA94(
+ self, 94,
+ eot = self.DFA94_eot,
+ eof = self.DFA94_eof,
+ min = self.DFA94_min,
+ max = self.DFA94_max,
+ accept = self.DFA94_accept,
+ special = self.DFA94_special,
+ transition = self.DFA94_transition
+ )
+
+ self.dfa93 = self.DFA93(
+ self, 93,
+ eot = self.DFA93_eot,
+ eof = self.DFA93_eof,
+ min = self.DFA93_min,
+ max = self.DFA93_max,
+ accept = self.DFA93_accept,
+ special = self.DFA93_special,
+ transition = self.DFA93_transition
+ )
+
+ self.dfa106 = self.DFA106(
+ self, 106,
+ eot = self.DFA106_eot,
+ eof = self.DFA106_eof,
+ min = self.DFA106_min,
+ max = self.DFA106_max,
+ accept = self.DFA106_accept,
+ special = self.DFA106_special,
+ transition = self.DFA106_transition
+ )
+
+ self.dfa115 = self.DFA115(
+ self, 115,
+ eot = self.DFA115_eot,
+ eof = self.DFA115_eof,
+ min = self.DFA115_min,
+ max = self.DFA115_max,
+ accept = self.DFA115_accept,
+ special = self.DFA115_special,
+ transition = self.DFA115_transition
+ )
+
+ self.dfa118 = self.DFA118(
+ self, 118,
+ eot = self.DFA118_eot,
+ eof = self.DFA118_eof,
+ min = self.DFA118_min,
+ max = self.DFA118_max,
+ accept = self.DFA118_accept,
+ special = self.DFA118_special,
+ transition = self.DFA118_transition
+ )
+
+ self.dfa121 = self.DFA121(
+ self, 121,
+ eot = self.DFA121_eot,
+ eof = self.DFA121_eof,
+ min = self.DFA121_min,
+ max = self.DFA121_max,
+ accept = self.DFA121_accept,
+ special = self.DFA121_special,
+ transition = self.DFA121_transition
+ )
+
+ self.dfa124 = self.DFA124(
+ self, 124,
+ eot = self.DFA124_eot,
+ eof = self.DFA124_eof,
+ min = self.DFA124_min,
+ max = self.DFA124_max,
+ accept = self.DFA124_accept,
+ special = self.DFA124_special,
+ transition = self.DFA124_transition
+ )
+
+ self.dfa125 = self.DFA125(
+ self, 125,
+ eot = self.DFA125_eot,
+ eof = self.DFA125_eof,
+ min = self.DFA125_min,
+ max = self.DFA125_max,
+ accept = self.DFA125_accept,
+ special = self.DFA125_special,
+ transition = self.DFA125_transition
+ )
+
+ self.dfa127 = self.DFA127(
+ self, 127,
+ eot = self.DFA127_eot,
+ eof = self.DFA127_eof,
+ min = self.DFA127_min,
+ max = self.DFA127_max,
+ accept = self.DFA127_accept,
+ special = self.DFA127_special,
+ transition = self.DFA127_transition
+ )
+
+ self.dfa132 = self.DFA132(
+ self, 132,
+ eot = self.DFA132_eot,
+ eof = self.DFA132_eof,
+ min = self.DFA132_min,
+ max = self.DFA132_max,
+ accept = self.DFA132_accept,
+ special = self.DFA132_special,
+ transition = self.DFA132_transition
+ )
+
+ self.dfa136 = self.DFA136(
+ self, 136,
+ eot = self.DFA136_eot,
+ eof = self.DFA136_eof,
+ min = self.DFA136_min,
+ max = self.DFA136_max,
+ accept = self.DFA136_accept,
+ special = self.DFA136_special,
+ transition = self.DFA136_transition
+ )
+
+ self.dfa142 = self.DFA142(
+ self, 142,
+ eot = self.DFA142_eot,
+ eof = self.DFA142_eof,
+ min = self.DFA142_min,
+ max = self.DFA142_max,
+ accept = self.DFA142_accept,
+ special = self.DFA142_special,
+ transition = self.DFA142_transition
+ )
+
+ self.dfa141 = self.DFA141(
+ self, 141,
+ eot = self.DFA141_eot,
+ eof = self.DFA141_eof,
+ min = self.DFA141_min,
+ max = self.DFA141_max,
+ accept = self.DFA141_accept,
+ special = self.DFA141_special,
+ transition = self.DFA141_transition
+ )
+
+ self.dfa151 = self.DFA151(
+ self, 151,
+ eot = self.DFA151_eot,
+ eof = self.DFA151_eof,
+ min = self.DFA151_min,
+ max = self.DFA151_max,
+ accept = self.DFA151_accept,
+ special = self.DFA151_special,
+ transition = self.DFA151_transition
+ )
+
+ self.dfa156 = self.DFA156(
+ self, 156,
+ eot = self.DFA156_eot,
+ eof = self.DFA156_eof,
+ min = self.DFA156_min,
+ max = self.DFA156_max,
+ accept = self.DFA156_accept,
+ special = self.DFA156_special,
+ transition = self.DFA156_transition
+ )
+
+ self.dfa159 = self.DFA159(
+ self, 159,
+ eot = self.DFA159_eot,
+ eof = self.DFA159_eof,
+ min = self.DFA159_min,
+ max = self.DFA159_max,
+ accept = self.DFA159_accept,
+ special = self.DFA159_special,
+ transition = self.DFA159_transition
+ )
+
+ self.dfa162 = self.DFA162(
+ self, 162,
+ eot = self.DFA162_eot,
+ eof = self.DFA162_eof,
+ min = self.DFA162_min,
+ max = self.DFA162_max,
+ accept = self.DFA162_accept,
+ special = self.DFA162_special,
+ transition = self.DFA162_transition
+ )
+
+ self.dfa165 = self.DFA165(
+ self, 165,
+ eot = self.DFA165_eot,
+ eof = self.DFA165_eof,
+ min = self.DFA165_min,
+ max = self.DFA165_max,
+ accept = self.DFA165_accept,
+ special = self.DFA165_special,
+ transition = self.DFA165_transition
+ )
+
+ self.dfa168 = self.DFA168(
+ self, 168,
+ eot = self.DFA168_eot,
+ eof = self.DFA168_eof,
+ min = self.DFA168_min,
+ max = self.DFA168_max,
+ accept = self.DFA168_accept,
+ special = self.DFA168_special,
+ transition = self.DFA168_transition
+ )
+
+ self.dfa171 = self.DFA171(
+ self, 171,
+ eot = self.DFA171_eot,
+ eof = self.DFA171_eof,
+ min = self.DFA171_min,
+ max = self.DFA171_max,
+ accept = self.DFA171_accept,
+ special = self.DFA171_special,
+ transition = self.DFA171_transition
+ )
+
+ self.dfa174 = self.DFA174(
+ self, 174,
+ eot = self.DFA174_eot,
+ eof = self.DFA174_eof,
+ min = self.DFA174_min,
+ max = self.DFA174_max,
+ accept = self.DFA174_accept,
+ special = self.DFA174_special,
+ transition = self.DFA174_transition
+ )
+
+ self.dfa177 = self.DFA177(
+ self, 177,
+ eot = self.DFA177_eot,
+ eof = self.DFA177_eof,
+ min = self.DFA177_min,
+ max = self.DFA177_max,
+ accept = self.DFA177_accept,
+ special = self.DFA177_special,
+ transition = self.DFA177_transition
+ )
+
+ self.dfa180 = self.DFA180(
+ self, 180,
+ eot = self.DFA180_eot,
+ eof = self.DFA180_eof,
+ min = self.DFA180_min,
+ max = self.DFA180_max,
+ accept = self.DFA180_accept,
+ special = self.DFA180_special,
+ transition = self.DFA180_transition
+ )
+
+ self.dfa183 = self.DFA183(
+ self, 183,
+ eot = self.DFA183_eot,
+ eof = self.DFA183_eof,
+ min = self.DFA183_min,
+ max = self.DFA183_max,
+ accept = self.DFA183_accept,
+ special = self.DFA183_special,
+ transition = self.DFA183_transition
+ )
+
+ self.dfa186 = self.DFA186(
+ self, 186,
+ eot = self.DFA186_eot,
+ eof = self.DFA186_eof,
+ min = self.DFA186_min,
+ max = self.DFA186_max,
+ accept = self.DFA186_accept,
+ special = self.DFA186_special,
+ transition = self.DFA186_transition
+ )
+
+ self.dfa189 = self.DFA189(
+ self, 189,
+ eot = self.DFA189_eot,
+ eof = self.DFA189_eof,
+ min = self.DFA189_min,
+ max = self.DFA189_max,
+ accept = self.DFA189_accept,
+ special = self.DFA189_special,
+ transition = self.DFA189_transition
+ )
+
+ self.dfa192 = self.DFA192(
+ self, 192,
+ eot = self.DFA192_eot,
+ eof = self.DFA192_eof,
+ min = self.DFA192_min,
+ max = self.DFA192_max,
+ accept = self.DFA192_accept,
+ special = self.DFA192_special,
+ transition = self.DFA192_transition
+ )
+
+ self.dfa195 = self.DFA195(
+ self, 195,
+ eot = self.DFA195_eot,
+ eof = self.DFA195_eof,
+ min = self.DFA195_min,
+ max = self.DFA195_max,
+ accept = self.DFA195_accept,
+ special = self.DFA195_special,
+ transition = self.DFA195_transition
+ )
+
+ self.dfa198 = self.DFA198(
+ self, 198,
+ eot = self.DFA198_eot,
+ eof = self.DFA198_eof,
+ min = self.DFA198_min,
+ max = self.DFA198_max,
+ accept = self.DFA198_accept,
+ special = self.DFA198_special,
+ transition = self.DFA198_transition
+ )
+
+ self.dfa201 = self.DFA201(
+ self, 201,
+ eot = self.DFA201_eot,
+ eof = self.DFA201_eof,
+ min = self.DFA201_min,
+ max = self.DFA201_max,
+ accept = self.DFA201_accept,
+ special = self.DFA201_special,
+ transition = self.DFA201_transition
+ )
+
+ self.dfa204 = self.DFA204(
+ self, 204,
+ eot = self.DFA204_eot,
+ eof = self.DFA204_eof,
+ min = self.DFA204_min,
+ max = self.DFA204_max,
+ accept = self.DFA204_accept,
+ special = self.DFA204_special,
+ transition = self.DFA204_transition
+ )
+
+ self.dfa207 = self.DFA207(
+ self, 207,
+ eot = self.DFA207_eot,
+ eof = self.DFA207_eof,
+ min = self.DFA207_min,
+ max = self.DFA207_max,
+ accept = self.DFA207_accept,
+ special = self.DFA207_special,
+ transition = self.DFA207_transition
+ )
+
+ self.dfa218 = self.DFA218(
+ self, 218,
+ eot = self.DFA218_eot,
+ eof = self.DFA218_eof,
+ min = self.DFA218_min,
+ max = self.DFA218_max,
+ accept = self.DFA218_accept,
+ special = self.DFA218_special,
+ transition = self.DFA218_transition
+ )
+
+ self.dfa217 = self.DFA217(
+ self, 217,
+ eot = self.DFA217_eot,
+ eof = self.DFA217_eof,
+ min = self.DFA217_min,
+ max = self.DFA217_max,
+ accept = self.DFA217_accept,
+ special = self.DFA217_special,
+ transition = self.DFA217_transition
+ )
+
+ self.dfa223 = self.DFA223(
+ self, 223,
+ eot = self.DFA223_eot,
+ eof = self.DFA223_eof,
+ min = self.DFA223_min,
+ max = self.DFA223_max,
+ accept = self.DFA223_accept,
+ special = self.DFA223_special,
+ transition = self.DFA223_transition
+ )
+
+
+
+
+
+
+ self._adaptor = None
+ self.adaptor = CommonTreeAdaptor()
+
+
+
+
+ def getTreeAdaptor(self):
+ return self._adaptor
+
+ def setTreeAdaptor(self, adaptor):
+ self._adaptor = adaptor
+
+ adaptor = property(getTreeAdaptor, setTreeAdaptor)
+
+
+ class program_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.program_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "program"
+ # JavaScript.g:23:1: program : ( LT )* sourceElements ( LT )* EOF ;
+ def program(self, ):
+
+ retval = self.program_return()
+ retval.start = self.input.LT(1)
+ program_StartIndex = self.input.index()
+ root_0 = None
+
+ LT1 = None
+ LT3 = None
+ EOF4 = None
+ sourceElements2 = None
+
+
+ LT1_tree = None
+ LT3_tree = None
+ EOF4_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 1):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:24:2: ( ( LT )* sourceElements ( LT )* EOF )
+ # JavaScript.g:24:4: ( LT )* sourceElements ( LT )* EOF
+ pass
+ root_0 = self._adaptor.nil()
+
+ # JavaScript.g:24:6: ( LT )*
+ while True: #loop1
+ alt1 = 2
+ LA1_0 = self.input.LA(1)
+
+ if (LA1_0 == LT) :
+ alt1 = 1
+
+
+ if alt1 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT1=self.match(self.input, LT, self.FOLLOW_LT_in_program46)
+
+
+ else:
+ break #loop1
+ self._state.following.append(self.FOLLOW_sourceElements_in_program50)
+ sourceElements2 = self.sourceElements()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, sourceElements2.tree)
+ # JavaScript.g:24:26: ( LT )*
+ while True: #loop2
+ alt2 = 2
+ LA2_0 = self.input.LA(1)
+
+ if (LA2_0 == LT) :
+ alt2 = 1
+
+
+ if alt2 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT3=self.match(self.input, LT, self.FOLLOW_LT_in_program52)
+
+
+ else:
+ break #loop2
+ EOF4=self.match(self.input, EOF, self.FOLLOW_EOF_in_program56)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 1, program_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "program"
+
+ class sourceElements_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.sourceElements_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "sourceElements"
+ # JavaScript.g:27:1: sourceElements : sourceElement ( ( LT )* sourceElement )* ;
+ def sourceElements(self, ):
+
+ retval = self.sourceElements_return()
+ retval.start = self.input.LT(1)
+ sourceElements_StartIndex = self.input.index()
+ root_0 = None
+
+ LT6 = None
+ sourceElement5 = None
+
+ sourceElement7 = None
+
+
+ LT6_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 2):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:28:2: ( sourceElement ( ( LT )* sourceElement )* )
+ # JavaScript.g:28:4: sourceElement ( ( LT )* sourceElement )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_sourceElement_in_sourceElements69)
+ sourceElement5 = self.sourceElement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, sourceElement5.tree)
+ # JavaScript.g:28:18: ( ( LT )* sourceElement )*
+ while True: #loop4
+ alt4 = 2
+ alt4 = self.dfa4.predict(self.input)
+ if alt4 == 1:
+ # JavaScript.g:28:19: ( LT )* sourceElement
+ pass
+ # JavaScript.g:28:21: ( LT )*
+ while True: #loop3
+ alt3 = 2
+ LA3_0 = self.input.LA(1)
+
+ if (LA3_0 == LT) :
+ alt3 = 1
+
+
+ if alt3 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT6=self.match(self.input, LT, self.FOLLOW_LT_in_sourceElements72)
+
+
+ else:
+ break #loop3
+ self._state.following.append(self.FOLLOW_sourceElement_in_sourceElements76)
+ sourceElement7 = self.sourceElement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, sourceElement7.tree)
+
+
+ else:
+ break #loop4
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 2, sourceElements_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "sourceElements"
+
+ class sourceElement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.sourceElement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "sourceElement"
+ # JavaScript.g:31:1: sourceElement : ( functionDeclaration | statement );
+ def sourceElement(self, ):
+
+ retval = self.sourceElement_return()
+ retval.start = self.input.LT(1)
+ sourceElement_StartIndex = self.input.index()
+ root_0 = None
+
+ functionDeclaration8 = None
+
+ statement9 = None
+
+
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 3):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:32:2: ( functionDeclaration | statement )
+ alt5 = 2
+ alt5 = self.dfa5.predict(self.input)
+ if alt5 == 1:
+ # JavaScript.g:32:4: functionDeclaration
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_functionDeclaration_in_sourceElement90)
+ functionDeclaration8 = self.functionDeclaration()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, functionDeclaration8.tree)
+
+
+ elif alt5 == 2:
+ # JavaScript.g:33:4: statement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_statement_in_sourceElement95)
+ statement9 = self.statement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statement9.tree)
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 3, sourceElement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "sourceElement"
+
+ class functionDeclaration_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.functionDeclaration_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "functionDeclaration"
+ # JavaScript.g:37:1: functionDeclaration : 'function' ( LT )* Identifier ( LT )* formalParameterList ( LT )* functionBody ;
+ def functionDeclaration(self, ):
+
+ retval = self.functionDeclaration_return()
+ retval.start = self.input.LT(1)
+ functionDeclaration_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal10 = None
+ LT11 = None
+ Identifier12 = None
+ LT13 = None
+ LT15 = None
+ formalParameterList14 = None
+
+ functionBody16 = None
+
+
+ string_literal10_tree = None
+ LT11_tree = None
+ Identifier12_tree = None
+ LT13_tree = None
+ LT15_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 4):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:38:2: ( 'function' ( LT )* Identifier ( LT )* formalParameterList ( LT )* functionBody )
+ # JavaScript.g:38:4: 'function' ( LT )* Identifier ( LT )* formalParameterList ( LT )* functionBody
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal10=self.match(self.input, 31, self.FOLLOW_31_in_functionDeclaration108)
+ if self._state.backtracking == 0:
+
+ string_literal10_tree = self._adaptor.createWithPayload(string_literal10)
+ self._adaptor.addChild(root_0, string_literal10_tree)
+
+ # JavaScript.g:38:17: ( LT )*
+ while True: #loop6
+ alt6 = 2
+ LA6_0 = self.input.LA(1)
+
+ if (LA6_0 == LT) :
+ alt6 = 1
+
+
+ if alt6 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT11=self.match(self.input, LT, self.FOLLOW_LT_in_functionDeclaration110)
+
+
+ else:
+ break #loop6
+ Identifier12=self.match(self.input, Identifier, self.FOLLOW_Identifier_in_functionDeclaration114)
+ if self._state.backtracking == 0:
+
+ Identifier12_tree = self._adaptor.createWithPayload(Identifier12)
+ self._adaptor.addChild(root_0, Identifier12_tree)
+
+ # JavaScript.g:38:33: ( LT )*
+ while True: #loop7
+ alt7 = 2
+ LA7_0 = self.input.LA(1)
+
+ if (LA7_0 == LT) :
+ alt7 = 1
+
+
+ if alt7 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT13=self.match(self.input, LT, self.FOLLOW_LT_in_functionDeclaration116)
+
+
+ else:
+ break #loop7
+ self._state.following.append(self.FOLLOW_formalParameterList_in_functionDeclaration120)
+ formalParameterList14 = self.formalParameterList()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, formalParameterList14.tree)
+ # JavaScript.g:38:58: ( LT )*
+ while True: #loop8
+ alt8 = 2
+ LA8_0 = self.input.LA(1)
+
+ if (LA8_0 == LT) :
+ alt8 = 1
+
+
+ if alt8 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT15=self.match(self.input, LT, self.FOLLOW_LT_in_functionDeclaration122)
+
+
+ else:
+ break #loop8
+ self._state.following.append(self.FOLLOW_functionBody_in_functionDeclaration126)
+ functionBody16 = self.functionBody()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, functionBody16.tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 4, functionDeclaration_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "functionDeclaration"
+
+ class functionExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.functionExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "functionExpression"
+ # JavaScript.g:41:1: functionExpression : 'function' ( LT )* ( Identifier )? ( LT )* formalParameterList ( LT )* functionBody ;
+ def functionExpression(self, ):
+
+ retval = self.functionExpression_return()
+ retval.start = self.input.LT(1)
+ functionExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal17 = None
+ LT18 = None
+ Identifier19 = None
+ LT20 = None
+ LT22 = None
+ formalParameterList21 = None
+
+ functionBody23 = None
+
+
+ string_literal17_tree = None
+ LT18_tree = None
+ Identifier19_tree = None
+ LT20_tree = None
+ LT22_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 5):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:42:2: ( 'function' ( LT )* ( Identifier )? ( LT )* formalParameterList ( LT )* functionBody )
+ # JavaScript.g:42:4: 'function' ( LT )* ( Identifier )? ( LT )* formalParameterList ( LT )* functionBody
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal17=self.match(self.input, 31, self.FOLLOW_31_in_functionExpression138)
+ if self._state.backtracking == 0:
+
+ string_literal17_tree = self._adaptor.createWithPayload(string_literal17)
+ self._adaptor.addChild(root_0, string_literal17_tree)
+
+ # JavaScript.g:42:17: ( LT )*
+ while True: #loop9
+ alt9 = 2
+ LA9_0 = self.input.LA(1)
+
+ if (LA9_0 == LT) :
+ LA9_2 = self.input.LA(2)
+
+ if (self.synpred9_JavaScript()) :
+ alt9 = 1
+
+
+
+
+ if alt9 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT18=self.match(self.input, LT, self.FOLLOW_LT_in_functionExpression140)
+
+
+ else:
+ break #loop9
+ # JavaScript.g:42:20: ( Identifier )?
+ alt10 = 2
+ LA10_0 = self.input.LA(1)
+
+ if (LA10_0 == Identifier) :
+ alt10 = 1
+ if alt10 == 1:
+ # JavaScript.g:0:0: Identifier
+ pass
+ Identifier19=self.match(self.input, Identifier, self.FOLLOW_Identifier_in_functionExpression144)
+ if self._state.backtracking == 0:
+
+ Identifier19_tree = self._adaptor.createWithPayload(Identifier19)
+ self._adaptor.addChild(root_0, Identifier19_tree)
+
+
+
+
+ # JavaScript.g:42:34: ( LT )*
+ while True: #loop11
+ alt11 = 2
+ LA11_0 = self.input.LA(1)
+
+ if (LA11_0 == LT) :
+ alt11 = 1
+
+
+ if alt11 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT20=self.match(self.input, LT, self.FOLLOW_LT_in_functionExpression147)
+
+
+ else:
+ break #loop11
+ self._state.following.append(self.FOLLOW_formalParameterList_in_functionExpression151)
+ formalParameterList21 = self.formalParameterList()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, formalParameterList21.tree)
+ # JavaScript.g:42:59: ( LT )*
+ while True: #loop12
+ alt12 = 2
+ LA12_0 = self.input.LA(1)
+
+ if (LA12_0 == LT) :
+ alt12 = 1
+
+
+ if alt12 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT22=self.match(self.input, LT, self.FOLLOW_LT_in_functionExpression153)
+
+
+ else:
+ break #loop12
+ self._state.following.append(self.FOLLOW_functionBody_in_functionExpression157)
+ functionBody23 = self.functionBody()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, functionBody23.tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 5, functionExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "functionExpression"
+
+ class formalParameterList_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.formalParameterList_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "formalParameterList"
+ # JavaScript.g:45:1: formalParameterList : '(' ( ( LT )* Identifier ( ( LT )* ',' ( LT )* Identifier )* )? ( LT )* ')' ;
+ def formalParameterList(self, ):
+
+ retval = self.formalParameterList_return()
+ retval.start = self.input.LT(1)
+ formalParameterList_StartIndex = self.input.index()
+ root_0 = None
+
+ char_literal24 = None
+ LT25 = None
+ Identifier26 = None
+ LT27 = None
+ char_literal28 = None
+ LT29 = None
+ Identifier30 = None
+ LT31 = None
+ char_literal32 = None
+
+ char_literal24_tree = None
+ LT25_tree = None
+ Identifier26_tree = None
+ LT27_tree = None
+ char_literal28_tree = None
+ LT29_tree = None
+ Identifier30_tree = None
+ LT31_tree = None
+ char_literal32_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 6):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:46:2: ( '(' ( ( LT )* Identifier ( ( LT )* ',' ( LT )* Identifier )* )? ( LT )* ')' )
+ # JavaScript.g:46:4: '(' ( ( LT )* Identifier ( ( LT )* ',' ( LT )* Identifier )* )? ( LT )* ')'
+ pass
+ root_0 = self._adaptor.nil()
+
+ char_literal24=self.match(self.input, 32, self.FOLLOW_32_in_formalParameterList169)
+ if self._state.backtracking == 0:
+
+ char_literal24_tree = self._adaptor.createWithPayload(char_literal24)
+ self._adaptor.addChild(root_0, char_literal24_tree)
+
+ # JavaScript.g:46:8: ( ( LT )* Identifier ( ( LT )* ',' ( LT )* Identifier )* )?
+ alt17 = 2
+ alt17 = self.dfa17.predict(self.input)
+ if alt17 == 1:
+ # JavaScript.g:46:9: ( LT )* Identifier ( ( LT )* ',' ( LT )* Identifier )*
+ pass
+ # JavaScript.g:46:11: ( LT )*
+ while True: #loop13
+ alt13 = 2
+ LA13_0 = self.input.LA(1)
+
+ if (LA13_0 == LT) :
+ alt13 = 1
+
+
+ if alt13 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT25=self.match(self.input, LT, self.FOLLOW_LT_in_formalParameterList172)
+
+
+ else:
+ break #loop13
+ Identifier26=self.match(self.input, Identifier, self.FOLLOW_Identifier_in_formalParameterList176)
+ if self._state.backtracking == 0:
+
+ Identifier26_tree = self._adaptor.createWithPayload(Identifier26)
+ self._adaptor.addChild(root_0, Identifier26_tree)
+
+ # JavaScript.g:46:25: ( ( LT )* ',' ( LT )* Identifier )*
+ while True: #loop16
+ alt16 = 2
+ alt16 = self.dfa16.predict(self.input)
+ if alt16 == 1:
+ # JavaScript.g:46:26: ( LT )* ',' ( LT )* Identifier
+ pass
+ # JavaScript.g:46:28: ( LT )*
+ while True: #loop14
+ alt14 = 2
+ LA14_0 = self.input.LA(1)
+
+ if (LA14_0 == LT) :
+ alt14 = 1
+
+
+ if alt14 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT27=self.match(self.input, LT, self.FOLLOW_LT_in_formalParameterList179)
+
+
+ else:
+ break #loop14
+ char_literal28=self.match(self.input, 33, self.FOLLOW_33_in_formalParameterList183)
+ if self._state.backtracking == 0:
+
+ char_literal28_tree = self._adaptor.createWithPayload(char_literal28)
+ self._adaptor.addChild(root_0, char_literal28_tree)
+
+ # JavaScript.g:46:37: ( LT )*
+ while True: #loop15
+ alt15 = 2
+ LA15_0 = self.input.LA(1)
+
+ if (LA15_0 == LT) :
+ alt15 = 1
+
+
+ if alt15 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT29=self.match(self.input, LT, self.FOLLOW_LT_in_formalParameterList185)
+
+
+ else:
+ break #loop15
+ Identifier30=self.match(self.input, Identifier, self.FOLLOW_Identifier_in_formalParameterList189)
+ if self._state.backtracking == 0:
+
+ Identifier30_tree = self._adaptor.createWithPayload(Identifier30)
+ self._adaptor.addChild(root_0, Identifier30_tree)
+
+
+
+ else:
+ break #loop16
+
+
+
+ # JavaScript.g:46:57: ( LT )*
+ while True: #loop18
+ alt18 = 2
+ LA18_0 = self.input.LA(1)
+
+ if (LA18_0 == LT) :
+ alt18 = 1
+
+
+ if alt18 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT31=self.match(self.input, LT, self.FOLLOW_LT_in_formalParameterList195)
+
+
+ else:
+ break #loop18
+ char_literal32=self.match(self.input, 34, self.FOLLOW_34_in_formalParameterList199)
+ if self._state.backtracking == 0:
+
+ char_literal32_tree = self._adaptor.createWithPayload(char_literal32)
+ self._adaptor.addChild(root_0, char_literal32_tree)
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 6, formalParameterList_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "formalParameterList"
+
+ class functionBody_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.functionBody_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "functionBody"
+ # JavaScript.g:49:1: functionBody : '{' ( LT )* sourceElements ( LT )* '}' ;
+ def functionBody(self, ):
+
+ retval = self.functionBody_return()
+ retval.start = self.input.LT(1)
+ functionBody_StartIndex = self.input.index()
+ root_0 = None
+
+ char_literal33 = None
+ LT34 = None
+ LT36 = None
+ char_literal37 = None
+ sourceElements35 = None
+
+
+ char_literal33_tree = None
+ LT34_tree = None
+ LT36_tree = None
+ char_literal37_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 7):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:50:2: ( '{' ( LT )* sourceElements ( LT )* '}' )
+ # JavaScript.g:50:4: '{' ( LT )* sourceElements ( LT )* '}'
+ pass
+ root_0 = self._adaptor.nil()
+
+ char_literal33=self.match(self.input, 35, self.FOLLOW_35_in_functionBody210)
+ if self._state.backtracking == 0:
+
+ char_literal33_tree = self._adaptor.createWithPayload(char_literal33)
+ self._adaptor.addChild(root_0, char_literal33_tree)
+
+ # JavaScript.g:50:10: ( LT )*
+ while True: #loop19
+ alt19 = 2
+ LA19_0 = self.input.LA(1)
+
+ if (LA19_0 == LT) :
+ alt19 = 1
+
+
+ if alt19 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT34=self.match(self.input, LT, self.FOLLOW_LT_in_functionBody212)
+
+
+ else:
+ break #loop19
+ self._state.following.append(self.FOLLOW_sourceElements_in_functionBody216)
+ sourceElements35 = self.sourceElements()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, sourceElements35.tree)
+ # JavaScript.g:50:30: ( LT )*
+ while True: #loop20
+ alt20 = 2
+ LA20_0 = self.input.LA(1)
+
+ if (LA20_0 == LT) :
+ alt20 = 1
+
+
+ if alt20 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT36=self.match(self.input, LT, self.FOLLOW_LT_in_functionBody218)
+
+
+ else:
+ break #loop20
+ char_literal37=self.match(self.input, 36, self.FOLLOW_36_in_functionBody222)
+ if self._state.backtracking == 0:
+
+ char_literal37_tree = self._adaptor.createWithPayload(char_literal37)
+ self._adaptor.addChild(root_0, char_literal37_tree)
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 7, functionBody_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "functionBody"
+
+ class statement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.statement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "statement"
+ # JavaScript.g:54:1: statement : ( statementBlock | variableStatement | emptyStatement | expressionStatement | ifStatement | iterationStatement | continueStatement | breakStatement | returnStatement | withStatement | labelledStatement | switchStatement | throwStatement | tryStatement );
+ def statement(self, ):
+
+ retval = self.statement_return()
+ retval.start = self.input.LT(1)
+ statement_StartIndex = self.input.index()
+ root_0 = None
+
+ statementBlock38 = None
+
+ variableStatement39 = None
+
+ emptyStatement40 = None
+
+ expressionStatement41 = None
+
+ ifStatement42 = None
+
+ iterationStatement43 = None
+
+ continueStatement44 = None
+
+ breakStatement45 = None
+
+ returnStatement46 = None
+
+ withStatement47 = None
+
+ labelledStatement48 = None
+
+ switchStatement49 = None
+
+ throwStatement50 = None
+
+ tryStatement51 = None
+
+
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 8):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:55:2: ( statementBlock | variableStatement | emptyStatement | expressionStatement | ifStatement | iterationStatement | continueStatement | breakStatement | returnStatement | withStatement | labelledStatement | switchStatement | throwStatement | tryStatement )
+ alt21 = 14
+ alt21 = self.dfa21.predict(self.input)
+ if alt21 == 1:
+ # JavaScript.g:55:4: statementBlock
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_statementBlock_in_statement234)
+ statementBlock38 = self.statementBlock()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statementBlock38.tree)
+
+
+ elif alt21 == 2:
+ # JavaScript.g:56:4: variableStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_variableStatement_in_statement239)
+ variableStatement39 = self.variableStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, variableStatement39.tree)
+
+
+ elif alt21 == 3:
+ # JavaScript.g:57:4: emptyStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_emptyStatement_in_statement244)
+ emptyStatement40 = self.emptyStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, emptyStatement40.tree)
+
+
+ elif alt21 == 4:
+ # JavaScript.g:58:4: expressionStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_expressionStatement_in_statement249)
+ expressionStatement41 = self.expressionStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expressionStatement41.tree)
+
+
+ elif alt21 == 5:
+ # JavaScript.g:59:4: ifStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_ifStatement_in_statement254)
+ ifStatement42 = self.ifStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, ifStatement42.tree)
+
+
+ elif alt21 == 6:
+ # JavaScript.g:60:4: iterationStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_iterationStatement_in_statement259)
+ iterationStatement43 = self.iterationStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, iterationStatement43.tree)
+
+
+ elif alt21 == 7:
+ # JavaScript.g:61:4: continueStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_continueStatement_in_statement264)
+ continueStatement44 = self.continueStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, continueStatement44.tree)
+
+
+ elif alt21 == 8:
+ # JavaScript.g:62:4: breakStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_breakStatement_in_statement269)
+ breakStatement45 = self.breakStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, breakStatement45.tree)
+
+
+ elif alt21 == 9:
+ # JavaScript.g:63:4: returnStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_returnStatement_in_statement274)
+ returnStatement46 = self.returnStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, returnStatement46.tree)
+
+
+ elif alt21 == 10:
+ # JavaScript.g:64:4: withStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_withStatement_in_statement279)
+ withStatement47 = self.withStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, withStatement47.tree)
+
+
+ elif alt21 == 11:
+ # JavaScript.g:65:4: labelledStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_labelledStatement_in_statement284)
+ labelledStatement48 = self.labelledStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, labelledStatement48.tree)
+
+
+ elif alt21 == 12:
+ # JavaScript.g:66:4: switchStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_switchStatement_in_statement289)
+ switchStatement49 = self.switchStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, switchStatement49.tree)
+
+
+ elif alt21 == 13:
+ # JavaScript.g:67:4: throwStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_throwStatement_in_statement294)
+ throwStatement50 = self.throwStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, throwStatement50.tree)
+
+
+ elif alt21 == 14:
+ # JavaScript.g:68:4: tryStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_tryStatement_in_statement299)
+ tryStatement51 = self.tryStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, tryStatement51.tree)
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 8, statement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "statement"
+
+ class statementBlock_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.statementBlock_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "statementBlock"
+ # JavaScript.g:71:1: statementBlock : '{' ( LT )* ( statementList )? ( LT )* '}' ;
+ def statementBlock(self, ):
+
+ retval = self.statementBlock_return()
+ retval.start = self.input.LT(1)
+ statementBlock_StartIndex = self.input.index()
+ root_0 = None
+
+ char_literal52 = None
+ LT53 = None
+ LT55 = None
+ char_literal56 = None
+ statementList54 = None
+
+
+ char_literal52_tree = None
+ LT53_tree = None
+ LT55_tree = None
+ char_literal56_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 9):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:72:2: ( '{' ( LT )* ( statementList )? ( LT )* '}' )
+ # JavaScript.g:72:4: '{' ( LT )* ( statementList )? ( LT )* '}'
+ pass
+ root_0 = self._adaptor.nil()
+
+ char_literal52=self.match(self.input, 35, self.FOLLOW_35_in_statementBlock311)
+ if self._state.backtracking == 0:
+
+ char_literal52_tree = self._adaptor.createWithPayload(char_literal52)
+ self._adaptor.addChild(root_0, char_literal52_tree)
+
+ # JavaScript.g:72:10: ( LT )*
+ while True: #loop22
+ alt22 = 2
+ LA22_0 = self.input.LA(1)
+
+ if (LA22_0 == LT) :
+ LA22_2 = self.input.LA(2)
+
+ if (self.synpred34_JavaScript()) :
+ alt22 = 1
+
+
+
+
+ if alt22 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT53=self.match(self.input, LT, self.FOLLOW_LT_in_statementBlock313)
+
+
+ else:
+ break #loop22
+ # JavaScript.g:72:13: ( statementList )?
+ alt23 = 2
+ LA23_0 = self.input.LA(1)
+
+ if ((Identifier <= LA23_0 <= NumericLiteral) or (31 <= LA23_0 <= 32) or LA23_0 == 35 or (37 <= LA23_0 <= 38) or LA23_0 == 40 or (42 <= LA23_0 <= 44) or (46 <= LA23_0 <= 49) or LA23_0 == 51 or (54 <= LA23_0 <= 55) or (58 <= LA23_0 <= 59) or (91 <= LA23_0 <= 92) or (96 <= LA23_0 <= 106)) :
+ alt23 = 1
+ if alt23 == 1:
+ # JavaScript.g:0:0: statementList
+ pass
+ self._state.following.append(self.FOLLOW_statementList_in_statementBlock317)
+ statementList54 = self.statementList()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statementList54.tree)
+
+
+
+ # JavaScript.g:72:30: ( LT )*
+ while True: #loop24
+ alt24 = 2
+ LA24_0 = self.input.LA(1)
+
+ if (LA24_0 == LT) :
+ alt24 = 1
+
+
+ if alt24 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT55=self.match(self.input, LT, self.FOLLOW_LT_in_statementBlock320)
+
+
+ else:
+ break #loop24
+ char_literal56=self.match(self.input, 36, self.FOLLOW_36_in_statementBlock324)
+ if self._state.backtracking == 0:
+
+ char_literal56_tree = self._adaptor.createWithPayload(char_literal56)
+ self._adaptor.addChild(root_0, char_literal56_tree)
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 9, statementBlock_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "statementBlock"
+
+ class statementList_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.statementList_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "statementList"
+ # JavaScript.g:75:1: statementList : statement ( ( LT )* statement )* ;
+ def statementList(self, ):
+
+ retval = self.statementList_return()
+ retval.start = self.input.LT(1)
+ statementList_StartIndex = self.input.index()
+ root_0 = None
+
+ LT58 = None
+ statement57 = None
+
+ statement59 = None
+
+
+ LT58_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 10):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:76:2: ( statement ( ( LT )* statement )* )
+ # JavaScript.g:76:4: statement ( ( LT )* statement )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_statement_in_statementList336)
+ statement57 = self.statement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statement57.tree)
+ # JavaScript.g:76:14: ( ( LT )* statement )*
+ while True: #loop26
+ alt26 = 2
+ alt26 = self.dfa26.predict(self.input)
+ if alt26 == 1:
+ # JavaScript.g:76:15: ( LT )* statement
+ pass
+ # JavaScript.g:76:17: ( LT )*
+ while True: #loop25
+ alt25 = 2
+ LA25_0 = self.input.LA(1)
+
+ if (LA25_0 == LT) :
+ alt25 = 1
+
+
+ if alt25 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT58=self.match(self.input, LT, self.FOLLOW_LT_in_statementList339)
+
+
+ else:
+ break #loop25
+ self._state.following.append(self.FOLLOW_statement_in_statementList343)
+ statement59 = self.statement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statement59.tree)
+
+
+ else:
+ break #loop26
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 10, statementList_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "statementList"
+
+ class variableStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.variableStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "variableStatement"
+ # JavaScript.g:79:1: variableStatement : 'var' ( LT )* variableDeclarationList ( LT | ';' ) ;
+ def variableStatement(self, ):
+
+ retval = self.variableStatement_return()
+ retval.start = self.input.LT(1)
+ variableStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal60 = None
+ LT61 = None
+ set63 = None
+ variableDeclarationList62 = None
+
+
+ string_literal60_tree = None
+ LT61_tree = None
+ set63_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 11):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:80:2: ( 'var' ( LT )* variableDeclarationList ( LT | ';' ) )
+ # JavaScript.g:80:4: 'var' ( LT )* variableDeclarationList ( LT | ';' )
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal60=self.match(self.input, 37, self.FOLLOW_37_in_variableStatement357)
+ if self._state.backtracking == 0:
+
+ string_literal60_tree = self._adaptor.createWithPayload(string_literal60)
+ self._adaptor.addChild(root_0, string_literal60_tree)
+
+ # JavaScript.g:80:12: ( LT )*
+ while True: #loop27
+ alt27 = 2
+ LA27_0 = self.input.LA(1)
+
+ if (LA27_0 == LT) :
+ alt27 = 1
+
+
+ if alt27 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT61=self.match(self.input, LT, self.FOLLOW_LT_in_variableStatement359)
+
+
+ else:
+ break #loop27
+ self._state.following.append(self.FOLLOW_variableDeclarationList_in_variableStatement363)
+ variableDeclarationList62 = self.variableDeclarationList()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, variableDeclarationList62.tree)
+ set63 = self.input.LT(1)
+ if self.input.LA(1) == LT or self.input.LA(1) == 38:
+ self.input.consume()
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 11, variableStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "variableStatement"
+
+ class variableDeclarationList_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.variableDeclarationList_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "variableDeclarationList"
+ # JavaScript.g:83:1: variableDeclarationList : variableDeclaration ( ( LT )* ',' ( LT )* variableDeclaration )* ;
+ def variableDeclarationList(self, ):
+
+ retval = self.variableDeclarationList_return()
+ retval.start = self.input.LT(1)
+ variableDeclarationList_StartIndex = self.input.index()
+ root_0 = None
+
+ LT65 = None
+ char_literal66 = None
+ LT67 = None
+ variableDeclaration64 = None
+
+ variableDeclaration68 = None
+
+
+ LT65_tree = None
+ char_literal66_tree = None
+ LT67_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 12):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:84:2: ( variableDeclaration ( ( LT )* ',' ( LT )* variableDeclaration )* )
+ # JavaScript.g:84:4: variableDeclaration ( ( LT )* ',' ( LT )* variableDeclaration )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_variableDeclaration_in_variableDeclarationList384)
+ variableDeclaration64 = self.variableDeclaration()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, variableDeclaration64.tree)
+ # JavaScript.g:84:24: ( ( LT )* ',' ( LT )* variableDeclaration )*
+ while True: #loop30
+ alt30 = 2
+ alt30 = self.dfa30.predict(self.input)
+ if alt30 == 1:
+ # JavaScript.g:84:25: ( LT )* ',' ( LT )* variableDeclaration
+ pass
+ # JavaScript.g:84:27: ( LT )*
+ while True: #loop28
+ alt28 = 2
+ LA28_0 = self.input.LA(1)
+
+ if (LA28_0 == LT) :
+ alt28 = 1
+
+
+ if alt28 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT65=self.match(self.input, LT, self.FOLLOW_LT_in_variableDeclarationList387)
+
+
+ else:
+ break #loop28
+ char_literal66=self.match(self.input, 33, self.FOLLOW_33_in_variableDeclarationList391)
+ if self._state.backtracking == 0:
+
+ char_literal66_tree = self._adaptor.createWithPayload(char_literal66)
+ self._adaptor.addChild(root_0, char_literal66_tree)
+
+ # JavaScript.g:84:36: ( LT )*
+ while True: #loop29
+ alt29 = 2
+ LA29_0 = self.input.LA(1)
+
+ if (LA29_0 == LT) :
+ alt29 = 1
+
+
+ if alt29 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT67=self.match(self.input, LT, self.FOLLOW_LT_in_variableDeclarationList393)
+
+
+ else:
+ break #loop29
+ self._state.following.append(self.FOLLOW_variableDeclaration_in_variableDeclarationList397)
+ variableDeclaration68 = self.variableDeclaration()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, variableDeclaration68.tree)
+
+
+ else:
+ break #loop30
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 12, variableDeclarationList_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "variableDeclarationList"
+
+ class variableDeclarationListNoIn_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.variableDeclarationListNoIn_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "variableDeclarationListNoIn"
+ # JavaScript.g:87:1: variableDeclarationListNoIn : variableDeclarationNoIn ( ( LT )* ',' ( LT )* variableDeclarationNoIn )* ;
+ def variableDeclarationListNoIn(self, ):
+
+ retval = self.variableDeclarationListNoIn_return()
+ retval.start = self.input.LT(1)
+ variableDeclarationListNoIn_StartIndex = self.input.index()
+ root_0 = None
+
+ LT70 = None
+ char_literal71 = None
+ LT72 = None
+ variableDeclarationNoIn69 = None
+
+ variableDeclarationNoIn73 = None
+
+
+ LT70_tree = None
+ char_literal71_tree = None
+ LT72_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 13):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:88:2: ( variableDeclarationNoIn ( ( LT )* ',' ( LT )* variableDeclarationNoIn )* )
+ # JavaScript.g:88:4: variableDeclarationNoIn ( ( LT )* ',' ( LT )* variableDeclarationNoIn )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_variableDeclarationNoIn_in_variableDeclarationListNoIn411)
+ variableDeclarationNoIn69 = self.variableDeclarationNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, variableDeclarationNoIn69.tree)
+ # JavaScript.g:88:28: ( ( LT )* ',' ( LT )* variableDeclarationNoIn )*
+ while True: #loop33
+ alt33 = 2
+ alt33 = self.dfa33.predict(self.input)
+ if alt33 == 1:
+ # JavaScript.g:88:29: ( LT )* ',' ( LT )* variableDeclarationNoIn
+ pass
+ # JavaScript.g:88:31: ( LT )*
+ while True: #loop31
+ alt31 = 2
+ LA31_0 = self.input.LA(1)
+
+ if (LA31_0 == LT) :
+ alt31 = 1
+
+
+ if alt31 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT70=self.match(self.input, LT, self.FOLLOW_LT_in_variableDeclarationListNoIn414)
+
+
+ else:
+ break #loop31
+ char_literal71=self.match(self.input, 33, self.FOLLOW_33_in_variableDeclarationListNoIn418)
+ if self._state.backtracking == 0:
+
+ char_literal71_tree = self._adaptor.createWithPayload(char_literal71)
+ self._adaptor.addChild(root_0, char_literal71_tree)
+
+ # JavaScript.g:88:40: ( LT )*
+ while True: #loop32
+ alt32 = 2
+ LA32_0 = self.input.LA(1)
+
+ if (LA32_0 == LT) :
+ alt32 = 1
+
+
+ if alt32 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT72=self.match(self.input, LT, self.FOLLOW_LT_in_variableDeclarationListNoIn420)
+
+
+ else:
+ break #loop32
+ self._state.following.append(self.FOLLOW_variableDeclarationNoIn_in_variableDeclarationListNoIn424)
+ variableDeclarationNoIn73 = self.variableDeclarationNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, variableDeclarationNoIn73.tree)
+
+
+ else:
+ break #loop33
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 13, variableDeclarationListNoIn_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "variableDeclarationListNoIn"
+
+ class variableDeclaration_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.variableDeclaration_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "variableDeclaration"
+ # JavaScript.g:91:1: variableDeclaration : Identifier ( LT )* ( initialiser )? ;
+ def variableDeclaration(self, ):
+
+ retval = self.variableDeclaration_return()
+ retval.start = self.input.LT(1)
+ variableDeclaration_StartIndex = self.input.index()
+ root_0 = None
+
+ Identifier74 = None
+ LT75 = None
+ initialiser76 = None
+
+
+ Identifier74_tree = None
+ LT75_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 14):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:92:2: ( Identifier ( LT )* ( initialiser )? )
+ # JavaScript.g:92:4: Identifier ( LT )* ( initialiser )?
+ pass
+ root_0 = self._adaptor.nil()
+
+ Identifier74=self.match(self.input, Identifier, self.FOLLOW_Identifier_in_variableDeclaration438)
+ if self._state.backtracking == 0:
+
+ Identifier74_tree = self._adaptor.createWithPayload(Identifier74)
+ self._adaptor.addChild(root_0, Identifier74_tree)
+
+ # JavaScript.g:92:17: ( LT )*
+ while True: #loop34
+ alt34 = 2
+ LA34_0 = self.input.LA(1)
+
+ if (LA34_0 == LT) :
+ LA34_2 = self.input.LA(2)
+
+ if (self.synpred47_JavaScript()) :
+ alt34 = 1
+
+
+
+
+ if alt34 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT75=self.match(self.input, LT, self.FOLLOW_LT_in_variableDeclaration440)
+
+
+ else:
+ break #loop34
+ # JavaScript.g:92:20: ( initialiser )?
+ alt35 = 2
+ LA35_0 = self.input.LA(1)
+
+ if (LA35_0 == 39) :
+ alt35 = 1
+ if alt35 == 1:
+ # JavaScript.g:0:0: initialiser
+ pass
+ self._state.following.append(self.FOLLOW_initialiser_in_variableDeclaration444)
+ initialiser76 = self.initialiser()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, initialiser76.tree)
+
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 14, variableDeclaration_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "variableDeclaration"
+
+ class variableDeclarationNoIn_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.variableDeclarationNoIn_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "variableDeclarationNoIn"
+ # JavaScript.g:95:1: variableDeclarationNoIn : Identifier ( LT )* ( initialiserNoIn )? ;
+ def variableDeclarationNoIn(self, ):
+
+ retval = self.variableDeclarationNoIn_return()
+ retval.start = self.input.LT(1)
+ variableDeclarationNoIn_StartIndex = self.input.index()
+ root_0 = None
+
+ Identifier77 = None
+ LT78 = None
+ initialiserNoIn79 = None
+
+
+ Identifier77_tree = None
+ LT78_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 15):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:96:2: ( Identifier ( LT )* ( initialiserNoIn )? )
+ # JavaScript.g:96:4: Identifier ( LT )* ( initialiserNoIn )?
+ pass
+ root_0 = self._adaptor.nil()
+
+ Identifier77=self.match(self.input, Identifier, self.FOLLOW_Identifier_in_variableDeclarationNoIn457)
+ if self._state.backtracking == 0:
+
+ Identifier77_tree = self._adaptor.createWithPayload(Identifier77)
+ self._adaptor.addChild(root_0, Identifier77_tree)
+
+ # JavaScript.g:96:17: ( LT )*
+ while True: #loop36
+ alt36 = 2
+ LA36_0 = self.input.LA(1)
+
+ if (LA36_0 == LT) :
+ LA36_2 = self.input.LA(2)
+
+ if (self.synpred49_JavaScript()) :
+ alt36 = 1
+
+
+
+
+ if alt36 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT78=self.match(self.input, LT, self.FOLLOW_LT_in_variableDeclarationNoIn459)
+
+
+ else:
+ break #loop36
+ # JavaScript.g:96:20: ( initialiserNoIn )?
+ alt37 = 2
+ LA37_0 = self.input.LA(1)
+
+ if (LA37_0 == 39) :
+ alt37 = 1
+ if alt37 == 1:
+ # JavaScript.g:0:0: initialiserNoIn
+ pass
+ self._state.following.append(self.FOLLOW_initialiserNoIn_in_variableDeclarationNoIn463)
+ initialiserNoIn79 = self.initialiserNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, initialiserNoIn79.tree)
+
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 15, variableDeclarationNoIn_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "variableDeclarationNoIn"
+
+ class initialiser_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.initialiser_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "initialiser"
+ # JavaScript.g:99:1: initialiser : '=' ( LT )* assignmentExpression ;
+ def initialiser(self, ):
+
+ retval = self.initialiser_return()
+ retval.start = self.input.LT(1)
+ initialiser_StartIndex = self.input.index()
+ root_0 = None
+
+ char_literal80 = None
+ LT81 = None
+ assignmentExpression82 = None
+
+
+ char_literal80_tree = None
+ LT81_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 16):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:100:2: ( '=' ( LT )* assignmentExpression )
+ # JavaScript.g:100:4: '=' ( LT )* assignmentExpression
+ pass
+ root_0 = self._adaptor.nil()
+
+ char_literal80=self.match(self.input, 39, self.FOLLOW_39_in_initialiser476)
+ if self._state.backtracking == 0:
+
+ char_literal80_tree = self._adaptor.createWithPayload(char_literal80)
+ self._adaptor.addChild(root_0, char_literal80_tree)
+
+ # JavaScript.g:100:10: ( LT )*
+ while True: #loop38
+ alt38 = 2
+ LA38_0 = self.input.LA(1)
+
+ if (LA38_0 == LT) :
+ alt38 = 1
+
+
+ if alt38 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT81=self.match(self.input, LT, self.FOLLOW_LT_in_initialiser478)
+
+
+ else:
+ break #loop38
+ self._state.following.append(self.FOLLOW_assignmentExpression_in_initialiser482)
+ assignmentExpression82 = self.assignmentExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpression82.tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 16, initialiser_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "initialiser"
+
+ class initialiserNoIn_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.initialiserNoIn_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "initialiserNoIn"
+ # JavaScript.g:103:1: initialiserNoIn : '=' ( LT )* assignmentExpressionNoIn ;
+ def initialiserNoIn(self, ):
+
+ retval = self.initialiserNoIn_return()
+ retval.start = self.input.LT(1)
+ initialiserNoIn_StartIndex = self.input.index()
+ root_0 = None
+
+ char_literal83 = None
+ LT84 = None
+ assignmentExpressionNoIn85 = None
+
+
+ char_literal83_tree = None
+ LT84_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 17):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:104:2: ( '=' ( LT )* assignmentExpressionNoIn )
+ # JavaScript.g:104:4: '=' ( LT )* assignmentExpressionNoIn
+ pass
+ root_0 = self._adaptor.nil()
+
+ char_literal83=self.match(self.input, 39, self.FOLLOW_39_in_initialiserNoIn494)
+ if self._state.backtracking == 0:
+
+ char_literal83_tree = self._adaptor.createWithPayload(char_literal83)
+ self._adaptor.addChild(root_0, char_literal83_tree)
+
+ # JavaScript.g:104:10: ( LT )*
+ while True: #loop39
+ alt39 = 2
+ LA39_0 = self.input.LA(1)
+
+ if (LA39_0 == LT) :
+ alt39 = 1
+
+
+ if alt39 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT84=self.match(self.input, LT, self.FOLLOW_LT_in_initialiserNoIn496)
+
+
+ else:
+ break #loop39
+ self._state.following.append(self.FOLLOW_assignmentExpressionNoIn_in_initialiserNoIn500)
+ assignmentExpressionNoIn85 = self.assignmentExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpressionNoIn85.tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 17, initialiserNoIn_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "initialiserNoIn"
+
+ class emptyStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.emptyStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "emptyStatement"
+ # JavaScript.g:107:1: emptyStatement : ';' ;
+ def emptyStatement(self, ):
+
+ retval = self.emptyStatement_return()
+ retval.start = self.input.LT(1)
+ emptyStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ char_literal86 = None
+
+ char_literal86_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 18):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:108:2: ( ';' )
+ # JavaScript.g:108:4: ';'
+ pass
+ root_0 = self._adaptor.nil()
+
+ char_literal86=self.match(self.input, 38, self.FOLLOW_38_in_emptyStatement512)
+ if self._state.backtracking == 0:
+
+ char_literal86_tree = self._adaptor.createWithPayload(char_literal86)
+ self._adaptor.addChild(root_0, char_literal86_tree)
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 18, emptyStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "emptyStatement"
+
+ class expressionStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.expressionStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "expressionStatement"
+ # JavaScript.g:111:1: expressionStatement : expression ( LT | ';' ) ;
+ def expressionStatement(self, ):
+
+ retval = self.expressionStatement_return()
+ retval.start = self.input.LT(1)
+ expressionStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ set88 = None
+ expression87 = None
+
+
+ set88_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 19):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:112:2: ( expression ( LT | ';' ) )
+ # JavaScript.g:112:4: expression ( LT | ';' )
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_expression_in_expressionStatement524)
+ expression87 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression87.tree)
+ set88 = self.input.LT(1)
+ if self.input.LA(1) == LT or self.input.LA(1) == 38:
+ self.input.consume()
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 19, expressionStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "expressionStatement"
+
+ class ifStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.ifStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "ifStatement"
+ # JavaScript.g:115:1: ifStatement : 'if' ( LT )* '(' ( LT )* expression ( LT )* ')' ( LT )* statement ( ( LT )* 'else' ( LT )* statement )? ;
+ def ifStatement(self, ):
+
+ retval = self.ifStatement_return()
+ retval.start = self.input.LT(1)
+ ifStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal89 = None
+ LT90 = None
+ char_literal91 = None
+ LT92 = None
+ LT94 = None
+ char_literal95 = None
+ LT96 = None
+ LT98 = None
+ string_literal99 = None
+ LT100 = None
+ expression93 = None
+
+ statement97 = None
+
+ statement101 = None
+
+
+ string_literal89_tree = None
+ LT90_tree = None
+ char_literal91_tree = None
+ LT92_tree = None
+ LT94_tree = None
+ char_literal95_tree = None
+ LT96_tree = None
+ LT98_tree = None
+ string_literal99_tree = None
+ LT100_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 20):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:116:2: ( 'if' ( LT )* '(' ( LT )* expression ( LT )* ')' ( LT )* statement ( ( LT )* 'else' ( LT )* statement )? )
+ # JavaScript.g:116:4: 'if' ( LT )* '(' ( LT )* expression ( LT )* ')' ( LT )* statement ( ( LT )* 'else' ( LT )* statement )?
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal89=self.match(self.input, 40, self.FOLLOW_40_in_ifStatement545)
+ if self._state.backtracking == 0:
+
+ string_literal89_tree = self._adaptor.createWithPayload(string_literal89)
+ self._adaptor.addChild(root_0, string_literal89_tree)
+
+ # JavaScript.g:116:11: ( LT )*
+ while True: #loop40
+ alt40 = 2
+ LA40_0 = self.input.LA(1)
+
+ if (LA40_0 == LT) :
+ alt40 = 1
+
+
+ if alt40 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT90=self.match(self.input, LT, self.FOLLOW_LT_in_ifStatement547)
+
+
+ else:
+ break #loop40
+ char_literal91=self.match(self.input, 32, self.FOLLOW_32_in_ifStatement551)
+ if self._state.backtracking == 0:
+
+ char_literal91_tree = self._adaptor.createWithPayload(char_literal91)
+ self._adaptor.addChild(root_0, char_literal91_tree)
+
+ # JavaScript.g:116:20: ( LT )*
+ while True: #loop41
+ alt41 = 2
+ LA41_0 = self.input.LA(1)
+
+ if (LA41_0 == LT) :
+ alt41 = 1
+
+
+ if alt41 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT92=self.match(self.input, LT, self.FOLLOW_LT_in_ifStatement553)
+
+
+ else:
+ break #loop41
+ self._state.following.append(self.FOLLOW_expression_in_ifStatement557)
+ expression93 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression93.tree)
+ # JavaScript.g:116:36: ( LT )*
+ while True: #loop42
+ alt42 = 2
+ LA42_0 = self.input.LA(1)
+
+ if (LA42_0 == LT) :
+ alt42 = 1
+
+
+ if alt42 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT94=self.match(self.input, LT, self.FOLLOW_LT_in_ifStatement559)
+
+
+ else:
+ break #loop42
+ char_literal95=self.match(self.input, 34, self.FOLLOW_34_in_ifStatement563)
+ if self._state.backtracking == 0:
+
+ char_literal95_tree = self._adaptor.createWithPayload(char_literal95)
+ self._adaptor.addChild(root_0, char_literal95_tree)
+
+ # JavaScript.g:116:45: ( LT )*
+ while True: #loop43
+ alt43 = 2
+ LA43_0 = self.input.LA(1)
+
+ if (LA43_0 == LT) :
+ alt43 = 1
+
+
+ if alt43 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT96=self.match(self.input, LT, self.FOLLOW_LT_in_ifStatement565)
+
+
+ else:
+ break #loop43
+ self._state.following.append(self.FOLLOW_statement_in_ifStatement569)
+ statement97 = self.statement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statement97.tree)
+ # JavaScript.g:116:58: ( ( LT )* 'else' ( LT )* statement )?
+ alt46 = 2
+ LA46_0 = self.input.LA(1)
+
+ if (LA46_0 == LT) :
+ LA46_1 = self.input.LA(2)
+
+ if (self.synpred60_JavaScript()) :
+ alt46 = 1
+ elif (LA46_0 == 41) :
+ LA46_2 = self.input.LA(2)
+
+ if (self.synpred60_JavaScript()) :
+ alt46 = 1
+ if alt46 == 1:
+ # JavaScript.g:116:59: ( LT )* 'else' ( LT )* statement
+ pass
+ # JavaScript.g:116:61: ( LT )*
+ while True: #loop44
+ alt44 = 2
+ LA44_0 = self.input.LA(1)
+
+ if (LA44_0 == LT) :
+ alt44 = 1
+
+
+ if alt44 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT98=self.match(self.input, LT, self.FOLLOW_LT_in_ifStatement572)
+
+
+ else:
+ break #loop44
+ string_literal99=self.match(self.input, 41, self.FOLLOW_41_in_ifStatement576)
+ if self._state.backtracking == 0:
+
+ string_literal99_tree = self._adaptor.createWithPayload(string_literal99)
+ self._adaptor.addChild(root_0, string_literal99_tree)
+
+ # JavaScript.g:116:73: ( LT )*
+ while True: #loop45
+ alt45 = 2
+ LA45_0 = self.input.LA(1)
+
+ if (LA45_0 == LT) :
+ alt45 = 1
+
+
+ if alt45 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT100=self.match(self.input, LT, self.FOLLOW_LT_in_ifStatement578)
+
+
+ else:
+ break #loop45
+ self._state.following.append(self.FOLLOW_statement_in_ifStatement582)
+ statement101 = self.statement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statement101.tree)
+
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 20, ifStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "ifStatement"
+
+ class iterationStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.iterationStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "iterationStatement"
+ # JavaScript.g:119:1: iterationStatement : ( doWhileStatement | whileStatement | forStatement | forInStatement );
+ def iterationStatement(self, ):
+
+ retval = self.iterationStatement_return()
+ retval.start = self.input.LT(1)
+ iterationStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ doWhileStatement102 = None
+
+ whileStatement103 = None
+
+ forStatement104 = None
+
+ forInStatement105 = None
+
+
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 21):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:120:2: ( doWhileStatement | whileStatement | forStatement | forInStatement )
+ alt47 = 4
+ LA47 = self.input.LA(1)
+ if LA47 == 42:
+ alt47 = 1
+ elif LA47 == 43:
+ alt47 = 2
+ elif LA47 == 44:
+ LA47_3 = self.input.LA(2)
+
+ if (self.synpred63_JavaScript()) :
+ alt47 = 3
+ elif (True) :
+ alt47 = 4
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 47, 3, self.input)
+
+ raise nvae
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 47, 0, self.input)
+
+ raise nvae
+
+ if alt47 == 1:
+ # JavaScript.g:120:4: doWhileStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_doWhileStatement_in_iterationStatement596)
+ doWhileStatement102 = self.doWhileStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, doWhileStatement102.tree)
+
+
+ elif alt47 == 2:
+ # JavaScript.g:121:4: whileStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_whileStatement_in_iterationStatement601)
+ whileStatement103 = self.whileStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, whileStatement103.tree)
+
+
+ elif alt47 == 3:
+ # JavaScript.g:122:4: forStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_forStatement_in_iterationStatement606)
+ forStatement104 = self.forStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, forStatement104.tree)
+
+
+ elif alt47 == 4:
+ # JavaScript.g:123:4: forInStatement
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_forInStatement_in_iterationStatement611)
+ forInStatement105 = self.forInStatement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, forInStatement105.tree)
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 21, iterationStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "iterationStatement"
+
+ class doWhileStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.doWhileStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "doWhileStatement"
+ # JavaScript.g:126:1: doWhileStatement : 'do' ( LT )* statement ( LT )* 'while' ( LT )* '(' expression ')' ( LT | ';' ) ;
+ def doWhileStatement(self, ):
+
+ retval = self.doWhileStatement_return()
+ retval.start = self.input.LT(1)
+ doWhileStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal106 = None
+ LT107 = None
+ LT109 = None
+ string_literal110 = None
+ LT111 = None
+ char_literal112 = None
+ char_literal114 = None
+ set115 = None
+ statement108 = None
+
+ expression113 = None
+
+
+ string_literal106_tree = None
+ LT107_tree = None
+ LT109_tree = None
+ string_literal110_tree = None
+ LT111_tree = None
+ char_literal112_tree = None
+ char_literal114_tree = None
+ set115_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 22):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:127:2: ( 'do' ( LT )* statement ( LT )* 'while' ( LT )* '(' expression ')' ( LT | ';' ) )
+ # JavaScript.g:127:4: 'do' ( LT )* statement ( LT )* 'while' ( LT )* '(' expression ')' ( LT | ';' )
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal106=self.match(self.input, 42, self.FOLLOW_42_in_doWhileStatement623)
+ if self._state.backtracking == 0:
+
+ string_literal106_tree = self._adaptor.createWithPayload(string_literal106)
+ self._adaptor.addChild(root_0, string_literal106_tree)
+
+ # JavaScript.g:127:11: ( LT )*
+ while True: #loop48
+ alt48 = 2
+ LA48_0 = self.input.LA(1)
+
+ if (LA48_0 == LT) :
+ alt48 = 1
+
+
+ if alt48 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT107=self.match(self.input, LT, self.FOLLOW_LT_in_doWhileStatement625)
+
+
+ else:
+ break #loop48
+ self._state.following.append(self.FOLLOW_statement_in_doWhileStatement629)
+ statement108 = self.statement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statement108.tree)
+ # JavaScript.g:127:26: ( LT )*
+ while True: #loop49
+ alt49 = 2
+ LA49_0 = self.input.LA(1)
+
+ if (LA49_0 == LT) :
+ alt49 = 1
+
+
+ if alt49 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT109=self.match(self.input, LT, self.FOLLOW_LT_in_doWhileStatement631)
+
+
+ else:
+ break #loop49
+ string_literal110=self.match(self.input, 43, self.FOLLOW_43_in_doWhileStatement635)
+ if self._state.backtracking == 0:
+
+ string_literal110_tree = self._adaptor.createWithPayload(string_literal110)
+ self._adaptor.addChild(root_0, string_literal110_tree)
+
+ # JavaScript.g:127:39: ( LT )*
+ while True: #loop50
+ alt50 = 2
+ LA50_0 = self.input.LA(1)
+
+ if (LA50_0 == LT) :
+ alt50 = 1
+
+
+ if alt50 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT111=self.match(self.input, LT, self.FOLLOW_LT_in_doWhileStatement637)
+
+
+ else:
+ break #loop50
+ char_literal112=self.match(self.input, 32, self.FOLLOW_32_in_doWhileStatement641)
+ if self._state.backtracking == 0:
+
+ char_literal112_tree = self._adaptor.createWithPayload(char_literal112)
+ self._adaptor.addChild(root_0, char_literal112_tree)
+
+ self._state.following.append(self.FOLLOW_expression_in_doWhileStatement643)
+ expression113 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression113.tree)
+ char_literal114=self.match(self.input, 34, self.FOLLOW_34_in_doWhileStatement645)
+ if self._state.backtracking == 0:
+
+ char_literal114_tree = self._adaptor.createWithPayload(char_literal114)
+ self._adaptor.addChild(root_0, char_literal114_tree)
+
+ set115 = self.input.LT(1)
+ if self.input.LA(1) == LT or self.input.LA(1) == 38:
+ self.input.consume()
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 22, doWhileStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "doWhileStatement"
+
+ class whileStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.whileStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "whileStatement"
+ # JavaScript.g:130:1: whileStatement : 'while' ( LT )* '(' ( LT )* expression ( LT )* ')' ( LT )* statement ;
+ def whileStatement(self, ):
+
+ retval = self.whileStatement_return()
+ retval.start = self.input.LT(1)
+ whileStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal116 = None
+ LT117 = None
+ char_literal118 = None
+ LT119 = None
+ LT121 = None
+ char_literal122 = None
+ LT123 = None
+ expression120 = None
+
+ statement124 = None
+
+
+ string_literal116_tree = None
+ LT117_tree = None
+ char_literal118_tree = None
+ LT119_tree = None
+ LT121_tree = None
+ char_literal122_tree = None
+ LT123_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 23):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:131:2: ( 'while' ( LT )* '(' ( LT )* expression ( LT )* ')' ( LT )* statement )
+ # JavaScript.g:131:4: 'while' ( LT )* '(' ( LT )* expression ( LT )* ')' ( LT )* statement
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal116=self.match(self.input, 43, self.FOLLOW_43_in_whileStatement666)
+ if self._state.backtracking == 0:
+
+ string_literal116_tree = self._adaptor.createWithPayload(string_literal116)
+ self._adaptor.addChild(root_0, string_literal116_tree)
+
+ # JavaScript.g:131:14: ( LT )*
+ while True: #loop51
+ alt51 = 2
+ LA51_0 = self.input.LA(1)
+
+ if (LA51_0 == LT) :
+ alt51 = 1
+
+
+ if alt51 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT117=self.match(self.input, LT, self.FOLLOW_LT_in_whileStatement668)
+
+
+ else:
+ break #loop51
+ char_literal118=self.match(self.input, 32, self.FOLLOW_32_in_whileStatement672)
+ if self._state.backtracking == 0:
+
+ char_literal118_tree = self._adaptor.createWithPayload(char_literal118)
+ self._adaptor.addChild(root_0, char_literal118_tree)
+
+ # JavaScript.g:131:23: ( LT )*
+ while True: #loop52
+ alt52 = 2
+ LA52_0 = self.input.LA(1)
+
+ if (LA52_0 == LT) :
+ alt52 = 1
+
+
+ if alt52 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT119=self.match(self.input, LT, self.FOLLOW_LT_in_whileStatement674)
+
+
+ else:
+ break #loop52
+ self._state.following.append(self.FOLLOW_expression_in_whileStatement678)
+ expression120 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression120.tree)
+ # JavaScript.g:131:39: ( LT )*
+ while True: #loop53
+ alt53 = 2
+ LA53_0 = self.input.LA(1)
+
+ if (LA53_0 == LT) :
+ alt53 = 1
+
+
+ if alt53 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT121=self.match(self.input, LT, self.FOLLOW_LT_in_whileStatement680)
+
+
+ else:
+ break #loop53
+ char_literal122=self.match(self.input, 34, self.FOLLOW_34_in_whileStatement684)
+ if self._state.backtracking == 0:
+
+ char_literal122_tree = self._adaptor.createWithPayload(char_literal122)
+ self._adaptor.addChild(root_0, char_literal122_tree)
+
+ # JavaScript.g:131:48: ( LT )*
+ while True: #loop54
+ alt54 = 2
+ LA54_0 = self.input.LA(1)
+
+ if (LA54_0 == LT) :
+ alt54 = 1
+
+
+ if alt54 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT123=self.match(self.input, LT, self.FOLLOW_LT_in_whileStatement686)
+
+
+ else:
+ break #loop54
+ self._state.following.append(self.FOLLOW_statement_in_whileStatement690)
+ statement124 = self.statement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statement124.tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 23, whileStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "whileStatement"
+
+ class forStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.forStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "forStatement"
+ # JavaScript.g:134:1: forStatement : 'for' ( LT )* '(' ( ( LT )* forStatementInitialiserPart )? ( LT )* ';' ( ( LT )* expression )? ( LT )* ';' ( ( LT )* expression )? ( LT )* ')' ( LT )* statement ;
+ def forStatement(self, ):
+
+ retval = self.forStatement_return()
+ retval.start = self.input.LT(1)
+ forStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal125 = None
+ LT126 = None
+ char_literal127 = None
+ LT128 = None
+ LT130 = None
+ char_literal131 = None
+ LT132 = None
+ LT134 = None
+ char_literal135 = None
+ LT136 = None
+ LT138 = None
+ char_literal139 = None
+ LT140 = None
+ forStatementInitialiserPart129 = None
+
+ expression133 = None
+
+ expression137 = None
+
+ statement141 = None
+
+
+ string_literal125_tree = None
+ LT126_tree = None
+ char_literal127_tree = None
+ LT128_tree = None
+ LT130_tree = None
+ char_literal131_tree = None
+ LT132_tree = None
+ LT134_tree = None
+ char_literal135_tree = None
+ LT136_tree = None
+ LT138_tree = None
+ char_literal139_tree = None
+ LT140_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 24):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:135:2: ( 'for' ( LT )* '(' ( ( LT )* forStatementInitialiserPart )? ( LT )* ';' ( ( LT )* expression )? ( LT )* ';' ( ( LT )* expression )? ( LT )* ')' ( LT )* statement )
+ # JavaScript.g:135:4: 'for' ( LT )* '(' ( ( LT )* forStatementInitialiserPart )? ( LT )* ';' ( ( LT )* expression )? ( LT )* ';' ( ( LT )* expression )? ( LT )* ')' ( LT )* statement
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal125=self.match(self.input, 44, self.FOLLOW_44_in_forStatement702)
+ if self._state.backtracking == 0:
+
+ string_literal125_tree = self._adaptor.createWithPayload(string_literal125)
+ self._adaptor.addChild(root_0, string_literal125_tree)
+
+ # JavaScript.g:135:12: ( LT )*
+ while True: #loop55
+ alt55 = 2
+ LA55_0 = self.input.LA(1)
+
+ if (LA55_0 == LT) :
+ alt55 = 1
+
+
+ if alt55 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT126=self.match(self.input, LT, self.FOLLOW_LT_in_forStatement704)
+
+
+ else:
+ break #loop55
+ char_literal127=self.match(self.input, 32, self.FOLLOW_32_in_forStatement708)
+ if self._state.backtracking == 0:
+
+ char_literal127_tree = self._adaptor.createWithPayload(char_literal127)
+ self._adaptor.addChild(root_0, char_literal127_tree)
+
+ # JavaScript.g:135:19: ( ( LT )* forStatementInitialiserPart )?
+ alt57 = 2
+ alt57 = self.dfa57.predict(self.input)
+ if alt57 == 1:
+ # JavaScript.g:135:20: ( LT )* forStatementInitialiserPart
+ pass
+ # JavaScript.g:135:22: ( LT )*
+ while True: #loop56
+ alt56 = 2
+ LA56_0 = self.input.LA(1)
+
+ if (LA56_0 == LT) :
+ alt56 = 1
+
+
+ if alt56 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT128=self.match(self.input, LT, self.FOLLOW_LT_in_forStatement711)
+
+
+ else:
+ break #loop56
+ self._state.following.append(self.FOLLOW_forStatementInitialiserPart_in_forStatement715)
+ forStatementInitialiserPart129 = self.forStatementInitialiserPart()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, forStatementInitialiserPart129.tree)
+
+
+
+ # JavaScript.g:135:57: ( LT )*
+ while True: #loop58
+ alt58 = 2
+ LA58_0 = self.input.LA(1)
+
+ if (LA58_0 == LT) :
+ alt58 = 1
+
+
+ if alt58 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT130=self.match(self.input, LT, self.FOLLOW_LT_in_forStatement719)
+
+
+ else:
+ break #loop58
+ char_literal131=self.match(self.input, 38, self.FOLLOW_38_in_forStatement723)
+ if self._state.backtracking == 0:
+
+ char_literal131_tree = self._adaptor.createWithPayload(char_literal131)
+ self._adaptor.addChild(root_0, char_literal131_tree)
+
+ # JavaScript.g:135:64: ( ( LT )* expression )?
+ alt60 = 2
+ alt60 = self.dfa60.predict(self.input)
+ if alt60 == 1:
+ # JavaScript.g:135:65: ( LT )* expression
+ pass
+ # JavaScript.g:135:67: ( LT )*
+ while True: #loop59
+ alt59 = 2
+ LA59_0 = self.input.LA(1)
+
+ if (LA59_0 == LT) :
+ alt59 = 1
+
+
+ if alt59 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT132=self.match(self.input, LT, self.FOLLOW_LT_in_forStatement726)
+
+
+ else:
+ break #loop59
+ self._state.following.append(self.FOLLOW_expression_in_forStatement730)
+ expression133 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression133.tree)
+
+
+
+ # JavaScript.g:135:85: ( LT )*
+ while True: #loop61
+ alt61 = 2
+ LA61_0 = self.input.LA(1)
+
+ if (LA61_0 == LT) :
+ alt61 = 1
+
+
+ if alt61 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT134=self.match(self.input, LT, self.FOLLOW_LT_in_forStatement734)
+
+
+ else:
+ break #loop61
+ char_literal135=self.match(self.input, 38, self.FOLLOW_38_in_forStatement738)
+ if self._state.backtracking == 0:
+
+ char_literal135_tree = self._adaptor.createWithPayload(char_literal135)
+ self._adaptor.addChild(root_0, char_literal135_tree)
+
+ # JavaScript.g:135:92: ( ( LT )* expression )?
+ alt63 = 2
+ alt63 = self.dfa63.predict(self.input)
+ if alt63 == 1:
+ # JavaScript.g:135:93: ( LT )* expression
+ pass
+ # JavaScript.g:135:95: ( LT )*
+ while True: #loop62
+ alt62 = 2
+ LA62_0 = self.input.LA(1)
+
+ if (LA62_0 == LT) :
+ alt62 = 1
+
+
+ if alt62 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT136=self.match(self.input, LT, self.FOLLOW_LT_in_forStatement741)
+
+
+ else:
+ break #loop62
+ self._state.following.append(self.FOLLOW_expression_in_forStatement745)
+ expression137 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression137.tree)
+
+
+
+ # JavaScript.g:135:113: ( LT )*
+ while True: #loop64
+ alt64 = 2
+ LA64_0 = self.input.LA(1)
+
+ if (LA64_0 == LT) :
+ alt64 = 1
+
+
+ if alt64 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT138=self.match(self.input, LT, self.FOLLOW_LT_in_forStatement749)
+
+
+ else:
+ break #loop64
+ char_literal139=self.match(self.input, 34, self.FOLLOW_34_in_forStatement753)
+ if self._state.backtracking == 0:
+
+ char_literal139_tree = self._adaptor.createWithPayload(char_literal139)
+ self._adaptor.addChild(root_0, char_literal139_tree)
+
+ # JavaScript.g:135:122: ( LT )*
+ while True: #loop65
+ alt65 = 2
+ LA65_0 = self.input.LA(1)
+
+ if (LA65_0 == LT) :
+ alt65 = 1
+
+
+ if alt65 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT140=self.match(self.input, LT, self.FOLLOW_LT_in_forStatement755)
+
+
+ else:
+ break #loop65
+ self._state.following.append(self.FOLLOW_statement_in_forStatement759)
+ statement141 = self.statement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statement141.tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 24, forStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "forStatement"
+
+ class forStatementInitialiserPart_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.forStatementInitialiserPart_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "forStatementInitialiserPart"
+ # JavaScript.g:138:1: forStatementInitialiserPart : ( expressionNoIn | 'var' ( LT )* variableDeclarationListNoIn );
+ def forStatementInitialiserPart(self, ):
+
+ retval = self.forStatementInitialiserPart_return()
+ retval.start = self.input.LT(1)
+ forStatementInitialiserPart_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal143 = None
+ LT144 = None
+ expressionNoIn142 = None
+
+ variableDeclarationListNoIn145 = None
+
+
+ string_literal143_tree = None
+ LT144_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 25):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:139:2: ( expressionNoIn | 'var' ( LT )* variableDeclarationListNoIn )
+ alt67 = 2
+ LA67_0 = self.input.LA(1)
+
+ if ((Identifier <= LA67_0 <= NumericLiteral) or (31 <= LA67_0 <= 32) or LA67_0 == 35 or (58 <= LA67_0 <= 59) or (91 <= LA67_0 <= 92) or (96 <= LA67_0 <= 106)) :
+ alt67 = 1
+ elif (LA67_0 == 37) :
+ alt67 = 2
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 67, 0, self.input)
+
+ raise nvae
+
+ if alt67 == 1:
+ # JavaScript.g:139:4: expressionNoIn
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_expressionNoIn_in_forStatementInitialiserPart771)
+ expressionNoIn142 = self.expressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expressionNoIn142.tree)
+
+
+ elif alt67 == 2:
+ # JavaScript.g:140:4: 'var' ( LT )* variableDeclarationListNoIn
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal143=self.match(self.input, 37, self.FOLLOW_37_in_forStatementInitialiserPart776)
+ if self._state.backtracking == 0:
+
+ string_literal143_tree = self._adaptor.createWithPayload(string_literal143)
+ self._adaptor.addChild(root_0, string_literal143_tree)
+
+ # JavaScript.g:140:12: ( LT )*
+ while True: #loop66
+ alt66 = 2
+ LA66_0 = self.input.LA(1)
+
+ if (LA66_0 == LT) :
+ alt66 = 1
+
+
+ if alt66 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT144=self.match(self.input, LT, self.FOLLOW_LT_in_forStatementInitialiserPart778)
+
+
+ else:
+ break #loop66
+ self._state.following.append(self.FOLLOW_variableDeclarationListNoIn_in_forStatementInitialiserPart782)
+ variableDeclarationListNoIn145 = self.variableDeclarationListNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, variableDeclarationListNoIn145.tree)
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 25, forStatementInitialiserPart_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "forStatementInitialiserPart"
+
+ class forInStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.forInStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "forInStatement"
+ # JavaScript.g:143:1: forInStatement : 'for' ( LT )* '(' ( LT )* forInStatementInitialiserPart ( LT )* 'in' ( LT )* expression ( LT )* ')' ( LT )* statement ;
+ def forInStatement(self, ):
+
+ retval = self.forInStatement_return()
+ retval.start = self.input.LT(1)
+ forInStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal146 = None
+ LT147 = None
+ char_literal148 = None
+ LT149 = None
+ LT151 = None
+ string_literal152 = None
+ LT153 = None
+ LT155 = None
+ char_literal156 = None
+ LT157 = None
+ forInStatementInitialiserPart150 = None
+
+ expression154 = None
+
+ statement158 = None
+
+
+ string_literal146_tree = None
+ LT147_tree = None
+ char_literal148_tree = None
+ LT149_tree = None
+ LT151_tree = None
+ string_literal152_tree = None
+ LT153_tree = None
+ LT155_tree = None
+ char_literal156_tree = None
+ LT157_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 26):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:144:2: ( 'for' ( LT )* '(' ( LT )* forInStatementInitialiserPart ( LT )* 'in' ( LT )* expression ( LT )* ')' ( LT )* statement )
+ # JavaScript.g:144:4: 'for' ( LT )* '(' ( LT )* forInStatementInitialiserPart ( LT )* 'in' ( LT )* expression ( LT )* ')' ( LT )* statement
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal146=self.match(self.input, 44, self.FOLLOW_44_in_forInStatement794)
+ if self._state.backtracking == 0:
+
+ string_literal146_tree = self._adaptor.createWithPayload(string_literal146)
+ self._adaptor.addChild(root_0, string_literal146_tree)
+
+ # JavaScript.g:144:12: ( LT )*
+ while True: #loop68
+ alt68 = 2
+ LA68_0 = self.input.LA(1)
+
+ if (LA68_0 == LT) :
+ alt68 = 1
+
+
+ if alt68 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT147=self.match(self.input, LT, self.FOLLOW_LT_in_forInStatement796)
+
+
+ else:
+ break #loop68
+ char_literal148=self.match(self.input, 32, self.FOLLOW_32_in_forInStatement800)
+ if self._state.backtracking == 0:
+
+ char_literal148_tree = self._adaptor.createWithPayload(char_literal148)
+ self._adaptor.addChild(root_0, char_literal148_tree)
+
+ # JavaScript.g:144:21: ( LT )*
+ while True: #loop69
+ alt69 = 2
+ LA69_0 = self.input.LA(1)
+
+ if (LA69_0 == LT) :
+ alt69 = 1
+
+
+ if alt69 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT149=self.match(self.input, LT, self.FOLLOW_LT_in_forInStatement802)
+
+
+ else:
+ break #loop69
+ self._state.following.append(self.FOLLOW_forInStatementInitialiserPart_in_forInStatement806)
+ forInStatementInitialiserPart150 = self.forInStatementInitialiserPart()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, forInStatementInitialiserPart150.tree)
+ # JavaScript.g:144:56: ( LT )*
+ while True: #loop70
+ alt70 = 2
+ LA70_0 = self.input.LA(1)
+
+ if (LA70_0 == LT) :
+ alt70 = 1
+
+
+ if alt70 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT151=self.match(self.input, LT, self.FOLLOW_LT_in_forInStatement808)
+
+
+ else:
+ break #loop70
+ string_literal152=self.match(self.input, 45, self.FOLLOW_45_in_forInStatement812)
+ if self._state.backtracking == 0:
+
+ string_literal152_tree = self._adaptor.createWithPayload(string_literal152)
+ self._adaptor.addChild(root_0, string_literal152_tree)
+
+ # JavaScript.g:144:66: ( LT )*
+ while True: #loop71
+ alt71 = 2
+ LA71_0 = self.input.LA(1)
+
+ if (LA71_0 == LT) :
+ alt71 = 1
+
+
+ if alt71 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT153=self.match(self.input, LT, self.FOLLOW_LT_in_forInStatement814)
+
+
+ else:
+ break #loop71
+ self._state.following.append(self.FOLLOW_expression_in_forInStatement818)
+ expression154 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression154.tree)
+ # JavaScript.g:144:82: ( LT )*
+ while True: #loop72
+ alt72 = 2
+ LA72_0 = self.input.LA(1)
+
+ if (LA72_0 == LT) :
+ alt72 = 1
+
+
+ if alt72 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT155=self.match(self.input, LT, self.FOLLOW_LT_in_forInStatement820)
+
+
+ else:
+ break #loop72
+ char_literal156=self.match(self.input, 34, self.FOLLOW_34_in_forInStatement824)
+ if self._state.backtracking == 0:
+
+ char_literal156_tree = self._adaptor.createWithPayload(char_literal156)
+ self._adaptor.addChild(root_0, char_literal156_tree)
+
+ # JavaScript.g:144:91: ( LT )*
+ while True: #loop73
+ alt73 = 2
+ LA73_0 = self.input.LA(1)
+
+ if (LA73_0 == LT) :
+ alt73 = 1
+
+
+ if alt73 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT157=self.match(self.input, LT, self.FOLLOW_LT_in_forInStatement826)
+
+
+ else:
+ break #loop73
+ self._state.following.append(self.FOLLOW_statement_in_forInStatement830)
+ statement158 = self.statement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statement158.tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 26, forInStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "forInStatement"
+
+ class forInStatementInitialiserPart_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.forInStatementInitialiserPart_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "forInStatementInitialiserPart"
+ # JavaScript.g:147:1: forInStatementInitialiserPart : ( leftHandSideExpression | 'var' ( LT )* variableDeclarationNoIn );
+ def forInStatementInitialiserPart(self, ):
+
+ retval = self.forInStatementInitialiserPart_return()
+ retval.start = self.input.LT(1)
+ forInStatementInitialiserPart_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal160 = None
+ LT161 = None
+ leftHandSideExpression159 = None
+
+ variableDeclarationNoIn162 = None
+
+
+ string_literal160_tree = None
+ LT161_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 27):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:148:2: ( leftHandSideExpression | 'var' ( LT )* variableDeclarationNoIn )
+ alt75 = 2
+ LA75_0 = self.input.LA(1)
+
+ if ((Identifier <= LA75_0 <= NumericLiteral) or (31 <= LA75_0 <= 32) or LA75_0 == 35 or (58 <= LA75_0 <= 59) or (103 <= LA75_0 <= 106)) :
+ alt75 = 1
+ elif (LA75_0 == 37) :
+ alt75 = 2
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 75, 0, self.input)
+
+ raise nvae
+
+ if alt75 == 1:
+ # JavaScript.g:148:4: leftHandSideExpression
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_leftHandSideExpression_in_forInStatementInitialiserPart842)
+ leftHandSideExpression159 = self.leftHandSideExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, leftHandSideExpression159.tree)
+
+
+ elif alt75 == 2:
+ # JavaScript.g:149:4: 'var' ( LT )* variableDeclarationNoIn
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal160=self.match(self.input, 37, self.FOLLOW_37_in_forInStatementInitialiserPart847)
+ if self._state.backtracking == 0:
+
+ string_literal160_tree = self._adaptor.createWithPayload(string_literal160)
+ self._adaptor.addChild(root_0, string_literal160_tree)
+
+ # JavaScript.g:149:12: ( LT )*
+ while True: #loop74
+ alt74 = 2
+ LA74_0 = self.input.LA(1)
+
+ if (LA74_0 == LT) :
+ alt74 = 1
+
+
+ if alt74 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT161=self.match(self.input, LT, self.FOLLOW_LT_in_forInStatementInitialiserPart849)
+
+
+ else:
+ break #loop74
+ self._state.following.append(self.FOLLOW_variableDeclarationNoIn_in_forInStatementInitialiserPart853)
+ variableDeclarationNoIn162 = self.variableDeclarationNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, variableDeclarationNoIn162.tree)
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 27, forInStatementInitialiserPart_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "forInStatementInitialiserPart"
+
+ class continueStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.continueStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "continueStatement"
+ # JavaScript.g:152:1: continueStatement : 'continue' ( Identifier )? ( LT | ';' ) ;
+ def continueStatement(self, ):
+
+ retval = self.continueStatement_return()
+ retval.start = self.input.LT(1)
+ continueStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal163 = None
+ Identifier164 = None
+ set165 = None
+
+ string_literal163_tree = None
+ Identifier164_tree = None
+ set165_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 28):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:153:2: ( 'continue' ( Identifier )? ( LT | ';' ) )
+ # JavaScript.g:153:4: 'continue' ( Identifier )? ( LT | ';' )
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal163=self.match(self.input, 46, self.FOLLOW_46_in_continueStatement864)
+ if self._state.backtracking == 0:
+
+ string_literal163_tree = self._adaptor.createWithPayload(string_literal163)
+ self._adaptor.addChild(root_0, string_literal163_tree)
+
+ # JavaScript.g:153:15: ( Identifier )?
+ alt76 = 2
+ LA76_0 = self.input.LA(1)
+
+ if (LA76_0 == Identifier) :
+ alt76 = 1
+ if alt76 == 1:
+ # JavaScript.g:0:0: Identifier
+ pass
+ Identifier164=self.match(self.input, Identifier, self.FOLLOW_Identifier_in_continueStatement866)
+ if self._state.backtracking == 0:
+
+ Identifier164_tree = self._adaptor.createWithPayload(Identifier164)
+ self._adaptor.addChild(root_0, Identifier164_tree)
+
+
+
+
+ set165 = self.input.LT(1)
+ if self.input.LA(1) == LT or self.input.LA(1) == 38:
+ self.input.consume()
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 28, continueStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "continueStatement"
+
+ class breakStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.breakStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "breakStatement"
+ # JavaScript.g:156:1: breakStatement : 'break' ( Identifier )? ( LT | ';' ) ;
+ def breakStatement(self, ):
+
+ retval = self.breakStatement_return()
+ retval.start = self.input.LT(1)
+ breakStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal166 = None
+ Identifier167 = None
+ set168 = None
+
+ string_literal166_tree = None
+ Identifier167_tree = None
+ set168_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 29):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:157:2: ( 'break' ( Identifier )? ( LT | ';' ) )
+ # JavaScript.g:157:4: 'break' ( Identifier )? ( LT | ';' )
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal166=self.match(self.input, 47, self.FOLLOW_47_in_breakStatement887)
+ if self._state.backtracking == 0:
+
+ string_literal166_tree = self._adaptor.createWithPayload(string_literal166)
+ self._adaptor.addChild(root_0, string_literal166_tree)
+
+ # JavaScript.g:157:12: ( Identifier )?
+ alt77 = 2
+ LA77_0 = self.input.LA(1)
+
+ if (LA77_0 == Identifier) :
+ alt77 = 1
+ if alt77 == 1:
+ # JavaScript.g:0:0: Identifier
+ pass
+ Identifier167=self.match(self.input, Identifier, self.FOLLOW_Identifier_in_breakStatement889)
+ if self._state.backtracking == 0:
+
+ Identifier167_tree = self._adaptor.createWithPayload(Identifier167)
+ self._adaptor.addChild(root_0, Identifier167_tree)
+
+
+
+
+ set168 = self.input.LT(1)
+ if self.input.LA(1) == LT or self.input.LA(1) == 38:
+ self.input.consume()
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 29, breakStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "breakStatement"
+
+ class returnStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.returnStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "returnStatement"
+ # JavaScript.g:160:1: returnStatement : 'return' ( expression )? ( LT | ';' ) ;
+ def returnStatement(self, ):
+
+ retval = self.returnStatement_return()
+ retval.start = self.input.LT(1)
+ returnStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal169 = None
+ set171 = None
+ expression170 = None
+
+
+ string_literal169_tree = None
+ set171_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 30):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:161:2: ( 'return' ( expression )? ( LT | ';' ) )
+ # JavaScript.g:161:4: 'return' ( expression )? ( LT | ';' )
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal169=self.match(self.input, 48, self.FOLLOW_48_in_returnStatement910)
+ if self._state.backtracking == 0:
+
+ string_literal169_tree = self._adaptor.createWithPayload(string_literal169)
+ self._adaptor.addChild(root_0, string_literal169_tree)
+
+ # JavaScript.g:161:13: ( expression )?
+ alt78 = 2
+ LA78_0 = self.input.LA(1)
+
+ if ((Identifier <= LA78_0 <= NumericLiteral) or (31 <= LA78_0 <= 32) or LA78_0 == 35 or (58 <= LA78_0 <= 59) or (91 <= LA78_0 <= 92) or (96 <= LA78_0 <= 106)) :
+ alt78 = 1
+ if alt78 == 1:
+ # JavaScript.g:0:0: expression
+ pass
+ self._state.following.append(self.FOLLOW_expression_in_returnStatement912)
+ expression170 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression170.tree)
+
+
+
+ set171 = self.input.LT(1)
+ if self.input.LA(1) == LT or self.input.LA(1) == 38:
+ self.input.consume()
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 30, returnStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "returnStatement"
+
+ class withStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.withStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "withStatement"
+ # JavaScript.g:164:1: withStatement : 'with' ( LT )* '(' ( LT )* expression ( LT )* ')' ( LT )* statement ;
+ def withStatement(self, ):
+
+ retval = self.withStatement_return()
+ retval.start = self.input.LT(1)
+ withStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal172 = None
+ LT173 = None
+ char_literal174 = None
+ LT175 = None
+ LT177 = None
+ char_literal178 = None
+ LT179 = None
+ expression176 = None
+
+ statement180 = None
+
+
+ string_literal172_tree = None
+ LT173_tree = None
+ char_literal174_tree = None
+ LT175_tree = None
+ LT177_tree = None
+ char_literal178_tree = None
+ LT179_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 31):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:165:2: ( 'with' ( LT )* '(' ( LT )* expression ( LT )* ')' ( LT )* statement )
+ # JavaScript.g:165:4: 'with' ( LT )* '(' ( LT )* expression ( LT )* ')' ( LT )* statement
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal172=self.match(self.input, 49, self.FOLLOW_49_in_withStatement934)
+ if self._state.backtracking == 0:
+
+ string_literal172_tree = self._adaptor.createWithPayload(string_literal172)
+ self._adaptor.addChild(root_0, string_literal172_tree)
+
+ # JavaScript.g:165:13: ( LT )*
+ while True: #loop79
+ alt79 = 2
+ LA79_0 = self.input.LA(1)
+
+ if (LA79_0 == LT) :
+ alt79 = 1
+
+
+ if alt79 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT173=self.match(self.input, LT, self.FOLLOW_LT_in_withStatement936)
+
+
+ else:
+ break #loop79
+ char_literal174=self.match(self.input, 32, self.FOLLOW_32_in_withStatement940)
+ if self._state.backtracking == 0:
+
+ char_literal174_tree = self._adaptor.createWithPayload(char_literal174)
+ self._adaptor.addChild(root_0, char_literal174_tree)
+
+ # JavaScript.g:165:22: ( LT )*
+ while True: #loop80
+ alt80 = 2
+ LA80_0 = self.input.LA(1)
+
+ if (LA80_0 == LT) :
+ alt80 = 1
+
+
+ if alt80 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT175=self.match(self.input, LT, self.FOLLOW_LT_in_withStatement942)
+
+
+ else:
+ break #loop80
+ self._state.following.append(self.FOLLOW_expression_in_withStatement946)
+ expression176 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression176.tree)
+ # JavaScript.g:165:38: ( LT )*
+ while True: #loop81
+ alt81 = 2
+ LA81_0 = self.input.LA(1)
+
+ if (LA81_0 == LT) :
+ alt81 = 1
+
+
+ if alt81 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT177=self.match(self.input, LT, self.FOLLOW_LT_in_withStatement948)
+
+
+ else:
+ break #loop81
+ char_literal178=self.match(self.input, 34, self.FOLLOW_34_in_withStatement952)
+ if self._state.backtracking == 0:
+
+ char_literal178_tree = self._adaptor.createWithPayload(char_literal178)
+ self._adaptor.addChild(root_0, char_literal178_tree)
+
+ # JavaScript.g:165:47: ( LT )*
+ while True: #loop82
+ alt82 = 2
+ LA82_0 = self.input.LA(1)
+
+ if (LA82_0 == LT) :
+ alt82 = 1
+
+
+ if alt82 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT179=self.match(self.input, LT, self.FOLLOW_LT_in_withStatement954)
+
+
+ else:
+ break #loop82
+ self._state.following.append(self.FOLLOW_statement_in_withStatement958)
+ statement180 = self.statement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statement180.tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 31, withStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "withStatement"
+
+ class labelledStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.labelledStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "labelledStatement"
+ # JavaScript.g:168:1: labelledStatement : Identifier ( LT )* ':' ( LT )* statement ;
+ def labelledStatement(self, ):
+
+ retval = self.labelledStatement_return()
+ retval.start = self.input.LT(1)
+ labelledStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ Identifier181 = None
+ LT182 = None
+ char_literal183 = None
+ LT184 = None
+ statement185 = None
+
+
+ Identifier181_tree = None
+ LT182_tree = None
+ char_literal183_tree = None
+ LT184_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 32):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:169:2: ( Identifier ( LT )* ':' ( LT )* statement )
+ # JavaScript.g:169:4: Identifier ( LT )* ':' ( LT )* statement
+ pass
+ root_0 = self._adaptor.nil()
+
+ Identifier181=self.match(self.input, Identifier, self.FOLLOW_Identifier_in_labelledStatement969)
+ if self._state.backtracking == 0:
+
+ Identifier181_tree = self._adaptor.createWithPayload(Identifier181)
+ self._adaptor.addChild(root_0, Identifier181_tree)
+
+ # JavaScript.g:169:17: ( LT )*
+ while True: #loop83
+ alt83 = 2
+ LA83_0 = self.input.LA(1)
+
+ if (LA83_0 == LT) :
+ alt83 = 1
+
+
+ if alt83 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT182=self.match(self.input, LT, self.FOLLOW_LT_in_labelledStatement971)
+
+
+ else:
+ break #loop83
+ char_literal183=self.match(self.input, 50, self.FOLLOW_50_in_labelledStatement975)
+ if self._state.backtracking == 0:
+
+ char_literal183_tree = self._adaptor.createWithPayload(char_literal183)
+ self._adaptor.addChild(root_0, char_literal183_tree)
+
+ # JavaScript.g:169:26: ( LT )*
+ while True: #loop84
+ alt84 = 2
+ LA84_0 = self.input.LA(1)
+
+ if (LA84_0 == LT) :
+ alt84 = 1
+
+
+ if alt84 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT184=self.match(self.input, LT, self.FOLLOW_LT_in_labelledStatement977)
+
+
+ else:
+ break #loop84
+ self._state.following.append(self.FOLLOW_statement_in_labelledStatement981)
+ statement185 = self.statement()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statement185.tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 32, labelledStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "labelledStatement"
+
+ class switchStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.switchStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "switchStatement"
+ # JavaScript.g:172:1: switchStatement : 'switch' ( LT )* '(' ( LT )* expression ( LT )* ')' ( LT )* caseBlock ;
+ def switchStatement(self, ):
+
+ retval = self.switchStatement_return()
+ retval.start = self.input.LT(1)
+ switchStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal186 = None
+ LT187 = None
+ char_literal188 = None
+ LT189 = None
+ LT191 = None
+ char_literal192 = None
+ LT193 = None
+ expression190 = None
+
+ caseBlock194 = None
+
+
+ string_literal186_tree = None
+ LT187_tree = None
+ char_literal188_tree = None
+ LT189_tree = None
+ LT191_tree = None
+ char_literal192_tree = None
+ LT193_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 33):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:173:2: ( 'switch' ( LT )* '(' ( LT )* expression ( LT )* ')' ( LT )* caseBlock )
+ # JavaScript.g:173:4: 'switch' ( LT )* '(' ( LT )* expression ( LT )* ')' ( LT )* caseBlock
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal186=self.match(self.input, 51, self.FOLLOW_51_in_switchStatement993)
+ if self._state.backtracking == 0:
+
+ string_literal186_tree = self._adaptor.createWithPayload(string_literal186)
+ self._adaptor.addChild(root_0, string_literal186_tree)
+
+ # JavaScript.g:173:15: ( LT )*
+ while True: #loop85
+ alt85 = 2
+ LA85_0 = self.input.LA(1)
+
+ if (LA85_0 == LT) :
+ alt85 = 1
+
+
+ if alt85 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT187=self.match(self.input, LT, self.FOLLOW_LT_in_switchStatement995)
+
+
+ else:
+ break #loop85
+ char_literal188=self.match(self.input, 32, self.FOLLOW_32_in_switchStatement999)
+ if self._state.backtracking == 0:
+
+ char_literal188_tree = self._adaptor.createWithPayload(char_literal188)
+ self._adaptor.addChild(root_0, char_literal188_tree)
+
+ # JavaScript.g:173:24: ( LT )*
+ while True: #loop86
+ alt86 = 2
+ LA86_0 = self.input.LA(1)
+
+ if (LA86_0 == LT) :
+ alt86 = 1
+
+
+ if alt86 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT189=self.match(self.input, LT, self.FOLLOW_LT_in_switchStatement1001)
+
+
+ else:
+ break #loop86
+ self._state.following.append(self.FOLLOW_expression_in_switchStatement1005)
+ expression190 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression190.tree)
+ # JavaScript.g:173:40: ( LT )*
+ while True: #loop87
+ alt87 = 2
+ LA87_0 = self.input.LA(1)
+
+ if (LA87_0 == LT) :
+ alt87 = 1
+
+
+ if alt87 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT191=self.match(self.input, LT, self.FOLLOW_LT_in_switchStatement1007)
+
+
+ else:
+ break #loop87
+ char_literal192=self.match(self.input, 34, self.FOLLOW_34_in_switchStatement1011)
+ if self._state.backtracking == 0:
+
+ char_literal192_tree = self._adaptor.createWithPayload(char_literal192)
+ self._adaptor.addChild(root_0, char_literal192_tree)
+
+ # JavaScript.g:173:49: ( LT )*
+ while True: #loop88
+ alt88 = 2
+ LA88_0 = self.input.LA(1)
+
+ if (LA88_0 == LT) :
+ alt88 = 1
+
+
+ if alt88 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT193=self.match(self.input, LT, self.FOLLOW_LT_in_switchStatement1013)
+
+
+ else:
+ break #loop88
+ self._state.following.append(self.FOLLOW_caseBlock_in_switchStatement1017)
+ caseBlock194 = self.caseBlock()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, caseBlock194.tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 33, switchStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "switchStatement"
+
+ class caseBlock_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.caseBlock_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "caseBlock"
+ # JavaScript.g:176:1: caseBlock : '{' ( ( LT )* caseClause )* ( ( LT )* defaultClause ( ( LT )* caseClause )* )? ( LT )* '}' ;
+ def caseBlock(self, ):
+
+ retval = self.caseBlock_return()
+ retval.start = self.input.LT(1)
+ caseBlock_StartIndex = self.input.index()
+ root_0 = None
+
+ char_literal195 = None
+ LT196 = None
+ LT198 = None
+ LT200 = None
+ LT202 = None
+ char_literal203 = None
+ caseClause197 = None
+
+ defaultClause199 = None
+
+ caseClause201 = None
+
+
+ char_literal195_tree = None
+ LT196_tree = None
+ LT198_tree = None
+ LT200_tree = None
+ LT202_tree = None
+ char_literal203_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 34):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:177:2: ( '{' ( ( LT )* caseClause )* ( ( LT )* defaultClause ( ( LT )* caseClause )* )? ( LT )* '}' )
+ # JavaScript.g:177:4: '{' ( ( LT )* caseClause )* ( ( LT )* defaultClause ( ( LT )* caseClause )* )? ( LT )* '}'
+ pass
+ root_0 = self._adaptor.nil()
+
+ char_literal195=self.match(self.input, 35, self.FOLLOW_35_in_caseBlock1029)
+ if self._state.backtracking == 0:
+
+ char_literal195_tree = self._adaptor.createWithPayload(char_literal195)
+ self._adaptor.addChild(root_0, char_literal195_tree)
+
+ # JavaScript.g:177:8: ( ( LT )* caseClause )*
+ while True: #loop90
+ alt90 = 2
+ alt90 = self.dfa90.predict(self.input)
+ if alt90 == 1:
+ # JavaScript.g:177:9: ( LT )* caseClause
+ pass
+ # JavaScript.g:177:11: ( LT )*
+ while True: #loop89
+ alt89 = 2
+ LA89_0 = self.input.LA(1)
+
+ if (LA89_0 == LT) :
+ alt89 = 1
+
+
+ if alt89 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT196=self.match(self.input, LT, self.FOLLOW_LT_in_caseBlock1032)
+
+
+ else:
+ break #loop89
+ self._state.following.append(self.FOLLOW_caseClause_in_caseBlock1036)
+ caseClause197 = self.caseClause()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, caseClause197.tree)
+
+
+ else:
+ break #loop90
+ # JavaScript.g:177:27: ( ( LT )* defaultClause ( ( LT )* caseClause )* )?
+ alt94 = 2
+ alt94 = self.dfa94.predict(self.input)
+ if alt94 == 1:
+ # JavaScript.g:177:28: ( LT )* defaultClause ( ( LT )* caseClause )*
+ pass
+ # JavaScript.g:177:30: ( LT )*
+ while True: #loop91
+ alt91 = 2
+ LA91_0 = self.input.LA(1)
+
+ if (LA91_0 == LT) :
+ alt91 = 1
+
+
+ if alt91 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT198=self.match(self.input, LT, self.FOLLOW_LT_in_caseBlock1041)
+
+
+ else:
+ break #loop91
+ self._state.following.append(self.FOLLOW_defaultClause_in_caseBlock1045)
+ defaultClause199 = self.defaultClause()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, defaultClause199.tree)
+ # JavaScript.g:177:47: ( ( LT )* caseClause )*
+ while True: #loop93
+ alt93 = 2
+ alt93 = self.dfa93.predict(self.input)
+ if alt93 == 1:
+ # JavaScript.g:177:48: ( LT )* caseClause
+ pass
+ # JavaScript.g:177:50: ( LT )*
+ while True: #loop92
+ alt92 = 2
+ LA92_0 = self.input.LA(1)
+
+ if (LA92_0 == LT) :
+ alt92 = 1
+
+
+ if alt92 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT200=self.match(self.input, LT, self.FOLLOW_LT_in_caseBlock1048)
+
+
+ else:
+ break #loop92
+ self._state.following.append(self.FOLLOW_caseClause_in_caseBlock1052)
+ caseClause201 = self.caseClause()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, caseClause201.tree)
+
+
+ else:
+ break #loop93
+
+
+
+ # JavaScript.g:177:70: ( LT )*
+ while True: #loop95
+ alt95 = 2
+ LA95_0 = self.input.LA(1)
+
+ if (LA95_0 == LT) :
+ alt95 = 1
+
+
+ if alt95 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT202=self.match(self.input, LT, self.FOLLOW_LT_in_caseBlock1058)
+
+
+ else:
+ break #loop95
+ char_literal203=self.match(self.input, 36, self.FOLLOW_36_in_caseBlock1062)
+ if self._state.backtracking == 0:
+
+ char_literal203_tree = self._adaptor.createWithPayload(char_literal203)
+ self._adaptor.addChild(root_0, char_literal203_tree)
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 34, caseBlock_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "caseBlock"
+
+ class caseClause_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.caseClause_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "caseClause"
+ # JavaScript.g:180:1: caseClause : 'case' ( LT )* expression ( LT )* ':' ( LT )* ( statementList )? ;
+ def caseClause(self, ):
+
+ retval = self.caseClause_return()
+ retval.start = self.input.LT(1)
+ caseClause_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal204 = None
+ LT205 = None
+ LT207 = None
+ char_literal208 = None
+ LT209 = None
+ expression206 = None
+
+ statementList210 = None
+
+
+ string_literal204_tree = None
+ LT205_tree = None
+ LT207_tree = None
+ char_literal208_tree = None
+ LT209_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 35):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:181:2: ( 'case' ( LT )* expression ( LT )* ':' ( LT )* ( statementList )? )
+ # JavaScript.g:181:4: 'case' ( LT )* expression ( LT )* ':' ( LT )* ( statementList )?
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal204=self.match(self.input, 52, self.FOLLOW_52_in_caseClause1073)
+ if self._state.backtracking == 0:
+
+ string_literal204_tree = self._adaptor.createWithPayload(string_literal204)
+ self._adaptor.addChild(root_0, string_literal204_tree)
+
+ # JavaScript.g:181:13: ( LT )*
+ while True: #loop96
+ alt96 = 2
+ LA96_0 = self.input.LA(1)
+
+ if (LA96_0 == LT) :
+ alt96 = 1
+
+
+ if alt96 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT205=self.match(self.input, LT, self.FOLLOW_LT_in_caseClause1075)
+
+
+ else:
+ break #loop96
+ self._state.following.append(self.FOLLOW_expression_in_caseClause1079)
+ expression206 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression206.tree)
+ # JavaScript.g:181:29: ( LT )*
+ while True: #loop97
+ alt97 = 2
+ LA97_0 = self.input.LA(1)
+
+ if (LA97_0 == LT) :
+ alt97 = 1
+
+
+ if alt97 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT207=self.match(self.input, LT, self.FOLLOW_LT_in_caseClause1081)
+
+
+ else:
+ break #loop97
+ char_literal208=self.match(self.input, 50, self.FOLLOW_50_in_caseClause1085)
+ if self._state.backtracking == 0:
+
+ char_literal208_tree = self._adaptor.createWithPayload(char_literal208)
+ self._adaptor.addChild(root_0, char_literal208_tree)
+
+ # JavaScript.g:181:38: ( LT )*
+ while True: #loop98
+ alt98 = 2
+ LA98_0 = self.input.LA(1)
+
+ if (LA98_0 == LT) :
+ LA98_2 = self.input.LA(2)
+
+ if (self.synpred118_JavaScript()) :
+ alt98 = 1
+
+
+
+
+ if alt98 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT209=self.match(self.input, LT, self.FOLLOW_LT_in_caseClause1087)
+
+
+ else:
+ break #loop98
+ # JavaScript.g:181:41: ( statementList )?
+ alt99 = 2
+ LA99_0 = self.input.LA(1)
+
+ if ((Identifier <= LA99_0 <= NumericLiteral) or (31 <= LA99_0 <= 32) or LA99_0 == 35 or (37 <= LA99_0 <= 38) or LA99_0 == 40 or (42 <= LA99_0 <= 44) or (46 <= LA99_0 <= 49) or LA99_0 == 51 or (54 <= LA99_0 <= 55) or (58 <= LA99_0 <= 59) or (91 <= LA99_0 <= 92) or (96 <= LA99_0 <= 106)) :
+ alt99 = 1
+ if alt99 == 1:
+ # JavaScript.g:0:0: statementList
+ pass
+ self._state.following.append(self.FOLLOW_statementList_in_caseClause1091)
+ statementList210 = self.statementList()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statementList210.tree)
+
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 35, caseClause_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "caseClause"
+
+ class defaultClause_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.defaultClause_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "defaultClause"
+ # JavaScript.g:184:1: defaultClause : 'default' ( LT )* ':' ( LT )* ( statementList )? ;
+ def defaultClause(self, ):
+
+ retval = self.defaultClause_return()
+ retval.start = self.input.LT(1)
+ defaultClause_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal211 = None
+ LT212 = None
+ char_literal213 = None
+ LT214 = None
+ statementList215 = None
+
+
+ string_literal211_tree = None
+ LT212_tree = None
+ char_literal213_tree = None
+ LT214_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 36):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:185:2: ( 'default' ( LT )* ':' ( LT )* ( statementList )? )
+ # JavaScript.g:185:4: 'default' ( LT )* ':' ( LT )* ( statementList )?
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal211=self.match(self.input, 53, self.FOLLOW_53_in_defaultClause1104)
+ if self._state.backtracking == 0:
+
+ string_literal211_tree = self._adaptor.createWithPayload(string_literal211)
+ self._adaptor.addChild(root_0, string_literal211_tree)
+
+ # JavaScript.g:185:16: ( LT )*
+ while True: #loop100
+ alt100 = 2
+ LA100_0 = self.input.LA(1)
+
+ if (LA100_0 == LT) :
+ alt100 = 1
+
+
+ if alt100 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT212=self.match(self.input, LT, self.FOLLOW_LT_in_defaultClause1106)
+
+
+ else:
+ break #loop100
+ char_literal213=self.match(self.input, 50, self.FOLLOW_50_in_defaultClause1110)
+ if self._state.backtracking == 0:
+
+ char_literal213_tree = self._adaptor.createWithPayload(char_literal213)
+ self._adaptor.addChild(root_0, char_literal213_tree)
+
+ # JavaScript.g:185:25: ( LT )*
+ while True: #loop101
+ alt101 = 2
+ LA101_0 = self.input.LA(1)
+
+ if (LA101_0 == LT) :
+ LA101_2 = self.input.LA(2)
+
+ if (self.synpred121_JavaScript()) :
+ alt101 = 1
+
+
+
+
+ if alt101 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT214=self.match(self.input, LT, self.FOLLOW_LT_in_defaultClause1112)
+
+
+ else:
+ break #loop101
+ # JavaScript.g:185:28: ( statementList )?
+ alt102 = 2
+ LA102_0 = self.input.LA(1)
+
+ if ((Identifier <= LA102_0 <= NumericLiteral) or (31 <= LA102_0 <= 32) or LA102_0 == 35 or (37 <= LA102_0 <= 38) or LA102_0 == 40 or (42 <= LA102_0 <= 44) or (46 <= LA102_0 <= 49) or LA102_0 == 51 or (54 <= LA102_0 <= 55) or (58 <= LA102_0 <= 59) or (91 <= LA102_0 <= 92) or (96 <= LA102_0 <= 106)) :
+ alt102 = 1
+ if alt102 == 1:
+ # JavaScript.g:0:0: statementList
+ pass
+ self._state.following.append(self.FOLLOW_statementList_in_defaultClause1116)
+ statementList215 = self.statementList()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statementList215.tree)
+
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 36, defaultClause_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "defaultClause"
+
+ class throwStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.throwStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "throwStatement"
+ # JavaScript.g:188:1: throwStatement : 'throw' expression ( LT | ';' ) ;
+ def throwStatement(self, ):
+
+ retval = self.throwStatement_return()
+ retval.start = self.input.LT(1)
+ throwStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal216 = None
+ set218 = None
+ expression217 = None
+
+
+ string_literal216_tree = None
+ set218_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 37):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:189:2: ( 'throw' expression ( LT | ';' ) )
+ # JavaScript.g:189:4: 'throw' expression ( LT | ';' )
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal216=self.match(self.input, 54, self.FOLLOW_54_in_throwStatement1129)
+ if self._state.backtracking == 0:
+
+ string_literal216_tree = self._adaptor.createWithPayload(string_literal216)
+ self._adaptor.addChild(root_0, string_literal216_tree)
+
+ self._state.following.append(self.FOLLOW_expression_in_throwStatement1131)
+ expression217 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression217.tree)
+ set218 = self.input.LT(1)
+ if self.input.LA(1) == LT or self.input.LA(1) == 38:
+ self.input.consume()
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 37, throwStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "throwStatement"
+
+ class tryStatement_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.tryStatement_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "tryStatement"
+ # JavaScript.g:192:1: tryStatement : 'try' ( LT )* statementBlock ( LT )* ( finallyClause | catchClause ( ( LT )* finallyClause )? ) ;
+ def tryStatement(self, ):
+
+ retval = self.tryStatement_return()
+ retval.start = self.input.LT(1)
+ tryStatement_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal219 = None
+ LT220 = None
+ LT222 = None
+ LT225 = None
+ statementBlock221 = None
+
+ finallyClause223 = None
+
+ catchClause224 = None
+
+ finallyClause226 = None
+
+
+ string_literal219_tree = None
+ LT220_tree = None
+ LT222_tree = None
+ LT225_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 38):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:193:2: ( 'try' ( LT )* statementBlock ( LT )* ( finallyClause | catchClause ( ( LT )* finallyClause )? ) )
+ # JavaScript.g:193:4: 'try' ( LT )* statementBlock ( LT )* ( finallyClause | catchClause ( ( LT )* finallyClause )? )
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal219=self.match(self.input, 55, self.FOLLOW_55_in_tryStatement1151)
+ if self._state.backtracking == 0:
+
+ string_literal219_tree = self._adaptor.createWithPayload(string_literal219)
+ self._adaptor.addChild(root_0, string_literal219_tree)
+
+ # JavaScript.g:193:12: ( LT )*
+ while True: #loop103
+ alt103 = 2
+ LA103_0 = self.input.LA(1)
+
+ if (LA103_0 == LT) :
+ alt103 = 1
+
+
+ if alt103 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT220=self.match(self.input, LT, self.FOLLOW_LT_in_tryStatement1153)
+
+
+ else:
+ break #loop103
+ self._state.following.append(self.FOLLOW_statementBlock_in_tryStatement1157)
+ statementBlock221 = self.statementBlock()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statementBlock221.tree)
+ # JavaScript.g:193:32: ( LT )*
+ while True: #loop104
+ alt104 = 2
+ LA104_0 = self.input.LA(1)
+
+ if (LA104_0 == LT) :
+ alt104 = 1
+
+
+ if alt104 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT222=self.match(self.input, LT, self.FOLLOW_LT_in_tryStatement1159)
+
+
+ else:
+ break #loop104
+ # JavaScript.g:193:35: ( finallyClause | catchClause ( ( LT )* finallyClause )? )
+ alt107 = 2
+ LA107_0 = self.input.LA(1)
+
+ if (LA107_0 == 57) :
+ alt107 = 1
+ elif (LA107_0 == 56) :
+ alt107 = 2
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 107, 0, self.input)
+
+ raise nvae
+
+ if alt107 == 1:
+ # JavaScript.g:193:36: finallyClause
+ pass
+ self._state.following.append(self.FOLLOW_finallyClause_in_tryStatement1164)
+ finallyClause223 = self.finallyClause()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, finallyClause223.tree)
+
+
+ elif alt107 == 2:
+ # JavaScript.g:193:52: catchClause ( ( LT )* finallyClause )?
+ pass
+ self._state.following.append(self.FOLLOW_catchClause_in_tryStatement1168)
+ catchClause224 = self.catchClause()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, catchClause224.tree)
+ # JavaScript.g:193:64: ( ( LT )* finallyClause )?
+ alt106 = 2
+ alt106 = self.dfa106.predict(self.input)
+ if alt106 == 1:
+ # JavaScript.g:193:65: ( LT )* finallyClause
+ pass
+ # JavaScript.g:193:67: ( LT )*
+ while True: #loop105
+ alt105 = 2
+ LA105_0 = self.input.LA(1)
+
+ if (LA105_0 == LT) :
+ alt105 = 1
+
+
+ if alt105 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT225=self.match(self.input, LT, self.FOLLOW_LT_in_tryStatement1171)
+
+
+ else:
+ break #loop105
+ self._state.following.append(self.FOLLOW_finallyClause_in_tryStatement1175)
+ finallyClause226 = self.finallyClause()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, finallyClause226.tree)
+
+
+
+
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 38, tryStatement_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "tryStatement"
+
+ class catchClause_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.catchClause_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "catchClause"
+ # JavaScript.g:196:1: catchClause : 'catch' ( LT )* '(' ( LT )* Identifier ( LT )* ')' ( LT )* statementBlock ;
+ def catchClause(self, ):
+
+ retval = self.catchClause_return()
+ retval.start = self.input.LT(1)
+ catchClause_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal227 = None
+ LT228 = None
+ char_literal229 = None
+ LT230 = None
+ Identifier231 = None
+ LT232 = None
+ char_literal233 = None
+ LT234 = None
+ statementBlock235 = None
+
+
+ string_literal227_tree = None
+ LT228_tree = None
+ char_literal229_tree = None
+ LT230_tree = None
+ Identifier231_tree = None
+ LT232_tree = None
+ char_literal233_tree = None
+ LT234_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 39):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:197:2: ( 'catch' ( LT )* '(' ( LT )* Identifier ( LT )* ')' ( LT )* statementBlock )
+ # JavaScript.g:197:4: 'catch' ( LT )* '(' ( LT )* Identifier ( LT )* ')' ( LT )* statementBlock
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal227=self.match(self.input, 56, self.FOLLOW_56_in_catchClause1196)
+ if self._state.backtracking == 0:
+
+ string_literal227_tree = self._adaptor.createWithPayload(string_literal227)
+ self._adaptor.addChild(root_0, string_literal227_tree)
+
+ # JavaScript.g:197:14: ( LT )*
+ while True: #loop108
+ alt108 = 2
+ LA108_0 = self.input.LA(1)
+
+ if (LA108_0 == LT) :
+ alt108 = 1
+
+
+ if alt108 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT228=self.match(self.input, LT, self.FOLLOW_LT_in_catchClause1198)
+
+
+ else:
+ break #loop108
+ char_literal229=self.match(self.input, 32, self.FOLLOW_32_in_catchClause1202)
+ if self._state.backtracking == 0:
+
+ char_literal229_tree = self._adaptor.createWithPayload(char_literal229)
+ self._adaptor.addChild(root_0, char_literal229_tree)
+
+ # JavaScript.g:197:23: ( LT )*
+ while True: #loop109
+ alt109 = 2
+ LA109_0 = self.input.LA(1)
+
+ if (LA109_0 == LT) :
+ alt109 = 1
+
+
+ if alt109 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT230=self.match(self.input, LT, self.FOLLOW_LT_in_catchClause1204)
+
+
+ else:
+ break #loop109
+ Identifier231=self.match(self.input, Identifier, self.FOLLOW_Identifier_in_catchClause1208)
+ if self._state.backtracking == 0:
+
+ Identifier231_tree = self._adaptor.createWithPayload(Identifier231)
+ self._adaptor.addChild(root_0, Identifier231_tree)
+
+ # JavaScript.g:197:39: ( LT )*
+ while True: #loop110
+ alt110 = 2
+ LA110_0 = self.input.LA(1)
+
+ if (LA110_0 == LT) :
+ alt110 = 1
+
+
+ if alt110 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT232=self.match(self.input, LT, self.FOLLOW_LT_in_catchClause1210)
+
+
+ else:
+ break #loop110
+ char_literal233=self.match(self.input, 34, self.FOLLOW_34_in_catchClause1214)
+ if self._state.backtracking == 0:
+
+ char_literal233_tree = self._adaptor.createWithPayload(char_literal233)
+ self._adaptor.addChild(root_0, char_literal233_tree)
+
+ # JavaScript.g:197:48: ( LT )*
+ while True: #loop111
+ alt111 = 2
+ LA111_0 = self.input.LA(1)
+
+ if (LA111_0 == LT) :
+ alt111 = 1
+
+
+ if alt111 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT234=self.match(self.input, LT, self.FOLLOW_LT_in_catchClause1216)
+
+
+ else:
+ break #loop111
+ self._state.following.append(self.FOLLOW_statementBlock_in_catchClause1220)
+ statementBlock235 = self.statementBlock()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statementBlock235.tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 39, catchClause_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "catchClause"
+
+ class finallyClause_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.finallyClause_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "finallyClause"
+ # JavaScript.g:200:1: finallyClause : 'finally' ( LT )* statementBlock ;
+ def finallyClause(self, ):
+
+ retval = self.finallyClause_return()
+ retval.start = self.input.LT(1)
+ finallyClause_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal236 = None
+ LT237 = None
+ statementBlock238 = None
+
+
+ string_literal236_tree = None
+ LT237_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 40):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:201:2: ( 'finally' ( LT )* statementBlock )
+ # JavaScript.g:201:4: 'finally' ( LT )* statementBlock
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal236=self.match(self.input, 57, self.FOLLOW_57_in_finallyClause1232)
+ if self._state.backtracking == 0:
+
+ string_literal236_tree = self._adaptor.createWithPayload(string_literal236)
+ self._adaptor.addChild(root_0, string_literal236_tree)
+
+ # JavaScript.g:201:16: ( LT )*
+ while True: #loop112
+ alt112 = 2
+ LA112_0 = self.input.LA(1)
+
+ if (LA112_0 == LT) :
+ alt112 = 1
+
+
+ if alt112 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT237=self.match(self.input, LT, self.FOLLOW_LT_in_finallyClause1234)
+
+
+ else:
+ break #loop112
+ self._state.following.append(self.FOLLOW_statementBlock_in_finallyClause1238)
+ statementBlock238 = self.statementBlock()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, statementBlock238.tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 40, finallyClause_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "finallyClause"
+
+ class expression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.expression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "expression"
+ # JavaScript.g:205:1: expression : assignmentExpression ( ( LT )* ',' ( LT )* assignmentExpression )* ;
+ def expression(self, ):
+
+ retval = self.expression_return()
+ retval.start = self.input.LT(1)
+ expression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT240 = None
+ char_literal241 = None
+ LT242 = None
+ assignmentExpression239 = None
+
+ assignmentExpression243 = None
+
+
+ LT240_tree = None
+ char_literal241_tree = None
+ LT242_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 41):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:206:2: ( assignmentExpression ( ( LT )* ',' ( LT )* assignmentExpression )* )
+ # JavaScript.g:206:4: assignmentExpression ( ( LT )* ',' ( LT )* assignmentExpression )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_assignmentExpression_in_expression1250)
+ assignmentExpression239 = self.assignmentExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpression239.tree)
+ # JavaScript.g:206:25: ( ( LT )* ',' ( LT )* assignmentExpression )*
+ while True: #loop115
+ alt115 = 2
+ alt115 = self.dfa115.predict(self.input)
+ if alt115 == 1:
+ # JavaScript.g:206:26: ( LT )* ',' ( LT )* assignmentExpression
+ pass
+ # JavaScript.g:206:28: ( LT )*
+ while True: #loop113
+ alt113 = 2
+ LA113_0 = self.input.LA(1)
+
+ if (LA113_0 == LT) :
+ alt113 = 1
+
+
+ if alt113 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT240=self.match(self.input, LT, self.FOLLOW_LT_in_expression1253)
+
+
+ else:
+ break #loop113
+ char_literal241=self.match(self.input, 33, self.FOLLOW_33_in_expression1257)
+ if self._state.backtracking == 0:
+
+ char_literal241_tree = self._adaptor.createWithPayload(char_literal241)
+ self._adaptor.addChild(root_0, char_literal241_tree)
+
+ # JavaScript.g:206:37: ( LT )*
+ while True: #loop114
+ alt114 = 2
+ LA114_0 = self.input.LA(1)
+
+ if (LA114_0 == LT) :
+ alt114 = 1
+
+
+ if alt114 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT242=self.match(self.input, LT, self.FOLLOW_LT_in_expression1259)
+
+
+ else:
+ break #loop114
+ self._state.following.append(self.FOLLOW_assignmentExpression_in_expression1263)
+ assignmentExpression243 = self.assignmentExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpression243.tree)
+
+
+ else:
+ break #loop115
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 41, expression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "expression"
+
+ class expressionNoIn_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.expressionNoIn_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "expressionNoIn"
+ # JavaScript.g:209:1: expressionNoIn : assignmentExpressionNoIn ( ( LT )* ',' ( LT )* assignmentExpressionNoIn )* ;
+ def expressionNoIn(self, ):
+
+ retval = self.expressionNoIn_return()
+ retval.start = self.input.LT(1)
+ expressionNoIn_StartIndex = self.input.index()
+ root_0 = None
+
+ LT245 = None
+ char_literal246 = None
+ LT247 = None
+ assignmentExpressionNoIn244 = None
+
+ assignmentExpressionNoIn248 = None
+
+
+ LT245_tree = None
+ char_literal246_tree = None
+ LT247_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 42):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:210:2: ( assignmentExpressionNoIn ( ( LT )* ',' ( LT )* assignmentExpressionNoIn )* )
+ # JavaScript.g:210:4: assignmentExpressionNoIn ( ( LT )* ',' ( LT )* assignmentExpressionNoIn )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_assignmentExpressionNoIn_in_expressionNoIn1277)
+ assignmentExpressionNoIn244 = self.assignmentExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpressionNoIn244.tree)
+ # JavaScript.g:210:29: ( ( LT )* ',' ( LT )* assignmentExpressionNoIn )*
+ while True: #loop118
+ alt118 = 2
+ alt118 = self.dfa118.predict(self.input)
+ if alt118 == 1:
+ # JavaScript.g:210:30: ( LT )* ',' ( LT )* assignmentExpressionNoIn
+ pass
+ # JavaScript.g:210:32: ( LT )*
+ while True: #loop116
+ alt116 = 2
+ LA116_0 = self.input.LA(1)
+
+ if (LA116_0 == LT) :
+ alt116 = 1
+
+
+ if alt116 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT245=self.match(self.input, LT, self.FOLLOW_LT_in_expressionNoIn1280)
+
+
+ else:
+ break #loop116
+ char_literal246=self.match(self.input, 33, self.FOLLOW_33_in_expressionNoIn1284)
+ if self._state.backtracking == 0:
+
+ char_literal246_tree = self._adaptor.createWithPayload(char_literal246)
+ self._adaptor.addChild(root_0, char_literal246_tree)
+
+ # JavaScript.g:210:41: ( LT )*
+ while True: #loop117
+ alt117 = 2
+ LA117_0 = self.input.LA(1)
+
+ if (LA117_0 == LT) :
+ alt117 = 1
+
+
+ if alt117 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT247=self.match(self.input, LT, self.FOLLOW_LT_in_expressionNoIn1286)
+
+
+ else:
+ break #loop117
+ self._state.following.append(self.FOLLOW_assignmentExpressionNoIn_in_expressionNoIn1290)
+ assignmentExpressionNoIn248 = self.assignmentExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpressionNoIn248.tree)
+
+
+ else:
+ break #loop118
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 42, expressionNoIn_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "expressionNoIn"
+
+ class assignmentExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.assignmentExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "assignmentExpression"
+ # JavaScript.g:213:1: assignmentExpression : ( conditionalExpression | leftHandSideExpression ( LT )* assignmentOperator ( LT )* assignmentExpression );
+ def assignmentExpression(self, ):
+
+ retval = self.assignmentExpression_return()
+ retval.start = self.input.LT(1)
+ assignmentExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT251 = None
+ LT253 = None
+ conditionalExpression249 = None
+
+ leftHandSideExpression250 = None
+
+ assignmentOperator252 = None
+
+ assignmentExpression254 = None
+
+
+ LT251_tree = None
+ LT253_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 43):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:214:2: ( conditionalExpression | leftHandSideExpression ( LT )* assignmentOperator ( LT )* assignmentExpression )
+ alt121 = 2
+ alt121 = self.dfa121.predict(self.input)
+ if alt121 == 1:
+ # JavaScript.g:214:4: conditionalExpression
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_conditionalExpression_in_assignmentExpression1304)
+ conditionalExpression249 = self.conditionalExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, conditionalExpression249.tree)
+
+
+ elif alt121 == 2:
+ # JavaScript.g:215:4: leftHandSideExpression ( LT )* assignmentOperator ( LT )* assignmentExpression
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_leftHandSideExpression_in_assignmentExpression1309)
+ leftHandSideExpression250 = self.leftHandSideExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, leftHandSideExpression250.tree)
+ # JavaScript.g:215:29: ( LT )*
+ while True: #loop119
+ alt119 = 2
+ LA119_0 = self.input.LA(1)
+
+ if (LA119_0 == LT) :
+ alt119 = 1
+
+
+ if alt119 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT251=self.match(self.input, LT, self.FOLLOW_LT_in_assignmentExpression1311)
+
+
+ else:
+ break #loop119
+ self._state.following.append(self.FOLLOW_assignmentOperator_in_assignmentExpression1315)
+ assignmentOperator252 = self.assignmentOperator()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentOperator252.tree)
+ # JavaScript.g:215:53: ( LT )*
+ while True: #loop120
+ alt120 = 2
+ LA120_0 = self.input.LA(1)
+
+ if (LA120_0 == LT) :
+ alt120 = 1
+
+
+ if alt120 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT253=self.match(self.input, LT, self.FOLLOW_LT_in_assignmentExpression1317)
+
+
+ else:
+ break #loop120
+ self._state.following.append(self.FOLLOW_assignmentExpression_in_assignmentExpression1321)
+ assignmentExpression254 = self.assignmentExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpression254.tree)
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 43, assignmentExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "assignmentExpression"
+
+ class assignmentExpressionNoIn_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.assignmentExpressionNoIn_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "assignmentExpressionNoIn"
+ # JavaScript.g:218:1: assignmentExpressionNoIn : ( conditionalExpressionNoIn | leftHandSideExpression ( LT )* assignmentOperator ( LT )* assignmentExpressionNoIn );
+ def assignmentExpressionNoIn(self, ):
+
+ retval = self.assignmentExpressionNoIn_return()
+ retval.start = self.input.LT(1)
+ assignmentExpressionNoIn_StartIndex = self.input.index()
+ root_0 = None
+
+ LT257 = None
+ LT259 = None
+ conditionalExpressionNoIn255 = None
+
+ leftHandSideExpression256 = None
+
+ assignmentOperator258 = None
+
+ assignmentExpressionNoIn260 = None
+
+
+ LT257_tree = None
+ LT259_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 44):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:219:2: ( conditionalExpressionNoIn | leftHandSideExpression ( LT )* assignmentOperator ( LT )* assignmentExpressionNoIn )
+ alt124 = 2
+ alt124 = self.dfa124.predict(self.input)
+ if alt124 == 1:
+ # JavaScript.g:219:4: conditionalExpressionNoIn
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_conditionalExpressionNoIn_in_assignmentExpressionNoIn1333)
+ conditionalExpressionNoIn255 = self.conditionalExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, conditionalExpressionNoIn255.tree)
+
+
+ elif alt124 == 2:
+ # JavaScript.g:220:4: leftHandSideExpression ( LT )* assignmentOperator ( LT )* assignmentExpressionNoIn
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_leftHandSideExpression_in_assignmentExpressionNoIn1338)
+ leftHandSideExpression256 = self.leftHandSideExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, leftHandSideExpression256.tree)
+ # JavaScript.g:220:29: ( LT )*
+ while True: #loop122
+ alt122 = 2
+ LA122_0 = self.input.LA(1)
+
+ if (LA122_0 == LT) :
+ alt122 = 1
+
+
+ if alt122 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT257=self.match(self.input, LT, self.FOLLOW_LT_in_assignmentExpressionNoIn1340)
+
+
+ else:
+ break #loop122
+ self._state.following.append(self.FOLLOW_assignmentOperator_in_assignmentExpressionNoIn1344)
+ assignmentOperator258 = self.assignmentOperator()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentOperator258.tree)
+ # JavaScript.g:220:53: ( LT )*
+ while True: #loop123
+ alt123 = 2
+ LA123_0 = self.input.LA(1)
+
+ if (LA123_0 == LT) :
+ alt123 = 1
+
+
+ if alt123 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT259=self.match(self.input, LT, self.FOLLOW_LT_in_assignmentExpressionNoIn1346)
+
+
+ else:
+ break #loop123
+ self._state.following.append(self.FOLLOW_assignmentExpressionNoIn_in_assignmentExpressionNoIn1350)
+ assignmentExpressionNoIn260 = self.assignmentExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpressionNoIn260.tree)
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 44, assignmentExpressionNoIn_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "assignmentExpressionNoIn"
+
+ class leftHandSideExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.leftHandSideExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "leftHandSideExpression"
+ # JavaScript.g:223:1: leftHandSideExpression : ( callExpression | newExpression );
+ def leftHandSideExpression(self, ):
+
+ retval = self.leftHandSideExpression_return()
+ retval.start = self.input.LT(1)
+ leftHandSideExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ callExpression261 = None
+
+ newExpression262 = None
+
+
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 45):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:224:2: ( callExpression | newExpression )
+ alt125 = 2
+ alt125 = self.dfa125.predict(self.input)
+ if alt125 == 1:
+ # JavaScript.g:224:4: callExpression
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_callExpression_in_leftHandSideExpression1362)
+ callExpression261 = self.callExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, callExpression261.tree)
+
+
+ elif alt125 == 2:
+ # JavaScript.g:225:4: newExpression
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_newExpression_in_leftHandSideExpression1367)
+ newExpression262 = self.newExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, newExpression262.tree)
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 45, leftHandSideExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "leftHandSideExpression"
+
+ class newExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.newExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "newExpression"
+ # JavaScript.g:228:1: newExpression : ( memberExpression | 'new' ( LT )* newExpression );
+ def newExpression(self, ):
+
+ retval = self.newExpression_return()
+ retval.start = self.input.LT(1)
+ newExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal264 = None
+ LT265 = None
+ memberExpression263 = None
+
+ newExpression266 = None
+
+
+ string_literal264_tree = None
+ LT265_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 46):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:229:2: ( memberExpression | 'new' ( LT )* newExpression )
+ alt127 = 2
+ alt127 = self.dfa127.predict(self.input)
+ if alt127 == 1:
+ # JavaScript.g:229:4: memberExpression
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_memberExpression_in_newExpression1379)
+ memberExpression263 = self.memberExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, memberExpression263.tree)
+
+
+ elif alt127 == 2:
+ # JavaScript.g:230:4: 'new' ( LT )* newExpression
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal264=self.match(self.input, 58, self.FOLLOW_58_in_newExpression1384)
+ if self._state.backtracking == 0:
+
+ string_literal264_tree = self._adaptor.createWithPayload(string_literal264)
+ self._adaptor.addChild(root_0, string_literal264_tree)
+
+ # JavaScript.g:230:12: ( LT )*
+ while True: #loop126
+ alt126 = 2
+ LA126_0 = self.input.LA(1)
+
+ if (LA126_0 == LT) :
+ alt126 = 1
+
+
+ if alt126 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT265=self.match(self.input, LT, self.FOLLOW_LT_in_newExpression1386)
+
+
+ else:
+ break #loop126
+ self._state.following.append(self.FOLLOW_newExpression_in_newExpression1390)
+ newExpression266 = self.newExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, newExpression266.tree)
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 46, newExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "newExpression"
+
+ class memberExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.memberExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "memberExpression"
+ # JavaScript.g:233:1: memberExpression : ( primaryExpression | functionExpression | 'new' ( LT )* memberExpression ( LT )* arguments ) ( ( LT )* memberExpressionSuffix )* ;
+ def memberExpression(self, ):
+
+ retval = self.memberExpression_return()
+ retval.start = self.input.LT(1)
+ memberExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal269 = None
+ LT270 = None
+ LT272 = None
+ LT274 = None
+ primaryExpression267 = None
+
+ functionExpression268 = None
+
+ memberExpression271 = None
+
+ arguments273 = None
+
+ memberExpressionSuffix275 = None
+
+
+ string_literal269_tree = None
+ LT270_tree = None
+ LT272_tree = None
+ LT274_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 47):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:234:2: ( ( primaryExpression | functionExpression | 'new' ( LT )* memberExpression ( LT )* arguments ) ( ( LT )* memberExpressionSuffix )* )
+ # JavaScript.g:234:4: ( primaryExpression | functionExpression | 'new' ( LT )* memberExpression ( LT )* arguments ) ( ( LT )* memberExpressionSuffix )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ # JavaScript.g:234:4: ( primaryExpression | functionExpression | 'new' ( LT )* memberExpression ( LT )* arguments )
+ alt130 = 3
+ LA130 = self.input.LA(1)
+ if LA130 == Identifier or LA130 == StringLiteral or LA130 == NumericLiteral or LA130 == 32 or LA130 == 35 or LA130 == 59 or LA130 == 103 or LA130 == 104 or LA130 == 105 or LA130 == 106:
+ alt130 = 1
+ elif LA130 == 31:
+ alt130 = 2
+ elif LA130 == 58:
+ alt130 = 3
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 130, 0, self.input)
+
+ raise nvae
+
+ if alt130 == 1:
+ # JavaScript.g:234:5: primaryExpression
+ pass
+ self._state.following.append(self.FOLLOW_primaryExpression_in_memberExpression1403)
+ primaryExpression267 = self.primaryExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, primaryExpression267.tree)
+
+
+ elif alt130 == 2:
+ # JavaScript.g:234:25: functionExpression
+ pass
+ self._state.following.append(self.FOLLOW_functionExpression_in_memberExpression1407)
+ functionExpression268 = self.functionExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, functionExpression268.tree)
+
+
+ elif alt130 == 3:
+ # JavaScript.g:234:46: 'new' ( LT )* memberExpression ( LT )* arguments
+ pass
+ string_literal269=self.match(self.input, 58, self.FOLLOW_58_in_memberExpression1411)
+ if self._state.backtracking == 0:
+
+ string_literal269_tree = self._adaptor.createWithPayload(string_literal269)
+ self._adaptor.addChild(root_0, string_literal269_tree)
+
+ # JavaScript.g:234:54: ( LT )*
+ while True: #loop128
+ alt128 = 2
+ LA128_0 = self.input.LA(1)
+
+ if (LA128_0 == LT) :
+ alt128 = 1
+
+
+ if alt128 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT270=self.match(self.input, LT, self.FOLLOW_LT_in_memberExpression1413)
+
+
+ else:
+ break #loop128
+ self._state.following.append(self.FOLLOW_memberExpression_in_memberExpression1417)
+ memberExpression271 = self.memberExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, memberExpression271.tree)
+ # JavaScript.g:234:76: ( LT )*
+ while True: #loop129
+ alt129 = 2
+ LA129_0 = self.input.LA(1)
+
+ if (LA129_0 == LT) :
+ alt129 = 1
+
+
+ if alt129 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT272=self.match(self.input, LT, self.FOLLOW_LT_in_memberExpression1419)
+
+
+ else:
+ break #loop129
+ self._state.following.append(self.FOLLOW_arguments_in_memberExpression1423)
+ arguments273 = self.arguments()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, arguments273.tree)
+
+
+
+ # JavaScript.g:234:90: ( ( LT )* memberExpressionSuffix )*
+ while True: #loop132
+ alt132 = 2
+ alt132 = self.dfa132.predict(self.input)
+ if alt132 == 1:
+ # JavaScript.g:234:91: ( LT )* memberExpressionSuffix
+ pass
+ # JavaScript.g:234:93: ( LT )*
+ while True: #loop131
+ alt131 = 2
+ LA131_0 = self.input.LA(1)
+
+ if (LA131_0 == LT) :
+ alt131 = 1
+
+
+ if alt131 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT274=self.match(self.input, LT, self.FOLLOW_LT_in_memberExpression1427)
+
+
+ else:
+ break #loop131
+ self._state.following.append(self.FOLLOW_memberExpressionSuffix_in_memberExpression1431)
+ memberExpressionSuffix275 = self.memberExpressionSuffix()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, memberExpressionSuffix275.tree)
+
+
+ else:
+ break #loop132
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 47, memberExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "memberExpression"
+
+ class memberExpressionSuffix_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.memberExpressionSuffix_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "memberExpressionSuffix"
+ # JavaScript.g:237:1: memberExpressionSuffix : ( indexSuffix | propertyReferenceSuffix );
+ def memberExpressionSuffix(self, ):
+
+ retval = self.memberExpressionSuffix_return()
+ retval.start = self.input.LT(1)
+ memberExpressionSuffix_StartIndex = self.input.index()
+ root_0 = None
+
+ indexSuffix276 = None
+
+ propertyReferenceSuffix277 = None
+
+
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 48):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:238:2: ( indexSuffix | propertyReferenceSuffix )
+ alt133 = 2
+ LA133_0 = self.input.LA(1)
+
+ if (LA133_0 == 59) :
+ alt133 = 1
+ elif (LA133_0 == 61) :
+ alt133 = 2
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 133, 0, self.input)
+
+ raise nvae
+
+ if alt133 == 1:
+ # JavaScript.g:238:4: indexSuffix
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_indexSuffix_in_memberExpressionSuffix1445)
+ indexSuffix276 = self.indexSuffix()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, indexSuffix276.tree)
+
+
+ elif alt133 == 2:
+ # JavaScript.g:239:4: propertyReferenceSuffix
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_propertyReferenceSuffix_in_memberExpressionSuffix1450)
+ propertyReferenceSuffix277 = self.propertyReferenceSuffix()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, propertyReferenceSuffix277.tree)
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 48, memberExpressionSuffix_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "memberExpressionSuffix"
+
+ class callExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.callExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "callExpression"
+ # JavaScript.g:242:1: callExpression : memberExpression ( LT )* arguments ( ( LT )* callExpressionSuffix )* ;
+ def callExpression(self, ):
+
+ retval = self.callExpression_return()
+ retval.start = self.input.LT(1)
+ callExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT279 = None
+ LT281 = None
+ memberExpression278 = None
+
+ arguments280 = None
+
+ callExpressionSuffix282 = None
+
+
+ LT279_tree = None
+ LT281_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 49):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:243:2: ( memberExpression ( LT )* arguments ( ( LT )* callExpressionSuffix )* )
+ # JavaScript.g:243:4: memberExpression ( LT )* arguments ( ( LT )* callExpressionSuffix )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_memberExpression_in_callExpression1461)
+ memberExpression278 = self.memberExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, memberExpression278.tree)
+ # JavaScript.g:243:23: ( LT )*
+ while True: #loop134
+ alt134 = 2
+ LA134_0 = self.input.LA(1)
+
+ if (LA134_0 == LT) :
+ alt134 = 1
+
+
+ if alt134 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT279=self.match(self.input, LT, self.FOLLOW_LT_in_callExpression1463)
+
+
+ else:
+ break #loop134
+ self._state.following.append(self.FOLLOW_arguments_in_callExpression1467)
+ arguments280 = self.arguments()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, arguments280.tree)
+ # JavaScript.g:243:36: ( ( LT )* callExpressionSuffix )*
+ while True: #loop136
+ alt136 = 2
+ alt136 = self.dfa136.predict(self.input)
+ if alt136 == 1:
+ # JavaScript.g:243:37: ( LT )* callExpressionSuffix
+ pass
+ # JavaScript.g:243:39: ( LT )*
+ while True: #loop135
+ alt135 = 2
+ LA135_0 = self.input.LA(1)
+
+ if (LA135_0 == LT) :
+ alt135 = 1
+
+
+ if alt135 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT281=self.match(self.input, LT, self.FOLLOW_LT_in_callExpression1470)
+
+
+ else:
+ break #loop135
+ self._state.following.append(self.FOLLOW_callExpressionSuffix_in_callExpression1474)
+ callExpressionSuffix282 = self.callExpressionSuffix()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, callExpressionSuffix282.tree)
+
+
+ else:
+ break #loop136
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 49, callExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "callExpression"
+
+ class callExpressionSuffix_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.callExpressionSuffix_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "callExpressionSuffix"
+ # JavaScript.g:246:1: callExpressionSuffix : ( arguments | indexSuffix | propertyReferenceSuffix );
+ def callExpressionSuffix(self, ):
+
+ retval = self.callExpressionSuffix_return()
+ retval.start = self.input.LT(1)
+ callExpressionSuffix_StartIndex = self.input.index()
+ root_0 = None
+
+ arguments283 = None
+
+ indexSuffix284 = None
+
+ propertyReferenceSuffix285 = None
+
+
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 50):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:247:2: ( arguments | indexSuffix | propertyReferenceSuffix )
+ alt137 = 3
+ LA137 = self.input.LA(1)
+ if LA137 == 32:
+ alt137 = 1
+ elif LA137 == 59:
+ alt137 = 2
+ elif LA137 == 61:
+ alt137 = 3
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 137, 0, self.input)
+
+ raise nvae
+
+ if alt137 == 1:
+ # JavaScript.g:247:4: arguments
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_arguments_in_callExpressionSuffix1488)
+ arguments283 = self.arguments()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, arguments283.tree)
+
+
+ elif alt137 == 2:
+ # JavaScript.g:248:4: indexSuffix
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_indexSuffix_in_callExpressionSuffix1493)
+ indexSuffix284 = self.indexSuffix()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, indexSuffix284.tree)
+
+
+ elif alt137 == 3:
+ # JavaScript.g:249:4: propertyReferenceSuffix
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_propertyReferenceSuffix_in_callExpressionSuffix1498)
+ propertyReferenceSuffix285 = self.propertyReferenceSuffix()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, propertyReferenceSuffix285.tree)
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 50, callExpressionSuffix_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "callExpressionSuffix"
+
+ class arguments_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.arguments_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "arguments"
+ # JavaScript.g:252:1: arguments : '(' ( ( LT )* assignmentExpression ( ( LT )* ',' ( LT )* assignmentExpression )* )? ( LT )* ')' ;
+ def arguments(self, ):
+
+ retval = self.arguments_return()
+ retval.start = self.input.LT(1)
+ arguments_StartIndex = self.input.index()
+ root_0 = None
+
+ char_literal286 = None
+ LT287 = None
+ LT289 = None
+ char_literal290 = None
+ LT291 = None
+ LT293 = None
+ char_literal294 = None
+ assignmentExpression288 = None
+
+ assignmentExpression292 = None
+
+
+ char_literal286_tree = None
+ LT287_tree = None
+ LT289_tree = None
+ char_literal290_tree = None
+ LT291_tree = None
+ LT293_tree = None
+ char_literal294_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 51):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:253:2: ( '(' ( ( LT )* assignmentExpression ( ( LT )* ',' ( LT )* assignmentExpression )* )? ( LT )* ')' )
+ # JavaScript.g:253:4: '(' ( ( LT )* assignmentExpression ( ( LT )* ',' ( LT )* assignmentExpression )* )? ( LT )* ')'
+ pass
+ root_0 = self._adaptor.nil()
+
+ char_literal286=self.match(self.input, 32, self.FOLLOW_32_in_arguments1509)
+ if self._state.backtracking == 0:
+
+ char_literal286_tree = self._adaptor.createWithPayload(char_literal286)
+ self._adaptor.addChild(root_0, char_literal286_tree)
+
+ # JavaScript.g:253:8: ( ( LT )* assignmentExpression ( ( LT )* ',' ( LT )* assignmentExpression )* )?
+ alt142 = 2
+ alt142 = self.dfa142.predict(self.input)
+ if alt142 == 1:
+ # JavaScript.g:253:9: ( LT )* assignmentExpression ( ( LT )* ',' ( LT )* assignmentExpression )*
+ pass
+ # JavaScript.g:253:11: ( LT )*
+ while True: #loop138
+ alt138 = 2
+ LA138_0 = self.input.LA(1)
+
+ if (LA138_0 == LT) :
+ alt138 = 1
+
+
+ if alt138 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT287=self.match(self.input, LT, self.FOLLOW_LT_in_arguments1512)
+
+
+ else:
+ break #loop138
+ self._state.following.append(self.FOLLOW_assignmentExpression_in_arguments1516)
+ assignmentExpression288 = self.assignmentExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpression288.tree)
+ # JavaScript.g:253:35: ( ( LT )* ',' ( LT )* assignmentExpression )*
+ while True: #loop141
+ alt141 = 2
+ alt141 = self.dfa141.predict(self.input)
+ if alt141 == 1:
+ # JavaScript.g:253:36: ( LT )* ',' ( LT )* assignmentExpression
+ pass
+ # JavaScript.g:253:38: ( LT )*
+ while True: #loop139
+ alt139 = 2
+ LA139_0 = self.input.LA(1)
+
+ if (LA139_0 == LT) :
+ alt139 = 1
+
+
+ if alt139 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT289=self.match(self.input, LT, self.FOLLOW_LT_in_arguments1519)
+
+
+ else:
+ break #loop139
+ char_literal290=self.match(self.input, 33, self.FOLLOW_33_in_arguments1523)
+ if self._state.backtracking == 0:
+
+ char_literal290_tree = self._adaptor.createWithPayload(char_literal290)
+ self._adaptor.addChild(root_0, char_literal290_tree)
+
+ # JavaScript.g:253:47: ( LT )*
+ while True: #loop140
+ alt140 = 2
+ LA140_0 = self.input.LA(1)
+
+ if (LA140_0 == LT) :
+ alt140 = 1
+
+
+ if alt140 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT291=self.match(self.input, LT, self.FOLLOW_LT_in_arguments1525)
+
+
+ else:
+ break #loop140
+ self._state.following.append(self.FOLLOW_assignmentExpression_in_arguments1529)
+ assignmentExpression292 = self.assignmentExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpression292.tree)
+
+
+ else:
+ break #loop141
+
+
+
+ # JavaScript.g:253:77: ( LT )*
+ while True: #loop143
+ alt143 = 2
+ LA143_0 = self.input.LA(1)
+
+ if (LA143_0 == LT) :
+ alt143 = 1
+
+
+ if alt143 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT293=self.match(self.input, LT, self.FOLLOW_LT_in_arguments1535)
+
+
+ else:
+ break #loop143
+ char_literal294=self.match(self.input, 34, self.FOLLOW_34_in_arguments1539)
+ if self._state.backtracking == 0:
+
+ char_literal294_tree = self._adaptor.createWithPayload(char_literal294)
+ self._adaptor.addChild(root_0, char_literal294_tree)
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 51, arguments_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "arguments"
+
+ class indexSuffix_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.indexSuffix_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "indexSuffix"
+ # JavaScript.g:256:1: indexSuffix : '[' ( LT )* expression ( LT )* ']' ;
+ def indexSuffix(self, ):
+
+ retval = self.indexSuffix_return()
+ retval.start = self.input.LT(1)
+ indexSuffix_StartIndex = self.input.index()
+ root_0 = None
+
+ char_literal295 = None
+ LT296 = None
+ LT298 = None
+ char_literal299 = None
+ expression297 = None
+
+
+ char_literal295_tree = None
+ LT296_tree = None
+ LT298_tree = None
+ char_literal299_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 52):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:257:2: ( '[' ( LT )* expression ( LT )* ']' )
+ # JavaScript.g:257:4: '[' ( LT )* expression ( LT )* ']'
+ pass
+ root_0 = self._adaptor.nil()
+
+ char_literal295=self.match(self.input, 59, self.FOLLOW_59_in_indexSuffix1551)
+ if self._state.backtracking == 0:
+
+ char_literal295_tree = self._adaptor.createWithPayload(char_literal295)
+ self._adaptor.addChild(root_0, char_literal295_tree)
+
+ # JavaScript.g:257:10: ( LT )*
+ while True: #loop144
+ alt144 = 2
+ LA144_0 = self.input.LA(1)
+
+ if (LA144_0 == LT) :
+ alt144 = 1
+
+
+ if alt144 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT296=self.match(self.input, LT, self.FOLLOW_LT_in_indexSuffix1553)
+
+
+ else:
+ break #loop144
+ self._state.following.append(self.FOLLOW_expression_in_indexSuffix1557)
+ expression297 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression297.tree)
+ # JavaScript.g:257:26: ( LT )*
+ while True: #loop145
+ alt145 = 2
+ LA145_0 = self.input.LA(1)
+
+ if (LA145_0 == LT) :
+ alt145 = 1
+
+
+ if alt145 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT298=self.match(self.input, LT, self.FOLLOW_LT_in_indexSuffix1559)
+
+
+ else:
+ break #loop145
+ char_literal299=self.match(self.input, 60, self.FOLLOW_60_in_indexSuffix1563)
+ if self._state.backtracking == 0:
+
+ char_literal299_tree = self._adaptor.createWithPayload(char_literal299)
+ self._adaptor.addChild(root_0, char_literal299_tree)
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 52, indexSuffix_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "indexSuffix"
+
+ class propertyReferenceSuffix_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.propertyReferenceSuffix_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "propertyReferenceSuffix"
+ # JavaScript.g:260:1: propertyReferenceSuffix : '.' ( LT )* Identifier ;
+ def propertyReferenceSuffix(self, ):
+
+ retval = self.propertyReferenceSuffix_return()
+ retval.start = self.input.LT(1)
+ propertyReferenceSuffix_StartIndex = self.input.index()
+ root_0 = None
+
+ char_literal300 = None
+ LT301 = None
+ Identifier302 = None
+
+ char_literal300_tree = None
+ LT301_tree = None
+ Identifier302_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 53):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:261:2: ( '.' ( LT )* Identifier )
+ # JavaScript.g:261:4: '.' ( LT )* Identifier
+ pass
+ root_0 = self._adaptor.nil()
+
+ char_literal300=self.match(self.input, 61, self.FOLLOW_61_in_propertyReferenceSuffix1576)
+ if self._state.backtracking == 0:
+
+ char_literal300_tree = self._adaptor.createWithPayload(char_literal300)
+ self._adaptor.addChild(root_0, char_literal300_tree)
+
+ # JavaScript.g:261:10: ( LT )*
+ while True: #loop146
+ alt146 = 2
+ LA146_0 = self.input.LA(1)
+
+ if (LA146_0 == LT) :
+ alt146 = 1
+
+
+ if alt146 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT301=self.match(self.input, LT, self.FOLLOW_LT_in_propertyReferenceSuffix1578)
+
+
+ else:
+ break #loop146
+ Identifier302=self.match(self.input, Identifier, self.FOLLOW_Identifier_in_propertyReferenceSuffix1582)
+ if self._state.backtracking == 0:
+
+ Identifier302_tree = self._adaptor.createWithPayload(Identifier302)
+ self._adaptor.addChild(root_0, Identifier302_tree)
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 53, propertyReferenceSuffix_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "propertyReferenceSuffix"
+
+ class assignmentOperator_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.assignmentOperator_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "assignmentOperator"
+ # JavaScript.g:264:1: assignmentOperator : ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '>>>=' | '&=' | '^=' | '|=' );
+ def assignmentOperator(self, ):
+
+ retval = self.assignmentOperator_return()
+ retval.start = self.input.LT(1)
+ assignmentOperator_StartIndex = self.input.index()
+ root_0 = None
+
+ set303 = None
+
+ set303_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 54):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:265:2: ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '>>>=' | '&=' | '^=' | '|=' )
+ # JavaScript.g:
+ pass
+ root_0 = self._adaptor.nil()
+
+ set303 = self.input.LT(1)
+ if self.input.LA(1) == 39 or (62 <= self.input.LA(1) <= 72):
+ self.input.consume()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, self._adaptor.createWithPayload(set303))
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 54, assignmentOperator_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "assignmentOperator"
+
+ class conditionalExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.conditionalExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "conditionalExpression"
+ # JavaScript.g:268:1: conditionalExpression : logicalORExpression ( ( LT )* '?' ( LT )* assignmentExpression ( LT )* ':' ( LT )* assignmentExpression )? ;
+ def conditionalExpression(self, ):
+
+ retval = self.conditionalExpression_return()
+ retval.start = self.input.LT(1)
+ conditionalExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT305 = None
+ char_literal306 = None
+ LT307 = None
+ LT309 = None
+ char_literal310 = None
+ LT311 = None
+ logicalORExpression304 = None
+
+ assignmentExpression308 = None
+
+ assignmentExpression312 = None
+
+
+ LT305_tree = None
+ char_literal306_tree = None
+ LT307_tree = None
+ LT309_tree = None
+ char_literal310_tree = None
+ LT311_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 55):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:269:2: ( logicalORExpression ( ( LT )* '?' ( LT )* assignmentExpression ( LT )* ':' ( LT )* assignmentExpression )? )
+ # JavaScript.g:269:4: logicalORExpression ( ( LT )* '?' ( LT )* assignmentExpression ( LT )* ':' ( LT )* assignmentExpression )?
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_logicalORExpression_in_conditionalExpression1649)
+ logicalORExpression304 = self.logicalORExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, logicalORExpression304.tree)
+ # JavaScript.g:269:24: ( ( LT )* '?' ( LT )* assignmentExpression ( LT )* ':' ( LT )* assignmentExpression )?
+ alt151 = 2
+ alt151 = self.dfa151.predict(self.input)
+ if alt151 == 1:
+ # JavaScript.g:269:25: ( LT )* '?' ( LT )* assignmentExpression ( LT )* ':' ( LT )* assignmentExpression
+ pass
+ # JavaScript.g:269:27: ( LT )*
+ while True: #loop147
+ alt147 = 2
+ LA147_0 = self.input.LA(1)
+
+ if (LA147_0 == LT) :
+ alt147 = 1
+
+
+ if alt147 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT305=self.match(self.input, LT, self.FOLLOW_LT_in_conditionalExpression1652)
+
+
+ else:
+ break #loop147
+ char_literal306=self.match(self.input, 73, self.FOLLOW_73_in_conditionalExpression1656)
+ if self._state.backtracking == 0:
+
+ char_literal306_tree = self._adaptor.createWithPayload(char_literal306)
+ self._adaptor.addChild(root_0, char_literal306_tree)
+
+ # JavaScript.g:269:36: ( LT )*
+ while True: #loop148
+ alt148 = 2
+ LA148_0 = self.input.LA(1)
+
+ if (LA148_0 == LT) :
+ alt148 = 1
+
+
+ if alt148 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT307=self.match(self.input, LT, self.FOLLOW_LT_in_conditionalExpression1658)
+
+
+ else:
+ break #loop148
+ self._state.following.append(self.FOLLOW_assignmentExpression_in_conditionalExpression1662)
+ assignmentExpression308 = self.assignmentExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpression308.tree)
+ # JavaScript.g:269:62: ( LT )*
+ while True: #loop149
+ alt149 = 2
+ LA149_0 = self.input.LA(1)
+
+ if (LA149_0 == LT) :
+ alt149 = 1
+
+
+ if alt149 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT309=self.match(self.input, LT, self.FOLLOW_LT_in_conditionalExpression1664)
+
+
+ else:
+ break #loop149
+ char_literal310=self.match(self.input, 50, self.FOLLOW_50_in_conditionalExpression1668)
+ if self._state.backtracking == 0:
+
+ char_literal310_tree = self._adaptor.createWithPayload(char_literal310)
+ self._adaptor.addChild(root_0, char_literal310_tree)
+
+ # JavaScript.g:269:71: ( LT )*
+ while True: #loop150
+ alt150 = 2
+ LA150_0 = self.input.LA(1)
+
+ if (LA150_0 == LT) :
+ alt150 = 1
+
+
+ if alt150 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT311=self.match(self.input, LT, self.FOLLOW_LT_in_conditionalExpression1670)
+
+
+ else:
+ break #loop150
+ self._state.following.append(self.FOLLOW_assignmentExpression_in_conditionalExpression1674)
+ assignmentExpression312 = self.assignmentExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpression312.tree)
+
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 55, conditionalExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "conditionalExpression"
+
+ class conditionalExpressionNoIn_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.conditionalExpressionNoIn_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "conditionalExpressionNoIn"
+ # JavaScript.g:272:1: conditionalExpressionNoIn : logicalORExpressionNoIn ( ( LT )* '?' ( LT )* assignmentExpressionNoIn ( LT )* ':' ( LT )* assignmentExpressionNoIn )? ;
+ def conditionalExpressionNoIn(self, ):
+
+ retval = self.conditionalExpressionNoIn_return()
+ retval.start = self.input.LT(1)
+ conditionalExpressionNoIn_StartIndex = self.input.index()
+ root_0 = None
+
+ LT314 = None
+ char_literal315 = None
+ LT316 = None
+ LT318 = None
+ char_literal319 = None
+ LT320 = None
+ logicalORExpressionNoIn313 = None
+
+ assignmentExpressionNoIn317 = None
+
+ assignmentExpressionNoIn321 = None
+
+
+ LT314_tree = None
+ char_literal315_tree = None
+ LT316_tree = None
+ LT318_tree = None
+ char_literal319_tree = None
+ LT320_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 56):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:273:2: ( logicalORExpressionNoIn ( ( LT )* '?' ( LT )* assignmentExpressionNoIn ( LT )* ':' ( LT )* assignmentExpressionNoIn )? )
+ # JavaScript.g:273:4: logicalORExpressionNoIn ( ( LT )* '?' ( LT )* assignmentExpressionNoIn ( LT )* ':' ( LT )* assignmentExpressionNoIn )?
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_logicalORExpressionNoIn_in_conditionalExpressionNoIn1687)
+ logicalORExpressionNoIn313 = self.logicalORExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, logicalORExpressionNoIn313.tree)
+ # JavaScript.g:273:28: ( ( LT )* '?' ( LT )* assignmentExpressionNoIn ( LT )* ':' ( LT )* assignmentExpressionNoIn )?
+ alt156 = 2
+ alt156 = self.dfa156.predict(self.input)
+ if alt156 == 1:
+ # JavaScript.g:273:29: ( LT )* '?' ( LT )* assignmentExpressionNoIn ( LT )* ':' ( LT )* assignmentExpressionNoIn
+ pass
+ # JavaScript.g:273:31: ( LT )*
+ while True: #loop152
+ alt152 = 2
+ LA152_0 = self.input.LA(1)
+
+ if (LA152_0 == LT) :
+ alt152 = 1
+
+
+ if alt152 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT314=self.match(self.input, LT, self.FOLLOW_LT_in_conditionalExpressionNoIn1690)
+
+
+ else:
+ break #loop152
+ char_literal315=self.match(self.input, 73, self.FOLLOW_73_in_conditionalExpressionNoIn1694)
+ if self._state.backtracking == 0:
+
+ char_literal315_tree = self._adaptor.createWithPayload(char_literal315)
+ self._adaptor.addChild(root_0, char_literal315_tree)
+
+ # JavaScript.g:273:40: ( LT )*
+ while True: #loop153
+ alt153 = 2
+ LA153_0 = self.input.LA(1)
+
+ if (LA153_0 == LT) :
+ alt153 = 1
+
+
+ if alt153 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT316=self.match(self.input, LT, self.FOLLOW_LT_in_conditionalExpressionNoIn1696)
+
+
+ else:
+ break #loop153
+ self._state.following.append(self.FOLLOW_assignmentExpressionNoIn_in_conditionalExpressionNoIn1700)
+ assignmentExpressionNoIn317 = self.assignmentExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpressionNoIn317.tree)
+ # JavaScript.g:273:70: ( LT )*
+ while True: #loop154
+ alt154 = 2
+ LA154_0 = self.input.LA(1)
+
+ if (LA154_0 == LT) :
+ alt154 = 1
+
+
+ if alt154 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT318=self.match(self.input, LT, self.FOLLOW_LT_in_conditionalExpressionNoIn1702)
+
+
+ else:
+ break #loop154
+ char_literal319=self.match(self.input, 50, self.FOLLOW_50_in_conditionalExpressionNoIn1706)
+ if self._state.backtracking == 0:
+
+ char_literal319_tree = self._adaptor.createWithPayload(char_literal319)
+ self._adaptor.addChild(root_0, char_literal319_tree)
+
+ # JavaScript.g:273:79: ( LT )*
+ while True: #loop155
+ alt155 = 2
+ LA155_0 = self.input.LA(1)
+
+ if (LA155_0 == LT) :
+ alt155 = 1
+
+
+ if alt155 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT320=self.match(self.input, LT, self.FOLLOW_LT_in_conditionalExpressionNoIn1708)
+
+
+ else:
+ break #loop155
+ self._state.following.append(self.FOLLOW_assignmentExpressionNoIn_in_conditionalExpressionNoIn1712)
+ assignmentExpressionNoIn321 = self.assignmentExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpressionNoIn321.tree)
+
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 56, conditionalExpressionNoIn_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "conditionalExpressionNoIn"
+
+ class logicalORExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.logicalORExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "logicalORExpression"
+ # JavaScript.g:276:1: logicalORExpression : logicalANDExpression ( ( LT )* '||' ( LT )* logicalANDExpression )* ;
+ def logicalORExpression(self, ):
+
+ retval = self.logicalORExpression_return()
+ retval.start = self.input.LT(1)
+ logicalORExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT323 = None
+ string_literal324 = None
+ LT325 = None
+ logicalANDExpression322 = None
+
+ logicalANDExpression326 = None
+
+
+ LT323_tree = None
+ string_literal324_tree = None
+ LT325_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 57):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:277:2: ( logicalANDExpression ( ( LT )* '||' ( LT )* logicalANDExpression )* )
+ # JavaScript.g:277:4: logicalANDExpression ( ( LT )* '||' ( LT )* logicalANDExpression )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_logicalANDExpression_in_logicalORExpression1725)
+ logicalANDExpression322 = self.logicalANDExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, logicalANDExpression322.tree)
+ # JavaScript.g:277:25: ( ( LT )* '||' ( LT )* logicalANDExpression )*
+ while True: #loop159
+ alt159 = 2
+ alt159 = self.dfa159.predict(self.input)
+ if alt159 == 1:
+ # JavaScript.g:277:26: ( LT )* '||' ( LT )* logicalANDExpression
+ pass
+ # JavaScript.g:277:28: ( LT )*
+ while True: #loop157
+ alt157 = 2
+ LA157_0 = self.input.LA(1)
+
+ if (LA157_0 == LT) :
+ alt157 = 1
+
+
+ if alt157 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT323=self.match(self.input, LT, self.FOLLOW_LT_in_logicalORExpression1728)
+
+
+ else:
+ break #loop157
+ string_literal324=self.match(self.input, 74, self.FOLLOW_74_in_logicalORExpression1732)
+ if self._state.backtracking == 0:
+
+ string_literal324_tree = self._adaptor.createWithPayload(string_literal324)
+ self._adaptor.addChild(root_0, string_literal324_tree)
+
+ # JavaScript.g:277:38: ( LT )*
+ while True: #loop158
+ alt158 = 2
+ LA158_0 = self.input.LA(1)
+
+ if (LA158_0 == LT) :
+ alt158 = 1
+
+
+ if alt158 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT325=self.match(self.input, LT, self.FOLLOW_LT_in_logicalORExpression1734)
+
+
+ else:
+ break #loop158
+ self._state.following.append(self.FOLLOW_logicalANDExpression_in_logicalORExpression1738)
+ logicalANDExpression326 = self.logicalANDExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, logicalANDExpression326.tree)
+
+
+ else:
+ break #loop159
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 57, logicalORExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "logicalORExpression"
+
+ class logicalORExpressionNoIn_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.logicalORExpressionNoIn_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "logicalORExpressionNoIn"
+ # JavaScript.g:280:1: logicalORExpressionNoIn : logicalANDExpressionNoIn ( ( LT )* '||' ( LT )* logicalANDExpressionNoIn )* ;
+ def logicalORExpressionNoIn(self, ):
+
+ retval = self.logicalORExpressionNoIn_return()
+ retval.start = self.input.LT(1)
+ logicalORExpressionNoIn_StartIndex = self.input.index()
+ root_0 = None
+
+ LT328 = None
+ string_literal329 = None
+ LT330 = None
+ logicalANDExpressionNoIn327 = None
+
+ logicalANDExpressionNoIn331 = None
+
+
+ LT328_tree = None
+ string_literal329_tree = None
+ LT330_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 58):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:281:2: ( logicalANDExpressionNoIn ( ( LT )* '||' ( LT )* logicalANDExpressionNoIn )* )
+ # JavaScript.g:281:4: logicalANDExpressionNoIn ( ( LT )* '||' ( LT )* logicalANDExpressionNoIn )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_logicalANDExpressionNoIn_in_logicalORExpressionNoIn1752)
+ logicalANDExpressionNoIn327 = self.logicalANDExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, logicalANDExpressionNoIn327.tree)
+ # JavaScript.g:281:29: ( ( LT )* '||' ( LT )* logicalANDExpressionNoIn )*
+ while True: #loop162
+ alt162 = 2
+ alt162 = self.dfa162.predict(self.input)
+ if alt162 == 1:
+ # JavaScript.g:281:30: ( LT )* '||' ( LT )* logicalANDExpressionNoIn
+ pass
+ # JavaScript.g:281:32: ( LT )*
+ while True: #loop160
+ alt160 = 2
+ LA160_0 = self.input.LA(1)
+
+ if (LA160_0 == LT) :
+ alt160 = 1
+
+
+ if alt160 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT328=self.match(self.input, LT, self.FOLLOW_LT_in_logicalORExpressionNoIn1755)
+
+
+ else:
+ break #loop160
+ string_literal329=self.match(self.input, 74, self.FOLLOW_74_in_logicalORExpressionNoIn1759)
+ if self._state.backtracking == 0:
+
+ string_literal329_tree = self._adaptor.createWithPayload(string_literal329)
+ self._adaptor.addChild(root_0, string_literal329_tree)
+
+ # JavaScript.g:281:42: ( LT )*
+ while True: #loop161
+ alt161 = 2
+ LA161_0 = self.input.LA(1)
+
+ if (LA161_0 == LT) :
+ alt161 = 1
+
+
+ if alt161 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT330=self.match(self.input, LT, self.FOLLOW_LT_in_logicalORExpressionNoIn1761)
+
+
+ else:
+ break #loop161
+ self._state.following.append(self.FOLLOW_logicalANDExpressionNoIn_in_logicalORExpressionNoIn1765)
+ logicalANDExpressionNoIn331 = self.logicalANDExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, logicalANDExpressionNoIn331.tree)
+
+
+ else:
+ break #loop162
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 58, logicalORExpressionNoIn_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "logicalORExpressionNoIn"
+
+ class logicalANDExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.logicalANDExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "logicalANDExpression"
+ # JavaScript.g:284:1: logicalANDExpression : bitwiseORExpression ( ( LT )* '&&' ( LT )* bitwiseORExpression )* ;
+ def logicalANDExpression(self, ):
+
+ retval = self.logicalANDExpression_return()
+ retval.start = self.input.LT(1)
+ logicalANDExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT333 = None
+ string_literal334 = None
+ LT335 = None
+ bitwiseORExpression332 = None
+
+ bitwiseORExpression336 = None
+
+
+ LT333_tree = None
+ string_literal334_tree = None
+ LT335_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 59):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:285:2: ( bitwiseORExpression ( ( LT )* '&&' ( LT )* bitwiseORExpression )* )
+ # JavaScript.g:285:4: bitwiseORExpression ( ( LT )* '&&' ( LT )* bitwiseORExpression )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_bitwiseORExpression_in_logicalANDExpression1779)
+ bitwiseORExpression332 = self.bitwiseORExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, bitwiseORExpression332.tree)
+ # JavaScript.g:285:24: ( ( LT )* '&&' ( LT )* bitwiseORExpression )*
+ while True: #loop165
+ alt165 = 2
+ alt165 = self.dfa165.predict(self.input)
+ if alt165 == 1:
+ # JavaScript.g:285:25: ( LT )* '&&' ( LT )* bitwiseORExpression
+ pass
+ # JavaScript.g:285:27: ( LT )*
+ while True: #loop163
+ alt163 = 2
+ LA163_0 = self.input.LA(1)
+
+ if (LA163_0 == LT) :
+ alt163 = 1
+
+
+ if alt163 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT333=self.match(self.input, LT, self.FOLLOW_LT_in_logicalANDExpression1782)
+
+
+ else:
+ break #loop163
+ string_literal334=self.match(self.input, 75, self.FOLLOW_75_in_logicalANDExpression1786)
+ if self._state.backtracking == 0:
+
+ string_literal334_tree = self._adaptor.createWithPayload(string_literal334)
+ self._adaptor.addChild(root_0, string_literal334_tree)
+
+ # JavaScript.g:285:37: ( LT )*
+ while True: #loop164
+ alt164 = 2
+ LA164_0 = self.input.LA(1)
+
+ if (LA164_0 == LT) :
+ alt164 = 1
+
+
+ if alt164 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT335=self.match(self.input, LT, self.FOLLOW_LT_in_logicalANDExpression1788)
+
+
+ else:
+ break #loop164
+ self._state.following.append(self.FOLLOW_bitwiseORExpression_in_logicalANDExpression1792)
+ bitwiseORExpression336 = self.bitwiseORExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, bitwiseORExpression336.tree)
+
+
+ else:
+ break #loop165
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 59, logicalANDExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "logicalANDExpression"
+
+ class logicalANDExpressionNoIn_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.logicalANDExpressionNoIn_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "logicalANDExpressionNoIn"
+ # JavaScript.g:288:1: logicalANDExpressionNoIn : bitwiseORExpressionNoIn ( ( LT )* '&&' ( LT )* bitwiseORExpressionNoIn )* ;
+ def logicalANDExpressionNoIn(self, ):
+
+ retval = self.logicalANDExpressionNoIn_return()
+ retval.start = self.input.LT(1)
+ logicalANDExpressionNoIn_StartIndex = self.input.index()
+ root_0 = None
+
+ LT338 = None
+ string_literal339 = None
+ LT340 = None
+ bitwiseORExpressionNoIn337 = None
+
+ bitwiseORExpressionNoIn341 = None
+
+
+ LT338_tree = None
+ string_literal339_tree = None
+ LT340_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 60):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:289:2: ( bitwiseORExpressionNoIn ( ( LT )* '&&' ( LT )* bitwiseORExpressionNoIn )* )
+ # JavaScript.g:289:4: bitwiseORExpressionNoIn ( ( LT )* '&&' ( LT )* bitwiseORExpressionNoIn )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_bitwiseORExpressionNoIn_in_logicalANDExpressionNoIn1806)
+ bitwiseORExpressionNoIn337 = self.bitwiseORExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, bitwiseORExpressionNoIn337.tree)
+ # JavaScript.g:289:28: ( ( LT )* '&&' ( LT )* bitwiseORExpressionNoIn )*
+ while True: #loop168
+ alt168 = 2
+ alt168 = self.dfa168.predict(self.input)
+ if alt168 == 1:
+ # JavaScript.g:289:29: ( LT )* '&&' ( LT )* bitwiseORExpressionNoIn
+ pass
+ # JavaScript.g:289:31: ( LT )*
+ while True: #loop166
+ alt166 = 2
+ LA166_0 = self.input.LA(1)
+
+ if (LA166_0 == LT) :
+ alt166 = 1
+
+
+ if alt166 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT338=self.match(self.input, LT, self.FOLLOW_LT_in_logicalANDExpressionNoIn1809)
+
+
+ else:
+ break #loop166
+ string_literal339=self.match(self.input, 75, self.FOLLOW_75_in_logicalANDExpressionNoIn1813)
+ if self._state.backtracking == 0:
+
+ string_literal339_tree = self._adaptor.createWithPayload(string_literal339)
+ self._adaptor.addChild(root_0, string_literal339_tree)
+
+ # JavaScript.g:289:41: ( LT )*
+ while True: #loop167
+ alt167 = 2
+ LA167_0 = self.input.LA(1)
+
+ if (LA167_0 == LT) :
+ alt167 = 1
+
+
+ if alt167 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT340=self.match(self.input, LT, self.FOLLOW_LT_in_logicalANDExpressionNoIn1815)
+
+
+ else:
+ break #loop167
+ self._state.following.append(self.FOLLOW_bitwiseORExpressionNoIn_in_logicalANDExpressionNoIn1819)
+ bitwiseORExpressionNoIn341 = self.bitwiseORExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, bitwiseORExpressionNoIn341.tree)
+
+
+ else:
+ break #loop168
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 60, logicalANDExpressionNoIn_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "logicalANDExpressionNoIn"
+
+ class bitwiseORExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.bitwiseORExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "bitwiseORExpression"
+ # JavaScript.g:292:1: bitwiseORExpression : bitwiseXORExpression ( ( LT )* '|' ( LT )* bitwiseXORExpression )* ;
+ def bitwiseORExpression(self, ):
+
+ retval = self.bitwiseORExpression_return()
+ retval.start = self.input.LT(1)
+ bitwiseORExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT343 = None
+ char_literal344 = None
+ LT345 = None
+ bitwiseXORExpression342 = None
+
+ bitwiseXORExpression346 = None
+
+
+ LT343_tree = None
+ char_literal344_tree = None
+ LT345_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 61):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:293:2: ( bitwiseXORExpression ( ( LT )* '|' ( LT )* bitwiseXORExpression )* )
+ # JavaScript.g:293:4: bitwiseXORExpression ( ( LT )* '|' ( LT )* bitwiseXORExpression )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_bitwiseXORExpression_in_bitwiseORExpression1833)
+ bitwiseXORExpression342 = self.bitwiseXORExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, bitwiseXORExpression342.tree)
+ # JavaScript.g:293:25: ( ( LT )* '|' ( LT )* bitwiseXORExpression )*
+ while True: #loop171
+ alt171 = 2
+ alt171 = self.dfa171.predict(self.input)
+ if alt171 == 1:
+ # JavaScript.g:293:26: ( LT )* '|' ( LT )* bitwiseXORExpression
+ pass
+ # JavaScript.g:293:28: ( LT )*
+ while True: #loop169
+ alt169 = 2
+ LA169_0 = self.input.LA(1)
+
+ if (LA169_0 == LT) :
+ alt169 = 1
+
+
+ if alt169 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT343=self.match(self.input, LT, self.FOLLOW_LT_in_bitwiseORExpression1836)
+
+
+ else:
+ break #loop169
+ char_literal344=self.match(self.input, 76, self.FOLLOW_76_in_bitwiseORExpression1840)
+ if self._state.backtracking == 0:
+
+ char_literal344_tree = self._adaptor.createWithPayload(char_literal344)
+ self._adaptor.addChild(root_0, char_literal344_tree)
+
+ # JavaScript.g:293:37: ( LT )*
+ while True: #loop170
+ alt170 = 2
+ LA170_0 = self.input.LA(1)
+
+ if (LA170_0 == LT) :
+ alt170 = 1
+
+
+ if alt170 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT345=self.match(self.input, LT, self.FOLLOW_LT_in_bitwiseORExpression1842)
+
+
+ else:
+ break #loop170
+ self._state.following.append(self.FOLLOW_bitwiseXORExpression_in_bitwiseORExpression1846)
+ bitwiseXORExpression346 = self.bitwiseXORExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, bitwiseXORExpression346.tree)
+
+
+ else:
+ break #loop171
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 61, bitwiseORExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "bitwiseORExpression"
+
+ class bitwiseORExpressionNoIn_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.bitwiseORExpressionNoIn_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "bitwiseORExpressionNoIn"
+ # JavaScript.g:296:1: bitwiseORExpressionNoIn : bitwiseXORExpressionNoIn ( ( LT )* '|' ( LT )* bitwiseXORExpressionNoIn )* ;
+ def bitwiseORExpressionNoIn(self, ):
+
+ retval = self.bitwiseORExpressionNoIn_return()
+ retval.start = self.input.LT(1)
+ bitwiseORExpressionNoIn_StartIndex = self.input.index()
+ root_0 = None
+
+ LT348 = None
+ char_literal349 = None
+ LT350 = None
+ bitwiseXORExpressionNoIn347 = None
+
+ bitwiseXORExpressionNoIn351 = None
+
+
+ LT348_tree = None
+ char_literal349_tree = None
+ LT350_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 62):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:297:2: ( bitwiseXORExpressionNoIn ( ( LT )* '|' ( LT )* bitwiseXORExpressionNoIn )* )
+ # JavaScript.g:297:4: bitwiseXORExpressionNoIn ( ( LT )* '|' ( LT )* bitwiseXORExpressionNoIn )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_bitwiseXORExpressionNoIn_in_bitwiseORExpressionNoIn1860)
+ bitwiseXORExpressionNoIn347 = self.bitwiseXORExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, bitwiseXORExpressionNoIn347.tree)
+ # JavaScript.g:297:29: ( ( LT )* '|' ( LT )* bitwiseXORExpressionNoIn )*
+ while True: #loop174
+ alt174 = 2
+ alt174 = self.dfa174.predict(self.input)
+ if alt174 == 1:
+ # JavaScript.g:297:30: ( LT )* '|' ( LT )* bitwiseXORExpressionNoIn
+ pass
+ # JavaScript.g:297:32: ( LT )*
+ while True: #loop172
+ alt172 = 2
+ LA172_0 = self.input.LA(1)
+
+ if (LA172_0 == LT) :
+ alt172 = 1
+
+
+ if alt172 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT348=self.match(self.input, LT, self.FOLLOW_LT_in_bitwiseORExpressionNoIn1863)
+
+
+ else:
+ break #loop172
+ char_literal349=self.match(self.input, 76, self.FOLLOW_76_in_bitwiseORExpressionNoIn1867)
+ if self._state.backtracking == 0:
+
+ char_literal349_tree = self._adaptor.createWithPayload(char_literal349)
+ self._adaptor.addChild(root_0, char_literal349_tree)
+
+ # JavaScript.g:297:41: ( LT )*
+ while True: #loop173
+ alt173 = 2
+ LA173_0 = self.input.LA(1)
+
+ if (LA173_0 == LT) :
+ alt173 = 1
+
+
+ if alt173 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT350=self.match(self.input, LT, self.FOLLOW_LT_in_bitwiseORExpressionNoIn1869)
+
+
+ else:
+ break #loop173
+ self._state.following.append(self.FOLLOW_bitwiseXORExpressionNoIn_in_bitwiseORExpressionNoIn1873)
+ bitwiseXORExpressionNoIn351 = self.bitwiseXORExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, bitwiseXORExpressionNoIn351.tree)
+
+
+ else:
+ break #loop174
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 62, bitwiseORExpressionNoIn_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "bitwiseORExpressionNoIn"
+
+ class bitwiseXORExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.bitwiseXORExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "bitwiseXORExpression"
+ # JavaScript.g:300:1: bitwiseXORExpression : bitwiseANDExpression ( ( LT )* '^' ( LT )* bitwiseANDExpression )* ;
+ def bitwiseXORExpression(self, ):
+
+ retval = self.bitwiseXORExpression_return()
+ retval.start = self.input.LT(1)
+ bitwiseXORExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT353 = None
+ char_literal354 = None
+ LT355 = None
+ bitwiseANDExpression352 = None
+
+ bitwiseANDExpression356 = None
+
+
+ LT353_tree = None
+ char_literal354_tree = None
+ LT355_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 63):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:301:2: ( bitwiseANDExpression ( ( LT )* '^' ( LT )* bitwiseANDExpression )* )
+ # JavaScript.g:301:4: bitwiseANDExpression ( ( LT )* '^' ( LT )* bitwiseANDExpression )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_bitwiseANDExpression_in_bitwiseXORExpression1887)
+ bitwiseANDExpression352 = self.bitwiseANDExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, bitwiseANDExpression352.tree)
+ # JavaScript.g:301:25: ( ( LT )* '^' ( LT )* bitwiseANDExpression )*
+ while True: #loop177
+ alt177 = 2
+ alt177 = self.dfa177.predict(self.input)
+ if alt177 == 1:
+ # JavaScript.g:301:26: ( LT )* '^' ( LT )* bitwiseANDExpression
+ pass
+ # JavaScript.g:301:28: ( LT )*
+ while True: #loop175
+ alt175 = 2
+ LA175_0 = self.input.LA(1)
+
+ if (LA175_0 == LT) :
+ alt175 = 1
+
+
+ if alt175 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT353=self.match(self.input, LT, self.FOLLOW_LT_in_bitwiseXORExpression1890)
+
+
+ else:
+ break #loop175
+ char_literal354=self.match(self.input, 77, self.FOLLOW_77_in_bitwiseXORExpression1894)
+ if self._state.backtracking == 0:
+
+ char_literal354_tree = self._adaptor.createWithPayload(char_literal354)
+ self._adaptor.addChild(root_0, char_literal354_tree)
+
+ # JavaScript.g:301:37: ( LT )*
+ while True: #loop176
+ alt176 = 2
+ LA176_0 = self.input.LA(1)
+
+ if (LA176_0 == LT) :
+ alt176 = 1
+
+
+ if alt176 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT355=self.match(self.input, LT, self.FOLLOW_LT_in_bitwiseXORExpression1896)
+
+
+ else:
+ break #loop176
+ self._state.following.append(self.FOLLOW_bitwiseANDExpression_in_bitwiseXORExpression1900)
+ bitwiseANDExpression356 = self.bitwiseANDExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, bitwiseANDExpression356.tree)
+
+
+ else:
+ break #loop177
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 63, bitwiseXORExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "bitwiseXORExpression"
+
+ class bitwiseXORExpressionNoIn_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.bitwiseXORExpressionNoIn_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "bitwiseXORExpressionNoIn"
+ # JavaScript.g:304:1: bitwiseXORExpressionNoIn : bitwiseANDExpressionNoIn ( ( LT )* '^' ( LT )* bitwiseANDExpressionNoIn )* ;
+ def bitwiseXORExpressionNoIn(self, ):
+
+ retval = self.bitwiseXORExpressionNoIn_return()
+ retval.start = self.input.LT(1)
+ bitwiseXORExpressionNoIn_StartIndex = self.input.index()
+ root_0 = None
+
+ LT358 = None
+ char_literal359 = None
+ LT360 = None
+ bitwiseANDExpressionNoIn357 = None
+
+ bitwiseANDExpressionNoIn361 = None
+
+
+ LT358_tree = None
+ char_literal359_tree = None
+ LT360_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 64):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:305:2: ( bitwiseANDExpressionNoIn ( ( LT )* '^' ( LT )* bitwiseANDExpressionNoIn )* )
+ # JavaScript.g:305:4: bitwiseANDExpressionNoIn ( ( LT )* '^' ( LT )* bitwiseANDExpressionNoIn )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_bitwiseANDExpressionNoIn_in_bitwiseXORExpressionNoIn1914)
+ bitwiseANDExpressionNoIn357 = self.bitwiseANDExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, bitwiseANDExpressionNoIn357.tree)
+ # JavaScript.g:305:29: ( ( LT )* '^' ( LT )* bitwiseANDExpressionNoIn )*
+ while True: #loop180
+ alt180 = 2
+ alt180 = self.dfa180.predict(self.input)
+ if alt180 == 1:
+ # JavaScript.g:305:30: ( LT )* '^' ( LT )* bitwiseANDExpressionNoIn
+ pass
+ # JavaScript.g:305:32: ( LT )*
+ while True: #loop178
+ alt178 = 2
+ LA178_0 = self.input.LA(1)
+
+ if (LA178_0 == LT) :
+ alt178 = 1
+
+
+ if alt178 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT358=self.match(self.input, LT, self.FOLLOW_LT_in_bitwiseXORExpressionNoIn1917)
+
+
+ else:
+ break #loop178
+ char_literal359=self.match(self.input, 77, self.FOLLOW_77_in_bitwiseXORExpressionNoIn1921)
+ if self._state.backtracking == 0:
+
+ char_literal359_tree = self._adaptor.createWithPayload(char_literal359)
+ self._adaptor.addChild(root_0, char_literal359_tree)
+
+ # JavaScript.g:305:41: ( LT )*
+ while True: #loop179
+ alt179 = 2
+ LA179_0 = self.input.LA(1)
+
+ if (LA179_0 == LT) :
+ alt179 = 1
+
+
+ if alt179 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT360=self.match(self.input, LT, self.FOLLOW_LT_in_bitwiseXORExpressionNoIn1923)
+
+
+ else:
+ break #loop179
+ self._state.following.append(self.FOLLOW_bitwiseANDExpressionNoIn_in_bitwiseXORExpressionNoIn1927)
+ bitwiseANDExpressionNoIn361 = self.bitwiseANDExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, bitwiseANDExpressionNoIn361.tree)
+
+
+ else:
+ break #loop180
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 64, bitwiseXORExpressionNoIn_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "bitwiseXORExpressionNoIn"
+
+ class bitwiseANDExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.bitwiseANDExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "bitwiseANDExpression"
+ # JavaScript.g:308:1: bitwiseANDExpression : equalityExpression ( ( LT )* '&' ( LT )* equalityExpression )* ;
+ def bitwiseANDExpression(self, ):
+
+ retval = self.bitwiseANDExpression_return()
+ retval.start = self.input.LT(1)
+ bitwiseANDExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT363 = None
+ char_literal364 = None
+ LT365 = None
+ equalityExpression362 = None
+
+ equalityExpression366 = None
+
+
+ LT363_tree = None
+ char_literal364_tree = None
+ LT365_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 65):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:309:2: ( equalityExpression ( ( LT )* '&' ( LT )* equalityExpression )* )
+ # JavaScript.g:309:4: equalityExpression ( ( LT )* '&' ( LT )* equalityExpression )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_equalityExpression_in_bitwiseANDExpression1941)
+ equalityExpression362 = self.equalityExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, equalityExpression362.tree)
+ # JavaScript.g:309:23: ( ( LT )* '&' ( LT )* equalityExpression )*
+ while True: #loop183
+ alt183 = 2
+ alt183 = self.dfa183.predict(self.input)
+ if alt183 == 1:
+ # JavaScript.g:309:24: ( LT )* '&' ( LT )* equalityExpression
+ pass
+ # JavaScript.g:309:26: ( LT )*
+ while True: #loop181
+ alt181 = 2
+ LA181_0 = self.input.LA(1)
+
+ if (LA181_0 == LT) :
+ alt181 = 1
+
+
+ if alt181 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT363=self.match(self.input, LT, self.FOLLOW_LT_in_bitwiseANDExpression1944)
+
+
+ else:
+ break #loop181
+ char_literal364=self.match(self.input, 78, self.FOLLOW_78_in_bitwiseANDExpression1948)
+ if self._state.backtracking == 0:
+
+ char_literal364_tree = self._adaptor.createWithPayload(char_literal364)
+ self._adaptor.addChild(root_0, char_literal364_tree)
+
+ # JavaScript.g:309:35: ( LT )*
+ while True: #loop182
+ alt182 = 2
+ LA182_0 = self.input.LA(1)
+
+ if (LA182_0 == LT) :
+ alt182 = 1
+
+
+ if alt182 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT365=self.match(self.input, LT, self.FOLLOW_LT_in_bitwiseANDExpression1950)
+
+
+ else:
+ break #loop182
+ self._state.following.append(self.FOLLOW_equalityExpression_in_bitwiseANDExpression1954)
+ equalityExpression366 = self.equalityExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, equalityExpression366.tree)
+
+
+ else:
+ break #loop183
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 65, bitwiseANDExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "bitwiseANDExpression"
+
+ class bitwiseANDExpressionNoIn_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.bitwiseANDExpressionNoIn_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "bitwiseANDExpressionNoIn"
+ # JavaScript.g:312:1: bitwiseANDExpressionNoIn : equalityExpressionNoIn ( ( LT )* '&' ( LT )* equalityExpressionNoIn )* ;
+ def bitwiseANDExpressionNoIn(self, ):
+
+ retval = self.bitwiseANDExpressionNoIn_return()
+ retval.start = self.input.LT(1)
+ bitwiseANDExpressionNoIn_StartIndex = self.input.index()
+ root_0 = None
+
+ LT368 = None
+ char_literal369 = None
+ LT370 = None
+ equalityExpressionNoIn367 = None
+
+ equalityExpressionNoIn371 = None
+
+
+ LT368_tree = None
+ char_literal369_tree = None
+ LT370_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 66):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:313:2: ( equalityExpressionNoIn ( ( LT )* '&' ( LT )* equalityExpressionNoIn )* )
+ # JavaScript.g:313:4: equalityExpressionNoIn ( ( LT )* '&' ( LT )* equalityExpressionNoIn )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_equalityExpressionNoIn_in_bitwiseANDExpressionNoIn1968)
+ equalityExpressionNoIn367 = self.equalityExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, equalityExpressionNoIn367.tree)
+ # JavaScript.g:313:27: ( ( LT )* '&' ( LT )* equalityExpressionNoIn )*
+ while True: #loop186
+ alt186 = 2
+ alt186 = self.dfa186.predict(self.input)
+ if alt186 == 1:
+ # JavaScript.g:313:28: ( LT )* '&' ( LT )* equalityExpressionNoIn
+ pass
+ # JavaScript.g:313:30: ( LT )*
+ while True: #loop184
+ alt184 = 2
+ LA184_0 = self.input.LA(1)
+
+ if (LA184_0 == LT) :
+ alt184 = 1
+
+
+ if alt184 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT368=self.match(self.input, LT, self.FOLLOW_LT_in_bitwiseANDExpressionNoIn1971)
+
+
+ else:
+ break #loop184
+ char_literal369=self.match(self.input, 78, self.FOLLOW_78_in_bitwiseANDExpressionNoIn1975)
+ if self._state.backtracking == 0:
+
+ char_literal369_tree = self._adaptor.createWithPayload(char_literal369)
+ self._adaptor.addChild(root_0, char_literal369_tree)
+
+ # JavaScript.g:313:39: ( LT )*
+ while True: #loop185
+ alt185 = 2
+ LA185_0 = self.input.LA(1)
+
+ if (LA185_0 == LT) :
+ alt185 = 1
+
+
+ if alt185 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT370=self.match(self.input, LT, self.FOLLOW_LT_in_bitwiseANDExpressionNoIn1977)
+
+
+ else:
+ break #loop185
+ self._state.following.append(self.FOLLOW_equalityExpressionNoIn_in_bitwiseANDExpressionNoIn1981)
+ equalityExpressionNoIn371 = self.equalityExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, equalityExpressionNoIn371.tree)
+
+
+ else:
+ break #loop186
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 66, bitwiseANDExpressionNoIn_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "bitwiseANDExpressionNoIn"
+
+ class equalityExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.equalityExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "equalityExpression"
+ # JavaScript.g:316:1: equalityExpression : relationalExpression ( ( LT )* ( '==' | '!=' | '===' | '!==' ) ( LT )* relationalExpression )* ;
+ def equalityExpression(self, ):
+
+ retval = self.equalityExpression_return()
+ retval.start = self.input.LT(1)
+ equalityExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT373 = None
+ set374 = None
+ LT375 = None
+ relationalExpression372 = None
+
+ relationalExpression376 = None
+
+
+ LT373_tree = None
+ set374_tree = None
+ LT375_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 67):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:317:2: ( relationalExpression ( ( LT )* ( '==' | '!=' | '===' | '!==' ) ( LT )* relationalExpression )* )
+ # JavaScript.g:317:4: relationalExpression ( ( LT )* ( '==' | '!=' | '===' | '!==' ) ( LT )* relationalExpression )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_relationalExpression_in_equalityExpression1995)
+ relationalExpression372 = self.relationalExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, relationalExpression372.tree)
+ # JavaScript.g:317:25: ( ( LT )* ( '==' | '!=' | '===' | '!==' ) ( LT )* relationalExpression )*
+ while True: #loop189
+ alt189 = 2
+ alt189 = self.dfa189.predict(self.input)
+ if alt189 == 1:
+ # JavaScript.g:317:26: ( LT )* ( '==' | '!=' | '===' | '!==' ) ( LT )* relationalExpression
+ pass
+ # JavaScript.g:317:28: ( LT )*
+ while True: #loop187
+ alt187 = 2
+ LA187_0 = self.input.LA(1)
+
+ if (LA187_0 == LT) :
+ alt187 = 1
+
+
+ if alt187 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT373=self.match(self.input, LT, self.FOLLOW_LT_in_equalityExpression1998)
+
+
+ else:
+ break #loop187
+ set374 = self.input.LT(1)
+ if (79 <= self.input.LA(1) <= 82):
+ self.input.consume()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, self._adaptor.createWithPayload(set374))
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+ # JavaScript.g:317:63: ( LT )*
+ while True: #loop188
+ alt188 = 2
+ LA188_0 = self.input.LA(1)
+
+ if (LA188_0 == LT) :
+ alt188 = 1
+
+
+ if alt188 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT375=self.match(self.input, LT, self.FOLLOW_LT_in_equalityExpression2018)
+
+
+ else:
+ break #loop188
+ self._state.following.append(self.FOLLOW_relationalExpression_in_equalityExpression2022)
+ relationalExpression376 = self.relationalExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, relationalExpression376.tree)
+
+
+ else:
+ break #loop189
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 67, equalityExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "equalityExpression"
+
+ class equalityExpressionNoIn_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.equalityExpressionNoIn_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "equalityExpressionNoIn"
+ # JavaScript.g:320:1: equalityExpressionNoIn : relationalExpressionNoIn ( ( LT )* ( '==' | '!=' | '===' | '!==' ) ( LT )* relationalExpressionNoIn )* ;
+ def equalityExpressionNoIn(self, ):
+
+ retval = self.equalityExpressionNoIn_return()
+ retval.start = self.input.LT(1)
+ equalityExpressionNoIn_StartIndex = self.input.index()
+ root_0 = None
+
+ LT378 = None
+ set379 = None
+ LT380 = None
+ relationalExpressionNoIn377 = None
+
+ relationalExpressionNoIn381 = None
+
+
+ LT378_tree = None
+ set379_tree = None
+ LT380_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 68):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:321:2: ( relationalExpressionNoIn ( ( LT )* ( '==' | '!=' | '===' | '!==' ) ( LT )* relationalExpressionNoIn )* )
+ # JavaScript.g:321:4: relationalExpressionNoIn ( ( LT )* ( '==' | '!=' | '===' | '!==' ) ( LT )* relationalExpressionNoIn )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_relationalExpressionNoIn_in_equalityExpressionNoIn2035)
+ relationalExpressionNoIn377 = self.relationalExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, relationalExpressionNoIn377.tree)
+ # JavaScript.g:321:29: ( ( LT )* ( '==' | '!=' | '===' | '!==' ) ( LT )* relationalExpressionNoIn )*
+ while True: #loop192
+ alt192 = 2
+ alt192 = self.dfa192.predict(self.input)
+ if alt192 == 1:
+ # JavaScript.g:321:30: ( LT )* ( '==' | '!=' | '===' | '!==' ) ( LT )* relationalExpressionNoIn
+ pass
+ # JavaScript.g:321:32: ( LT )*
+ while True: #loop190
+ alt190 = 2
+ LA190_0 = self.input.LA(1)
+
+ if (LA190_0 == LT) :
+ alt190 = 1
+
+
+ if alt190 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT378=self.match(self.input, LT, self.FOLLOW_LT_in_equalityExpressionNoIn2038)
+
+
+ else:
+ break #loop190
+ set379 = self.input.LT(1)
+ if (79 <= self.input.LA(1) <= 82):
+ self.input.consume()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, self._adaptor.createWithPayload(set379))
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+ # JavaScript.g:321:67: ( LT )*
+ while True: #loop191
+ alt191 = 2
+ LA191_0 = self.input.LA(1)
+
+ if (LA191_0 == LT) :
+ alt191 = 1
+
+
+ if alt191 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT380=self.match(self.input, LT, self.FOLLOW_LT_in_equalityExpressionNoIn2058)
+
+
+ else:
+ break #loop191
+ self._state.following.append(self.FOLLOW_relationalExpressionNoIn_in_equalityExpressionNoIn2062)
+ relationalExpressionNoIn381 = self.relationalExpressionNoIn()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, relationalExpressionNoIn381.tree)
+
+
+ else:
+ break #loop192
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 68, equalityExpressionNoIn_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "equalityExpressionNoIn"
+
+ class relationalExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.relationalExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "relationalExpression"
+ # JavaScript.g:324:1: relationalExpression : shiftExpression ( ( LT )* ( '<' | '>' | '<=' | '>=' | 'instanceof' | 'in' ) ( LT )* shiftExpression )* ;
+ def relationalExpression(self, ):
+
+ retval = self.relationalExpression_return()
+ retval.start = self.input.LT(1)
+ relationalExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT383 = None
+ set384 = None
+ LT385 = None
+ shiftExpression382 = None
+
+ shiftExpression386 = None
+
+
+ LT383_tree = None
+ set384_tree = None
+ LT385_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 69):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:325:2: ( shiftExpression ( ( LT )* ( '<' | '>' | '<=' | '>=' | 'instanceof' | 'in' ) ( LT )* shiftExpression )* )
+ # JavaScript.g:325:4: shiftExpression ( ( LT )* ( '<' | '>' | '<=' | '>=' | 'instanceof' | 'in' ) ( LT )* shiftExpression )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_shiftExpression_in_relationalExpression2076)
+ shiftExpression382 = self.shiftExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, shiftExpression382.tree)
+ # JavaScript.g:325:20: ( ( LT )* ( '<' | '>' | '<=' | '>=' | 'instanceof' | 'in' ) ( LT )* shiftExpression )*
+ while True: #loop195
+ alt195 = 2
+ alt195 = self.dfa195.predict(self.input)
+ if alt195 == 1:
+ # JavaScript.g:325:21: ( LT )* ( '<' | '>' | '<=' | '>=' | 'instanceof' | 'in' ) ( LT )* shiftExpression
+ pass
+ # JavaScript.g:325:23: ( LT )*
+ while True: #loop193
+ alt193 = 2
+ LA193_0 = self.input.LA(1)
+
+ if (LA193_0 == LT) :
+ alt193 = 1
+
+
+ if alt193 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT383=self.match(self.input, LT, self.FOLLOW_LT_in_relationalExpression2079)
+
+
+ else:
+ break #loop193
+ set384 = self.input.LT(1)
+ if self.input.LA(1) == 45 or (83 <= self.input.LA(1) <= 87):
+ self.input.consume()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, self._adaptor.createWithPayload(set384))
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+ # JavaScript.g:325:76: ( LT )*
+ while True: #loop194
+ alt194 = 2
+ LA194_0 = self.input.LA(1)
+
+ if (LA194_0 == LT) :
+ alt194 = 1
+
+
+ if alt194 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT385=self.match(self.input, LT, self.FOLLOW_LT_in_relationalExpression2107)
+
+
+ else:
+ break #loop194
+ self._state.following.append(self.FOLLOW_shiftExpression_in_relationalExpression2111)
+ shiftExpression386 = self.shiftExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, shiftExpression386.tree)
+
+
+ else:
+ break #loop195
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 69, relationalExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "relationalExpression"
+
+ class relationalExpressionNoIn_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.relationalExpressionNoIn_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "relationalExpressionNoIn"
+ # JavaScript.g:328:1: relationalExpressionNoIn : shiftExpression ( ( LT )* ( '<' | '>' | '<=' | '>=' | 'instanceof' ) ( LT )* shiftExpression )* ;
+ def relationalExpressionNoIn(self, ):
+
+ retval = self.relationalExpressionNoIn_return()
+ retval.start = self.input.LT(1)
+ relationalExpressionNoIn_StartIndex = self.input.index()
+ root_0 = None
+
+ LT388 = None
+ set389 = None
+ LT390 = None
+ shiftExpression387 = None
+
+ shiftExpression391 = None
+
+
+ LT388_tree = None
+ set389_tree = None
+ LT390_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 70):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:329:2: ( shiftExpression ( ( LT )* ( '<' | '>' | '<=' | '>=' | 'instanceof' ) ( LT )* shiftExpression )* )
+ # JavaScript.g:329:4: shiftExpression ( ( LT )* ( '<' | '>' | '<=' | '>=' | 'instanceof' ) ( LT )* shiftExpression )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_shiftExpression_in_relationalExpressionNoIn2124)
+ shiftExpression387 = self.shiftExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, shiftExpression387.tree)
+ # JavaScript.g:329:20: ( ( LT )* ( '<' | '>' | '<=' | '>=' | 'instanceof' ) ( LT )* shiftExpression )*
+ while True: #loop198
+ alt198 = 2
+ alt198 = self.dfa198.predict(self.input)
+ if alt198 == 1:
+ # JavaScript.g:329:21: ( LT )* ( '<' | '>' | '<=' | '>=' | 'instanceof' ) ( LT )* shiftExpression
+ pass
+ # JavaScript.g:329:23: ( LT )*
+ while True: #loop196
+ alt196 = 2
+ LA196_0 = self.input.LA(1)
+
+ if (LA196_0 == LT) :
+ alt196 = 1
+
+
+ if alt196 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT388=self.match(self.input, LT, self.FOLLOW_LT_in_relationalExpressionNoIn2127)
+
+
+ else:
+ break #loop196
+ set389 = self.input.LT(1)
+ if (83 <= self.input.LA(1) <= 87):
+ self.input.consume()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, self._adaptor.createWithPayload(set389))
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+ # JavaScript.g:329:69: ( LT )*
+ while True: #loop197
+ alt197 = 2
+ LA197_0 = self.input.LA(1)
+
+ if (LA197_0 == LT) :
+ alt197 = 1
+
+
+ if alt197 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT390=self.match(self.input, LT, self.FOLLOW_LT_in_relationalExpressionNoIn2151)
+
+
+ else:
+ break #loop197
+ self._state.following.append(self.FOLLOW_shiftExpression_in_relationalExpressionNoIn2155)
+ shiftExpression391 = self.shiftExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, shiftExpression391.tree)
+
+
+ else:
+ break #loop198
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 70, relationalExpressionNoIn_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "relationalExpressionNoIn"
+
+ class shiftExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.shiftExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "shiftExpression"
+ # JavaScript.g:332:1: shiftExpression : additiveExpression ( ( LT )* ( '<<' | '>>' | '>>>' ) ( LT )* additiveExpression )* ;
+ def shiftExpression(self, ):
+
+ retval = self.shiftExpression_return()
+ retval.start = self.input.LT(1)
+ shiftExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT393 = None
+ set394 = None
+ LT395 = None
+ additiveExpression392 = None
+
+ additiveExpression396 = None
+
+
+ LT393_tree = None
+ set394_tree = None
+ LT395_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 71):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:333:2: ( additiveExpression ( ( LT )* ( '<<' | '>>' | '>>>' ) ( LT )* additiveExpression )* )
+ # JavaScript.g:333:4: additiveExpression ( ( LT )* ( '<<' | '>>' | '>>>' ) ( LT )* additiveExpression )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_additiveExpression_in_shiftExpression2168)
+ additiveExpression392 = self.additiveExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, additiveExpression392.tree)
+ # JavaScript.g:333:23: ( ( LT )* ( '<<' | '>>' | '>>>' ) ( LT )* additiveExpression )*
+ while True: #loop201
+ alt201 = 2
+ alt201 = self.dfa201.predict(self.input)
+ if alt201 == 1:
+ # JavaScript.g:333:24: ( LT )* ( '<<' | '>>' | '>>>' ) ( LT )* additiveExpression
+ pass
+ # JavaScript.g:333:26: ( LT )*
+ while True: #loop199
+ alt199 = 2
+ LA199_0 = self.input.LA(1)
+
+ if (LA199_0 == LT) :
+ alt199 = 1
+
+
+ if alt199 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT393=self.match(self.input, LT, self.FOLLOW_LT_in_shiftExpression2171)
+
+
+ else:
+ break #loop199
+ set394 = self.input.LT(1)
+ if (88 <= self.input.LA(1) <= 90):
+ self.input.consume()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, self._adaptor.createWithPayload(set394))
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+ # JavaScript.g:333:53: ( LT )*
+ while True: #loop200
+ alt200 = 2
+ LA200_0 = self.input.LA(1)
+
+ if (LA200_0 == LT) :
+ alt200 = 1
+
+
+ if alt200 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT395=self.match(self.input, LT, self.FOLLOW_LT_in_shiftExpression2187)
+
+
+ else:
+ break #loop200
+ self._state.following.append(self.FOLLOW_additiveExpression_in_shiftExpression2191)
+ additiveExpression396 = self.additiveExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, additiveExpression396.tree)
+
+
+ else:
+ break #loop201
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 71, shiftExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "shiftExpression"
+
+ class additiveExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.additiveExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "additiveExpression"
+ # JavaScript.g:336:1: additiveExpression : multiplicativeExpression ( ( LT )* ( '+' | '-' ) ( LT )* multiplicativeExpression )* ;
+ def additiveExpression(self, ):
+
+ retval = self.additiveExpression_return()
+ retval.start = self.input.LT(1)
+ additiveExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT398 = None
+ set399 = None
+ LT400 = None
+ multiplicativeExpression397 = None
+
+ multiplicativeExpression401 = None
+
+
+ LT398_tree = None
+ set399_tree = None
+ LT400_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 72):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:337:2: ( multiplicativeExpression ( ( LT )* ( '+' | '-' ) ( LT )* multiplicativeExpression )* )
+ # JavaScript.g:337:4: multiplicativeExpression ( ( LT )* ( '+' | '-' ) ( LT )* multiplicativeExpression )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_multiplicativeExpression_in_additiveExpression2204)
+ multiplicativeExpression397 = self.multiplicativeExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, multiplicativeExpression397.tree)
+ # JavaScript.g:337:29: ( ( LT )* ( '+' | '-' ) ( LT )* multiplicativeExpression )*
+ while True: #loop204
+ alt204 = 2
+ alt204 = self.dfa204.predict(self.input)
+ if alt204 == 1:
+ # JavaScript.g:337:30: ( LT )* ( '+' | '-' ) ( LT )* multiplicativeExpression
+ pass
+ # JavaScript.g:337:32: ( LT )*
+ while True: #loop202
+ alt202 = 2
+ LA202_0 = self.input.LA(1)
+
+ if (LA202_0 == LT) :
+ alt202 = 1
+
+
+ if alt202 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT398=self.match(self.input, LT, self.FOLLOW_LT_in_additiveExpression2207)
+
+
+ else:
+ break #loop202
+ set399 = self.input.LT(1)
+ if (91 <= self.input.LA(1) <= 92):
+ self.input.consume()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, self._adaptor.createWithPayload(set399))
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+ # JavaScript.g:337:49: ( LT )*
+ while True: #loop203
+ alt203 = 2
+ LA203_0 = self.input.LA(1)
+
+ if (LA203_0 == LT) :
+ alt203 = 1
+
+
+ if alt203 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT400=self.match(self.input, LT, self.FOLLOW_LT_in_additiveExpression2219)
+
+
+ else:
+ break #loop203
+ self._state.following.append(self.FOLLOW_multiplicativeExpression_in_additiveExpression2223)
+ multiplicativeExpression401 = self.multiplicativeExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, multiplicativeExpression401.tree)
+
+
+ else:
+ break #loop204
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 72, additiveExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "additiveExpression"
+
+ class multiplicativeExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.multiplicativeExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "multiplicativeExpression"
+ # JavaScript.g:340:1: multiplicativeExpression : unaryExpression ( ( LT )* ( '*' | '/' | '%' ) ( LT )* unaryExpression )* ;
+ def multiplicativeExpression(self, ):
+
+ retval = self.multiplicativeExpression_return()
+ retval.start = self.input.LT(1)
+ multiplicativeExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ LT403 = None
+ set404 = None
+ LT405 = None
+ unaryExpression402 = None
+
+ unaryExpression406 = None
+
+
+ LT403_tree = None
+ set404_tree = None
+ LT405_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 73):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:341:2: ( unaryExpression ( ( LT )* ( '*' | '/' | '%' ) ( LT )* unaryExpression )* )
+ # JavaScript.g:341:4: unaryExpression ( ( LT )* ( '*' | '/' | '%' ) ( LT )* unaryExpression )*
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_unaryExpression_in_multiplicativeExpression2236)
+ unaryExpression402 = self.unaryExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, unaryExpression402.tree)
+ # JavaScript.g:341:20: ( ( LT )* ( '*' | '/' | '%' ) ( LT )* unaryExpression )*
+ while True: #loop207
+ alt207 = 2
+ alt207 = self.dfa207.predict(self.input)
+ if alt207 == 1:
+ # JavaScript.g:341:21: ( LT )* ( '*' | '/' | '%' ) ( LT )* unaryExpression
+ pass
+ # JavaScript.g:341:23: ( LT )*
+ while True: #loop205
+ alt205 = 2
+ LA205_0 = self.input.LA(1)
+
+ if (LA205_0 == LT) :
+ alt205 = 1
+
+
+ if alt205 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT403=self.match(self.input, LT, self.FOLLOW_LT_in_multiplicativeExpression2239)
+
+
+ else:
+ break #loop205
+ set404 = self.input.LT(1)
+ if (93 <= self.input.LA(1) <= 95):
+ self.input.consume()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, self._adaptor.createWithPayload(set404))
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+ # JavaScript.g:341:46: ( LT )*
+ while True: #loop206
+ alt206 = 2
+ LA206_0 = self.input.LA(1)
+
+ if (LA206_0 == LT) :
+ alt206 = 1
+
+
+ if alt206 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT405=self.match(self.input, LT, self.FOLLOW_LT_in_multiplicativeExpression2255)
+
+
+ else:
+ break #loop206
+ self._state.following.append(self.FOLLOW_unaryExpression_in_multiplicativeExpression2259)
+ unaryExpression406 = self.unaryExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, unaryExpression406.tree)
+
+
+ else:
+ break #loop207
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 73, multiplicativeExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "multiplicativeExpression"
+
+ class unaryExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.unaryExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "unaryExpression"
+ # JavaScript.g:344:1: unaryExpression : ( postfixExpression | ( 'delete' | 'void' | 'typeof' | '++' | '--' | '+' | '-' | '~' | '!' ) unaryExpression );
+ def unaryExpression(self, ):
+
+ retval = self.unaryExpression_return()
+ retval.start = self.input.LT(1)
+ unaryExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ set408 = None
+ postfixExpression407 = None
+
+ unaryExpression409 = None
+
+
+ set408_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 74):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:345:2: ( postfixExpression | ( 'delete' | 'void' | 'typeof' | '++' | '--' | '+' | '-' | '~' | '!' ) unaryExpression )
+ alt208 = 2
+ LA208_0 = self.input.LA(1)
+
+ if ((Identifier <= LA208_0 <= NumericLiteral) or (31 <= LA208_0 <= 32) or LA208_0 == 35 or (58 <= LA208_0 <= 59) or (103 <= LA208_0 <= 106)) :
+ alt208 = 1
+ elif ((91 <= LA208_0 <= 92) or (96 <= LA208_0 <= 102)) :
+ alt208 = 2
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 208, 0, self.input)
+
+ raise nvae
+
+ if alt208 == 1:
+ # JavaScript.g:345:4: postfixExpression
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_postfixExpression_in_unaryExpression2272)
+ postfixExpression407 = self.postfixExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, postfixExpression407.tree)
+
+
+ elif alt208 == 2:
+ # JavaScript.g:346:4: ( 'delete' | 'void' | 'typeof' | '++' | '--' | '+' | '-' | '~' | '!' ) unaryExpression
+ pass
+ root_0 = self._adaptor.nil()
+
+ set408 = self.input.LT(1)
+ if (91 <= self.input.LA(1) <= 92) or (96 <= self.input.LA(1) <= 102):
+ self.input.consume()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, self._adaptor.createWithPayload(set408))
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+ self._state.following.append(self.FOLLOW_unaryExpression_in_unaryExpression2313)
+ unaryExpression409 = self.unaryExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, unaryExpression409.tree)
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 74, unaryExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "unaryExpression"
+
+ class postfixExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.postfixExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "postfixExpression"
+ # JavaScript.g:349:1: postfixExpression : leftHandSideExpression ( '++' | '--' )? ;
+ def postfixExpression(self, ):
+
+ retval = self.postfixExpression_return()
+ retval.start = self.input.LT(1)
+ postfixExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ set411 = None
+ leftHandSideExpression410 = None
+
+
+ set411_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 75):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:350:2: ( leftHandSideExpression ( '++' | '--' )? )
+ # JavaScript.g:350:4: leftHandSideExpression ( '++' | '--' )?
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_leftHandSideExpression_in_postfixExpression2325)
+ leftHandSideExpression410 = self.leftHandSideExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, leftHandSideExpression410.tree)
+ # JavaScript.g:350:27: ( '++' | '--' )?
+ alt209 = 2
+ LA209_0 = self.input.LA(1)
+
+ if ((99 <= LA209_0 <= 100)) :
+ alt209 = 1
+ if alt209 == 1:
+ # JavaScript.g:
+ pass
+ set411 = self.input.LT(1)
+ if (99 <= self.input.LA(1) <= 100):
+ self.input.consume()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, self._adaptor.createWithPayload(set411))
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 75, postfixExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "postfixExpression"
+
+ class primaryExpression_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.primaryExpression_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "primaryExpression"
+ # JavaScript.g:353:1: primaryExpression : ( 'this' | Identifier | literal | arrayLiteral | objectLiteral | '(' ( LT )* expression ( LT )* ')' );
+ def primaryExpression(self, ):
+
+ retval = self.primaryExpression_return()
+ retval.start = self.input.LT(1)
+ primaryExpression_StartIndex = self.input.index()
+ root_0 = None
+
+ string_literal412 = None
+ Identifier413 = None
+ char_literal417 = None
+ LT418 = None
+ LT420 = None
+ char_literal421 = None
+ literal414 = None
+
+ arrayLiteral415 = None
+
+ objectLiteral416 = None
+
+ expression419 = None
+
+
+ string_literal412_tree = None
+ Identifier413_tree = None
+ char_literal417_tree = None
+ LT418_tree = None
+ LT420_tree = None
+ char_literal421_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 76):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:354:2: ( 'this' | Identifier | literal | arrayLiteral | objectLiteral | '(' ( LT )* expression ( LT )* ')' )
+ alt212 = 6
+ LA212 = self.input.LA(1)
+ if LA212 == 103:
+ alt212 = 1
+ elif LA212 == Identifier:
+ alt212 = 2
+ elif LA212 == StringLiteral or LA212 == NumericLiteral or LA212 == 104 or LA212 == 105 or LA212 == 106:
+ alt212 = 3
+ elif LA212 == 59:
+ alt212 = 4
+ elif LA212 == 35:
+ alt212 = 5
+ elif LA212 == 32:
+ alt212 = 6
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException("", 212, 0, self.input)
+
+ raise nvae
+
+ if alt212 == 1:
+ # JavaScript.g:354:4: 'this'
+ pass
+ root_0 = self._adaptor.nil()
+
+ string_literal412=self.match(self.input, 103, self.FOLLOW_103_in_primaryExpression2345)
+ if self._state.backtracking == 0:
+
+ string_literal412_tree = self._adaptor.createWithPayload(string_literal412)
+ self._adaptor.addChild(root_0, string_literal412_tree)
+
+
+
+ elif alt212 == 2:
+ # JavaScript.g:355:4: Identifier
+ pass
+ root_0 = self._adaptor.nil()
+
+ Identifier413=self.match(self.input, Identifier, self.FOLLOW_Identifier_in_primaryExpression2350)
+ if self._state.backtracking == 0:
+
+ Identifier413_tree = self._adaptor.createWithPayload(Identifier413)
+ self._adaptor.addChild(root_0, Identifier413_tree)
+
+
+
+ elif alt212 == 3:
+ # JavaScript.g:356:4: literal
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_literal_in_primaryExpression2355)
+ literal414 = self.literal()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, literal414.tree)
+
+
+ elif alt212 == 4:
+ # JavaScript.g:357:4: arrayLiteral
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_arrayLiteral_in_primaryExpression2360)
+ arrayLiteral415 = self.arrayLiteral()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, arrayLiteral415.tree)
+
+
+ elif alt212 == 5:
+ # JavaScript.g:358:4: objectLiteral
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_objectLiteral_in_primaryExpression2365)
+ objectLiteral416 = self.objectLiteral()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, objectLiteral416.tree)
+
+
+ elif alt212 == 6:
+ # JavaScript.g:359:4: '(' ( LT )* expression ( LT )* ')'
+ pass
+ root_0 = self._adaptor.nil()
+
+ char_literal417=self.match(self.input, 32, self.FOLLOW_32_in_primaryExpression2370)
+ if self._state.backtracking == 0:
+
+ char_literal417_tree = self._adaptor.createWithPayload(char_literal417)
+ self._adaptor.addChild(root_0, char_literal417_tree)
+
+ # JavaScript.g:359:10: ( LT )*
+ while True: #loop210
+ alt210 = 2
+ LA210_0 = self.input.LA(1)
+
+ if (LA210_0 == LT) :
+ alt210 = 1
+
+
+ if alt210 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT418=self.match(self.input, LT, self.FOLLOW_LT_in_primaryExpression2372)
+
+
+ else:
+ break #loop210
+ self._state.following.append(self.FOLLOW_expression_in_primaryExpression2376)
+ expression419 = self.expression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, expression419.tree)
+ # JavaScript.g:359:26: ( LT )*
+ while True: #loop211
+ alt211 = 2
+ LA211_0 = self.input.LA(1)
+
+ if (LA211_0 == LT) :
+ alt211 = 1
+
+
+ if alt211 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT420=self.match(self.input, LT, self.FOLLOW_LT_in_primaryExpression2378)
+
+
+ else:
+ break #loop211
+ char_literal421=self.match(self.input, 34, self.FOLLOW_34_in_primaryExpression2382)
+ if self._state.backtracking == 0:
+
+ char_literal421_tree = self._adaptor.createWithPayload(char_literal421)
+ self._adaptor.addChild(root_0, char_literal421_tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 76, primaryExpression_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "primaryExpression"
+
+ class arrayLiteral_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.arrayLiteral_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "arrayLiteral"
+ # JavaScript.g:363:1: arrayLiteral : '[' ( LT )* ( assignmentExpression )? ( ( LT )* ',' ( ( LT )* assignmentExpression )? )* ( LT )* ']' ;
+ def arrayLiteral(self, ):
+
+ retval = self.arrayLiteral_return()
+ retval.start = self.input.LT(1)
+ arrayLiteral_StartIndex = self.input.index()
+ root_0 = None
+
+ char_literal422 = None
+ LT423 = None
+ LT425 = None
+ char_literal426 = None
+ LT427 = None
+ LT429 = None
+ char_literal430 = None
+ assignmentExpression424 = None
+
+ assignmentExpression428 = None
+
+
+ char_literal422_tree = None
+ LT423_tree = None
+ LT425_tree = None
+ char_literal426_tree = None
+ LT427_tree = None
+ LT429_tree = None
+ char_literal430_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 77):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:364:2: ( '[' ( LT )* ( assignmentExpression )? ( ( LT )* ',' ( ( LT )* assignmentExpression )? )* ( LT )* ']' )
+ # JavaScript.g:364:4: '[' ( LT )* ( assignmentExpression )? ( ( LT )* ',' ( ( LT )* assignmentExpression )? )* ( LT )* ']'
+ pass
+ root_0 = self._adaptor.nil()
+
+ char_literal422=self.match(self.input, 59, self.FOLLOW_59_in_arrayLiteral2395)
+ if self._state.backtracking == 0:
+
+ char_literal422_tree = self._adaptor.createWithPayload(char_literal422)
+ self._adaptor.addChild(root_0, char_literal422_tree)
+
+ # JavaScript.g:364:10: ( LT )*
+ while True: #loop213
+ alt213 = 2
+ LA213_0 = self.input.LA(1)
+
+ if (LA213_0 == LT) :
+ LA213_2 = self.input.LA(2)
+
+ if (self.synpred280_JavaScript()) :
+ alt213 = 1
+
+
+
+
+ if alt213 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT423=self.match(self.input, LT, self.FOLLOW_LT_in_arrayLiteral2397)
+
+
+ else:
+ break #loop213
+ # JavaScript.g:364:13: ( assignmentExpression )?
+ alt214 = 2
+ LA214_0 = self.input.LA(1)
+
+ if ((Identifier <= LA214_0 <= NumericLiteral) or (31 <= LA214_0 <= 32) or LA214_0 == 35 or (58 <= LA214_0 <= 59) or (91 <= LA214_0 <= 92) or (96 <= LA214_0 <= 106)) :
+ alt214 = 1
+ if alt214 == 1:
+ # JavaScript.g:0:0: assignmentExpression
+ pass
+ self._state.following.append(self.FOLLOW_assignmentExpression_in_arrayLiteral2401)
+ assignmentExpression424 = self.assignmentExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpression424.tree)
+
+
+
+ # JavaScript.g:364:35: ( ( LT )* ',' ( ( LT )* assignmentExpression )? )*
+ while True: #loop218
+ alt218 = 2
+ alt218 = self.dfa218.predict(self.input)
+ if alt218 == 1:
+ # JavaScript.g:364:36: ( LT )* ',' ( ( LT )* assignmentExpression )?
+ pass
+ # JavaScript.g:364:38: ( LT )*
+ while True: #loop215
+ alt215 = 2
+ LA215_0 = self.input.LA(1)
+
+ if (LA215_0 == LT) :
+ alt215 = 1
+
+
+ if alt215 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT425=self.match(self.input, LT, self.FOLLOW_LT_in_arrayLiteral2405)
+
+
+ else:
+ break #loop215
+ char_literal426=self.match(self.input, 33, self.FOLLOW_33_in_arrayLiteral2409)
+ if self._state.backtracking == 0:
+
+ char_literal426_tree = self._adaptor.createWithPayload(char_literal426)
+ self._adaptor.addChild(root_0, char_literal426_tree)
+
+ # JavaScript.g:364:45: ( ( LT )* assignmentExpression )?
+ alt217 = 2
+ alt217 = self.dfa217.predict(self.input)
+ if alt217 == 1:
+ # JavaScript.g:364:46: ( LT )* assignmentExpression
+ pass
+ # JavaScript.g:364:48: ( LT )*
+ while True: #loop216
+ alt216 = 2
+ LA216_0 = self.input.LA(1)
+
+ if (LA216_0 == LT) :
+ alt216 = 1
+
+
+ if alt216 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT427=self.match(self.input, LT, self.FOLLOW_LT_in_arrayLiteral2412)
+
+
+ else:
+ break #loop216
+ self._state.following.append(self.FOLLOW_assignmentExpression_in_arrayLiteral2416)
+ assignmentExpression428 = self.assignmentExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpression428.tree)
+
+
+
+
+
+ else:
+ break #loop218
+ # JavaScript.g:364:78: ( LT )*
+ while True: #loop219
+ alt219 = 2
+ LA219_0 = self.input.LA(1)
+
+ if (LA219_0 == LT) :
+ alt219 = 1
+
+
+ if alt219 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT429=self.match(self.input, LT, self.FOLLOW_LT_in_arrayLiteral2422)
+
+
+ else:
+ break #loop219
+ char_literal430=self.match(self.input, 60, self.FOLLOW_60_in_arrayLiteral2426)
+ if self._state.backtracking == 0:
+
+ char_literal430_tree = self._adaptor.createWithPayload(char_literal430)
+ self._adaptor.addChild(root_0, char_literal430_tree)
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 77, arrayLiteral_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "arrayLiteral"
+
+ class objectLiteral_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.objectLiteral_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "objectLiteral"
+ # JavaScript.g:368:1: objectLiteral : '{' ( LT )* propertyNameAndValue ( ( LT )* ',' ( LT )* propertyNameAndValue )* ( LT )* '}' ;
+ def objectLiteral(self, ):
+
+ retval = self.objectLiteral_return()
+ retval.start = self.input.LT(1)
+ objectLiteral_StartIndex = self.input.index()
+ root_0 = None
+
+ char_literal431 = None
+ LT432 = None
+ LT434 = None
+ char_literal435 = None
+ LT436 = None
+ LT438 = None
+ char_literal439 = None
+ propertyNameAndValue433 = None
+
+ propertyNameAndValue437 = None
+
+
+ char_literal431_tree = None
+ LT432_tree = None
+ LT434_tree = None
+ char_literal435_tree = None
+ LT436_tree = None
+ LT438_tree = None
+ char_literal439_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 78):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:369:2: ( '{' ( LT )* propertyNameAndValue ( ( LT )* ',' ( LT )* propertyNameAndValue )* ( LT )* '}' )
+ # JavaScript.g:369:4: '{' ( LT )* propertyNameAndValue ( ( LT )* ',' ( LT )* propertyNameAndValue )* ( LT )* '}'
+ pass
+ root_0 = self._adaptor.nil()
+
+ char_literal431=self.match(self.input, 35, self.FOLLOW_35_in_objectLiteral2445)
+ if self._state.backtracking == 0:
+
+ char_literal431_tree = self._adaptor.createWithPayload(char_literal431)
+ self._adaptor.addChild(root_0, char_literal431_tree)
+
+ # JavaScript.g:369:10: ( LT )*
+ while True: #loop220
+ alt220 = 2
+ LA220_0 = self.input.LA(1)
+
+ if (LA220_0 == LT) :
+ alt220 = 1
+
+
+ if alt220 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT432=self.match(self.input, LT, self.FOLLOW_LT_in_objectLiteral2447)
+
+
+ else:
+ break #loop220
+ self._state.following.append(self.FOLLOW_propertyNameAndValue_in_objectLiteral2451)
+ propertyNameAndValue433 = self.propertyNameAndValue()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, propertyNameAndValue433.tree)
+ # JavaScript.g:369:34: ( ( LT )* ',' ( LT )* propertyNameAndValue )*
+ while True: #loop223
+ alt223 = 2
+ alt223 = self.dfa223.predict(self.input)
+ if alt223 == 1:
+ # JavaScript.g:369:35: ( LT )* ',' ( LT )* propertyNameAndValue
+ pass
+ # JavaScript.g:369:37: ( LT )*
+ while True: #loop221
+ alt221 = 2
+ LA221_0 = self.input.LA(1)
+
+ if (LA221_0 == LT) :
+ alt221 = 1
+
+
+ if alt221 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT434=self.match(self.input, LT, self.FOLLOW_LT_in_objectLiteral2454)
+
+
+ else:
+ break #loop221
+ char_literal435=self.match(self.input, 33, self.FOLLOW_33_in_objectLiteral2458)
+ if self._state.backtracking == 0:
+
+ char_literal435_tree = self._adaptor.createWithPayload(char_literal435)
+ self._adaptor.addChild(root_0, char_literal435_tree)
+
+ # JavaScript.g:369:46: ( LT )*
+ while True: #loop222
+ alt222 = 2
+ LA222_0 = self.input.LA(1)
+
+ if (LA222_0 == LT) :
+ alt222 = 1
+
+
+ if alt222 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT436=self.match(self.input, LT, self.FOLLOW_LT_in_objectLiteral2460)
+
+
+ else:
+ break #loop222
+ self._state.following.append(self.FOLLOW_propertyNameAndValue_in_objectLiteral2464)
+ propertyNameAndValue437 = self.propertyNameAndValue()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, propertyNameAndValue437.tree)
+
+
+ else:
+ break #loop223
+ # JavaScript.g:369:74: ( LT )*
+ while True: #loop224
+ alt224 = 2
+ LA224_0 = self.input.LA(1)
+
+ if (LA224_0 == LT) :
+ alt224 = 1
+
+
+ if alt224 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT438=self.match(self.input, LT, self.FOLLOW_LT_in_objectLiteral2468)
+
+
+ else:
+ break #loop224
+ char_literal439=self.match(self.input, 36, self.FOLLOW_36_in_objectLiteral2472)
+ if self._state.backtracking == 0:
+
+ char_literal439_tree = self._adaptor.createWithPayload(char_literal439)
+ self._adaptor.addChild(root_0, char_literal439_tree)
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 78, objectLiteral_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "objectLiteral"
+
+ class propertyNameAndValue_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.propertyNameAndValue_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "propertyNameAndValue"
+ # JavaScript.g:372:1: propertyNameAndValue : propertyName ( LT )* ':' ( LT )* assignmentExpression ;
+ def propertyNameAndValue(self, ):
+
+ retval = self.propertyNameAndValue_return()
+ retval.start = self.input.LT(1)
+ propertyNameAndValue_StartIndex = self.input.index()
+ root_0 = None
+
+ LT441 = None
+ char_literal442 = None
+ LT443 = None
+ propertyName440 = None
+
+ assignmentExpression444 = None
+
+
+ LT441_tree = None
+ char_literal442_tree = None
+ LT443_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 79):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:373:2: ( propertyName ( LT )* ':' ( LT )* assignmentExpression )
+ # JavaScript.g:373:4: propertyName ( LT )* ':' ( LT )* assignmentExpression
+ pass
+ root_0 = self._adaptor.nil()
+
+ self._state.following.append(self.FOLLOW_propertyName_in_propertyNameAndValue2484)
+ propertyName440 = self.propertyName()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, propertyName440.tree)
+ # JavaScript.g:373:19: ( LT )*
+ while True: #loop225
+ alt225 = 2
+ LA225_0 = self.input.LA(1)
+
+ if (LA225_0 == LT) :
+ alt225 = 1
+
+
+ if alt225 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT441=self.match(self.input, LT, self.FOLLOW_LT_in_propertyNameAndValue2486)
+
+
+ else:
+ break #loop225
+ char_literal442=self.match(self.input, 50, self.FOLLOW_50_in_propertyNameAndValue2490)
+ if self._state.backtracking == 0:
+
+ char_literal442_tree = self._adaptor.createWithPayload(char_literal442)
+ self._adaptor.addChild(root_0, char_literal442_tree)
+
+ # JavaScript.g:373:28: ( LT )*
+ while True: #loop226
+ alt226 = 2
+ LA226_0 = self.input.LA(1)
+
+ if (LA226_0 == LT) :
+ alt226 = 1
+
+
+ if alt226 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ LT443=self.match(self.input, LT, self.FOLLOW_LT_in_propertyNameAndValue2492)
+
+
+ else:
+ break #loop226
+ self._state.following.append(self.FOLLOW_assignmentExpression_in_propertyNameAndValue2496)
+ assignmentExpression444 = self.assignmentExpression()
+
+ self._state.following.pop()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, assignmentExpression444.tree)
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 79, propertyNameAndValue_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "propertyNameAndValue"
+
+ class propertyName_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.propertyName_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "propertyName"
+ # JavaScript.g:376:1: propertyName : ( Identifier | StringLiteral | NumericLiteral );
+ def propertyName(self, ):
+
+ retval = self.propertyName_return()
+ retval.start = self.input.LT(1)
+ propertyName_StartIndex = self.input.index()
+ root_0 = None
+
+ set445 = None
+
+ set445_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 80):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:377:2: ( Identifier | StringLiteral | NumericLiteral )
+ # JavaScript.g:
+ pass
+ root_0 = self._adaptor.nil()
+
+ set445 = self.input.LT(1)
+ if (Identifier <= self.input.LA(1) <= NumericLiteral):
+ self.input.consume()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, self._adaptor.createWithPayload(set445))
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 80, propertyName_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "propertyName"
+
+ class literal_return(ParserRuleReturnScope):
+ def __init__(self):
+ super(JavaScriptParser.literal_return, self).__init__()
+
+ self.tree = None
+
+
+
+
+ # $ANTLR start "literal"
+ # JavaScript.g:383:1: literal : ( 'null' | 'true' | 'false' | StringLiteral | NumericLiteral );
+ def literal(self, ):
+
+ retval = self.literal_return()
+ retval.start = self.input.LT(1)
+ literal_StartIndex = self.input.index()
+ root_0 = None
+
+ set446 = None
+
+ set446_tree = None
+
+ success = False
+ try:
+ try:
+ if self._state.backtracking > 0 and self.alreadyParsedRule(self.input, 81):
+ # for cached failed rules, alreadyParsedRule will raise an exception
+ success = True
+ return retval
+
+ # JavaScript.g:384:2: ( 'null' | 'true' | 'false' | StringLiteral | NumericLiteral )
+ # JavaScript.g:
+ pass
+ root_0 = self._adaptor.nil()
+
+ set446 = self.input.LT(1)
+ if (StringLiteral <= self.input.LA(1) <= NumericLiteral) or (104 <= self.input.LA(1) <= 106):
+ self.input.consume()
+ if self._state.backtracking == 0:
+ self._adaptor.addChild(root_0, self._adaptor.createWithPayload(set446))
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+
+
+
+ retval.stop = self.input.LT(-1)
+
+ if self._state.backtracking == 0:
+
+ retval.tree = self._adaptor.rulePostProcessing(root_0)
+ self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)
+
+
+ success = True
+ except RecognitionException, re:
+ self.reportError(re)
+ self.recover(self.input, re)
+ retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)
+ finally:
+ if self._state.backtracking > 0:
+ self.memoize(self.input, 81, literal_StartIndex, success)
+
+ pass
+ return retval
+
+ # $ANTLR end "literal"
+
+ # $ANTLR start "synpred5_JavaScript"
+ def synpred5_JavaScript_fragment(self, ):
+ # JavaScript.g:32:4: ( functionDeclaration )
+ # JavaScript.g:32:4: functionDeclaration
+ pass
+ self._state.following.append(self.FOLLOW_functionDeclaration_in_synpred5_JavaScript90)
+ self.functionDeclaration()
+
+ self._state.following.pop()
+
+
+ # $ANTLR end "synpred5_JavaScript"
+
+
+
+ # $ANTLR start "synpred9_JavaScript"
+ def synpred9_JavaScript_fragment(self, ):
+ # JavaScript.g:42:15: ( LT )
+ # JavaScript.g:42:15: LT
+ pass
+ self.match(self.input, LT, self.FOLLOW_LT_in_synpred9_JavaScript140)
+
+
+ # $ANTLR end "synpred9_JavaScript"
+
+
+
+ # $ANTLR start "synpred21_JavaScript"
+ def synpred21_JavaScript_fragment(self, ):
+ # JavaScript.g:55:4: ( statementBlock )
+ # JavaScript.g:55:4: statementBlock
+ pass
+ self._state.following.append(self.FOLLOW_statementBlock_in_synpred21_JavaScript234)
+ self.statementBlock()
+
+ self._state.following.pop()
+
+
+ # $ANTLR end "synpred21_JavaScript"
+
+
+
+ # $ANTLR start "synpred24_JavaScript"
+ def synpred24_JavaScript_fragment(self, ):
+ # JavaScript.g:58:4: ( expressionStatement )
+ # JavaScript.g:58:4: expressionStatement
+ pass
+ self._state.following.append(self.FOLLOW_expressionStatement_in_synpred24_JavaScript249)
+ self.expressionStatement()
+
+ self._state.following.pop()
+
+
+ # $ANTLR end "synpred24_JavaScript"
+
+
+
+ # $ANTLR start "synpred31_JavaScript"
+ def synpred31_JavaScript_fragment(self, ):
+ # JavaScript.g:65:4: ( labelledStatement )
+ # JavaScript.g:65:4: labelledStatement
+ pass
+ self._state.following.append(self.FOLLOW_labelledStatement_in_synpred31_JavaScript284)
+ self.labelledStatement()
+
+ self._state.following.pop()
+
+
+ # $ANTLR end "synpred31_JavaScript"
+
+
+
+ # $ANTLR start "synpred34_JavaScript"
+ def synpred34_JavaScript_fragment(self, ):
+ # JavaScript.g:72:8: ( LT )
+ # JavaScript.g:72:8: LT
+ pass
+ self.match(self.input, LT, self.FOLLOW_LT_in_synpred34_JavaScript313)
+
+
+ # $ANTLR end "synpred34_JavaScript"
+
+
+
+ # $ANTLR start "synpred47_JavaScript"
+ def synpred47_JavaScript_fragment(self, ):
+ # JavaScript.g:92:15: ( LT )
+ # JavaScript.g:92:15: LT
+ pass
+ self.match(self.input, LT, self.FOLLOW_LT_in_synpred47_JavaScript440)
+
+
+ # $ANTLR end "synpred47_JavaScript"
+
+
+
+ # $ANTLR start "synpred49_JavaScript"
+ def synpred49_JavaScript_fragment(self, ):
+ # JavaScript.g:96:15: ( LT )
+ # JavaScript.g:96:15: LT
+ pass
+ self.match(self.input, LT, self.FOLLOW_LT_in_synpred49_JavaScript459)
+
+
+ # $ANTLR end "synpred49_JavaScript"
+
+
+
+ # $ANTLR start "synpred60_JavaScript"
+ def synpred60_JavaScript_fragment(self, ):
+ # JavaScript.g:116:59: ( ( LT )* 'else' ( LT )* statement )
+ # JavaScript.g:116:59: ( LT )* 'else' ( LT )* statement
+ pass
+ # JavaScript.g:116:61: ( LT )*
+ while True: #loop239
+ alt239 = 2
+ LA239_0 = self.input.LA(1)
+
+ if (LA239_0 == LT) :
+ alt239 = 1
+
+
+ if alt239 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ self.match(self.input, LT, self.FOLLOW_LT_in_synpred60_JavaScript572)
+
+
+ else:
+ break #loop239
+ self.match(self.input, 41, self.FOLLOW_41_in_synpred60_JavaScript576)
+ # JavaScript.g:116:73: ( LT )*
+ while True: #loop240
+ alt240 = 2
+ LA240_0 = self.input.LA(1)
+
+ if (LA240_0 == LT) :
+ alt240 = 1
+
+
+ if alt240 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ self.match(self.input, LT, self.FOLLOW_LT_in_synpred60_JavaScript578)
+
+
+ else:
+ break #loop240
+ self._state.following.append(self.FOLLOW_statement_in_synpred60_JavaScript582)
+ self.statement()
+
+ self._state.following.pop()
+
+
+ # $ANTLR end "synpred60_JavaScript"
+
+
+
+ # $ANTLR start "synpred63_JavaScript"
+ def synpred63_JavaScript_fragment(self, ):
+ # JavaScript.g:122:4: ( forStatement )
+ # JavaScript.g:122:4: forStatement
+ pass
+ self._state.following.append(self.FOLLOW_forStatement_in_synpred63_JavaScript606)
+ self.forStatement()
+
+ self._state.following.pop()
+
+
+ # $ANTLR end "synpred63_JavaScript"
+
+
+
+ # $ANTLR start "synpred118_JavaScript"
+ def synpred118_JavaScript_fragment(self, ):
+ # JavaScript.g:181:36: ( LT )
+ # JavaScript.g:181:36: LT
+ pass
+ self.match(self.input, LT, self.FOLLOW_LT_in_synpred118_JavaScript1087)
+
+
+ # $ANTLR end "synpred118_JavaScript"
+
+
+
+ # $ANTLR start "synpred121_JavaScript"
+ def synpred121_JavaScript_fragment(self, ):
+ # JavaScript.g:185:23: ( LT )
+ # JavaScript.g:185:23: LT
+ pass
+ self.match(self.input, LT, self.FOLLOW_LT_in_synpred121_JavaScript1112)
+
+
+ # $ANTLR end "synpred121_JavaScript"
+
+
+
+ # $ANTLR start "synpred140_JavaScript"
+ def synpred140_JavaScript_fragment(self, ):
+ # JavaScript.g:214:4: ( conditionalExpression )
+ # JavaScript.g:214:4: conditionalExpression
+ pass
+ self._state.following.append(self.FOLLOW_conditionalExpression_in_synpred140_JavaScript1304)
+ self.conditionalExpression()
+
+ self._state.following.pop()
+
+
+ # $ANTLR end "synpred140_JavaScript"
+
+
+
+ # $ANTLR start "synpred143_JavaScript"
+ def synpred143_JavaScript_fragment(self, ):
+ # JavaScript.g:219:4: ( conditionalExpressionNoIn )
+ # JavaScript.g:219:4: conditionalExpressionNoIn
+ pass
+ self._state.following.append(self.FOLLOW_conditionalExpressionNoIn_in_synpred143_JavaScript1333)
+ self.conditionalExpressionNoIn()
+
+ self._state.following.pop()
+
+
+ # $ANTLR end "synpred143_JavaScript"
+
+
+
+ # $ANTLR start "synpred146_JavaScript"
+ def synpred146_JavaScript_fragment(self, ):
+ # JavaScript.g:224:4: ( callExpression )
+ # JavaScript.g:224:4: callExpression
+ pass
+ self._state.following.append(self.FOLLOW_callExpression_in_synpred146_JavaScript1362)
+ self.callExpression()
+
+ self._state.following.pop()
+
+
+ # $ANTLR end "synpred146_JavaScript"
+
+
+
+ # $ANTLR start "synpred147_JavaScript"
+ def synpred147_JavaScript_fragment(self, ):
+ # JavaScript.g:229:4: ( memberExpression )
+ # JavaScript.g:229:4: memberExpression
+ pass
+ self._state.following.append(self.FOLLOW_memberExpression_in_synpred147_JavaScript1379)
+ self.memberExpression()
+
+ self._state.following.pop()
+
+
+ # $ANTLR end "synpred147_JavaScript"
+
+
+
+ # $ANTLR start "synpred154_JavaScript"
+ def synpred154_JavaScript_fragment(self, ):
+ # JavaScript.g:234:91: ( ( LT )* memberExpressionSuffix )
+ # JavaScript.g:234:91: ( LT )* memberExpressionSuffix
+ pass
+ # JavaScript.g:234:93: ( LT )*
+ while True: #loop254
+ alt254 = 2
+ LA254_0 = self.input.LA(1)
+
+ if (LA254_0 == LT) :
+ alt254 = 1
+
+
+ if alt254 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ self.match(self.input, LT, self.FOLLOW_LT_in_synpred154_JavaScript1427)
+
+
+ else:
+ break #loop254
+ self._state.following.append(self.FOLLOW_memberExpressionSuffix_in_synpred154_JavaScript1431)
+ self.memberExpressionSuffix()
+
+ self._state.following.pop()
+
+
+ # $ANTLR end "synpred154_JavaScript"
+
+
+
+ # $ANTLR start "synpred158_JavaScript"
+ def synpred158_JavaScript_fragment(self, ):
+ # JavaScript.g:243:37: ( ( LT )* callExpressionSuffix )
+ # JavaScript.g:243:37: ( LT )* callExpressionSuffix
+ pass
+ # JavaScript.g:243:39: ( LT )*
+ while True: #loop255
+ alt255 = 2
+ LA255_0 = self.input.LA(1)
+
+ if (LA255_0 == LT) :
+ alt255 = 1
+
+
+ if alt255 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ self.match(self.input, LT, self.FOLLOW_LT_in_synpred158_JavaScript1470)
+
+
+ else:
+ break #loop255
+ self._state.following.append(self.FOLLOW_callExpressionSuffix_in_synpred158_JavaScript1474)
+ self.callExpressionSuffix()
+
+ self._state.following.pop()
+
+
+ # $ANTLR end "synpred158_JavaScript"
+
+
+
+ # $ANTLR start "synpred256_JavaScript"
+ def synpred256_JavaScript_fragment(self, ):
+ # JavaScript.g:337:30: ( ( LT )* ( '+' | '-' ) ( LT )* multiplicativeExpression )
+ # JavaScript.g:337:30: ( LT )* ( '+' | '-' ) ( LT )* multiplicativeExpression
+ pass
+ # JavaScript.g:337:32: ( LT )*
+ while True: #loop300
+ alt300 = 2
+ LA300_0 = self.input.LA(1)
+
+ if (LA300_0 == LT) :
+ alt300 = 1
+
+
+ if alt300 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ self.match(self.input, LT, self.FOLLOW_LT_in_synpred256_JavaScript2207)
+
+
+ else:
+ break #loop300
+ if (91 <= self.input.LA(1) <= 92):
+ self.input.consume()
+ self._state.errorRecovery = False
+
+ else:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mse = MismatchedSetException(None, self.input)
+ raise mse
+
+
+ # JavaScript.g:337:49: ( LT )*
+ while True: #loop301
+ alt301 = 2
+ LA301_0 = self.input.LA(1)
+
+ if (LA301_0 == LT) :
+ alt301 = 1
+
+
+ if alt301 == 1:
+ # JavaScript.g:0:0: LT
+ pass
+ self.match(self.input, LT, self.FOLLOW_LT_in_synpred256_JavaScript2219)
+
+
+ else:
+ break #loop301
+ self._state.following.append(self.FOLLOW_multiplicativeExpression_in_synpred256_JavaScript2223)
+ self.multiplicativeExpression()
+
+ self._state.following.pop()
+
+
+ # $ANTLR end "synpred256_JavaScript"
+
+
+
+ # $ANTLR start "synpred280_JavaScript"
+ def synpred280_JavaScript_fragment(self, ):
+ # JavaScript.g:364:8: ( LT )
+ # JavaScript.g:364:8: LT
+ pass
+ self.match(self.input, LT, self.FOLLOW_LT_in_synpred280_JavaScript2397)
+
+
+ # $ANTLR end "synpred280_JavaScript"
+
+
+
+
+ # Delegated rules
+
+ def synpred60_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred60_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred121_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred121_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred146_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred146_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred154_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred154_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred34_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred34_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred147_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred147_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred63_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred63_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred47_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred47_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred256_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred256_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred280_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred280_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred118_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred118_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred158_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred158_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred9_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred9_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred21_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred21_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred31_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred31_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred49_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred49_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred24_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred24_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred143_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred143_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred140_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred140_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+ def synpred5_JavaScript(self):
+ self._state.backtracking += 1
+ start = self.input.mark()
+ try:
+ self.synpred5_JavaScript_fragment()
+ except BacktrackingFailed:
+ success = False
+ else:
+ success = True
+ self.input.rewind(start)
+ self._state.backtracking -= 1
+ return success
+
+
+
+ # lookup tables for DFA #4
+
+ DFA4_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA4_eof = DFA.unpack(
+ u"\2\2\2\uffff"
+ )
+
+ DFA4_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA4_max = DFA.unpack(
+ u"\2\152\2\uffff"
+ )
+
+ DFA4_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA4_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA4_transition = [
+ DFA.unpack(u"\1\1\3\3\27\uffff\2\3\2\uffff\1\3\1\2\2\3\1\uffff\1"
+ u"\3\1\uffff\3\3\1\uffff\4\3\1\uffff\1\3\2\uffff\2\3\2\uffff\2\3"
+ u"\37\uffff\2\3\3\uffff\13\3"),
+ DFA.unpack(u"\1\1\3\3\27\uffff\2\3\2\uffff\1\3\1\2\2\3\1\uffff\1"
+ u"\3\1\uffff\3\3\1\uffff\4\3\1\uffff\1\3\2\uffff\2\3\2\uffff\2\3"
+ u"\37\uffff\2\3\3\uffff\13\3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #4
+
+ class DFA4(DFA):
+ pass
+
+
+ # lookup tables for DFA #5
+
+ DFA5_eot = DFA.unpack(
+ u"\30\uffff"
+ )
+
+ DFA5_eof = DFA.unpack(
+ u"\30\uffff"
+ )
+
+ DFA5_min = DFA.unpack(
+ u"\1\5\1\0\26\uffff"
+ )
+
+ DFA5_max = DFA.unpack(
+ u"\1\152\1\0\26\uffff"
+ )
+
+ DFA5_accept = DFA.unpack(
+ u"\2\uffff\1\2\24\uffff\1\1"
+ )
+
+ DFA5_special = DFA.unpack(
+ u"\1\uffff\1\0\26\uffff"
+ )
+
+
+ DFA5_transition = [
+ DFA.unpack(u"\3\2\27\uffff\1\1\1\2\2\uffff\1\2\1\uffff\2\2\1\uffff"
+ u"\1\2\1\uffff\3\2\1\uffff\4\2\1\uffff\1\2\2\uffff\2\2\2\uffff\2"
+ u"\2\37\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #5
+
+ class DFA5(DFA):
+ pass
+
+
+ def specialStateTransition(self_, s, input):
+ # convince pylint that my self_ magic is ok ;)
+ # pylint: disable-msg=E0213
+
+ # pretend we are a member of the recognizer
+ # thus semantic predicates can be evaluated
+ self = self_.recognizer
+
+ _s = s
+
+ if s == 0:
+ LA5_1 = input.LA(1)
+
+
+ index5_1 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred5_JavaScript()):
+ s = 23
+
+ elif (True):
+ s = 2
+
+
+ input.seek(index5_1)
+ if s >= 0:
+ return s
+
+ if self._state.backtracking >0:
+ raise BacktrackingFailed
+ nvae = NoViableAltException(self_.getDescription(), 5, _s, input)
+ self_.error(nvae)
+ raise nvae
+ # lookup tables for DFA #17
+
+ DFA17_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA17_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA17_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA17_max = DFA.unpack(
+ u"\2\42\2\uffff"
+ )
+
+ DFA17_accept = DFA.unpack(
+ u"\2\uffff\1\1\1\2"
+ )
+
+ DFA17_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA17_transition = [
+ DFA.unpack(u"\1\1\1\2\34\uffff\1\3"),
+ DFA.unpack(u"\1\1\1\2\34\uffff\1\3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #17
+
+ class DFA17(DFA):
+ pass
+
+
+ # lookup tables for DFA #16
+
+ DFA16_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA16_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA16_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA16_max = DFA.unpack(
+ u"\2\42\2\uffff"
+ )
+
+ DFA16_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA16_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA16_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\3\1\2"),
+ DFA.unpack(u"\1\1\34\uffff\1\3\1\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #16
+
+ class DFA16(DFA):
+ pass
+
+
+ # lookup tables for DFA #21
+
+ DFA21_eot = DFA.unpack(
+ u"\31\uffff"
+ )
+
+ DFA21_eof = DFA.unpack(
+ u"\31\uffff"
+ )
+
+ DFA21_min = DFA.unpack(
+ u"\1\5\1\0\3\uffff\1\0\23\uffff"
+ )
+
+ DFA21_max = DFA.unpack(
+ u"\1\152\1\0\3\uffff\1\0\23\uffff"
+ )
+
+ DFA21_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\3\1\4\7\uffff\1\5\1\6\2\uffff\1\7\1\10\1\11\1\12"
+ u"\1\14\1\15\1\16\1\1\1\13"
+ )
+
+ DFA21_special = DFA.unpack(
+ u"\1\uffff\1\0\3\uffff\1\1\23\uffff"
+ )
+
+
+ DFA21_transition = [
+ DFA.unpack(u"\1\5\2\4\27\uffff\2\4\2\uffff\1\1\1\uffff\1\2\1\3\1"
+ u"\uffff\1\14\1\uffff\3\15\1\uffff\1\20\1\21\1\22\1\23\1\uffff\1"
+ u"\24\2\uffff\1\25\1\26\2\uffff\2\4\37\uffff\2\4\3\uffff\13\4"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #21
+
+ class DFA21(DFA):
+ pass
+
+
+ def specialStateTransition(self_, s, input):
+ # convince pylint that my self_ magic is ok ;)
+ # pylint: disable-msg=E0213
+
+ # pretend we are a member of the recognizer
+ # thus semantic predicates can be evaluated
+ self = self_.recognizer
+
+ _s = s
+
+ if s == 0:
+ LA21_1 = input.LA(1)
+
+
+ index21_1 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred21_JavaScript()):
+ s = 23
+
+ elif (self.synpred24_JavaScript()):
+ s = 4
+
+
+ input.seek(index21_1)
+ if s >= 0:
+ return s
+ elif s == 1:
+ LA21_5 = input.LA(1)
+
+
+ index21_5 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred24_JavaScript()):
+ s = 4
+
+ elif (self.synpred31_JavaScript()):
+ s = 24
+
+
+ input.seek(index21_5)
+ if s >= 0:
+ return s
+
+ if self._state.backtracking >0:
+ raise BacktrackingFailed
+ nvae = NoViableAltException(self_.getDescription(), 21, _s, input)
+ self_.error(nvae)
+ raise nvae
+ # lookup tables for DFA #26
+
+ DFA26_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA26_eof = DFA.unpack(
+ u"\1\2\3\uffff"
+ )
+
+ DFA26_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA26_max = DFA.unpack(
+ u"\2\152\2\uffff"
+ )
+
+ DFA26_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA26_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA26_transition = [
+ DFA.unpack(u"\1\1\3\3\27\uffff\2\3\2\uffff\1\3\1\2\2\3\1\uffff\1"
+ u"\3\1\uffff\3\3\1\uffff\4\3\1\uffff\1\3\2\2\2\3\2\uffff\2\3\37\uffff"
+ u"\2\3\3\uffff\13\3"),
+ DFA.unpack(u"\1\1\3\3\27\uffff\2\3\2\uffff\1\3\1\2\2\3\1\uffff\1"
+ u"\3\1\uffff\3\3\1\uffff\4\3\1\uffff\1\3\2\2\2\3\2\uffff\2\3\37\uffff"
+ u"\2\3\3\uffff\13\3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #26
+
+ class DFA26(DFA):
+ pass
+
+
+ # lookup tables for DFA #30
+
+ DFA30_eot = DFA.unpack(
+ u"\5\uffff"
+ )
+
+ DFA30_eof = DFA.unpack(
+ u"\1\uffff\1\2\2\uffff\1\2"
+ )
+
+ DFA30_min = DFA.unpack(
+ u"\2\4\2\uffff\1\4"
+ )
+
+ DFA30_max = DFA.unpack(
+ u"\1\46\1\152\2\uffff\1\152"
+ )
+
+ DFA30_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1\1\uffff"
+ )
+
+ DFA30_special = DFA.unpack(
+ u"\5\uffff"
+ )
+
+
+ DFA30_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\3\4\uffff\1\2"),
+ DFA.unpack(u"\1\4\3\2\27\uffff\2\2\1\3\1\uffff\4\2\1\uffff\5\2\1"
+ u"\uffff\4\2\1\uffff\5\2\2\uffff\2\2\37\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\4\3\2\27\uffff\2\2\1\3\1\uffff\4\2\1\uffff\5\2\1"
+ u"\uffff\4\2\1\uffff\5\2\2\uffff\2\2\37\uffff\2\2\3\uffff\13\2")
+ ]
+
+ # class definition for DFA #30
+
+ class DFA30(DFA):
+ pass
+
+
+ # lookup tables for DFA #33
+
+ DFA33_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA33_eof = DFA.unpack(
+ u"\1\2\3\uffff"
+ )
+
+ DFA33_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA33_max = DFA.unpack(
+ u"\2\46\2\uffff"
+ )
+
+ DFA33_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA33_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA33_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\3\4\uffff\1\2"),
+ DFA.unpack(u"\1\1\34\uffff\1\3\4\uffff\1\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #33
+
+ class DFA33(DFA):
+ pass
+
+
+ # lookup tables for DFA #57
+
+ DFA57_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA57_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA57_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA57_max = DFA.unpack(
+ u"\2\152\2\uffff"
+ )
+
+ DFA57_accept = DFA.unpack(
+ u"\2\uffff\1\1\1\2"
+ )
+
+ DFA57_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA57_transition = [
+ DFA.unpack(u"\1\1\3\2\27\uffff\2\2\2\uffff\1\2\1\uffff\1\2\1\3\23"
+ u"\uffff\2\2\37\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u"\1\1\3\2\27\uffff\2\2\2\uffff\1\2\1\uffff\1\2\1\3\23"
+ u"\uffff\2\2\37\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #57
+
+ class DFA57(DFA):
+ pass
+
+
+ # lookup tables for DFA #60
+
+ DFA60_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA60_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA60_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA60_max = DFA.unpack(
+ u"\2\152\2\uffff"
+ )
+
+ DFA60_accept = DFA.unpack(
+ u"\2\uffff\1\1\1\2"
+ )
+
+ DFA60_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA60_transition = [
+ DFA.unpack(u"\1\1\3\2\27\uffff\2\2\2\uffff\1\2\2\uffff\1\3\23\uffff"
+ u"\2\2\37\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u"\1\1\3\2\27\uffff\2\2\2\uffff\1\2\2\uffff\1\3\23\uffff"
+ u"\2\2\37\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #60
+
+ class DFA60(DFA):
+ pass
+
+
+ # lookup tables for DFA #63
+
+ DFA63_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA63_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA63_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA63_max = DFA.unpack(
+ u"\2\152\2\uffff"
+ )
+
+ DFA63_accept = DFA.unpack(
+ u"\2\uffff\1\1\1\2"
+ )
+
+ DFA63_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA63_transition = [
+ DFA.unpack(u"\1\1\3\2\27\uffff\2\2\1\uffff\1\3\1\2\26\uffff\2\2\37"
+ u"\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u"\1\1\3\2\27\uffff\2\2\1\uffff\1\3\1\2\26\uffff\2\2"
+ u"\37\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #63
+
+ class DFA63(DFA):
+ pass
+
+
+ # lookup tables for DFA #90
+
+ DFA90_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA90_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA90_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA90_max = DFA.unpack(
+ u"\2\65\2\uffff"
+ )
+
+ DFA90_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA90_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA90_transition = [
+ DFA.unpack(u"\1\1\37\uffff\1\2\17\uffff\1\3\1\2"),
+ DFA.unpack(u"\1\1\37\uffff\1\2\17\uffff\1\3\1\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #90
+
+ class DFA90(DFA):
+ pass
+
+
+ # lookup tables for DFA #94
+
+ DFA94_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA94_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA94_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA94_max = DFA.unpack(
+ u"\2\65\2\uffff"
+ )
+
+ DFA94_accept = DFA.unpack(
+ u"\2\uffff\1\1\1\2"
+ )
+
+ DFA94_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA94_transition = [
+ DFA.unpack(u"\1\1\37\uffff\1\3\20\uffff\1\2"),
+ DFA.unpack(u"\1\1\37\uffff\1\3\20\uffff\1\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #94
+
+ class DFA94(DFA):
+ pass
+
+
+ # lookup tables for DFA #93
+
+ DFA93_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA93_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA93_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA93_max = DFA.unpack(
+ u"\2\64\2\uffff"
+ )
+
+ DFA93_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA93_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA93_transition = [
+ DFA.unpack(u"\1\1\37\uffff\1\2\17\uffff\1\3"),
+ DFA.unpack(u"\1\1\37\uffff\1\2\17\uffff\1\3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #93
+
+ class DFA93(DFA):
+ pass
+
+
+ # lookup tables for DFA #106
+
+ DFA106_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA106_eof = DFA.unpack(
+ u"\2\3\2\uffff"
+ )
+
+ DFA106_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA106_max = DFA.unpack(
+ u"\2\152\2\uffff"
+ )
+
+ DFA106_accept = DFA.unpack(
+ u"\2\uffff\1\1\1\2"
+ )
+
+ DFA106_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA106_transition = [
+ DFA.unpack(u"\1\1\3\3\27\uffff\2\3\2\uffff\4\3\1\uffff\5\3\1\uffff"
+ u"\4\3\1\uffff\5\3\1\uffff\1\2\2\3\37\uffff\2\3\3\uffff\13\3"),
+ DFA.unpack(u"\1\1\3\3\27\uffff\2\3\2\uffff\4\3\1\uffff\5\3\1\uffff"
+ u"\4\3\1\uffff\5\3\1\uffff\1\2\2\3\37\uffff\2\3\3\uffff\13\3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #106
+
+ class DFA106(DFA):
+ pass
+
+
+ # lookup tables for DFA #115
+
+ DFA115_eot = DFA.unpack(
+ u"\5\uffff"
+ )
+
+ DFA115_eof = DFA.unpack(
+ u"\2\2\2\uffff\1\2"
+ )
+
+ DFA115_min = DFA.unpack(
+ u"\2\4\2\uffff\1\4"
+ )
+
+ DFA115_max = DFA.unpack(
+ u"\1\74\1\152\2\uffff\1\152"
+ )
+
+ DFA115_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1\1\uffff"
+ )
+
+ DFA115_special = DFA.unpack(
+ u"\5\uffff"
+ )
+
+
+ DFA115_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\3\1\2\3\uffff\1\2\13\uffff\1\2\11\uffff"
+ u"\1\2"),
+ DFA.unpack(u"\1\4\3\2\27\uffff\2\2\1\3\5\2\1\uffff\5\2\1\uffff\12"
+ u"\2\2\uffff\3\2\36\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\4\3\2\27\uffff\2\2\1\3\5\2\1\uffff\5\2\1\uffff\12"
+ u"\2\2\uffff\3\2\36\uffff\2\2\3\uffff\13\2")
+ ]
+
+ # class definition for DFA #115
+
+ class DFA115(DFA):
+ pass
+
+
+ # lookup tables for DFA #118
+
+ DFA118_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA118_eof = DFA.unpack(
+ u"\1\2\3\uffff"
+ )
+
+ DFA118_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA118_max = DFA.unpack(
+ u"\2\46\2\uffff"
+ )
+
+ DFA118_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA118_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA118_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\3\4\uffff\1\2"),
+ DFA.unpack(u"\1\1\34\uffff\1\3\4\uffff\1\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #118
+
+ class DFA118(DFA):
+ pass
+
+
+ # lookup tables for DFA #121
+
+ DFA121_eot = DFA.unpack(
+ u"\13\uffff"
+ )
+
+ DFA121_eof = DFA.unpack(
+ u"\13\uffff"
+ )
+
+ DFA121_min = DFA.unpack(
+ u"\1\5\10\0\2\uffff"
+ )
+
+ DFA121_max = DFA.unpack(
+ u"\1\152\10\0\2\uffff"
+ )
+
+ DFA121_accept = DFA.unpack(
+ u"\11\uffff\1\1\1\2"
+ )
+
+ DFA121_special = DFA.unpack(
+ u"\1\uffff\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7\2\uffff"
+ )
+
+
+ DFA121_transition = [
+ DFA.unpack(u"\1\2\2\3\27\uffff\1\7\1\6\2\uffff\1\5\26\uffff\1\10"
+ u"\1\4\37\uffff\2\11\3\uffff\7\11\1\1\3\3"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #121
+
+ class DFA121(DFA):
+ pass
+
+
+ def specialStateTransition(self_, s, input):
+ # convince pylint that my self_ magic is ok ;)
+ # pylint: disable-msg=E0213
+
+ # pretend we are a member of the recognizer
+ # thus semantic predicates can be evaluated
+ self = self_.recognizer
+
+ _s = s
+
+ if s == 0:
+ LA121_1 = input.LA(1)
+
+
+ index121_1 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred140_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index121_1)
+ if s >= 0:
+ return s
+ elif s == 1:
+ LA121_2 = input.LA(1)
+
+
+ index121_2 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred140_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index121_2)
+ if s >= 0:
+ return s
+ elif s == 2:
+ LA121_3 = input.LA(1)
+
+
+ index121_3 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred140_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index121_3)
+ if s >= 0:
+ return s
+ elif s == 3:
+ LA121_4 = input.LA(1)
+
+
+ index121_4 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred140_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index121_4)
+ if s >= 0:
+ return s
+ elif s == 4:
+ LA121_5 = input.LA(1)
+
+
+ index121_5 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred140_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index121_5)
+ if s >= 0:
+ return s
+ elif s == 5:
+ LA121_6 = input.LA(1)
+
+
+ index121_6 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred140_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index121_6)
+ if s >= 0:
+ return s
+ elif s == 6:
+ LA121_7 = input.LA(1)
+
+
+ index121_7 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred140_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index121_7)
+ if s >= 0:
+ return s
+ elif s == 7:
+ LA121_8 = input.LA(1)
+
+
+ index121_8 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred140_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index121_8)
+ if s >= 0:
+ return s
+
+ if self._state.backtracking >0:
+ raise BacktrackingFailed
+ nvae = NoViableAltException(self_.getDescription(), 121, _s, input)
+ self_.error(nvae)
+ raise nvae
+ # lookup tables for DFA #124
+
+ DFA124_eot = DFA.unpack(
+ u"\13\uffff"
+ )
+
+ DFA124_eof = DFA.unpack(
+ u"\13\uffff"
+ )
+
+ DFA124_min = DFA.unpack(
+ u"\1\5\10\0\2\uffff"
+ )
+
+ DFA124_max = DFA.unpack(
+ u"\1\152\10\0\2\uffff"
+ )
+
+ DFA124_accept = DFA.unpack(
+ u"\11\uffff\1\1\1\2"
+ )
+
+ DFA124_special = DFA.unpack(
+ u"\1\uffff\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7\2\uffff"
+ )
+
+
+ DFA124_transition = [
+ DFA.unpack(u"\1\2\2\3\27\uffff\1\7\1\6\2\uffff\1\5\26\uffff\1\10"
+ u"\1\4\37\uffff\2\11\3\uffff\7\11\1\1\3\3"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #124
+
+ class DFA124(DFA):
+ pass
+
+
+ def specialStateTransition(self_, s, input):
+ # convince pylint that my self_ magic is ok ;)
+ # pylint: disable-msg=E0213
+
+ # pretend we are a member of the recognizer
+ # thus semantic predicates can be evaluated
+ self = self_.recognizer
+
+ _s = s
+
+ if s == 0:
+ LA124_1 = input.LA(1)
+
+
+ index124_1 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred143_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index124_1)
+ if s >= 0:
+ return s
+ elif s == 1:
+ LA124_2 = input.LA(1)
+
+
+ index124_2 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred143_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index124_2)
+ if s >= 0:
+ return s
+ elif s == 2:
+ LA124_3 = input.LA(1)
+
+
+ index124_3 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred143_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index124_3)
+ if s >= 0:
+ return s
+ elif s == 3:
+ LA124_4 = input.LA(1)
+
+
+ index124_4 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred143_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index124_4)
+ if s >= 0:
+ return s
+ elif s == 4:
+ LA124_5 = input.LA(1)
+
+
+ index124_5 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred143_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index124_5)
+ if s >= 0:
+ return s
+ elif s == 5:
+ LA124_6 = input.LA(1)
+
+
+ index124_6 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred143_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index124_6)
+ if s >= 0:
+ return s
+ elif s == 6:
+ LA124_7 = input.LA(1)
+
+
+ index124_7 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred143_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index124_7)
+ if s >= 0:
+ return s
+ elif s == 7:
+ LA124_8 = input.LA(1)
+
+
+ index124_8 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred143_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index124_8)
+ if s >= 0:
+ return s
+
+ if self._state.backtracking >0:
+ raise BacktrackingFailed
+ nvae = NoViableAltException(self_.getDescription(), 124, _s, input)
+ self_.error(nvae)
+ raise nvae
+ # lookup tables for DFA #125
+
+ DFA125_eot = DFA.unpack(
+ u"\13\uffff"
+ )
+
+ DFA125_eof = DFA.unpack(
+ u"\13\uffff"
+ )
+
+ DFA125_min = DFA.unpack(
+ u"\1\5\10\0\2\uffff"
+ )
+
+ DFA125_max = DFA.unpack(
+ u"\1\152\10\0\2\uffff"
+ )
+
+ DFA125_accept = DFA.unpack(
+ u"\11\uffff\1\1\1\2"
+ )
+
+ DFA125_special = DFA.unpack(
+ u"\1\uffff\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7\2\uffff"
+ )
+
+
+ DFA125_transition = [
+ DFA.unpack(u"\1\2\2\3\27\uffff\1\7\1\6\2\uffff\1\5\26\uffff\1\10"
+ u"\1\4\53\uffff\1\1\3\3"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #125
+
+ class DFA125(DFA):
+ pass
+
+
+ def specialStateTransition(self_, s, input):
+ # convince pylint that my self_ magic is ok ;)
+ # pylint: disable-msg=E0213
+
+ # pretend we are a member of the recognizer
+ # thus semantic predicates can be evaluated
+ self = self_.recognizer
+
+ _s = s
+
+ if s == 0:
+ LA125_1 = input.LA(1)
+
+
+ index125_1 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred146_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index125_1)
+ if s >= 0:
+ return s
+ elif s == 1:
+ LA125_2 = input.LA(1)
+
+
+ index125_2 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred146_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index125_2)
+ if s >= 0:
+ return s
+ elif s == 2:
+ LA125_3 = input.LA(1)
+
+
+ index125_3 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred146_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index125_3)
+ if s >= 0:
+ return s
+ elif s == 3:
+ LA125_4 = input.LA(1)
+
+
+ index125_4 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred146_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index125_4)
+ if s >= 0:
+ return s
+ elif s == 4:
+ LA125_5 = input.LA(1)
+
+
+ index125_5 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred146_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index125_5)
+ if s >= 0:
+ return s
+ elif s == 5:
+ LA125_6 = input.LA(1)
+
+
+ index125_6 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred146_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index125_6)
+ if s >= 0:
+ return s
+ elif s == 6:
+ LA125_7 = input.LA(1)
+
+
+ index125_7 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred146_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index125_7)
+ if s >= 0:
+ return s
+ elif s == 7:
+ LA125_8 = input.LA(1)
+
+
+ index125_8 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred146_JavaScript()):
+ s = 9
+
+ elif (True):
+ s = 10
+
+
+ input.seek(index125_8)
+ if s >= 0:
+ return s
+
+ if self._state.backtracking >0:
+ raise BacktrackingFailed
+ nvae = NoViableAltException(self_.getDescription(), 125, _s, input)
+ self_.error(nvae)
+ raise nvae
+ # lookup tables for DFA #127
+
+ DFA127_eot = DFA.unpack(
+ u"\12\uffff"
+ )
+
+ DFA127_eof = DFA.unpack(
+ u"\12\uffff"
+ )
+
+ DFA127_min = DFA.unpack(
+ u"\1\5\7\uffff\1\0\1\uffff"
+ )
+
+ DFA127_max = DFA.unpack(
+ u"\1\152\7\uffff\1\0\1\uffff"
+ )
+
+ DFA127_accept = DFA.unpack(
+ u"\1\uffff\1\1\7\uffff\1\2"
+ )
+
+ DFA127_special = DFA.unpack(
+ u"\10\uffff\1\0\1\uffff"
+ )
+
+
+ DFA127_transition = [
+ DFA.unpack(u"\3\1\27\uffff\2\1\2\uffff\1\1\26\uffff\1\10\1\1\53\uffff"
+ u"\4\1"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #127
+
+ class DFA127(DFA):
+ pass
+
+
+ def specialStateTransition(self_, s, input):
+ # convince pylint that my self_ magic is ok ;)
+ # pylint: disable-msg=E0213
+
+ # pretend we are a member of the recognizer
+ # thus semantic predicates can be evaluated
+ self = self_.recognizer
+
+ _s = s
+
+ if s == 0:
+ LA127_8 = input.LA(1)
+
+
+ index127_8 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred147_JavaScript()):
+ s = 1
+
+ elif (True):
+ s = 9
+
+
+ input.seek(index127_8)
+ if s >= 0:
+ return s
+
+ if self._state.backtracking >0:
+ raise BacktrackingFailed
+ nvae = NoViableAltException(self_.getDescription(), 127, _s, input)
+ self_.error(nvae)
+ raise nvae
+ # lookup tables for DFA #132
+
+ DFA132_eot = DFA.unpack(
+ u"\32\uffff"
+ )
+
+ DFA132_eof = DFA.unpack(
+ u"\1\2\31\uffff"
+ )
+
+ DFA132_min = DFA.unpack(
+ u"\1\4\1\0\30\uffff"
+ )
+
+ DFA132_max = DFA.unpack(
+ u"\1\144\1\0\30\uffff"
+ )
+
+ DFA132_accept = DFA.unpack(
+ u"\2\uffff\1\2\25\uffff\1\1\1\uffff"
+ )
+
+ DFA132_special = DFA.unpack(
+ u"\1\uffff\1\0\30\uffff"
+ )
+
+
+ DFA132_transition = [
+ DFA.unpack(u"\1\1\33\uffff\3\2\1\uffff\1\2\1\uffff\2\2\5\uffff\1"
+ u"\2\4\uffff\1\2\10\uffff\1\30\1\2\1\30\42\2\3\uffff\2\2"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #132
+
+ class DFA132(DFA):
+ pass
+
+
+ def specialStateTransition(self_, s, input):
+ # convince pylint that my self_ magic is ok ;)
+ # pylint: disable-msg=E0213
+
+ # pretend we are a member of the recognizer
+ # thus semantic predicates can be evaluated
+ self = self_.recognizer
+
+ _s = s
+
+ if s == 0:
+ LA132_1 = input.LA(1)
+
+
+ index132_1 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred154_JavaScript()):
+ s = 24
+
+ elif (True):
+ s = 2
+
+
+ input.seek(index132_1)
+ if s >= 0:
+ return s
+
+ if self._state.backtracking >0:
+ raise BacktrackingFailed
+ nvae = NoViableAltException(self_.getDescription(), 132, _s, input)
+ self_.error(nvae)
+ raise nvae
+ # lookup tables for DFA #136
+
+ DFA136_eot = DFA.unpack(
+ u"\32\uffff"
+ )
+
+ DFA136_eof = DFA.unpack(
+ u"\1\2\31\uffff"
+ )
+
+ DFA136_min = DFA.unpack(
+ u"\1\4\1\0\30\uffff"
+ )
+
+ DFA136_max = DFA.unpack(
+ u"\1\144\1\0\30\uffff"
+ )
+
+ DFA136_accept = DFA.unpack(
+ u"\2\uffff\1\2\24\uffff\1\1\2\uffff"
+ )
+
+ DFA136_special = DFA.unpack(
+ u"\1\uffff\1\0\30\uffff"
+ )
+
+
+ DFA136_transition = [
+ DFA.unpack(u"\1\1\33\uffff\1\27\2\2\1\uffff\1\2\1\uffff\2\2\5\uffff"
+ u"\1\2\4\uffff\1\2\10\uffff\1\27\1\2\1\27\42\2\3\uffff\2\2"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #136
+
+ class DFA136(DFA):
+ pass
+
+
+ def specialStateTransition(self_, s, input):
+ # convince pylint that my self_ magic is ok ;)
+ # pylint: disable-msg=E0213
+
+ # pretend we are a member of the recognizer
+ # thus semantic predicates can be evaluated
+ self = self_.recognizer
+
+ _s = s
+
+ if s == 0:
+ LA136_1 = input.LA(1)
+
+
+ index136_1 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred158_JavaScript()):
+ s = 23
+
+ elif (True):
+ s = 2
+
+
+ input.seek(index136_1)
+ if s >= 0:
+ return s
+
+ if self._state.backtracking >0:
+ raise BacktrackingFailed
+ nvae = NoViableAltException(self_.getDescription(), 136, _s, input)
+ self_.error(nvae)
+ raise nvae
+ # lookup tables for DFA #142
+
+ DFA142_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA142_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA142_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA142_max = DFA.unpack(
+ u"\2\152\2\uffff"
+ )
+
+ DFA142_accept = DFA.unpack(
+ u"\2\uffff\1\1\1\2"
+ )
+
+ DFA142_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA142_transition = [
+ DFA.unpack(u"\1\1\3\2\27\uffff\2\2\1\uffff\1\3\1\2\26\uffff\2\2\37"
+ u"\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u"\1\1\3\2\27\uffff\2\2\1\uffff\1\3\1\2\26\uffff\2\2"
+ u"\37\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #142
+
+ class DFA142(DFA):
+ pass
+
+
+ # lookup tables for DFA #141
+
+ DFA141_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA141_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA141_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA141_max = DFA.unpack(
+ u"\2\42\2\uffff"
+ )
+
+ DFA141_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA141_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA141_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\3\1\2"),
+ DFA.unpack(u"\1\1\34\uffff\1\3\1\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #141
+
+ class DFA141(DFA):
+ pass
+
+
+ # lookup tables for DFA #151
+
+ DFA151_eot = DFA.unpack(
+ u"\5\uffff"
+ )
+
+ DFA151_eof = DFA.unpack(
+ u"\2\3\2\uffff\1\3"
+ )
+
+ DFA151_min = DFA.unpack(
+ u"\2\4\2\uffff\1\4"
+ )
+
+ DFA151_max = DFA.unpack(
+ u"\1\111\1\152\2\uffff\1\152"
+ )
+
+ DFA151_accept = DFA.unpack(
+ u"\2\uffff\1\1\1\2\1\uffff"
+ )
+
+ DFA151_special = DFA.unpack(
+ u"\5\uffff"
+ )
+
+
+ DFA151_transition = [
+ DFA.unpack(u"\1\1\34\uffff\2\3\1\uffff\1\3\1\uffff\1\3\13\uffff\1"
+ u"\3\11\uffff\1\3\14\uffff\1\2"),
+ DFA.unpack(u"\1\4\3\3\27\uffff\10\3\1\uffff\5\3\1\uffff\12\3\2\uffff"
+ u"\3\3\14\uffff\1\2\21\uffff\2\3\3\uffff\13\3"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\4\3\3\27\uffff\10\3\1\uffff\5\3\1\uffff\12\3\2\uffff"
+ u"\3\3\14\uffff\1\2\21\uffff\2\3\3\uffff\13\3")
+ ]
+
+ # class definition for DFA #151
+
+ class DFA151(DFA):
+ pass
+
+
+ # lookup tables for DFA #156
+
+ DFA156_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA156_eof = DFA.unpack(
+ u"\1\3\3\uffff"
+ )
+
+ DFA156_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA156_max = DFA.unpack(
+ u"\2\111\2\uffff"
+ )
+
+ DFA156_accept = DFA.unpack(
+ u"\2\uffff\1\1\1\2"
+ )
+
+ DFA156_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA156_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\3\4\uffff\1\3\6\uffff\1\3\4\uffff\1"
+ u"\3\26\uffff\1\2"),
+ DFA.unpack(u"\1\1\34\uffff\1\3\4\uffff\1\3\6\uffff\1\3\4\uffff\1"
+ u"\3\26\uffff\1\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #156
+
+ class DFA156(DFA):
+ pass
+
+
+ # lookup tables for DFA #159
+
+ DFA159_eot = DFA.unpack(
+ u"\5\uffff"
+ )
+
+ DFA159_eof = DFA.unpack(
+ u"\2\2\2\uffff\1\2"
+ )
+
+ DFA159_min = DFA.unpack(
+ u"\2\4\2\uffff\1\4"
+ )
+
+ DFA159_max = DFA.unpack(
+ u"\1\112\1\152\2\uffff\1\152"
+ )
+
+ DFA159_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1\1\uffff"
+ )
+
+ DFA159_special = DFA.unpack(
+ u"\5\uffff"
+ )
+
+
+ DFA159_transition = [
+ DFA.unpack(u"\1\1\34\uffff\2\2\1\uffff\1\2\1\uffff\1\2\13\uffff\1"
+ u"\2\11\uffff\1\2\14\uffff\1\2\1\3"),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\uffff\12\2\2\uffff"
+ u"\3\2\14\uffff\1\2\1\3\20\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\uffff\12\2\2\uffff"
+ u"\3\2\14\uffff\1\2\1\3\20\uffff\2\2\3\uffff\13\2")
+ ]
+
+ # class definition for DFA #159
+
+ class DFA159(DFA):
+ pass
+
+
+ # lookup tables for DFA #162
+
+ DFA162_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA162_eof = DFA.unpack(
+ u"\1\2\3\uffff"
+ )
+
+ DFA162_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA162_max = DFA.unpack(
+ u"\2\112\2\uffff"
+ )
+
+ DFA162_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA162_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA162_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\1\2\1\3"),
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\1\2\1\3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #162
+
+ class DFA162(DFA):
+ pass
+
+
+ # lookup tables for DFA #165
+
+ DFA165_eot = DFA.unpack(
+ u"\5\uffff"
+ )
+
+ DFA165_eof = DFA.unpack(
+ u"\2\2\2\uffff\1\2"
+ )
+
+ DFA165_min = DFA.unpack(
+ u"\2\4\2\uffff\1\4"
+ )
+
+ DFA165_max = DFA.unpack(
+ u"\1\113\1\152\2\uffff\1\152"
+ )
+
+ DFA165_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1\1\uffff"
+ )
+
+ DFA165_special = DFA.unpack(
+ u"\5\uffff"
+ )
+
+
+ DFA165_transition = [
+ DFA.unpack(u"\1\1\34\uffff\2\2\1\uffff\1\2\1\uffff\1\2\13\uffff\1"
+ u"\2\11\uffff\1\2\14\uffff\2\2\1\3"),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\uffff\12\2\2\uffff"
+ u"\3\2\14\uffff\2\2\1\3\17\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\uffff\12\2\2\uffff"
+ u"\3\2\14\uffff\2\2\1\3\17\uffff\2\2\3\uffff\13\2")
+ ]
+
+ # class definition for DFA #165
+
+ class DFA165(DFA):
+ pass
+
+
+ # lookup tables for DFA #168
+
+ DFA168_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA168_eof = DFA.unpack(
+ u"\1\2\3\uffff"
+ )
+
+ DFA168_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA168_max = DFA.unpack(
+ u"\2\113\2\uffff"
+ )
+
+ DFA168_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA168_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA168_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\2\2\1\3"),
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\2\2\1\3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #168
+
+ class DFA168(DFA):
+ pass
+
+
+ # lookup tables for DFA #171
+
+ DFA171_eot = DFA.unpack(
+ u"\5\uffff"
+ )
+
+ DFA171_eof = DFA.unpack(
+ u"\2\2\2\uffff\1\2"
+ )
+
+ DFA171_min = DFA.unpack(
+ u"\2\4\2\uffff\1\4"
+ )
+
+ DFA171_max = DFA.unpack(
+ u"\1\114\1\152\2\uffff\1\152"
+ )
+
+ DFA171_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1\1\uffff"
+ )
+
+ DFA171_special = DFA.unpack(
+ u"\5\uffff"
+ )
+
+
+ DFA171_transition = [
+ DFA.unpack(u"\1\1\34\uffff\2\2\1\uffff\1\2\1\uffff\1\2\13\uffff\1"
+ u"\2\11\uffff\1\2\14\uffff\3\2\1\3"),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\uffff\12\2\2\uffff"
+ u"\3\2\14\uffff\3\2\1\3\16\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\uffff\12\2\2\uffff"
+ u"\3\2\14\uffff\3\2\1\3\16\uffff\2\2\3\uffff\13\2")
+ ]
+
+ # class definition for DFA #171
+
+ class DFA171(DFA):
+ pass
+
+
+ # lookup tables for DFA #174
+
+ DFA174_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA174_eof = DFA.unpack(
+ u"\1\2\3\uffff"
+ )
+
+ DFA174_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA174_max = DFA.unpack(
+ u"\2\114\2\uffff"
+ )
+
+ DFA174_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA174_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA174_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\3\2\1\3"),
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\3\2\1\3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #174
+
+ class DFA174(DFA):
+ pass
+
+
+ # lookup tables for DFA #177
+
+ DFA177_eot = DFA.unpack(
+ u"\5\uffff"
+ )
+
+ DFA177_eof = DFA.unpack(
+ u"\2\2\2\uffff\1\2"
+ )
+
+ DFA177_min = DFA.unpack(
+ u"\2\4\2\uffff\1\4"
+ )
+
+ DFA177_max = DFA.unpack(
+ u"\1\115\1\152\2\uffff\1\152"
+ )
+
+ DFA177_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1\1\uffff"
+ )
+
+ DFA177_special = DFA.unpack(
+ u"\5\uffff"
+ )
+
+
+ DFA177_transition = [
+ DFA.unpack(u"\1\1\34\uffff\2\2\1\uffff\1\2\1\uffff\1\2\13\uffff\1"
+ u"\2\11\uffff\1\2\14\uffff\4\2\1\3"),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\uffff\12\2\2\uffff"
+ u"\3\2\14\uffff\4\2\1\3\15\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\uffff\12\2\2\uffff"
+ u"\3\2\14\uffff\4\2\1\3\15\uffff\2\2\3\uffff\13\2")
+ ]
+
+ # class definition for DFA #177
+
+ class DFA177(DFA):
+ pass
+
+
+ # lookup tables for DFA #180
+
+ DFA180_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA180_eof = DFA.unpack(
+ u"\1\2\3\uffff"
+ )
+
+ DFA180_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA180_max = DFA.unpack(
+ u"\2\115\2\uffff"
+ )
+
+ DFA180_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA180_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA180_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\4\2\1\3"),
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\4\2\1\3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #180
+
+ class DFA180(DFA):
+ pass
+
+
+ # lookup tables for DFA #183
+
+ DFA183_eot = DFA.unpack(
+ u"\5\uffff"
+ )
+
+ DFA183_eof = DFA.unpack(
+ u"\2\2\2\uffff\1\2"
+ )
+
+ DFA183_min = DFA.unpack(
+ u"\2\4\2\uffff\1\4"
+ )
+
+ DFA183_max = DFA.unpack(
+ u"\1\116\1\152\2\uffff\1\152"
+ )
+
+ DFA183_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1\1\uffff"
+ )
+
+ DFA183_special = DFA.unpack(
+ u"\5\uffff"
+ )
+
+
+ DFA183_transition = [
+ DFA.unpack(u"\1\1\34\uffff\2\2\1\uffff\1\2\1\uffff\1\2\13\uffff\1"
+ u"\2\11\uffff\1\2\14\uffff\5\2\1\3"),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\uffff\12\2\2\uffff"
+ u"\3\2\14\uffff\5\2\1\3\14\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\uffff\12\2\2\uffff"
+ u"\3\2\14\uffff\5\2\1\3\14\uffff\2\2\3\uffff\13\2")
+ ]
+
+ # class definition for DFA #183
+
+ class DFA183(DFA):
+ pass
+
+
+ # lookup tables for DFA #186
+
+ DFA186_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA186_eof = DFA.unpack(
+ u"\1\2\3\uffff"
+ )
+
+ DFA186_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA186_max = DFA.unpack(
+ u"\2\116\2\uffff"
+ )
+
+ DFA186_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA186_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA186_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\5\2\1\3"),
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\5\2\1\3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #186
+
+ class DFA186(DFA):
+ pass
+
+
+ # lookup tables for DFA #189
+
+ DFA189_eot = DFA.unpack(
+ u"\5\uffff"
+ )
+
+ DFA189_eof = DFA.unpack(
+ u"\2\2\2\uffff\1\2"
+ )
+
+ DFA189_min = DFA.unpack(
+ u"\2\4\2\uffff\1\4"
+ )
+
+ DFA189_max = DFA.unpack(
+ u"\1\122\1\152\2\uffff\1\152"
+ )
+
+ DFA189_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1\1\uffff"
+ )
+
+ DFA189_special = DFA.unpack(
+ u"\5\uffff"
+ )
+
+
+ DFA189_transition = [
+ DFA.unpack(u"\1\1\34\uffff\2\2\1\uffff\1\2\1\uffff\1\2\13\uffff\1"
+ u"\2\11\uffff\1\2\14\uffff\6\2\4\3"),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\uffff\12\2\2\uffff"
+ u"\3\2\14\uffff\6\2\4\3\10\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\uffff\12\2\2\uffff"
+ u"\3\2\14\uffff\6\2\4\3\10\uffff\2\2\3\uffff\13\2")
+ ]
+
+ # class definition for DFA #189
+
+ class DFA189(DFA):
+ pass
+
+
+ # lookup tables for DFA #192
+
+ DFA192_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA192_eof = DFA.unpack(
+ u"\1\2\3\uffff"
+ )
+
+ DFA192_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA192_max = DFA.unpack(
+ u"\2\122\2\uffff"
+ )
+
+ DFA192_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA192_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA192_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\6\2\4\3"),
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\6\2\4\3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #192
+
+ class DFA192(DFA):
+ pass
+
+
+ # lookup tables for DFA #195
+
+ DFA195_eot = DFA.unpack(
+ u"\5\uffff"
+ )
+
+ DFA195_eof = DFA.unpack(
+ u"\2\2\2\uffff\1\2"
+ )
+
+ DFA195_min = DFA.unpack(
+ u"\2\4\2\uffff\1\4"
+ )
+
+ DFA195_max = DFA.unpack(
+ u"\1\127\1\152\2\uffff\1\152"
+ )
+
+ DFA195_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1\1\uffff"
+ )
+
+ DFA195_special = DFA.unpack(
+ u"\5\uffff"
+ )
+
+
+ DFA195_transition = [
+ DFA.unpack(u"\1\1\34\uffff\2\2\1\uffff\1\2\1\uffff\1\2\6\uffff\1"
+ u"\3\4\uffff\1\2\11\uffff\1\2\14\uffff\12\2\5\3"),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\3\12\2\2\uffff"
+ u"\3\2\14\uffff\12\2\5\3\3\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\5\2\1\3\12\2\2\uffff"
+ u"\3\2\14\uffff\12\2\5\3\3\uffff\2\2\3\uffff\13\2")
+ ]
+
+ # class definition for DFA #195
+
+ class DFA195(DFA):
+ pass
+
+
+ # lookup tables for DFA #198
+
+ DFA198_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA198_eof = DFA.unpack(
+ u"\1\2\3\uffff"
+ )
+
+ DFA198_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA198_max = DFA.unpack(
+ u"\2\127\2\uffff"
+ )
+
+ DFA198_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA198_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA198_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\12\2\5\3"),
+ DFA.unpack(u"\1\1\34\uffff\1\2\4\uffff\1\2\6\uffff\1\2\4\uffff\1"
+ u"\2\26\uffff\12\2\5\3"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #198
+
+ class DFA198(DFA):
+ pass
+
+
+ # lookup tables for DFA #201
+
+ DFA201_eot = DFA.unpack(
+ u"\5\uffff"
+ )
+
+ DFA201_eof = DFA.unpack(
+ u"\2\2\2\uffff\1\2"
+ )
+
+ DFA201_min = DFA.unpack(
+ u"\2\4\2\uffff\1\4"
+ )
+
+ DFA201_max = DFA.unpack(
+ u"\1\132\1\152\2\uffff\1\152"
+ )
+
+ DFA201_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1\1\uffff"
+ )
+
+ DFA201_special = DFA.unpack(
+ u"\5\uffff"
+ )
+
+
+ DFA201_transition = [
+ DFA.unpack(u"\1\1\34\uffff\2\2\1\uffff\1\2\1\uffff\1\2\6\uffff\1"
+ u"\2\4\uffff\1\2\11\uffff\1\2\14\uffff\17\2\3\3"),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\20\2\2\uffff\3\2\14"
+ u"\uffff\17\2\3\3\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\20\2\2\uffff\3\2\14"
+ u"\uffff\17\2\3\3\2\2\3\uffff\13\2")
+ ]
+
+ # class definition for DFA #201
+
+ class DFA201(DFA):
+ pass
+
+
+ # lookup tables for DFA #204
+
+ DFA204_eot = DFA.unpack(
+ u"\24\uffff"
+ )
+
+ DFA204_eof = DFA.unpack(
+ u"\1\2\23\uffff"
+ )
+
+ DFA204_min = DFA.unpack(
+ u"\1\4\1\0\22\uffff"
+ )
+
+ DFA204_max = DFA.unpack(
+ u"\1\134\1\0\22\uffff"
+ )
+
+ DFA204_accept = DFA.unpack(
+ u"\2\uffff\1\2\20\uffff\1\1"
+ )
+
+ DFA204_special = DFA.unpack(
+ u"\1\uffff\1\0\22\uffff"
+ )
+
+
+ DFA204_transition = [
+ DFA.unpack(u"\1\1\34\uffff\2\2\1\uffff\1\2\1\uffff\1\2\6\uffff\1"
+ u"\2\4\uffff\1\2\11\uffff\1\2\14\uffff\22\2\2\23"),
+ DFA.unpack(u"\1\uffff"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #204
+
+ class DFA204(DFA):
+ pass
+
+
+ def specialStateTransition(self_, s, input):
+ # convince pylint that my self_ magic is ok ;)
+ # pylint: disable-msg=E0213
+
+ # pretend we are a member of the recognizer
+ # thus semantic predicates can be evaluated
+ self = self_.recognizer
+
+ _s = s
+
+ if s == 0:
+ LA204_1 = input.LA(1)
+
+
+ index204_1 = input.index()
+ input.rewind()
+ s = -1
+ if (self.synpred256_JavaScript()):
+ s = 19
+
+ elif (True):
+ s = 2
+
+
+ input.seek(index204_1)
+ if s >= 0:
+ return s
+
+ if self._state.backtracking >0:
+ raise BacktrackingFailed
+ nvae = NoViableAltException(self_.getDescription(), 204, _s, input)
+ self_.error(nvae)
+ raise nvae
+ # lookup tables for DFA #207
+
+ DFA207_eot = DFA.unpack(
+ u"\5\uffff"
+ )
+
+ DFA207_eof = DFA.unpack(
+ u"\2\2\2\uffff\1\2"
+ )
+
+ DFA207_min = DFA.unpack(
+ u"\2\4\2\uffff\1\4"
+ )
+
+ DFA207_max = DFA.unpack(
+ u"\1\137\1\152\2\uffff\1\152"
+ )
+
+ DFA207_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1\1\uffff"
+ )
+
+ DFA207_special = DFA.unpack(
+ u"\5\uffff"
+ )
+
+
+ DFA207_transition = [
+ DFA.unpack(u"\1\1\34\uffff\2\2\1\uffff\1\2\1\uffff\1\2\6\uffff\1"
+ u"\2\4\uffff\1\2\11\uffff\1\2\14\uffff\24\2\3\3"),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\20\2\2\uffff\3\2\14"
+ u"\uffff\24\2\3\3\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u""),
+ DFA.unpack(u"\1\4\3\2\27\uffff\10\2\1\uffff\20\2\2\uffff\3\2\14"
+ u"\uffff\24\2\3\3\13\2")
+ ]
+
+ # class definition for DFA #207
+
+ class DFA207(DFA):
+ pass
+
+
+ # lookup tables for DFA #218
+
+ DFA218_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA218_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA218_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA218_max = DFA.unpack(
+ u"\2\74\2\uffff"
+ )
+
+ DFA218_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA218_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA218_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\3\32\uffff\1\2"),
+ DFA.unpack(u"\1\1\34\uffff\1\3\32\uffff\1\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #218
+
+ class DFA218(DFA):
+ pass
+
+
+ # lookup tables for DFA #217
+
+ DFA217_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA217_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA217_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA217_max = DFA.unpack(
+ u"\2\152\2\uffff"
+ )
+
+ DFA217_accept = DFA.unpack(
+ u"\2\uffff\1\1\1\2"
+ )
+
+ DFA217_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA217_transition = [
+ DFA.unpack(u"\1\1\3\2\27\uffff\2\2\1\3\1\uffff\1\2\26\uffff\2\2\1"
+ u"\3\36\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u"\1\1\3\2\27\uffff\2\2\1\3\1\uffff\1\2\26\uffff\2\2"
+ u"\1\3\36\uffff\2\2\3\uffff\13\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #217
+
+ class DFA217(DFA):
+ pass
+
+
+ # lookup tables for DFA #223
+
+ DFA223_eot = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA223_eof = DFA.unpack(
+ u"\4\uffff"
+ )
+
+ DFA223_min = DFA.unpack(
+ u"\2\4\2\uffff"
+ )
+
+ DFA223_max = DFA.unpack(
+ u"\2\44\2\uffff"
+ )
+
+ DFA223_accept = DFA.unpack(
+ u"\2\uffff\1\2\1\1"
+ )
+
+ DFA223_special = DFA.unpack(
+ u"\4\uffff"
+ )
+
+
+ DFA223_transition = [
+ DFA.unpack(u"\1\1\34\uffff\1\3\2\uffff\1\2"),
+ DFA.unpack(u"\1\1\34\uffff\1\3\2\uffff\1\2"),
+ DFA.unpack(u""),
+ DFA.unpack(u"")
+ ]
+
+ # class definition for DFA #223
+
+ class DFA223(DFA):
+ pass
+
+
+
+
+ FOLLOW_LT_in_program46 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_sourceElements_in_program50 = frozenset([4])
+ FOLLOW_LT_in_program52 = frozenset([4])
+ FOLLOW_EOF_in_program56 = frozenset([1])
+ FOLLOW_sourceElement_in_sourceElements69 = frozenset([1, 4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_sourceElements72 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_sourceElement_in_sourceElements76 = frozenset([1, 4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_functionDeclaration_in_sourceElement90 = frozenset([1])
+ FOLLOW_statement_in_sourceElement95 = frozenset([1])
+ FOLLOW_31_in_functionDeclaration108 = frozenset([4, 5])
+ FOLLOW_LT_in_functionDeclaration110 = frozenset([4, 5])
+ FOLLOW_Identifier_in_functionDeclaration114 = frozenset([4, 32])
+ FOLLOW_LT_in_functionDeclaration116 = frozenset([4, 32])
+ FOLLOW_formalParameterList_in_functionDeclaration120 = frozenset([4, 35])
+ FOLLOW_LT_in_functionDeclaration122 = frozenset([4, 35])
+ FOLLOW_functionBody_in_functionDeclaration126 = frozenset([1])
+ FOLLOW_31_in_functionExpression138 = frozenset([4, 5, 32])
+ FOLLOW_LT_in_functionExpression140 = frozenset([4, 5, 32])
+ FOLLOW_Identifier_in_functionExpression144 = frozenset([4, 32])
+ FOLLOW_LT_in_functionExpression147 = frozenset([4, 32])
+ FOLLOW_formalParameterList_in_functionExpression151 = frozenset([4, 35])
+ FOLLOW_LT_in_functionExpression153 = frozenset([4, 35])
+ FOLLOW_functionBody_in_functionExpression157 = frozenset([1])
+ FOLLOW_32_in_formalParameterList169 = frozenset([4, 5, 34])
+ FOLLOW_LT_in_formalParameterList172 = frozenset([4, 5])
+ FOLLOW_Identifier_in_formalParameterList176 = frozenset([4, 33, 34])
+ FOLLOW_LT_in_formalParameterList179 = frozenset([4, 33])
+ FOLLOW_33_in_formalParameterList183 = frozenset([4, 5])
+ FOLLOW_LT_in_formalParameterList185 = frozenset([4, 5])
+ FOLLOW_Identifier_in_formalParameterList189 = frozenset([4, 33, 34])
+ FOLLOW_LT_in_formalParameterList195 = frozenset([4, 34])
+ FOLLOW_34_in_formalParameterList199 = frozenset([1])
+ FOLLOW_35_in_functionBody210 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_functionBody212 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_sourceElements_in_functionBody216 = frozenset([4, 36])
+ FOLLOW_LT_in_functionBody218 = frozenset([4, 36])
+ FOLLOW_36_in_functionBody222 = frozenset([1])
+ FOLLOW_statementBlock_in_statement234 = frozenset([1])
+ FOLLOW_variableStatement_in_statement239 = frozenset([1])
+ FOLLOW_emptyStatement_in_statement244 = frozenset([1])
+ FOLLOW_expressionStatement_in_statement249 = frozenset([1])
+ FOLLOW_ifStatement_in_statement254 = frozenset([1])
+ FOLLOW_iterationStatement_in_statement259 = frozenset([1])
+ FOLLOW_continueStatement_in_statement264 = frozenset([1])
+ FOLLOW_breakStatement_in_statement269 = frozenset([1])
+ FOLLOW_returnStatement_in_statement274 = frozenset([1])
+ FOLLOW_withStatement_in_statement279 = frozenset([1])
+ FOLLOW_labelledStatement_in_statement284 = frozenset([1])
+ FOLLOW_switchStatement_in_statement289 = frozenset([1])
+ FOLLOW_throwStatement_in_statement294 = frozenset([1])
+ FOLLOW_tryStatement_in_statement299 = frozenset([1])
+ FOLLOW_35_in_statementBlock311 = frozenset([4, 5, 6, 7, 31, 32, 35, 36, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_statementBlock313 = frozenset([4, 5, 6, 7, 31, 32, 35, 36, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_statementList_in_statementBlock317 = frozenset([4, 36])
+ FOLLOW_LT_in_statementBlock320 = frozenset([4, 36])
+ FOLLOW_36_in_statementBlock324 = frozenset([1])
+ FOLLOW_statement_in_statementList336 = frozenset([1, 4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_statementList339 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_statement_in_statementList343 = frozenset([1, 4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_37_in_variableStatement357 = frozenset([4, 5])
+ FOLLOW_LT_in_variableStatement359 = frozenset([4, 5])
+ FOLLOW_variableDeclarationList_in_variableStatement363 = frozenset([4, 38])
+ FOLLOW_set_in_variableStatement365 = frozenset([1])
+ FOLLOW_variableDeclaration_in_variableDeclarationList384 = frozenset([1, 4, 33])
+ FOLLOW_LT_in_variableDeclarationList387 = frozenset([4, 33])
+ FOLLOW_33_in_variableDeclarationList391 = frozenset([4, 5])
+ FOLLOW_LT_in_variableDeclarationList393 = frozenset([4, 5])
+ FOLLOW_variableDeclaration_in_variableDeclarationList397 = frozenset([1, 4, 33])
+ FOLLOW_variableDeclarationNoIn_in_variableDeclarationListNoIn411 = frozenset([1, 4, 33])
+ FOLLOW_LT_in_variableDeclarationListNoIn414 = frozenset([4, 33])
+ FOLLOW_33_in_variableDeclarationListNoIn418 = frozenset([4, 5])
+ FOLLOW_LT_in_variableDeclarationListNoIn420 = frozenset([4, 5])
+ FOLLOW_variableDeclarationNoIn_in_variableDeclarationListNoIn424 = frozenset([1, 4, 33])
+ FOLLOW_Identifier_in_variableDeclaration438 = frozenset([1, 4, 39])
+ FOLLOW_LT_in_variableDeclaration440 = frozenset([1, 4, 39])
+ FOLLOW_initialiser_in_variableDeclaration444 = frozenset([1])
+ FOLLOW_Identifier_in_variableDeclarationNoIn457 = frozenset([1, 4, 39])
+ FOLLOW_LT_in_variableDeclarationNoIn459 = frozenset([1, 4, 39])
+ FOLLOW_initialiserNoIn_in_variableDeclarationNoIn463 = frozenset([1])
+ FOLLOW_39_in_initialiser476 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_initialiser478 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpression_in_initialiser482 = frozenset([1])
+ FOLLOW_39_in_initialiserNoIn494 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_initialiserNoIn496 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpressionNoIn_in_initialiserNoIn500 = frozenset([1])
+ FOLLOW_38_in_emptyStatement512 = frozenset([1])
+ FOLLOW_expression_in_expressionStatement524 = frozenset([4, 38])
+ FOLLOW_set_in_expressionStatement526 = frozenset([1])
+ FOLLOW_40_in_ifStatement545 = frozenset([4, 32])
+ FOLLOW_LT_in_ifStatement547 = frozenset([4, 32])
+ FOLLOW_32_in_ifStatement551 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_ifStatement553 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_expression_in_ifStatement557 = frozenset([4, 34])
+ FOLLOW_LT_in_ifStatement559 = frozenset([4, 34])
+ FOLLOW_34_in_ifStatement563 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_ifStatement565 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_statement_in_ifStatement569 = frozenset([1, 4, 41])
+ FOLLOW_LT_in_ifStatement572 = frozenset([4, 41])
+ FOLLOW_41_in_ifStatement576 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_ifStatement578 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_statement_in_ifStatement582 = frozenset([1])
+ FOLLOW_doWhileStatement_in_iterationStatement596 = frozenset([1])
+ FOLLOW_whileStatement_in_iterationStatement601 = frozenset([1])
+ FOLLOW_forStatement_in_iterationStatement606 = frozenset([1])
+ FOLLOW_forInStatement_in_iterationStatement611 = frozenset([1])
+ FOLLOW_42_in_doWhileStatement623 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_doWhileStatement625 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_statement_in_doWhileStatement629 = frozenset([4, 43])
+ FOLLOW_LT_in_doWhileStatement631 = frozenset([4, 43])
+ FOLLOW_43_in_doWhileStatement635 = frozenset([4, 32])
+ FOLLOW_LT_in_doWhileStatement637 = frozenset([4, 32])
+ FOLLOW_32_in_doWhileStatement641 = frozenset([5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_expression_in_doWhileStatement643 = frozenset([34])
+ FOLLOW_34_in_doWhileStatement645 = frozenset([4, 38])
+ FOLLOW_set_in_doWhileStatement647 = frozenset([1])
+ FOLLOW_43_in_whileStatement666 = frozenset([4, 32])
+ FOLLOW_LT_in_whileStatement668 = frozenset([4, 32])
+ FOLLOW_32_in_whileStatement672 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_whileStatement674 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_expression_in_whileStatement678 = frozenset([4, 34])
+ FOLLOW_LT_in_whileStatement680 = frozenset([4, 34])
+ FOLLOW_34_in_whileStatement684 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_whileStatement686 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_statement_in_whileStatement690 = frozenset([1])
+ FOLLOW_44_in_forStatement702 = frozenset([4, 32])
+ FOLLOW_LT_in_forStatement704 = frozenset([4, 32])
+ FOLLOW_32_in_forStatement708 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_forStatement711 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_forStatementInitialiserPart_in_forStatement715 = frozenset([4, 38])
+ FOLLOW_LT_in_forStatement719 = frozenset([4, 38])
+ FOLLOW_38_in_forStatement723 = frozenset([4, 5, 6, 7, 31, 32, 35, 38, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_forStatement726 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_expression_in_forStatement730 = frozenset([4, 38])
+ FOLLOW_LT_in_forStatement734 = frozenset([4, 38])
+ FOLLOW_38_in_forStatement738 = frozenset([4, 5, 6, 7, 31, 32, 34, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_forStatement741 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_expression_in_forStatement745 = frozenset([4, 34])
+ FOLLOW_LT_in_forStatement749 = frozenset([4, 34])
+ FOLLOW_34_in_forStatement753 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_forStatement755 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_statement_in_forStatement759 = frozenset([1])
+ FOLLOW_expressionNoIn_in_forStatementInitialiserPart771 = frozenset([1])
+ FOLLOW_37_in_forStatementInitialiserPart776 = frozenset([4, 5])
+ FOLLOW_LT_in_forStatementInitialiserPart778 = frozenset([4, 5])
+ FOLLOW_variableDeclarationListNoIn_in_forStatementInitialiserPart782 = frozenset([1])
+ FOLLOW_44_in_forInStatement794 = frozenset([4, 32])
+ FOLLOW_LT_in_forInStatement796 = frozenset([4, 32])
+ FOLLOW_32_in_forInStatement800 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 58, 59, 103, 104, 105, 106])
+ FOLLOW_LT_in_forInStatement802 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 58, 59, 103, 104, 105, 106])
+ FOLLOW_forInStatementInitialiserPart_in_forInStatement806 = frozenset([4, 45])
+ FOLLOW_LT_in_forInStatement808 = frozenset([4, 45])
+ FOLLOW_45_in_forInStatement812 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_forInStatement814 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_expression_in_forInStatement818 = frozenset([4, 34])
+ FOLLOW_LT_in_forInStatement820 = frozenset([4, 34])
+ FOLLOW_34_in_forInStatement824 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_forInStatement826 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_statement_in_forInStatement830 = frozenset([1])
+ FOLLOW_leftHandSideExpression_in_forInStatementInitialiserPart842 = frozenset([1])
+ FOLLOW_37_in_forInStatementInitialiserPart847 = frozenset([4, 5])
+ FOLLOW_LT_in_forInStatementInitialiserPart849 = frozenset([4, 5])
+ FOLLOW_variableDeclarationNoIn_in_forInStatementInitialiserPart853 = frozenset([1])
+ FOLLOW_46_in_continueStatement864 = frozenset([4, 5, 38])
+ FOLLOW_Identifier_in_continueStatement866 = frozenset([4, 38])
+ FOLLOW_set_in_continueStatement869 = frozenset([1])
+ FOLLOW_47_in_breakStatement887 = frozenset([4, 5, 38])
+ FOLLOW_Identifier_in_breakStatement889 = frozenset([4, 38])
+ FOLLOW_set_in_breakStatement892 = frozenset([1])
+ FOLLOW_48_in_returnStatement910 = frozenset([4, 5, 6, 7, 31, 32, 35, 38, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_expression_in_returnStatement912 = frozenset([4, 38])
+ FOLLOW_set_in_returnStatement915 = frozenset([1])
+ FOLLOW_49_in_withStatement934 = frozenset([4, 32])
+ FOLLOW_LT_in_withStatement936 = frozenset([4, 32])
+ FOLLOW_32_in_withStatement940 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_withStatement942 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_expression_in_withStatement946 = frozenset([4, 34])
+ FOLLOW_LT_in_withStatement948 = frozenset([4, 34])
+ FOLLOW_34_in_withStatement952 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_withStatement954 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_statement_in_withStatement958 = frozenset([1])
+ FOLLOW_Identifier_in_labelledStatement969 = frozenset([4, 50])
+ FOLLOW_LT_in_labelledStatement971 = frozenset([4, 50])
+ FOLLOW_50_in_labelledStatement975 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_labelledStatement977 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_statement_in_labelledStatement981 = frozenset([1])
+ FOLLOW_51_in_switchStatement993 = frozenset([4, 32])
+ FOLLOW_LT_in_switchStatement995 = frozenset([4, 32])
+ FOLLOW_32_in_switchStatement999 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_switchStatement1001 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_expression_in_switchStatement1005 = frozenset([4, 34])
+ FOLLOW_LT_in_switchStatement1007 = frozenset([4, 34])
+ FOLLOW_34_in_switchStatement1011 = frozenset([4, 35])
+ FOLLOW_LT_in_switchStatement1013 = frozenset([4, 35])
+ FOLLOW_caseBlock_in_switchStatement1017 = frozenset([1])
+ FOLLOW_35_in_caseBlock1029 = frozenset([4, 36, 52, 53])
+ FOLLOW_LT_in_caseBlock1032 = frozenset([4, 52])
+ FOLLOW_caseClause_in_caseBlock1036 = frozenset([4, 36, 52, 53])
+ FOLLOW_LT_in_caseBlock1041 = frozenset([4, 53])
+ FOLLOW_defaultClause_in_caseBlock1045 = frozenset([4, 36, 52])
+ FOLLOW_LT_in_caseBlock1048 = frozenset([4, 52])
+ FOLLOW_caseClause_in_caseBlock1052 = frozenset([4, 36, 52])
+ FOLLOW_LT_in_caseBlock1058 = frozenset([4, 36])
+ FOLLOW_36_in_caseBlock1062 = frozenset([1])
+ FOLLOW_52_in_caseClause1073 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_caseClause1075 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_expression_in_caseClause1079 = frozenset([4, 50])
+ FOLLOW_LT_in_caseClause1081 = frozenset([4, 50])
+ FOLLOW_50_in_caseClause1085 = frozenset([1, 4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_caseClause1087 = frozenset([1, 4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_statementList_in_caseClause1091 = frozenset([1])
+ FOLLOW_53_in_defaultClause1104 = frozenset([4, 50])
+ FOLLOW_LT_in_defaultClause1106 = frozenset([4, 50])
+ FOLLOW_50_in_defaultClause1110 = frozenset([1, 4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_defaultClause1112 = frozenset([1, 4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_statementList_in_defaultClause1116 = frozenset([1])
+ FOLLOW_54_in_throwStatement1129 = frozenset([5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_expression_in_throwStatement1131 = frozenset([4, 38])
+ FOLLOW_set_in_throwStatement1133 = frozenset([1])
+ FOLLOW_55_in_tryStatement1151 = frozenset([4, 35])
+ FOLLOW_LT_in_tryStatement1153 = frozenset([4, 35])
+ FOLLOW_statementBlock_in_tryStatement1157 = frozenset([4, 56, 57])
+ FOLLOW_LT_in_tryStatement1159 = frozenset([4, 56, 57])
+ FOLLOW_finallyClause_in_tryStatement1164 = frozenset([1])
+ FOLLOW_catchClause_in_tryStatement1168 = frozenset([1, 4, 57])
+ FOLLOW_LT_in_tryStatement1171 = frozenset([4, 57])
+ FOLLOW_finallyClause_in_tryStatement1175 = frozenset([1])
+ FOLLOW_56_in_catchClause1196 = frozenset([4, 32])
+ FOLLOW_LT_in_catchClause1198 = frozenset([4, 32])
+ FOLLOW_32_in_catchClause1202 = frozenset([4, 5])
+ FOLLOW_LT_in_catchClause1204 = frozenset([4, 5])
+ FOLLOW_Identifier_in_catchClause1208 = frozenset([4, 34])
+ FOLLOW_LT_in_catchClause1210 = frozenset([4, 34])
+ FOLLOW_34_in_catchClause1214 = frozenset([4, 35])
+ FOLLOW_LT_in_catchClause1216 = frozenset([4, 35])
+ FOLLOW_statementBlock_in_catchClause1220 = frozenset([1])
+ FOLLOW_57_in_finallyClause1232 = frozenset([4, 35])
+ FOLLOW_LT_in_finallyClause1234 = frozenset([4, 35])
+ FOLLOW_statementBlock_in_finallyClause1238 = frozenset([1])
+ FOLLOW_assignmentExpression_in_expression1250 = frozenset([1, 4, 33])
+ FOLLOW_LT_in_expression1253 = frozenset([4, 33])
+ FOLLOW_33_in_expression1257 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_expression1259 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpression_in_expression1263 = frozenset([1, 4, 33])
+ FOLLOW_assignmentExpressionNoIn_in_expressionNoIn1277 = frozenset([1, 4, 33])
+ FOLLOW_LT_in_expressionNoIn1280 = frozenset([4, 33])
+ FOLLOW_33_in_expressionNoIn1284 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_expressionNoIn1286 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpressionNoIn_in_expressionNoIn1290 = frozenset([1, 4, 33])
+ FOLLOW_conditionalExpression_in_assignmentExpression1304 = frozenset([1])
+ FOLLOW_leftHandSideExpression_in_assignmentExpression1309 = frozenset([4, 39, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72])
+ FOLLOW_LT_in_assignmentExpression1311 = frozenset([4, 39, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72])
+ FOLLOW_assignmentOperator_in_assignmentExpression1315 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_assignmentExpression1317 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpression_in_assignmentExpression1321 = frozenset([1])
+ FOLLOW_conditionalExpressionNoIn_in_assignmentExpressionNoIn1333 = frozenset([1])
+ FOLLOW_leftHandSideExpression_in_assignmentExpressionNoIn1338 = frozenset([4, 39, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72])
+ FOLLOW_LT_in_assignmentExpressionNoIn1340 = frozenset([4, 39, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72])
+ FOLLOW_assignmentOperator_in_assignmentExpressionNoIn1344 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_assignmentExpressionNoIn1346 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpressionNoIn_in_assignmentExpressionNoIn1350 = frozenset([1])
+ FOLLOW_callExpression_in_leftHandSideExpression1362 = frozenset([1])
+ FOLLOW_newExpression_in_leftHandSideExpression1367 = frozenset([1])
+ FOLLOW_memberExpression_in_newExpression1379 = frozenset([1])
+ FOLLOW_58_in_newExpression1384 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 103, 104, 105, 106])
+ FOLLOW_LT_in_newExpression1386 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 103, 104, 105, 106])
+ FOLLOW_newExpression_in_newExpression1390 = frozenset([1])
+ FOLLOW_primaryExpression_in_memberExpression1403 = frozenset([1, 4, 59, 61])
+ FOLLOW_functionExpression_in_memberExpression1407 = frozenset([1, 4, 59, 61])
+ FOLLOW_58_in_memberExpression1411 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 103, 104, 105, 106])
+ FOLLOW_LT_in_memberExpression1413 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 103, 104, 105, 106])
+ FOLLOW_memberExpression_in_memberExpression1417 = frozenset([4, 32])
+ FOLLOW_LT_in_memberExpression1419 = frozenset([4, 32])
+ FOLLOW_arguments_in_memberExpression1423 = frozenset([1, 4, 59, 61])
+ FOLLOW_LT_in_memberExpression1427 = frozenset([4, 59, 61])
+ FOLLOW_memberExpressionSuffix_in_memberExpression1431 = frozenset([1, 4, 59, 61])
+ FOLLOW_indexSuffix_in_memberExpressionSuffix1445 = frozenset([1])
+ FOLLOW_propertyReferenceSuffix_in_memberExpressionSuffix1450 = frozenset([1])
+ FOLLOW_memberExpression_in_callExpression1461 = frozenset([4, 32])
+ FOLLOW_LT_in_callExpression1463 = frozenset([4, 32])
+ FOLLOW_arguments_in_callExpression1467 = frozenset([1, 4, 32, 59, 61])
+ FOLLOW_LT_in_callExpression1470 = frozenset([4, 32, 59, 61])
+ FOLLOW_callExpressionSuffix_in_callExpression1474 = frozenset([1, 4, 32, 59, 61])
+ FOLLOW_arguments_in_callExpressionSuffix1488 = frozenset([1])
+ FOLLOW_indexSuffix_in_callExpressionSuffix1493 = frozenset([1])
+ FOLLOW_propertyReferenceSuffix_in_callExpressionSuffix1498 = frozenset([1])
+ FOLLOW_32_in_arguments1509 = frozenset([4, 5, 6, 7, 31, 32, 34, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_arguments1512 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpression_in_arguments1516 = frozenset([4, 33, 34])
+ FOLLOW_LT_in_arguments1519 = frozenset([4, 33])
+ FOLLOW_33_in_arguments1523 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_arguments1525 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpression_in_arguments1529 = frozenset([4, 33, 34])
+ FOLLOW_LT_in_arguments1535 = frozenset([4, 34])
+ FOLLOW_34_in_arguments1539 = frozenset([1])
+ FOLLOW_59_in_indexSuffix1551 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_indexSuffix1553 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_expression_in_indexSuffix1557 = frozenset([4, 60])
+ FOLLOW_LT_in_indexSuffix1559 = frozenset([4, 60])
+ FOLLOW_60_in_indexSuffix1563 = frozenset([1])
+ FOLLOW_61_in_propertyReferenceSuffix1576 = frozenset([4, 5])
+ FOLLOW_LT_in_propertyReferenceSuffix1578 = frozenset([4, 5])
+ FOLLOW_Identifier_in_propertyReferenceSuffix1582 = frozenset([1])
+ FOLLOW_set_in_assignmentOperator0 = frozenset([1])
+ FOLLOW_logicalORExpression_in_conditionalExpression1649 = frozenset([1, 4, 73])
+ FOLLOW_LT_in_conditionalExpression1652 = frozenset([4, 73])
+ FOLLOW_73_in_conditionalExpression1656 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_conditionalExpression1658 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpression_in_conditionalExpression1662 = frozenset([4, 50])
+ FOLLOW_LT_in_conditionalExpression1664 = frozenset([4, 50])
+ FOLLOW_50_in_conditionalExpression1668 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_conditionalExpression1670 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpression_in_conditionalExpression1674 = frozenset([1])
+ FOLLOW_logicalORExpressionNoIn_in_conditionalExpressionNoIn1687 = frozenset([1, 4, 73])
+ FOLLOW_LT_in_conditionalExpressionNoIn1690 = frozenset([4, 73])
+ FOLLOW_73_in_conditionalExpressionNoIn1694 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_conditionalExpressionNoIn1696 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpressionNoIn_in_conditionalExpressionNoIn1700 = frozenset([4, 50])
+ FOLLOW_LT_in_conditionalExpressionNoIn1702 = frozenset([4, 50])
+ FOLLOW_50_in_conditionalExpressionNoIn1706 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_conditionalExpressionNoIn1708 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpressionNoIn_in_conditionalExpressionNoIn1712 = frozenset([1])
+ FOLLOW_logicalANDExpression_in_logicalORExpression1725 = frozenset([1, 4, 74])
+ FOLLOW_LT_in_logicalORExpression1728 = frozenset([4, 74])
+ FOLLOW_74_in_logicalORExpression1732 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_logicalORExpression1734 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_logicalANDExpression_in_logicalORExpression1738 = frozenset([1, 4, 74])
+ FOLLOW_logicalANDExpressionNoIn_in_logicalORExpressionNoIn1752 = frozenset([1, 4, 74])
+ FOLLOW_LT_in_logicalORExpressionNoIn1755 = frozenset([4, 74])
+ FOLLOW_74_in_logicalORExpressionNoIn1759 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_logicalORExpressionNoIn1761 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_logicalANDExpressionNoIn_in_logicalORExpressionNoIn1765 = frozenset([1, 4, 74])
+ FOLLOW_bitwiseORExpression_in_logicalANDExpression1779 = frozenset([1, 4, 75])
+ FOLLOW_LT_in_logicalANDExpression1782 = frozenset([4, 75])
+ FOLLOW_75_in_logicalANDExpression1786 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_logicalANDExpression1788 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_bitwiseORExpression_in_logicalANDExpression1792 = frozenset([1, 4, 75])
+ FOLLOW_bitwiseORExpressionNoIn_in_logicalANDExpressionNoIn1806 = frozenset([1, 4, 75])
+ FOLLOW_LT_in_logicalANDExpressionNoIn1809 = frozenset([4, 75])
+ FOLLOW_75_in_logicalANDExpressionNoIn1813 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_logicalANDExpressionNoIn1815 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_bitwiseORExpressionNoIn_in_logicalANDExpressionNoIn1819 = frozenset([1, 4, 75])
+ FOLLOW_bitwiseXORExpression_in_bitwiseORExpression1833 = frozenset([1, 4, 76])
+ FOLLOW_LT_in_bitwiseORExpression1836 = frozenset([4, 76])
+ FOLLOW_76_in_bitwiseORExpression1840 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_bitwiseORExpression1842 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_bitwiseXORExpression_in_bitwiseORExpression1846 = frozenset([1, 4, 76])
+ FOLLOW_bitwiseXORExpressionNoIn_in_bitwiseORExpressionNoIn1860 = frozenset([1, 4, 76])
+ FOLLOW_LT_in_bitwiseORExpressionNoIn1863 = frozenset([4, 76])
+ FOLLOW_76_in_bitwiseORExpressionNoIn1867 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_bitwiseORExpressionNoIn1869 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_bitwiseXORExpressionNoIn_in_bitwiseORExpressionNoIn1873 = frozenset([1, 4, 76])
+ FOLLOW_bitwiseANDExpression_in_bitwiseXORExpression1887 = frozenset([1, 4, 77])
+ FOLLOW_LT_in_bitwiseXORExpression1890 = frozenset([4, 77])
+ FOLLOW_77_in_bitwiseXORExpression1894 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_bitwiseXORExpression1896 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_bitwiseANDExpression_in_bitwiseXORExpression1900 = frozenset([1, 4, 77])
+ FOLLOW_bitwiseANDExpressionNoIn_in_bitwiseXORExpressionNoIn1914 = frozenset([1, 4, 77])
+ FOLLOW_LT_in_bitwiseXORExpressionNoIn1917 = frozenset([4, 77])
+ FOLLOW_77_in_bitwiseXORExpressionNoIn1921 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_bitwiseXORExpressionNoIn1923 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_bitwiseANDExpressionNoIn_in_bitwiseXORExpressionNoIn1927 = frozenset([1, 4, 77])
+ FOLLOW_equalityExpression_in_bitwiseANDExpression1941 = frozenset([1, 4, 78])
+ FOLLOW_LT_in_bitwiseANDExpression1944 = frozenset([4, 78])
+ FOLLOW_78_in_bitwiseANDExpression1948 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_bitwiseANDExpression1950 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_equalityExpression_in_bitwiseANDExpression1954 = frozenset([1, 4, 78])
+ FOLLOW_equalityExpressionNoIn_in_bitwiseANDExpressionNoIn1968 = frozenset([1, 4, 78])
+ FOLLOW_LT_in_bitwiseANDExpressionNoIn1971 = frozenset([4, 78])
+ FOLLOW_78_in_bitwiseANDExpressionNoIn1975 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_bitwiseANDExpressionNoIn1977 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_equalityExpressionNoIn_in_bitwiseANDExpressionNoIn1981 = frozenset([1, 4, 78])
+ FOLLOW_relationalExpression_in_equalityExpression1995 = frozenset([1, 4, 79, 80, 81, 82])
+ FOLLOW_LT_in_equalityExpression1998 = frozenset([4, 79, 80, 81, 82])
+ FOLLOW_set_in_equalityExpression2002 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_equalityExpression2018 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_relationalExpression_in_equalityExpression2022 = frozenset([1, 4, 79, 80, 81, 82])
+ FOLLOW_relationalExpressionNoIn_in_equalityExpressionNoIn2035 = frozenset([1, 4, 79, 80, 81, 82])
+ FOLLOW_LT_in_equalityExpressionNoIn2038 = frozenset([4, 79, 80, 81, 82])
+ FOLLOW_set_in_equalityExpressionNoIn2042 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_equalityExpressionNoIn2058 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_relationalExpressionNoIn_in_equalityExpressionNoIn2062 = frozenset([1, 4, 79, 80, 81, 82])
+ FOLLOW_shiftExpression_in_relationalExpression2076 = frozenset([1, 4, 45, 83, 84, 85, 86, 87])
+ FOLLOW_LT_in_relationalExpression2079 = frozenset([4, 45, 83, 84, 85, 86, 87])
+ FOLLOW_set_in_relationalExpression2083 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_relationalExpression2107 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_shiftExpression_in_relationalExpression2111 = frozenset([1, 4, 45, 83, 84, 85, 86, 87])
+ FOLLOW_shiftExpression_in_relationalExpressionNoIn2124 = frozenset([1, 4, 83, 84, 85, 86, 87])
+ FOLLOW_LT_in_relationalExpressionNoIn2127 = frozenset([4, 83, 84, 85, 86, 87])
+ FOLLOW_set_in_relationalExpressionNoIn2131 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_relationalExpressionNoIn2151 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_shiftExpression_in_relationalExpressionNoIn2155 = frozenset([1, 4, 83, 84, 85, 86, 87])
+ FOLLOW_additiveExpression_in_shiftExpression2168 = frozenset([1, 4, 88, 89, 90])
+ FOLLOW_LT_in_shiftExpression2171 = frozenset([4, 88, 89, 90])
+ FOLLOW_set_in_shiftExpression2175 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_shiftExpression2187 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_additiveExpression_in_shiftExpression2191 = frozenset([1, 4, 88, 89, 90])
+ FOLLOW_multiplicativeExpression_in_additiveExpression2204 = frozenset([1, 4, 91, 92])
+ FOLLOW_LT_in_additiveExpression2207 = frozenset([4, 91, 92])
+ FOLLOW_set_in_additiveExpression2211 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_additiveExpression2219 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_multiplicativeExpression_in_additiveExpression2223 = frozenset([1, 4, 91, 92])
+ FOLLOW_unaryExpression_in_multiplicativeExpression2236 = frozenset([1, 4, 93, 94, 95])
+ FOLLOW_LT_in_multiplicativeExpression2239 = frozenset([4, 93, 94, 95])
+ FOLLOW_set_in_multiplicativeExpression2243 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_multiplicativeExpression2255 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_unaryExpression_in_multiplicativeExpression2259 = frozenset([1, 4, 93, 94, 95])
+ FOLLOW_postfixExpression_in_unaryExpression2272 = frozenset([1])
+ FOLLOW_set_in_unaryExpression2277 = frozenset([5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_unaryExpression_in_unaryExpression2313 = frozenset([1])
+ FOLLOW_leftHandSideExpression_in_postfixExpression2325 = frozenset([1, 99, 100])
+ FOLLOW_set_in_postfixExpression2327 = frozenset([1])
+ FOLLOW_103_in_primaryExpression2345 = frozenset([1])
+ FOLLOW_Identifier_in_primaryExpression2350 = frozenset([1])
+ FOLLOW_literal_in_primaryExpression2355 = frozenset([1])
+ FOLLOW_arrayLiteral_in_primaryExpression2360 = frozenset([1])
+ FOLLOW_objectLiteral_in_primaryExpression2365 = frozenset([1])
+ FOLLOW_32_in_primaryExpression2370 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_primaryExpression2372 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_expression_in_primaryExpression2376 = frozenset([4, 34])
+ FOLLOW_LT_in_primaryExpression2378 = frozenset([4, 34])
+ FOLLOW_34_in_primaryExpression2382 = frozenset([1])
+ FOLLOW_59_in_arrayLiteral2395 = frozenset([4, 5, 6, 7, 31, 32, 33, 35, 58, 59, 60, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_arrayLiteral2397 = frozenset([4, 5, 6, 7, 31, 32, 33, 35, 58, 59, 60, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpression_in_arrayLiteral2401 = frozenset([4, 33, 60])
+ FOLLOW_LT_in_arrayLiteral2405 = frozenset([4, 33])
+ FOLLOW_33_in_arrayLiteral2409 = frozenset([4, 5, 6, 7, 31, 32, 33, 35, 58, 59, 60, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_arrayLiteral2412 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpression_in_arrayLiteral2416 = frozenset([4, 33, 60])
+ FOLLOW_LT_in_arrayLiteral2422 = frozenset([4, 60])
+ FOLLOW_60_in_arrayLiteral2426 = frozenset([1])
+ FOLLOW_35_in_objectLiteral2445 = frozenset([4, 5, 6, 7])
+ FOLLOW_LT_in_objectLiteral2447 = frozenset([4, 5, 6, 7])
+ FOLLOW_propertyNameAndValue_in_objectLiteral2451 = frozenset([4, 33, 36])
+ FOLLOW_LT_in_objectLiteral2454 = frozenset([4, 33])
+ FOLLOW_33_in_objectLiteral2458 = frozenset([4, 5, 6, 7])
+ FOLLOW_LT_in_objectLiteral2460 = frozenset([4, 5, 6, 7])
+ FOLLOW_propertyNameAndValue_in_objectLiteral2464 = frozenset([4, 33, 36])
+ FOLLOW_LT_in_objectLiteral2468 = frozenset([4, 36])
+ FOLLOW_36_in_objectLiteral2472 = frozenset([1])
+ FOLLOW_propertyName_in_propertyNameAndValue2484 = frozenset([4, 50])
+ FOLLOW_LT_in_propertyNameAndValue2486 = frozenset([4, 50])
+ FOLLOW_50_in_propertyNameAndValue2490 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_propertyNameAndValue2492 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_assignmentExpression_in_propertyNameAndValue2496 = frozenset([1])
+ FOLLOW_set_in_propertyName0 = frozenset([1])
+ FOLLOW_set_in_literal0 = frozenset([1])
+ FOLLOW_functionDeclaration_in_synpred5_JavaScript90 = frozenset([1])
+ FOLLOW_LT_in_synpred9_JavaScript140 = frozenset([1])
+ FOLLOW_statementBlock_in_synpred21_JavaScript234 = frozenset([1])
+ FOLLOW_expressionStatement_in_synpred24_JavaScript249 = frozenset([1])
+ FOLLOW_labelledStatement_in_synpred31_JavaScript284 = frozenset([1])
+ FOLLOW_LT_in_synpred34_JavaScript313 = frozenset([1])
+ FOLLOW_LT_in_synpred47_JavaScript440 = frozenset([1])
+ FOLLOW_LT_in_synpred49_JavaScript459 = frozenset([1])
+ FOLLOW_LT_in_synpred60_JavaScript572 = frozenset([4, 41])
+ FOLLOW_41_in_synpred60_JavaScript576 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_synpred60_JavaScript578 = frozenset([4, 5, 6, 7, 31, 32, 35, 37, 38, 40, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_statement_in_synpred60_JavaScript582 = frozenset([1])
+ FOLLOW_forStatement_in_synpred63_JavaScript606 = frozenset([1])
+ FOLLOW_LT_in_synpred118_JavaScript1087 = frozenset([1])
+ FOLLOW_LT_in_synpred121_JavaScript1112 = frozenset([1])
+ FOLLOW_conditionalExpression_in_synpred140_JavaScript1304 = frozenset([1])
+ FOLLOW_conditionalExpressionNoIn_in_synpred143_JavaScript1333 = frozenset([1])
+ FOLLOW_callExpression_in_synpred146_JavaScript1362 = frozenset([1])
+ FOLLOW_memberExpression_in_synpred147_JavaScript1379 = frozenset([1])
+ FOLLOW_LT_in_synpred154_JavaScript1427 = frozenset([4, 59, 61])
+ FOLLOW_memberExpressionSuffix_in_synpred154_JavaScript1431 = frozenset([1])
+ FOLLOW_LT_in_synpred158_JavaScript1470 = frozenset([4, 32, 59, 61])
+ FOLLOW_callExpressionSuffix_in_synpred158_JavaScript1474 = frozenset([1])
+ FOLLOW_LT_in_synpred256_JavaScript2207 = frozenset([4, 91, 92])
+ FOLLOW_set_in_synpred256_JavaScript2211 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_LT_in_synpred256_JavaScript2219 = frozenset([4, 5, 6, 7, 31, 32, 35, 58, 59, 91, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106])
+ FOLLOW_multiplicativeExpression_in_synpred256_JavaScript2223 = frozenset([1])
+ FOLLOW_LT_in_synpred280_JavaScript2397 = frozenset([1])
+
+
+
+def main(argv, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr):
+ from antlr3.main import ParserMain
+ main = ParserMain("JavaScriptLexer", JavaScriptParser)
+ main.stdin = stdin
+ main.stdout = stdout
+ main.stderr = stderr
+ main.execute(argv)
+
+
+if __name__ == '__main__':
+ main(sys.argv)
Added: torflow/trunk/NetworkScanners/libs/jsparser/README.build
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/README.build (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/README.build 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,13 @@
+To rebuild these python files from the antlr3 grammar (JavaScript.g),
+you need to download the antlr toolset jar (not the runtime):
+
+wget http://www.antlr.org/download/antlr-3.1.3.jar
+
+You can then run it with
+
+java -cp antlr-3.1.3.jar org.antlr.Tool -o . JavaScript.g
+
+A new version of the Python antlr runtime (currently at 3.1.3), can
+be downloaded from http://www.antlr.org/download/Python/
+
+
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/__init__.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/__init__.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/__init__.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,171 @@
+""" @package antlr3
+ at brief ANTLR3 runtime package
+
+This module contains all support classes, which are needed to use recognizers
+generated by ANTLR3.
+
+ at mainpage
+
+\note Please be warned that the line numbers in the API documentation do not
+match the real locations in the source code of the package. This is an
+unintended artifact of doxygen, which I could only convince to use the
+correct module names by concatenating all files from the package into a single
+module file...
+
+Here is a little overview over the most commonly used classes provided by
+this runtime:
+
+ at section recognizers Recognizers
+
+These recognizers are baseclasses for the code which is generated by ANTLR3.
+
+- BaseRecognizer: Base class with common recognizer functionality.
+- Lexer: Base class for lexers.
+- Parser: Base class for parsers.
+- tree.TreeParser: Base class for %tree parser.
+
+ at section streams Streams
+
+Each recognizer pulls its input from one of the stream classes below. Streams
+handle stuff like buffering, look-ahead and seeking.
+
+A character stream is usually the first element in the pipeline of a typical
+ANTLR3 application. It is used as the input for a Lexer.
+
+- ANTLRStringStream: Reads from a string objects. The input should be a unicode
+ object, or ANTLR3 will have trouble decoding non-ascii data.
+- ANTLRFileStream: Opens a file and read the contents, with optional character
+ decoding.
+- ANTLRInputStream: Reads the date from a file-like object, with optional
+ character decoding.
+
+A Parser needs a TokenStream as input (which in turn is usually fed by a
+Lexer):
+
+- CommonTokenStream: A basic and most commonly used TokenStream
+ implementation.
+- TokenRewriteStream: A modification of CommonTokenStream that allows the
+ stream to be altered (by the Parser). See the 'tweak' example for a usecase.
+
+And tree.TreeParser finally fetches its input from a tree.TreeNodeStream:
+
+- tree.CommonTreeNodeStream: A basic and most commonly used tree.TreeNodeStream
+ implementation.
+
+
+ at section tokenstrees Tokens and Trees
+
+A Lexer emits Token objects which are usually buffered by a TokenStream. A
+Parser can build a Tree, if the output=AST option has been set in the grammar.
+
+The runtime provides these Token implementations:
+
+- CommonToken: A basic and most commonly used Token implementation.
+- ClassicToken: A Token object as used in ANTLR 2.x, used to %tree
+ construction.
+
+Tree objects are wrapper for Token objects.
+
+- tree.CommonTree: A basic and most commonly used Tree implementation.
+
+A tree.TreeAdaptor is used by the parser to create tree.Tree objects for the
+input Token objects.
+
+- tree.CommonTreeAdaptor: A basic and most commonly used tree.TreeAdaptor
+implementation.
+
+
+ at section Exceptions
+
+RecognitionException are generated, when a recognizer encounters incorrect
+or unexpected input.
+
+- RecognitionException
+ - MismatchedRangeException
+ - MismatchedSetException
+ - MismatchedNotSetException
+ .
+ - MismatchedTokenException
+ - MismatchedTreeNodeException
+ - NoViableAltException
+ - EarlyExitException
+ - FailedPredicateException
+ .
+.
+
+A tree.RewriteCardinalityException is raised, when the parsers hits a
+cardinality mismatch during AST construction. Although this is basically a
+bug in your grammar, it can only be detected at runtime.
+
+- tree.RewriteCardinalityException
+ - tree.RewriteEarlyExitException
+ - tree.RewriteEmptyStreamException
+ .
+.
+
+"""
+
+# tree.RewriteRuleElementStream
+# tree.RewriteRuleSubtreeStream
+# tree.RewriteRuleTokenStream
+# CharStream
+# DFA
+# TokenSource
+
+# [The "BSD licence"]
+# Copyright (c) 2005-2008 Terence Parr
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+__version__ = '3.1.3'
+
+def version_str_to_tuple(version_str):
+ import re
+ import sys
+
+ if version_str == 'HEAD':
+ return (sys.maxint, sys.maxint, sys.maxint, sys.maxint)
+
+ m = re.match(r'(\d+)\.(\d+)(\.(\d+))?(b(\d+))?', version_str)
+ if m is None:
+ raise ValueError("Bad version string %r" % version_str)
+
+ major = int(m.group(1))
+ minor = int(m.group(2))
+ patch = int(m.group(4) or 0)
+ beta = int(m.group(6) or sys.maxint)
+
+ return (major, minor, patch, beta)
+
+
+runtime_version_str = __version__
+runtime_version = version_str_to_tuple(runtime_version_str)
+
+
+from constants import *
+from dfa import *
+from exceptions import *
+from recognizers import *
+from streams import *
+from tokens import *
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/compat.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/compat.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/compat.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,48 @@
+"""Compatibility stuff"""
+
+# begin[licence]
+#
+# [The "BSD licence"]
+# Copyright (c) 2005-2008 Terence Parr
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# end[licence]
+
+try:
+ set = set
+ frozenset = frozenset
+except NameError:
+ from sets import Set as set, ImmutableSet as frozenset
+
+
+try:
+ reversed = reversed
+except NameError:
+ def reversed(l):
+ l = l[:]
+ l.reverse()
+ return l
+
+
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/constants.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/constants.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/constants.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,57 @@
+"""ANTLR3 runtime package"""
+
+# begin[licence]
+#
+# [The "BSD licence"]
+# Copyright (c) 2005-2008 Terence Parr
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# end[licence]
+
+EOF = -1
+
+## All tokens go to the parser (unless skip() is called in that rule)
+# on a particular "channel". The parser tunes to a particular channel
+# so that whitespace etc... can go to the parser on a "hidden" channel.
+DEFAULT_CHANNEL = 0
+
+## Anything on different channel than DEFAULT_CHANNEL is not parsed
+# by parser.
+HIDDEN_CHANNEL = 99
+
+# Predefined token types
+EOR_TOKEN_TYPE = 1
+
+##
+# imaginary tree navigation type; traverse "get child" link
+DOWN = 2
+##
+#imaginary tree navigation type; finish with a child list
+UP = 3
+
+MIN_TOKEN_TYPE = UP+1
+
+INVALID_TOKEN_TYPE = 0
+
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/debug.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/debug.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/debug.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,1137 @@
+# begin[licence]
+#
+# [The "BSD licence"]
+# Copyright (c) 2005-2009 Terence Parr
+# All rights reserved.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# end[licence]
+
+import socket
+from antlr3 import Parser, TokenStream, RecognitionException, Token
+from antlr3.tree import CommonTreeAdaptor, TreeAdaptor, Tree
+
+class DebugParser(Parser):
+ def __init__(self, stream, state=None, dbg=None, *args, **kwargs):
+ # wrap token stream in DebugTokenStream (unless user already did so).
+ if not isinstance(stream, DebugTokenStream):
+ stream = DebugTokenStream(stream, dbg)
+
+ super(DebugParser, self).__init__(stream, state, *args, **kwargs)
+
+ # Who to notify when events in the parser occur.
+ self._dbg = None
+
+ self.setDebugListener(dbg)
+
+
+ def setDebugListener(self, dbg):
+ """Provide a new debug event listener for this parser. Notify the
+ input stream too that it should send events to this listener.
+ """
+
+ if hasattr(self.input, 'dbg'):
+ self.input.dbg = dbg
+
+ self._dbg = dbg
+
+ def getDebugListener(self):
+ return self._dbg
+
+ dbg = property(getDebugListener, setDebugListener)
+
+
+ def beginResync(self):
+ self._dbg.beginResync()
+
+
+ def endResync(self):
+ self._dbg.endResync()
+
+
+ def beginBacktrack(self, level):
+ self._dbg.beginBacktrack(level)
+
+
+ def endBacktrack(self, level, successful):
+ self._dbg.endBacktrack(level,successful)
+
+
+ def reportError(self, exc):
+ if isinstance(exc, RecognitionException):
+ self._dbg.recognitionException(exc)
+
+ else:
+ traceback.print_exc(exc)
+
+
+class DebugTokenStream(TokenStream):
+ def __init__(self, input, dbg=None):
+ self.input = input
+ self.initialStreamState = True
+ # Track the last mark() call result value for use in rewind().
+ self.lastMarker = None
+
+ self._dbg = None
+ self.setDebugListener(dbg)
+
+ # force TokenStream to get at least first valid token
+ # so we know if there are any hidden tokens first in the stream
+ self.input.LT(1)
+
+
+ def getDebugListener(self):
+ return self._dbg
+
+ def setDebugListener(self, dbg):
+ self._dbg = dbg
+
+ dbg = property(getDebugListener, setDebugListener)
+
+
+ def consume(self):
+ if self.initialStreamState:
+ self.consumeInitialHiddenTokens()
+
+ a = self.input.index()
+ t = self.input.LT(1)
+ self.input.consume()
+ b = self.input.index()
+ self._dbg.consumeToken(t)
+
+ if b > a+1:
+ # then we consumed more than one token; must be off channel tokens
+ for idx in range(a+1, b):
+ self._dbg.consumeHiddenToken(self.input.get(idx));
+
+
+ def consumeInitialHiddenTokens(self):
+ """consume all initial off-channel tokens"""
+
+ firstOnChannelTokenIndex = self.input.index()
+ for idx in range(firstOnChannelTokenIndex):
+ self._dbg.consumeHiddenToken(self.input.get(idx))
+
+ self.initialStreamState = False
+
+
+ def LT(self, i):
+ if self.initialStreamState:
+ self.consumeInitialHiddenTokens()
+
+ t = self.input.LT(i)
+ self._dbg.LT(i, t)
+ return t
+
+
+ def LA(self, i):
+ if self.initialStreamState:
+ self.consumeInitialHiddenTokens()
+
+ t = self.input.LT(i)
+ self._dbg.LT(i, t)
+ return t.type
+
+
+ def get(self, i):
+ return self.input.get(i)
+
+
+ def index(self):
+ return self.input.index()
+
+
+ def mark(self):
+ self.lastMarker = self.input.mark()
+ self._dbg.mark(self.lastMarker)
+ return self.lastMarker
+
+
+ def rewind(self, marker=None):
+ self._dbg.rewind(marker)
+ self.input.rewind(marker)
+
+
+ def release(self, marker):
+ pass
+
+
+ def seek(self, index):
+ # TODO: implement seek in dbg interface
+ # self._dbg.seek(index);
+ self.input.seek(index)
+
+
+ def size(self):
+ return self.input.size()
+
+
+ def getTokenSource(self):
+ return self.input.getTokenSource()
+
+
+ def getSourceName(self):
+ return self.getTokenSource().getSourceName()
+
+
+ def toString(self, start=None, stop=None):
+ return self.input.toString(start, stop)
+
+
+class DebugTreeAdaptor(TreeAdaptor):
+ """A TreeAdaptor proxy that fires debugging events to a DebugEventListener
+ delegate and uses the TreeAdaptor delegate to do the actual work. All
+ AST events are triggered by this adaptor; no code gen changes are needed
+ in generated rules. Debugging events are triggered *after* invoking
+ tree adaptor routines.
+
+ Trees created with actions in rewrite actions like "-> ^(ADD {foo} {bar})"
+ cannot be tracked as they might not use the adaptor to create foo, bar.
+ The debug listener has to deal with tree node IDs for which it did
+ not see a createNode event. A single <unknown> node is sufficient even
+ if it represents a whole tree.
+ """
+
+ def __init__(self, dbg, adaptor):
+ self.dbg = dbg
+ self.adaptor = adaptor
+
+
+ def createWithPayload(self, payload):
+ if payload.getTokenIndex() < 0:
+ # could be token conjured up during error recovery
+ return self.createFromType(payload.getType(), payload.getText())
+
+ node = self.adaptor.createWithPayload(payload)
+ self.dbg.createNode(node, payload)
+ return node
+
+ def createFromToken(self, tokenType, fromToken, text=None):
+ node = self.adaptor.createFromToken(tokenType, fromToken, text)
+ self.dbg.createNode(node)
+ return node
+
+ def createFromType(self, tokenType, text):
+ node = self.adaptor.createFromType(tokenType, text)
+ self.dbg.createNode(node)
+ return node
+
+
+ def errorNode(self, input, start, stop, exc):
+ node = selfadaptor.errorNode(input, start, stop, exc)
+ if node is not None:
+ dbg.errorNode(node)
+
+ return node
+
+
+ def dupTree(self, tree):
+ t = self.adaptor.dupTree(tree)
+ # walk the tree and emit create and add child events
+ # to simulate what dupTree has done. dupTree does not call this debug
+ # adapter so I must simulate.
+ self.simulateTreeConstruction(t)
+ return t
+
+
+ def simulateTreeConstruction(self, t):
+ """^(A B C): emit create A, create B, add child, ..."""
+ self.dbg.createNode(t)
+ for i in range(self.adaptor.getChildCount(t)):
+ child = self.adaptor.getChild(t, i)
+ self.simulateTreeConstruction(child)
+ self.dbg.addChild(t, child)
+
+
+ def dupNode(self, treeNode):
+ d = self.adaptor.dupNode(treeNode)
+ self.dbg.createNode(d)
+ return d
+
+
+ def nil(self):
+ node = self.adaptor.nil()
+ self.dbg.nilNode(node)
+ return node
+
+
+ def isNil(self, tree):
+ return self.adaptor.isNil(tree)
+
+
+ def addChild(self, t, child):
+ if isinstance(child, Token):
+ n = self.createWithPayload(child)
+ self.addChild(t, n)
+
+ else:
+ if t is None or child is None:
+ return
+
+ self.adaptor.addChild(t, child)
+ self.dbg.addChild(t, child)
+
+ def becomeRoot(self, newRoot, oldRoot):
+ if isinstance(newRoot, Token):
+ n = self.createWithPayload(newRoot)
+ self.adaptor.becomeRoot(n, oldRoot)
+ else:
+ n = self.adaptor.becomeRoot(newRoot, oldRoot)
+
+ self.dbg.becomeRoot(newRoot, oldRoot)
+ return n
+
+
+ def rulePostProcessing(self, root):
+ return self.adaptor.rulePostProcessing(root)
+
+
+ def getType(self, t):
+ return self.adaptor.getType(t)
+
+
+ def setType(self, t, type):
+ self.adaptor.setType(t, type)
+
+
+ def getText(self, t):
+ return self.adaptor.getText(t)
+
+
+ def setText(self, t, text):
+ self.adaptor.setText(t, text)
+
+
+ def getToken(self, t):
+ return self.adaptor.getToken(t)
+
+
+ def setTokenBoundaries(self, t, startToken, stopToken):
+ self.adaptor.setTokenBoundaries(t, startToken, stopToken)
+ if t is not None and startToken is not None and stopToken is not None:
+ self.dbg.setTokenBoundaries(
+ t, startToken.getTokenIndex(),
+ stopToken.getTokenIndex())
+
+
+ def getTokenStartIndex(self, t):
+ return self.adaptor.getTokenStartIndex(t)
+
+
+ def getTokenStopIndex(self, t):
+ return self.adaptor.getTokenStopIndex(t)
+
+
+ def getChild(self, t, i):
+ return self.adaptor.getChild(t, i)
+
+
+ def setChild(self, t, i, child):
+ self.adaptor.setChild(t, i, child)
+
+
+ def deleteChild(self, t, i):
+ return self.adaptor.deleteChild(t, i)
+
+
+ def getChildCount(self, t):
+ return self.adaptor.getChildCount(t)
+
+
+ def getUniqueID(self, node):
+ return self.adaptor.getUniqueID(node)
+
+
+ def getParent(self, t):
+ return self.adaptor.getParent(t)
+
+
+ def getChildIndex(self, t):
+ return self.adaptor.getChildIndex(t)
+
+
+ def setParent(self, t, parent):
+ self.adaptor.setParent(t, parent)
+
+
+ def setChildIndex(self, t, index):
+ self.adaptor.setChildIndex(t, index)
+
+
+ def replaceChildren(self, parent, startChildIndex, stopChildIndex, t):
+ self.adaptor.replaceChildren(parent, startChildIndex, stopChildIndex, t)
+
+
+ ## support
+
+ def getDebugListener(self):
+ return dbg
+
+ def setDebugListener(self, dbg):
+ self.dbg = dbg
+
+
+ def getTreeAdaptor(self):
+ return self.adaptor
+
+
+
+class DebugEventListener(object):
+ """All debugging events that a recognizer can trigger.
+
+ I did not create a separate AST debugging interface as it would create
+ lots of extra classes and DebugParser has a dbg var defined, which makes
+ it hard to change to ASTDebugEventListener. I looked hard at this issue
+ and it is easier to understand as one monolithic event interface for all
+ possible events. Hopefully, adding ST debugging stuff won't be bad. Leave
+ for future. 4/26/2006.
+ """
+
+ # Moved to version 2 for v3.1: added grammar name to enter/exit Rule
+ PROTOCOL_VERSION = "2"
+
+ def enterRule(self, grammarFileName, ruleName):
+ """The parser has just entered a rule. No decision has been made about
+ which alt is predicted. This is fired AFTER init actions have been
+ executed. Attributes are defined and available etc...
+ The grammarFileName allows composite grammars to jump around among
+ multiple grammar files.
+ """
+
+ pass
+
+
+ def enterAlt(self, alt):
+ """Because rules can have lots of alternatives, it is very useful to
+ know which alt you are entering. This is 1..n for n alts.
+ """
+ pass
+
+
+ def exitRule(self, grammarFileName, ruleName):
+ """This is the last thing executed before leaving a rule. It is
+ executed even if an exception is thrown. This is triggered after
+ error reporting and recovery have occurred (unless the exception is
+ not caught in this rule). This implies an "exitAlt" event.
+ The grammarFileName allows composite grammars to jump around among
+ multiple grammar files.
+ """
+ pass
+
+
+ def enterSubRule(self, decisionNumber):
+ """Track entry into any (...) subrule other EBNF construct"""
+ pass
+
+
+ def exitSubRule(self, decisionNumber):
+ pass
+
+
+ def enterDecision(self, decisionNumber):
+ """Every decision, fixed k or arbitrary, has an enter/exit event
+ so that a GUI can easily track what LT/consume events are
+ associated with prediction. You will see a single enter/exit
+ subrule but multiple enter/exit decision events, one for each
+ loop iteration.
+ """
+ pass
+
+
+ def exitDecision(self, decisionNumber):
+ pass
+
+
+ def consumeToken(self, t):
+ """An input token was consumed; matched by any kind of element.
+ Trigger after the token was matched by things like match(), matchAny().
+ """
+ pass
+
+
+ def consumeHiddenToken(self, t):
+ """An off-channel input token was consumed.
+ Trigger after the token was matched by things like match(), matchAny().
+ (unless of course the hidden token is first stuff in the input stream).
+ """
+ pass
+
+
+ def LT(self, i, t):
+ """Somebody (anybody) looked ahead. Note that this actually gets
+ triggered by both LA and LT calls. The debugger will want to know
+ which Token object was examined. Like consumeToken, this indicates
+ what token was seen at that depth. A remote debugger cannot look
+ ahead into a file it doesn't have so LT events must pass the token
+ even if the info is redundant.
+ """
+ pass
+
+
+ def mark(self, marker):
+ """The parser is going to look arbitrarily ahead; mark this location,
+ the token stream's marker is sent in case you need it.
+ """
+ pass
+
+
+ def rewind(self, marker=None):
+ """After an arbitrairly long lookahead as with a cyclic DFA (or with
+ any backtrack), this informs the debugger that stream should be
+ rewound to the position associated with marker.
+
+ """
+ pass
+
+
+ def beginBacktrack(self, level):
+ pass
+
+
+ def endBacktrack(self, level, successful):
+ pass
+
+
+ def location(self, line, pos):
+ """To watch a parser move through the grammar, the parser needs to
+ inform the debugger what line/charPos it is passing in the grammar.
+ For now, this does not know how to switch from one grammar to the
+ other and back for island grammars etc...
+
+ This should also allow breakpoints because the debugger can stop
+ the parser whenever it hits this line/pos.
+ """
+ pass
+
+
+ def recognitionException(self, e):
+ """A recognition exception occurred such as NoViableAltException. I made
+ this a generic event so that I can alter the exception hierachy later
+ without having to alter all the debug objects.
+
+ Upon error, the stack of enter rule/subrule must be properly unwound.
+ If no viable alt occurs it is within an enter/exit decision, which
+ also must be rewound. Even the rewind for each mark must be unwount.
+ In the Java target this is pretty easy using try/finally, if a bit
+ ugly in the generated code. The rewind is generated in DFA.predict()
+ actually so no code needs to be generated for that. For languages
+ w/o this "finally" feature (C++?), the target implementor will have
+ to build an event stack or something.
+
+ Across a socket for remote debugging, only the RecognitionException
+ data fields are transmitted. The token object or whatever that
+ caused the problem was the last object referenced by LT. The
+ immediately preceding LT event should hold the unexpected Token or
+ char.
+
+ Here is a sample event trace for grammar:
+
+ b : C ({;}A|B) // {;} is there to prevent A|B becoming a set
+ | D
+ ;
+
+ The sequence for this rule (with no viable alt in the subrule) for
+ input 'c c' (there are 3 tokens) is:
+
+ commence
+ LT(1)
+ enterRule b
+ location 7 1
+ enter decision 3
+ LT(1)
+ exit decision 3
+ enterAlt1
+ location 7 5
+ LT(1)
+ consumeToken [c/<4>,1:0]
+ location 7 7
+ enterSubRule 2
+ enter decision 2
+ LT(1)
+ LT(1)
+ recognitionException NoViableAltException 2 1 2
+ exit decision 2
+ exitSubRule 2
+ beginResync
+ LT(1)
+ consumeToken [c/<4>,1:1]
+ LT(1)
+ endResync
+ LT(-1)
+ exitRule b
+ terminate
+ """
+ pass
+
+
+ def beginResync(self):
+ """Indicates the recognizer is about to consume tokens to resynchronize
+ the parser. Any consume events from here until the recovered event
+ are not part of the parse--they are dead tokens.
+ """
+ pass
+
+
+ def endResync(self):
+ """Indicates that the recognizer has finished consuming tokens in order
+ to resychronize. There may be multiple beginResync/endResync pairs
+ before the recognizer comes out of errorRecovery mode (in which
+ multiple errors are suppressed). This will be useful
+ in a gui where you want to probably grey out tokens that are consumed
+ but not matched to anything in grammar. Anything between
+ a beginResync/endResync pair was tossed out by the parser.
+ """
+ pass
+
+
+ def semanticPredicate(self, result, predicate):
+ """A semantic predicate was evaluate with this result and action text"""
+ pass
+
+
+ def commence(self):
+ """Announce that parsing has begun. Not technically useful except for
+ sending events over a socket. A GUI for example will launch a thread
+ to connect and communicate with a remote parser. The thread will want
+ to notify the GUI when a connection is made. ANTLR parsers
+ trigger this upon entry to the first rule (the ruleLevel is used to
+ figure this out).
+ """
+ pass
+
+
+ def terminate(self):
+ """Parsing is over; successfully or not. Mostly useful for telling
+ remote debugging listeners that it's time to quit. When the rule
+ invocation level goes to zero at the end of a rule, we are done
+ parsing.
+ """
+ pass
+
+
+ ## T r e e P a r s i n g
+
+ def consumeNode(self, t):
+ """Input for a tree parser is an AST, but we know nothing for sure
+ about a node except its type and text (obtained from the adaptor).
+ This is the analog of the consumeToken method. Again, the ID is
+ the hashCode usually of the node so it only works if hashCode is
+ not implemented. If the type is UP or DOWN, then
+ the ID is not really meaningful as it's fixed--there is
+ just one UP node and one DOWN navigation node.
+ """
+ pass
+
+
+ def LT(self, i, t):
+ """The tree parser lookedahead. If the type is UP or DOWN,
+ then the ID is not really meaningful as it's fixed--there is
+ just one UP node and one DOWN navigation node.
+ """
+ pass
+
+
+
+ ## A S T E v e n t s
+
+ def nilNode(self, t):
+ """A nil was created (even nil nodes have a unique ID...
+ they are not "null" per se). As of 4/28/2006, this
+ seems to be uniquely triggered when starting a new subtree
+ such as when entering a subrule in automatic mode and when
+ building a tree in rewrite mode.
+
+ If you are receiving this event over a socket via
+ RemoteDebugEventSocketListener then only t.ID is set.
+ """
+ pass
+
+
+ def errorNode(self, t):
+ """Upon syntax error, recognizers bracket the error with an error node
+ if they are building ASTs.
+ """
+ pass
+
+
+ def createNode(self, node, token=None):
+ """Announce a new node built from token elements such as type etc...
+
+ If you are receiving this event over a socket via
+ RemoteDebugEventSocketListener then only t.ID, type, text are
+ set.
+ """
+ pass
+
+
+ def becomeRoot(self, newRoot, oldRoot):
+ """Make a node the new root of an existing root.
+
+ Note: the newRootID parameter is possibly different
+ than the TreeAdaptor.becomeRoot() newRoot parameter.
+ In our case, it will always be the result of calling
+ TreeAdaptor.becomeRoot() and not root_n or whatever.
+
+ The listener should assume that this event occurs
+ only when the current subrule (or rule) subtree is
+ being reset to newRootID.
+
+ If you are receiving this event over a socket via
+ RemoteDebugEventSocketListener then only IDs are set.
+
+ @see antlr3.tree.TreeAdaptor.becomeRoot()
+ """
+ pass
+
+
+ def addChild(self, root, child):
+ """Make childID a child of rootID.
+
+ If you are receiving this event over a socket via
+ RemoteDebugEventSocketListener then only IDs are set.
+
+ @see antlr3.tree.TreeAdaptor.addChild()
+ """
+ pass
+
+
+ def setTokenBoundaries(self, t, tokenStartIndex, tokenStopIndex):
+ """Set the token start/stop token index for a subtree root or node.
+
+ If you are receiving this event over a socket via
+ RemoteDebugEventSocketListener then only t.ID is set.
+ """
+ pass
+
+
+class BlankDebugEventListener(DebugEventListener):
+ """A blank listener that does nothing; useful for real classes so
+ they don't have to have lots of blank methods and are less
+ sensitive to updates to debug interface.
+
+ Note: this class is identical to DebugEventListener and exists purely
+ for compatibility with Java.
+ """
+ pass
+
+
+class TraceDebugEventListener(DebugEventListener):
+ """A listener that simply records text representations of the events.
+
+ Useful for debugging the debugging facility ;)
+
+ Subclasses can override the record() method (which defaults to printing to
+ stdout) to record the events in a different way.
+ """
+
+ def __init__(self, adaptor=None):
+ super(TraceDebugEventListener, self).__init__()
+
+ if adaptor is None:
+ adaptor = CommonTreeAdaptor()
+ self.adaptor = adaptor
+
+ def record(self, event):
+ sys.stdout.write(event + '\n')
+
+ def enterRule(self, grammarFileName, ruleName):
+ self.record("enterRule "+ruleName)
+
+ def exitRule(self, grammarFileName, ruleName):
+ self.record("exitRule "+ruleName)
+
+ def enterSubRule(self, decisionNumber):
+ self.record("enterSubRule")
+
+ def exitSubRule(self, decisionNumber):
+ self.record("exitSubRule")
+
+ def location(self, line, pos):
+ self.record("location %s:%s" % (line, pos))
+
+ ## Tree parsing stuff
+
+ def consumeNode(self, t):
+ self.record("consumeNode %s %s %s" % (
+ self.adaptor.getUniqueID(t),
+ self.adaptor.getText(t),
+ self.adaptor.getType(t)))
+
+ def LT(self, i, t):
+ self.record("LT %s %s %s %s" % (
+ i,
+ self.adaptor.getUniqueID(t),
+ self.adaptor.getText(t),
+ self.adaptor.getType(t)))
+
+
+ ## AST stuff
+ def nilNode(self, t):
+ self.record("nilNode %s" % self.adaptor.getUniqueID(t))
+
+ def createNode(self, t, token=None):
+ if token is None:
+ self.record("create %s: %s, %s" % (
+ self.adaptor.getUniqueID(t),
+ self.adaptor.getText(t),
+ self.adaptor.getType(t)))
+
+ else:
+ self.record("create %s: %s" % (
+ self.adaptor.getUniqueID(t),
+ token.getTokenIndex()))
+
+ def becomeRoot(self, newRoot, oldRoot):
+ self.record("becomeRoot %s, %s" % (
+ self.adaptor.getUniqueID(newRoot),
+ self.adaptor.getUniqueID(oldRoot)))
+
+ def addChild(self, root, child):
+ self.record("addChild %s, %s" % (
+ self.adaptor.getUniqueID(root),
+ self.adaptor.getUniqueID(child)))
+
+ def setTokenBoundaries(self, t, tokenStartIndex, tokenStopIndex):
+ self.record("setTokenBoundaries %s, %s, %s" % (
+ self.adaptor.getUniqueID(t),
+ tokenStartIndex, tokenStopIndex))
+
+
+class RecordDebugEventListener(TraceDebugEventListener):
+ """A listener that records events as strings in an array."""
+
+ def __init__(self, adaptor=None):
+ super(RecordDebugEventListener, self).__init__(adaptor)
+
+ self.events = []
+
+ def record(self, event):
+ self.events.append(event)
+
+
+class DebugEventSocketProxy(DebugEventListener):
+ """A proxy debug event listener that forwards events over a socket to
+ a debugger (or any other listener) using a simple text-based protocol;
+ one event per line. ANTLRWorks listens on server socket with a
+ RemoteDebugEventSocketListener instance. These two objects must therefore
+ be kept in sync. New events must be handled on both sides of socket.
+ """
+
+ DEFAULT_DEBUGGER_PORT = 49100
+
+ def __init__(self, recognizer, adaptor=None, port=None,
+ debug=None):
+ super(DebugEventSocketProxy, self).__init__()
+
+ self.grammarFileName = recognizer.getGrammarFileName()
+
+ # Almost certainly the recognizer will have adaptor set, but
+ # we don't know how to cast it (Parser or TreeParser) to get
+ # the adaptor field. Must be set with a constructor. :(
+ self.adaptor = adaptor
+
+ self.port = port or self.DEFAULT_DEBUGGER_PORT
+
+ self.debug = debug
+
+ self.socket = None
+ self.connection = None
+ self.input = None
+ self.output = None
+
+
+ def log(self, msg):
+ if self.debug is not None:
+ self.debug.write(msg + '\n')
+
+
+ def handshake(self):
+ if self.socket is None:
+ # create listening socket
+ self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+ self.socket.bind(('', self.port))
+ self.socket.listen(1)
+ self.log("Waiting for incoming connection on port %d" % self.port)
+
+ # wait for an incoming connection
+ self.connection, addr = self.socket.accept()
+ self.log("Accepted connection from %s:%d" % addr)
+
+ self.connection.setblocking(1)
+ self.connection.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1)
+
+ # FIXME(pink): wrap into utf8 encoding stream
+ self.output = self.connection.makefile('w', 0)
+ self.input = self.connection.makefile('r', 0)
+
+ self.write("ANTLR %s" % self.PROTOCOL_VERSION)
+ self.write("grammar \"%s" % self.grammarFileName)
+ self.ack()
+
+
+ def write(self, msg):
+ self.log("> %s" % msg)
+ self.output.write("%s\n" % msg)
+ self.output.flush()
+
+
+ def ack(self):
+ t = self.input.readline()
+ self.log("< %s" % t.rstrip())
+
+
+ def transmit(self, event):
+ self.write(event);
+ self.ack();
+
+
+ def commence(self):
+ # don't bother sending event; listener will trigger upon connection
+ pass
+
+
+ def terminate(self):
+ self.transmit("terminate")
+ self.output.close()
+ self.input.close()
+ self.connection.close()
+ self.socket.close()
+
+
+ def enterRule(self, grammarFileName, ruleName):
+ self.transmit("enterRule\t%s\t%s" % (grammarFileName, ruleName))
+
+
+ def enterAlt(self, alt):
+ self.transmit("enterAlt\t%d" % alt)
+
+
+ def exitRule(self, grammarFileName, ruleName):
+ self.transmit("exitRule\t%s\t%s" % (grammarFileName, ruleName))
+
+
+ def enterSubRule(self, decisionNumber):
+ self.transmit("enterSubRule\t%d" % decisionNumber)
+
+
+ def exitSubRule(self, decisionNumber):
+ self.transmit("exitSubRule\t%d" % decisionNumber)
+
+
+ def enterDecision(self, decisionNumber):
+ self.transmit("enterDecision\t%d" % decisionNumber)
+
+
+ def exitDecision(self, decisionNumber):
+ self.transmit("exitDecision\t%d" % decisionNumber)
+
+
+ def consumeToken(self, t):
+ self.transmit("consumeToken\t%s" % self.serializeToken(t))
+
+
+ def consumeHiddenToken(self, t):
+ self.transmit("consumeHiddenToken\t%s" % self.serializeToken(t))
+
+
+ def LT(self, i, o):
+ if isinstance(o, Tree):
+ return self.LT_tree(i, o)
+ return self.LT_token(i, o)
+
+
+ def LT_token(self, i, t):
+ if t is not None:
+ self.transmit("LT\t%d\t%s" % (i, self.serializeToken(t)))
+
+
+ def mark(self, i):
+ self.transmit("mark\t%d" % i)
+
+
+ def rewind(self, i=None):
+ if i is not None:
+ self.transmit("rewind\t%d" % i)
+ else:
+ self.transmit("rewind")
+
+
+ def beginBacktrack(self, level):
+ self.transmit("beginBacktrack\t%d" % level)
+
+
+ def endBacktrack(self, level, successful):
+ self.transmit("endBacktrack\t%d\t%s" % (
+ level, ['0', '1'][bool(successful)]))
+
+
+ def location(self, line, pos):
+ self.transmit("location\t%d\t%d" % (line, pos))
+
+
+ def recognitionException(self, exc):
+ self.transmit('\t'.join([
+ "exception",
+ exc.__class__.__name__,
+ str(int(exc.index)),
+ str(int(exc.line)),
+ str(int(exc.charPositionInLine))]))
+
+
+ def beginResync(self):
+ self.transmit("beginResync")
+
+
+ def endResync(self):
+ self.transmit("endResync")
+
+
+ def semanticPredicate(self, result, predicate):
+ self.transmit('\t'.join([
+ "semanticPredicate",
+ str(int(result)),
+ self.escapeNewlines(predicate)]))
+
+ ## A S T P a r s i n g E v e n t s
+
+ def consumeNode(self, t):
+ FIXME(31)
+# StringBuffer buf = new StringBuffer(50);
+# buf.append("consumeNode");
+# serializeNode(buf, t);
+# transmit(buf.toString());
+
+
+ def LT_tree(self, i, t):
+ FIXME(34)
+# int ID = adaptor.getUniqueID(t);
+# String text = adaptor.getText(t);
+# int type = adaptor.getType(t);
+# StringBuffer buf = new StringBuffer(50);
+# buf.append("LN\t"); // lookahead node; distinguish from LT in protocol
+# buf.append(i);
+# serializeNode(buf, t);
+# transmit(buf.toString());
+
+
+ def serializeNode(self, buf, t):
+ FIXME(33)
+# int ID = adaptor.getUniqueID(t);
+# String text = adaptor.getText(t);
+# int type = adaptor.getType(t);
+# buf.append("\t");
+# buf.append(ID);
+# buf.append("\t");
+# buf.append(type);
+# Token token = adaptor.getToken(t);
+# int line = -1;
+# int pos = -1;
+# if ( token!=null ) {
+# line = token.getLine();
+# pos = token.getCharPositionInLine();
+# }
+# buf.append("\t");
+# buf.append(line);
+# buf.append("\t");
+# buf.append(pos);
+# int tokenIndex = adaptor.getTokenStartIndex(t);
+# buf.append("\t");
+# buf.append(tokenIndex);
+# serializeText(buf, text);
+
+
+ ## A S T E v e n t s
+
+ def nilNode(self, t):
+ self.transmit("nilNode\t%d" % self.adaptor.getUniqueID(t))
+
+
+ def errorNode(self, t):
+ self.transmit("errorNode\t%d\t%d\t\"%s" % (
+ self.adaptor.getUniqueID(t),
+ Token.INVALID_TOKEN_TYPE,
+ self.escapeNewlines(t.toString())))
+
+
+
+ def createNode(self, node, token=None):
+ if token is not None:
+ self.transmit("createNode\t%d\t%d" % (
+ self.adaptor.getUniqueID(node),
+ token.getTokenIndex()))
+
+ else:
+ self.transmit("createNodeFromTokenElements\t%d\t%d\t\"%s" % (
+ self.adaptor.getUniqueID(node),
+ self.adaptor.getType(node),
+ self.adaptor.getText(node)))
+
+
+ def becomeRoot(self, newRoot, oldRoot):
+ self.transmit("becomeRoot\t%d\t%d" % (
+ self.adaptor.getUniqueID(newRoot),
+ self.adaptor.getUniqueID(oldRoot)))
+
+
+ def addChild(self, root, child):
+ self.transmit("addChild\t%d\t%d" % (
+ self.adaptor.getUniqueID(root),
+ self.adaptor.getUniqueID(child)))
+
+
+ def setTokenBoundaries(self, t, tokenStartIndex, tokenStopIndex):
+ self.transmit("setTokenBoundaries\t%d\t%d\t%d" % (
+ self.adaptor.getUniqueID(t),
+ tokenStartIndex, tokenStopIndex))
+
+
+
+ ## support
+
+ def setTreeAdaptor(self, adaptor):
+ self.adaptor = adaptor
+
+ def getTreeAdaptor(self):
+ return self.adaptor
+
+
+ def serializeToken(self, t):
+ buf = [str(int(t.getTokenIndex())),
+ str(int(t.getType())),
+ str(int(t.getChannel())),
+ str(int(t.getLine() or 0)),
+ str(int(t.getCharPositionInLine() or 0)),
+ '\"' + self.escapeNewlines(t.getText())]
+ return '\t'.join(buf)
+
+
+ def escapeNewlines(self, txt):
+ if txt is None:
+ return ''
+
+ txt = txt.replace("%","%25") # escape all escape char ;)
+ txt = txt.replace("\n","%0A") # escape \n
+ txt = txt.replace("\r","%0D") # escape \r
+ return txt
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/dfa.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/dfa.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/dfa.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,213 @@
+"""ANTLR3 runtime package"""
+
+# begin[licence]
+#
+# [The "BSD licence"]
+# Copyright (c) 2005-2008 Terence Parr
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# end[licensc]
+
+from antlr3.constants import EOF
+from antlr3.exceptions import NoViableAltException, BacktrackingFailed
+
+
+class DFA(object):
+ """@brief A DFA implemented as a set of transition tables.
+
+ Any state that has a semantic predicate edge is special; those states
+ are generated with if-then-else structures in a specialStateTransition()
+ which is generated by cyclicDFA template.
+
+ """
+
+ def __init__(
+ self,
+ recognizer, decisionNumber,
+ eot, eof, min, max, accept, special, transition
+ ):
+ ## Which recognizer encloses this DFA? Needed to check backtracking
+ self.recognizer = recognizer
+
+ self.decisionNumber = decisionNumber
+ self.eot = eot
+ self.eof = eof
+ self.min = min
+ self.max = max
+ self.accept = accept
+ self.special = special
+ self.transition = transition
+
+
+ def predict(self, input):
+ """
+ From the input stream, predict what alternative will succeed
+ using this DFA (representing the covering regular approximation
+ to the underlying CFL). Return an alternative number 1..n. Throw
+ an exception upon error.
+ """
+ mark = input.mark()
+ s = 0 # we always start at s0
+ try:
+ for _ in xrange(50000):
+ #print "***Current state = %d" % s
+
+ specialState = self.special[s]
+ if specialState >= 0:
+ #print "is special"
+ s = self.specialStateTransition(specialState, input)
+ if s == -1:
+ self.noViableAlt(s, input)
+ return 0
+ input.consume()
+ continue
+
+ if self.accept[s] >= 1:
+ #print "accept state for alt %d" % self.accept[s]
+ return self.accept[s]
+
+ # look for a normal char transition
+ c = input.LA(1)
+
+ #print "LA = %d (%r)" % (c, unichr(c) if c >= 0 else 'EOF')
+ #print "range = %d..%d" % (self.min[s], self.max[s])
+
+ if c >= self.min[s] and c <= self.max[s]:
+ # move to next state
+ snext = self.transition[s][c-self.min[s]]
+ #print "in range, next state = %d" % snext
+
+ if snext < 0:
+ #print "not a normal transition"
+ # was in range but not a normal transition
+ # must check EOT, which is like the else clause.
+ # eot[s]>=0 indicates that an EOT edge goes to another
+ # state.
+ if self.eot[s] >= 0: # EOT Transition to accept state?
+ #print "EOT trans to accept state %d" % self.eot[s]
+
+ s = self.eot[s]
+ input.consume()
+ # TODO: I had this as return accept[eot[s]]
+ # which assumed here that the EOT edge always
+ # went to an accept...faster to do this, but
+ # what about predicated edges coming from EOT
+ # target?
+ continue
+
+ #print "no viable alt"
+ self.noViableAlt(s, input)
+ return 0
+
+ s = snext
+ input.consume()
+ continue
+
+ if self.eot[s] >= 0:
+ #print "EOT to %d" % self.eot[s]
+
+ s = self.eot[s]
+ input.consume()
+ continue
+
+ # EOF Transition to accept state?
+ if c == EOF and self.eof[s] >= 0:
+ #print "EOF Transition to accept state %d" \
+ # % self.accept[self.eof[s]]
+ return self.accept[self.eof[s]]
+
+ # not in range and not EOF/EOT, must be invalid symbol
+ self.noViableAlt(s, input)
+ return 0
+
+ else:
+ raise RuntimeError("DFA bang!")
+
+ finally:
+ input.rewind(mark)
+
+
+ def noViableAlt(self, s, input):
+ if self.recognizer._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ nvae = NoViableAltException(
+ self.getDescription(),
+ self.decisionNumber,
+ s,
+ input
+ )
+
+ self.error(nvae)
+ raise nvae
+
+
+ def error(self, nvae):
+ """A hook for debugging interface"""
+ pass
+
+
+ def specialStateTransition(self, s, input):
+ return -1
+
+
+ def getDescription(self):
+ return "n/a"
+
+
+## def specialTransition(self, state, symbol):
+## return 0
+
+
+ def unpack(cls, string):
+ """@brief Unpack the runlength encoded table data.
+
+ Terence implemented packed table initializers, because Java has a
+ size restriction on .class files and the lookup tables can grow
+ pretty large. The generated JavaLexer.java of the Java.g example
+ would be about 15MB with uncompressed array initializers.
+
+ Python does not have any size restrictions, but the compilation of
+ such large source files seems to be pretty memory hungry. The memory
+ consumption of the python process grew to >1.5GB when importing a
+ 15MB lexer, eating all my swap space and I was to impacient to see,
+ if it could finish at all. With packed initializers that are unpacked
+ at import time of the lexer module, everything works like a charm.
+
+ """
+
+ ret = []
+ for i in range(len(string) / 2):
+ (n, v) = ord(string[i*2]), ord(string[i*2+1])
+
+ # Is there a bitwise operation to do this?
+ if v == 0xFFFF:
+ v = -1
+
+ ret += [v] * n
+
+ return ret
+
+ unpack = classmethod(unpack)
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/dottreegen.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/dottreegen.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/dottreegen.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,210 @@
+""" @package antlr3.dottreegenerator
+ at brief ANTLR3 runtime package, tree module
+
+This module contains all support classes for AST construction and tree parsers.
+
+"""
+
+# begin[licence]
+#
+# [The "BSD licence"]
+# Copyright (c) 2005-2008 Terence Parr
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# end[licence]
+
+# lot's of docstrings are missing, don't complain for now...
+# pylint: disable-msg=C0111
+
+from antlr3.tree import CommonTreeAdaptor
+import stringtemplate3
+
+class DOTTreeGenerator(object):
+ """
+ A utility class to generate DOT diagrams (graphviz) from
+ arbitrary trees. You can pass in your own templates and
+ can pass in any kind of tree or use Tree interface method.
+ """
+
+ _treeST = stringtemplate3.StringTemplate(
+ template=(
+ "digraph {\n" +
+ " ordering=out;\n" +
+ " ranksep=.4;\n" +
+ " node [shape=plaintext, fixedsize=true, fontsize=11, fontname=\"Courier\",\n" +
+ " width=.25, height=.25];\n" +
+ " edge [arrowsize=.5]\n" +
+ " $nodes$\n" +
+ " $edges$\n" +
+ "}\n")
+ )
+
+ _nodeST = stringtemplate3.StringTemplate(
+ template="$name$ [label=\"$text$\"];\n"
+ )
+
+ _edgeST = stringtemplate3.StringTemplate(
+ template="$parent$ -> $child$ // \"$parentText$\" -> \"$childText$\"\n"
+ )
+
+ def __init__(self):
+ ## Track node to number mapping so we can get proper node name back
+ self.nodeToNumberMap = {}
+
+ ## Track node number so we can get unique node names
+ self.nodeNumber = 0
+
+
+ def toDOT(self, tree, adaptor=None, treeST=_treeST, edgeST=_edgeST):
+ if adaptor is None:
+ adaptor = CommonTreeAdaptor()
+
+ treeST = treeST.getInstanceOf()
+
+ self.nodeNumber = 0
+ self.toDOTDefineNodes(tree, adaptor, treeST)
+
+ self.nodeNumber = 0
+ self.toDOTDefineEdges(tree, adaptor, treeST, edgeST)
+ return treeST
+
+
+ def toDOTDefineNodes(self, tree, adaptor, treeST, knownNodes=None):
+ if knownNodes is None:
+ knownNodes = set()
+
+ if tree is None:
+ return
+
+ n = adaptor.getChildCount(tree)
+ if n == 0:
+ # must have already dumped as child from previous
+ # invocation; do nothing
+ return
+
+ # define parent node
+ number = self.getNodeNumber(tree)
+ if number not in knownNodes:
+ parentNodeST = self.getNodeST(adaptor, tree)
+ treeST.setAttribute("nodes", parentNodeST)
+ knownNodes.add(number)
+
+ # for each child, do a "<unique-name> [label=text]" node def
+ for i in range(n):
+ child = adaptor.getChild(tree, i)
+
+ number = self.getNodeNumber(child)
+ if number not in knownNodes:
+ nodeST = self.getNodeST(adaptor, child)
+ treeST.setAttribute("nodes", nodeST)
+ knownNodes.add(number)
+
+ self.toDOTDefineNodes(child, adaptor, treeST, knownNodes)
+
+
+ def toDOTDefineEdges(self, tree, adaptor, treeST, edgeST):
+ if tree is None:
+ return
+
+ n = adaptor.getChildCount(tree)
+ if n == 0:
+ # must have already dumped as child from previous
+ # invocation; do nothing
+ return
+
+ parentName = "n%d" % self.getNodeNumber(tree)
+
+ # for each child, do a parent -> child edge using unique node names
+ parentText = adaptor.getText(tree)
+ for i in range(n):
+ child = adaptor.getChild(tree, i)
+ childText = adaptor.getText(child)
+ childName = "n%d" % self.getNodeNumber(child)
+ edgeST = edgeST.getInstanceOf()
+ edgeST.setAttribute("parent", parentName)
+ edgeST.setAttribute("child", childName)
+ edgeST.setAttribute("parentText", parentText)
+ edgeST.setAttribute("childText", childText)
+ treeST.setAttribute("edges", edgeST)
+ self.toDOTDefineEdges(child, adaptor, treeST, edgeST)
+
+
+ def getNodeST(self, adaptor, t):
+ text = adaptor.getText(t)
+ nodeST = self._nodeST.getInstanceOf()
+ uniqueName = "n%d" % self.getNodeNumber(t)
+ nodeST.setAttribute("name", uniqueName)
+ if text is not None:
+ text = text.replace('"', r'\\"')
+ nodeST.setAttribute("text", text)
+ return nodeST
+
+
+ def getNodeNumber(self, t):
+ try:
+ return self.nodeToNumberMap[t]
+ except KeyError:
+ self.nodeToNumberMap[t] = self.nodeNumber
+ self.nodeNumber += 1
+ return self.nodeNumber - 1
+
+
+def toDOT(tree, adaptor=None, treeST=DOTTreeGenerator._treeST, edgeST=DOTTreeGenerator._edgeST):
+ """
+ Generate DOT (graphviz) for a whole tree not just a node.
+ For example, 3+4*5 should generate:
+
+ digraph {
+ node [shape=plaintext, fixedsize=true, fontsize=11, fontname="Courier",
+ width=.4, height=.2];
+ edge [arrowsize=.7]
+ "+"->3
+ "+"->"*"
+ "*"->4
+ "*"->5
+ }
+
+ Return the ST not a string in case people want to alter.
+
+ Takes a Tree interface object.
+
+ Example of invokation:
+
+ import antlr3
+ import antlr3.extras
+
+ input = antlr3.ANTLRInputStream(sys.stdin)
+ lex = TLexer(input)
+ tokens = antlr3.CommonTokenStream(lex)
+ parser = TParser(tokens)
+ tree = parser.e().tree
+ print tree.toStringTree()
+ st = antlr3.extras.toDOT(t)
+ print st
+
+ """
+
+ gen = DOTTreeGenerator()
+ return gen.toDOT(tree, adaptor, treeST, edgeST)
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/exceptions.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/exceptions.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/exceptions.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,364 @@
+"""ANTLR3 exception hierarchy"""
+
+# begin[licence]
+#
+# [The "BSD licence"]
+# Copyright (c) 2005-2008 Terence Parr
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# end[licence]
+
+from antlr3.constants import INVALID_TOKEN_TYPE
+
+
+class BacktrackingFailed(Exception):
+ """@brief Raised to signal failed backtrack attempt"""
+
+ pass
+
+
+class RecognitionException(Exception):
+ """@brief The root of the ANTLR exception hierarchy.
+
+ To avoid English-only error messages and to generally make things
+ as flexible as possible, these exceptions are not created with strings,
+ but rather the information necessary to generate an error. Then
+ the various reporting methods in Parser and Lexer can be overridden
+ to generate a localized error message. For example, MismatchedToken
+ exceptions are built with the expected token type.
+ So, don't expect getMessage() to return anything.
+
+ Note that as of Java 1.4, you can access the stack trace, which means
+ that you can compute the complete trace of rules from the start symbol.
+ This gives you considerable context information with which to generate
+ useful error messages.
+
+ ANTLR generates code that throws exceptions upon recognition error and
+ also generates code to catch these exceptions in each rule. If you
+ want to quit upon first error, you can turn off the automatic error
+ handling mechanism using rulecatch action, but you still need to
+ override methods mismatch and recoverFromMismatchSet.
+
+ In general, the recognition exceptions can track where in a grammar a
+ problem occurred and/or what was the expected input. While the parser
+ knows its state (such as current input symbol and line info) that
+ state can change before the exception is reported so current token index
+ is computed and stored at exception time. From this info, you can
+ perhaps print an entire line of input not just a single token, for example.
+ Better to just say the recognizer had a problem and then let the parser
+ figure out a fancy report.
+
+ """
+
+ def __init__(self, input=None):
+ Exception.__init__(self)
+
+ # What input stream did the error occur in?
+ self.input = None
+
+ # What is index of token/char were we looking at when the error
+ # occurred?
+ self.index = None
+
+ # The current Token when an error occurred. Since not all streams
+ # can retrieve the ith Token, we have to track the Token object.
+ # For parsers. Even when it's a tree parser, token might be set.
+ self.token = None
+
+ # If this is a tree parser exception, node is set to the node with
+ # the problem.
+ self.node = None
+
+ # The current char when an error occurred. For lexers.
+ self.c = None
+
+ # Track the line at which the error occurred in case this is
+ # generated from a lexer. We need to track this since the
+ # unexpected char doesn't carry the line info.
+ self.line = None
+
+ self.charPositionInLine = None
+
+ # If you are parsing a tree node stream, you will encounter som
+ # imaginary nodes w/o line/col info. We now search backwards looking
+ # for most recent token with line/col info, but notify getErrorHeader()
+ # that info is approximate.
+ self.approximateLineInfo = False
+
+
+ if input is not None:
+ self.input = input
+ self.index = input.index()
+
+ # late import to avoid cyclic dependencies
+ from antlr3.streams import TokenStream, CharStream
+ from antlr3.tree import TreeNodeStream
+
+ if isinstance(self.input, TokenStream):
+ self.token = self.input.LT(1)
+ self.line = self.token.line
+ self.charPositionInLine = self.token.charPositionInLine
+
+ if isinstance(self.input, TreeNodeStream):
+ self.extractInformationFromTreeNodeStream(self.input)
+
+ else:
+ if isinstance(self.input, CharStream):
+ self.c = self.input.LT(1)
+ self.line = self.input.line
+ self.charPositionInLine = self.input.charPositionInLine
+
+ else:
+ self.c = self.input.LA(1)
+
+ def extractInformationFromTreeNodeStream(self, nodes):
+ from antlr3.tree import Tree, CommonTree
+ from antlr3.tokens import CommonToken
+
+ self.node = nodes.LT(1)
+ adaptor = nodes.adaptor
+ payload = adaptor.getToken(self.node)
+ if payload is not None:
+ self.token = payload
+ if payload.line <= 0:
+ # imaginary node; no line/pos info; scan backwards
+ i = -1
+ priorNode = nodes.LT(i)
+ while priorNode is not None:
+ priorPayload = adaptor.getToken(priorNode)
+ if priorPayload is not None and priorPayload.line > 0:
+ # we found the most recent real line / pos info
+ self.line = priorPayload.line
+ self.charPositionInLine = priorPayload.charPositionInLine
+ self.approximateLineInfo = True
+ break
+
+ i -= 1
+ priorNode = nodes.LT(i)
+
+ else: # node created from real token
+ self.line = payload.line
+ self.charPositionInLine = payload.charPositionInLine
+
+ elif isinstance(self.node, Tree):
+ self.line = self.node.line
+ self.charPositionInLine = self.node.charPositionInLine
+ if isinstance(self.node, CommonTree):
+ self.token = self.node.token
+
+ else:
+ type = adaptor.getType(self.node)
+ text = adaptor.getText(self.node)
+ self.token = CommonToken(type=type, text=text)
+
+
+ def getUnexpectedType(self):
+ """Return the token type or char of the unexpected input element"""
+
+ from antlr3.streams import TokenStream
+ from antlr3.tree import TreeNodeStream
+
+ if isinstance(self.input, TokenStream):
+ return self.token.type
+
+ elif isinstance(self.input, TreeNodeStream):
+ adaptor = self.input.treeAdaptor
+ return adaptor.getType(self.node)
+
+ else:
+ return self.c
+
+ unexpectedType = property(getUnexpectedType)
+
+
+class MismatchedTokenException(RecognitionException):
+ """@brief A mismatched char or Token or tree node."""
+
+ def __init__(self, expecting, input):
+ RecognitionException.__init__(self, input)
+ self.expecting = expecting
+
+
+ def __str__(self):
+ #return "MismatchedTokenException("+self.expecting+")"
+ return "MismatchedTokenException(%r!=%r)" % (
+ self.getUnexpectedType(), self.expecting
+ )
+ __repr__ = __str__
+
+
+class UnwantedTokenException(MismatchedTokenException):
+ """An extra token while parsing a TokenStream"""
+
+ def getUnexpectedToken(self):
+ return self.token
+
+
+ def __str__(self):
+ exp = ", expected %s" % self.expecting
+ if self.expecting == INVALID_TOKEN_TYPE:
+ exp = ""
+
+ if self.token is None:
+ return "UnwantedTokenException(found=%s%s)" % (None, exp)
+
+ return "UnwantedTokenException(found=%s%s)" % (self.token.text, exp)
+ __repr__ = __str__
+
+
+class MissingTokenException(MismatchedTokenException):
+ """
+ We were expecting a token but it's not found. The current token
+ is actually what we wanted next.
+ """
+
+ def __init__(self, expecting, input, inserted):
+ MismatchedTokenException.__init__(self, expecting, input)
+
+ self.inserted = inserted
+
+
+ def getMissingType(self):
+ return self.expecting
+
+
+ def __str__(self):
+ if self.inserted is not None and self.token is not None:
+ return "MissingTokenException(inserted %r at %r)" % (
+ self.inserted, self.token.text)
+
+ if self.token is not None:
+ return "MissingTokenException(at %r)" % self.token.text
+
+ return "MissingTokenException"
+ __repr__ = __str__
+
+
+class MismatchedRangeException(RecognitionException):
+ """@brief The next token does not match a range of expected types."""
+
+ def __init__(self, a, b, input):
+ RecognitionException.__init__(self, input)
+
+ self.a = a
+ self.b = b
+
+
+ def __str__(self):
+ return "MismatchedRangeException(%r not in [%r..%r])" % (
+ self.getUnexpectedType(), self.a, self.b
+ )
+ __repr__ = __str__
+
+
+class MismatchedSetException(RecognitionException):
+ """@brief The next token does not match a set of expected types."""
+
+ def __init__(self, expecting, input):
+ RecognitionException.__init__(self, input)
+
+ self.expecting = expecting
+
+
+ def __str__(self):
+ return "MismatchedSetException(%r not in %r)" % (
+ self.getUnexpectedType(), self.expecting
+ )
+ __repr__ = __str__
+
+
+class MismatchedNotSetException(MismatchedSetException):
+ """@brief Used for remote debugger deserialization"""
+
+ def __str__(self):
+ return "MismatchedNotSetException(%r!=%r)" % (
+ self.getUnexpectedType(), self.expecting
+ )
+ __repr__ = __str__
+
+
+class NoViableAltException(RecognitionException):
+ """@brief Unable to decide which alternative to choose."""
+
+ def __init__(
+ self, grammarDecisionDescription, decisionNumber, stateNumber, input
+ ):
+ RecognitionException.__init__(self, input)
+
+ self.grammarDecisionDescription = grammarDecisionDescription
+ self.decisionNumber = decisionNumber
+ self.stateNumber = stateNumber
+
+
+ def __str__(self):
+ return "NoViableAltException(%r!=[%r])" % (
+ self.unexpectedType, self.grammarDecisionDescription
+ )
+ __repr__ = __str__
+
+
+class EarlyExitException(RecognitionException):
+ """@brief The recognizer did not match anything for a (..)+ loop."""
+
+ def __init__(self, decisionNumber, input):
+ RecognitionException.__init__(self, input)
+
+ self.decisionNumber = decisionNumber
+
+
+class FailedPredicateException(RecognitionException):
+ """@brief A semantic predicate failed during validation.
+
+ Validation of predicates
+ occurs when normally parsing the alternative just like matching a token.
+ Disambiguating predicate evaluation occurs when we hoist a predicate into
+ a prediction decision.
+ """
+
+ def __init__(self, input, ruleName, predicateText):
+ RecognitionException.__init__(self, input)
+
+ self.ruleName = ruleName
+ self.predicateText = predicateText
+
+
+ def __str__(self):
+ return "FailedPredicateException("+self.ruleName+",{"+self.predicateText+"}?)"
+ __repr__ = __str__
+
+
+class MismatchedTreeNodeException(RecognitionException):
+ """@brief The next tree mode does not match the expected type."""
+
+ def __init__(self, expecting, input):
+ RecognitionException.__init__(self, input)
+
+ self.expecting = expecting
+
+ def __str__(self):
+ return "MismatchedTreeNodeException(%r!=%r)" % (
+ self.getUnexpectedType(), self.expecting
+ )
+ __repr__ = __str__
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/extras.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/extras.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/extras.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,47 @@
+""" @package antlr3.dottreegenerator
+ at brief ANTLR3 runtime package, tree module
+
+This module contains all support classes for AST construction and tree parsers.
+
+"""
+
+# begin[licence]
+#
+# [The "BSD licence"]
+# Copyright (c) 2005-2008 Terence Parr
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# end[licence]
+
+# lot's of docstrings are missing, don't complain for now...
+# pylint: disable-msg=C0111
+
+from treewizard import TreeWizard
+
+try:
+ from antlr3.dottreegen import toDOT
+except ImportError, exc:
+ def toDOT(*args, **kwargs):
+ raise exc
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/main.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/main.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/main.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,307 @@
+"""ANTLR3 runtime package"""
+
+# begin[licence]
+#
+# [The "BSD licence"]
+# Copyright (c) 2005-2008 Terence Parr
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# end[licence]
+
+
+import sys
+import optparse
+
+import antlr3
+
+
+class _Main(object):
+ def __init__(self):
+ self.stdin = sys.stdin
+ self.stdout = sys.stdout
+ self.stderr = sys.stderr
+
+
+ def parseOptions(self, argv):
+ optParser = optparse.OptionParser()
+ optParser.add_option(
+ "--encoding",
+ action="store",
+ type="string",
+ dest="encoding"
+ )
+ optParser.add_option(
+ "--input",
+ action="store",
+ type="string",
+ dest="input"
+ )
+ optParser.add_option(
+ "--interactive", "-i",
+ action="store_true",
+ dest="interactive"
+ )
+ optParser.add_option(
+ "--no-output",
+ action="store_true",
+ dest="no_output"
+ )
+ optParser.add_option(
+ "--profile",
+ action="store_true",
+ dest="profile"
+ )
+ optParser.add_option(
+ "--hotshot",
+ action="store_true",
+ dest="hotshot"
+ )
+ optParser.add_option(
+ "--port",
+ type="int",
+ dest="port",
+ default=None
+ )
+ optParser.add_option(
+ "--debug-socket",
+ action='store_true',
+ dest="debug_socket",
+ default=None
+ )
+
+ self.setupOptions(optParser)
+
+ return optParser.parse_args(argv[1:])
+
+
+ def setupOptions(self, optParser):
+ pass
+
+
+ def execute(self, argv):
+ options, args = self.parseOptions(argv)
+
+ self.setUp(options)
+
+ if options.interactive:
+ while True:
+ try:
+ input = raw_input(">>> ")
+ except (EOFError, KeyboardInterrupt):
+ self.stdout.write("\nBye.\n")
+ break
+
+ inStream = antlr3.ANTLRStringStream(input)
+ self.parseStream(options, inStream)
+
+ else:
+ if options.input is not None:
+ inStream = antlr3.ANTLRStringStream(options.input)
+
+ elif len(args) == 1 and args[0] != '-':
+ inStream = antlr3.ANTLRFileStream(
+ args[0], encoding=options.encoding
+ )
+
+ else:
+ inStream = antlr3.ANTLRInputStream(
+ self.stdin, encoding=options.encoding
+ )
+
+ if options.profile:
+ try:
+ import cProfile as profile
+ except ImportError:
+ import profile
+
+ profile.runctx(
+ 'self.parseStream(options, inStream)',
+ globals(),
+ locals(),
+ 'profile.dat'
+ )
+
+ import pstats
+ stats = pstats.Stats('profile.dat')
+ stats.strip_dirs()
+ stats.sort_stats('time')
+ stats.print_stats(100)
+
+ elif options.hotshot:
+ import hotshot
+
+ profiler = hotshot.Profile('hotshot.dat')
+ profiler.runctx(
+ 'self.parseStream(options, inStream)',
+ globals(),
+ locals()
+ )
+
+ else:
+ self.parseStream(options, inStream)
+
+
+ def setUp(self, options):
+ pass
+
+
+ def parseStream(self, options, inStream):
+ raise NotImplementedError
+
+
+ def write(self, options, text):
+ if not options.no_output:
+ self.stdout.write(text)
+
+
+ def writeln(self, options, text):
+ self.write(options, text + '\n')
+
+
+class LexerMain(_Main):
+ def __init__(self, lexerClass):
+ _Main.__init__(self)
+
+ self.lexerClass = lexerClass
+
+
+ def parseStream(self, options, inStream):
+ lexer = self.lexerClass(inStream)
+ for token in lexer:
+ self.writeln(options, str(token))
+
+
+class ParserMain(_Main):
+ def __init__(self, lexerClassName, parserClass):
+ _Main.__init__(self)
+
+ self.lexerClassName = lexerClassName
+ self.lexerClass = None
+ self.parserClass = parserClass
+
+
+ def setupOptions(self, optParser):
+ optParser.add_option(
+ "--lexer",
+ action="store",
+ type="string",
+ dest="lexerClass",
+ default=self.lexerClassName
+ )
+ optParser.add_option(
+ "--rule",
+ action="store",
+ type="string",
+ dest="parserRule"
+ )
+
+
+ def setUp(self, options):
+ lexerMod = __import__(options.lexerClass)
+ self.lexerClass = getattr(lexerMod, options.lexerClass)
+
+
+ def parseStream(self, options, inStream):
+ kwargs = {}
+ if options.port is not None:
+ kwargs['port'] = options.port
+ if options.debug_socket is not None:
+ kwargs['debug_socket'] = sys.stderr
+
+ lexer = self.lexerClass(inStream)
+ tokenStream = antlr3.CommonTokenStream(lexer)
+ parser = self.parserClass(tokenStream, **kwargs)
+ result = getattr(parser, options.parserRule)()
+ if result is not None:
+ if hasattr(result, 'tree'):
+ if result.tree is not None:
+ self.writeln(options, result.tree.toStringTree())
+ else:
+ self.writeln(options, repr(result))
+
+
+class WalkerMain(_Main):
+ def __init__(self, walkerClass):
+ _Main.__init__(self)
+
+ self.lexerClass = None
+ self.parserClass = None
+ self.walkerClass = walkerClass
+
+
+ def setupOptions(self, optParser):
+ optParser.add_option(
+ "--lexer",
+ action="store",
+ type="string",
+ dest="lexerClass",
+ default=None
+ )
+ optParser.add_option(
+ "--parser",
+ action="store",
+ type="string",
+ dest="parserClass",
+ default=None
+ )
+ optParser.add_option(
+ "--parser-rule",
+ action="store",
+ type="string",
+ dest="parserRule",
+ default=None
+ )
+ optParser.add_option(
+ "--rule",
+ action="store",
+ type="string",
+ dest="walkerRule"
+ )
+
+
+ def setUp(self, options):
+ lexerMod = __import__(options.lexerClass)
+ self.lexerClass = getattr(lexerMod, options.lexerClass)
+ parserMod = __import__(options.parserClass)
+ self.parserClass = getattr(parserMod, options.parserClass)
+
+
+ def parseStream(self, options, inStream):
+ lexer = self.lexerClass(inStream)
+ tokenStream = antlr3.CommonTokenStream(lexer)
+ parser = self.parserClass(tokenStream)
+ result = getattr(parser, options.parserRule)()
+ if result is not None:
+ assert hasattr(result, 'tree'), "Parser did not return an AST"
+ nodeStream = antlr3.tree.CommonTreeNodeStream(result.tree)
+ nodeStream.setTokenStream(tokenStream)
+ walker = self.walkerClass(nodeStream)
+ result = getattr(walker, options.walkerRule)()
+ if result is not None:
+ if hasattr(result, 'tree'):
+ self.writeln(options, result.tree.toStringTree())
+ else:
+ self.writeln(options, repr(result))
+
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/recognizers.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/recognizers.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/recognizers.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,1487 @@
+"""ANTLR3 runtime package"""
+
+# begin[licence]
+#
+# [The "BSD licence"]
+# Copyright (c) 2005-2008 Terence Parr
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# end[licence]
+
+import sys
+import inspect
+
+from antlr3 import runtime_version, runtime_version_str
+from antlr3.constants import DEFAULT_CHANNEL, HIDDEN_CHANNEL, EOF, \
+ EOR_TOKEN_TYPE, INVALID_TOKEN_TYPE
+from antlr3.exceptions import RecognitionException, MismatchedTokenException, \
+ MismatchedRangeException, MismatchedTreeNodeException, \
+ NoViableAltException, EarlyExitException, MismatchedSetException, \
+ MismatchedNotSetException, FailedPredicateException, \
+ BacktrackingFailed, UnwantedTokenException, MissingTokenException
+from antlr3.tokens import CommonToken, EOF_TOKEN, SKIP_TOKEN
+from antlr3.compat import set, frozenset, reversed
+
+
+class RecognizerSharedState(object):
+ """
+ The set of fields needed by an abstract recognizer to recognize input
+ and recover from errors etc... As a separate state object, it can be
+ shared among multiple grammars; e.g., when one grammar imports another.
+
+ These fields are publically visible but the actual state pointer per
+ parser is protected.
+ """
+
+ def __init__(self):
+ # Track the set of token types that can follow any rule invocation.
+ # Stack grows upwards.
+ self.following = []
+
+ # This is true when we see an error and before having successfully
+ # matched a token. Prevents generation of more than one error message
+ # per error.
+ self.errorRecovery = False
+
+ # The index into the input stream where the last error occurred.
+ # This is used to prevent infinite loops where an error is found
+ # but no token is consumed during recovery...another error is found,
+ # ad naseum. This is a failsafe mechanism to guarantee that at least
+ # one token/tree node is consumed for two errors.
+ self.lastErrorIndex = -1
+
+ # If 0, no backtracking is going on. Safe to exec actions etc...
+ # If >0 then it's the level of backtracking.
+ self.backtracking = 0
+
+ # An array[size num rules] of Map<Integer,Integer> that tracks
+ # the stop token index for each rule. ruleMemo[ruleIndex] is
+ # the memoization table for ruleIndex. For key ruleStartIndex, you
+ # get back the stop token for associated rule or MEMO_RULE_FAILED.
+ #
+ # This is only used if rule memoization is on (which it is by default).
+ self.ruleMemo = None
+
+ ## Did the recognizer encounter a syntax error? Track how many.
+ self.syntaxErrors = 0
+
+
+ # LEXER FIELDS (must be in same state object to avoid casting
+ # constantly in generated code and Lexer object) :(
+
+
+ ## The goal of all lexer rules/methods is to create a token object.
+ # This is an instance variable as multiple rules may collaborate to
+ # create a single token. nextToken will return this object after
+ # matching lexer rule(s). If you subclass to allow multiple token
+ # emissions, then set this to the last token to be matched or
+ # something nonnull so that the auto token emit mechanism will not
+ # emit another token.
+ self.token = None
+
+ ## What character index in the stream did the current token start at?
+ # Needed, for example, to get the text for current token. Set at
+ # the start of nextToken.
+ self.tokenStartCharIndex = -1
+
+ ## The line on which the first character of the token resides
+ self.tokenStartLine = None
+
+ ## The character position of first character within the line
+ self.tokenStartCharPositionInLine = None
+
+ ## The channel number for the current token
+ self.channel = None
+
+ ## The token type for the current token
+ self.type = None
+
+ ## You can set the text for the current token to override what is in
+ # the input char buffer. Use setText() or can set this instance var.
+ self.text = None
+
+
+class BaseRecognizer(object):
+ """
+ @brief Common recognizer functionality.
+
+ A generic recognizer that can handle recognizers generated from
+ lexer, parser, and tree grammars. This is all the parsing
+ support code essentially; most of it is error recovery stuff and
+ backtracking.
+ """
+
+ MEMO_RULE_FAILED = -2
+ MEMO_RULE_UNKNOWN = -1
+
+ # copies from Token object for convenience in actions
+ DEFAULT_TOKEN_CHANNEL = DEFAULT_CHANNEL
+
+ # for convenience in actions
+ HIDDEN = HIDDEN_CHANNEL
+
+ # overridden by generated subclasses
+ tokenNames = None
+
+ # The antlr_version attribute has been introduced in 3.1. If it is not
+ # overwritten in the generated recognizer, we assume a default of 3.0.1.
+ antlr_version = (3, 0, 1, 0)
+ antlr_version_str = "3.0.1"
+
+ def __init__(self, state=None):
+ # Input stream of the recognizer. Must be initialized by a subclass.
+ self.input = None
+
+ ## State of a lexer, parser, or tree parser are collected into a state
+ # object so the state can be shared. This sharing is needed to
+ # have one grammar import others and share same error variables
+ # and other state variables. It's a kind of explicit multiple
+ # inheritance via delegation of methods and shared state.
+ if state is None:
+ state = RecognizerSharedState()
+ self._state = state
+
+ if self.antlr_version > runtime_version:
+ raise RuntimeError(
+ "ANTLR version mismatch: "
+ "The recognizer has been generated by V%s, but this runtime "
+ "is V%s. Please use the V%s runtime or higher."
+ % (self.antlr_version_str,
+ runtime_version_str,
+ self.antlr_version_str))
+ elif (self.antlr_version < (3, 1, 0, 0) and
+ self.antlr_version != runtime_version):
+ # FIXME: make the runtime compatible with 3.0.1 codegen
+ # and remove this block.
+ raise RuntimeError(
+ "ANTLR version mismatch: "
+ "The recognizer has been generated by V%s, but this runtime "
+ "is V%s. Please use the V%s runtime."
+ % (self.antlr_version_str,
+ runtime_version_str,
+ self.antlr_version_str))
+
+ # this one only exists to shut up pylint :(
+ def setInput(self, input):
+ self.input = input
+
+
+ def reset(self):
+ """
+ reset the parser's state; subclasses must rewinds the input stream
+ """
+
+ # wack everything related to error recovery
+ if self._state is None:
+ # no shared state work to do
+ return
+
+ self._state.following = []
+ self._state.errorRecovery = False
+ self._state.lastErrorIndex = -1
+ self._state.syntaxErrors = 0
+ # wack everything related to backtracking and memoization
+ self._state.backtracking = 0
+ if self._state.ruleMemo is not None:
+ self._state.ruleMemo = {}
+
+
+ def match(self, input, ttype, follow):
+ """
+ Match current input symbol against ttype. Attempt
+ single token insertion or deletion error recovery. If
+ that fails, throw MismatchedTokenException.
+
+ To turn off single token insertion or deletion error
+ recovery, override recoverFromMismatchedToken() and have it
+ throw an exception. See TreeParser.recoverFromMismatchedToken().
+ This way any error in a rule will cause an exception and
+ immediate exit from rule. Rule would recover by resynchronizing
+ to the set of symbols that can follow rule ref.
+ """
+
+ matchedSymbol = self.getCurrentInputSymbol(input)
+ if self.input.LA(1) == ttype:
+ self.input.consume()
+ self._state.errorRecovery = False
+ return matchedSymbol
+
+ if self._state.backtracking > 0:
+ # FIXME: need to return matchedSymbol here as well. damn!!
+ raise BacktrackingFailed
+
+ matchedSymbol = self.recoverFromMismatchedToken(input, ttype, follow)
+ return matchedSymbol
+
+
+ def matchAny(self, input):
+ """Match the wildcard: in a symbol"""
+
+ self._state.errorRecovery = False
+ self.input.consume()
+
+
+ def mismatchIsUnwantedToken(self, input, ttype):
+ return input.LA(2) == ttype
+
+
+ def mismatchIsMissingToken(self, input, follow):
+ if follow is None:
+ # we have no information about the follow; we can only consume
+ # a single token and hope for the best
+ return False
+
+ # compute what can follow this grammar element reference
+ if EOR_TOKEN_TYPE in follow:
+ viableTokensFollowingThisRule = self.computeContextSensitiveRuleFOLLOW()
+ follow = follow | viableTokensFollowingThisRule
+
+ if len(self._state.following) > 0:
+ # remove EOR if we're not the start symbol
+ follow = follow - set([EOR_TOKEN_TYPE])
+
+ # if current token is consistent with what could come after set
+ # then we know we're missing a token; error recovery is free to
+ # "insert" the missing token
+ if input.LA(1) in follow or EOR_TOKEN_TYPE in follow:
+ return True
+
+ return False
+
+
+ def reportError(self, e):
+ """Report a recognition problem.
+
+ This method sets errorRecovery to indicate the parser is recovering
+ not parsing. Once in recovery mode, no errors are generated.
+ To get out of recovery mode, the parser must successfully match
+ a token (after a resync). So it will go:
+
+ 1. error occurs
+ 2. enter recovery mode, report error
+ 3. consume until token found in resynch set
+ 4. try to resume parsing
+ 5. next match() will reset errorRecovery mode
+
+ If you override, make sure to update syntaxErrors if you care about
+ that.
+
+ """
+
+ # if we've already reported an error and have not matched a token
+ # yet successfully, don't report any errors.
+ if self._state.errorRecovery:
+ return
+
+ self._state.syntaxErrors += 1 # don't count spurious
+ self._state.errorRecovery = True
+
+ self.displayRecognitionError(self.tokenNames, e)
+
+
+ def displayRecognitionError(self, tokenNames, e):
+ hdr = self.getErrorHeader(e)
+ msg = self.getErrorMessage(e, tokenNames)
+ self.emitErrorMessage(hdr+" "+msg)
+
+
+ def getErrorMessage(self, e, tokenNames):
+ """
+ What error message should be generated for the various
+ exception types?
+
+ Not very object-oriented code, but I like having all error message
+ generation within one method rather than spread among all of the
+ exception classes. This also makes it much easier for the exception
+ handling because the exception classes do not have to have pointers back
+ to this object to access utility routines and so on. Also, changing
+ the message for an exception type would be difficult because you
+ would have to subclassing exception, but then somehow get ANTLR
+ to make those kinds of exception objects instead of the default.
+ This looks weird, but trust me--it makes the most sense in terms
+ of flexibility.
+
+ For grammar debugging, you will want to override this to add
+ more information such as the stack frame with
+ getRuleInvocationStack(e, this.getClass().getName()) and,
+ for no viable alts, the decision description and state etc...
+
+ Override this to change the message generated for one or more
+ exception types.
+ """
+
+ if isinstance(e, UnwantedTokenException):
+ tokenName = "<unknown>"
+ if e.expecting == EOF:
+ tokenName = "EOF"
+
+ else:
+ tokenName = self.tokenNames[e.expecting]
+
+ msg = "extraneous input %s expecting %s" % (
+ self.getTokenErrorDisplay(e.getUnexpectedToken()),
+ tokenName
+ )
+
+ elif isinstance(e, MissingTokenException):
+ tokenName = "<unknown>"
+ if e.expecting == EOF:
+ tokenName = "EOF"
+
+ else:
+ tokenName = self.tokenNames[e.expecting]
+
+ msg = "missing %s at %s" % (
+ tokenName, self.getTokenErrorDisplay(e.token)
+ )
+
+ elif isinstance(e, MismatchedTokenException):
+ tokenName = "<unknown>"
+ if e.expecting == EOF:
+ tokenName = "EOF"
+ else:
+ tokenName = self.tokenNames[e.expecting]
+
+ msg = "mismatched input " \
+ + self.getTokenErrorDisplay(e.token) \
+ + " expecting " \
+ + tokenName
+
+ elif isinstance(e, MismatchedTreeNodeException):
+ tokenName = "<unknown>"
+ if e.expecting == EOF:
+ tokenName = "EOF"
+ else:
+ tokenName = self.tokenNames[e.expecting]
+
+ msg = "mismatched tree node: %s expecting %s" \
+ % (e.node, tokenName)
+
+ elif isinstance(e, NoViableAltException):
+ msg = "no viable alternative at input " \
+ + self.getTokenErrorDisplay(e.token)
+
+ elif isinstance(e, EarlyExitException):
+ msg = "required (...)+ loop did not match anything at input " \
+ + self.getTokenErrorDisplay(e.token)
+
+ elif isinstance(e, MismatchedSetException):
+ msg = "mismatched input " \
+ + self.getTokenErrorDisplay(e.token) \
+ + " expecting set " \
+ + repr(e.expecting)
+
+ elif isinstance(e, MismatchedNotSetException):
+ msg = "mismatched input " \
+ + self.getTokenErrorDisplay(e.token) \
+ + " expecting set " \
+ + repr(e.expecting)
+
+ elif isinstance(e, FailedPredicateException):
+ msg = "rule " \
+ + e.ruleName \
+ + " failed predicate: {" \
+ + e.predicateText \
+ + "}?"
+
+ else:
+ msg = str(e)
+
+ return msg
+
+
+ def getNumberOfSyntaxErrors(self):
+ """
+ Get number of recognition errors (lexer, parser, tree parser). Each
+ recognizer tracks its own number. So parser and lexer each have
+ separate count. Does not count the spurious errors found between
+ an error and next valid token match
+
+ See also reportError()
+ """
+ return self._state.syntaxErrors
+
+
+ def getErrorHeader(self, e):
+ """
+ What is the error header, normally line/character position information?
+ """
+
+ return "line %d:%d" % (e.line, e.charPositionInLine)
+
+
+ def getTokenErrorDisplay(self, t):
+ """
+ How should a token be displayed in an error message? The default
+ is to display just the text, but during development you might
+ want to have a lot of information spit out. Override in that case
+ to use t.toString() (which, for CommonToken, dumps everything about
+ the token). This is better than forcing you to override a method in
+ your token objects because you don't have to go modify your lexer
+ so that it creates a new Java type.
+ """
+
+ s = t.text
+ if s is None:
+ if t.type == EOF:
+ s = "<EOF>"
+ else:
+ s = "<"+t.type+">"
+
+ return repr(s)
+
+
+ def emitErrorMessage(self, msg):
+ """Override this method to change where error messages go"""
+ sys.stderr.write(msg + '\n')
+
+
+ def recover(self, input, re):
+ """
+ Recover from an error found on the input stream. This is
+ for NoViableAlt and mismatched symbol exceptions. If you enable
+ single token insertion and deletion, this will usually not
+ handle mismatched symbol exceptions but there could be a mismatched
+ token that the match() routine could not recover from.
+ """
+
+ # PROBLEM? what if input stream is not the same as last time
+ # perhaps make lastErrorIndex a member of input
+ if self._state.lastErrorIndex == input.index():
+ # uh oh, another error at same token index; must be a case
+ # where LT(1) is in the recovery token set so nothing is
+ # consumed; consume a single token so at least to prevent
+ # an infinite loop; this is a failsafe.
+ input.consume()
+
+ self._state.lastErrorIndex = input.index()
+ followSet = self.computeErrorRecoverySet()
+
+ self.beginResync()
+ self.consumeUntil(input, followSet)
+ self.endResync()
+
+
+ def beginResync(self):
+ """
+ A hook to listen in on the token consumption during error recovery.
+ The DebugParser subclasses this to fire events to the listenter.
+ """
+
+ pass
+
+
+ def endResync(self):
+ """
+ A hook to listen in on the token consumption during error recovery.
+ The DebugParser subclasses this to fire events to the listenter.
+ """
+
+ pass
+
+
+ def computeErrorRecoverySet(self):
+ """
+ Compute the error recovery set for the current rule. During
+ rule invocation, the parser pushes the set of tokens that can
+ follow that rule reference on the stack; this amounts to
+ computing FIRST of what follows the rule reference in the
+ enclosing rule. This local follow set only includes tokens
+ from within the rule; i.e., the FIRST computation done by
+ ANTLR stops at the end of a rule.
+
+ EXAMPLE
+
+ When you find a "no viable alt exception", the input is not
+ consistent with any of the alternatives for rule r. The best
+ thing to do is to consume tokens until you see something that
+ can legally follow a call to r *or* any rule that called r.
+ You don't want the exact set of viable next tokens because the
+ input might just be missing a token--you might consume the
+ rest of the input looking for one of the missing tokens.
+
+ Consider grammar:
+
+ a : '[' b ']'
+ | '(' b ')'
+ ;
+ b : c '^' INT ;
+ c : ID
+ | INT
+ ;
+
+ At each rule invocation, the set of tokens that could follow
+ that rule is pushed on a stack. Here are the various "local"
+ follow sets:
+
+ FOLLOW(b1_in_a) = FIRST(']') = ']'
+ FOLLOW(b2_in_a) = FIRST(')') = ')'
+ FOLLOW(c_in_b) = FIRST('^') = '^'
+
+ Upon erroneous input "[]", the call chain is
+
+ a -> b -> c
+
+ and, hence, the follow context stack is:
+
+ depth local follow set after call to rule
+ 0 \<EOF> a (from main())
+ 1 ']' b
+ 3 '^' c
+
+ Notice that ')' is not included, because b would have to have
+ been called from a different context in rule a for ')' to be
+ included.
+
+ For error recovery, we cannot consider FOLLOW(c)
+ (context-sensitive or otherwise). We need the combined set of
+ all context-sensitive FOLLOW sets--the set of all tokens that
+ could follow any reference in the call chain. We need to
+ resync to one of those tokens. Note that FOLLOW(c)='^' and if
+ we resync'd to that token, we'd consume until EOF. We need to
+ sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}.
+ In this case, for input "[]", LA(1) is in this set so we would
+ not consume anything and after printing an error rule c would
+ return normally. It would not find the required '^' though.
+ At this point, it gets a mismatched token error and throws an
+ exception (since LA(1) is not in the viable following token
+ set). The rule exception handler tries to recover, but finds
+ the same recovery set and doesn't consume anything. Rule b
+ exits normally returning to rule a. Now it finds the ']' (and
+ with the successful match exits errorRecovery mode).
+
+ So, you cna see that the parser walks up call chain looking
+ for the token that was a member of the recovery set.
+
+ Errors are not generated in errorRecovery mode.
+
+ ANTLR's error recovery mechanism is based upon original ideas:
+
+ "Algorithms + Data Structures = Programs" by Niklaus Wirth
+
+ and
+
+ "A note on error recovery in recursive descent parsers":
+ http://portal.acm.org/citation.cfm?id=947902.947905
+
+ Later, Josef Grosch had some good ideas:
+
+ "Efficient and Comfortable Error Recovery in Recursive Descent
+ Parsers":
+ ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip
+
+ Like Grosch I implemented local FOLLOW sets that are combined
+ at run-time upon error to avoid overhead during parsing.
+ """
+
+ return self.combineFollows(False)
+
+
+ def computeContextSensitiveRuleFOLLOW(self):
+ """
+ Compute the context-sensitive FOLLOW set for current rule.
+ This is set of token types that can follow a specific rule
+ reference given a specific call chain. You get the set of
+ viable tokens that can possibly come next (lookahead depth 1)
+ given the current call chain. Contrast this with the
+ definition of plain FOLLOW for rule r:
+
+ FOLLOW(r)={x | S=>*alpha r beta in G and x in FIRST(beta)}
+
+ where x in T* and alpha, beta in V*; T is set of terminals and
+ V is the set of terminals and nonterminals. In other words,
+ FOLLOW(r) is the set of all tokens that can possibly follow
+ references to r in *any* sentential form (context). At
+ runtime, however, we know precisely which context applies as
+ we have the call chain. We may compute the exact (rather
+ than covering superset) set of following tokens.
+
+ For example, consider grammar:
+
+ stat : ID '=' expr ';' // FOLLOW(stat)=={EOF}
+ | "return" expr '.'
+ ;
+ expr : atom ('+' atom)* ; // FOLLOW(expr)=={';','.',')'}
+ atom : INT // FOLLOW(atom)=={'+',')',';','.'}
+ | '(' expr ')'
+ ;
+
+ The FOLLOW sets are all inclusive whereas context-sensitive
+ FOLLOW sets are precisely what could follow a rule reference.
+ For input input "i=(3);", here is the derivation:
+
+ stat => ID '=' expr ';'
+ => ID '=' atom ('+' atom)* ';'
+ => ID '=' '(' expr ')' ('+' atom)* ';'
+ => ID '=' '(' atom ')' ('+' atom)* ';'
+ => ID '=' '(' INT ')' ('+' atom)* ';'
+ => ID '=' '(' INT ')' ';'
+
+ At the "3" token, you'd have a call chain of
+
+ stat -> expr -> atom -> expr -> atom
+
+ What can follow that specific nested ref to atom? Exactly ')'
+ as you can see by looking at the derivation of this specific
+ input. Contrast this with the FOLLOW(atom)={'+',')',';','.'}.
+
+ You want the exact viable token set when recovering from a
+ token mismatch. Upon token mismatch, if LA(1) is member of
+ the viable next token set, then you know there is most likely
+ a missing token in the input stream. "Insert" one by just not
+ throwing an exception.
+ """
+
+ return self.combineFollows(True)
+
+
+ def combineFollows(self, exact):
+ followSet = set()
+ for idx, localFollowSet in reversed(list(enumerate(self._state.following))):
+ followSet |= localFollowSet
+ if exact:
+ # can we see end of rule?
+ if EOR_TOKEN_TYPE in localFollowSet:
+ # Only leave EOR in set if at top (start rule); this lets
+ # us know if have to include follow(start rule); i.e., EOF
+ if idx > 0:
+ followSet.remove(EOR_TOKEN_TYPE)
+
+ else:
+ # can't see end of rule, quit
+ break
+
+ return followSet
+
+
+ def recoverFromMismatchedToken(self, input, ttype, follow):
+ """Attempt to recover from a single missing or extra token.
+
+ EXTRA TOKEN
+
+ LA(1) is not what we are looking for. If LA(2) has the right token,
+ however, then assume LA(1) is some extra spurious token. Delete it
+ and LA(2) as if we were doing a normal match(), which advances the
+ input.
+
+ MISSING TOKEN
+
+ If current token is consistent with what could come after
+ ttype then it is ok to 'insert' the missing token, else throw
+ exception For example, Input 'i=(3;' is clearly missing the
+ ')'. When the parser returns from the nested call to expr, it
+ will have call chain:
+
+ stat -> expr -> atom
+
+ and it will be trying to match the ')' at this point in the
+ derivation:
+
+ => ID '=' '(' INT ')' ('+' atom)* ';'
+ ^
+ match() will see that ';' doesn't match ')' and report a
+ mismatched token error. To recover, it sees that LA(1)==';'
+ is in the set of tokens that can follow the ')' token
+ reference in rule atom. It can assume that you forgot the ')'.
+ """
+
+ e = None
+
+ # if next token is what we are looking for then "delete" this token
+ if self.mismatchIsUnwantedToken(input, ttype):
+ e = UnwantedTokenException(ttype, input)
+
+ self.beginResync()
+ input.consume() # simply delete extra token
+ self.endResync()
+
+ # report after consuming so AW sees the token in the exception
+ self.reportError(e)
+
+ # we want to return the token we're actually matching
+ matchedSymbol = self.getCurrentInputSymbol(input)
+
+ # move past ttype token as if all were ok
+ input.consume()
+ return matchedSymbol
+
+ # can't recover with single token deletion, try insertion
+ if self.mismatchIsMissingToken(input, follow):
+ inserted = self.getMissingSymbol(input, e, ttype, follow)
+ e = MissingTokenException(ttype, input, inserted)
+
+ # report after inserting so AW sees the token in the exception
+ self.reportError(e)
+ return inserted
+
+ # even that didn't work; must throw the exception
+ e = MismatchedTokenException(ttype, input)
+ raise e
+
+
+ def recoverFromMismatchedSet(self, input, e, follow):
+ """Not currently used"""
+
+ if self.mismatchIsMissingToken(input, follow):
+ self.reportError(e)
+ # we don't know how to conjure up a token for sets yet
+ return self.getMissingSymbol(input, e, INVALID_TOKEN_TYPE, follow)
+
+ # TODO do single token deletion like above for Token mismatch
+ raise e
+
+
+ def getCurrentInputSymbol(self, input):
+ """
+ Match needs to return the current input symbol, which gets put
+ into the label for the associated token ref; e.g., x=ID. Token
+ and tree parsers need to return different objects. Rather than test
+ for input stream type or change the IntStream interface, I use
+ a simple method to ask the recognizer to tell me what the current
+ input symbol is.
+
+ This is ignored for lexers.
+ """
+
+ return None
+
+
+ def getMissingSymbol(self, input, e, expectedTokenType, follow):
+ """Conjure up a missing token during error recovery.
+
+ The recognizer attempts to recover from single missing
+ symbols. But, actions might refer to that missing symbol.
+ For example, x=ID {f($x);}. The action clearly assumes
+ that there has been an identifier matched previously and that
+ $x points at that token. If that token is missing, but
+ the next token in the stream is what we want we assume that
+ this token is missing and we keep going. Because we
+ have to return some token to replace the missing token,
+ we have to conjure one up. This method gives the user control
+ over the tokens returned for missing tokens. Mostly,
+ you will want to create something special for identifier
+ tokens. For literals such as '{' and ',', the default
+ action in the parser or tree parser works. It simply creates
+ a CommonToken of the appropriate type. The text will be the token.
+ If you change what tokens must be created by the lexer,
+ override this method to create the appropriate tokens.
+ """
+
+ return None
+
+
+## def recoverFromMissingElement(self, input, e, follow):
+## """
+## This code is factored out from mismatched token and mismatched set
+## recovery. It handles "single token insertion" error recovery for
+## both. No tokens are consumed to recover from insertions. Return
+## true if recovery was possible else return false.
+## """
+
+## if self.mismatchIsMissingToken(input, follow):
+## self.reportError(e)
+## return True
+
+## # nothing to do; throw exception
+## return False
+
+
+ def consumeUntil(self, input, tokenTypes):
+ """
+ Consume tokens until one matches the given token or token set
+
+ tokenTypes can be a single token type or a set of token types
+
+ """
+
+ if not isinstance(tokenTypes, (set, frozenset)):
+ tokenTypes = frozenset([tokenTypes])
+
+ ttype = input.LA(1)
+ while ttype != EOF and ttype not in tokenTypes:
+ input.consume()
+ ttype = input.LA(1)
+
+
+ def getRuleInvocationStack(self):
+ """
+ Return List<String> of the rules in your parser instance
+ leading up to a call to this method. You could override if
+ you want more details such as the file/line info of where
+ in the parser java code a rule is invoked.
+
+ This is very useful for error messages and for context-sensitive
+ error recovery.
+
+ You must be careful, if you subclass a generated recognizers.
+ The default implementation will only search the module of self
+ for rules, but the subclass will not contain any rules.
+ You probably want to override this method to look like
+
+ def getRuleInvocationStack(self):
+ return self._getRuleInvocationStack(<class>.__module__)
+
+ where <class> is the class of the generated recognizer, e.g.
+ the superclass of self.
+ """
+
+ return self._getRuleInvocationStack(self.__module__)
+
+
+ def _getRuleInvocationStack(cls, module):
+ """
+ A more general version of getRuleInvocationStack where you can
+ pass in, for example, a RecognitionException to get it's rule
+ stack trace. This routine is shared with all recognizers, hence,
+ static.
+
+ TODO: move to a utility class or something; weird having lexer call
+ this
+ """
+
+ # mmmhhh,... perhaps look at the first argument
+ # (f_locals[co_varnames[0]]?) and test if it's a (sub)class of
+ # requested recognizer...
+
+ rules = []
+ for frame in reversed(inspect.stack()):
+ code = frame[0].f_code
+ codeMod = inspect.getmodule(code)
+ if codeMod is None:
+ continue
+
+ # skip frames not in requested module
+ if codeMod.__name__ != module:
+ continue
+
+ # skip some unwanted names
+ if code.co_name in ('nextToken', '<module>'):
+ continue
+
+ rules.append(code.co_name)
+
+ return rules
+
+ _getRuleInvocationStack = classmethod(_getRuleInvocationStack)
+
+
+ def getBacktrackingLevel(self):
+ return self._state.backtracking
+
+ def setBacktrackingLevel(self, n):
+ self._state.backtracking = n
+
+
+ def failed(self):
+ """Return whether or not a backtracking attempt failed."""
+
+ return self._state.failed
+
+
+ def getGrammarFileName(self):
+ """For debugging and other purposes, might want the grammar name.
+
+ Have ANTLR generate an implementation for this method.
+ """
+
+ return self.grammarFileName
+
+
+ def getSourceName(self):
+ raise NotImplementedError
+
+
+ def toStrings(self, tokens):
+ """A convenience method for use most often with template rewrites.
+
+ Convert a List<Token> to List<String>
+ """
+
+ if tokens is None:
+ return None
+
+ return [token.text for token in tokens]
+
+
+ def getRuleMemoization(self, ruleIndex, ruleStartIndex):
+ """
+ Given a rule number and a start token index number, return
+ MEMO_RULE_UNKNOWN if the rule has not parsed input starting from
+ start index. If this rule has parsed input starting from the
+ start index before, then return where the rule stopped parsing.
+ It returns the index of the last token matched by the rule.
+ """
+
+ if ruleIndex not in self._state.ruleMemo:
+ self._state.ruleMemo[ruleIndex] = {}
+
+ return self._state.ruleMemo[ruleIndex].get(
+ ruleStartIndex, self.MEMO_RULE_UNKNOWN
+ )
+
+
+ def alreadyParsedRule(self, input, ruleIndex):
+ """
+ Has this rule already parsed input at the current index in the
+ input stream? Return the stop token index or MEMO_RULE_UNKNOWN.
+ If we attempted but failed to parse properly before, return
+ MEMO_RULE_FAILED.
+
+ This method has a side-effect: if we have seen this input for
+ this rule and successfully parsed before, then seek ahead to
+ 1 past the stop token matched for this rule last time.
+ """
+
+ stopIndex = self.getRuleMemoization(ruleIndex, input.index())
+ if stopIndex == self.MEMO_RULE_UNKNOWN:
+ return False
+
+ if stopIndex == self.MEMO_RULE_FAILED:
+ raise BacktrackingFailed
+
+ else:
+ input.seek(stopIndex + 1)
+
+ return True
+
+
+ def memoize(self, input, ruleIndex, ruleStartIndex, success):
+ """
+ Record whether or not this rule parsed the input at this position
+ successfully.
+ """
+
+ if success:
+ stopTokenIndex = input.index() - 1
+ else:
+ stopTokenIndex = self.MEMO_RULE_FAILED
+
+ if ruleIndex in self._state.ruleMemo:
+ self._state.ruleMemo[ruleIndex][ruleStartIndex] = stopTokenIndex
+
+
+ def traceIn(self, ruleName, ruleIndex, inputSymbol):
+ sys.stdout.write("enter %s %s" % (ruleName, inputSymbol))
+
+ if self._state.backtracking > 0:
+ sys.stdout.write(" backtracking=%s" % self._state.backtracking)
+
+ sys.stdout.write('\n')
+
+
+ def traceOut(self, ruleName, ruleIndex, inputSymbol):
+ sys.stdout.write("exit %s %s" % (ruleName, inputSymbol))
+
+ if self._state.backtracking > 0:
+ sys.stdout.write(" backtracking=%s" % self._state.backtracking)
+
+ if self._state.failed:
+ sys.stdout.write(" failed")
+ else:
+ sys.stdout.write(" succeeded")
+
+ sys.stdout.write('\n')
+
+
+class TokenSource(object):
+ """
+ @brief Abstract baseclass for token producers.
+
+ A source of tokens must provide a sequence of tokens via nextToken()
+ and also must reveal it's source of characters; CommonToken's text is
+ computed from a CharStream; it only store indices into the char stream.
+
+ Errors from the lexer are never passed to the parser. Either you want
+ to keep going or you do not upon token recognition error. If you do not
+ want to continue lexing then you do not want to continue parsing. Just
+ throw an exception not under RecognitionException and Java will naturally
+ toss you all the way out of the recognizers. If you want to continue
+ lexing then you should not throw an exception to the parser--it has already
+ requested a token. Keep lexing until you get a valid one. Just report
+ errors and keep going, looking for a valid token.
+ """
+
+ def nextToken(self):
+ """Return a Token object from your input stream (usually a CharStream).
+
+ Do not fail/return upon lexing error; keep chewing on the characters
+ until you get a good one; errors are not passed through to the parser.
+ """
+
+ raise NotImplementedError
+
+
+ def __iter__(self):
+ """The TokenSource is an interator.
+
+ The iteration will not include the final EOF token, see also the note
+ for the next() method.
+
+ """
+
+ return self
+
+
+ def next(self):
+ """Return next token or raise StopIteration.
+
+ Note that this will raise StopIteration when hitting the EOF token,
+ so EOF will not be part of the iteration.
+
+ """
+
+ token = self.nextToken()
+ if token is None or token.type == EOF:
+ raise StopIteration
+ return token
+
+
+class Lexer(BaseRecognizer, TokenSource):
+ """
+ @brief Baseclass for generated lexer classes.
+
+ A lexer is recognizer that draws input symbols from a character stream.
+ lexer grammars result in a subclass of this object. A Lexer object
+ uses simplified match() and error recovery mechanisms in the interest
+ of speed.
+ """
+
+ def __init__(self, input, state=None):
+ BaseRecognizer.__init__(self, state)
+ TokenSource.__init__(self)
+
+ # Where is the lexer drawing characters from?
+ self.input = input
+
+
+ def reset(self):
+ BaseRecognizer.reset(self) # reset all recognizer state variables
+
+ if self.input is not None:
+ # rewind the input
+ self.input.seek(0)
+
+ if self._state is None:
+ # no shared state work to do
+ return
+
+ # wack Lexer state variables
+ self._state.token = None
+ self._state.type = INVALID_TOKEN_TYPE
+ self._state.channel = DEFAULT_CHANNEL
+ self._state.tokenStartCharIndex = -1
+ self._state.tokenStartLine = -1
+ self._state.tokenStartCharPositionInLine = -1
+ self._state.text = None
+
+
+ def nextToken(self):
+ """
+ Return a token from this source; i.e., match a token on the char
+ stream.
+ """
+
+ while 1:
+ self._state.token = None
+ self._state.channel = DEFAULT_CHANNEL
+ self._state.tokenStartCharIndex = self.input.index()
+ self._state.tokenStartCharPositionInLine = self.input.charPositionInLine
+ self._state.tokenStartLine = self.input.line
+ self._state.text = None
+ if self.input.LA(1) == EOF:
+ return EOF_TOKEN
+
+ try:
+ self.mTokens()
+
+ if self._state.token is None:
+ self.emit()
+
+ elif self._state.token == SKIP_TOKEN:
+ continue
+
+ return self._state.token
+
+ except NoViableAltException, re:
+ self.reportError(re)
+ self.recover(re) # throw out current char and try again
+
+ except RecognitionException, re:
+ self.reportError(re)
+ # match() routine has already called recover()
+
+
+ def skip(self):
+ """
+ Instruct the lexer to skip creating a token for current lexer rule
+ and look for another token. nextToken() knows to keep looking when
+ a lexer rule finishes with token set to SKIP_TOKEN. Recall that
+ if token==null at end of any token rule, it creates one for you
+ and emits it.
+ """
+
+ self._state.token = SKIP_TOKEN
+
+
+ def mTokens(self):
+ """This is the lexer entry point that sets instance var 'token'"""
+
+ # abstract method
+ raise NotImplementedError
+
+
+ def setCharStream(self, input):
+ """Set the char stream and reset the lexer"""
+ self.input = None
+ self.reset()
+ self.input = input
+
+
+ def getSourceName(self):
+ return self.input.getSourceName()
+
+
+ def emit(self, token=None):
+ """
+ The standard method called to automatically emit a token at the
+ outermost lexical rule. The token object should point into the
+ char buffer start..stop. If there is a text override in 'text',
+ use that to set the token's text. Override this method to emit
+ custom Token objects.
+
+ If you are building trees, then you should also override
+ Parser or TreeParser.getMissingSymbol().
+ """
+
+ if token is None:
+ token = CommonToken(
+ input=self.input,
+ type=self._state.type,
+ channel=self._state.channel,
+ start=self._state.tokenStartCharIndex,
+ stop=self.getCharIndex()-1
+ )
+ token.line = self._state.tokenStartLine
+ token.text = self._state.text
+ token.charPositionInLine = self._state.tokenStartCharPositionInLine
+
+ self._state.token = token
+
+ return token
+
+
+ def match(self, s):
+ if isinstance(s, basestring):
+ for c in s:
+ if self.input.LA(1) != ord(c):
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mte = MismatchedTokenException(c, self.input)
+ self.recover(mte)
+ raise mte
+
+ self.input.consume()
+
+ else:
+ if self.input.LA(1) != s:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mte = MismatchedTokenException(unichr(s), self.input)
+ self.recover(mte) # don't really recover; just consume in lexer
+ raise mte
+
+ self.input.consume()
+
+
+ def matchAny(self):
+ self.input.consume()
+
+
+ def matchRange(self, a, b):
+ if self.input.LA(1) < a or self.input.LA(1) > b:
+ if self._state.backtracking > 0:
+ raise BacktrackingFailed
+
+ mre = MismatchedRangeException(unichr(a), unichr(b), self.input)
+ self.recover(mre)
+ raise mre
+
+ self.input.consume()
+
+
+ def getLine(self):
+ return self.input.line
+
+
+ def getCharPositionInLine(self):
+ return self.input.charPositionInLine
+
+
+ def getCharIndex(self):
+ """What is the index of the current character of lookahead?"""
+
+ return self.input.index()
+
+
+ def getText(self):
+ """
+ Return the text matched so far for the current token or any
+ text override.
+ """
+ if self._state.text is not None:
+ return self._state.text
+
+ return self.input.substring(
+ self._state.tokenStartCharIndex,
+ self.getCharIndex()-1
+ )
+
+
+ def setText(self, text):
+ """
+ Set the complete text of this token; it wipes any previous
+ changes to the text.
+ """
+ self._state.text = text
+
+
+ text = property(getText, setText)
+
+
+ def reportError(self, e):
+ ## TODO: not thought about recovery in lexer yet.
+
+ ## # if we've already reported an error and have not matched a token
+ ## # yet successfully, don't report any errors.
+ ## if self.errorRecovery:
+ ## #System.err.print("[SPURIOUS] ");
+ ## return;
+ ##
+ ## self.errorRecovery = True
+
+ self.displayRecognitionError(self.tokenNames, e)
+
+
+ def getErrorMessage(self, e, tokenNames):
+ msg = None
+
+ if isinstance(e, MismatchedTokenException):
+ msg = "mismatched character " \
+ + self.getCharErrorDisplay(e.c) \
+ + " expecting " \
+ + self.getCharErrorDisplay(e.expecting)
+
+ elif isinstance(e, NoViableAltException):
+ msg = "no viable alternative at character " \
+ + self.getCharErrorDisplay(e.c)
+
+ elif isinstance(e, EarlyExitException):
+ msg = "required (...)+ loop did not match anything at character " \
+ + self.getCharErrorDisplay(e.c)
+
+ elif isinstance(e, MismatchedNotSetException):
+ msg = "mismatched character " \
+ + self.getCharErrorDisplay(e.c) \
+ + " expecting set " \
+ + repr(e.expecting)
+
+ elif isinstance(e, MismatchedSetException):
+ msg = "mismatched character " \
+ + self.getCharErrorDisplay(e.c) \
+ + " expecting set " \
+ + repr(e.expecting)
+
+ elif isinstance(e, MismatchedRangeException):
+ msg = "mismatched character " \
+ + self.getCharErrorDisplay(e.c) \
+ + " expecting set " \
+ + self.getCharErrorDisplay(e.a) \
+ + ".." \
+ + self.getCharErrorDisplay(e.b)
+
+ else:
+ msg = BaseRecognizer.getErrorMessage(self, e, tokenNames)
+
+ return msg
+
+
+ def getCharErrorDisplay(self, c):
+ if c == EOF:
+ c = '<EOF>'
+ return repr(c)
+
+
+ def recover(self, re):
+ """
+ Lexers can normally match any char in it's vocabulary after matching
+ a token, so do the easy thing and just kill a character and hope
+ it all works out. You can instead use the rule invocation stack
+ to do sophisticated error recovery if you are in a fragment rule.
+ """
+
+ self.input.consume()
+
+
+ def traceIn(self, ruleName, ruleIndex):
+ inputSymbol = "%s line=%d:%s" % (self.input.LT(1),
+ self.getLine(),
+ self.getCharPositionInLine()
+ )
+
+ BaseRecognizer.traceIn(self, ruleName, ruleIndex, inputSymbol)
+
+
+ def traceOut(self, ruleName, ruleIndex):
+ inputSymbol = "%s line=%d:%s" % (self.input.LT(1),
+ self.getLine(),
+ self.getCharPositionInLine()
+ )
+
+ BaseRecognizer.traceOut(self, ruleName, ruleIndex, inputSymbol)
+
+
+
+class Parser(BaseRecognizer):
+ """
+ @brief Baseclass for generated parser classes.
+ """
+
+ def __init__(self, lexer, state=None):
+ BaseRecognizer.__init__(self, state)
+
+ self.setTokenStream(lexer)
+
+
+ def reset(self):
+ BaseRecognizer.reset(self) # reset all recognizer state variables
+ if self.input is not None:
+ self.input.seek(0) # rewind the input
+
+
+ def getCurrentInputSymbol(self, input):
+ return input.LT(1)
+
+
+ def getMissingSymbol(self, input, e, expectedTokenType, follow):
+ if expectedTokenType == EOF:
+ tokenText = "<missing EOF>"
+ else:
+ tokenText = "<missing " + self.tokenNames[expectedTokenType] + ">"
+ t = CommonToken(type=expectedTokenType, text=tokenText)
+ current = input.LT(1)
+ if current.type == EOF:
+ current = input.LT(-1)
+
+ if current is not None:
+ t.line = current.line
+ t.charPositionInLine = current.charPositionInLine
+ t.channel = DEFAULT_CHANNEL
+ return t
+
+
+ def setTokenStream(self, input):
+ """Set the token stream and reset the parser"""
+
+ self.input = None
+ self.reset()
+ self.input = input
+
+
+ def getTokenStream(self):
+ return self.input
+
+
+ def getSourceName(self):
+ return self.input.getSourceName()
+
+
+ def traceIn(self, ruleName, ruleIndex):
+ BaseRecognizer.traceIn(self, ruleName, ruleIndex, self.input.LT(1))
+
+
+ def traceOut(self, ruleName, ruleIndex):
+ BaseRecognizer.traceOut(self, ruleName, ruleIndex, self.input.LT(1))
+
+
+class RuleReturnScope(object):
+ """
+ Rules can return start/stop info as well as possible trees and templates.
+ """
+
+ def getStart(self):
+ """Return the start token or tree."""
+ return None
+
+
+ def getStop(self):
+ """Return the stop token or tree."""
+ return None
+
+
+ def getTree(self):
+ """Has a value potentially if output=AST."""
+ return None
+
+
+ def getTemplate(self):
+ """Has a value potentially if output=template."""
+ return None
+
+
+class ParserRuleReturnScope(RuleReturnScope):
+ """
+ Rules that return more than a single value must return an object
+ containing all the values. Besides the properties defined in
+ RuleLabelScope.predefinedRulePropertiesScope there may be user-defined
+ return values. This class simply defines the minimum properties that
+ are always defined and methods to access the others that might be
+ available depending on output option such as template and tree.
+
+ Note text is not an actual property of the return value, it is computed
+ from start and stop using the input stream's toString() method. I
+ could add a ctor to this so that we can pass in and store the input
+ stream, but I'm not sure we want to do that. It would seem to be undefined
+ to get the .text property anyway if the rule matches tokens from multiple
+ input streams.
+
+ I do not use getters for fields of objects that are used simply to
+ group values such as this aggregate. The getters/setters are there to
+ satisfy the superclass interface.
+ """
+
+ def __init__(self):
+ self.start = None
+ self.stop = None
+
+
+ def getStart(self):
+ return self.start
+
+
+ def getStop(self):
+ return self.stop
+
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/streams.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/streams.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/streams.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,1452 @@
+"""ANTLR3 runtime package"""
+
+# begin[licence]
+#
+# [The "BSD licence"]
+# Copyright (c) 2005-2008 Terence Parr
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# end[licence]
+
+import codecs
+from StringIO import StringIO
+
+from antlr3.constants import DEFAULT_CHANNEL, EOF
+from antlr3.tokens import Token, EOF_TOKEN
+
+
+############################################################################
+#
+# basic interfaces
+# IntStream
+# +- CharStream
+# \- TokenStream
+#
+# subclasses must implemented all methods
+#
+############################################################################
+
+class IntStream(object):
+ """
+ @brief Base interface for streams of integer values.
+
+ A simple stream of integers used when all I care about is the char
+ or token type sequence (such as interpretation).
+ """
+
+ def consume(self):
+ raise NotImplementedError
+
+
+ def LA(self, i):
+ """Get int at current input pointer + i ahead where i=1 is next int.
+
+ Negative indexes are allowed. LA(-1) is previous token (token
+ just matched). LA(-i) where i is before first token should
+ yield -1, invalid char / EOF.
+ """
+
+ raise NotImplementedError
+
+
+ def mark(self):
+ """
+ Tell the stream to start buffering if it hasn't already. Return
+ current input position, index(), or some other marker so that
+ when passed to rewind() you get back to the same spot.
+ rewind(mark()) should not affect the input cursor. The Lexer
+ track line/col info as well as input index so its markers are
+ not pure input indexes. Same for tree node streams.
+ """
+
+ raise NotImplementedError
+
+
+ def index(self):
+ """
+ Return the current input symbol index 0..n where n indicates the
+ last symbol has been read. The index is the symbol about to be
+ read not the most recently read symbol.
+ """
+
+ raise NotImplementedError
+
+
+ def rewind(self, marker=None):
+ """
+ Reset the stream so that next call to index would return marker.
+ The marker will usually be index() but it doesn't have to be. It's
+ just a marker to indicate what state the stream was in. This is
+ essentially calling release() and seek(). If there are markers
+ created after this marker argument, this routine must unroll them
+ like a stack. Assume the state the stream was in when this marker
+ was created.
+
+ If marker is None:
+ Rewind to the input position of the last marker.
+ Used currently only after a cyclic DFA and just
+ before starting a sem/syn predicate to get the
+ input position back to the start of the decision.
+ Do not "pop" the marker off the state. mark(i)
+ and rewind(i) should balance still. It is
+ like invoking rewind(last marker) but it should not "pop"
+ the marker off. It's like seek(last marker's input position).
+ """
+
+ raise NotImplementedError
+
+
+ def release(self, marker=None):
+ """
+ You may want to commit to a backtrack but don't want to force the
+ stream to keep bookkeeping objects around for a marker that is
+ no longer necessary. This will have the same behavior as
+ rewind() except it releases resources without the backward seek.
+ This must throw away resources for all markers back to the marker
+ argument. So if you're nested 5 levels of mark(), and then release(2)
+ you have to release resources for depths 2..5.
+ """
+
+ raise NotImplementedError
+
+
+ def seek(self, index):
+ """
+ Set the input cursor to the position indicated by index. This is
+ normally used to seek ahead in the input stream. No buffering is
+ required to do this unless you know your stream will use seek to
+ move backwards such as when backtracking.
+
+ This is different from rewind in its multi-directional
+ requirement and in that its argument is strictly an input cursor
+ (index).
+
+ For char streams, seeking forward must update the stream state such
+ as line number. For seeking backwards, you will be presumably
+ backtracking using the mark/rewind mechanism that restores state and
+ so this method does not need to update state when seeking backwards.
+
+ Currently, this method is only used for efficient backtracking using
+ memoization, but in the future it may be used for incremental parsing.
+
+ The index is 0..n-1. A seek to position i means that LA(1) will
+ return the ith symbol. So, seeking to 0 means LA(1) will return the
+ first element in the stream.
+ """
+
+ raise NotImplementedError
+
+
+ def size(self):
+ """
+ Only makes sense for streams that buffer everything up probably, but
+ might be useful to display the entire stream or for testing. This
+ value includes a single EOF.
+ """
+
+ raise NotImplementedError
+
+
+ def getSourceName(self):
+ """
+ Where are you getting symbols from? Normally, implementations will
+ pass the buck all the way to the lexer who can ask its input stream
+ for the file name or whatever.
+ """
+
+ raise NotImplementedError
+
+
+class CharStream(IntStream):
+ """
+ @brief A source of characters for an ANTLR lexer.
+
+ This is an abstract class that must be implemented by a subclass.
+
+ """
+
+ # pylint does not realize that this is an interface, too
+ #pylint: disable-msg=W0223
+
+ EOF = -1
+
+
+ def substring(self, start, stop):
+ """
+ For infinite streams, you don't need this; primarily I'm providing
+ a useful interface for action code. Just make sure actions don't
+ use this on streams that don't support it.
+ """
+
+ raise NotImplementedError
+
+
+ def LT(self, i):
+ """
+ Get the ith character of lookahead. This is the same usually as
+ LA(i). This will be used for labels in the generated
+ lexer code. I'd prefer to return a char here type-wise, but it's
+ probably better to be 32-bit clean and be consistent with LA.
+ """
+
+ raise NotImplementedError
+
+
+ def getLine(self):
+ """ANTLR tracks the line information automatically"""
+
+ raise NotImplementedError
+
+
+ def setLine(self, line):
+ """
+ Because this stream can rewind, we need to be able to reset the line
+ """
+
+ raise NotImplementedError
+
+
+ def getCharPositionInLine(self):
+ """
+ The index of the character relative to the beginning of the line 0..n-1
+ """
+
+ raise NotImplementedError
+
+
+ def setCharPositionInLine(self, pos):
+ raise NotImplementedError
+
+
+class TokenStream(IntStream):
+ """
+
+ @brief A stream of tokens accessing tokens from a TokenSource
+
+ This is an abstract class that must be implemented by a subclass.
+
+ """
+
+ # pylint does not realize that this is an interface, too
+ #pylint: disable-msg=W0223
+
+ def LT(self, k):
+ """
+ Get Token at current input pointer + i ahead where i=1 is next Token.
+ i<0 indicates tokens in the past. So -1 is previous token and -2 is
+ two tokens ago. LT(0) is undefined. For i>=n, return Token.EOFToken.
+ Return null for LT(0) and any index that results in an absolute address
+ that is negative.
+ """
+
+ raise NotImplementedError
+
+
+ def get(self, i):
+ """
+ Get a token at an absolute index i; 0..n-1. This is really only
+ needed for profiling and debugging and token stream rewriting.
+ If you don't want to buffer up tokens, then this method makes no
+ sense for you. Naturally you can't use the rewrite stream feature.
+ I believe DebugTokenStream can easily be altered to not use
+ this method, removing the dependency.
+ """
+
+ raise NotImplementedError
+
+
+ def getTokenSource(self):
+ """
+ Where is this stream pulling tokens from? This is not the name, but
+ the object that provides Token objects.
+ """
+
+ raise NotImplementedError
+
+
+ def toString(self, start=None, stop=None):
+ """
+ Return the text of all tokens from start to stop, inclusive.
+ If the stream does not buffer all the tokens then it can just
+ return "" or null; Users should not access $ruleLabel.text in
+ an action of course in that case.
+
+ Because the user is not required to use a token with an index stored
+ in it, we must provide a means for two token objects themselves to
+ indicate the start/end location. Most often this will just delegate
+ to the other toString(int,int). This is also parallel with
+ the TreeNodeStream.toString(Object,Object).
+ """
+
+ raise NotImplementedError
+
+
+############################################################################
+#
+# character streams for use in lexers
+# CharStream
+# \- ANTLRStringStream
+#
+############################################################################
+
+
+class ANTLRStringStream(CharStream):
+ """
+ @brief CharStream that pull data from a unicode string.
+
+ A pretty quick CharStream that pulls all data from an array
+ directly. Every method call counts in the lexer.
+
+ """
+
+
+ def __init__(self, data):
+ """
+ @param data This should be a unicode string holding the data you want
+ to parse. If you pass in a byte string, the Lexer will choke on
+ non-ascii data.
+
+ """
+
+ CharStream.__init__(self)
+
+ # The data being scanned
+ self.strdata = unicode(data)
+ self.data = [ord(c) for c in self.strdata]
+
+ # How many characters are actually in the buffer
+ self.n = len(data)
+
+ # 0..n-1 index into string of next char
+ self.p = 0
+
+ # line number 1..n within the input
+ self.line = 1
+
+ # The index of the character relative to the beginning of the
+ # line 0..n-1
+ self.charPositionInLine = 0
+
+ # A list of CharStreamState objects that tracks the stream state
+ # values line, charPositionInLine, and p that can change as you
+ # move through the input stream. Indexed from 0..markDepth-1.
+ self._markers = [ ]
+ self.lastMarker = None
+ self.markDepth = 0
+
+ # What is name or source of this char stream?
+ self.name = None
+
+
+ def reset(self):
+ """
+ Reset the stream so that it's in the same state it was
+ when the object was created *except* the data array is not
+ touched.
+ """
+
+ self.p = 0
+ self.line = 1
+ self.charPositionInLine = 0
+ self._markers = [ ]
+
+
+ def consume(self):
+ try:
+ if self.data[self.p] == 10: # \n
+ self.line += 1
+ self.charPositionInLine = 0
+ else:
+ self.charPositionInLine += 1
+
+ self.p += 1
+
+ except IndexError:
+ # happend when we reached EOF and self.data[self.p] fails
+ # just do nothing
+ pass
+
+
+
+ def LA(self, i):
+ if i == 0:
+ return 0 # undefined
+
+ if i < 0:
+ i += 1 # e.g., translate LA(-1) to use offset i=0; then data[p+0-1]
+
+ try:
+ return self.data[self.p+i-1]
+ except IndexError:
+ return EOF
+
+
+
+ def LT(self, i):
+ if i == 0:
+ return 0 # undefined
+
+ if i < 0:
+ i += 1 # e.g., translate LA(-1) to use offset i=0; then data[p+0-1]
+
+ try:
+ return self.strdata[self.p+i-1]
+ except IndexError:
+ return EOF
+
+
+ def index(self):
+ """
+ Return the current input symbol index 0..n where n indicates the
+ last symbol has been read. The index is the index of char to
+ be returned from LA(1).
+ """
+
+ return self.p
+
+
+ def size(self):
+ return self.n
+
+
+ def mark(self):
+ state = (self.p, self.line, self.charPositionInLine)
+ try:
+ self._markers[self.markDepth] = state
+ except IndexError:
+ self._markers.append(state)
+ self.markDepth += 1
+
+ self.lastMarker = self.markDepth
+
+ return self.lastMarker
+
+
+ def rewind(self, marker=None):
+ if marker is None:
+ marker = self.lastMarker
+
+ p, line, charPositionInLine = self._markers[marker-1]
+
+ self.seek(p)
+ self.line = line
+ self.charPositionInLine = charPositionInLine
+ self.release(marker)
+
+
+ def release(self, marker=None):
+ if marker is None:
+ marker = self.lastMarker
+
+ self.markDepth = marker-1
+
+
+ def seek(self, index):
+ """
+ consume() ahead until p==index; can't just set p=index as we must
+ update line and charPositionInLine.
+ """
+
+ if index <= self.p:
+ self.p = index # just jump; don't update stream state (line, ...)
+ return
+
+ # seek forward, consume until p hits index
+ while self.p < index:
+ self.consume()
+
+
+ def substring(self, start, stop):
+ return self.strdata[start:stop+1]
+
+
+ def getLine(self):
+ """Using setter/getter methods is deprecated. Use o.line instead."""
+ return self.line
+
+
+ def getCharPositionInLine(self):
+ """
+ Using setter/getter methods is deprecated. Use o.charPositionInLine
+ instead.
+ """
+ return self.charPositionInLine
+
+
+ def setLine(self, line):
+ """Using setter/getter methods is deprecated. Use o.line instead."""
+ self.line = line
+
+
+ def setCharPositionInLine(self, pos):
+ """
+ Using setter/getter methods is deprecated. Use o.charPositionInLine
+ instead.
+ """
+ self.charPositionInLine = pos
+
+
+ def getSourceName(self):
+ return self.name
+
+
+class ANTLRFileStream(ANTLRStringStream):
+ """
+ @brief CharStream that opens a file to read the data.
+
+ This is a char buffer stream that is loaded from a file
+ all at once when you construct the object.
+ """
+
+ def __init__(self, fileName, encoding=None):
+ """
+ @param fileName The path to the file to be opened. The file will be
+ opened with mode 'rb'.
+
+ @param encoding If you set the optional encoding argument, then the
+ data will be decoded on the fly.
+
+ """
+
+ self.fileName = fileName
+
+ fp = codecs.open(fileName, 'rb', encoding)
+ try:
+ data = fp.read()
+ finally:
+ fp.close()
+
+ ANTLRStringStream.__init__(self, data)
+
+
+ def getSourceName(self):
+ """Deprecated, access o.fileName directly."""
+
+ return self.fileName
+
+
+class ANTLRInputStream(ANTLRStringStream):
+ """
+ @brief CharStream that reads data from a file-like object.
+
+ This is a char buffer stream that is loaded from a file like object
+ all at once when you construct the object.
+
+ All input is consumed from the file, but it is not closed.
+ """
+
+ def __init__(self, file, encoding=None):
+ """
+ @param file A file-like object holding your input. Only the read()
+ method must be implemented.
+
+ @param encoding If you set the optional encoding argument, then the
+ data will be decoded on the fly.
+
+ """
+
+ if encoding is not None:
+ # wrap input in a decoding reader
+ reader = codecs.lookup(encoding)[2]
+ file = reader(file)
+
+ data = file.read()
+
+ ANTLRStringStream.__init__(self, data)
+
+
+# I guess the ANTLR prefix exists only to avoid a name clash with some Java
+# mumbojumbo. A plain "StringStream" looks better to me, which should be
+# the preferred name in Python.
+StringStream = ANTLRStringStream
+FileStream = ANTLRFileStream
+InputStream = ANTLRInputStream
+
+
+############################################################################
+#
+# Token streams
+# TokenStream
+# +- CommonTokenStream
+# \- TokenRewriteStream
+#
+############################################################################
+
+
+class CommonTokenStream(TokenStream):
+ """
+ @brief The most common stream of tokens
+
+ The most common stream of tokens is one where every token is buffered up
+ and tokens are prefiltered for a certain channel (the parser will only
+ see these tokens and cannot change the filter channel number during the
+ parse).
+ """
+
+ def __init__(self, tokenSource=None, channel=DEFAULT_CHANNEL):
+ """
+ @param tokenSource A TokenSource instance (usually a Lexer) to pull
+ the tokens from.
+
+ @param channel Skip tokens on any channel but this one; this is how we
+ skip whitespace...
+
+ """
+
+ TokenStream.__init__(self)
+
+ self.tokenSource = tokenSource
+
+ # Record every single token pulled from the source so we can reproduce
+ # chunks of it later.
+ self.tokens = []
+
+ # Map<tokentype, channel> to override some Tokens' channel numbers
+ self.channelOverrideMap = {}
+
+ # Set<tokentype>; discard any tokens with this type
+ self.discardSet = set()
+
+ # Skip tokens on any channel but this one; this is how we skip whitespace...
+ self.channel = channel
+
+ # By default, track all incoming tokens
+ self.discardOffChannelTokens = False
+
+ # The index into the tokens list of the current token (next token
+ # to consume). p==-1 indicates that the tokens list is empty
+ self.p = -1
+
+ # Remember last marked position
+ self.lastMarker = None
+
+
+ def setTokenSource(self, tokenSource):
+ """Reset this token stream by setting its token source."""
+
+ self.tokenSource = tokenSource
+ self.tokens = []
+ self.p = -1
+ self.channel = DEFAULT_CHANNEL
+
+
+ def reset(self):
+ self.p = 0
+ self.lastMarker = None
+
+
+ def fillBuffer(self):
+ """
+ Load all tokens from the token source and put in tokens.
+ This is done upon first LT request because you might want to
+ set some token type / channel overrides before filling buffer.
+ """
+
+
+ index = 0
+ t = self.tokenSource.nextToken()
+ while t is not None and t.type != EOF:
+ discard = False
+
+ if self.discardSet is not None and t.type in self.discardSet:
+ discard = True
+
+ elif self.discardOffChannelTokens and t.channel != self.channel:
+ discard = True
+
+ # is there a channel override for token type?
+ try:
+ overrideChannel = self.channelOverrideMap[t.type]
+
+ except KeyError:
+ # no override for this type
+ pass
+
+ else:
+ if overrideChannel == self.channel:
+ t.channel = overrideChannel
+ else:
+ discard = True
+
+ if not discard:
+ t.index = index
+ self.tokens.append(t)
+ index += 1
+
+ t = self.tokenSource.nextToken()
+
+ # leave p pointing at first token on channel
+ self.p = 0
+ self.p = self.skipOffTokenChannels(self.p)
+
+
+ def consume(self):
+ """
+ Move the input pointer to the next incoming token. The stream
+ must become active with LT(1) available. consume() simply
+ moves the input pointer so that LT(1) points at the next
+ input symbol. Consume at least one token.
+
+ Walk past any token not on the channel the parser is listening to.
+ """
+
+ if self.p < len(self.tokens):
+ self.p += 1
+
+ self.p = self.skipOffTokenChannels(self.p) # leave p on valid token
+
+
+ def skipOffTokenChannels(self, i):
+ """
+ Given a starting index, return the index of the first on-channel
+ token.
+ """
+
+ try:
+ while self.tokens[i].channel != self.channel:
+ i += 1
+ except IndexError:
+ # hit the end of token stream
+ pass
+
+ return i
+
+
+ def skipOffTokenChannelsReverse(self, i):
+ while i >= 0 and self.tokens[i].channel != self.channel:
+ i -= 1
+
+ return i
+
+
+ def setTokenTypeChannel(self, ttype, channel):
+ """
+ A simple filter mechanism whereby you can tell this token stream
+ to force all tokens of type ttype to be on channel. For example,
+ when interpreting, we cannot exec actions so we need to tell
+ the stream to force all WS and NEWLINE to be a different, ignored
+ channel.
+ """
+
+ self.channelOverrideMap[ttype] = channel
+
+
+ def discardTokenType(self, ttype):
+ self.discardSet.add(ttype)
+
+
+ def getTokens(self, start=None, stop=None, types=None):
+ """
+ Given a start and stop index, return a list of all tokens in
+ the token type set. Return None if no tokens were found. This
+ method looks at both on and off channel tokens.
+ """
+
+ if self.p == -1:
+ self.fillBuffer()
+
+ if stop is None or stop >= len(self.tokens):
+ stop = len(self.tokens) - 1
+
+ if start is None or stop < 0:
+ start = 0
+
+ if start > stop:
+ return None
+
+ if isinstance(types, (int, long)):
+ # called with a single type, wrap into set
+ types = set([types])
+
+ filteredTokens = [
+ token for token in self.tokens[start:stop]
+ if types is None or token.type in types
+ ]
+
+ if len(filteredTokens) == 0:
+ return None
+
+ return filteredTokens
+
+
+ def LT(self, k):
+ """
+ Get the ith token from the current position 1..n where k=1 is the
+ first symbol of lookahead.
+ """
+
+ if self.p == -1:
+ self.fillBuffer()
+
+ if k == 0:
+ return None
+
+ if k < 0:
+ return self.LB(-k)
+
+ i = self.p
+ n = 1
+ # find k good tokens
+ while n < k:
+ # skip off-channel tokens
+ i = self.skipOffTokenChannels(i+1) # leave p on valid token
+ n += 1
+
+ try:
+ return self.tokens[i]
+ except IndexError:
+ return EOF_TOKEN
+
+
+ def LB(self, k):
+ """Look backwards k tokens on-channel tokens"""
+
+ if self.p == -1:
+ self.fillBuffer()
+
+ if k == 0:
+ return None
+
+ if self.p - k < 0:
+ return None
+
+ i = self.p
+ n = 1
+ # find k good tokens looking backwards
+ while n <= k:
+ # skip off-channel tokens
+ i = self.skipOffTokenChannelsReverse(i-1) # leave p on valid token
+ n += 1
+
+ if i < 0:
+ return None
+
+ return self.tokens[i]
+
+
+ def get(self, i):
+ """
+ Return absolute token i; ignore which channel the tokens are on;
+ that is, count all tokens not just on-channel tokens.
+ """
+
+ return self.tokens[i]
+
+
+ def LA(self, i):
+ return self.LT(i).type
+
+
+ def mark(self):
+ self.lastMarker = self.index()
+ return self.lastMarker
+
+
+ def release(self, marker=None):
+ # no resources to release
+ pass
+
+
+ def size(self):
+ return len(self.tokens)
+
+
+ def index(self):
+ return self.p
+
+
+ def rewind(self, marker=None):
+ if marker is None:
+ marker = self.lastMarker
+
+ self.seek(marker)
+
+
+ def seek(self, index):
+ self.p = index
+
+
+ def getTokenSource(self):
+ return self.tokenSource
+
+
+ def getSourceName(self):
+ return self.tokenSource.getSourceName()
+
+
+ def toString(self, start=None, stop=None):
+ if self.p == -1:
+ self.fillBuffer()
+
+ if start is None:
+ start = 0
+ elif not isinstance(start, int):
+ start = start.index
+
+ if stop is None:
+ stop = len(self.tokens) - 1
+ elif not isinstance(stop, int):
+ stop = stop.index
+
+ if stop >= len(self.tokens):
+ stop = len(self.tokens) - 1
+
+ return ''.join([t.text for t in self.tokens[start:stop+1]])
+
+
+class RewriteOperation(object):
+ """@brief Internal helper class."""
+
+ def __init__(self, stream, index, text):
+ self.stream = stream
+ self.index = index
+ self.text = text
+
+ def execute(self, buf):
+ """Execute the rewrite operation by possibly adding to the buffer.
+ Return the index of the next token to operate on.
+ """
+
+ return self.index
+
+ def toString(self):
+ opName = self.__class__.__name__
+ return '<%s@%d:"%s">' % (opName, self.index, self.text)
+
+ __str__ = toString
+ __repr__ = toString
+
+
+class InsertBeforeOp(RewriteOperation):
+ """@brief Internal helper class."""
+
+ def execute(self, buf):
+ buf.write(self.text)
+ buf.write(self.stream.tokens[self.index].text)
+ return self.index + 1
+
+
+class ReplaceOp(RewriteOperation):
+ """
+ @brief Internal helper class.
+
+ I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp
+ instructions.
+ """
+
+ def __init__(self, stream, first, last, text):
+ RewriteOperation.__init__(self, stream, first, text)
+ self.lastIndex = last
+
+
+ def execute(self, buf):
+ if self.text is not None:
+ buf.write(self.text)
+
+ return self.lastIndex + 1
+
+
+ def toString(self):
+ return '<ReplaceOp@%d..%d:"%s">' % (
+ self.index, self.lastIndex, self.text)
+
+ __str__ = toString
+ __repr__ = toString
+
+
+class DeleteOp(ReplaceOp):
+ """
+ @brief Internal helper class.
+ """
+
+ def __init__(self, stream, first, last):
+ ReplaceOp.__init__(self, stream, first, last, None)
+
+
+ def toString(self):
+ return '<DeleteOp@%d..%d>' % (self.index, self.lastIndex)
+
+ __str__ = toString
+ __repr__ = toString
+
+
+class TokenRewriteStream(CommonTokenStream):
+ """@brief CommonTokenStream that can be modified.
+
+ Useful for dumping out the input stream after doing some
+ augmentation or other manipulations.
+
+ You can insert stuff, replace, and delete chunks. Note that the
+ operations are done lazily--only if you convert the buffer to a
+ String. This is very efficient because you are not moving data around
+ all the time. As the buffer of tokens is converted to strings, the
+ toString() method(s) check to see if there is an operation at the
+ current index. If so, the operation is done and then normal String
+ rendering continues on the buffer. This is like having multiple Turing
+ machine instruction streams (programs) operating on a single input tape. :)
+
+ Since the operations are done lazily at toString-time, operations do not
+ screw up the token index values. That is, an insert operation at token
+ index i does not change the index values for tokens i+1..n-1.
+
+ Because operations never actually alter the buffer, you may always get
+ the original token stream back without undoing anything. Since
+ the instructions are queued up, you can easily simulate transactions and
+ roll back any changes if there is an error just by removing instructions.
+ For example,
+
+ CharStream input = new ANTLRFileStream("input");
+ TLexer lex = new TLexer(input);
+ TokenRewriteStream tokens = new TokenRewriteStream(lex);
+ T parser = new T(tokens);
+ parser.startRule();
+
+ Then in the rules, you can execute
+ Token t,u;
+ ...
+ input.insertAfter(t, "text to put after t");}
+ input.insertAfter(u, "text after u");}
+ System.out.println(tokens.toString());
+
+ Actually, you have to cast the 'input' to a TokenRewriteStream. :(
+
+ You can also have multiple "instruction streams" and get multiple
+ rewrites from a single pass over the input. Just name the instruction
+ streams and use that name again when printing the buffer. This could be
+ useful for generating a C file and also its header file--all from the
+ same buffer:
+
+ tokens.insertAfter("pass1", t, "text to put after t");}
+ tokens.insertAfter("pass2", u, "text after u");}
+ System.out.println(tokens.toString("pass1"));
+ System.out.println(tokens.toString("pass2"));
+
+ If you don't use named rewrite streams, a "default" stream is used as
+ the first example shows.
+ """
+
+ DEFAULT_PROGRAM_NAME = "default"
+ MIN_TOKEN_INDEX = 0
+
+ def __init__(self, tokenSource=None, channel=DEFAULT_CHANNEL):
+ CommonTokenStream.__init__(self, tokenSource, channel)
+
+ # You may have multiple, named streams of rewrite operations.
+ # I'm calling these things "programs."
+ # Maps String (name) -> rewrite (List)
+ self.programs = {}
+ self.programs[self.DEFAULT_PROGRAM_NAME] = []
+
+ # Map String (program name) -> Integer index
+ self.lastRewriteTokenIndexes = {}
+
+
+ def rollback(self, *args):
+ """
+ Rollback the instruction stream for a program so that
+ the indicated instruction (via instructionIndex) is no
+ longer in the stream. UNTESTED!
+ """
+
+ if len(args) == 2:
+ programName = args[0]
+ instructionIndex = args[1]
+ elif len(args) == 1:
+ programName = self.DEFAULT_PROGRAM_NAME
+ instructionIndex = args[0]
+ else:
+ raise TypeError("Invalid arguments")
+
+ p = self.programs.get(programName, None)
+ if p is not None:
+ self.programs[programName] = (
+ p[self.MIN_TOKEN_INDEX:instructionIndex])
+
+
+ def deleteProgram(self, programName=DEFAULT_PROGRAM_NAME):
+ """Reset the program so that no instructions exist"""
+
+ self.rollback(programName, self.MIN_TOKEN_INDEX)
+
+
+ def insertAfter(self, *args):
+ if len(args) == 2:
+ programName = self.DEFAULT_PROGRAM_NAME
+ index = args[0]
+ text = args[1]
+
+ elif len(args) == 3:
+ programName = args[0]
+ index = args[1]
+ text = args[2]
+
+ else:
+ raise TypeError("Invalid arguments")
+
+ if isinstance(index, Token):
+ # index is a Token, grap the stream index from it
+ index = index.index
+
+ # to insert after, just insert before next index (even if past end)
+ self.insertBefore(programName, index+1, text)
+
+
+ def insertBefore(self, *args):
+ if len(args) == 2:
+ programName = self.DEFAULT_PROGRAM_NAME
+ index = args[0]
+ text = args[1]
+
+ elif len(args) == 3:
+ programName = args[0]
+ index = args[1]
+ text = args[2]
+
+ else:
+ raise TypeError("Invalid arguments")
+
+ if isinstance(index, Token):
+ # index is a Token, grap the stream index from it
+ index = index.index
+
+ op = InsertBeforeOp(self, index, text)
+ rewrites = self.getProgram(programName)
+ rewrites.append(op)
+
+
+ def replace(self, *args):
+ if len(args) == 2:
+ programName = self.DEFAULT_PROGRAM_NAME
+ first = args[0]
+ last = args[0]
+ text = args[1]
+
+ elif len(args) == 3:
+ programName = self.DEFAULT_PROGRAM_NAME
+ first = args[0]
+ last = args[1]
+ text = args[2]
+
+ elif len(args) == 4:
+ programName = args[0]
+ first = args[1]
+ last = args[2]
+ text = args[3]
+
+ else:
+ raise TypeError("Invalid arguments")
+
+ if isinstance(first, Token):
+ # first is a Token, grap the stream index from it
+ first = first.index
+
+ if isinstance(last, Token):
+ # last is a Token, grap the stream index from it
+ last = last.index
+
+ if first > last or first < 0 or last < 0 or last >= len(self.tokens):
+ raise ValueError(
+ "replace: range invalid: "+first+".."+last+
+ "(size="+len(self.tokens)+")")
+
+ op = ReplaceOp(self, first, last, text)
+ rewrites = self.getProgram(programName)
+ rewrites.append(op)
+
+
+ def delete(self, *args):
+ self.replace(*(list(args) + [None]))
+
+
+ def getLastRewriteTokenIndex(self, programName=DEFAULT_PROGRAM_NAME):
+ return self.lastRewriteTokenIndexes.get(programName, -1)
+
+
+ def setLastRewriteTokenIndex(self, programName, i):
+ self.lastRewriteTokenIndexes[programName] = i
+
+
+ def getProgram(self, name):
+ p = self.programs.get(name, None)
+ if p is None:
+ p = self.initializeProgram(name)
+
+ return p
+
+
+ def initializeProgram(self, name):
+ p = []
+ self.programs[name] = p
+ return p
+
+
+ def toOriginalString(self, start=None, end=None):
+ if start is None:
+ start = self.MIN_TOKEN_INDEX
+ if end is None:
+ end = self.size() - 1
+
+ buf = StringIO()
+ i = start
+ while i >= self.MIN_TOKEN_INDEX and i <= end and i < len(self.tokens):
+ buf.write(self.get(i).text)
+ i += 1
+
+ return buf.getvalue()
+
+
+ def toString(self, *args):
+ if len(args) == 0:
+ programName = self.DEFAULT_PROGRAM_NAME
+ start = self.MIN_TOKEN_INDEX
+ end = self.size() - 1
+
+ elif len(args) == 1:
+ programName = args[0]
+ start = self.MIN_TOKEN_INDEX
+ end = self.size() - 1
+
+ elif len(args) == 2:
+ programName = self.DEFAULT_PROGRAM_NAME
+ start = args[0]
+ end = args[1]
+
+ if start is None:
+ start = self.MIN_TOKEN_INDEX
+ elif not isinstance(start, int):
+ start = start.index
+
+ if end is None:
+ end = len(self.tokens) - 1
+ elif not isinstance(end, int):
+ end = end.index
+
+ # ensure start/end are in range
+ if end >= len(self.tokens):
+ end = len(self.tokens) - 1
+
+ if start < 0:
+ start = 0
+
+ rewrites = self.programs.get(programName)
+ if rewrites is None or len(rewrites) == 0:
+ # no instructions to execute
+ return self.toOriginalString(start, end)
+
+ buf = StringIO()
+
+ # First, optimize instruction stream
+ indexToOp = self.reduceToSingleOperationPerIndex(rewrites)
+
+ # Walk buffer, executing instructions and emitting tokens
+ i = start
+ while i <= end and i < len(self.tokens):
+ op = indexToOp.get(i)
+ # remove so any left have index size-1
+ try:
+ del indexToOp[i]
+ except KeyError:
+ pass
+
+ t = self.tokens[i]
+ if op is None:
+ # no operation at that index, just dump token
+ buf.write(t.text)
+ i += 1 # move to next token
+
+ else:
+ i = op.execute(buf) # execute operation and skip
+
+ # include stuff after end if it's last index in buffer
+ # So, if they did an insertAfter(lastValidIndex, "foo"), include
+ # foo if end==lastValidIndex.
+ if end == len(self.tokens) - 1:
+ # Scan any remaining operations after last token
+ # should be included (they will be inserts).
+ for i in sorted(indexToOp.keys()):
+ op = indexToOp[i]
+ if op.index >= len(self.tokens)-1:
+ buf.write(op.text)
+
+ return buf.getvalue()
+
+ __str__ = toString
+
+
+ def reduceToSingleOperationPerIndex(self, rewrites):
+ """
+ We need to combine operations and report invalid operations (like
+ overlapping replaces that are not completed nested). Inserts to
+ same index need to be combined etc... Here are the cases:
+
+ I.i.u I.j.v leave alone, nonoverlapping
+ I.i.u I.i.v combine: Iivu
+
+ R.i-j.u R.x-y.v | i-j in x-y delete first R
+ R.i-j.u R.i-j.v delete first R
+ R.i-j.u R.x-y.v | x-y in i-j ERROR
+ R.i-j.u R.x-y.v | boundaries overlap ERROR
+
+ I.i.u R.x-y.v | i in x-y delete I
+ I.i.u R.x-y.v | i not in x-y leave alone, nonoverlapping
+ R.x-y.v I.i.u | i in x-y ERROR
+ R.x-y.v I.x.u R.x-y.uv (combine, delete I)
+ R.x-y.v I.i.u | i not in x-y leave alone, nonoverlapping
+
+ I.i.u = insert u before op @ index i
+ R.x-y.u = replace x-y indexed tokens with u
+
+ First we need to examine replaces. For any replace op:
+
+ 1. wipe out any insertions before op within that range.
+ 2. Drop any replace op before that is contained completely within
+ that range.
+ 3. Throw exception upon boundary overlap with any previous replace.
+
+ Then we can deal with inserts:
+
+ 1. for any inserts to same index, combine even if not adjacent.
+ 2. for any prior replace with same left boundary, combine this
+ insert with replace and delete this replace.
+ 3. throw exception if index in same range as previous replace
+
+ Don't actually delete; make op null in list. Easier to walk list.
+ Later we can throw as we add to index -> op map.
+
+ Note that I.2 R.2-2 will wipe out I.2 even though, technically, the
+ inserted stuff would be before the replace range. But, if you
+ add tokens in front of a method body '{' and then delete the method
+ body, I think the stuff before the '{' you added should disappear too.
+
+ Return a map from token index to operation.
+ """
+
+ # WALK REPLACES
+ for i, rop in enumerate(rewrites):
+ if rop is None:
+ continue
+
+ if not isinstance(rop, ReplaceOp):
+ continue
+
+ # Wipe prior inserts within range
+ for j, iop in self.getKindOfOps(rewrites, InsertBeforeOp, i):
+ if iop.index >= rop.index and iop.index <= rop.lastIndex:
+ rewrites[j] = None # delete insert as it's a no-op.
+
+ # Drop any prior replaces contained within
+ for j, prevRop in self.getKindOfOps(rewrites, ReplaceOp, i):
+ if (prevRop.index >= rop.index
+ and prevRop.lastIndex <= rop.lastIndex):
+ rewrites[j] = None # delete replace as it's a no-op.
+ continue
+
+ # throw exception unless disjoint or identical
+ disjoint = (prevRop.lastIndex < rop.index
+ or prevRop.index > rop.lastIndex)
+ same = (prevRop.index == rop.index
+ and prevRop.lastIndex == rop.lastIndex)
+ if not disjoint and not same:
+ raise ValueError(
+ "replace op boundaries of %s overlap with previous %s"
+ % (rop, prevRop))
+
+ # WALK INSERTS
+ for i, iop in enumerate(rewrites):
+ if iop is None:
+ continue
+
+ if not isinstance(iop, InsertBeforeOp):
+ continue
+
+ # combine current insert with prior if any at same index
+ for j, prevIop in self.getKindOfOps(rewrites, InsertBeforeOp, i):
+ if prevIop.index == iop.index: # combine objects
+ # convert to strings...we're in process of toString'ing
+ # whole token buffer so no lazy eval issue with any
+ # templates
+ iop.text = self.catOpText(iop.text, prevIop.text)
+ rewrites[j] = None # delete redundant prior insert
+
+ # look for replaces where iop.index is in range; error
+ for j, rop in self.getKindOfOps(rewrites, ReplaceOp, i):
+ if iop.index == rop.index:
+ rop.text = self.catOpText(iop.text, rop.text)
+ rewrites[i] = None # delete current insert
+ continue
+
+ if iop.index >= rop.index and iop.index <= rop.lastIndex:
+ raise ValueError(
+ "insert op %s within boundaries of previous %s"
+ % (iop, rop))
+
+ m = {}
+ for i, op in enumerate(rewrites):
+ if op is None:
+ continue # ignore deleted ops
+
+ assert op.index not in m, "should only be one op per index"
+ m[op.index] = op
+
+ return m
+
+
+ def catOpText(self, a, b):
+ x = ""
+ y = ""
+ if a is not None:
+ x = a
+ if b is not None:
+ y = b
+ return x + y
+
+
+ def getKindOfOps(self, rewrites, kind, before=None):
+ if before is None:
+ before = len(rewrites)
+ elif before > len(rewrites):
+ before = len(rewrites)
+
+ for i, op in enumerate(rewrites[:before]):
+ if op is None:
+ # ignore deleted
+ continue
+ if op.__class__ == kind:
+ yield i, op
+
+
+ def toDebugString(self, start=None, end=None):
+ if start is None:
+ start = self.MIN_TOKEN_INDEX
+ if end is None:
+ end = self.size() - 1
+
+ buf = StringIO()
+ i = start
+ while i >= self.MIN_TOKEN_INDEX and i <= end and i < len(self.tokens):
+ buf.write(self.get(i))
+ i += 1
+
+ return buf.getvalue()
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/tokens.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/tokens.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/tokens.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,416 @@
+"""ANTLR3 runtime package"""
+
+# begin[licence]
+#
+# [The "BSD licence"]
+# Copyright (c) 2005-2008 Terence Parr
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# end[licence]
+
+from antlr3.constants import EOF, DEFAULT_CHANNEL, INVALID_TOKEN_TYPE
+
+############################################################################
+#
+# basic token interface
+#
+############################################################################
+
+class Token(object):
+ """@brief Abstract token baseclass."""
+
+ def getText(self):
+ """@brief Get the text of the token.
+
+ Using setter/getter methods is deprecated. Use o.text instead.
+ """
+ raise NotImplementedError
+
+ def setText(self, text):
+ """@brief Set the text of the token.
+
+ Using setter/getter methods is deprecated. Use o.text instead.
+ """
+ raise NotImplementedError
+
+
+ def getType(self):
+ """@brief Get the type of the token.
+
+ Using setter/getter methods is deprecated. Use o.type instead."""
+
+ raise NotImplementedError
+
+ def setType(self, ttype):
+ """@brief Get the type of the token.
+
+ Using setter/getter methods is deprecated. Use o.type instead."""
+
+ raise NotImplementedError
+
+
+ def getLine(self):
+ """@brief Get the line number on which this token was matched
+
+ Lines are numbered 1..n
+
+ Using setter/getter methods is deprecated. Use o.line instead."""
+
+ raise NotImplementedError
+
+ def setLine(self, line):
+ """@brief Set the line number on which this token was matched
+
+ Using setter/getter methods is deprecated. Use o.line instead."""
+
+ raise NotImplementedError
+
+
+ def getCharPositionInLine(self):
+ """@brief Get the column of the tokens first character,
+
+ Columns are numbered 0..n-1
+
+ Using setter/getter methods is deprecated. Use o.charPositionInLine instead."""
+
+ raise NotImplementedError
+
+ def setCharPositionInLine(self, pos):
+ """@brief Set the column of the tokens first character,
+
+ Using setter/getter methods is deprecated. Use o.charPositionInLine instead."""
+
+ raise NotImplementedError
+
+
+ def getChannel(self):
+ """@brief Get the channel of the token
+
+ Using setter/getter methods is deprecated. Use o.channel instead."""
+
+ raise NotImplementedError
+
+ def setChannel(self, channel):
+ """@brief Set the channel of the token
+
+ Using setter/getter methods is deprecated. Use o.channel instead."""
+
+ raise NotImplementedError
+
+
+ def getTokenIndex(self):
+ """@brief Get the index in the input stream.
+
+ An index from 0..n-1 of the token object in the input stream.
+ This must be valid in order to use the ANTLRWorks debugger.
+
+ Using setter/getter methods is deprecated. Use o.index instead."""
+
+ raise NotImplementedError
+
+ def setTokenIndex(self, index):
+ """@brief Set the index in the input stream.
+
+ Using setter/getter methods is deprecated. Use o.index instead."""
+
+ raise NotImplementedError
+
+
+ def getInputStream(self):
+ """@brief From what character stream was this token created.
+
+ You don't have to implement but it's nice to know where a Token
+ comes from if you have include files etc... on the input."""
+
+ raise NotImplementedError
+
+ def setInputStream(self, input):
+ """@brief From what character stream was this token created.
+
+ You don't have to implement but it's nice to know where a Token
+ comes from if you have include files etc... on the input."""
+
+ raise NotImplementedError
+
+
+############################################################################
+#
+# token implementations
+#
+# Token
+# +- CommonToken
+# \- ClassicToken
+#
+############################################################################
+
+class CommonToken(Token):
+ """@brief Basic token implementation.
+
+ This implementation does not copy the text from the input stream upon
+ creation, but keeps start/stop pointers into the stream to avoid
+ unnecessary copy operations.
+
+ """
+
+ def __init__(self, type=None, channel=DEFAULT_CHANNEL, text=None,
+ input=None, start=None, stop=None, oldToken=None):
+ Token.__init__(self)
+
+ if oldToken is not None:
+ self.type = oldToken.type
+ self.line = oldToken.line
+ self.charPositionInLine = oldToken.charPositionInLine
+ self.channel = oldToken.channel
+ self.index = oldToken.index
+ self._text = oldToken._text
+ if isinstance(oldToken, CommonToken):
+ self.input = oldToken.input
+ self.start = oldToken.start
+ self.stop = oldToken.stop
+
+ else:
+ self.type = type
+ self.input = input
+ self.charPositionInLine = -1 # set to invalid position
+ self.line = 0
+ self.channel = channel
+
+ #What token number is this from 0..n-1 tokens; < 0 implies invalid index
+ self.index = -1
+
+ # We need to be able to change the text once in a while. If
+ # this is non-null, then getText should return this. Note that
+ # start/stop are not affected by changing this.
+ self._text = text
+
+ # The char position into the input buffer where this token starts
+ self.start = start
+
+ # The char position into the input buffer where this token stops
+ # This is the index of the last char, *not* the index after it!
+ self.stop = stop
+
+
+ def getText(self):
+ if self._text is not None:
+ return self._text
+
+ if self.input is None:
+ return None
+
+ return self.input.substring(self.start, self.stop)
+
+
+ def setText(self, text):
+ """
+ Override the text for this token. getText() will return this text
+ rather than pulling from the buffer. Note that this does not mean
+ that start/stop indexes are not valid. It means that that input
+ was converted to a new string in the token object.
+ """
+ self._text = text
+
+ text = property(getText, setText)
+
+
+ def getType(self):
+ return self.type
+
+ def setType(self, ttype):
+ self.type = ttype
+
+
+ def getLine(self):
+ return self.line
+
+ def setLine(self, line):
+ self.line = line
+
+
+ def getCharPositionInLine(self):
+ return self.charPositionInLine
+
+ def setCharPositionInLine(self, pos):
+ self.charPositionInLine = pos
+
+
+ def getChannel(self):
+ return self.channel
+
+ def setChannel(self, channel):
+ self.channel = channel
+
+
+ def getTokenIndex(self):
+ return self.index
+
+ def setTokenIndex(self, index):
+ self.index = index
+
+
+ def getInputStream(self):
+ return self.input
+
+ def setInputStream(self, input):
+ self.input = input
+
+
+ def __str__(self):
+ if self.type == EOF:
+ return "<EOF>"
+
+ channelStr = ""
+ if self.channel > 0:
+ channelStr = ",channel=" + str(self.channel)
+
+ txt = self.text
+ if txt is not None:
+ txt = txt.replace("\n","\\\\n")
+ txt = txt.replace("\r","\\\\r")
+ txt = txt.replace("\t","\\\\t")
+ else:
+ txt = "<no text>"
+
+ return "[@%d,%d:%d=%r,<%d>%s,%d:%d]" % (
+ self.index,
+ self.start, self.stop,
+ txt,
+ self.type, channelStr,
+ self.line, self.charPositionInLine
+ )
+
+
+class ClassicToken(Token):
+ """@brief Alternative token implementation.
+
+ A Token object like we'd use in ANTLR 2.x; has an actual string created
+ and associated with this object. These objects are needed for imaginary
+ tree nodes that have payload objects. We need to create a Token object
+ that has a string; the tree node will point at this token. CommonToken
+ has indexes into a char stream and hence cannot be used to introduce
+ new strings.
+ """
+
+ def __init__(self, type=None, text=None, channel=DEFAULT_CHANNEL,
+ oldToken=None
+ ):
+ Token.__init__(self)
+
+ if oldToken is not None:
+ self.text = oldToken.text
+ self.type = oldToken.type
+ self.line = oldToken.line
+ self.charPositionInLine = oldToken.charPositionInLine
+ self.channel = oldToken.channel
+
+ self.text = text
+ self.type = type
+ self.line = None
+ self.charPositionInLine = None
+ self.channel = channel
+ self.index = None
+
+
+ def getText(self):
+ return self.text
+
+ def setText(self, text):
+ self.text = text
+
+
+ def getType(self):
+ return self.type
+
+ def setType(self, ttype):
+ self.type = ttype
+
+
+ def getLine(self):
+ return self.line
+
+ def setLine(self, line):
+ self.line = line
+
+
+ def getCharPositionInLine(self):
+ return self.charPositionInLine
+
+ def setCharPositionInLine(self, pos):
+ self.charPositionInLine = pos
+
+
+ def getChannel(self):
+ return self.channel
+
+ def setChannel(self, channel):
+ self.channel = channel
+
+
+ def getTokenIndex(self):
+ return self.index
+
+ def setTokenIndex(self, index):
+ self.index = index
+
+
+ def getInputStream(self):
+ return None
+
+ def setInputStream(self, input):
+ pass
+
+
+ def toString(self):
+ channelStr = ""
+ if self.channel > 0:
+ channelStr = ",channel=" + str(self.channel)
+
+ txt = self.text
+ if txt is None:
+ txt = "<no text>"
+
+ return "[@%r,%r,<%r>%s,%r:%r]" % (self.index,
+ txt,
+ self.type,
+ channelStr,
+ self.line,
+ self.charPositionInLine
+ )
+
+
+ __str__ = toString
+ __repr__ = toString
+
+
+
+EOF_TOKEN = CommonToken(type=EOF)
+
+INVALID_TOKEN = CommonToken(type=INVALID_TOKEN_TYPE)
+
+# In an action, a lexer rule can set token to this SKIP_TOKEN and ANTLR
+# will avoid creating a token for this symbol and try to fetch another.
+SKIP_TOKEN = CommonToken(type=INVALID_TOKEN_TYPE)
+
+
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/tree.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/tree.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/tree.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,2702 @@
+""" @package antlr3.tree
+ at brief ANTLR3 runtime package, tree module
+
+This module contains all support classes for AST construction and tree parsers.
+
+"""
+
+# begin[licence]
+#
+# [The "BSD licence"]
+# Copyright (c) 2005-2008 Terence Parr
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# end[licence]
+
+# lot's of docstrings are missing, don't complain for now...
+# pylint: disable-msg=C0111
+
+import re
+
+from antlr3.constants import UP, DOWN, EOF, INVALID_TOKEN_TYPE
+from antlr3.recognizers import BaseRecognizer, RuleReturnScope
+from antlr3.streams import IntStream
+from antlr3.tokens import CommonToken, Token, INVALID_TOKEN
+from antlr3.exceptions import MismatchedTreeNodeException, \
+ MissingTokenException, UnwantedTokenException, MismatchedTokenException, \
+ NoViableAltException
+
+
+############################################################################
+#
+# tree related exceptions
+#
+############################################################################
+
+
+class RewriteCardinalityException(RuntimeError):
+ """
+ @brief Base class for all exceptions thrown during AST rewrite construction.
+
+ This signifies a case where the cardinality of two or more elements
+ in a subrule are different: (ID INT)+ where |ID|!=|INT|
+ """
+
+ def __init__(self, elementDescription):
+ RuntimeError.__init__(self, elementDescription)
+
+ self.elementDescription = elementDescription
+
+
+ def getMessage(self):
+ return self.elementDescription
+
+
+class RewriteEarlyExitException(RewriteCardinalityException):
+ """@brief No elements within a (...)+ in a rewrite rule"""
+
+ def __init__(self, elementDescription=None):
+ RewriteCardinalityException.__init__(self, elementDescription)
+
+
+class RewriteEmptyStreamException(RewriteCardinalityException):
+ """
+ @brief Ref to ID or expr but no tokens in ID stream or subtrees in expr stream
+ """
+
+ pass
+
+
+############################################################################
+#
+# basic Tree and TreeAdaptor interfaces
+#
+############################################################################
+
+class Tree(object):
+ """
+ @brief Abstract baseclass for tree nodes.
+
+ What does a tree look like? ANTLR has a number of support classes
+ such as CommonTreeNodeStream that work on these kinds of trees. You
+ don't have to make your trees implement this interface, but if you do,
+ you'll be able to use more support code.
+
+ NOTE: When constructing trees, ANTLR can build any kind of tree; it can
+ even use Token objects as trees if you add a child list to your tokens.
+
+ This is a tree node without any payload; just navigation and factory stuff.
+ """
+
+
+ def getChild(self, i):
+ raise NotImplementedError
+
+
+ def getChildCount(self):
+ raise NotImplementedError
+
+
+ def getParent(self):
+ """Tree tracks parent and child index now > 3.0"""
+
+ raise NotImplementedError
+
+ def setParent(self, t):
+ """Tree tracks parent and child index now > 3.0"""
+
+ raise NotImplementedError
+
+
+ def hasAncestor(self, ttype):
+ """Walk upwards looking for ancestor with this token type."""
+
+ raise NotImplementedError
+
+ def getAncestor(self, ttype):
+ """Walk upwards and get first ancestor with this token type."""
+
+ raise NotImplementedError
+
+ def getAncestors(self):
+ """Return a list of all ancestors of this node.
+
+ The first node of list is the root and the last is the parent of
+ this node.
+ """
+
+ raise NotImplementedError
+
+
+ def getChildIndex(self):
+ """This node is what child index? 0..n-1"""
+
+ raise NotImplementedError
+
+ def setChildIndex(self, index):
+ """This node is what child index? 0..n-1"""
+
+ raise NotImplementedError
+
+
+ def freshenParentAndChildIndexes(self):
+ """Set the parent and child index values for all children"""
+
+ raise NotImplementedError
+
+
+ def addChild(self, t):
+ """
+ Add t as a child to this node. If t is null, do nothing. If t
+ is nil, add all children of t to this' children.
+ """
+
+ raise NotImplementedError
+
+
+ def setChild(self, i, t):
+ """Set ith child (0..n-1) to t; t must be non-null and non-nil node"""
+
+ raise NotImplementedError
+
+
+ def deleteChild(self, i):
+ raise NotImplementedError
+
+
+ def replaceChildren(self, startChildIndex, stopChildIndex, t):
+ """
+ Delete children from start to stop and replace with t even if t is
+ a list (nil-root tree). num of children can increase or decrease.
+ For huge child lists, inserting children can force walking rest of
+ children to set their childindex; could be slow.
+ """
+
+ raise NotImplementedError
+
+
+ def isNil(self):
+ """
+ Indicates the node is a nil node but may still have children, meaning
+ the tree is a flat list.
+ """
+
+ raise NotImplementedError
+
+
+ def getTokenStartIndex(self):
+ """
+ What is the smallest token index (indexing from 0) for this node
+ and its children?
+ """
+
+ raise NotImplementedError
+
+
+ def setTokenStartIndex(self, index):
+ raise NotImplementedError
+
+
+ def getTokenStopIndex(self):
+ """
+ What is the largest token index (indexing from 0) for this node
+ and its children?
+ """
+
+ raise NotImplementedError
+
+
+ def setTokenStopIndex(self, index):
+ raise NotImplementedError
+
+
+ def dupNode(self):
+ raise NotImplementedError
+
+
+ def getType(self):
+ """Return a token type; needed for tree parsing."""
+
+ raise NotImplementedError
+
+
+ def getText(self):
+ raise NotImplementedError
+
+
+ def getLine(self):
+ """
+ In case we don't have a token payload, what is the line for errors?
+ """
+
+ raise NotImplementedError
+
+
+ def getCharPositionInLine(self):
+ raise NotImplementedError
+
+
+ def toStringTree(self):
+ raise NotImplementedError
+
+
+ def toString(self):
+ raise NotImplementedError
+
+
+
+class TreeAdaptor(object):
+ """
+ @brief Abstract baseclass for tree adaptors.
+
+ How to create and navigate trees. Rather than have a separate factory
+ and adaptor, I've merged them. Makes sense to encapsulate.
+
+ This takes the place of the tree construction code generated in the
+ generated code in 2.x and the ASTFactory.
+
+ I do not need to know the type of a tree at all so they are all
+ generic Objects. This may increase the amount of typecasting needed. :(
+ """
+
+ # C o n s t r u c t i o n
+
+ def createWithPayload(self, payload):
+ """
+ Create a tree node from Token object; for CommonTree type trees,
+ then the token just becomes the payload. This is the most
+ common create call.
+
+ Override if you want another kind of node to be built.
+ """
+
+ raise NotImplementedError
+
+
+ def dupNode(self, treeNode):
+ """Duplicate a single tree node.
+
+ Override if you want another kind of node to be built."""
+
+ raise NotImplementedError
+
+
+ def dupTree(self, tree):
+ """Duplicate tree recursively, using dupNode() for each node"""
+
+ raise NotImplementedError
+
+
+ def nil(self):
+ """
+ Return a nil node (an empty but non-null node) that can hold
+ a list of element as the children. If you want a flat tree (a list)
+ use "t=adaptor.nil(); t.addChild(x); t.addChild(y);"
+ """
+
+ raise NotImplementedError
+
+
+ def errorNode(self, input, start, stop, exc):
+ """
+ Return a tree node representing an error. This node records the
+ tokens consumed during error recovery. The start token indicates the
+ input symbol at which the error was detected. The stop token indicates
+ the last symbol consumed during recovery.
+
+ You must specify the input stream so that the erroneous text can
+ be packaged up in the error node. The exception could be useful
+ to some applications; default implementation stores ptr to it in
+ the CommonErrorNode.
+
+ This only makes sense during token parsing, not tree parsing.
+ Tree parsing should happen only when parsing and tree construction
+ succeed.
+ """
+
+ raise NotImplementedError
+
+
+ def isNil(self, tree):
+ """Is tree considered a nil node used to make lists of child nodes?"""
+
+ raise NotImplementedError
+
+
+ def addChild(self, t, child):
+ """
+ Add a child to the tree t. If child is a flat tree (a list), make all
+ in list children of t. Warning: if t has no children, but child does
+ and child isNil then you can decide it is ok to move children to t via
+ t.children = child.children; i.e., without copying the array. Just
+ make sure that this is consistent with have the user will build
+ ASTs. Do nothing if t or child is null.
+ """
+
+ raise NotImplementedError
+
+
+ def becomeRoot(self, newRoot, oldRoot):
+ """
+ If oldRoot is a nil root, just copy or move the children to newRoot.
+ If not a nil root, make oldRoot a child of newRoot.
+
+ old=^(nil a b c), new=r yields ^(r a b c)
+ old=^(a b c), new=r yields ^(r ^(a b c))
+
+ If newRoot is a nil-rooted single child tree, use the single
+ child as the new root node.
+
+ old=^(nil a b c), new=^(nil r) yields ^(r a b c)
+ old=^(a b c), new=^(nil r) yields ^(r ^(a b c))
+
+ If oldRoot was null, it's ok, just return newRoot (even if isNil).
+
+ old=null, new=r yields r
+ old=null, new=^(nil r) yields ^(nil r)
+
+ Return newRoot. Throw an exception if newRoot is not a
+ simple node or nil root with a single child node--it must be a root
+ node. If newRoot is ^(nil x) return x as newRoot.
+
+ Be advised that it's ok for newRoot to point at oldRoot's
+ children; i.e., you don't have to copy the list. We are
+ constructing these nodes so we should have this control for
+ efficiency.
+ """
+
+ raise NotImplementedError
+
+
+ def rulePostProcessing(self, root):
+ """
+ Given the root of the subtree created for this rule, post process
+ it to do any simplifications or whatever you want. A required
+ behavior is to convert ^(nil singleSubtree) to singleSubtree
+ as the setting of start/stop indexes relies on a single non-nil root
+ for non-flat trees.
+
+ Flat trees such as for lists like "idlist : ID+ ;" are left alone
+ unless there is only one ID. For a list, the start/stop indexes
+ are set in the nil node.
+
+ This method is executed after all rule tree construction and right
+ before setTokenBoundaries().
+ """
+
+ raise NotImplementedError
+
+
+ def getUniqueID(self, node):
+ """For identifying trees.
+
+ How to identify nodes so we can say "add node to a prior node"?
+ Even becomeRoot is an issue. Use System.identityHashCode(node)
+ usually.
+ """
+
+ raise NotImplementedError
+
+
+ # R e w r i t e R u l e s
+
+ def createFromToken(self, tokenType, fromToken, text=None):
+ """
+ Create a new node derived from a token, with a new token type and
+ (optionally) new text.
+
+ This is invoked from an imaginary node ref on right side of a
+ rewrite rule as IMAG[$tokenLabel] or IMAG[$tokenLabel "IMAG"].
+
+ This should invoke createToken(Token).
+ """
+
+ raise NotImplementedError
+
+
+ def createFromType(self, tokenType, text):
+ """Create a new node derived from a token, with a new token type.
+
+ This is invoked from an imaginary node ref on right side of a
+ rewrite rule as IMAG["IMAG"].
+
+ This should invoke createToken(int,String).
+ """
+
+ raise NotImplementedError
+
+
+ # C o n t e n t
+
+ def getType(self, t):
+ """For tree parsing, I need to know the token type of a node"""
+
+ raise NotImplementedError
+
+
+ def setType(self, t, type):
+ """Node constructors can set the type of a node"""
+
+ raise NotImplementedError
+
+
+ def getText(self, t):
+ raise NotImplementedError
+
+ def setText(self, t, text):
+ """Node constructors can set the text of a node"""
+
+ raise NotImplementedError
+
+
+ def getToken(self, t):
+ """Return the token object from which this node was created.
+
+ Currently used only for printing an error message.
+ The error display routine in BaseRecognizer needs to
+ display where the input the error occurred. If your
+ tree of limitation does not store information that can
+ lead you to the token, you can create a token filled with
+ the appropriate information and pass that back. See
+ BaseRecognizer.getErrorMessage().
+ """
+
+ raise NotImplementedError
+
+
+ def setTokenBoundaries(self, t, startToken, stopToken):
+ """
+ Where are the bounds in the input token stream for this node and
+ all children? Each rule that creates AST nodes will call this
+ method right before returning. Flat trees (i.e., lists) will
+ still usually have a nil root node just to hold the children list.
+ That node would contain the start/stop indexes then.
+ """
+
+ raise NotImplementedError
+
+
+ def getTokenStartIndex(self, t):
+ """
+ Get the token start index for this subtree; return -1 if no such index
+ """
+
+ raise NotImplementedError
+
+
+ def getTokenStopIndex(self, t):
+ """
+ Get the token stop index for this subtree; return -1 if no such index
+ """
+
+ raise NotImplementedError
+
+
+ # N a v i g a t i o n / T r e e P a r s i n g
+
+ def getChild(self, t, i):
+ """Get a child 0..n-1 node"""
+
+ raise NotImplementedError
+
+
+ def setChild(self, t, i, child):
+ """Set ith child (0..n-1) to t; t must be non-null and non-nil node"""
+
+ raise NotImplementedError
+
+
+ def deleteChild(self, t, i):
+ """Remove ith child and shift children down from right."""
+
+ raise NotImplementedError
+
+
+ def getChildCount(self, t):
+ """How many children? If 0, then this is a leaf node"""
+
+ raise NotImplementedError
+
+
+ def getParent(self, t):
+ """
+ Who is the parent node of this node; if null, implies node is root.
+ If your node type doesn't handle this, it's ok but the tree rewrites
+ in tree parsers need this functionality.
+ """
+
+ raise NotImplementedError
+
+
+ def setParent(self, t, parent):
+ """
+ Who is the parent node of this node; if null, implies node is root.
+ If your node type doesn't handle this, it's ok but the tree rewrites
+ in tree parsers need this functionality.
+ """
+
+ raise NotImplementedError
+
+
+ def getChildIndex(self, t):
+ """
+ What index is this node in the child list? Range: 0..n-1
+ If your node type doesn't handle this, it's ok but the tree rewrites
+ in tree parsers need this functionality.
+ """
+
+ raise NotImplementedError
+
+
+ def setChildIndex(self, t, index):
+ """
+ What index is this node in the child list? Range: 0..n-1
+ If your node type doesn't handle this, it's ok but the tree rewrites
+ in tree parsers need this functionality.
+ """
+
+ raise NotImplementedError
+
+
+ def replaceChildren(self, parent, startChildIndex, stopChildIndex, t):
+ """
+ Replace from start to stop child index of parent with t, which might
+ be a list. Number of children may be different
+ after this call.
+
+ If parent is null, don't do anything; must be at root of overall tree.
+ Can't replace whatever points to the parent externally. Do nothing.
+ """
+
+ raise NotImplementedError
+
+
+ # Misc
+
+ def create(self, *args):
+ """
+ Deprecated, use createWithPayload, createFromToken or createFromType.
+
+ This method only exists to mimic the Java interface of TreeAdaptor.
+
+ """
+
+ if len(args) == 1 and isinstance(args[0], Token):
+ # Object create(Token payload);
+## warnings.warn(
+## "Using create() is deprecated, use createWithPayload()",
+## DeprecationWarning,
+## stacklevel=2
+## )
+ return self.createWithPayload(args[0])
+
+ if (len(args) == 2
+ and isinstance(args[0], (int, long))
+ and isinstance(args[1], Token)
+ ):
+ # Object create(int tokenType, Token fromToken);
+## warnings.warn(
+## "Using create() is deprecated, use createFromToken()",
+## DeprecationWarning,
+## stacklevel=2
+## )
+ return self.createFromToken(args[0], args[1])
+
+ if (len(args) == 3
+ and isinstance(args[0], (int, long))
+ and isinstance(args[1], Token)
+ and isinstance(args[2], basestring)
+ ):
+ # Object create(int tokenType, Token fromToken, String text);
+## warnings.warn(
+## "Using create() is deprecated, use createFromToken()",
+## DeprecationWarning,
+## stacklevel=2
+## )
+ return self.createFromToken(args[0], args[1], args[2])
+
+ if (len(args) == 2
+ and isinstance(args[0], (int, long))
+ and isinstance(args[1], basestring)
+ ):
+ # Object create(int tokenType, String text);
+## warnings.warn(
+## "Using create() is deprecated, use createFromType()",
+## DeprecationWarning,
+## stacklevel=2
+## )
+ return self.createFromType(args[0], args[1])
+
+ raise TypeError(
+ "No create method with this signature found: %s"
+ % (', '.join(type(v).__name__ for v in args))
+ )
+
+
+############################################################################
+#
+# base implementation of Tree and TreeAdaptor
+#
+# Tree
+# \- BaseTree
+#
+# TreeAdaptor
+# \- BaseTreeAdaptor
+#
+############################################################################
+
+
+class BaseTree(Tree):
+ """
+ @brief A generic tree implementation with no payload.
+
+ You must subclass to
+ actually have any user data. ANTLR v3 uses a list of children approach
+ instead of the child-sibling approach in v2. A flat tree (a list) is
+ an empty node whose children represent the list. An empty, but
+ non-null node is called "nil".
+ """
+
+ # BaseTree is abstract, no need to complain about not implemented abstract
+ # methods
+ # pylint: disable-msg=W0223
+
+ def __init__(self, node=None):
+ """
+ Create a new node from an existing node does nothing for BaseTree
+ as there are no fields other than the children list, which cannot
+ be copied as the children are not considered part of this node.
+ """
+
+ Tree.__init__(self)
+ self.children = []
+ self.parent = None
+ self.childIndex = 0
+
+
+ def getChild(self, i):
+ try:
+ return self.children[i]
+ except IndexError:
+ return None
+
+
+ def getChildren(self):
+ """@brief Get the children internal List
+
+ Note that if you directly mess with
+ the list, do so at your own risk.
+ """
+
+ # FIXME: mark as deprecated
+ return self.children
+
+
+ def getFirstChildWithType(self, treeType):
+ for child in self.children:
+ if child.getType() == treeType:
+ return child
+
+ return None
+
+
+ def getChildCount(self):
+ return len(self.children)
+
+
+ def addChild(self, childTree):
+ """Add t as child of this node.
+
+ Warning: if t has no children, but child does
+ and child isNil then this routine moves children to t via
+ t.children = child.children; i.e., without copying the array.
+ """
+
+ # this implementation is much simpler and probably less efficient
+ # than the mumbo-jumbo that Ter did for the Java runtime.
+
+ if childTree is None:
+ return
+
+ if childTree.isNil():
+ # t is an empty node possibly with children
+
+ if self.children is childTree.children:
+ raise ValueError("attempt to add child list to itself")
+
+ # fix parent pointer and childIndex for new children
+ for idx, child in enumerate(childTree.children):
+ child.parent = self
+ child.childIndex = len(self.children) + idx
+
+ self.children += childTree.children
+
+ else:
+ # child is not nil (don't care about children)
+ self.children.append(childTree)
+ childTree.parent = self
+ childTree.childIndex = len(self.children) - 1
+
+
+ def addChildren(self, children):
+ """Add all elements of kids list as children of this node"""
+
+ self.children += children
+
+
+ def setChild(self, i, t):
+ if t is None:
+ return
+
+ if t.isNil():
+ raise ValueError("Can't set single child to a list")
+
+ self.children[i] = t
+ t.parent = self
+ t.childIndex = i
+
+
+ def deleteChild(self, i):
+ killed = self.children[i]
+
+ del self.children[i]
+
+ # walk rest and decrement their child indexes
+ for idx, child in enumerate(self.children[i:]):
+ child.childIndex = i + idx
+
+ return killed
+
+
+ def replaceChildren(self, startChildIndex, stopChildIndex, newTree):
+ """
+ Delete children from start to stop and replace with t even if t is
+ a list (nil-root tree). num of children can increase or decrease.
+ For huge child lists, inserting children can force walking rest of
+ children to set their childindex; could be slow.
+ """
+
+ if (startChildIndex >= len(self.children)
+ or stopChildIndex >= len(self.children)
+ ):
+ raise IndexError("indexes invalid")
+
+ replacingHowMany = stopChildIndex - startChildIndex + 1
+
+ # normalize to a list of children to add: newChildren
+ if newTree.isNil():
+ newChildren = newTree.children
+
+ else:
+ newChildren = [newTree]
+
+ replacingWithHowMany = len(newChildren)
+ delta = replacingHowMany - replacingWithHowMany
+
+
+ if delta == 0:
+ # if same number of nodes, do direct replace
+ for idx, child in enumerate(newChildren):
+ self.children[idx + startChildIndex] = child
+ child.parent = self
+ child.childIndex = idx + startChildIndex
+
+ else:
+ # length of children changes...
+
+ # ...delete replaced segment...
+ del self.children[startChildIndex:stopChildIndex+1]
+
+ # ...insert new segment...
+ self.children[startChildIndex:startChildIndex] = newChildren
+
+ # ...and fix indeces
+ self.freshenParentAndChildIndexes(startChildIndex)
+
+
+ def isNil(self):
+ return False
+
+
+ def freshenParentAndChildIndexes(self, offset=0):
+ for idx, child in enumerate(self.children[offset:]):
+ child.childIndex = idx + offset
+ child.parent = self
+
+
+ def sanityCheckParentAndChildIndexes(self, parent=None, i=-1):
+ if parent != self.parent:
+ raise ValueError(
+ "parents don't match; expected %r found %r"
+ % (parent, self.parent)
+ )
+
+ if i != self.childIndex:
+ raise ValueError(
+ "child indexes don't match; expected %d found %d"
+ % (i, self.childIndex)
+ )
+
+ for idx, child in enumerate(self.children):
+ child.sanityCheckParentAndChildIndexes(self, idx)
+
+
+ def getChildIndex(self):
+ """BaseTree doesn't track child indexes."""
+
+ return 0
+
+
+ def setChildIndex(self, index):
+ """BaseTree doesn't track child indexes."""
+
+ pass
+
+
+ def getParent(self):
+ """BaseTree doesn't track parent pointers."""
+
+ return None
+
+ def setParent(self, t):
+ """BaseTree doesn't track parent pointers."""
+
+ pass
+
+
+ def hasAncestor(self, ttype):
+ """Walk upwards looking for ancestor with this token type."""
+ return self.getAncestor(ttype) is not None
+
+ def getAncestor(self, ttype):
+ """Walk upwards and get first ancestor with this token type."""
+ t = self.getParent()
+ while t is not None:
+ if t.getType() == ttype:
+ return t
+ t = t.getParent()
+
+ return None
+
+ def getAncestors(self):
+ """Return a list of all ancestors of this node.
+
+ The first node of list is the root and the last is the parent of
+ this node.
+ """
+ if selfgetParent() is None:
+ return None
+
+ ancestors = []
+ t = self.getParent()
+ while t is not None:
+ ancestors.insert(0, t) # insert at start
+ t = t.getParent()
+
+ return ancestors
+
+
+ def toStringTree(self):
+ """Print out a whole tree not just a node"""
+
+ if len(self.children) == 0:
+ return self.toString()
+
+ buf = []
+ if not self.isNil():
+ buf.append('(')
+ buf.append(self.toString())
+ buf.append(' ')
+
+ for i, child in enumerate(self.children):
+ if i > 0:
+ buf.append(' ')
+ buf.append(child.toStringTree())
+
+ if not self.isNil():
+ buf.append(')')
+
+ return ''.join(buf)
+
+
+ def getLine(self):
+ return 0
+
+
+ def getCharPositionInLine(self):
+ return 0
+
+
+ def toString(self):
+ """Override to say how a node (not a tree) should look as text"""
+
+ raise NotImplementedError
+
+
+
+class BaseTreeAdaptor(TreeAdaptor):
+ """
+ @brief A TreeAdaptor that works with any Tree implementation.
+ """
+
+ # BaseTreeAdaptor is abstract, no need to complain about not implemented
+ # abstract methods
+ # pylint: disable-msg=W0223
+
+ def nil(self):
+ return self.createWithPayload(None)
+
+
+ def errorNode(self, input, start, stop, exc):
+ """
+ create tree node that holds the start and stop tokens associated
+ with an error.
+
+ If you specify your own kind of tree nodes, you will likely have to
+ override this method. CommonTree returns Token.INVALID_TOKEN_TYPE
+ if no token payload but you might have to set token type for diff
+ node type.
+
+ You don't have to subclass CommonErrorNode; you will likely need to
+ subclass your own tree node class to avoid class cast exception.
+ """
+
+ return CommonErrorNode(input, start, stop, exc)
+
+
+ def isNil(self, tree):
+ return tree.isNil()
+
+
+ def dupTree(self, t, parent=None):
+ """
+ This is generic in the sense that it will work with any kind of
+ tree (not just Tree interface). It invokes the adaptor routines
+ not the tree node routines to do the construction.
+ """
+
+ if t is None:
+ return None
+
+ newTree = self.dupNode(t)
+
+ # ensure new subtree root has parent/child index set
+
+ # same index in new tree
+ self.setChildIndex(newTree, self.getChildIndex(t))
+
+ self.setParent(newTree, parent)
+
+ for i in range(self.getChildCount(t)):
+ child = self.getChild(t, i)
+ newSubTree = self.dupTree(child, t)
+ self.addChild(newTree, newSubTree)
+
+ return newTree
+
+
+ def addChild(self, tree, child):
+ """
+ Add a child to the tree t. If child is a flat tree (a list), make all
+ in list children of t. Warning: if t has no children, but child does
+ and child isNil then you can decide it is ok to move children to t via
+ t.children = child.children; i.e., without copying the array. Just
+ make sure that this is consistent with have the user will build
+ ASTs.
+ """
+
+ #if isinstance(child, Token):
+ # child = self.createWithPayload(child)
+
+ if tree is not None and child is not None:
+ tree.addChild(child)
+
+
+ def becomeRoot(self, newRoot, oldRoot):
+ """
+ If oldRoot is a nil root, just copy or move the children to newRoot.
+ If not a nil root, make oldRoot a child of newRoot.
+
+ old=^(nil a b c), new=r yields ^(r a b c)
+ old=^(a b c), new=r yields ^(r ^(a b c))
+
+ If newRoot is a nil-rooted single child tree, use the single
+ child as the new root node.
+
+ old=^(nil a b c), new=^(nil r) yields ^(r a b c)
+ old=^(a b c), new=^(nil r) yields ^(r ^(a b c))
+
+ If oldRoot was null, it's ok, just return newRoot (even if isNil).
+
+ old=null, new=r yields r
+ old=null, new=^(nil r) yields ^(nil r)
+
+ Return newRoot. Throw an exception if newRoot is not a
+ simple node or nil root with a single child node--it must be a root
+ node. If newRoot is ^(nil x) return x as newRoot.
+
+ Be advised that it's ok for newRoot to point at oldRoot's
+ children; i.e., you don't have to copy the list. We are
+ constructing these nodes so we should have this control for
+ efficiency.
+ """
+
+ if isinstance(newRoot, Token):
+ newRoot = self.create(newRoot)
+
+ if oldRoot is None:
+ return newRoot
+
+ if not isinstance(newRoot, CommonTree):
+ newRoot = self.createWithPayload(newRoot)
+
+ # handle ^(nil real-node)
+ if newRoot.isNil():
+ nc = newRoot.getChildCount()
+ if nc == 1:
+ newRoot = newRoot.getChild(0)
+
+ elif nc > 1:
+ # TODO: make tree run time exceptions hierarchy
+ raise RuntimeError("more than one node as root")
+
+ # add oldRoot to newRoot; addChild takes care of case where oldRoot
+ # is a flat list (i.e., nil-rooted tree). All children of oldRoot
+ # are added to newRoot.
+ newRoot.addChild(oldRoot)
+ return newRoot
+
+
+ def rulePostProcessing(self, root):
+ """Transform ^(nil x) to x and nil to null"""
+
+ if root is not None and root.isNil():
+ if root.getChildCount() == 0:
+ root = None
+
+ elif root.getChildCount() == 1:
+ root = root.getChild(0)
+ # whoever invokes rule will set parent and child index
+ root.setParent(None)
+ root.setChildIndex(-1)
+
+ return root
+
+
+ def createFromToken(self, tokenType, fromToken, text=None):
+ assert isinstance(tokenType, (int, long)), type(tokenType).__name__
+ assert isinstance(fromToken, Token), type(fromToken).__name__
+ assert text is None or isinstance(text, basestring), type(text).__name__
+
+ fromToken = self.createToken(fromToken)
+ fromToken.type = tokenType
+ if text is not None:
+ fromToken.text = text
+ t = self.createWithPayload(fromToken)
+ return t
+
+
+ def createFromType(self, tokenType, text):
+ assert isinstance(tokenType, (int, long)), type(tokenType).__name__
+ assert isinstance(text, basestring) or text is None, type(text).__name__
+
+ fromToken = self.createToken(tokenType=tokenType, text=text)
+ t = self.createWithPayload(fromToken)
+ return t
+
+
+ def getType(self, t):
+ return t.getType()
+
+
+ def setType(self, t, type):
+ raise RuntimeError("don't know enough about Tree node")
+
+
+ def getText(self, t):
+ return t.getText()
+
+
+ def setText(self, t, text):
+ raise RuntimeError("don't know enough about Tree node")
+
+
+ def getChild(self, t, i):
+ return t.getChild(i)
+
+
+ def setChild(self, t, i, child):
+ t.setChild(i, child)
+
+
+ def deleteChild(self, t, i):
+ return t.deleteChild(i)
+
+
+ def getChildCount(self, t):
+ return t.getChildCount()
+
+
+ def getUniqueID(self, node):
+ return hash(node)
+
+
+ def createToken(self, fromToken=None, tokenType=None, text=None):
+ """
+ Tell me how to create a token for use with imaginary token nodes.
+ For example, there is probably no input symbol associated with imaginary
+ token DECL, but you need to create it as a payload or whatever for
+ the DECL node as in ^(DECL type ID).
+
+ If you care what the token payload objects' type is, you should
+ override this method and any other createToken variant.
+ """
+
+ raise NotImplementedError
+
+
+############################################################################
+#
+# common tree implementation
+#
+# Tree
+# \- BaseTree
+# \- CommonTree
+# \- CommonErrorNode
+#
+# TreeAdaptor
+# \- BaseTreeAdaptor
+# \- CommonTreeAdaptor
+#
+############################################################################
+
+
+class CommonTree(BaseTree):
+ """@brief A tree node that is wrapper for a Token object.
+
+ After 3.0 release
+ while building tree rewrite stuff, it became clear that computing
+ parent and child index is very difficult and cumbersome. Better to
+ spend the space in every tree node. If you don't want these extra
+ fields, it's easy to cut them out in your own BaseTree subclass.
+
+ """
+
+ def __init__(self, payload):
+ BaseTree.__init__(self)
+
+ # What token indexes bracket all tokens associated with this node
+ # and below?
+ self.startIndex = -1
+ self.stopIndex = -1
+
+ # Who is the parent node of this node; if null, implies node is root
+ self.parent = None
+
+ # What index is this node in the child list? Range: 0..n-1
+ self.childIndex = -1
+
+ # A single token is the payload
+ if payload is None:
+ self.token = None
+
+ elif isinstance(payload, CommonTree):
+ self.token = payload.token
+ self.startIndex = payload.startIndex
+ self.stopIndex = payload.stopIndex
+
+ elif payload is None or isinstance(payload, Token):
+ self.token = payload
+
+ else:
+ raise TypeError(type(payload).__name__)
+
+
+
+ def getToken(self):
+ return self.token
+
+
+ def dupNode(self):
+ return CommonTree(self)
+
+
+ def isNil(self):
+ return self.token is None
+
+
+ def getType(self):
+ if self.token is None:
+ return INVALID_TOKEN_TYPE
+
+ return self.token.getType()
+
+ type = property(getType)
+
+
+ def getText(self):
+ if self.token is None:
+ return None
+
+ return self.token.text
+
+ text = property(getText)
+
+
+ def getLine(self):
+ if self.token is None or self.token.getLine() == 0:
+ if self.getChildCount():
+ return self.getChild(0).getLine()
+ else:
+ return 0
+
+ return self.token.getLine()
+
+ line = property(getLine)
+
+
+ def getCharPositionInLine(self):
+ if self.token is None or self.token.getCharPositionInLine() == -1:
+ if self.getChildCount():
+ return self.getChild(0).getCharPositionInLine()
+ else:
+ return 0
+
+ else:
+ return self.token.getCharPositionInLine()
+
+ charPositionInLine = property(getCharPositionInLine)
+
+
+ def getTokenStartIndex(self):
+ if self.startIndex == -1 and self.token is not None:
+ return self.token.getTokenIndex()
+
+ return self.startIndex
+
+ def setTokenStartIndex(self, index):
+ self.startIndex = index
+
+ tokenStartIndex = property(getTokenStartIndex, setTokenStartIndex)
+
+
+ def getTokenStopIndex(self):
+ if self.stopIndex == -1 and self.token is not None:
+ return self.token.getTokenIndex()
+
+ return self.stopIndex
+
+ def setTokenStopIndex(self, index):
+ self.stopIndex = index
+
+ tokenStopIndex = property(getTokenStopIndex, setTokenStopIndex)
+
+
+ def setUnknownTokenBoundaries(self):
+ """For every node in this subtree, make sure it's start/stop token's
+ are set. Walk depth first, visit bottom up. Only updates nodes
+ with at least one token index < 0.
+ """
+
+ if self.children is None:
+ if self.startIndex < 0 or self.stopIndex < 0:
+ self.startIndex = self.stopIndex = self.token.getTokenIndex()
+
+ return
+
+ for child in self.children:
+ child.setUnknownTokenBoundaries()
+
+ if self.startIndex >= 0 and self.stopIndex >= 0:
+ # already set
+ return
+
+ if self.children:
+ firstChild = self.children[0]
+ lastChild = self.children[-1]
+ self.startIndex = firstChild.getTokenStartIndex()
+ self.stopIndex = lastChild.getTokenStopIndex()
+
+
+ def getChildIndex(self):
+ #FIXME: mark as deprecated
+ return self.childIndex
+
+
+ def setChildIndex(self, idx):
+ #FIXME: mark as deprecated
+ self.childIndex = idx
+
+
+ def getParent(self):
+ #FIXME: mark as deprecated
+ return self.parent
+
+
+ def setParent(self, t):
+ #FIXME: mark as deprecated
+ self.parent = t
+
+
+ def toString(self):
+ if self.isNil():
+ return "nil"
+
+ if self.getType() == INVALID_TOKEN_TYPE:
+ return "<errornode>"
+
+ return self.token.text
+
+ __str__ = toString
+
+
+
+ def toStringTree(self):
+ if not self.children:
+ return self.toString()
+
+ ret = ''
+ if not self.isNil():
+ ret += '(%s ' % (self.toString())
+
+ ret += ' '.join([child.toStringTree() for child in self.children])
+
+ if not self.isNil():
+ ret += ')'
+
+ return ret
+
+
+INVALID_NODE = CommonTree(INVALID_TOKEN)
+
+
+class CommonErrorNode(CommonTree):
+ """A node representing erroneous token range in token stream"""
+
+ def __init__(self, input, start, stop, exc):
+ CommonTree.__init__(self, None)
+
+ if (stop is None or
+ (stop.getTokenIndex() < start.getTokenIndex() and
+ stop.getType() != EOF
+ )
+ ):
+ # sometimes resync does not consume a token (when LT(1) is
+ # in follow set. So, stop will be 1 to left to start. adjust.
+ # Also handle case where start is the first token and no token
+ # is consumed during recovery; LT(-1) will return null.
+ stop = start
+
+ self.input = input
+ self.start = start
+ self.stop = stop
+ self.trappedException = exc
+
+
+ def isNil(self):
+ return False
+
+
+ def getType(self):
+ return INVALID_TOKEN_TYPE
+
+
+ def getText(self):
+ if isinstance(self.start, Token):
+ i = self.start.getTokenIndex()
+ j = self.stop.getTokenIndex()
+ if self.stop.getType() == EOF:
+ j = self.input.size()
+
+ badText = self.input.toString(i, j)
+
+ elif isinstance(self.start, Tree):
+ badText = self.input.toString(self.start, self.stop)
+
+ else:
+ # people should subclass if they alter the tree type so this
+ # next one is for sure correct.
+ badText = "<unknown>"
+
+ return badText
+
+
+ def toString(self):
+ if isinstance(self.trappedException, MissingTokenException):
+ return ("<missing type: "
+ + str(self.trappedException.getMissingType())
+ + ">")
+
+ elif isinstance(self.trappedException, UnwantedTokenException):
+ return ("<extraneous: "
+ + str(self.trappedException.getUnexpectedToken())
+ + ", resync=" + self.getText() + ">")
+
+ elif isinstance(self.trappedException, MismatchedTokenException):
+ return ("<mismatched token: "
+ + str(self.trappedException.token)
+ + ", resync=" + self.getText() + ">")
+
+ elif isinstance(self.trappedException, NoViableAltException):
+ return ("<unexpected: "
+ + str(self.trappedException.token)
+ + ", resync=" + self.getText() + ">")
+
+ return "<error: "+self.getText()+">"
+
+
+class CommonTreeAdaptor(BaseTreeAdaptor):
+ """
+ @brief A TreeAdaptor that works with any Tree implementation.
+
+ It provides
+ really just factory methods; all the work is done by BaseTreeAdaptor.
+ If you would like to have different tokens created than ClassicToken
+ objects, you need to override this and then set the parser tree adaptor to
+ use your subclass.
+
+ To get your parser to build nodes of a different type, override
+ create(Token), errorNode(), and to be safe, YourTreeClass.dupNode().
+ dupNode is called to duplicate nodes during rewrite operations.
+ """
+
+ def dupNode(self, treeNode):
+ """
+ Duplicate a node. This is part of the factory;
+ override if you want another kind of node to be built.
+
+ I could use reflection to prevent having to override this
+ but reflection is slow.
+ """
+
+ if treeNode is None:
+ return None
+
+ return treeNode.dupNode()
+
+
+ def createWithPayload(self, payload):
+ return CommonTree(payload)
+
+
+ def createToken(self, fromToken=None, tokenType=None, text=None):
+ """
+ Tell me how to create a token for use with imaginary token nodes.
+ For example, there is probably no input symbol associated with imaginary
+ token DECL, but you need to create it as a payload or whatever for
+ the DECL node as in ^(DECL type ID).
+
+ If you care what the token payload objects' type is, you should
+ override this method and any other createToken variant.
+ """
+
+ if fromToken is not None:
+ return CommonToken(oldToken=fromToken)
+
+ return CommonToken(type=tokenType, text=text)
+
+
+ def setTokenBoundaries(self, t, startToken, stopToken):
+ """
+ Track start/stop token for subtree root created for a rule.
+ Only works with Tree nodes. For rules that match nothing,
+ seems like this will yield start=i and stop=i-1 in a nil node.
+ Might be useful info so I'll not force to be i..i.
+ """
+
+ if t is None:
+ return
+
+ start = 0
+ stop = 0
+
+ if startToken is not None:
+ start = startToken.index
+
+ if stopToken is not None:
+ stop = stopToken.index
+
+ t.setTokenStartIndex(start)
+ t.setTokenStopIndex(stop)
+
+
+ def getTokenStartIndex(self, t):
+ if t is None:
+ return -1
+ return t.getTokenStartIndex()
+
+
+ def getTokenStopIndex(self, t):
+ if t is None:
+ return -1
+ return t.getTokenStopIndex()
+
+
+ def getText(self, t):
+ if t is None:
+ return None
+ return t.getText()
+
+
+ def getType(self, t):
+ if t is None:
+ return INVALID_TOKEN_TYPE
+
+ return t.getType()
+
+
+ def getToken(self, t):
+ """
+ What is the Token associated with this node? If
+ you are not using CommonTree, then you must
+ override this in your own adaptor.
+ """
+
+ if isinstance(t, CommonTree):
+ return t.getToken()
+
+ return None # no idea what to do
+
+
+ def getChild(self, t, i):
+ if t is None:
+ return None
+ return t.getChild(i)
+
+
+ def getChildCount(self, t):
+ if t is None:
+ return 0
+ return t.getChildCount()
+
+
+ def getParent(self, t):
+ return t.getParent()
+
+
+ def setParent(self, t, parent):
+ t.setParent(parent)
+
+
+ def getChildIndex(self, t):
+ if t is None:
+ return 0
+ return t.getChildIndex()
+
+
+ def setChildIndex(self, t, index):
+ t.setChildIndex(index)
+
+
+ def replaceChildren(self, parent, startChildIndex, stopChildIndex, t):
+ if parent is not None:
+ parent.replaceChildren(startChildIndex, stopChildIndex, t)
+
+
+############################################################################
+#
+# streams
+#
+# TreeNodeStream
+# \- BaseTree
+# \- CommonTree
+#
+# TreeAdaptor
+# \- BaseTreeAdaptor
+# \- CommonTreeAdaptor
+#
+############################################################################
+
+
+
+class TreeNodeStream(IntStream):
+ """@brief A stream of tree nodes
+
+ It accessing nodes from a tree of some kind.
+ """
+
+ # TreeNodeStream is abstract, no need to complain about not implemented
+ # abstract methods
+ # pylint: disable-msg=W0223
+
+ def get(self, i):
+ """Get a tree node at an absolute index i; 0..n-1.
+ If you don't want to buffer up nodes, then this method makes no
+ sense for you.
+ """
+
+ raise NotImplementedError
+
+
+ def LT(self, k):
+ """
+ Get tree node at current input pointer + i ahead where i=1 is next node.
+ i<0 indicates nodes in the past. So LT(-1) is previous node, but
+ implementations are not required to provide results for k < -1.
+ LT(0) is undefined. For i>=n, return null.
+ Return null for LT(0) and any index that results in an absolute address
+ that is negative.
+
+ This is analogus to the LT() method of the TokenStream, but this
+ returns a tree node instead of a token. Makes code gen identical
+ for both parser and tree grammars. :)
+ """
+
+ raise NotImplementedError
+
+
+ def getTreeSource(self):
+ """
+ Where is this stream pulling nodes from? This is not the name, but
+ the object that provides node objects.
+ """
+
+ raise NotImplementedError
+
+
+ def getTokenStream(self):
+ """
+ If the tree associated with this stream was created from a TokenStream,
+ you can specify it here. Used to do rule $text attribute in tree
+ parser. Optional unless you use tree parser rule text attribute
+ or output=template and rewrite=true options.
+ """
+
+ raise NotImplementedError
+
+
+ def getTreeAdaptor(self):
+ """
+ What adaptor can tell me how to interpret/navigate nodes and
+ trees. E.g., get text of a node.
+ """
+
+ raise NotImplementedError
+
+
+ def setUniqueNavigationNodes(self, uniqueNavigationNodes):
+ """
+ As we flatten the tree, we use UP, DOWN nodes to represent
+ the tree structure. When debugging we need unique nodes
+ so we have to instantiate new ones. When doing normal tree
+ parsing, it's slow and a waste of memory to create unique
+ navigation nodes. Default should be false;
+ """
+
+ raise NotImplementedError
+
+
+ def toString(self, start, stop):
+ """
+ Return the text of all nodes from start to stop, inclusive.
+ If the stream does not buffer all the nodes then it can still
+ walk recursively from start until stop. You can always return
+ null or "" too, but users should not access $ruleLabel.text in
+ an action of course in that case.
+ """
+
+ raise NotImplementedError
+
+
+ # REWRITING TREES (used by tree parser)
+ def replaceChildren(self, parent, startChildIndex, stopChildIndex, t):
+ """
+ Replace from start to stop child index of parent with t, which might
+ be a list. Number of children may be different
+ after this call. The stream is notified because it is walking the
+ tree and might need to know you are monkeying with the underlying
+ tree. Also, it might be able to modify the node stream to avoid
+ restreaming for future phases.
+
+ If parent is null, don't do anything; must be at root of overall tree.
+ Can't replace whatever points to the parent externally. Do nothing.
+ """
+
+ raise NotImplementedError
+
+
+class CommonTreeNodeStream(TreeNodeStream):
+ """@brief A buffered stream of tree nodes.
+
+ Nodes can be from a tree of ANY kind.
+
+ This node stream sucks all nodes out of the tree specified in
+ the constructor during construction and makes pointers into
+ the tree using an array of Object pointers. The stream necessarily
+ includes pointers to DOWN and UP and EOF nodes.
+
+ This stream knows how to mark/release for backtracking.
+
+ This stream is most suitable for tree interpreters that need to
+ jump around a lot or for tree parsers requiring speed (at cost of memory).
+ There is some duplicated functionality here with UnBufferedTreeNodeStream
+ but just in bookkeeping, not tree walking etc...
+
+ @see UnBufferedTreeNodeStream
+ """
+
+ def __init__(self, *args):
+ TreeNodeStream.__init__(self)
+
+ if len(args) == 1:
+ adaptor = CommonTreeAdaptor()
+ tree = args[0]
+
+ nodes = None
+ down = None
+ up = None
+ eof = None
+
+ elif len(args) == 2:
+ adaptor = args[0]
+ tree = args[1]
+
+ nodes = None
+ down = None
+ up = None
+ eof = None
+
+ elif len(args) == 3:
+ parent = args[0]
+ start = args[1]
+ stop = args[2]
+
+ adaptor = parent.adaptor
+ tree = parent.root
+
+ nodes = parent.nodes[start:stop]
+ down = parent.down
+ up = parent.up
+ eof = parent.eof
+
+ else:
+ raise TypeError("Invalid arguments")
+
+ # all these navigation nodes are shared and hence they
+ # cannot contain any line/column info
+ if down is not None:
+ self.down = down
+ else:
+ self.down = adaptor.createFromType(DOWN, "DOWN")
+
+ if up is not None:
+ self.up = up
+ else:
+ self.up = adaptor.createFromType(UP, "UP")
+
+ if eof is not None:
+ self.eof = eof
+ else:
+ self.eof = adaptor.createFromType(EOF, "EOF")
+
+ # The complete mapping from stream index to tree node.
+ # This buffer includes pointers to DOWN, UP, and EOF nodes.
+ # It is built upon ctor invocation. The elements are type
+ # Object as we don't what the trees look like.
+
+ # Load upon first need of the buffer so we can set token types
+ # of interest for reverseIndexing. Slows us down a wee bit to
+ # do all of the if p==-1 testing everywhere though.
+ if nodes is not None:
+ self.nodes = nodes
+ else:
+ self.nodes = []
+
+ # Pull nodes from which tree?
+ self.root = tree
+
+ # IF this tree (root) was created from a token stream, track it.
+ self.tokens = None
+
+ # What tree adaptor was used to build these trees
+ self.adaptor = adaptor
+
+ # Reuse same DOWN, UP navigation nodes unless this is true
+ self.uniqueNavigationNodes = False
+
+ # The index into the nodes list of the current node (next node
+ # to consume). If -1, nodes array not filled yet.
+ self.p = -1
+
+ # Track the last mark() call result value for use in rewind().
+ self.lastMarker = None
+
+ # Stack of indexes used for push/pop calls
+ self.calls = []
+
+
+ def fillBuffer(self):
+ """Walk tree with depth-first-search and fill nodes buffer.
+ Don't do DOWN, UP nodes if its a list (t is isNil).
+ """
+
+ self._fillBuffer(self.root)
+ self.p = 0 # buffer of nodes intialized now
+
+
+ def _fillBuffer(self, t):
+ nil = self.adaptor.isNil(t)
+
+ if not nil:
+ self.nodes.append(t) # add this node
+
+ # add DOWN node if t has children
+ n = self.adaptor.getChildCount(t)
+ if not nil and n > 0:
+ self.addNavigationNode(DOWN)
+
+ # and now add all its children
+ for c in range(n):
+ self._fillBuffer(self.adaptor.getChild(t, c))
+
+ # add UP node if t has children
+ if not nil and n > 0:
+ self.addNavigationNode(UP)
+
+
+ def getNodeIndex(self, node):
+ """What is the stream index for node? 0..n-1
+ Return -1 if node not found.
+ """
+
+ if self.p == -1:
+ self.fillBuffer()
+
+ for i, t in enumerate(self.nodes):
+ if t == node:
+ return i
+
+ return -1
+
+
+ def addNavigationNode(self, ttype):
+ """
+ As we flatten the tree, we use UP, DOWN nodes to represent
+ the tree structure. When debugging we need unique nodes
+ so instantiate new ones when uniqueNavigationNodes is true.
+ """
+
+ navNode = None
+
+ if ttype == DOWN:
+ if self.hasUniqueNavigationNodes():
+ navNode = self.adaptor.createFromType(DOWN, "DOWN")
+
+ else:
+ navNode = self.down
+
+ else:
+ if self.hasUniqueNavigationNodes():
+ navNode = self.adaptor.createFromType(UP, "UP")
+
+ else:
+ navNode = self.up
+
+ self.nodes.append(navNode)
+
+
+ def get(self, i):
+ if self.p == -1:
+ self.fillBuffer()
+
+ return self.nodes[i]
+
+
+ def LT(self, k):
+ if self.p == -1:
+ self.fillBuffer()
+
+ if k == 0:
+ return None
+
+ if k < 0:
+ return self.LB(-k)
+
+ if self.p + k - 1 >= len(self.nodes):
+ return self.eof
+
+ return self.nodes[self.p + k - 1]
+
+
+ def getCurrentSymbol(self):
+ return self.LT(1)
+
+
+ def LB(self, k):
+ """Look backwards k nodes"""
+
+ if k == 0:
+ return None
+
+ if self.p - k < 0:
+ return None
+
+ return self.nodes[self.p - k]
+
+
+ def getTreeSource(self):
+ return self.root
+
+
+ def getSourceName(self):
+ return self.getTokenStream().getSourceName()
+
+
+ def getTokenStream(self):
+ return self.tokens
+
+
+ def setTokenStream(self, tokens):
+ self.tokens = tokens
+
+
+ def getTreeAdaptor(self):
+ return self.adaptor
+
+
+ def hasUniqueNavigationNodes(self):
+ return self.uniqueNavigationNodes
+
+
+ def setUniqueNavigationNodes(self, uniqueNavigationNodes):
+ self.uniqueNavigationNodes = uniqueNavigationNodes
+
+
+ def consume(self):
+ if self.p == -1:
+ self.fillBuffer()
+
+ self.p += 1
+
+
+ def LA(self, i):
+ return self.adaptor.getType(self.LT(i))
+
+
+ def mark(self):
+ if self.p == -1:
+ self.fillBuffer()
+
+
+ self.lastMarker = self.index()
+ return self.lastMarker
+
+
+ def release(self, marker=None):
+ # no resources to release
+
+ pass
+
+
+ def index(self):
+ return self.p
+
+
+ def rewind(self, marker=None):
+ if marker is None:
+ marker = self.lastMarker
+
+ self.seek(marker)
+
+
+ def seek(self, index):
+ if self.p == -1:
+ self.fillBuffer()
+
+ self.p = index
+
+
+ def push(self, index):
+ """
+ Make stream jump to a new location, saving old location.
+ Switch back with pop().
+ """
+
+ self.calls.append(self.p) # save current index
+ self.seek(index)
+
+
+ def pop(self):
+ """
+ Seek back to previous index saved during last push() call.
+ Return top of stack (return index).
+ """
+
+ ret = self.calls.pop(-1)
+ self.seek(ret)
+ return ret
+
+
+ def reset(self):
+ self.p = 0
+ self.lastMarker = 0
+ self.calls = []
+
+
+ def size(self):
+ if self.p == -1:
+ self.fillBuffer()
+
+ return len(self.nodes)
+
+
+ # TREE REWRITE INTERFACE
+
+ def replaceChildren(self, parent, startChildIndex, stopChildIndex, t):
+ if parent is not None:
+ self.adaptor.replaceChildren(
+ parent, startChildIndex, stopChildIndex, t
+ )
+
+
+ def __str__(self):
+ """Used for testing, just return the token type stream"""
+
+ if self.p == -1:
+ self.fillBuffer()
+
+ return ' '.join([str(self.adaptor.getType(node))
+ for node in self.nodes
+ ])
+
+
+ def toString(self, start, stop):
+ if start is None or stop is None:
+ return None
+
+ if self.p == -1:
+ self.fillBuffer()
+
+ #System.out.println("stop: "+stop);
+ #if ( start instanceof CommonTree )
+ # System.out.print("toString: "+((CommonTree)start).getToken()+", ");
+ #else
+ # System.out.println(start);
+ #if ( stop instanceof CommonTree )
+ # System.out.println(((CommonTree)stop).getToken());
+ #else
+ # System.out.println(stop);
+
+ # if we have the token stream, use that to dump text in order
+ if self.tokens is not None:
+ beginTokenIndex = self.adaptor.getTokenStartIndex(start)
+ endTokenIndex = self.adaptor.getTokenStopIndex(stop)
+
+ # if it's a tree, use start/stop index from start node
+ # else use token range from start/stop nodes
+ if self.adaptor.getType(stop) == UP:
+ endTokenIndex = self.adaptor.getTokenStopIndex(start)
+
+ elif self.adaptor.getType(stop) == EOF:
+ endTokenIndex = self.size() -2 # don't use EOF
+
+ return self.tokens.toString(beginTokenIndex, endTokenIndex)
+
+ # walk nodes looking for start
+ i, t = 0, None
+ for i, t in enumerate(self.nodes):
+ if t == start:
+ break
+
+ # now walk until we see stop, filling string buffer with text
+ buf = []
+ t = self.nodes[i]
+ while t != stop:
+ text = self.adaptor.getText(t)
+ if text is None:
+ text = " " + self.adaptor.getType(t)
+
+ buf.append(text)
+ i += 1
+ t = self.nodes[i]
+
+ # include stop node too
+ text = self.adaptor.getText(stop)
+ if text is None:
+ text = " " +self.adaptor.getType(stop)
+
+ buf.append(text)
+
+ return ''.join(buf)
+
+
+ ## iterator interface
+ def __iter__(self):
+ if self.p == -1:
+ self.fillBuffer()
+
+ for node in self.nodes:
+ yield node
+
+
+#############################################################################
+#
+# tree parser
+#
+#############################################################################
+
+class TreeParser(BaseRecognizer):
+ """@brief Baseclass for generated tree parsers.
+
+ A parser for a stream of tree nodes. "tree grammars" result in a subclass
+ of this. All the error reporting and recovery is shared with Parser via
+ the BaseRecognizer superclass.
+ """
+
+ def __init__(self, input, state=None):
+ BaseRecognizer.__init__(self, state)
+
+ self.input = None
+ self.setTreeNodeStream(input)
+
+
+ def reset(self):
+ BaseRecognizer.reset(self) # reset all recognizer state variables
+ if self.input is not None:
+ self.input.seek(0) # rewind the input
+
+
+ def setTreeNodeStream(self, input):
+ """Set the input stream"""
+
+ self.input = input
+
+
+ def getTreeNodeStream(self):
+ return self.input
+
+
+ def getSourceName(self):
+ return self.input.getSourceName()
+
+
+ def getCurrentInputSymbol(self, input):
+ return input.LT(1)
+
+
+ def getMissingSymbol(self, input, e, expectedTokenType, follow):
+ tokenText = "<missing " + self.tokenNames[expectedTokenType] + ">"
+ return CommonTree(CommonToken(type=expectedTokenType, text=tokenText))
+
+
+ # precompiled regex used by inContext
+ dotdot = ".*[^.]\\.\\.[^.].*"
+ doubleEtc = ".*\\.\\.\\.\\s+\\.\\.\\..*"
+ dotdotPattern = re.compile(dotdot)
+ doubleEtcPattern = re.compile(doubleEtc)
+
+ def inContext(self, context, adaptor=None, tokenName=None, t=None):
+ """Check if current node in input has a context.
+
+ Context means sequence of nodes towards root of tree. For example,
+ you might say context is "MULT" which means my parent must be MULT.
+ "CLASS VARDEF" says current node must be child of a VARDEF and whose
+ parent is a CLASS node. You can use "..." to mean zero-or-more nodes.
+ "METHOD ... VARDEF" means my parent is VARDEF and somewhere above
+ that is a METHOD node. The first node in the context is not
+ necessarily the root. The context matcher stops matching and returns
+ true when it runs out of context. There is no way to force the first
+ node to be the root.
+ """
+
+ return _inContext(
+ self.input.getTreeAdaptor(), self.getTokenNames(),
+ self.input.LT(1), context)
+
+ @classmethod
+ def _inContext(cls, adaptor, tokenNames, t, context):
+ """The worker for inContext.
+
+ It's static and full of parameters for testing purposes.
+ """
+
+ if cls.dotdotPattern.match(context):
+ # don't allow "..", must be "..."
+ raise ValueError("invalid syntax: ..")
+
+ if cls.doubleEtcPattern.match(context):
+ # don't allow double "..."
+ raise ValueError("invalid syntax: ... ...")
+
+ # ensure spaces around ...
+ context = context.replace("...", " ... ")
+ context = context.strip()
+ nodes = context.split()
+
+ ni = len(nodes) - 1
+ t = adaptor.getParent(t)
+ while ni >= 0 and t is not None:
+ if nodes[ni] == "...":
+ # walk upwards until we see nodes[ni-1] then continue walking
+ if ni == 0:
+ # ... at start is no-op
+ return True
+ goal = nodes[ni-1]
+ ancestor = cls._getAncestor(adaptor, tokenNames, t, goal)
+ if ancestor is None:
+ return False
+ t = ancestor
+ ni -= 1
+
+ name = tokenNames[adaptor.getType(t)]
+ if name != nodes[ni]:
+ return False
+
+ # advance to parent and to previous element in context node list
+ ni -= 1
+ t = adaptor.getParent(t)
+
+ # at root but more nodes to match
+ if t is None and ni >= 0:
+ return False
+
+ return True
+
+ @staticmethod
+ def _getAncestor(adaptor, tokenNames, t, goal):
+ """Helper for static inContext."""
+ while t is not None:
+ name = tokenNames[adaptor.getType(t)]
+ if name == goal:
+ return t
+ t = adaptor.getParent(t)
+
+ return None
+
+
+ def matchAny(self, ignore): # ignore stream, copy of this.input
+ """
+ Match '.' in tree parser has special meaning. Skip node or
+ entire tree if node has children. If children, scan until
+ corresponding UP node.
+ """
+
+ self._state.errorRecovery = False
+
+ look = self.input.LT(1)
+ if self.input.getTreeAdaptor().getChildCount(look) == 0:
+ self.input.consume() # not subtree, consume 1 node and return
+ return
+
+ # current node is a subtree, skip to corresponding UP.
+ # must count nesting level to get right UP
+ level = 0
+ tokenType = self.input.getTreeAdaptor().getType(look)
+ while tokenType != EOF and not (tokenType == UP and level==0):
+ self.input.consume()
+ look = self.input.LT(1)
+ tokenType = self.input.getTreeAdaptor().getType(look)
+ if tokenType == DOWN:
+ level += 1
+
+ elif tokenType == UP:
+ level -= 1
+
+ self.input.consume() # consume UP
+
+
+ def mismatch(self, input, ttype, follow):
+ """
+ We have DOWN/UP nodes in the stream that have no line info; override.
+ plus we want to alter the exception type. Don't try to recover
+ from tree parser errors inline...
+ """
+
+ raise MismatchedTreeNodeException(ttype, input)
+
+
+ def getErrorHeader(self, e):
+ """
+ Prefix error message with the grammar name because message is
+ always intended for the programmer because the parser built
+ the input tree not the user.
+ """
+
+ return (self.getGrammarFileName() +
+ ": node from %sline %s:%s"
+ % (['', "after "][e.approximateLineInfo],
+ e.line,
+ e.charPositionInLine
+ )
+ )
+
+ def getErrorMessage(self, e, tokenNames):
+ """
+ Tree parsers parse nodes they usually have a token object as
+ payload. Set the exception token and do the default behavior.
+ """
+
+ if isinstance(self, TreeParser):
+ adaptor = e.input.getTreeAdaptor()
+ e.token = adaptor.getToken(e.node)
+ if e.token is not None: # could be an UP/DOWN node
+ e.token = CommonToken(
+ type=adaptor.getType(e.node),
+ text=adaptor.getText(e.node)
+ )
+
+ return BaseRecognizer.getErrorMessage(self, e, tokenNames)
+
+
+ def traceIn(self, ruleName, ruleIndex):
+ BaseRecognizer.traceIn(self, ruleName, ruleIndex, self.input.LT(1))
+
+
+ def traceOut(self, ruleName, ruleIndex):
+ BaseRecognizer.traceOut(self, ruleName, ruleIndex, self.input.LT(1))
+
+
+#############################################################################
+#
+# tree visitor
+#
+#############################################################################
+
+class TreeVisitor(object):
+ """Do a depth first walk of a tree, applying pre() and post() actions
+ we go.
+ """
+
+ def __init__(self, adaptor=None):
+ if adaptor is not None:
+ self.adaptor = adaptor
+ else:
+ self.adaptor = CommonTreeAdaptor()
+
+ def visit(self, t, pre_action=None, post_action=None):
+ """Visit every node in tree t and trigger an action for each node
+ before/after having visited all of its children. Bottom up walk.
+ Execute both actions even if t has no children. Ignore return
+ results from transforming children since they will have altered
+ the child list of this node (their parent). Return result of
+ applying post action to this node.
+
+ The Python version differs from the Java version by taking two
+ callables 'pre_action' and 'post_action' instead of a class instance
+ that wraps those methods. Those callables must accept a TreeNode as
+ their single argument and return the (potentially transformed or
+ replaced) TreeNode.
+ """
+
+ isNil = self.adaptor.isNil(t)
+ if pre_action is not None and not isNil:
+ # if rewritten, walk children of new t
+ t = pre_action(t)
+
+ for idx in xrange(self.adaptor.getChildCount(t)):
+ child = self.adaptor.getChild(t, idx)
+ self.visit(child, pre_action, post_action)
+
+ if post_action is not None and not isNil:
+ t = post_action(t)
+
+ return t
+
+
+#############################################################################
+#
+# streams for rule rewriting
+#
+#############################################################################
+
+class RewriteRuleElementStream(object):
+ """@brief Internal helper class.
+
+ A generic list of elements tracked in an alternative to be used in
+ a -> rewrite rule. We need to subclass to fill in the next() method,
+ which returns either an AST node wrapped around a token payload or
+ an existing subtree.
+
+ Once you start next()ing, do not try to add more elements. It will
+ break the cursor tracking I believe.
+
+ @see org.antlr.runtime.tree.RewriteRuleSubtreeStream
+ @see org.antlr.runtime.tree.RewriteRuleTokenStream
+
+ TODO: add mechanism to detect/puke on modification after reading from
+ stream
+ """
+
+ def __init__(self, adaptor, elementDescription, elements=None):
+ # Cursor 0..n-1. If singleElement!=null, cursor is 0 until you next(),
+ # which bumps it to 1 meaning no more elements.
+ self.cursor = 0
+
+ # Track single elements w/o creating a list. Upon 2nd add, alloc list
+ self.singleElement = None
+
+ # The list of tokens or subtrees we are tracking
+ self.elements = None
+
+ # Once a node / subtree has been used in a stream, it must be dup'd
+ # from then on. Streams are reset after subrules so that the streams
+ # can be reused in future subrules. So, reset must set a dirty bit.
+ # If dirty, then next() always returns a dup.
+ self.dirty = False
+
+ # The element or stream description; usually has name of the token or
+ # rule reference that this list tracks. Can include rulename too, but
+ # the exception would track that info.
+ self.elementDescription = elementDescription
+
+ self.adaptor = adaptor
+
+ if isinstance(elements, (list, tuple)):
+ # Create a stream, but feed off an existing list
+ self.singleElement = None
+ self.elements = elements
+
+ else:
+ # Create a stream with one element
+ self.add(elements)
+
+
+ def reset(self):
+ """
+ Reset the condition of this stream so that it appears we have
+ not consumed any of its elements. Elements themselves are untouched.
+ Once we reset the stream, any future use will need duplicates. Set
+ the dirty bit.
+ """
+
+ self.cursor = 0
+ self.dirty = True
+
+
+ def add(self, el):
+ if el is None:
+ return
+
+ if self.elements is not None: # if in list, just add
+ self.elements.append(el)
+ return
+
+ if self.singleElement is None: # no elements yet, track w/o list
+ self.singleElement = el
+ return
+
+ # adding 2nd element, move to list
+ self.elements = []
+ self.elements.append(self.singleElement)
+ self.singleElement = None
+ self.elements.append(el)
+
+
+ def nextTree(self):
+ """
+ Return the next element in the stream. If out of elements, throw
+ an exception unless size()==1. If size is 1, then return elements[0].
+
+ Return a duplicate node/subtree if stream is out of elements and
+ size==1. If we've already used the element, dup (dirty bit set).
+ """
+
+ if (self.dirty
+ or (self.cursor >= len(self) and len(self) == 1)
+ ):
+ # if out of elements and size is 1, dup
+ el = self._next()
+ return self.dup(el)
+
+ # test size above then fetch
+ el = self._next()
+ return el
+
+
+ def _next(self):
+ """
+ do the work of getting the next element, making sure that it's
+ a tree node or subtree. Deal with the optimization of single-
+ element list versus list of size > 1. Throw an exception
+ if the stream is empty or we're out of elements and size>1.
+ protected so you can override in a subclass if necessary.
+ """
+
+ if len(self) == 0:
+ raise RewriteEmptyStreamException(self.elementDescription)
+
+ if self.cursor >= len(self): # out of elements?
+ if len(self) == 1: # if size is 1, it's ok; return and we'll dup
+ return self.toTree(self.singleElement)
+
+ # out of elements and size was not 1, so we can't dup
+ raise RewriteCardinalityException(self.elementDescription)
+
+ # we have elements
+ if self.singleElement is not None:
+ self.cursor += 1 # move cursor even for single element list
+ return self.toTree(self.singleElement)
+
+ # must have more than one in list, pull from elements
+ o = self.toTree(self.elements[self.cursor])
+ self.cursor += 1
+ return o
+
+
+ def dup(self, el):
+ """
+ When constructing trees, sometimes we need to dup a token or AST
+ subtree. Dup'ing a token means just creating another AST node
+ around it. For trees, you must call the adaptor.dupTree() unless
+ the element is for a tree root; then it must be a node dup.
+ """
+
+ raise NotImplementedError
+
+
+ def toTree(self, el):
+ """
+ Ensure stream emits trees; tokens must be converted to AST nodes.
+ AST nodes can be passed through unmolested.
+ """
+
+ return el
+
+
+ def hasNext(self):
+ return ( (self.singleElement is not None and self.cursor < 1)
+ or (self.elements is not None
+ and self.cursor < len(self.elements)
+ )
+ )
+
+
+ def size(self):
+ if self.singleElement is not None:
+ return 1
+
+ if self.elements is not None:
+ return len(self.elements)
+
+ return 0
+
+ __len__ = size
+
+
+ def getDescription(self):
+ """Deprecated. Directly access elementDescription attribute"""
+
+ return self.elementDescription
+
+
+class RewriteRuleTokenStream(RewriteRuleElementStream):
+ """@brief Internal helper class."""
+
+ def toTree(self, el):
+ # Don't convert to a tree unless they explicitly call nextTree.
+ # This way we can do hetero tree nodes in rewrite.
+ return el
+
+
+ def nextNode(self):
+ t = self._next()
+ return self.adaptor.createWithPayload(t)
+
+
+ def nextToken(self):
+ return self._next()
+
+
+ def dup(self, el):
+ raise TypeError("dup can't be called for a token stream.")
+
+
+class RewriteRuleSubtreeStream(RewriteRuleElementStream):
+ """@brief Internal helper class."""
+
+ def nextNode(self):
+ """
+ Treat next element as a single node even if it's a subtree.
+ This is used instead of next() when the result has to be a
+ tree root node. Also prevents us from duplicating recently-added
+ children; e.g., ^(type ID)+ adds ID to type and then 2nd iteration
+ must dup the type node, but ID has been added.
+
+ Referencing a rule result twice is ok; dup entire tree as
+ we can't be adding trees as root; e.g., expr expr.
+
+ Hideous code duplication here with super.next(). Can't think of
+ a proper way to refactor. This needs to always call dup node
+ and super.next() doesn't know which to call: dup node or dup tree.
+ """
+
+ if (self.dirty
+ or (self.cursor >= len(self) and len(self) == 1)
+ ):
+ # if out of elements and size is 1, dup (at most a single node
+ # since this is for making root nodes).
+ el = self._next()
+ return self.adaptor.dupNode(el)
+
+ # test size above then fetch
+ el = self._next()
+ return el
+
+
+ def dup(self, el):
+ return self.adaptor.dupTree(el)
+
+
+
+class RewriteRuleNodeStream(RewriteRuleElementStream):
+ """
+ Queues up nodes matched on left side of -> in a tree parser. This is
+ the analog of RewriteRuleTokenStream for normal parsers.
+ """
+
+ def nextNode(self):
+ return self._next()
+
+
+ def toTree(self, el):
+ return self.adaptor.dupNode(el)
+
+
+ def dup(self, el):
+ # we dup every node, so don't have to worry about calling dup; short-
+ #circuited next() so it doesn't call.
+ raise TypeError("dup can't be called for a node stream.")
+
+
+class TreeRuleReturnScope(RuleReturnScope):
+ """
+ This is identical to the ParserRuleReturnScope except that
+ the start property is a tree nodes not Token object
+ when you are parsing trees. To be generic the tree node types
+ have to be Object.
+ """
+
+ def __init__(self):
+ self.start = None
+ self.tree = None
+
+
+ def getStart(self):
+ return self.start
+
+
+ def getTree(self):
+ return self.tree
+
Added: torflow/trunk/NetworkScanners/libs/jsparser/antlr3/treewizard.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/antlr3/treewizard.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/antlr3/treewizard.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,614 @@
+""" @package antlr3.tree
+ at brief ANTLR3 runtime package, treewizard module
+
+A utility module to create ASTs at runtime.
+See <http://www.antlr.org/wiki/display/~admin/2007/07/02/Exploring+Concept+of+TreeWizard> for an overview. Note that the API of the Python implementation is slightly different.
+
+"""
+
+# begin[licence]
+#
+# [The "BSD licence"]
+# Copyright (c) 2005-2008 Terence Parr
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# end[licence]
+
+from antlr3.constants import INVALID_TOKEN_TYPE
+from antlr3.tokens import CommonToken
+from antlr3.tree import CommonTree, CommonTreeAdaptor
+
+
+def computeTokenTypes(tokenNames):
+ """
+ Compute a dict that is an inverted index of
+ tokenNames (which maps int token types to names).
+ """
+
+ if tokenNames is None:
+ return {}
+
+ return dict((name, type) for type, name in enumerate(tokenNames))
+
+
+## token types for pattern parser
+EOF = -1
+BEGIN = 1
+END = 2
+ID = 3
+ARG = 4
+PERCENT = 5
+COLON = 6
+DOT = 7
+
+class TreePatternLexer(object):
+ def __init__(self, pattern):
+ ## The tree pattern to lex like "(A B C)"
+ self.pattern = pattern
+
+ ## Index into input string
+ self.p = -1
+
+ ## Current char
+ self.c = None
+
+ ## How long is the pattern in char?
+ self.n = len(pattern)
+
+ ## Set when token type is ID or ARG
+ self.sval = None
+
+ self.error = False
+
+ self.consume()
+
+
+ __idStartChar = frozenset(
+ 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_'
+ )
+ __idChar = __idStartChar | frozenset('0123456789')
+
+ def nextToken(self):
+ self.sval = ""
+ while self.c != EOF:
+ if self.c in (' ', '\n', '\r', '\t'):
+ self.consume()
+ continue
+
+ if self.c in self.__idStartChar:
+ self.sval += self.c
+ self.consume()
+ while self.c in self.__idChar:
+ self.sval += self.c
+ self.consume()
+
+ return ID
+
+ if self.c == '(':
+ self.consume()
+ return BEGIN
+
+ if self.c == ')':
+ self.consume()
+ return END
+
+ if self.c == '%':
+ self.consume()
+ return PERCENT
+
+ if self.c == ':':
+ self.consume()
+ return COLON
+
+ if self.c == '.':
+ self.consume()
+ return DOT
+
+ if self.c == '[': # grab [x] as a string, returning x
+ self.consume()
+ while self.c != ']':
+ if self.c == '\\':
+ self.consume()
+ if self.c != ']':
+ self.sval += '\\'
+
+ self.sval += self.c
+
+ else:
+ self.sval += self.c
+
+ self.consume()
+
+ self.consume()
+ return ARG
+
+ self.consume()
+ self.error = True
+ return EOF
+
+ return EOF
+
+
+ def consume(self):
+ self.p += 1
+ if self.p >= self.n:
+ self.c = EOF
+
+ else:
+ self.c = self.pattern[self.p]
+
+
+class TreePatternParser(object):
+ def __init__(self, tokenizer, wizard, adaptor):
+ self.tokenizer = tokenizer
+ self.wizard = wizard
+ self.adaptor = adaptor
+ self.ttype = tokenizer.nextToken() # kickstart
+
+
+ def pattern(self):
+ if self.ttype == BEGIN:
+ return self.parseTree()
+
+ elif self.ttype == ID:
+ node = self.parseNode()
+ if self.ttype == EOF:
+ return node
+
+ return None # extra junk on end
+
+ return None
+
+
+ def parseTree(self):
+ if self.ttype != BEGIN:
+ return None
+
+ self.ttype = self.tokenizer.nextToken()
+ root = self.parseNode()
+ if root is None:
+ return None
+
+ while self.ttype in (BEGIN, ID, PERCENT, DOT):
+ if self.ttype == BEGIN:
+ subtree = self.parseTree()
+ self.adaptor.addChild(root, subtree)
+
+ else:
+ child = self.parseNode()
+ if child is None:
+ return None
+
+ self.adaptor.addChild(root, child)
+
+ if self.ttype != END:
+ return None
+
+ self.ttype = self.tokenizer.nextToken()
+ return root
+
+
+ def parseNode(self):
+ # "%label:" prefix
+ label = None
+
+ if self.ttype == PERCENT:
+ self.ttype = self.tokenizer.nextToken()
+ if self.ttype != ID:
+ return None
+
+ label = self.tokenizer.sval
+ self.ttype = self.tokenizer.nextToken()
+ if self.ttype != COLON:
+ return None
+
+ self.ttype = self.tokenizer.nextToken() # move to ID following colon
+
+ # Wildcard?
+ if self.ttype == DOT:
+ self.ttype = self.tokenizer.nextToken()
+ wildcardPayload = CommonToken(0, ".")
+ node = WildcardTreePattern(wildcardPayload)
+ if label is not None:
+ node.label = label
+ return node
+
+ # "ID" or "ID[arg]"
+ if self.ttype != ID:
+ return None
+
+ tokenName = self.tokenizer.sval
+ self.ttype = self.tokenizer.nextToken()
+
+ if tokenName == "nil":
+ return self.adaptor.nil()
+
+ text = tokenName
+ # check for arg
+ arg = None
+ if self.ttype == ARG:
+ arg = self.tokenizer.sval
+ text = arg
+ self.ttype = self.tokenizer.nextToken()
+
+ # create node
+ treeNodeType = self.wizard.getTokenType(tokenName)
+ if treeNodeType == INVALID_TOKEN_TYPE:
+ return None
+
+ node = self.adaptor.createFromType(treeNodeType, text)
+ if label is not None and isinstance(node, TreePattern):
+ node.label = label
+
+ if arg is not None and isinstance(node, TreePattern):
+ node.hasTextArg = True
+
+ return node
+
+
+class TreePattern(CommonTree):
+ """
+ When using %label:TOKENNAME in a tree for parse(), we must
+ track the label.
+ """
+
+ def __init__(self, payload):
+ CommonTree.__init__(self, payload)
+
+ self.label = None
+ self.hasTextArg = None
+
+
+ def toString(self):
+ if self.label is not None:
+ return '%' + self.label + ':' + CommonTree.toString(self)
+
+ else:
+ return CommonTree.toString(self)
+
+
+class WildcardTreePattern(TreePattern):
+ pass
+
+
+class TreePatternTreeAdaptor(CommonTreeAdaptor):
+ """This adaptor creates TreePattern objects for use during scan()"""
+
+ def createWithPayload(self, payload):
+ return TreePattern(payload)
+
+
+class TreeWizard(object):
+ """
+ Build and navigate trees with this object. Must know about the names
+ of tokens so you have to pass in a map or array of token names (from which
+ this class can build the map). I.e., Token DECL means nothing unless the
+ class can translate it to a token type.
+
+ In order to create nodes and navigate, this class needs a TreeAdaptor.
+
+ This class can build a token type -> node index for repeated use or for
+ iterating over the various nodes with a particular type.
+
+ This class works in conjunction with the TreeAdaptor rather than moving
+ all this functionality into the adaptor. An adaptor helps build and
+ navigate trees using methods. This class helps you do it with string
+ patterns like "(A B C)". You can create a tree from that pattern or
+ match subtrees against it.
+ """
+
+ def __init__(self, adaptor=None, tokenNames=None, typeMap=None):
+ self.adaptor = adaptor
+ if typeMap is None:
+ self.tokenNameToTypeMap = computeTokenTypes(tokenNames)
+
+ else:
+ if tokenNames is not None:
+ raise ValueError("Can't have both tokenNames and typeMap")
+
+ self.tokenNameToTypeMap = typeMap
+
+
+ def getTokenType(self, tokenName):
+ """Using the map of token names to token types, return the type."""
+
+ try:
+ return self.tokenNameToTypeMap[tokenName]
+ except KeyError:
+ return INVALID_TOKEN_TYPE
+
+
+ def create(self, pattern):
+ """
+ Create a tree or node from the indicated tree pattern that closely
+ follows ANTLR tree grammar tree element syntax:
+
+ (root child1 ... child2).
+
+ You can also just pass in a node: ID
+
+ Any node can have a text argument: ID[foo]
+ (notice there are no quotes around foo--it's clear it's a string).
+
+ nil is a special name meaning "give me a nil node". Useful for
+ making lists: (nil A B C) is a list of A B C.
+ """
+
+ tokenizer = TreePatternLexer(pattern)
+ parser = TreePatternParser(tokenizer, self, self.adaptor)
+ return parser.pattern()
+
+
+ def index(self, tree):
+ """Walk the entire tree and make a node name to nodes mapping.
+
+ For now, use recursion but later nonrecursive version may be
+ more efficient. Returns a dict int -> list where the list is
+ of your AST node type. The int is the token type of the node.
+ """
+
+ m = {}
+ self._index(tree, m)
+ return m
+
+
+ def _index(self, t, m):
+ """Do the work for index"""
+
+ if t is None:
+ return
+
+ ttype = self.adaptor.getType(t)
+ elements = m.get(ttype)
+ if elements is None:
+ m[ttype] = elements = []
+
+ elements.append(t)
+ for i in range(self.adaptor.getChildCount(t)):
+ child = self.adaptor.getChild(t, i)
+ self._index(child, m)
+
+
+ def find(self, tree, what):
+ """Return a list of matching token.
+
+ what may either be an integer specifzing the token type to find or
+ a string with a pattern that must be matched.
+
+ """
+
+ if isinstance(what, (int, long)):
+ return self._findTokenType(tree, what)
+
+ elif isinstance(what, basestring):
+ return self._findPattern(tree, what)
+
+ else:
+ raise TypeError("'what' must be string or integer")
+
+
+ def _findTokenType(self, t, ttype):
+ """Return a List of tree nodes with token type ttype"""
+
+ nodes = []
+
+ def visitor(tree, parent, childIndex, labels):
+ nodes.append(tree)
+
+ self.visit(t, ttype, visitor)
+
+ return nodes
+
+
+ def _findPattern(self, t, pattern):
+ """Return a List of subtrees matching pattern."""
+
+ subtrees = []
+
+ # Create a TreePattern from the pattern
+ tokenizer = TreePatternLexer(pattern)
+ parser = TreePatternParser(tokenizer, self, TreePatternTreeAdaptor())
+ tpattern = parser.pattern()
+
+ # don't allow invalid patterns
+ if (tpattern is None or tpattern.isNil()
+ or isinstance(tpattern, WildcardTreePattern)):
+ return None
+
+ rootTokenType = tpattern.getType()
+
+ def visitor(tree, parent, childIndex, label):
+ if self._parse(tree, tpattern, None):
+ subtrees.append(tree)
+
+ self.visit(t, rootTokenType, visitor)
+
+ return subtrees
+
+
+ def visit(self, tree, what, visitor):
+ """Visit every node in tree matching what, invoking the visitor.
+
+ If what is a string, it is parsed as a pattern and only matching
+ subtrees will be visited.
+ The implementation uses the root node of the pattern in combination
+ with visit(t, ttype, visitor) so nil-rooted patterns are not allowed.
+ Patterns with wildcard roots are also not allowed.
+
+ If what is an integer, it is used as a token type and visit will match
+ all nodes of that type (this is faster than the pattern match).
+ The labels arg of the visitor action method is never set (it's None)
+ since using a token type rather than a pattern doesn't let us set a
+ label.
+ """
+
+ if isinstance(what, (int, long)):
+ self._visitType(tree, None, 0, what, visitor)
+
+ elif isinstance(what, basestring):
+ self._visitPattern(tree, what, visitor)
+
+ else:
+ raise TypeError("'what' must be string or integer")
+
+
+ def _visitType(self, t, parent, childIndex, ttype, visitor):
+ """Do the recursive work for visit"""
+
+ if t is None:
+ return
+
+ if self.adaptor.getType(t) == ttype:
+ visitor(t, parent, childIndex, None)
+
+ for i in range(self.adaptor.getChildCount(t)):
+ child = self.adaptor.getChild(t, i)
+ self._visitType(child, t, i, ttype, visitor)
+
+
+ def _visitPattern(self, tree, pattern, visitor):
+ """
+ For all subtrees that match the pattern, execute the visit action.
+ """
+
+ # Create a TreePattern from the pattern
+ tokenizer = TreePatternLexer(pattern)
+ parser = TreePatternParser(tokenizer, self, TreePatternTreeAdaptor())
+ tpattern = parser.pattern()
+
+ # don't allow invalid patterns
+ if (tpattern is None or tpattern.isNil()
+ or isinstance(tpattern, WildcardTreePattern)):
+ return
+
+ rootTokenType = tpattern.getType()
+
+ def rootvisitor(tree, parent, childIndex, labels):
+ labels = {}
+ if self._parse(tree, tpattern, labels):
+ visitor(tree, parent, childIndex, labels)
+
+ self.visit(tree, rootTokenType, rootvisitor)
+
+
+ def parse(self, t, pattern, labels=None):
+ """
+ Given a pattern like (ASSIGN %lhs:ID %rhs:.) with optional labels
+ on the various nodes and '.' (dot) as the node/subtree wildcard,
+ return true if the pattern matches and fill the labels Map with
+ the labels pointing at the appropriate nodes. Return false if
+ the pattern is malformed or the tree does not match.
+
+ If a node specifies a text arg in pattern, then that must match
+ for that node in t.
+ """
+
+ tokenizer = TreePatternLexer(pattern)
+ parser = TreePatternParser(tokenizer, self, TreePatternTreeAdaptor())
+ tpattern = parser.pattern()
+
+ return self._parse(t, tpattern, labels)
+
+
+ def _parse(self, t1, tpattern, labels):
+ """
+ Do the work for parse. Check to see if the tpattern fits the
+ structure and token types in t1. Check text if the pattern has
+ text arguments on nodes. Fill labels map with pointers to nodes
+ in tree matched against nodes in pattern with labels.
+ """
+
+ # make sure both are non-null
+ if t1 is None or tpattern is None:
+ return False
+
+ # check roots (wildcard matches anything)
+ if not isinstance(tpattern, WildcardTreePattern):
+ if self.adaptor.getType(t1) != tpattern.getType():
+ return False
+
+ # if pattern has text, check node text
+ if (tpattern.hasTextArg
+ and self.adaptor.getText(t1) != tpattern.getText()):
+ return False
+
+ if tpattern.label is not None and labels is not None:
+ # map label in pattern to node in t1
+ labels[tpattern.label] = t1
+
+ # check children
+ n1 = self.adaptor.getChildCount(t1)
+ n2 = tpattern.getChildCount()
+ if n1 != n2:
+ return False
+
+ for i in range(n1):
+ child1 = self.adaptor.getChild(t1, i)
+ child2 = tpattern.getChild(i)
+ if not self._parse(child1, child2, labels):
+ return False
+
+ return True
+
+
+ def equals(self, t1, t2, adaptor=None):
+ """
+ Compare t1 and t2; return true if token types/text, structure match
+ exactly.
+ The trees are examined in their entirety so that (A B) does not match
+ (A B C) nor (A (B C)).
+ """
+
+ if adaptor is None:
+ adaptor = self.adaptor
+
+ return self._equals(t1, t2, adaptor)
+
+
+ def _equals(self, t1, t2, adaptor):
+ # make sure both are non-null
+ if t1 is None or t2 is None:
+ return False
+
+ # check roots
+ if adaptor.getType(t1) != adaptor.getType(t2):
+ return False
+
+ if adaptor.getText(t1) != adaptor.getText(t2):
+ return False
+
+ # check children
+ n1 = adaptor.getChildCount(t1)
+ n2 = adaptor.getChildCount(t2)
+ if n1 != n2:
+ return False
+
+ for i in range(n1):
+ child1 = adaptor.getChild(t1, i)
+ child2 = adaptor.getChild(t2, i)
+ if not self._equals(child1, child2, adaptor):
+ return False
+
+ return True
Added: torflow/trunk/NetworkScanners/libs/jsparser/test.py
===================================================================
--- torflow/trunk/NetworkScanners/libs/jsparser/test.py (rev 0)
+++ torflow/trunk/NetworkScanners/libs/jsparser/test.py 2009-04-06 10:36:54 UTC (rev 19224)
@@ -0,0 +1,41 @@
+import antlr3
+from JavaScriptLexer import JavaScriptLexer
+from JavaScriptParser import JavaScriptParser
+
+class ParseError(Exception):
+ def __init__(self, tokens, e):
+ self.tokens = tokens
+ self.e = e
+
+class LexerError(Exception):
+ def __init__(self, tokens, e):
+ self.tokens = tokens
+ self.e = e
+
+class ExceptionalJSParser(JavaScriptParser):
+ def displayRecognitionError(self, tokens, e): raise ParseError(tokens, e)
+class ExceptionalJSLexer(JavaScriptLexer):
+ def displayRecognitionError(self, tokens, e): raise LexerError(tokens, e)
+
+input = 'var foo = function() { var foo = "h\'i"; return foo+2; };'
+char_stream = antlr3.ANTLRStringStream(input)
+# or to parse a file:
+# char_stream = antlr3.ANTLRFileStream(path_to_input)
+# # or to parse an opened file or any other file-like object:
+# char_stream = antlr3.ANTLRInputStream(file)
+
+lexer = ExceptionalJSLexer(char_stream)
+tokens = antlr3.CommonTokenStream(lexer)
+parser = ExceptionalJSParser(tokens)
+try:
+ program = parser.program()
+ print str(program.tree)+" -> "+str(program.tree.getType())
+ for l in program.tree.getChildren():
+ print str(l)+" -> "+str(l.getType())
+except ParseError, e:
+ print "P|"+str((e.e.token.type))+"|"
+except LexerError, e:
+ print "L|"+str(e.e.node)+"|"
+
+
+
More information about the tor-commits
mailing list