root/org.axdt.as3/src/org/axdt/as3/imp/parser/AS3Parser.g @ 82cecb85d4b9fff471d3eadd986735ad736c6c3f

Revision 82cecb85d4b9fff471d3eadd986735ad736c6c3f, 39.7 KB (checked in by mb0 <mb0@…>, 15 months ago)

do not allow empty semicolon only allow virtual semicolon.
parsing without virtual semicolon insertion is now stricter..

  • Property mode set to 100644
Line 
1--
2-- The ActionScript 3 Parser
3-- This grammar is created from spec at http://livedocs.adobe.com/specs/actionscript/3/wwhelp/wwhimpl/js/html/wwhelp.htm
4--
5-- author Martin Schnabel mb0.org
6-- lgpl copyright asdt 2008
7--
8%options states,la=4,variables
9%options package=org.axdt.as3.imp.parser
10%options template=dtParserTemplateF.gi
11%options import_terminals=AS3Lexer.gi
12%options parent_saved,automatic_ast=toplevel,visitor=preorder,ast_directory=./Ast,ast_type=ASTNode
13
14%Notice
15        /./*
16           * (c) Martin Schnabel - mb0@mb0.org
17           */
18        ./
19%END
20
21%Globals
22    /.import org.eclipse.imp.parser.IParser;
23    import java.util.Stack;
24    ./
25%End
26
27%Define
28    $ast_class /.Object./
29    $additional_interfaces /., IParser./
30%End
31
32%Terminals
33    -- List of terminals needed by this grammar
34    as break case catch class const continue
35    default delete do else extends false finally for function
36    if implements import in instanceof interface internal is
37    new null package private protected public
38    return super switch this throw --to
39        true try typeof
40    use var void while with
41    --
42    each get set namespace include
43    dynamic final native
44    override static
45    --
46    --intrinsic 
47    prototype xml -- enumerable explicit
48
49    IDENTIFIER
50    String
51    Number
52    RegularExpression
53
54--    SlComment
55--    MlComment
56
57--    NO_LINE_BREAK
58--    VirtualSemicolon
59
60    QUESTION ::= '?'
61    LPAREN ::= '('
62    RPAREN ::= ')'
63    LBRACK ::= '['
64    RBRACK ::= ']'
65    LCURLY ::= '{'
66    RCURLY ::= '}'
67    DBL_COLON ::= '::'
68    COLON ::= ':'
69    COMMA ::= ','
70    ASSIGN ::= '='
71    EQUAL ::= '=='
72    STRICT_EQUAL ::= '==='
73    LNOT ::= '!'
74    BNOT ::= '~'
75    NOT_EQUAL ::= '!='
76    STRICT_NOT_EQUAL ::= '!=='
77    DIV ::= '/'
78    DIV_RX
79    DIV_ASSIGN ::= '/='
80    PLUS ::= '+'
81    PLUS_ASSIGN ::= '+='
82    INC ::= '++'
83    MINUS ::= '-'
84    MINUS_ASSIGN ::= '-='
85    DEC ::= '--'
86    STAR ::= '*'
87    STAR_ASSIGN  ::= '*='
88    MOD ::= '%'
89    MOD_ASSIGN ::= '%='
90    SR ::= '>>'
91    SR_ASSIGN ::= '>>='
92    BSR ::= '>>>'
93    BSR_ASSIGN ::= '>>>='
94    GE ::= '>='
95    GT ::= '>'
96    SL ::= '<<'
97    SL_ASSIGN ::= '<<='
98    LE ::= '<='
99    LT ::= '<'
100    BXOR ::= '^'
101    BXOR_ASSIGN ::= '^='
102    LXOR_ASSIGN ::= '^^='
103    BOR ::= '|'
104    BOR_ASSIGN ::= '|='
105    LOR ::= '||'
106    LOR_ASSIGN ::= '||='
107    BAND ::= '&'
108    BAND_ASSIGN ::= '&='
109    LAND ::= '&&'
110    LAND_ASSIGN ::= '&&='
111    E4X_ATTRI ::= '@'
112    SEMI ::= ';'
113    DOT ::= '.'
114    E4X_DESC ::= '..'
115    REST ::= '...'
116%End
117
118%Start
119    Program
120%End
121
122%Recover
123%End
124
125%Rules
126--no_line_break ::= NO_LINE_BREAK
127-- 14 Expressions
128-- opt, W = B = {allowin, noin}
129-- 14.1 Identifiers
130Identifier$Ident ::= IDENTIFIER$Token
131Identifier$Ident ::= each$Token
132Identifier$Ident ::= get$Token
133Identifier$Ident ::= set$Token
134Identifier$Ident ::= namespace$Token
135Identifier$Ident ::= include$Token
136Identifier$Ident ::= dynamic$Token
137Identifier$Ident ::= static$Token
138Identifier$Ident ::= xml$Token
139Identifier$Ident ::= override$Token
140Identifier$Ident ::= final$Token
141Identifier$Ident ::= prototype$Token
142Identifier$Ident ::= native$Token
143/.
144        Object decl;
145        public void setDeclaration(Object decl) { this.decl = decl; }
146        public Object getDeclaration() { return decl; }
147./
148
149PropertyIdentifier ::= Identifier
150PropertyIdentifier$GenericIdent ::= STAR
151
152Qualifier ::= PropertyIdentifier
153Qualifier ::= ReservedNamespace
154
155SimpleQualifiedIdentifier ::= PropertyIdentifier
156SimpleQualifiedIdentifier$SimpleQualifiedIdentifier ::= Qualifier$Base DBL_COLON$ PropertyIdentifier$Ident
157SimpleQualifiedIdentifier$SimpleQualifiedIdentifier ::= Qualifier$Base DBL_COLON$ Brackets
158
159ExpressionQualifiedIdentifier$ExpressionQualifiedIdentifier ::= ParenExpression$Base DBL_COLON$ PropertyIdentifier$Ident
160ExpressionQualifiedIdentifier$ExpressionQualifiedIdentifier ::= ParenExpression$Base DBL_COLON$ Brackets
161
162NonAttributeQualifiedIdentifier ::= SimpleQualifiedIdentifier
163NonAttributeQualifiedIdentifier ::= ExpressionQualifiedIdentifier
164
165QualifiedIdentifier$QualifiedIdentifier ::= E4X_ATTRI$ Brackets
166QualifiedIdentifier$QualifiedIdentifier ::= E4X_ATTRI$ NonAttributeQualifiedIdentifier$Ident
167QualifiedIdentifier ::= NonAttributeQualifiedIdentifier
168
169-- 14.2 Primary expressions
170PrimaryExpression ::= Literal
171PrimaryExpression ::= QualifiedIdentifier
172--PrimaryExpression ::= ReservedNamespace --?
173PrimaryExpression ::= ParenListExpression
174PrimaryExpression ::= ArrayInitialiser
175PrimaryExpression ::= ObjectInitialiser
176PrimaryExpression ::= FunctionExpression
177PrimaryExpression ::= ThisExpression
178
179ThisExpression$ThisExpression ::= this
180
181 -- Literals
182Literal$NumberLiteral ::= Number$Token
183Literal$StringLiteral ::= String$Token
184Literal$XmlLiteral ::= Xml$Token
185Literal$BooleanLiteral ::= true$Token
186Literal$BooleanLiteral ::= false$Token
187Literal$RegexLiteral ::= DIV_RX$ RegularExpression$Token
188Literal$NullLiteral ::= null$Token
189
190-- 14.3 Reserved namespace expressions
191ReservedNamespace$ReservedNamespace ::= public$Token
192ReservedNamespace$ReservedNamespace ::= private$Token
193ReservedNamespace$ReservedNamespace ::= protected$Token
194ReservedNamespace$ReservedNamespace ::= internal$Token
195
196-- 14.4 Parenthesized expressions
197ParenExpression ::= LPAREN$ AssignmentExpression_allowin RPAREN$
198ParenListExpression ::= LPAREN$ ListExpression_allowin$Expressions RPAREN$
199
200-- 14.5 Function expression
201FunctionExpression$FunctionExpression ::= function$ FunctionCommon Block
202-- does function def suffice ? see 15.2 ExpressionStatement la != function
203--FunctionExpression$FunctionExpression ::= function$ Identifier$Name FunctionCommon Block
204/.
205        SymbolTable symbolTable;
206        public void setSymbolTable(SymbolTable symbolTable) { this.symbolTable = symbolTable; }
207        public SymbolTable getSymbolTable() { return symbolTable; }
208./
209
210-- 14.6 Object initialiser
211ObjectInitialiser$ObjectInitialiser ::= LCURLY$ NonemptyFieldList$Fields RCURLY$
212ObjectInitialiser$ObjectInitialiser ::= LCURLY$ RCURLY$
213NonemptyFieldList$$LiteralField ::= LiteralField
214NonemptyFieldList$$LiteralField ::= LiteralField COMMA$ NonemptyFieldList
215LiteralField ::= FieldName COLON$ AssignmentExpression_allowin$AssignmentExpression
216FieldName$FieldName ::= NonAttributeQualifiedIdentifier
217FieldName$FieldName ::= String
218FieldName$FieldName ::= Number
219
220-- 14.7 Array initialiser
221ArrayInitialiser ::= LBRACK$ ElementList RBRACK$
222ElementList$$LiteralElement ::= %empty
223ElementList$$LiteralElement ::= LiteralElement
224ElementList$$LiteralElement ::= COMMA$ ElementList
225ElementList$$LiteralElement ::= LiteralElement COMMA$ ElementList
226LiteralElement ::= AssignmentExpression_noin
227
228-- 14.8 XML initialisers
229 -- using custom lexer see org.axdt.as3.imp.parser.xml
230-- 14.9 Super expression
231SuperExpression$SuperExpression ::= super$ | super$ Arguments
232
233--14.10 Postfix Expressions
234PostfixExpression ::= FullPostfixExpression
235PostfixExpression ::= ShortNewExpression
236
237FullPostfixExpression ::= PrimaryExpression
238FullPostfixExpression ::= FullNewExpression
239FullPostfixExpression$PostfixExpression ::= FullPostfixExpression$Expression PropertyOperator
240FullPostfixExpression$PostfixExpression ::= SuperExpression$Expression PropertyOperator
241FullPostfixExpression$Invocation ::= FullPostfixExpression$Expression Arguments
242FullPostfixExpression$Query ::= FullPostfixExpression$Expression QueryOperator$Query
243FullPostfixExpression$PostIncrementExpression ::= PostfixExpression$Expression --no_line_break$
244                                                INC$
245FullPostfixExpression$PostDecrementExpression ::= PostfixExpression$Expression --no_line_break$
246                                                DEC$
247
248--14.11 New expressions
249FullNewExpression$NewExpression ::= new$ FullNewSubexpression$Expression Arguments
250FullNewSubexpression ::= PrimaryExpression
251FullNewSubexpression ::= FullNewExpression
252FullNewSubexpression$PropSubExpression ::= FullNewSubexpression$Expression PropertyOperator$Prop
253FullNewSubexpression$PropSubExpression ::= SuperExpression$Expression PropertyOperator$Prop
254
255ShortNewExpression$NewExpression ::= new$ ShortNewSubexpression$Expression
256ShortNewSubexpression ::= FullNewSubexpression
257ShortNewSubexpression ::= ShortNewExpression
258
259-- 14.12 Property accessors
260PropertyOperator ::= DOT$ QualifiedIdentifier
261PropertyOperator ::= Brackets
262Brackets ::= LBRACK$ ListExpression_allowin$ListExpression RBRACK$
263
264-- 14.13 Query operators
265QueryOperator$QueryQualifiedIdentifier ::= E4X_DESC$ QualifiedIdentifier
266QueryOperator$QueryListExpression ::= DOT$ LPAREN$ ListExpression_allowin$ListExpression RPAREN$
267
268-- 14.14 Call expressions
269Arguments$Arguments
270        ::= LPAREN$ RPAREN$
271          | LPAREN$ ListExpression_allowin$Expressions RPAREN$
272
273--ArgumentList_noin$$AssignmentExpression_noin
274--      ::= AssignmentExpression_noin
275--        | ArgumentList_noin COMMA$ AssignmentExpression_noin
276
277-- 14.15 Unary expressions
278UnaryExpression ::= PostfixExpression
279UnaryExpression$DeleteExpression ::= delete$ PostfixExpression$Expression
280UnaryExpression$VoidExpression ::= void$ UnaryExpression$Expression
281UnaryExpression$TypeOfExpression ::= typeof$ UnaryExpression$Expression
282UnaryExpression$PreIncrementExpression ::= INC$ PostfixExpression$Expression
283UnaryExpression$PreDecrementExpression ::= DEC$ PostfixExpression$Expression
284UnaryExpression$UnaryPlusExpression ::= PLUS$ UnaryExpression$Expression
285UnaryExpression$UnaryMinusExpression ::= MINUS$ UnaryExpression$Expression
286--UnaryExpression ::= MINUS$Op NegatedMinLong
287UnaryExpression$BinaryNotExpression ::= BNOT$ UnaryExpression$Expression
288UnaryExpression$LogicalNotExpression ::= LNOT$ UnaryExpression$Expression
289
290-- 14.16 Binary expressions
291-- 14.16.1 Multiplicative expressions
292MultiplicativeExpression ::= UnaryExpression
293MultiplicativeExpression$MultiplicativeExpression ::= MultiplicativeExpression$Left STAR$Op UnaryExpression$Right
294MultiplicativeExpression$MultiplicativeExpression ::= MultiplicativeExpression$Left DIV$Op UnaryExpression$Right
295MultiplicativeExpression$MultiplicativeExpression ::= MultiplicativeExpression$Left MOD$Op UnaryExpression$Right
296
297-- 14.16.2 Multiplicative expressions
298AdditiveExpression ::= MultiplicativeExpression
299AdditiveExpression$AdditiveExpression ::= AdditiveExpression$Left PLUS$Op MultiplicativeExpression$Right
300AdditiveExpression$AdditiveExpression ::= AdditiveExpression$Left MINUS$Op MultiplicativeExpression$Right
301
302-- 14.16.3 Shift expressions
303ShiftExpression ::= AdditiveExpression
304ShiftExpression$ShiftExpression ::= ShiftExpression$Left SL$Op AdditiveExpression$Right
305ShiftExpression$ShiftExpression ::= ShiftExpression$Left SR$Op AdditiveExpression$Right
306ShiftExpression$ShiftExpression ::= ShiftExpression$Left BSR$Op AdditiveExpression$Right
307
308-- 14.16.4 Relational expressions
309RelationalExpression_allowin ::= ShiftExpression
310RelationalExpression_allowin$RelationalExpression
311        ::= RelationalExpression_allowin$Left
312            RelationalOpWithIn$Op ShiftExpression$Right
313
314RelationalExpression_noin ::= ShiftExpression
315RelationalExpression_noin$RelationalExpression
316        ::= RelationalExpression_noin$Left
317            RelationalOperator$Op ShiftExpression$Right
318
319RelationalOperator$RelationalOperator
320        ::= LT$Token
321          | GT$Token
322          | LE$Token
323          | GE$Token
324          | instanceof$Token
325          | is$Token
326          | as$Token
327
328RelationalOpWithIn ::= RelationalOperator
329RelationalOpWithIn$RelationalOperator
330        ::= in$Token
331
332-- 14.16.5 Equality expressions --B
333EqualityExpression_allowin ::= RelationalExpression_allowin
334EqualityExpression_allowin$EqualityExpression
335        ::= EqualityExpression_allowin$Left EqualityOperator$Op
336            RelationalExpression_allowin$Right
337
338EqualityExpression_noin ::= RelationalExpression_noin
339EqualityExpression_noin$EqualityExpression
340        ::= EqualityExpression_noin$Left EqualityOperator$Op
341            RelationalExpression_noin$Right
342
343EqualityOperator$EqualityOperator
344        ::= EQUAL$Token
345          | NOT_EQUAL$Token
346          | STRICT_EQUAL$Token
347          | STRICT_NOT_EQUAL$Token
348
349-- 14.16.6 Bitwise expressions --B
350BitwiseAndExpression_allowin ::= EqualityExpression_allowin
351BitwiseAndExpression_allowin$BitwiseAndExpression
352        ::= BitwiseAndExpression_allowin$Left BAND$
353            EqualityExpression_allowin$Right
354
355BitwiseAndExpression_noin ::= EqualityExpression_noin
356BitwiseAndExpression_noin$BitwiseAndExpression
357        ::= BitwiseAndExpression_noin$Left BAND$
358            EqualityExpression_noin$Right
359
360BitwiseXorExpression_allowin ::= BitwiseAndExpression_allowin
361BitwiseXorExpression_allowin$BitwiseXorExpression
362        ::= BitwiseXorExpression_allowin$Left BXOR$
363            BitwiseAndExpression_allowin$Right
364
365BitwiseXorExpression_noin ::= BitwiseAndExpression_noin
366BitwiseXorExpression_noin$BitwiseXorExpression
367        ::= BitwiseXorExpression_noin$Left BXOR$
368            BitwiseAndExpression_noin$Right
369
370BitwiseOrExpression_allowin ::= BitwiseXorExpression_allowin
371BitwiseOrExpression_allowin$BitwiseOrExpression
372        ::= BitwiseOrExpression_allowin$Left BOR$
373            BitwiseXorExpression_allowin$Right
374
375BitwiseOrExpression_noin ::= BitwiseXorExpression_noin
376BitwiseOrExpression_noin$BitwiseOrExpression
377        ::= BitwiseOrExpression_noin$Left BOR$
378            BitwiseXorExpression_noin$Right
379
380-- 14.16.7 Logical expressions --B
381LogicalAndExpression_allowin ::= BitwiseOrExpression_allowin
382LogicalAndExpression_allowin$LogicalAndExpression
383        ::= LogicalAndExpression_allowin$Left LAND$
384            BitwiseOrExpression_allowin$Right
385
386LogicalAndExpression_noin ::= BitwiseOrExpression_noin
387LogicalAndExpression_noin$LogicalAndExpression
388        ::= LogicalAndExpression_noin$Left LAND$
389            BitwiseOrExpression_noin$Right
390
391LogicalOrExpression_allowin ::= LogicalAndExpression_allowin
392LogicalOrExpression_allowin$LogicalOrExpression
393        ::= LogicalOrExpression_allowin$Left LOR$
394            LogicalAndExpression_allowin$Right
395
396LogicalOrExpression_noin ::= LogicalAndExpression_noin
397LogicalOrExpression_noin$LogicalOrExpression
398        ::= LogicalOrExpression_noin$Left LOR$
399            LogicalAndExpression_noin$Right
400
401-- 14.17 Conditional expressions
402 --B
403ConditionalExpression_allowin ::= LogicalOrExpression_allowin
404ConditionalExpression_allowin$ConditionalExpression
405        ::= LogicalOrExpression_allowin$Condition QUESTION$
406            AssignmentExpression_allowin$Left COLON$
407            AssignmentExpression_allowin$Right
408
409ConditionalExpression_noin ::= LogicalOrExpression_noin
410ConditionalExpression_noin$ConditionalExpression
411        ::= LogicalOrExpression_noin$Condition QUESTION$
412            AssignmentExpression_noin$Left COLON$
413            AssignmentExpression_noin$Right
414
415-- 14.18 Non-assignment expressions
416 --B
417NonAssignmentExpression_allowin ::= LogicalOrExpression_allowin
418NonAssignmentExpression_allowin$NonAssignmentExpression
419        ::= LogicalOrExpression_allowin$Condition QUESTION$
420            NonAssignmentExpression_allowin$Left COLON$
421            NonAssignmentExpression_allowin$Right
422
423NonAssignmentExpression_noin ::= LogicalOrExpression_noin
424NonAssignmentExpression_noin$NonAssignmentExpression
425        ::= LogicalOrExpression_noin$Condition QUESTION$
426            NonAssignmentExpression_noin$Left COLON$
427            NonAssignmentExpression_noin$Right
428
429-- 14.19 Assignment expressions
430 --B
431AssignmentExpression_allowin ::= ConditionalExpression_allowin
432AssignmentExpression_allowin$AssignmentExpression
433        ::= PostfixExpression$Left ASSIGN$Op AssignmentExpression_allowin$Right
434          | PostfixExpression$Left CompoundAssignment$Op AssignmentExpression_allowin$Right
435          | PostfixExpression$Left LogicalAssignment$Op AssignmentExpression_allowin$Right
436
437AssignmentExpression_noin ::= ConditionalExpression_noin
438AssignmentExpression_noin$AssignmentExpression
439        ::= PostfixExpression$Left ASSIGN$Op AssignmentExpression_noin$Right
440          | PostfixExpression$Left CompoundAssignment$Op AssignmentExpression_noin$Right
441          | PostfixExpression$Left LogicalAssignment$Op AssignmentExpression_noin$Right
442
443CompoundAssignment$CompoundAssignment
444        ::= STAR_ASSIGN$Token
445          | DIV_ASSIGN$Token
446          | MOD_ASSIGN$Token
447          | PLUS_ASSIGN$Token
448          | MINUS_ASSIGN$Token
449          | SL_ASSIGN$Token
450          | SR_ASSIGN$Token
451          | BSR_ASSIGN$Token
452          | BAND_ASSIGN$Token
453          | BXOR_ASSIGN$Token
454          | BOR_ASSIGN$Token
455
456LogicalAssignment$LogicalAssignment
457        ::= LAND_ASSIGN$Token
458          | LOR_ASSIGN$Token
459          | LXOR_ASSIGN$Token
460
461-- 14.20 List expressions
462 --B
463ListExpression_allowin$$AssignmentExpression_allowin
464        ::= AssignmentExpression_allowin
465          | ListExpression_allowin COMMA$ AssignmentExpression_allowin
466
467ListExpression_noin$$AssignmentExpression_noin
468        ::= AssignmentExpression_noin
469          | ListExpression_noin COMMA$ AssignmentExpression_noin
470
471-- 14.21 Type expressions
472TypeExpression_allowin ::= NonAssignmentExpression_allowin
473TypeExpression_noin ::= NonAssignmentExpression_noin
474
475-- 15 Statements -- W = {_abbrev, _nosif, _full}
476Statement_abbrev ::= Block
477          | IfStatement_abbrev
478          | SwitchStatement
479          | WhileStatement_abbrev
480          | ForStatement_abbrev
481          | WithStatement_abbrev
482          | TryStatement
483          | LabeledStatement_abbrev
484          | DefaultXMLNamespaceStatement
485          | SuperStatement_abbrev
486          | DoStatement_abbrev
487          | ContinueStatement_abbrev
488          | BreakStatement_abbrev
489          | ReturnStatement_abbrev
490          | ThrowStatement_abbrev
491          | ExpressionStatement_abbrev
492
493Statement_nosif ::= Block
494          | IfStatement_nosif
495          | SwitchStatement
496          | WhileStatement_nosif
497          | ForStatement_nosif
498          | WithStatement_nosif
499          | TryStatement
500          | LabeledStatement_nosif
501          | DefaultXMLNamespaceStatement
502          | SuperStatement_nosif
503          | DoStatement_nosif
504          | ContinueStatement_nosif
505          | BreakStatement_nosif
506          | ReturnStatement_nosif
507          | ThrowStatement_nosif
508          | ExpressionStatement_nosif
509
510Statement_full ::= Block
511          | IfStatement_full
512          | SwitchStatement
513          | WhileStatement_full
514          | ForStatement_full
515          | WithStatement_full
516          | TryStatement
517          | LabeledStatement_full
518          | DefaultXMLNamespaceStatement
519          | SuperStatement_full
520          | DoStatement_full
521          | ContinueStatement_full
522          | BreakStatement_full
523          | ReturnStatement_full
524          | ThrowStatement_full
525          | ExpressionStatement_full
526
527 --W
528Substatement_abbrev$Substatement
529        ::= EmptyStatment
530          | Statement_abbrev
531          | VariableDefinition_allowin Semicolon_abbrev$
532          | Attributes --no_line_break$
533                LCURLY$ Substatements RCURLY$
534Substatement_nosif$Substatement
535        ::= EmptyStatment
536          | Statement_nosif
537          | VariableDefinition_allowin Semicolon_nosif$
538          | Attributes --no_line_break$
539                LCURLY$ Substatements RCURLY$
540Substatement_full$Substatement
541        ::= EmptyStatment
542          | Statement_full
543          | VariableDefinition_allowin Semicolon_full$
544          | Attributes --no_line_break$
545                LCURLY$ Substatements RCURLY$
546
547Substatements ::= %empty
548Substatements ::= SubstatementsPrefix Substatement_abbrev
549
550SubstatementsPrefix$$Substatement_full ::= %empty
551SubstatementsPrefix$$Substatement_full ::= SubstatementsPrefix Substatement_full
552
553-- no empty semicolon ! use virtual semi now instead !
554--Semicolon_abbrev ::= %empty
555Semicolon_abbrev$Semicolon ::= SEMI$ | VirtualSemicolon$
556
557--Semicolon_nosif ::= %empty
558Semicolon_nosif$Semicolon ::= SEMI$ | VirtualSemicolon$
559
560Semicolon_full$Semicolon ::= SEMI$ | VirtualSemicolon$
561
562-- 15.1 Empty statement
563EmptyStatment ::= SEMI$
564
565-- 15.2 Expression statement
566--ExpressionStatement ::= ListExpression -- la ! function --allowin
567--ExpressionStatement$ExpressionStatement ::= AssignmentExpression_allowin
568ExpressionStatement_abbrev$ExpressionStatement
569        ::= AssignmentExpression_allowin$Expression Semicolon_abbrev$
570ExpressionStatement_nosif$ExpressionStatement
571        ::= AssignmentExpression_allowin$Expression Semicolon_nosif$
572ExpressionStatement_full$ExpressionStatement
573        ::= AssignmentExpression_allowin$Expression Semicolon_full$
574
575-- 15.3 Super statement
576--SuperStatement$SuperStatement ::= super$ Arguments
577SuperStatement_abbrev$SuperStatement ::= super$ Arguments Semicolon_abbrev$
578SuperStatement_nosif$SuperStatement ::= super$ Arguments Semicolon_nosif$
579SuperStatement_full$SuperStatement ::= super$ Arguments Semicolon_full$
580
581-- 15.4 Block statement
582Block$Block ::= LCURLY$ Directives$Heads Directive_abbrev$Tail RCURLY$
583Block$Block ::= LCURLY$ Directive_abbrev$Tail RCURLY$
584Block$Block ::= LCURLY$ RCURLY$
585/.
586        public static final int OTHER = 0;
587        public static final int METHOD = 4;
588        public static final int FUNCTION = 5;
589        public static final int PACKAGE = 1;
590        public static final int CLASS = 2;
591        public static final int INTERFACE = 3;
592        public int type;
593        SymbolTable symbolTable;
594        public void setSymbolTable(SymbolTable symbolTable) { this.symbolTable = symbolTable; }
595        public SymbolTable getSymbolTable() { return symbolTable; }
596        public DirectiveList getDirectives() {
597                if (_Tail!=null) {
598                        if (_Heads != null) _Heads.add((IDirective) _Tail);
599                        else _Heads = new DirectiveList((IDirective) _Tail,true);
600                        _Tail = null;
601                }
602                return _Heads;
603        }
604./
605
606-- 15.5 Labeled statement
607 --W
608LabeledStatement_abbrev$LabeledStatement ::= Identifier$Label COLON$ Substatement_abbrev$Statement
609LabeledStatement_nosif$LabeledStatement ::= Identifier$Label COLON$ Substatement_nosif$Statement
610LabeledStatement_full$LabeledStatement ::= Identifier$Label COLON$ Substatement_full$Statement
611
612-- 15.6 Conditional statements
613-- 15.6.1 If statement
614IfStatement_abbrev$IfStatement ::= if$ ParenListExpression$Condition Substatement_abbrev$IfStatement
615IfStatement_abbrev$IfStatement ::= if$ ParenListExpression$Condition Substatement_nosif$IfStatement else$ Substatement_abbrev$ElseStatement
616
617IfStatement_nosif$IfStatement ::= if$ ParenListExpression$Condition Substatement_nosif$IfStatement else$ Substatement_nosif$ElseStatement
618
619IfStatement_full$IfStatement ::= if$ ParenListExpression$Condition Substatement_full$IfStatement
620IfStatement_full$IfStatement ::= if$ ParenListExpression$Condition Substatement_nosif$IfStatement else Substatement_full$ElseStatement
621
622-- 15.6.2 Switch statement
623SwitchStatement ::= switch$ ParenListExpression LCURLY$ CaseElements RCURLY$
624CaseElements ::= %empty
625CaseElements ::= CaseLabel
626CaseElements ::= CaseLabel CaseElementsPrefix CaseElement_abbrev
627CaseElementsPrefix ::= %empty
628CaseElementsPrefix ::= CaseElementsPrefix CaseElement_full
629 -- W
630CaseElement_abbrev ::= Directive_abbrev | CaseLabel
631--CaseElement_nosif ::= Directive_nosif | CaseLabel
632CaseElement_full ::= Directive | CaseLabel
633CaseLabel$CaseLabel ::= case$ ListExpression_allowin COLON$
634CaseLabel$CaseLabel ::= default$ COLON$
635
636-- 15.7 Iteration statements
637-- 15.7.1 Do-while statement
638--DoStatement ::= do$ Substatement_abbrev$Statement while$ ParenListExpression$Condition
639DoStatement_abbrev$DoStatement ::= do$ Substatement_abbrev$Statement while$ ParenListExpression$Condition Semicolon_abbrev$
640DoStatement_nosif$DoStatement ::= do$ Substatement_abbrev$Statement while$ ParenListExpression$Condition Semicolon_nosif$
641DoStatement_full$DoStatement ::= do$ Substatement_abbrev$Statement while$ ParenListExpression$Condition Semicolon_full$
642
643-- 15.7.2 While statement --W
644WhileStatement_abbrev$WhileStatement
645        ::= while$ ParenListExpression$Condition Substatement_abbrev$Statement
646WhileStatement_nosif$WhileStatement
647        ::= while$ ParenListExpression$Condition Substatement_nosif$Statement
648WhileStatement_full$WhileStatement
649        ::= while$ ParenListExpression$Condition Substatement_full$Statement
650
651-- 15.7.3 For statements
652 --W
653ForStatement_abbrev$ForStatement
654        ::= for$ LPAREN$ ForInitializer SEMI$ OptionalExpression SEMI$ OptionalExpression RPAREN$ Substatement_abbrev
655          | for$ LPAREN$ ForInBinding in ListExpression_allowin RPAREN$ Substatement_abbrev
656          | for$ --no_line_break$
657                each$ LPAREN$ ForInBinding in ListExpression_allowin RPAREN$ Substatement_abbrev
658ForStatement_nosif$ForStatement
659        ::= for$ LPAREN$ ForInitializer SEMI$ OptionalExpression SEMI$ OptionalExpression RPAREN$ Substatement_nosif
660          | for$ LPAREN$ ForInBinding in ListExpression_allowin RPAREN$ Substatement_nosif
661          | for$ --no_line_break$
662                each$ LPAREN$ ForInBinding in ListExpression_allowin RPAREN$ Substatement_nosif
663ForStatement_full$ForStatement
664        ::= for$ LPAREN$ ForInitializer SEMI$ OptionalExpression SEMI$ OptionalExpression RPAREN$ Substatement_full
665          | for$ LPAREN$ ForInBinding in ListExpression_allowin RPAREN$ Substatement_full
666          | for$ --no_line_break$
667                each$ LPAREN$ ForInBinding in ListExpression_allowin RPAREN$ Substatement_full           
668ForInitializer ::= %empty
669ForInitializer ::= ListExpression_noin
670ForInitializer ::= VariableDefinition_noin
671
672ForInBinding ::= PostfixExpression
673ForInBinding ::= VariableDefinitionKind VariableBinding_noin
674
675OptionalExpression ::= ListExpression_allowin
676OptionalExpression ::= %empty
677
678-- 15.8 Continue statement
679--ContinueStatement$ContinueStatement
680--      ::= continue$ | continue$ no_line_break$ Identifier$Label
681ContinueStatement_abbrev$ContinueStatement
682        ::= continue$ Semicolon_abbrev$
683          | continue$ --no_line_break$
684                Identifier$Label Semicolon_abbrev$
685ContinueStatement_nosif$ContinueStatement
686        ::= continue$ Semicolon_nosif$
687          | continue$ --no_line_break$
688                Identifier$Label Semicolon_nosif$
689ContinueStatement_full$ContinueStatement
690        ::= continue$ Semicolon_full$
691          | continue$ --no_line_break$
692                Identifier$Label Semicolon_full$
693
694-- 15.9 Break statement
695--BreakStatement$BreakStatement
696--      ::= break$ | break$ no_line_break$ Identifier$Label
697BreakStatement_abbrev$BreakStatement
698        ::= break$ Semicolon_abbrev$
699          | break$ --no_line_break$
700                Identifier$Label Semicolon_abbrev$
701BreakStatement_nosif$BreakStatement
702        ::= break$ Semicolon_nosif$
703          | break$ --no_line_break$
704                Identifier$Label Semicolon_nosif$
705BreakStatement_full$BreakStatement
706        ::= break$ Semicolon_full$
707          | break$ --no_line_break$
708                Identifier$Label Semicolon_full$
709
710-- 15.10 With statement
711 --W
712WithStatement_abbrev$WithStatement ::= with$ ParenListExpression Substatement_abbrev$Statement
713WithStatement_nosif$WithStatement ::= with$ ParenListExpression Substatement_nosif$Statement
714WithStatement_full$WithStatement ::= with$ ParenListExpression Substatement_full$Statement
715
716-- 15.11 Return statement
717--ReturnStatement$ReturnStatement
718--      ::= return$ | return$ no_line_break$ ListExpression_allowin
719ReturnStatement_abbrev$ReturnStatement
720        ::= return$ Semicolon_abbrev$
721          | return$ --no_line_break$
722                ListExpression_allowin  Semicolon_abbrev$
723ReturnStatement_nosif$ReturnStatement
724        ::= return$ Semicolon_nosif$
725          | return$ --no_line_break$
726                ListExpression_allowin Semicolon_nosif$
727ReturnStatement_full$ReturnStatement
728        ::= return$ Semicolon_full$
729          | return$ --no_line_break$
730                ListExpression_allowin Semicolon_full$
731
732-- 15.12 Throw statement
733--ThrowStatement ::= throw$ no_line_break$ ListExpression_allowin
734ThrowStatement_abbrev$ThrowStatement
735        ::= throw$ --no_line_break$
736                ListExpression_allowin Semicolon_abbrev$
737ThrowStatement_nosif$ThrowStatement
738        ::= throw$ --no_line_break$
739                ListExpression_allowin Semicolon_nosif$
740ThrowStatement_full$ThrowStatement
741        ::= throw$ --no_line_break$
742                ListExpression_allowin Semicolon_full$
743
744-- 15.13 Try statement
745TryStatement$TryStatement ::= try$ Block$Block CatchClauses
746TryStatement$TryStatement ::= try$ Block$Block CatchClausesOpt finally$ Block$FinalBlock
747CatchClausesOpt ::= CatchClauses
748CatchClausesOpt ::= %empty
749CatchClauses$$CatchClause ::= CatchClause
750CatchClauses$$CatchClause ::= CatchClauses CatchClause
751CatchClause ::= catch$ LPAREN$ PlainParameter RPAREN$ Block
752
753-- 15.14 Default XML namespace statement
754DefaultXMLNamespaceStatement ::= default$ --no_line_break$
755                                'xml'$ --no_line_break$
756                                namespace$ ASSIGN$ NonAssignmentExpression_allowin
757
758-- 16 Directives --W
759AnnotatedDirective_abbrev
760        ::= Attributes --no_line_break$
761                AnnotatableDirective_abbrev
762        | AnnotatableDirective_abbrev
763Directive_abbrev ::= AnnotatedDirective_abbrev
764          | EmptyStatment
765          | IncludeDirective
766          | ImportDirectives
767          | UseDirective
768          | Statement_abbrev
769
770AnnotatedDirective
771        ::= Attributes --no_line_break$
772            AnnotatableDirective_full
773          | AnnotatableDirective_full
774Directive ::= AnnotatedDirective
775          | EmptyStatment
776          | IncludeDirective
777          | ImportDirectives -- ignore we just want to group imports
778          | UseDirective
779          | Statement_full
780
781 --W
782AnnotatableDirective_abbrev
783        ::= FunctionDefinition
784          | VariableDefinitionSemi_abbrev
785          | ClassDefinition
786          | InterfaceDefinition
787          | NamespaceDefinition
788
789AnnotatableDirective_full
790        ::= FunctionDefinition
791          | VariableDefinitionSemi_full
792          | ClassDefinition
793          | InterfaceDefinition
794          | NamespaceDefinition
795
796VariableDefinitionSemi_abbrev ::= VariableDefinition_allowin Semicolon_abbrev$
797--VariableDefinitionSemi_nosif ::= VariableDefinition_allowin Semicolon_nosif$
798VariableDefinitionSemi_full ::= VariableDefinition_allowin Semicolon_full$
799Directives$$Directive ::= Directive
800Directives$$Directive ::= Directives Directive
801
802--DirectivesPrefix$$Directive_full ::= Directive_full
803--DirectivesPrefix$$Directive_full ::= DirectivesPrefix Directive_full
804
805-- 16.1 Attributes
806Attributes$$Attribute ::= Attribute
807Attributes$$Attribute ::= Attributes Attribute --AttributeCombination
808
809--AttributeCombination$$Attribute ::= Attribute no_line_break$ Attributes
810
811Attribute ::= AttributeExpression
812Attribute ::= ReservedNamespace
813Attribute ::= LBRACK$ AssignmentExpression_allowin$Expression RBRACK$
814
815AttributeExpression ::= Identifier
816AttributeExpression ::= AttributeExpression PropertyOperator
817
818-- 16.2 Import directive
819ImportDirective$ImportDirective ::= import$ Name DOT$ STAR$OnDemand Semicolon_abbrev$
820ImportDirective$ImportDirective ::= import$ Name Semicolon_abbrev$
821
822-- grouping
823ImportDirectives$$ImportDirective
824        ::= ImportDirective
825          | ImportDirectives ImportDirective
826
827-- 16.3 Include directive
828IncludeDirective ::= include$ --no_line_break$
829                        String Semicolon_abbrev$
830
831-- 16.4 Use directive
832UseDirective ::= use$ namespace$ ListExpression_allowin Semicolon_abbrev$
833
834-- 17 Definitions
835-- 17.1 Variable definition
836 --B
837VariableDefinition_allowin$VariableDefinition
838        ::= VariableDefinitionKind$Kind
839            VariableBindingList_allowin$Bindings
840VariableDefinition_noin$VariableDefinition
841        ::= VariableDefinitionKind$Kind
842            VariableBindingList_noin$Bindings
843/.
844        public AttributeList getAttributes() {
845                if (!(getParent() instanceof AnnotatedDirective)) return null;
846                return ((AnnotatedDirective) getParent()).getAttributes();
847        }
848./
849VariableDefinitionKind$VarKind ::= var$Token
850VariableDefinitionKind$ConstKind ::= const$Token
851
852VariableDefinitionSemi_abbrev$VariableDefinition
853        ::= VariableDefinitionKind$Kind
854            VariableBindingList_allowin$Bindings
855            Semicolon_abbrev$
856VariableDefinitionSemi_full$VariableDefinition
857        ::= VariableDefinitionKind$Kind
858            VariableBindingList_allowin$Bindings
859            Semicolon_full$
860--VariableMods$$VariableMod ::= %empty
861--VariableMods$$VariableMod ::= VariableMods VariableMod
862--VariableMod$OtherMod ::= static$Token
863--VariableMod$OtherMod ::= prototype$Token
864--VariableMod ::= NamespaceMod
865
866 --B
867VariableBindingList_allowin$$VariableBinding_allowin ::= VariableBinding_allowin
868VariableBindingList_allowin$$VariableBinding_allowin ::= VariableBindingList_allowin COMMA$ VariableBinding_allowin
869
870VariableBindingList_noin$$VariableBinding_noin ::= VariableBinding_noin
871VariableBindingList_noin$$VariableBinding_noin ::= VariableBindingList_noin COMMA$ VariableBinding_noin
872 --B
873VariableBinding_allowin$VariableBinding
874        ::= TypedIdentifier_allowin$Ident VariableInitialisation_allowin$Initializer
875VariableBinding_noin$VariableBinding
876        ::= TypedIdentifier_noin$Ident VariableInitialisation_noin$Initializer
877 --B
878VariableInitialisation_allowin$VariableInitialisation
879        ::= %empty
880          | ASSIGN$ AssignmentExpression_allowin$AssignmentExpression
881          | ASSIGN$ Attributes
882VariableInitialisation_noin$VariableInitialisation
883        ::= %empty
884          | ASSIGN$ AssignmentExpression_noin$AssignmentExpression
885          | ASSIGN$ Attributes
886 --B
887TypedIdentifier_allowin$TypedIdentifier
888        ::= Identifier$Name
889          | Identifier$Name COLON$ TypeExpression_allowin$Type
890TypedIdentifier_noin$TypedIdentifier
891        ::= Identifier$Name
892          | Identifier$Name COLON$ TypeExpression_noin$Type
893
894-- 17.2 Function definition
895FunctionDefinition$FunctionDefinition ::= function$ FunctionAccessor$Accessor --no_line_break$
896                                          Identifier$Name FunctionCommon$Common Block
897FunctionDefinition$FunctionDefinition ::= function$ Identifier$Name FunctionCommon$Common Block
898/.
899        public boolean isConstructor;
900        SymbolTable symbolTable;
901        public void setSymbolTable(SymbolTable symbolTable) { this.symbolTable = symbolTable; }
902        public SymbolTable getSymbolTable() { return symbolTable; }
903        public AttributeList getAttributes() {
904                if (!(getParent() instanceof AnnotatedDirective)) return null;
905                return ((AnnotatedDirective) getParent()).getAttributes();
906        }
907./
908FunctionSignature$FunctionDefinition ::= function$ FunctionAccessor$Accessor --no_line_break$
909                                          Identifier$Name FunctionCommon$Common Semicolon_abbrev$
910FunctionSignature$FunctionDefinition ::= function$ Identifier$Name FunctionCommon$Common Semicolon_abbrev$
911
912FunctionAccessor$FunctionAccessor ::= get$Token
913FunctionAccessor$FunctionAccessor ::= set$Token
914
915--FunctionMods$$FunctionMod ::= %empty
916--FunctionMods$$FunctionMod ::= FunctionMods FunctionMod
917--FunctionMod$OtherMod ::= static$Token
918--FunctionMod$OtherMod ::= prototype$Token
919--FunctionMod$OtherMod ::= final$Token
920--FunctionMod$OtherMod ::= override$Token
921--FunctionMod$OtherMod ::= native$Token
922--FunctionMod ::= NamespaceMod
923--NamespaceMod ::= CustomNamespace
924--NamespaceMod ::= ReservedNamespace
925--CustomNamespace$CustomNamespace ::= AttributeExpression$Expression -- in class
926
927-- 17.2.1 Function body
928FunctionCommon$FunctionCommon ::= LPAREN$ Parameters RPAREN$ ResultType
929
930-- 17.2.2 Function signature
931
932-- 17.2.3 Parameter list
933Parameters$$Parameter ::= %empty
934Parameters$$Parameter ::= NonemptyParameters
935NonemptyParameters$$Parameter ::= Parameter
936NonemptyParameters$$Parameter ::= PlainParameter COMMA$ NonemptyParameters
937Parameter ::= PlainParameter | RestParameter
938PlainParameter$PlainParameter ::= TypedIdentifier_allowin$Ident
939PlainParameter$PlainParameter ::= TypedIdentifier_allowin$Ident ASSIGN$ AssignmentExpression_allowin$Initializer
940RestParameter$RestParameter ::= REST$
941RestParameter$RestParameter ::= REST$ Identifier$Untyped
942RestParameter$RestParameter ::= REST$ TypedIdentifier_allowin$Ident
943
944-- 17.2.4 Result type
945ResultType ::= %empty
946-- use postfixexpression because of conflict with void expression
947ResultType$ResultType ::= COLON$ PostfixExpression$Type
948ResultType$ResultType ::= COLON$ void$Void
949
950-- 17.3 Class definition
951ClassDefinition ::= class$ Name Inheritance Block$Body
952/.
953        SymbolTable symbolTable;
954        public void setSymbolTable(SymbolTable symbolTable) { this.symbolTable = symbolTable; }
955        public SymbolTable getSymbolTable() { return symbolTable; }
956        public AttributeList getAttributes() {
957                if (!(getParent() instanceof AnnotatedDirective)) return null;
958                return ((AnnotatedDirective) getParent()).getAttributes();
959        }
960./
961-- 17.3.1 Class attributes
962--ClassMods$$ClassMod ::= %empty
963--ClassMods$$ClassMod ::= ClassMods ClassMod
964--ClassMod$ClassMod ::= internal
965--ClassMod$ClassMod ::= public
966--ClassMod$ClassMod ::= final --class only
967--ClassMod$ClassMod ::= dynamic --class only
968
969-- 17.3.2 Class name
970Name$Name ::= Identifier$Ident
971Name$Name ::= Name$Qualifier DOT$ Identifier$Ident
972
973-- 17.3.3 Class inheritance
974Inheritance ::= %empty
975Inheritance$Inheritance ::= extends$ TypeExpression_allowin$Extends
976Inheritance$Inheritance ::= implements$ TypeExpressionList$Implements
977Inheritance$Inheritance ::= extends$ TypeExpression_allowin$Extends implements$ TypeExpressionList$Implements
978
979TypeExpressionList$$TypeExpression_allowin ::= TypeExpression_allowin
980TypeExpressionList$$TypeExpression_allowin ::= TypeExpressionList COMMA$ TypeExpression_allowin
981
982-- 17.3.4 Class block
983-- must not contain a ClassDefinition or InterfaceDefinition
984-- AttributeExpression as namespace attribute for Variable and function
985
986-- 17.4 Interface definition
987InterfaceDefinition ::= interface$ Name ExtendsList InterfaceBlock$Body
988/.
989        public AttributeList getAttributes() {
990                if (!(getParent() instanceof AnnotatedDirective)) return null;
991                return ((AnnotatedDirective) getParent()).getAttributes();
992        }
993./
994
995-- 17.4.1 Interface attributes (see 17.3.1)
996-- 17.4.2 Interface name (see 17.3.2)
997-- 17.4.3 Interface inheritance
998ExtendsList ::= %empty
999ExtendsList ::= extends$ TypeExpressionList$Extends
1000
1001-- 17.4.4 Interface block
1002-- must only contain FunctionDefinitions with no Block and no attribute.
1003InterfaceBlock$InterfaceBlock ::= LCURLY$ RCURLY$
1004InterfaceBlock$InterfaceBlock ::= LCURLY$ InterfaceDirectives$Directives RCURLY$
1005/.
1006        SymbolTable symbolTable;
1007        public void setSymbolTable(SymbolTable symbolTable) { this.symbolTable = symbolTable; }
1008        public SymbolTable getSymbolTable() { return symbolTable; }
1009./
1010InterfaceDirectives$$FunctionSignature ::= FunctionSignature
1011InterfaceDirectives$$FunctionSignature ::= InterfaceDirectives FunctionSignature
1012-- 17.5 Package definition
1013PackageDefinition$PackageDefinition ::= package$ Block$Body
1014PackageDefinition$PackageDefinition ::= package$ Name Block$Body
1015
1016-- 17.5.1 Package name (see 17.3.2)
1017
1018-- 17.6 Namespace definition
1019     -- condensed NamespaceBinding, NamespaceInitialisation
1020NamespaceDefinition$NamespaceDefinition ::= namespace$ Identifier$Name
1021NamespaceDefinition$NamespaceDefinition ::= namespace$ Identifier$Name ASSIGN$ AssignmentExpression_allowin$Assignment
1022/.
1023        public AttributeList getAttributes() {
1024                if (!(getParent() instanceof AnnotatedDirective)) return null;
1025                return ((AnnotatedDirective) getParent()).getAttributes();
1026        }
1027./
1028-- 17.7 Program definition
1029     -- flattend recursive to list
1030     -- original Program ::= Directives | PackageDefinition Program
1031Program$Program ::= PackageDefinitions$Packages Directives$Directives
1032Program$Program ::= PackageDefinitions$Packages
1033/.      public PackageDefinition getPackage() {
1034                if (_Packages == null || _Packages.size() < 1) return null;
1035                return _Packages.getPackageDefinitionAt(0);
1036        }
1037./
1038
1039PackageDefinitions$$PackageDefinition ::= %empty
1040PackageDefinitions$$PackageDefinition ::= PackageDefinitions PackageDefinition
1041%End
1042
1043%Headers
1044/.
1045                Stack<SymbolTable> symbolTableStack = null;
1046                SymbolTable topLevelSymbolTable = null;
1047               
1048                public SymbolTable getTopLevelSymbolTable() {
1049                        return topLevelSymbolTable;
1050                }
1051               
1052                public SymbolTable getEnclosingSymbolTable(IAst n) {
1053                        if (topLevelSymbolTable != null) {
1054                                return topLevelSymbolTable.getEnclosingSymbolTable(n);
1055                        }
1056                        return null;
1057                }
1058               
1059                public void resolve(ASTNode root) {
1060                        if (root != null) {
1061                                symbolTableStack = new Stack<SymbolTable>();
1062                                topLevelSymbolTable = new SymbolTable(null, Program.class);
1063                                symbolTableStack.push(topLevelSymbolTable);
1064                                root.accept(new SymbolTableVisitor(this));
1065                        }
1066                }
1067./
1068%End
1069
1070%Types
1071RelationalExpression ::= RelationalExpression_allowin | RelationalExpression_noin
1072
1073EqualityExpression ::= EqualityExpression_allowin | EqualityExpression_noin
1074
1075BitwiseAndExpression ::= BitwiseAndExpression_allowin | BitwiseAndExpression_noin
1076
1077BitwiseXorExpression ::= BitwiseXorExpression_allowin | BitwiseXorExpression_noin
1078
1079BitwiseOrExpression ::= BitwiseOrExpression_allowin | BitwiseOrExpression_noin
1080
1081LogicalAndExpression ::= LogicalAndExpression_allowin | LogicalAndExpression_noin
1082
1083LogicalOrExpression ::= LogicalOrExpression_allowin | LogicalOrExpression_noin
1084
1085ConditionalExpression ::= ConditionalExpression_allowin | ConditionalExpression_noin
1086
1087NonAssignmentExpression ::= NonAssignmentExpression_allowin | NonAssignmentExpression_noin
1088
1089AssignmentExpression ::= AssignmentExpression_allowin | AssignmentExpression_noin
1090
1091--AssignmentExpressionList ::= AssignmentExpression_allowinList | AssignmentExpression_noinList
1092
1093TypeExpression ::= TypeExpression_allowin | TypeExpression_noin
1094
1095Statement ::= Statement_abbrev | Statement_nosif | Statement_full
1096
1097Substatement ::= Substatement_abbrev | Substatement_nosif | Substatement_full
1098
1099Semicolon ::= Semicolon_abbrev | Semicolon_nosif | Semicolon_full
1100
1101ExpressionStatement ::= ExpressionStatement_abbrev | ExpressionStatement_nosif | ExpressionStatement_full
1102
1103SuperStatement ::= SuperStatement_abbrev | SuperStatement_nosif | SuperStatement_full
1104
1105LabeledStatement ::= LabeledStatement_abbrev | LabeledStatement_nosif | LabeledStatement_full
1106
1107IfStatement ::= IfStatement_abbrev | IfStatement_nosif | IfStatement_full
1108
1109DoStatement ::= DoStatement_abbrev | DoStatement_nosif | DoStatement_full
1110
1111WhileStatement ::= WhileStatement_abbrev | WhileStatement_nosif | WhileStatement_full
1112
1113ForStatement ::= ForStatement_abbrev | ForStatement_nosif | ForStatement_full
1114
1115ContinueStatement ::= ContinueStatement_abbrev | ContinueStatement_nosif | ContinueStatement_full
1116
1117BreakStatement ::= BreakStatement_abbrev | BreakStatement_nosif | BreakStatement_full
1118
1119WithStatement ::= WithStatement_abbrev | WithStatement_nosif | WithStatement_full
1120
1121ReturnStatement ::= ReturnStatement_abbrev | ReturnStatement_nosif | ReturnStatement_full
1122
1123ThrowStatement ::= ThrowStatement_abbrev | ThrowStatement_nosif | ThrowStatement_full
1124
1125VariableDefinitionSemi ::= VariableDefinitionSemi_abbrev | VariableDefinitionSemi_full
1126%End
Note: See TracBrowser for help on using the browser.