| 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 |
|---|
| 130 | Identifier$Ident ::= IDENTIFIER$Token |
|---|
| 131 | Identifier$Ident ::= each$Token |
|---|
| 132 | Identifier$Ident ::= get$Token |
|---|
| 133 | Identifier$Ident ::= set$Token |
|---|
| 134 | Identifier$Ident ::= namespace$Token |
|---|
| 135 | Identifier$Ident ::= include$Token |
|---|
| 136 | Identifier$Ident ::= dynamic$Token |
|---|
| 137 | Identifier$Ident ::= static$Token |
|---|
| 138 | Identifier$Ident ::= xml$Token |
|---|
| 139 | Identifier$Ident ::= override$Token |
|---|
| 140 | Identifier$Ident ::= final$Token |
|---|
| 141 | Identifier$Ident ::= prototype$Token |
|---|
| 142 | Identifier$Ident ::= native$Token |
|---|
| 143 | /. |
|---|
| 144 | Object decl; |
|---|
| 145 | public void setDeclaration(Object decl) { this.decl = decl; } |
|---|
| 146 | public Object getDeclaration() { return decl; } |
|---|
| 147 | ./ |
|---|
| 148 | |
|---|
| 149 | PropertyIdentifier ::= Identifier |
|---|
| 150 | PropertyIdentifier$GenericIdent ::= STAR |
|---|
| 151 | |
|---|
| 152 | Qualifier ::= PropertyIdentifier |
|---|
| 153 | Qualifier ::= ReservedNamespace |
|---|
| 154 | |
|---|
| 155 | SimpleQualifiedIdentifier ::= PropertyIdentifier |
|---|
| 156 | SimpleQualifiedIdentifier$SimpleQualifiedIdentifier ::= Qualifier$Base DBL_COLON$ PropertyIdentifier$Ident |
|---|
| 157 | SimpleQualifiedIdentifier$SimpleQualifiedIdentifier ::= Qualifier$Base DBL_COLON$ Brackets |
|---|
| 158 | |
|---|
| 159 | ExpressionQualifiedIdentifier$ExpressionQualifiedIdentifier ::= ParenExpression$Base DBL_COLON$ PropertyIdentifier$Ident |
|---|
| 160 | ExpressionQualifiedIdentifier$ExpressionQualifiedIdentifier ::= ParenExpression$Base DBL_COLON$ Brackets |
|---|
| 161 | |
|---|
| 162 | NonAttributeQualifiedIdentifier ::= SimpleQualifiedIdentifier |
|---|
| 163 | NonAttributeQualifiedIdentifier ::= ExpressionQualifiedIdentifier |
|---|
| 164 | |
|---|
| 165 | QualifiedIdentifier$QualifiedIdentifier ::= E4X_ATTRI$ Brackets |
|---|
| 166 | QualifiedIdentifier$QualifiedIdentifier ::= E4X_ATTRI$ NonAttributeQualifiedIdentifier$Ident |
|---|
| 167 | QualifiedIdentifier ::= NonAttributeQualifiedIdentifier |
|---|
| 168 | |
|---|
| 169 | -- 14.2 Primary expressions |
|---|
| 170 | PrimaryExpression ::= Literal |
|---|
| 171 | PrimaryExpression ::= QualifiedIdentifier |
|---|
| 172 | --PrimaryExpression ::= ReservedNamespace --? |
|---|
| 173 | PrimaryExpression ::= ParenListExpression |
|---|
| 174 | PrimaryExpression ::= ArrayInitialiser |
|---|
| 175 | PrimaryExpression ::= ObjectInitialiser |
|---|
| 176 | PrimaryExpression ::= FunctionExpression |
|---|
| 177 | PrimaryExpression ::= ThisExpression |
|---|
| 178 | |
|---|
| 179 | ThisExpression$ThisExpression ::= this |
|---|
| 180 | |
|---|
| 181 | -- Literals |
|---|
| 182 | Literal$NumberLiteral ::= Number$Token |
|---|
| 183 | Literal$StringLiteral ::= String$Token |
|---|
| 184 | Literal$XmlLiteral ::= Xml$Token |
|---|
| 185 | Literal$BooleanLiteral ::= true$Token |
|---|
| 186 | Literal$BooleanLiteral ::= false$Token |
|---|
| 187 | Literal$RegexLiteral ::= DIV_RX$ RegularExpression$Token |
|---|
| 188 | Literal$NullLiteral ::= null$Token |
|---|
| 189 | |
|---|
| 190 | -- 14.3 Reserved namespace expressions |
|---|
| 191 | ReservedNamespace$ReservedNamespace ::= public$Token |
|---|
| 192 | ReservedNamespace$ReservedNamespace ::= private$Token |
|---|
| 193 | ReservedNamespace$ReservedNamespace ::= protected$Token |
|---|
| 194 | ReservedNamespace$ReservedNamespace ::= internal$Token |
|---|
| 195 | |
|---|
| 196 | -- 14.4 Parenthesized expressions |
|---|
| 197 | ParenExpression ::= LPAREN$ AssignmentExpression_allowin RPAREN$ |
|---|
| 198 | ParenListExpression ::= LPAREN$ ListExpression_allowin$Expressions RPAREN$ |
|---|
| 199 | |
|---|
| 200 | -- 14.5 Function expression |
|---|
| 201 | FunctionExpression$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 |
|---|
| 211 | ObjectInitialiser$ObjectInitialiser ::= LCURLY$ NonemptyFieldList$Fields RCURLY$ |
|---|
| 212 | ObjectInitialiser$ObjectInitialiser ::= LCURLY$ RCURLY$ |
|---|
| 213 | NonemptyFieldList$$LiteralField ::= LiteralField |
|---|
| 214 | NonemptyFieldList$$LiteralField ::= LiteralField COMMA$ NonemptyFieldList |
|---|
| 215 | LiteralField ::= FieldName COLON$ AssignmentExpression_allowin$AssignmentExpression |
|---|
| 216 | FieldName$FieldName ::= NonAttributeQualifiedIdentifier |
|---|
| 217 | FieldName$FieldName ::= String |
|---|
| 218 | FieldName$FieldName ::= Number |
|---|
| 219 | |
|---|
| 220 | -- 14.7 Array initialiser |
|---|
| 221 | ArrayInitialiser ::= LBRACK$ ElementList RBRACK$ |
|---|
| 222 | ElementList$$LiteralElement ::= %empty |
|---|
| 223 | ElementList$$LiteralElement ::= LiteralElement |
|---|
| 224 | ElementList$$LiteralElement ::= COMMA$ ElementList |
|---|
| 225 | ElementList$$LiteralElement ::= LiteralElement COMMA$ ElementList |
|---|
| 226 | LiteralElement ::= AssignmentExpression_noin |
|---|
| 227 | |
|---|
| 228 | -- 14.8 XML initialisers |
|---|
| 229 | -- using custom lexer see org.axdt.as3.imp.parser.xml |
|---|
| 230 | -- 14.9 Super expression |
|---|
| 231 | SuperExpression$SuperExpression ::= super$ | super$ Arguments |
|---|
| 232 | |
|---|
| 233 | --14.10 Postfix Expressions |
|---|
| 234 | PostfixExpression ::= FullPostfixExpression |
|---|
| 235 | PostfixExpression ::= ShortNewExpression |
|---|
| 236 | |
|---|
| 237 | FullPostfixExpression ::= PrimaryExpression |
|---|
| 238 | FullPostfixExpression ::= FullNewExpression |
|---|
| 239 | FullPostfixExpression$PostfixExpression ::= FullPostfixExpression$Expression PropertyOperator |
|---|
| 240 | FullPostfixExpression$PostfixExpression ::= SuperExpression$Expression PropertyOperator |
|---|
| 241 | FullPostfixExpression$Invocation ::= FullPostfixExpression$Expression Arguments |
|---|
| 242 | FullPostfixExpression$Query ::= FullPostfixExpression$Expression QueryOperator$Query |
|---|
| 243 | FullPostfixExpression$PostIncrementExpression ::= PostfixExpression$Expression --no_line_break$ |
|---|
| 244 | INC$ |
|---|
| 245 | FullPostfixExpression$PostDecrementExpression ::= PostfixExpression$Expression --no_line_break$ |
|---|
| 246 | DEC$ |
|---|
| 247 | |
|---|
| 248 | --14.11 New expressions |
|---|
| 249 | FullNewExpression$NewExpression ::= new$ FullNewSubexpression$Expression Arguments |
|---|
| 250 | FullNewSubexpression ::= PrimaryExpression |
|---|
| 251 | FullNewSubexpression ::= FullNewExpression |
|---|
| 252 | FullNewSubexpression$PropSubExpression ::= FullNewSubexpression$Expression PropertyOperator$Prop |
|---|
| 253 | FullNewSubexpression$PropSubExpression ::= SuperExpression$Expression PropertyOperator$Prop |
|---|
| 254 | |
|---|
| 255 | ShortNewExpression$NewExpression ::= new$ ShortNewSubexpression$Expression |
|---|
| 256 | ShortNewSubexpression ::= FullNewSubexpression |
|---|
| 257 | ShortNewSubexpression ::= ShortNewExpression |
|---|
| 258 | |
|---|
| 259 | -- 14.12 Property accessors |
|---|
| 260 | PropertyOperator ::= DOT$ QualifiedIdentifier |
|---|
| 261 | PropertyOperator ::= Brackets |
|---|
| 262 | Brackets ::= LBRACK$ ListExpression_allowin$ListExpression RBRACK$ |
|---|
| 263 | |
|---|
| 264 | -- 14.13 Query operators |
|---|
| 265 | QueryOperator$QueryQualifiedIdentifier ::= E4X_DESC$ QualifiedIdentifier |
|---|
| 266 | QueryOperator$QueryListExpression ::= DOT$ LPAREN$ ListExpression_allowin$ListExpression RPAREN$ |
|---|
| 267 | |
|---|
| 268 | -- 14.14 Call expressions |
|---|
| 269 | Arguments$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 |
|---|
| 278 | UnaryExpression ::= PostfixExpression |
|---|
| 279 | UnaryExpression$DeleteExpression ::= delete$ PostfixExpression$Expression |
|---|
| 280 | UnaryExpression$VoidExpression ::= void$ UnaryExpression$Expression |
|---|
| 281 | UnaryExpression$TypeOfExpression ::= typeof$ UnaryExpression$Expression |
|---|
| 282 | UnaryExpression$PreIncrementExpression ::= INC$ PostfixExpression$Expression |
|---|
| 283 | UnaryExpression$PreDecrementExpression ::= DEC$ PostfixExpression$Expression |
|---|
| 284 | UnaryExpression$UnaryPlusExpression ::= PLUS$ UnaryExpression$Expression |
|---|
| 285 | UnaryExpression$UnaryMinusExpression ::= MINUS$ UnaryExpression$Expression |
|---|
| 286 | --UnaryExpression ::= MINUS$Op NegatedMinLong |
|---|
| 287 | UnaryExpression$BinaryNotExpression ::= BNOT$ UnaryExpression$Expression |
|---|
| 288 | UnaryExpression$LogicalNotExpression ::= LNOT$ UnaryExpression$Expression |
|---|
| 289 | |
|---|
| 290 | -- 14.16 Binary expressions |
|---|
| 291 | -- 14.16.1 Multiplicative expressions |
|---|
| 292 | MultiplicativeExpression ::= UnaryExpression |
|---|
| 293 | MultiplicativeExpression$MultiplicativeExpression ::= MultiplicativeExpression$Left STAR$Op UnaryExpression$Right |
|---|
| 294 | MultiplicativeExpression$MultiplicativeExpression ::= MultiplicativeExpression$Left DIV$Op UnaryExpression$Right |
|---|
| 295 | MultiplicativeExpression$MultiplicativeExpression ::= MultiplicativeExpression$Left MOD$Op UnaryExpression$Right |
|---|
| 296 | |
|---|
| 297 | -- 14.16.2 Multiplicative expressions |
|---|
| 298 | AdditiveExpression ::= MultiplicativeExpression |
|---|
| 299 | AdditiveExpression$AdditiveExpression ::= AdditiveExpression$Left PLUS$Op MultiplicativeExpression$Right |
|---|
| 300 | AdditiveExpression$AdditiveExpression ::= AdditiveExpression$Left MINUS$Op MultiplicativeExpression$Right |
|---|
| 301 | |
|---|
| 302 | -- 14.16.3 Shift expressions |
|---|
| 303 | ShiftExpression ::= AdditiveExpression |
|---|
| 304 | ShiftExpression$ShiftExpression ::= ShiftExpression$Left SL$Op AdditiveExpression$Right |
|---|
| 305 | ShiftExpression$ShiftExpression ::= ShiftExpression$Left SR$Op AdditiveExpression$Right |
|---|
| 306 | ShiftExpression$ShiftExpression ::= ShiftExpression$Left BSR$Op AdditiveExpression$Right |
|---|
| 307 | |
|---|
| 308 | -- 14.16.4 Relational expressions |
|---|
| 309 | RelationalExpression_allowin ::= ShiftExpression |
|---|
| 310 | RelationalExpression_allowin$RelationalExpression |
|---|
| 311 | ::= RelationalExpression_allowin$Left |
|---|
| 312 | RelationalOpWithIn$Op ShiftExpression$Right |
|---|
| 313 | |
|---|
| 314 | RelationalExpression_noin ::= ShiftExpression |
|---|
| 315 | RelationalExpression_noin$RelationalExpression |
|---|
| 316 | ::= RelationalExpression_noin$Left |
|---|
| 317 | RelationalOperator$Op ShiftExpression$Right |
|---|
| 318 | |
|---|
| 319 | RelationalOperator$RelationalOperator |
|---|
| 320 | ::= LT$Token |
|---|
| 321 | | GT$Token |
|---|
| 322 | | LE$Token |
|---|
| 323 | | GE$Token |
|---|
| 324 | | instanceof$Token |
|---|
| 325 | | is$Token |
|---|
| 326 | | as$Token |
|---|
| 327 | |
|---|
| 328 | RelationalOpWithIn ::= RelationalOperator |
|---|
| 329 | RelationalOpWithIn$RelationalOperator |
|---|
| 330 | ::= in$Token |
|---|
| 331 | |
|---|
| 332 | -- 14.16.5 Equality expressions --B |
|---|
| 333 | EqualityExpression_allowin ::= RelationalExpression_allowin |
|---|
| 334 | EqualityExpression_allowin$EqualityExpression |
|---|
| 335 | ::= EqualityExpression_allowin$Left EqualityOperator$Op |
|---|
| 336 | RelationalExpression_allowin$Right |
|---|
| 337 | |
|---|
| 338 | EqualityExpression_noin ::= RelationalExpression_noin |
|---|
| 339 | EqualityExpression_noin$EqualityExpression |
|---|
| 340 | ::= EqualityExpression_noin$Left EqualityOperator$Op |
|---|
| 341 | RelationalExpression_noin$Right |
|---|
| 342 | |
|---|
| 343 | EqualityOperator$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 |
|---|
| 350 | BitwiseAndExpression_allowin ::= EqualityExpression_allowin |
|---|
| 351 | BitwiseAndExpression_allowin$BitwiseAndExpression |
|---|
| 352 | ::= BitwiseAndExpression_allowin$Left BAND$ |
|---|
| 353 | EqualityExpression_allowin$Right |
|---|
| 354 | |
|---|
| 355 | BitwiseAndExpression_noin ::= EqualityExpression_noin |
|---|
| 356 | BitwiseAndExpression_noin$BitwiseAndExpression |
|---|
| 357 | ::= BitwiseAndExpression_noin$Left BAND$ |
|---|
| 358 | EqualityExpression_noin$Right |
|---|
| 359 | |
|---|
| 360 | BitwiseXorExpression_allowin ::= BitwiseAndExpression_allowin |
|---|
| 361 | BitwiseXorExpression_allowin$BitwiseXorExpression |
|---|
| 362 | ::= BitwiseXorExpression_allowin$Left BXOR$ |
|---|
| 363 | BitwiseAndExpression_allowin$Right |
|---|
| 364 | |
|---|
| 365 | BitwiseXorExpression_noin ::= BitwiseAndExpression_noin |
|---|
| 366 | BitwiseXorExpression_noin$BitwiseXorExpression |
|---|
| 367 | ::= BitwiseXorExpression_noin$Left BXOR$ |
|---|
| 368 | BitwiseAndExpression_noin$Right |
|---|
| 369 | |
|---|
| 370 | BitwiseOrExpression_allowin ::= BitwiseXorExpression_allowin |
|---|
| 371 | BitwiseOrExpression_allowin$BitwiseOrExpression |
|---|
| 372 | ::= BitwiseOrExpression_allowin$Left BOR$ |
|---|
| 373 | BitwiseXorExpression_allowin$Right |
|---|
| 374 | |
|---|
| 375 | BitwiseOrExpression_noin ::= BitwiseXorExpression_noin |
|---|
| 376 | BitwiseOrExpression_noin$BitwiseOrExpression |
|---|
| 377 | ::= BitwiseOrExpression_noin$Left BOR$ |
|---|
| 378 | BitwiseXorExpression_noin$Right |
|---|
| 379 | |
|---|
| 380 | -- 14.16.7 Logical expressions --B |
|---|
| 381 | LogicalAndExpression_allowin ::= BitwiseOrExpression_allowin |
|---|
| 382 | LogicalAndExpression_allowin$LogicalAndExpression |
|---|
| 383 | ::= LogicalAndExpression_allowin$Left LAND$ |
|---|
| 384 | BitwiseOrExpression_allowin$Right |
|---|
| 385 | |
|---|
| 386 | LogicalAndExpression_noin ::= BitwiseOrExpression_noin |
|---|
| 387 | LogicalAndExpression_noin$LogicalAndExpression |
|---|
| 388 | ::= LogicalAndExpression_noin$Left LAND$ |
|---|
| 389 | BitwiseOrExpression_noin$Right |
|---|
| 390 | |
|---|
| 391 | LogicalOrExpression_allowin ::= LogicalAndExpression_allowin |
|---|
| 392 | LogicalOrExpression_allowin$LogicalOrExpression |
|---|
| 393 | ::= LogicalOrExpression_allowin$Left LOR$ |
|---|
| 394 | LogicalAndExpression_allowin$Right |
|---|
| 395 | |
|---|
| 396 | LogicalOrExpression_noin ::= LogicalAndExpression_noin |
|---|
| 397 | LogicalOrExpression_noin$LogicalOrExpression |
|---|
| 398 | ::= LogicalOrExpression_noin$Left LOR$ |
|---|
| 399 | LogicalAndExpression_noin$Right |
|---|
| 400 | |
|---|
| 401 | -- 14.17 Conditional expressions |
|---|
| 402 | --B |
|---|
| 403 | ConditionalExpression_allowin ::= LogicalOrExpression_allowin |
|---|
| 404 | ConditionalExpression_allowin$ConditionalExpression |
|---|
| 405 | ::= LogicalOrExpression_allowin$Condition QUESTION$ |
|---|
| 406 | AssignmentExpression_allowin$Left COLON$ |
|---|
| 407 | AssignmentExpression_allowin$Right |
|---|
| 408 | |
|---|
| 409 | ConditionalExpression_noin ::= LogicalOrExpression_noin |
|---|
| 410 | ConditionalExpression_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 |
|---|
| 417 | NonAssignmentExpression_allowin ::= LogicalOrExpression_allowin |
|---|
| 418 | NonAssignmentExpression_allowin$NonAssignmentExpression |
|---|
| 419 | ::= LogicalOrExpression_allowin$Condition QUESTION$ |
|---|
| 420 | NonAssignmentExpression_allowin$Left COLON$ |
|---|
| 421 | NonAssignmentExpression_allowin$Right |
|---|
| 422 | |
|---|
| 423 | NonAssignmentExpression_noin ::= LogicalOrExpression_noin |
|---|
| 424 | NonAssignmentExpression_noin$NonAssignmentExpression |
|---|
| 425 | ::= LogicalOrExpression_noin$Condition QUESTION$ |
|---|
| 426 | NonAssignmentExpression_noin$Left COLON$ |
|---|
| 427 | NonAssignmentExpression_noin$Right |
|---|
| 428 | |
|---|
| 429 | -- 14.19 Assignment expressions |
|---|
| 430 | --B |
|---|
| 431 | AssignmentExpression_allowin ::= ConditionalExpression_allowin |
|---|
| 432 | AssignmentExpression_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 | |
|---|
| 437 | AssignmentExpression_noin ::= ConditionalExpression_noin |
|---|
| 438 | AssignmentExpression_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 | |
|---|
| 443 | CompoundAssignment$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 | |
|---|
| 456 | LogicalAssignment$LogicalAssignment |
|---|
| 457 | ::= LAND_ASSIGN$Token |
|---|
| 458 | | LOR_ASSIGN$Token |
|---|
| 459 | | LXOR_ASSIGN$Token |
|---|
| 460 | |
|---|
| 461 | -- 14.20 List expressions |
|---|
| 462 | --B |
|---|
| 463 | ListExpression_allowin$$AssignmentExpression_allowin |
|---|
| 464 | ::= AssignmentExpression_allowin |
|---|
| 465 | | ListExpression_allowin COMMA$ AssignmentExpression_allowin |
|---|
| 466 | |
|---|
| 467 | ListExpression_noin$$AssignmentExpression_noin |
|---|
| 468 | ::= AssignmentExpression_noin |
|---|
| 469 | | ListExpression_noin COMMA$ AssignmentExpression_noin |
|---|
| 470 | |
|---|
| 471 | -- 14.21 Type expressions |
|---|
| 472 | TypeExpression_allowin ::= NonAssignmentExpression_allowin |
|---|
| 473 | TypeExpression_noin ::= NonAssignmentExpression_noin |
|---|
| 474 | |
|---|
| 475 | -- 15 Statements -- W = {_abbrev, _nosif, _full} |
|---|
| 476 | Statement_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 | |
|---|
| 493 | Statement_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 | |
|---|
| 510 | Statement_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 |
|---|
| 528 | Substatement_abbrev$Substatement |
|---|
| 529 | ::= EmptyStatment |
|---|
| 530 | | Statement_abbrev |
|---|
| 531 | | VariableDefinition_allowin Semicolon_abbrev$ |
|---|
| 532 | | Attributes --no_line_break$ |
|---|
| 533 | LCURLY$ Substatements RCURLY$ |
|---|
| 534 | Substatement_nosif$Substatement |
|---|
| 535 | ::= EmptyStatment |
|---|
| 536 | | Statement_nosif |
|---|
| 537 | | VariableDefinition_allowin Semicolon_nosif$ |
|---|
| 538 | | Attributes --no_line_break$ |
|---|
| 539 | LCURLY$ Substatements RCURLY$ |
|---|
| 540 | Substatement_full$Substatement |
|---|
| 541 | ::= EmptyStatment |
|---|
| 542 | | Statement_full |
|---|
| 543 | | VariableDefinition_allowin Semicolon_full$ |
|---|
| 544 | | Attributes --no_line_break$ |
|---|
| 545 | LCURLY$ Substatements RCURLY$ |
|---|
| 546 | |
|---|
| 547 | Substatements ::= %empty |
|---|
| 548 | Substatements ::= SubstatementsPrefix Substatement_abbrev |
|---|
| 549 | |
|---|
| 550 | SubstatementsPrefix$$Substatement_full ::= %empty |
|---|
| 551 | SubstatementsPrefix$$Substatement_full ::= SubstatementsPrefix Substatement_full |
|---|
| 552 | |
|---|
| 553 | -- no empty semicolon ! use virtual semi now instead ! |
|---|
| 554 | --Semicolon_abbrev ::= %empty |
|---|
| 555 | Semicolon_abbrev$Semicolon ::= SEMI$ | VirtualSemicolon$ |
|---|
| 556 | |
|---|
| 557 | --Semicolon_nosif ::= %empty |
|---|
| 558 | Semicolon_nosif$Semicolon ::= SEMI$ | VirtualSemicolon$ |
|---|
| 559 | |
|---|
| 560 | Semicolon_full$Semicolon ::= SEMI$ | VirtualSemicolon$ |
|---|
| 561 | |
|---|
| 562 | -- 15.1 Empty statement |
|---|
| 563 | EmptyStatment ::= SEMI$ |
|---|
| 564 | |
|---|
| 565 | -- 15.2 Expression statement |
|---|
| 566 | --ExpressionStatement ::= ListExpression -- la ! function --allowin |
|---|
| 567 | --ExpressionStatement$ExpressionStatement ::= AssignmentExpression_allowin |
|---|
| 568 | ExpressionStatement_abbrev$ExpressionStatement |
|---|
| 569 | ::= AssignmentExpression_allowin$Expression Semicolon_abbrev$ |
|---|
| 570 | ExpressionStatement_nosif$ExpressionStatement |
|---|
| 571 | ::= AssignmentExpression_allowin$Expression Semicolon_nosif$ |
|---|
| 572 | ExpressionStatement_full$ExpressionStatement |
|---|
| 573 | ::= AssignmentExpression_allowin$Expression Semicolon_full$ |
|---|
| 574 | |
|---|
| 575 | -- 15.3 Super statement |
|---|
| 576 | --SuperStatement$SuperStatement ::= super$ Arguments |
|---|
| 577 | SuperStatement_abbrev$SuperStatement ::= super$ Arguments Semicolon_abbrev$ |
|---|
| 578 | SuperStatement_nosif$SuperStatement ::= super$ Arguments Semicolon_nosif$ |
|---|
| 579 | SuperStatement_full$SuperStatement ::= super$ Arguments Semicolon_full$ |
|---|
| 580 | |
|---|
| 581 | -- 15.4 Block statement |
|---|
| 582 | Block$Block ::= LCURLY$ Directives$Heads Directive_abbrev$Tail RCURLY$ |
|---|
| 583 | Block$Block ::= LCURLY$ Directive_abbrev$Tail RCURLY$ |
|---|
| 584 | Block$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 |
|---|
| 608 | LabeledStatement_abbrev$LabeledStatement ::= Identifier$Label COLON$ Substatement_abbrev$Statement |
|---|
| 609 | LabeledStatement_nosif$LabeledStatement ::= Identifier$Label COLON$ Substatement_nosif$Statement |
|---|
| 610 | LabeledStatement_full$LabeledStatement ::= Identifier$Label COLON$ Substatement_full$Statement |
|---|
| 611 | |
|---|
| 612 | -- 15.6 Conditional statements |
|---|
| 613 | -- 15.6.1 If statement |
|---|
| 614 | IfStatement_abbrev$IfStatement ::= if$ ParenListExpression$Condition Substatement_abbrev$IfStatement |
|---|
| 615 | IfStatement_abbrev$IfStatement ::= if$ ParenListExpression$Condition Substatement_nosif$IfStatement else$ Substatement_abbrev$ElseStatement |
|---|
| 616 | |
|---|
| 617 | IfStatement_nosif$IfStatement ::= if$ ParenListExpression$Condition Substatement_nosif$IfStatement else$ Substatement_nosif$ElseStatement |
|---|
| 618 | |
|---|
| 619 | IfStatement_full$IfStatement ::= if$ ParenListExpression$Condition Substatement_full$IfStatement |
|---|
| 620 | IfStatement_full$IfStatement ::= if$ ParenListExpression$Condition Substatement_nosif$IfStatement else Substatement_full$ElseStatement |
|---|
| 621 | |
|---|
| 622 | -- 15.6.2 Switch statement |
|---|
| 623 | SwitchStatement ::= switch$ ParenListExpression LCURLY$ CaseElements RCURLY$ |
|---|
| 624 | CaseElements ::= %empty |
|---|
| 625 | CaseElements ::= CaseLabel |
|---|
| 626 | CaseElements ::= CaseLabel CaseElementsPrefix CaseElement_abbrev |
|---|
| 627 | CaseElementsPrefix ::= %empty |
|---|
| 628 | CaseElementsPrefix ::= CaseElementsPrefix CaseElement_full |
|---|
| 629 | -- W |
|---|
| 630 | CaseElement_abbrev ::= Directive_abbrev | CaseLabel |
|---|
| 631 | --CaseElement_nosif ::= Directive_nosif | CaseLabel |
|---|
| 632 | CaseElement_full ::= Directive | CaseLabel |
|---|
| 633 | CaseLabel$CaseLabel ::= case$ ListExpression_allowin COLON$ |
|---|
| 634 | CaseLabel$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 |
|---|
| 639 | DoStatement_abbrev$DoStatement ::= do$ Substatement_abbrev$Statement while$ ParenListExpression$Condition Semicolon_abbrev$ |
|---|
| 640 | DoStatement_nosif$DoStatement ::= do$ Substatement_abbrev$Statement while$ ParenListExpression$Condition Semicolon_nosif$ |
|---|
| 641 | DoStatement_full$DoStatement ::= do$ Substatement_abbrev$Statement while$ ParenListExpression$Condition Semicolon_full$ |
|---|
| 642 | |
|---|
| 643 | -- 15.7.2 While statement --W |
|---|
| 644 | WhileStatement_abbrev$WhileStatement |
|---|
| 645 | ::= while$ ParenListExpression$Condition Substatement_abbrev$Statement |
|---|
| 646 | WhileStatement_nosif$WhileStatement |
|---|
| 647 | ::= while$ ParenListExpression$Condition Substatement_nosif$Statement |
|---|
| 648 | WhileStatement_full$WhileStatement |
|---|
| 649 | ::= while$ ParenListExpression$Condition Substatement_full$Statement |
|---|
| 650 | |
|---|
| 651 | -- 15.7.3 For statements |
|---|
| 652 | --W |
|---|
| 653 | ForStatement_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 |
|---|
| 658 | ForStatement_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 |
|---|
| 663 | ForStatement_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 |
|---|
| 668 | ForInitializer ::= %empty |
|---|
| 669 | ForInitializer ::= ListExpression_noin |
|---|
| 670 | ForInitializer ::= VariableDefinition_noin |
|---|
| 671 | |
|---|
| 672 | ForInBinding ::= PostfixExpression |
|---|
| 673 | ForInBinding ::= VariableDefinitionKind VariableBinding_noin |
|---|
| 674 | |
|---|
| 675 | OptionalExpression ::= ListExpression_allowin |
|---|
| 676 | OptionalExpression ::= %empty |
|---|
| 677 | |
|---|
| 678 | -- 15.8 Continue statement |
|---|
| 679 | --ContinueStatement$ContinueStatement |
|---|
| 680 | -- ::= continue$ | continue$ no_line_break$ Identifier$Label |
|---|
| 681 | ContinueStatement_abbrev$ContinueStatement |
|---|
| 682 | ::= continue$ Semicolon_abbrev$ |
|---|
| 683 | | continue$ --no_line_break$ |
|---|
| 684 | Identifier$Label Semicolon_abbrev$ |
|---|
| 685 | ContinueStatement_nosif$ContinueStatement |
|---|
| 686 | ::= continue$ Semicolon_nosif$ |
|---|
| 687 | | continue$ --no_line_break$ |
|---|
| 688 | Identifier$Label Semicolon_nosif$ |
|---|
| 689 | ContinueStatement_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 |
|---|
| 697 | BreakStatement_abbrev$BreakStatement |
|---|
| 698 | ::= break$ Semicolon_abbrev$ |
|---|
| 699 | | break$ --no_line_break$ |
|---|
| 700 | Identifier$Label Semicolon_abbrev$ |
|---|
| 701 | BreakStatement_nosif$BreakStatement |
|---|
| 702 | ::= break$ Semicolon_nosif$ |
|---|
| 703 | | break$ --no_line_break$ |
|---|
| 704 | Identifier$Label Semicolon_nosif$ |
|---|
| 705 | BreakStatement_full$BreakStatement |
|---|
| 706 | ::= break$ Semicolon_full$ |
|---|
| 707 | | break$ --no_line_break$ |
|---|
| 708 | Identifier$Label Semicolon_full$ |
|---|
| 709 | |
|---|
| 710 | -- 15.10 With statement |
|---|
| 711 | --W |
|---|
| 712 | WithStatement_abbrev$WithStatement ::= with$ ParenListExpression Substatement_abbrev$Statement |
|---|
| 713 | WithStatement_nosif$WithStatement ::= with$ ParenListExpression Substatement_nosif$Statement |
|---|
| 714 | WithStatement_full$WithStatement ::= with$ ParenListExpression Substatement_full$Statement |
|---|
| 715 | |
|---|
| 716 | -- 15.11 Return statement |
|---|
| 717 | --ReturnStatement$ReturnStatement |
|---|
| 718 | -- ::= return$ | return$ no_line_break$ ListExpression_allowin |
|---|
| 719 | ReturnStatement_abbrev$ReturnStatement |
|---|
| 720 | ::= return$ Semicolon_abbrev$ |
|---|
| 721 | | return$ --no_line_break$ |
|---|
| 722 | ListExpression_allowin Semicolon_abbrev$ |
|---|
| 723 | ReturnStatement_nosif$ReturnStatement |
|---|
| 724 | ::= return$ Semicolon_nosif$ |
|---|
| 725 | | return$ --no_line_break$ |
|---|
| 726 | ListExpression_allowin Semicolon_nosif$ |
|---|
| 727 | ReturnStatement_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 |
|---|
| 734 | ThrowStatement_abbrev$ThrowStatement |
|---|
| 735 | ::= throw$ --no_line_break$ |
|---|
| 736 | ListExpression_allowin Semicolon_abbrev$ |
|---|
| 737 | ThrowStatement_nosif$ThrowStatement |
|---|
| 738 | ::= throw$ --no_line_break$ |
|---|
| 739 | ListExpression_allowin Semicolon_nosif$ |
|---|
| 740 | ThrowStatement_full$ThrowStatement |
|---|
| 741 | ::= throw$ --no_line_break$ |
|---|
| 742 | ListExpression_allowin Semicolon_full$ |
|---|
| 743 | |
|---|
| 744 | -- 15.13 Try statement |
|---|
| 745 | TryStatement$TryStatement ::= try$ Block$Block CatchClauses |
|---|
| 746 | TryStatement$TryStatement ::= try$ Block$Block CatchClausesOpt finally$ Block$FinalBlock |
|---|
| 747 | CatchClausesOpt ::= CatchClauses |
|---|
| 748 | CatchClausesOpt ::= %empty |
|---|
| 749 | CatchClauses$$CatchClause ::= CatchClause |
|---|
| 750 | CatchClauses$$CatchClause ::= CatchClauses CatchClause |
|---|
| 751 | CatchClause ::= catch$ LPAREN$ PlainParameter RPAREN$ Block |
|---|
| 752 | |
|---|
| 753 | -- 15.14 Default XML namespace statement |
|---|
| 754 | DefaultXMLNamespaceStatement ::= default$ --no_line_break$ |
|---|
| 755 | 'xml'$ --no_line_break$ |
|---|
| 756 | namespace$ ASSIGN$ NonAssignmentExpression_allowin |
|---|
| 757 | |
|---|
| 758 | -- 16 Directives --W |
|---|
| 759 | AnnotatedDirective_abbrev |
|---|
| 760 | ::= Attributes --no_line_break$ |
|---|
| 761 | AnnotatableDirective_abbrev |
|---|
| 762 | | AnnotatableDirective_abbrev |
|---|
| 763 | Directive_abbrev ::= AnnotatedDirective_abbrev |
|---|
| 764 | | EmptyStatment |
|---|
| 765 | | IncludeDirective |
|---|
| 766 | | ImportDirectives |
|---|
| 767 | | UseDirective |
|---|
| 768 | | Statement_abbrev |
|---|
| 769 | |
|---|
| 770 | AnnotatedDirective |
|---|
| 771 | ::= Attributes --no_line_break$ |
|---|
| 772 | AnnotatableDirective_full |
|---|
| 773 | | AnnotatableDirective_full |
|---|
| 774 | Directive ::= AnnotatedDirective |
|---|
| 775 | | EmptyStatment |
|---|
| 776 | | IncludeDirective |
|---|
| 777 | | ImportDirectives -- ignore we just want to group imports |
|---|
| 778 | | UseDirective |
|---|
| 779 | | Statement_full |
|---|
| 780 | |
|---|
| 781 | --W |
|---|
| 782 | AnnotatableDirective_abbrev |
|---|
| 783 | ::= FunctionDefinition |
|---|
| 784 | | VariableDefinitionSemi_abbrev |
|---|
| 785 | | ClassDefinition |
|---|
| 786 | | InterfaceDefinition |
|---|
| 787 | | NamespaceDefinition |
|---|
| 788 | |
|---|
| 789 | AnnotatableDirective_full |
|---|
| 790 | ::= FunctionDefinition |
|---|
| 791 | | VariableDefinitionSemi_full |
|---|
| 792 | | ClassDefinition |
|---|
| 793 | | InterfaceDefinition |
|---|
| 794 | | NamespaceDefinition |
|---|
| 795 | |
|---|
| 796 | VariableDefinitionSemi_abbrev ::= VariableDefinition_allowin Semicolon_abbrev$ |
|---|
| 797 | --VariableDefinitionSemi_nosif ::= VariableDefinition_allowin Semicolon_nosif$ |
|---|
| 798 | VariableDefinitionSemi_full ::= VariableDefinition_allowin Semicolon_full$ |
|---|
| 799 | Directives$$Directive ::= Directive |
|---|
| 800 | Directives$$Directive ::= Directives Directive |
|---|
| 801 | |
|---|
| 802 | --DirectivesPrefix$$Directive_full ::= Directive_full |
|---|
| 803 | --DirectivesPrefix$$Directive_full ::= DirectivesPrefix Directive_full |
|---|
| 804 | |
|---|
| 805 | -- 16.1 Attributes |
|---|
| 806 | Attributes$$Attribute ::= Attribute |
|---|
| 807 | Attributes$$Attribute ::= Attributes Attribute --AttributeCombination |
|---|
| 808 | |
|---|
| 809 | --AttributeCombination$$Attribute ::= Attribute no_line_break$ Attributes |
|---|
| 810 | |
|---|
| 811 | Attribute ::= AttributeExpression |
|---|
| 812 | Attribute ::= ReservedNamespace |
|---|
| 813 | Attribute ::= LBRACK$ AssignmentExpression_allowin$Expression RBRACK$ |
|---|
| 814 | |
|---|
| 815 | AttributeExpression ::= Identifier |
|---|
| 816 | AttributeExpression ::= AttributeExpression PropertyOperator |
|---|
| 817 | |
|---|
| 818 | -- 16.2 Import directive |
|---|
| 819 | ImportDirective$ImportDirective ::= import$ Name DOT$ STAR$OnDemand Semicolon_abbrev$ |
|---|
| 820 | ImportDirective$ImportDirective ::= import$ Name Semicolon_abbrev$ |
|---|
| 821 | |
|---|
| 822 | -- grouping |
|---|
| 823 | ImportDirectives$$ImportDirective |
|---|
| 824 | ::= ImportDirective |
|---|
| 825 | | ImportDirectives ImportDirective |
|---|
| 826 | |
|---|
| 827 | -- 16.3 Include directive |
|---|
| 828 | IncludeDirective ::= include$ --no_line_break$ |
|---|
| 829 | String Semicolon_abbrev$ |
|---|
| 830 | |
|---|
| 831 | -- 16.4 Use directive |
|---|
| 832 | UseDirective ::= use$ namespace$ ListExpression_allowin Semicolon_abbrev$ |
|---|
| 833 | |
|---|
| 834 | -- 17 Definitions |
|---|
| 835 | -- 17.1 Variable definition |
|---|
| 836 | --B |
|---|
| 837 | VariableDefinition_allowin$VariableDefinition |
|---|
| 838 | ::= VariableDefinitionKind$Kind |
|---|
| 839 | VariableBindingList_allowin$Bindings |
|---|
| 840 | VariableDefinition_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 | ./ |
|---|
| 849 | VariableDefinitionKind$VarKind ::= var$Token |
|---|
| 850 | VariableDefinitionKind$ConstKind ::= const$Token |
|---|
| 851 | |
|---|
| 852 | VariableDefinitionSemi_abbrev$VariableDefinition |
|---|
| 853 | ::= VariableDefinitionKind$Kind |
|---|
| 854 | VariableBindingList_allowin$Bindings |
|---|
| 855 | Semicolon_abbrev$ |
|---|
| 856 | VariableDefinitionSemi_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 |
|---|
| 867 | VariableBindingList_allowin$$VariableBinding_allowin ::= VariableBinding_allowin |
|---|
| 868 | VariableBindingList_allowin$$VariableBinding_allowin ::= VariableBindingList_allowin COMMA$ VariableBinding_allowin |
|---|
| 869 | |
|---|
| 870 | VariableBindingList_noin$$VariableBinding_noin ::= VariableBinding_noin |
|---|
| 871 | VariableBindingList_noin$$VariableBinding_noin ::= VariableBindingList_noin COMMA$ VariableBinding_noin |
|---|
| 872 | --B |
|---|
| 873 | VariableBinding_allowin$VariableBinding |
|---|
| 874 | ::= TypedIdentifier_allowin$Ident VariableInitialisation_allowin$Initializer |
|---|
| 875 | VariableBinding_noin$VariableBinding |
|---|
| 876 | ::= TypedIdentifier_noin$Ident VariableInitialisation_noin$Initializer |
|---|
| 877 | --B |
|---|
| 878 | VariableInitialisation_allowin$VariableInitialisation |
|---|
| 879 | ::= %empty |
|---|
| 880 | | ASSIGN$ AssignmentExpression_allowin$AssignmentExpression |
|---|
| 881 | | ASSIGN$ Attributes |
|---|
| 882 | VariableInitialisation_noin$VariableInitialisation |
|---|
| 883 | ::= %empty |
|---|
| 884 | | ASSIGN$ AssignmentExpression_noin$AssignmentExpression |
|---|
| 885 | | ASSIGN$ Attributes |
|---|
| 886 | --B |
|---|
| 887 | TypedIdentifier_allowin$TypedIdentifier |
|---|
| 888 | ::= Identifier$Name |
|---|
| 889 | | Identifier$Name COLON$ TypeExpression_allowin$Type |
|---|
| 890 | TypedIdentifier_noin$TypedIdentifier |
|---|
| 891 | ::= Identifier$Name |
|---|
| 892 | | Identifier$Name COLON$ TypeExpression_noin$Type |
|---|
| 893 | |
|---|
| 894 | -- 17.2 Function definition |
|---|
| 895 | FunctionDefinition$FunctionDefinition ::= function$ FunctionAccessor$Accessor --no_line_break$ |
|---|
| 896 | Identifier$Name FunctionCommon$Common Block |
|---|
| 897 | FunctionDefinition$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 | ./ |
|---|
| 908 | FunctionSignature$FunctionDefinition ::= function$ FunctionAccessor$Accessor --no_line_break$ |
|---|
| 909 | Identifier$Name FunctionCommon$Common Semicolon_abbrev$ |
|---|
| 910 | FunctionSignature$FunctionDefinition ::= function$ Identifier$Name FunctionCommon$Common Semicolon_abbrev$ |
|---|
| 911 | |
|---|
| 912 | FunctionAccessor$FunctionAccessor ::= get$Token |
|---|
| 913 | FunctionAccessor$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 |
|---|
| 928 | FunctionCommon$FunctionCommon ::= LPAREN$ Parameters RPAREN$ ResultType |
|---|
| 929 | |
|---|
| 930 | -- 17.2.2 Function signature |
|---|
| 931 | |
|---|
| 932 | -- 17.2.3 Parameter list |
|---|
| 933 | Parameters$$Parameter ::= %empty |
|---|
| 934 | Parameters$$Parameter ::= NonemptyParameters |
|---|
| 935 | NonemptyParameters$$Parameter ::= Parameter |
|---|
| 936 | NonemptyParameters$$Parameter ::= PlainParameter COMMA$ NonemptyParameters |
|---|
| 937 | Parameter ::= PlainParameter | RestParameter |
|---|
| 938 | PlainParameter$PlainParameter ::= TypedIdentifier_allowin$Ident |
|---|
| 939 | PlainParameter$PlainParameter ::= TypedIdentifier_allowin$Ident ASSIGN$ AssignmentExpression_allowin$Initializer |
|---|
| 940 | RestParameter$RestParameter ::= REST$ |
|---|
| 941 | RestParameter$RestParameter ::= REST$ Identifier$Untyped |
|---|
| 942 | RestParameter$RestParameter ::= REST$ TypedIdentifier_allowin$Ident |
|---|
| 943 | |
|---|
| 944 | -- 17.2.4 Result type |
|---|
| 945 | ResultType ::= %empty |
|---|
| 946 | -- use postfixexpression because of conflict with void expression |
|---|
| 947 | ResultType$ResultType ::= COLON$ PostfixExpression$Type |
|---|
| 948 | ResultType$ResultType ::= COLON$ void$Void |
|---|
| 949 | |
|---|
| 950 | -- 17.3 Class definition |
|---|
| 951 | ClassDefinition ::= 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 |
|---|
| 970 | Name$Name ::= Identifier$Ident |
|---|
| 971 | Name$Name ::= Name$Qualifier DOT$ Identifier$Ident |
|---|
| 972 | |
|---|
| 973 | -- 17.3.3 Class inheritance |
|---|
| 974 | Inheritance ::= %empty |
|---|
| 975 | Inheritance$Inheritance ::= extends$ TypeExpression_allowin$Extends |
|---|
| 976 | Inheritance$Inheritance ::= implements$ TypeExpressionList$Implements |
|---|
| 977 | Inheritance$Inheritance ::= extends$ TypeExpression_allowin$Extends implements$ TypeExpressionList$Implements |
|---|
| 978 | |
|---|
| 979 | TypeExpressionList$$TypeExpression_allowin ::= TypeExpression_allowin |
|---|
| 980 | TypeExpressionList$$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 |
|---|
| 987 | InterfaceDefinition ::= 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 |
|---|
| 998 | ExtendsList ::= %empty |
|---|
| 999 | ExtendsList ::= extends$ TypeExpressionList$Extends |
|---|
| 1000 | |
|---|
| 1001 | -- 17.4.4 Interface block |
|---|
| 1002 | -- must only contain FunctionDefinitions with no Block and no attribute. |
|---|
| 1003 | InterfaceBlock$InterfaceBlock ::= LCURLY$ RCURLY$ |
|---|
| 1004 | InterfaceBlock$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 | ./ |
|---|
| 1010 | InterfaceDirectives$$FunctionSignature ::= FunctionSignature |
|---|
| 1011 | InterfaceDirectives$$FunctionSignature ::= InterfaceDirectives FunctionSignature |
|---|
| 1012 | -- 17.5 Package definition |
|---|
| 1013 | PackageDefinition$PackageDefinition ::= package$ Block$Body |
|---|
| 1014 | PackageDefinition$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 |
|---|
| 1020 | NamespaceDefinition$NamespaceDefinition ::= namespace$ Identifier$Name |
|---|
| 1021 | NamespaceDefinition$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 |
|---|
| 1031 | Program$Program ::= PackageDefinitions$Packages Directives$Directives |
|---|
| 1032 | Program$Program ::= PackageDefinitions$Packages |
|---|
| 1033 | /. public PackageDefinition getPackage() { |
|---|
| 1034 | if (_Packages == null || _Packages.size() < 1) return null; |
|---|
| 1035 | return _Packages.getPackageDefinitionAt(0); |
|---|
| 1036 | } |
|---|
| 1037 | ./ |
|---|
| 1038 | |
|---|
| 1039 | PackageDefinitions$$PackageDefinition ::= %empty |
|---|
| 1040 | PackageDefinitions$$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 |
|---|
| 1071 | RelationalExpression ::= RelationalExpression_allowin | RelationalExpression_noin |
|---|
| 1072 | |
|---|
| 1073 | EqualityExpression ::= EqualityExpression_allowin | EqualityExpression_noin |
|---|
| 1074 | |
|---|
| 1075 | BitwiseAndExpression ::= BitwiseAndExpression_allowin | BitwiseAndExpression_noin |
|---|
| 1076 | |
|---|
| 1077 | BitwiseXorExpression ::= BitwiseXorExpression_allowin | BitwiseXorExpression_noin |
|---|
| 1078 | |
|---|
| 1079 | BitwiseOrExpression ::= BitwiseOrExpression_allowin | BitwiseOrExpression_noin |
|---|
| 1080 | |
|---|
| 1081 | LogicalAndExpression ::= LogicalAndExpression_allowin | LogicalAndExpression_noin |
|---|
| 1082 | |
|---|
| 1083 | LogicalOrExpression ::= LogicalOrExpression_allowin | LogicalOrExpression_noin |
|---|
| 1084 | |
|---|
| 1085 | ConditionalExpression ::= ConditionalExpression_allowin | ConditionalExpression_noin |
|---|
| 1086 | |
|---|
| 1087 | NonAssignmentExpression ::= NonAssignmentExpression_allowin | NonAssignmentExpression_noin |
|---|
| 1088 | |
|---|
| 1089 | AssignmentExpression ::= AssignmentExpression_allowin | AssignmentExpression_noin |
|---|
| 1090 | |
|---|
| 1091 | --AssignmentExpressionList ::= AssignmentExpression_allowinList | AssignmentExpression_noinList |
|---|
| 1092 | |
|---|
| 1093 | TypeExpression ::= TypeExpression_allowin | TypeExpression_noin |
|---|
| 1094 | |
|---|
| 1095 | Statement ::= Statement_abbrev | Statement_nosif | Statement_full |
|---|
| 1096 | |
|---|
| 1097 | Substatement ::= Substatement_abbrev | Substatement_nosif | Substatement_full |
|---|
| 1098 | |
|---|
| 1099 | Semicolon ::= Semicolon_abbrev | Semicolon_nosif | Semicolon_full |
|---|
| 1100 | |
|---|
| 1101 | ExpressionStatement ::= ExpressionStatement_abbrev | ExpressionStatement_nosif | ExpressionStatement_full |
|---|
| 1102 | |
|---|
| 1103 | SuperStatement ::= SuperStatement_abbrev | SuperStatement_nosif | SuperStatement_full |
|---|
| 1104 | |
|---|
| 1105 | LabeledStatement ::= LabeledStatement_abbrev | LabeledStatement_nosif | LabeledStatement_full |
|---|
| 1106 | |
|---|
| 1107 | IfStatement ::= IfStatement_abbrev | IfStatement_nosif | IfStatement_full |
|---|
| 1108 | |
|---|
| 1109 | DoStatement ::= DoStatement_abbrev | DoStatement_nosif | DoStatement_full |
|---|
| 1110 | |
|---|
| 1111 | WhileStatement ::= WhileStatement_abbrev | WhileStatement_nosif | WhileStatement_full |
|---|
| 1112 | |
|---|
| 1113 | ForStatement ::= ForStatement_abbrev | ForStatement_nosif | ForStatement_full |
|---|
| 1114 | |
|---|
| 1115 | ContinueStatement ::= ContinueStatement_abbrev | ContinueStatement_nosif | ContinueStatement_full |
|---|
| 1116 | |
|---|
| 1117 | BreakStatement ::= BreakStatement_abbrev | BreakStatement_nosif | BreakStatement_full |
|---|
| 1118 | |
|---|
| 1119 | WithStatement ::= WithStatement_abbrev | WithStatement_nosif | WithStatement_full |
|---|
| 1120 | |
|---|
| 1121 | ReturnStatement ::= ReturnStatement_abbrev | ReturnStatement_nosif | ReturnStatement_full |
|---|
| 1122 | |
|---|
| 1123 | ThrowStatement ::= ThrowStatement_abbrev | ThrowStatement_nosif | ThrowStatement_full |
|---|
| 1124 | |
|---|
| 1125 | VariableDefinitionSemi ::= VariableDefinitionSemi_abbrev | VariableDefinitionSemi_full |
|---|
| 1126 | %End |
|---|