Stephan Herrmann | 7b7062f | 2010-04-01 19:56:59 +0000 | [diff] [blame] | 1 | --main options |
| 2 | %options ACTION, AN=JavaAction.java, GP=java, |
| 3 | %options FILE-PREFIX=java, ESCAPE=$, PREFIX=TokenName, OUTPUT-SIZE=125 , |
| 4 | %options NOGOTO-DEFAULT, SINGLE-PRODUCTIONS, LALR=1 , TABLE, |
| 5 | |
| 6 | --error recovering options..... |
| 7 | %options ERROR_MAPS |
| 8 | |
| 9 | --grammar understanding options |
| 10 | %options first follow |
| 11 | %options TRACE=FULL , |
| 12 | %options VERBOSE |
| 13 | |
| 14 | %options DEFERRED |
| 15 | %options NAMES=MAX |
| 16 | %options SCOPES |
| 17 | |
| 18 | --Usefull macros helping reading/writing semantic actions |
| 19 | $Define |
| 20 | $putCase |
| 21 | /. case $rule_number : if (DEBUG) { System.out.println("$rule_text"); } //$NON-NLS-1$ |
| 22 | ./ |
| 23 | |
| 24 | $break |
| 25 | /. |
| 26 | break; |
| 27 | ./ |
| 28 | |
| 29 | |
| 30 | $readableName |
| 31 | /.1#$rule_number#./ |
| 32 | $compliance |
| 33 | /.2#$rule_number#./ |
| 34 | $recovery |
| 35 | /.2#$rule_number# recovery./ |
| 36 | $recovery_template |
| 37 | /.3#$rule_number#./ |
| 38 | $no_statements_recovery |
| 39 | /.4#$rule_number# 1./ |
| 40 | -- here it starts really ------------------------------------------ |
| 41 | $Terminals |
| 42 | |
| 43 | Identifier |
| 44 | |
| 45 | abstract assert boolean break byte case catch char class |
| 46 | continue const default do double else enum extends false final finally float |
| 47 | for goto if implements import instanceof int |
| 48 | interface long native new null package private |
| 49 | protected public return short static strictfp super switch |
| 50 | synchronized this throw throws transient true try void |
| 51 | volatile while |
| 52 | |
| 53 | IntegerLiteral |
| 54 | LongLiteral |
| 55 | FloatingPointLiteral |
| 56 | DoubleLiteral |
| 57 | CharacterLiteral |
| 58 | StringLiteral |
| 59 | |
| 60 | PLUS_PLUS |
| 61 | MINUS_MINUS |
| 62 | EQUAL_EQUAL |
| 63 | LESS_EQUAL |
| 64 | GREATER_EQUAL |
| 65 | NOT_EQUAL |
| 66 | LEFT_SHIFT |
| 67 | RIGHT_SHIFT |
| 68 | UNSIGNED_RIGHT_SHIFT |
| 69 | PLUS_EQUAL |
| 70 | MINUS_EQUAL |
| 71 | MULTIPLY_EQUAL |
| 72 | DIVIDE_EQUAL |
| 73 | AND_EQUAL |
| 74 | OR_EQUAL |
| 75 | XOR_EQUAL |
| 76 | REMAINDER_EQUAL |
| 77 | LEFT_SHIFT_EQUAL |
| 78 | RIGHT_SHIFT_EQUAL |
| 79 | UNSIGNED_RIGHT_SHIFT_EQUAL |
| 80 | OR_OR |
| 81 | AND_AND |
| 82 | PLUS |
| 83 | MINUS |
| 84 | NOT |
| 85 | REMAINDER |
| 86 | XOR |
| 87 | AND |
| 88 | MULTIPLY |
| 89 | OR |
| 90 | TWIDDLE |
| 91 | DIVIDE |
| 92 | GREATER |
| 93 | LESS |
| 94 | LPAREN |
| 95 | RPAREN |
| 96 | LBRACE |
| 97 | RBRACE |
| 98 | LBRACKET |
| 99 | RBRACKET |
| 100 | SEMICOLON |
| 101 | QUESTION |
| 102 | COLON |
| 103 | COMMA |
| 104 | DOT |
| 105 | EQUAL |
| 106 | AT |
| 107 | ELLIPSIS |
| 108 | |
| 109 | -- BodyMarker |
| 110 | |
| 111 | $Alias |
| 112 | |
| 113 | '++' ::= PLUS_PLUS |
| 114 | '--' ::= MINUS_MINUS |
| 115 | '==' ::= EQUAL_EQUAL |
| 116 | '<=' ::= LESS_EQUAL |
| 117 | '>=' ::= GREATER_EQUAL |
| 118 | '!=' ::= NOT_EQUAL |
| 119 | '<<' ::= LEFT_SHIFT |
| 120 | '>>' ::= RIGHT_SHIFT |
| 121 | '>>>' ::= UNSIGNED_RIGHT_SHIFT |
| 122 | '+=' ::= PLUS_EQUAL |
| 123 | '-=' ::= MINUS_EQUAL |
| 124 | '*=' ::= MULTIPLY_EQUAL |
| 125 | '/=' ::= DIVIDE_EQUAL |
| 126 | '&=' ::= AND_EQUAL |
| 127 | '|=' ::= OR_EQUAL |
| 128 | '^=' ::= XOR_EQUAL |
| 129 | '%=' ::= REMAINDER_EQUAL |
| 130 | '<<=' ::= LEFT_SHIFT_EQUAL |
| 131 | '>>=' ::= RIGHT_SHIFT_EQUAL |
| 132 | '>>>=' ::= UNSIGNED_RIGHT_SHIFT_EQUAL |
| 133 | '||' ::= OR_OR |
| 134 | '&&' ::= AND_AND |
| 135 | '+' ::= PLUS |
| 136 | '-' ::= MINUS |
| 137 | '!' ::= NOT |
| 138 | '%' ::= REMAINDER |
| 139 | '^' ::= XOR |
| 140 | '&' ::= AND |
| 141 | '*' ::= MULTIPLY |
| 142 | '|' ::= OR |
| 143 | '~' ::= TWIDDLE |
| 144 | '/' ::= DIVIDE |
| 145 | '>' ::= GREATER |
| 146 | '<' ::= LESS |
| 147 | '(' ::= LPAREN |
| 148 | ')' ::= RPAREN |
| 149 | '{' ::= LBRACE |
| 150 | '}' ::= RBRACE |
| 151 | '[' ::= LBRACKET |
| 152 | ']' ::= RBRACKET |
| 153 | ';' ::= SEMICOLON |
| 154 | '?' ::= QUESTION |
| 155 | ':' ::= COLON |
| 156 | ',' ::= COMMA |
| 157 | '.' ::= DOT |
| 158 | '=' ::= EQUAL |
| 159 | '@' ::= AT |
| 160 | '...' ::= ELLIPSIS |
| 161 | |
| 162 | $Start |
| 163 | Goal |
| 164 | |
| 165 | $Rules |
| 166 | |
| 167 | /.// This method is part of an automatic generation : do NOT edit-modify |
| 168 | protected void consumeRule(int act) { |
| 169 | switch ( act ) { |
| 170 | ./ |
| 171 | |
| 172 | |
| 173 | |
| 174 | Goal ::= '++' CompilationUnit |
| 175 | Goal ::= '--' MethodBody |
| 176 | -- Initializer |
| 177 | Goal ::= '>>' StaticInitializer |
| 178 | Goal ::= '>>' Initializer |
| 179 | -- error recovery |
| 180 | -- Modifiersopt is used to properly consume a header and exit the rule reduction at the end of the parse() method |
| 181 | Goal ::= '>>>' Header1 Modifiersopt |
| 182 | Goal ::= '!' Header2 Modifiersopt |
| 183 | Goal ::= '*' BlockStatements |
| 184 | Goal ::= '*' CatchHeader |
| 185 | -- JDOM |
| 186 | Goal ::= '&&' FieldDeclaration |
| 187 | Goal ::= '||' ImportDeclaration |
| 188 | Goal ::= '?' PackageDeclaration |
| 189 | Goal ::= '+' TypeDeclaration |
| 190 | Goal ::= '/' GenericMethodDeclaration |
| 191 | Goal ::= '&' ClassBodyDeclarations |
| 192 | -- code snippet |
| 193 | Goal ::= '%' Expression |
| 194 | Goal ::= '%' ArrayInitializer |
| 195 | -- completion parser |
| 196 | Goal ::= '~' BlockStatementsopt |
| 197 | -- source type converter |
| 198 | Goal ::= '||' MemberValue |
| 199 | -- syntax diagnosis |
| 200 | Goal ::= '?' AnnotationTypeMemberDeclaration |
| 201 | /:$readableName Goal:/ |
| 202 | |
| 203 | Literal -> IntegerLiteral |
| 204 | Literal -> LongLiteral |
| 205 | Literal -> FloatingPointLiteral |
| 206 | Literal -> DoubleLiteral |
| 207 | Literal -> CharacterLiteral |
| 208 | Literal -> StringLiteral |
| 209 | Literal -> null |
| 210 | Literal -> BooleanLiteral |
| 211 | /:$readableName Literal:/ |
| 212 | BooleanLiteral -> true |
| 213 | BooleanLiteral -> false |
| 214 | /:$readableName BooleanLiteral:/ |
| 215 | |
| 216 | Type ::= PrimitiveType |
| 217 | /.$putCase consumePrimitiveType(); $break ./ |
| 218 | Type -> ReferenceType |
| 219 | /:$readableName Type:/ |
| 220 | |
| 221 | PrimitiveType -> NumericType |
| 222 | /:$readableName PrimitiveType:/ |
| 223 | NumericType -> IntegralType |
| 224 | NumericType -> FloatingPointType |
| 225 | /:$readableName NumericType:/ |
| 226 | |
| 227 | PrimitiveType -> 'boolean' |
| 228 | PrimitiveType -> 'void' |
| 229 | IntegralType -> 'byte' |
| 230 | IntegralType -> 'short' |
| 231 | IntegralType -> 'int' |
| 232 | IntegralType -> 'long' |
| 233 | IntegralType -> 'char' |
| 234 | /:$readableName IntegralType:/ |
| 235 | FloatingPointType -> 'float' |
| 236 | FloatingPointType -> 'double' |
| 237 | /:$readableName FloatingPointType:/ |
| 238 | |
| 239 | ReferenceType ::= ClassOrInterfaceType |
| 240 | /.$putCase consumeReferenceType(); $break ./ |
| 241 | ReferenceType -> ArrayType |
| 242 | /:$readableName ReferenceType:/ |
| 243 | |
| 244 | --------------------------------------------------------------- |
| 245 | -- 1.5 feature |
| 246 | --------------------------------------------------------------- |
| 247 | ClassOrInterfaceType -> ClassOrInterface |
| 248 | ClassOrInterfaceType -> GenericType |
| 249 | /:$readableName Type:/ |
| 250 | |
| 251 | ClassOrInterface ::= Name |
| 252 | /.$putCase consumeClassOrInterfaceName(); $break ./ |
| 253 | ClassOrInterface ::= GenericType '.' Name |
| 254 | /.$putCase consumeClassOrInterface(); $break ./ |
| 255 | /:$readableName Type:/ |
| 256 | |
| 257 | GenericType ::= ClassOrInterface TypeArguments |
| 258 | /.$putCase consumeGenericType(); $break ./ |
| 259 | /:$readableName GenericType:/ |
| 260 | |
| 261 | -- |
| 262 | -- These rules have been rewritten to avoid some conflicts introduced |
| 263 | -- by adding the 1.1 features |
| 264 | -- |
| 265 | -- ArrayType ::= PrimitiveType '[' ']' |
| 266 | -- ArrayType ::= Name '[' ']' |
| 267 | -- ArrayType ::= ArrayType '[' ']' |
| 268 | -- |
| 269 | |
| 270 | ArrayTypeWithTypeArgumentsName ::= GenericType '.' Name |
| 271 | /.$putCase consumeArrayTypeWithTypeArgumentsName(); $break ./ |
| 272 | /:$readableName ArrayTypeWithTypeArgumentsName:/ |
| 273 | |
| 274 | ArrayType ::= PrimitiveType Dims |
| 275 | /.$putCase consumePrimitiveArrayType(); $break ./ |
| 276 | ArrayType ::= Name Dims |
| 277 | /.$putCase consumeNameArrayType(); $break ./ |
| 278 | ArrayType ::= ArrayTypeWithTypeArgumentsName Dims |
| 279 | /.$putCase consumeGenericTypeNameArrayType(); $break ./ |
| 280 | ArrayType ::= GenericType Dims |
| 281 | /.$putCase consumeGenericTypeArrayType(); $break ./ |
| 282 | /:$readableName ArrayType:/ |
| 283 | |
| 284 | ClassType -> ClassOrInterfaceType |
| 285 | /:$readableName ClassType:/ |
| 286 | |
| 287 | -------------------------------------------------------------- |
| 288 | -------------------------------------------------------------- |
| 289 | |
| 290 | Name -> SimpleName |
| 291 | Name -> QualifiedName |
| 292 | /:$readableName Name:/ |
| 293 | /:$recovery_template Identifier:/ |
| 294 | |
| 295 | SimpleName -> 'Identifier' |
| 296 | /:$readableName SimpleName:/ |
| 297 | |
| 298 | QualifiedName ::= Name '.' SimpleName |
| 299 | /.$putCase consumeQualifiedName(); $break ./ |
| 300 | /:$readableName QualifiedName:/ |
| 301 | |
| 302 | CompilationUnit ::= EnterCompilationUnit InternalCompilationUnit |
| 303 | /.$putCase consumeCompilationUnit(); $break ./ |
| 304 | /:$readableName CompilationUnit:/ |
| 305 | |
| 306 | InternalCompilationUnit ::= PackageDeclaration |
| 307 | /.$putCase consumeInternalCompilationUnit(); $break ./ |
| 308 | InternalCompilationUnit ::= PackageDeclaration ImportDeclarations ReduceImports |
| 309 | /.$putCase consumeInternalCompilationUnit(); $break ./ |
| 310 | InternalCompilationUnit ::= PackageDeclaration ImportDeclarations ReduceImports TypeDeclarations |
| 311 | /.$putCase consumeInternalCompilationUnitWithTypes(); $break ./ |
| 312 | InternalCompilationUnit ::= PackageDeclaration TypeDeclarations |
| 313 | /.$putCase consumeInternalCompilationUnitWithTypes(); $break ./ |
| 314 | InternalCompilationUnit ::= ImportDeclarations ReduceImports |
| 315 | /.$putCase consumeInternalCompilationUnit(); $break ./ |
| 316 | InternalCompilationUnit ::= TypeDeclarations |
| 317 | /.$putCase consumeInternalCompilationUnitWithTypes(); $break ./ |
| 318 | InternalCompilationUnit ::= ImportDeclarations ReduceImports TypeDeclarations |
| 319 | /.$putCase consumeInternalCompilationUnitWithTypes(); $break ./ |
| 320 | InternalCompilationUnit ::= $empty |
| 321 | /.$putCase consumeEmptyInternalCompilationUnit(); $break ./ |
| 322 | /:$readableName CompilationUnit:/ |
| 323 | |
| 324 | |
| 325 | |
| 326 | |
| 327 | ReduceImports ::= $empty |
| 328 | /.$putCase consumeReduceImports(); $break ./ |
| 329 | /:$readableName ReduceImports:/ |
| 330 | |
| 331 | EnterCompilationUnit ::= $empty |
| 332 | /.$putCase consumeEnterCompilationUnit(); $break ./ |
| 333 | /:$readableName EnterCompilationUnit:/ |
| 334 | |
| 335 | Header -> ImportDeclaration |
| 336 | Header -> PackageDeclaration |
| 337 | Header -> ClassHeader |
| 338 | Header -> InterfaceHeader |
| 339 | Header -> EnumHeader |
| 340 | Header -> AnnotationTypeDeclarationHeader |
| 341 | Header -> StaticInitializer |
| 342 | Header -> RecoveryMethodHeader |
| 343 | Header -> FieldDeclaration |
| 344 | Header -> AllocationHeader |
| 345 | Header -> ArrayCreationHeader |
| 346 | /:$readableName Header:/ |
| 347 | |
| 348 | Header1 -> Header |
| 349 | Header1 -> ConstructorHeader |
| 350 | /:$readableName Header1:/ |
| 351 | |
| 352 | Header2 -> Header |
| 353 | Header2 -> EnumConstantHeader |
| 354 | /:$readableName Header2:/ |
| 355 | |
| 356 | CatchHeader ::= 'catch' '(' FormalParameter ')' '{' |
| 357 | /.$putCase consumeCatchHeader(); $break ./ |
| 358 | /:$readableName CatchHeader:/ |
| 359 | |
| 360 | ImportDeclarations -> ImportDeclaration |
| 361 | ImportDeclarations ::= ImportDeclarations ImportDeclaration |
| 362 | /.$putCase consumeImportDeclarations(); $break ./ |
| 363 | /:$readableName ImportDeclarations:/ |
| 364 | |
| 365 | TypeDeclarations -> TypeDeclaration |
| 366 | TypeDeclarations ::= TypeDeclarations TypeDeclaration |
| 367 | /.$putCase consumeTypeDeclarations(); $break ./ |
| 368 | /:$readableName TypeDeclarations:/ |
| 369 | |
| 370 | PackageDeclaration ::= PackageDeclarationName ';' |
| 371 | /.$putCase consumePackageDeclaration(); $break ./ |
| 372 | /:$readableName PackageDeclaration:/ |
| 373 | |
| 374 | PackageDeclarationName ::= Modifiers 'package' PushRealModifiers Name |
| 375 | /.$putCase consumePackageDeclarationNameWithModifiers(); $break ./ |
| 376 | /:$readableName PackageDeclarationName:/ |
| 377 | /:$compliance 1.5:/ |
| 378 | |
| 379 | PackageDeclarationName ::= PackageComment 'package' Name |
| 380 | /.$putCase consumePackageDeclarationName(); $break ./ |
| 381 | /:$readableName PackageDeclarationName:/ |
| 382 | |
| 383 | PackageComment ::= $empty |
| 384 | /.$putCase consumePackageComment(); $break ./ |
| 385 | /:$readableName PackageComment:/ |
| 386 | |
| 387 | ImportDeclaration -> SingleTypeImportDeclaration |
| 388 | ImportDeclaration -> TypeImportOnDemandDeclaration |
| 389 | ----------------------------------------------- |
| 390 | -- 1.5 feature |
| 391 | ----------------------------------------------- |
| 392 | ImportDeclaration -> SingleStaticImportDeclaration |
| 393 | ImportDeclaration -> StaticImportOnDemandDeclaration |
| 394 | /:$readableName ImportDeclaration:/ |
| 395 | |
| 396 | SingleTypeImportDeclaration ::= SingleTypeImportDeclarationName ';' |
| 397 | /.$putCase consumeImportDeclaration(); $break ./ |
| 398 | /:$readableName SingleTypeImportDeclaration:/ |
| 399 | |
| 400 | SingleTypeImportDeclarationName ::= 'import' Name |
| 401 | /.$putCase consumeSingleTypeImportDeclarationName(); $break ./ |
| 402 | /:$readableName SingleTypeImportDeclarationName:/ |
| 403 | |
| 404 | TypeImportOnDemandDeclaration ::= TypeImportOnDemandDeclarationName ';' |
| 405 | /.$putCase consumeImportDeclaration(); $break ./ |
| 406 | /:$readableName TypeImportOnDemandDeclaration:/ |
| 407 | |
| 408 | TypeImportOnDemandDeclarationName ::= 'import' Name '.' '*' |
| 409 | /.$putCase consumeTypeImportOnDemandDeclarationName(); $break ./ |
| 410 | /:$readableName TypeImportOnDemandDeclarationName:/ |
| 411 | |
| 412 | TypeDeclaration -> ClassDeclaration |
| 413 | TypeDeclaration -> InterfaceDeclaration |
| 414 | -- this declaration in part of a list od declaration and we will |
| 415 | -- use and optimized list length calculation process |
| 416 | -- thus we decrement the number while it will be incremend..... |
| 417 | TypeDeclaration ::= ';' |
| 418 | /. $putCase consumeEmptyTypeDeclaration(); $break ./ |
| 419 | ----------------------------------------------- |
| 420 | -- 1.5 feature |
| 421 | ----------------------------------------------- |
| 422 | TypeDeclaration -> EnumDeclaration |
| 423 | TypeDeclaration -> AnnotationTypeDeclaration |
| 424 | /:$readableName TypeDeclaration:/ |
| 425 | |
| 426 | --18.7 Only in the LALR(1) Grammar |
| 427 | |
| 428 | Modifiers -> Modifier |
| 429 | Modifiers ::= Modifiers Modifier |
| 430 | /.$putCase consumeModifiers2(); $break ./ |
| 431 | /:$readableName Modifiers:/ |
| 432 | |
| 433 | Modifier -> 'public' |
| 434 | Modifier -> 'protected' |
| 435 | Modifier -> 'private' |
| 436 | Modifier -> 'static' |
| 437 | Modifier -> 'abstract' |
| 438 | Modifier -> 'final' |
| 439 | Modifier -> 'native' |
| 440 | Modifier -> 'synchronized' |
| 441 | Modifier -> 'transient' |
| 442 | Modifier -> 'volatile' |
| 443 | Modifier -> 'strictfp' |
| 444 | Modifier ::= Annotation |
| 445 | /.$putCase consumeAnnotationAsModifier(); $break ./ |
| 446 | /:$readableName Modifier:/ |
| 447 | |
| 448 | --18.8 Productions from 8: Class Declarations |
| 449 | --ClassModifier ::= |
| 450 | -- 'abstract' |
| 451 | -- | 'final' |
| 452 | -- | 'public' |
| 453 | --18.8.1 Productions from 8.1: Class Declarations |
| 454 | |
| 455 | ClassDeclaration ::= ClassHeader ClassBody |
| 456 | /.$putCase consumeClassDeclaration(); $break ./ |
| 457 | /:$readableName ClassDeclaration:/ |
| 458 | |
| 459 | ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt ClassHeaderImplementsopt |
| 460 | /.$putCase consumeClassHeader(); $break ./ |
| 461 | /:$readableName ClassHeader:/ |
| 462 | |
| 463 | ----------------------------------------------- |
| 464 | -- 1.5 features : generics |
| 465 | ----------------------------------------------- |
| 466 | ClassHeaderName ::= ClassHeaderName1 TypeParameters |
| 467 | /.$putCase consumeTypeHeaderNameWithTypeParameters(); $break ./ |
| 468 | |
| 469 | ClassHeaderName -> ClassHeaderName1 |
| 470 | /:$readableName ClassHeaderName:/ |
| 471 | |
| 472 | ClassHeaderName1 ::= Modifiersopt 'class' 'Identifier' |
| 473 | /.$putCase consumeClassHeaderName1(); $break ./ |
| 474 | /:$readableName ClassHeaderName:/ |
| 475 | |
| 476 | ClassHeaderExtends ::= 'extends' ClassType |
| 477 | /.$putCase consumeClassHeaderExtends(); $break ./ |
| 478 | /:$readableName ClassHeaderExtends:/ |
| 479 | |
| 480 | ClassHeaderImplements ::= 'implements' InterfaceTypeList |
| 481 | /.$putCase consumeClassHeaderImplements(); $break ./ |
| 482 | /:$readableName ClassHeaderImplements:/ |
| 483 | |
| 484 | InterfaceTypeList -> InterfaceType |
| 485 | InterfaceTypeList ::= InterfaceTypeList ',' InterfaceType |
| 486 | /.$putCase consumeInterfaceTypeList(); $break ./ |
| 487 | /:$readableName InterfaceTypeList:/ |
| 488 | |
| 489 | InterfaceType ::= ClassOrInterfaceType |
| 490 | /.$putCase consumeInterfaceType(); $break ./ |
| 491 | /:$readableName InterfaceType:/ |
| 492 | |
| 493 | ClassBody ::= '{' ClassBodyDeclarationsopt '}' |
| 494 | /:$readableName ClassBody:/ |
| 495 | /:$no_statements_recovery:/ |
| 496 | |
| 497 | ClassBodyDeclarations ::= ClassBodyDeclaration |
| 498 | ClassBodyDeclarations ::= ClassBodyDeclarations ClassBodyDeclaration |
| 499 | /.$putCase consumeClassBodyDeclarations(); $break ./ |
| 500 | /:$readableName ClassBodyDeclarations:/ |
| 501 | |
| 502 | ClassBodyDeclaration -> ClassMemberDeclaration |
| 503 | ClassBodyDeclaration -> StaticInitializer |
| 504 | ClassBodyDeclaration -> ConstructorDeclaration |
| 505 | --1.1 feature |
| 506 | ClassBodyDeclaration ::= Diet NestedMethod CreateInitializer Block |
| 507 | /.$putCase consumeClassBodyDeclaration(); $break ./ |
| 508 | /:$readableName ClassBodyDeclaration:/ |
| 509 | |
| 510 | Diet ::= $empty |
| 511 | /.$putCase consumeDiet(); $break./ |
| 512 | /:$readableName Diet:/ |
| 513 | |
| 514 | Initializer ::= Diet NestedMethod CreateInitializer Block |
| 515 | /.$putCase consumeClassBodyDeclaration(); $break ./ |
| 516 | /:$readableName Initializer:/ |
| 517 | |
| 518 | CreateInitializer ::= $empty |
| 519 | /.$putCase consumeCreateInitializer(); $break./ |
| 520 | /:$readableName CreateInitializer:/ |
| 521 | |
| 522 | ClassMemberDeclaration -> FieldDeclaration |
| 523 | ClassMemberDeclaration -> MethodDeclaration |
| 524 | --1.1 feature |
| 525 | ClassMemberDeclaration -> ClassDeclaration |
| 526 | --1.1 feature |
| 527 | ClassMemberDeclaration -> InterfaceDeclaration |
| 528 | -- 1.5 feature |
| 529 | ClassMemberDeclaration -> EnumDeclaration |
| 530 | ClassMemberDeclaration -> AnnotationTypeDeclaration |
| 531 | /:$readableName ClassMemberDeclaration:/ |
| 532 | |
| 533 | -- Empty declarations are not valid Java ClassMemberDeclarations. |
| 534 | -- However, since the current (2/14/97) Java compiler accepts them |
| 535 | -- (in fact, some of the official tests contain this erroneous |
| 536 | -- syntax) |
| 537 | ClassMemberDeclaration ::= ';' |
| 538 | /.$putCase consumeEmptyTypeDeclaration(); $break./ |
| 539 | |
| 540 | GenericMethodDeclaration -> MethodDeclaration |
| 541 | GenericMethodDeclaration -> ConstructorDeclaration |
| 542 | /:$readableName GenericMethodDeclaration:/ |
| 543 | |
| 544 | --18.8.2 Productions from 8.3: Field Declarations |
| 545 | --VariableModifier ::= |
| 546 | -- 'public' |
| 547 | -- | 'protected' |
| 548 | -- | 'private' |
| 549 | -- | 'static' |
| 550 | -- | 'final' |
| 551 | -- | 'transient' |
| 552 | -- | 'volatile' |
| 553 | |
| 554 | FieldDeclaration ::= Modifiersopt Type VariableDeclarators ';' |
| 555 | /.$putCase consumeFieldDeclaration(); $break ./ |
| 556 | /:$readableName FieldDeclaration:/ |
| 557 | |
| 558 | VariableDeclarators -> VariableDeclarator |
| 559 | VariableDeclarators ::= VariableDeclarators ',' VariableDeclarator |
| 560 | /.$putCase consumeVariableDeclarators(); $break ./ |
| 561 | /:$readableName VariableDeclarators:/ |
| 562 | |
| 563 | VariableDeclarator ::= VariableDeclaratorId EnterVariable ExitVariableWithoutInitialization |
| 564 | VariableDeclarator ::= VariableDeclaratorId EnterVariable '=' ForceNoDiet VariableInitializer RestoreDiet ExitVariableWithInitialization |
| 565 | /:$readableName VariableDeclarator:/ |
| 566 | /:$recovery_template Identifier:/ |
| 567 | |
| 568 | EnterVariable ::= $empty |
| 569 | /.$putCase consumeEnterVariable(); $break ./ |
| 570 | /:$readableName EnterVariable:/ |
| 571 | |
| 572 | ExitVariableWithInitialization ::= $empty |
| 573 | /.$putCase consumeExitVariableWithInitialization(); $break ./ |
| 574 | /:$readableName ExitVariableWithInitialization:/ |
| 575 | |
| 576 | ExitVariableWithoutInitialization ::= $empty |
| 577 | /.$putCase consumeExitVariableWithoutInitialization(); $break ./ |
| 578 | /:$readableName ExitVariableWithoutInitialization:/ |
| 579 | |
| 580 | ForceNoDiet ::= $empty |
| 581 | /.$putCase consumeForceNoDiet(); $break ./ |
| 582 | /:$readableName ForceNoDiet:/ |
| 583 | RestoreDiet ::= $empty |
| 584 | /.$putCase consumeRestoreDiet(); $break ./ |
| 585 | /:$readableName RestoreDiet:/ |
| 586 | |
| 587 | VariableDeclaratorId ::= 'Identifier' Dimsopt |
| 588 | /:$readableName VariableDeclaratorId:/ |
| 589 | /:$recovery_template Identifier:/ |
| 590 | |
| 591 | VariableInitializer -> Expression |
| 592 | VariableInitializer -> ArrayInitializer |
| 593 | /:$readableName VariableInitializer:/ |
| 594 | /:$recovery_template Identifier:/ |
| 595 | |
| 596 | --18.8.3 Productions from 8.4: Method Declarations |
| 597 | --MethodModifier ::= |
| 598 | -- 'public' |
| 599 | -- | 'protected' |
| 600 | -- | 'private' |
| 601 | -- | 'static' |
| 602 | -- | 'abstract' |
| 603 | -- | 'final' |
| 604 | -- | 'native' |
| 605 | -- | 'synchronized' |
| 606 | -- |
| 607 | |
| 608 | MethodDeclaration -> AbstractMethodDeclaration |
| 609 | MethodDeclaration ::= MethodHeader MethodBody |
| 610 | /.$putCase // set to true to consume a method with a body |
| 611 | consumeMethodDeclaration(true); $break ./ |
| 612 | /:$readableName MethodDeclaration:/ |
| 613 | |
| 614 | AbstractMethodDeclaration ::= MethodHeader ';' |
| 615 | /.$putCase // set to false to consume a method without body |
| 616 | consumeMethodDeclaration(false); $break ./ |
| 617 | /:$readableName MethodDeclaration:/ |
| 618 | |
| 619 | MethodHeader ::= MethodHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderExtendedDims MethodHeaderThrowsClauseopt |
| 620 | /.$putCase consumeMethodHeader(); $break ./ |
| 621 | /:$readableName MethodDeclaration:/ |
| 622 | |
| 623 | MethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '(' |
| 624 | /.$putCase consumeMethodHeaderNameWithTypeParameters(false); $break ./ |
| 625 | MethodHeaderName ::= Modifiersopt Type 'Identifier' '(' |
| 626 | /.$putCase consumeMethodHeaderName(false); $break ./ |
| 627 | /:$readableName MethodHeaderName:/ |
| 628 | |
| 629 | MethodHeaderRightParen ::= ')' |
| 630 | /.$putCase consumeMethodHeaderRightParen(); $break ./ |
| 631 | /:$readableName ):/ |
| 632 | /:$recovery_template ):/ |
| 633 | |
| 634 | MethodHeaderExtendedDims ::= Dimsopt |
| 635 | /.$putCase consumeMethodHeaderExtendedDims(); $break ./ |
| 636 | /:$readableName MethodHeaderExtendedDims:/ |
| 637 | |
| 638 | MethodHeaderThrowsClause ::= 'throws' ClassTypeList |
| 639 | /.$putCase consumeMethodHeaderThrowsClause(); $break ./ |
| 640 | /:$readableName MethodHeaderThrowsClause:/ |
| 641 | |
| 642 | ConstructorHeader ::= ConstructorHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderThrowsClauseopt |
| 643 | /.$putCase consumeConstructorHeader(); $break ./ |
| 644 | /:$readableName ConstructorDeclaration:/ |
| 645 | |
| 646 | ConstructorHeaderName ::= Modifiersopt TypeParameters 'Identifier' '(' |
| 647 | /.$putCase consumeConstructorHeaderNameWithTypeParameters(); $break ./ |
| 648 | ConstructorHeaderName ::= Modifiersopt 'Identifier' '(' |
| 649 | /.$putCase consumeConstructorHeaderName(); $break ./ |
| 650 | /:$readableName ConstructorHeaderName:/ |
| 651 | |
| 652 | FormalParameterList -> FormalParameter |
| 653 | FormalParameterList ::= FormalParameterList ',' FormalParameter |
| 654 | /.$putCase consumeFormalParameterList(); $break ./ |
| 655 | /:$readableName FormalParameterList:/ |
| 656 | |
| 657 | --1.1 feature |
| 658 | FormalParameter ::= Modifiersopt Type VariableDeclaratorId |
| 659 | /.$putCase consumeFormalParameter(false); $break ./ |
| 660 | FormalParameter ::= Modifiersopt Type '...' VariableDeclaratorId |
| 661 | /.$putCase consumeFormalParameter(true); $break ./ |
| 662 | /:$readableName FormalParameter:/ |
| 663 | /:$compliance 1.5:/ |
| 664 | /:$recovery_template Identifier Identifier:/ |
| 665 | |
| 666 | ClassTypeList -> ClassTypeElt |
| 667 | ClassTypeList ::= ClassTypeList ',' ClassTypeElt |
| 668 | /.$putCase consumeClassTypeList(); $break ./ |
| 669 | /:$readableName ClassTypeList:/ |
| 670 | |
| 671 | ClassTypeElt ::= ClassType |
| 672 | /.$putCase consumeClassTypeElt(); $break ./ |
| 673 | /:$readableName ClassType:/ |
| 674 | |
| 675 | MethodBody ::= NestedMethod '{' BlockStatementsopt '}' |
| 676 | /.$putCase consumeMethodBody(); $break ./ |
| 677 | /:$readableName MethodBody:/ |
| 678 | /:$no_statements_recovery:/ |
| 679 | |
| 680 | NestedMethod ::= $empty |
| 681 | /.$putCase consumeNestedMethod(); $break ./ |
| 682 | /:$readableName NestedMethod:/ |
| 683 | |
| 684 | --18.8.4 Productions from 8.5: Static Initializers |
| 685 | |
| 686 | StaticInitializer ::= StaticOnly Block |
| 687 | /.$putCase consumeStaticInitializer(); $break./ |
| 688 | /:$readableName StaticInitializer:/ |
| 689 | |
| 690 | StaticOnly ::= 'static' |
| 691 | /.$putCase consumeStaticOnly(); $break ./ |
| 692 | /:$readableName StaticOnly:/ |
| 693 | |
| 694 | --18.8.5 Productions from 8.6: Constructor Declarations |
| 695 | --ConstructorModifier ::= |
| 696 | -- 'public' |
| 697 | -- | 'protected' |
| 698 | -- | 'private' |
| 699 | -- |
| 700 | -- |
| 701 | ConstructorDeclaration ::= ConstructorHeader MethodBody |
| 702 | /.$putCase consumeConstructorDeclaration() ; $break ./ |
| 703 | -- These rules are added to be able to parse constructors with no body |
| 704 | ConstructorDeclaration ::= ConstructorHeader ';' |
| 705 | /.$putCase consumeInvalidConstructorDeclaration() ; $break ./ |
| 706 | /:$readableName ConstructorDeclaration:/ |
| 707 | |
| 708 | -- the rules ExplicitConstructorInvocationopt has been expanded |
| 709 | -- in the rule below in order to make the grammar lalr(1). |
| 710 | |
| 711 | ExplicitConstructorInvocation ::= 'this' '(' ArgumentListopt ')' ';' |
| 712 | /.$putCase consumeExplicitConstructorInvocation(0, THIS_CALL); $break ./ |
| 713 | |
| 714 | ExplicitConstructorInvocation ::= OnlyTypeArguments 'this' '(' ArgumentListopt ')' ';' |
| 715 | /.$putCase consumeExplicitConstructorInvocationWithTypeArguments(0,THIS_CALL); $break ./ |
| 716 | |
| 717 | ExplicitConstructorInvocation ::= 'super' '(' ArgumentListopt ')' ';' |
| 718 | /.$putCase consumeExplicitConstructorInvocation(0,SUPER_CALL); $break ./ |
| 719 | |
| 720 | ExplicitConstructorInvocation ::= OnlyTypeArguments 'super' '(' ArgumentListopt ')' ';' |
| 721 | /.$putCase consumeExplicitConstructorInvocationWithTypeArguments(0,SUPER_CALL); $break ./ |
| 722 | |
| 723 | --1.1 feature |
| 724 | ExplicitConstructorInvocation ::= Primary '.' 'super' '(' ArgumentListopt ')' ';' |
| 725 | /.$putCase consumeExplicitConstructorInvocation(1, SUPER_CALL); $break ./ |
| 726 | |
| 727 | ExplicitConstructorInvocation ::= Primary '.' OnlyTypeArguments 'super' '(' ArgumentListopt ')' ';' |
| 728 | /.$putCase consumeExplicitConstructorInvocationWithTypeArguments(1, SUPER_CALL); $break ./ |
| 729 | |
| 730 | --1.1 feature |
| 731 | ExplicitConstructorInvocation ::= Name '.' 'super' '(' ArgumentListopt ')' ';' |
| 732 | /.$putCase consumeExplicitConstructorInvocation(2, SUPER_CALL); $break ./ |
| 733 | |
| 734 | ExplicitConstructorInvocation ::= Name '.' OnlyTypeArguments 'super' '(' ArgumentListopt ')' ';' |
| 735 | /.$putCase consumeExplicitConstructorInvocationWithTypeArguments(2, SUPER_CALL); $break ./ |
| 736 | |
| 737 | --1.1 feature |
| 738 | ExplicitConstructorInvocation ::= Primary '.' 'this' '(' ArgumentListopt ')' ';' |
| 739 | /.$putCase consumeExplicitConstructorInvocation(1, THIS_CALL); $break ./ |
| 740 | |
| 741 | ExplicitConstructorInvocation ::= Primary '.' OnlyTypeArguments 'this' '(' ArgumentListopt ')' ';' |
| 742 | /.$putCase consumeExplicitConstructorInvocationWithTypeArguments(1, THIS_CALL); $break ./ |
| 743 | |
| 744 | --1.1 feature |
| 745 | ExplicitConstructorInvocation ::= Name '.' 'this' '(' ArgumentListopt ')' ';' |
| 746 | /.$putCase consumeExplicitConstructorInvocation(2, THIS_CALL); $break ./ |
| 747 | |
| 748 | ExplicitConstructorInvocation ::= Name '.' OnlyTypeArguments 'this' '(' ArgumentListopt ')' ';' |
| 749 | /.$putCase consumeExplicitConstructorInvocationWithTypeArguments(2, THIS_CALL); $break ./ |
| 750 | /:$readableName ExplicitConstructorInvocation:/ |
| 751 | |
| 752 | --18.9 Productions from 9: Interface Declarations |
| 753 | |
| 754 | --18.9.1 Productions from 9.1: Interface Declarations |
| 755 | --InterfaceModifier ::= |
| 756 | -- 'public' |
| 757 | -- | 'abstract' |
| 758 | -- |
| 759 | InterfaceDeclaration ::= InterfaceHeader InterfaceBody |
| 760 | /.$putCase consumeInterfaceDeclaration(); $break ./ |
| 761 | /:$readableName InterfaceDeclaration:/ |
| 762 | |
| 763 | InterfaceHeader ::= InterfaceHeaderName InterfaceHeaderExtendsopt |
| 764 | /.$putCase consumeInterfaceHeader(); $break ./ |
| 765 | /:$readableName InterfaceHeader:/ |
| 766 | |
| 767 | ----------------------------------------------- |
| 768 | -- 1.5 features : generics |
| 769 | ----------------------------------------------- |
| 770 | InterfaceHeaderName ::= InterfaceHeaderName1 TypeParameters |
| 771 | /.$putCase consumeTypeHeaderNameWithTypeParameters(); $break ./ |
| 772 | |
| 773 | InterfaceHeaderName -> InterfaceHeaderName1 |
| 774 | /:$readableName InterfaceHeaderName:/ |
| 775 | |
| 776 | InterfaceHeaderName1 ::= Modifiersopt interface Identifier |
| 777 | /.$putCase consumeInterfaceHeaderName1(); $break ./ |
| 778 | /:$readableName InterfaceHeaderName:/ |
| 779 | |
| 780 | InterfaceHeaderExtends ::= 'extends' InterfaceTypeList |
| 781 | /.$putCase consumeInterfaceHeaderExtends(); $break ./ |
| 782 | /:$readableName InterfaceHeaderExtends:/ |
| 783 | |
| 784 | InterfaceBody ::= '{' InterfaceMemberDeclarationsopt '}' |
| 785 | /:$readableName InterfaceBody:/ |
| 786 | |
| 787 | InterfaceMemberDeclarations -> InterfaceMemberDeclaration |
| 788 | InterfaceMemberDeclarations ::= InterfaceMemberDeclarations InterfaceMemberDeclaration |
| 789 | /.$putCase consumeInterfaceMemberDeclarations(); $break ./ |
| 790 | /:$readableName InterfaceMemberDeclarations:/ |
| 791 | |
| 792 | --same as for class members |
| 793 | InterfaceMemberDeclaration ::= ';' |
| 794 | /.$putCase consumeEmptyTypeDeclaration(); $break ./ |
| 795 | /:$readableName InterfaceMemberDeclaration:/ |
| 796 | |
| 797 | InterfaceMemberDeclaration -> ConstantDeclaration |
| 798 | InterfaceMemberDeclaration ::= MethodHeader MethodBody |
| 799 | /.$putCase consumeInvalidMethodDeclaration(); $break ./ |
| 800 | /:$readableName InterfaceMemberDeclaration:/ |
| 801 | |
| 802 | -- These rules are added to be able to parse constructors inside interface and then report a relevent error message |
| 803 | InvalidConstructorDeclaration ::= ConstructorHeader MethodBody |
| 804 | /.$putCase consumeInvalidConstructorDeclaration(true); $break ./ |
| 805 | InvalidConstructorDeclaration ::= ConstructorHeader ';' |
| 806 | /.$putCase consumeInvalidConstructorDeclaration(false); $break ./ |
| 807 | /:$readableName InvalidConstructorDeclaration:/ |
| 808 | |
| 809 | InterfaceMemberDeclaration -> AbstractMethodDeclaration |
| 810 | InterfaceMemberDeclaration -> InvalidConstructorDeclaration |
| 811 | --1.1 feature |
| 812 | InterfaceMemberDeclaration -> ClassDeclaration |
| 813 | --1.1 feature |
| 814 | InterfaceMemberDeclaration -> InterfaceDeclaration |
| 815 | InterfaceMemberDeclaration -> EnumDeclaration |
| 816 | InterfaceMemberDeclaration -> AnnotationTypeDeclaration |
| 817 | /:$readableName InterfaceMemberDeclaration:/ |
| 818 | |
| 819 | ConstantDeclaration -> FieldDeclaration |
| 820 | /:$readableName ConstantDeclaration:/ |
| 821 | |
| 822 | PushLeftBrace ::= $empty |
| 823 | /.$putCase consumePushLeftBrace(); $break ./ |
| 824 | /:$readableName PushLeftBrace:/ |
| 825 | |
| 826 | ArrayInitializer ::= '{' PushLeftBrace ,opt '}' |
| 827 | /.$putCase consumeEmptyArrayInitializer(); $break ./ |
| 828 | ArrayInitializer ::= '{' PushLeftBrace VariableInitializers '}' |
| 829 | /.$putCase consumeArrayInitializer(); $break ./ |
| 830 | ArrayInitializer ::= '{' PushLeftBrace VariableInitializers , '}' |
| 831 | /.$putCase consumeArrayInitializer(); $break ./ |
| 832 | /:$readableName ArrayInitializer:/ |
| 833 | /:$recovery_template Identifier:/ |
| 834 | |
| 835 | VariableInitializers ::= VariableInitializer |
| 836 | VariableInitializers ::= VariableInitializers ',' VariableInitializer |
| 837 | /.$putCase consumeVariableInitializers(); $break ./ |
| 838 | /:$readableName VariableInitializers:/ |
| 839 | |
| 840 | Block ::= OpenBlock '{' BlockStatementsopt '}' |
| 841 | /.$putCase consumeBlock(); $break ./ |
| 842 | /:$readableName Block:/ |
| 843 | |
| 844 | OpenBlock ::= $empty |
| 845 | /.$putCase consumeOpenBlock() ; $break ./ |
| 846 | /:$readableName OpenBlock:/ |
| 847 | |
| 848 | BlockStatements -> BlockStatement |
| 849 | BlockStatements ::= BlockStatements BlockStatement |
| 850 | /.$putCase consumeBlockStatements() ; $break ./ |
| 851 | /:$readableName BlockStatements:/ |
| 852 | |
| 853 | BlockStatement -> LocalVariableDeclarationStatement |
| 854 | BlockStatement -> Statement |
| 855 | --1.1 feature |
| 856 | BlockStatement -> ClassDeclaration |
| 857 | BlockStatement ::= InterfaceDeclaration |
| 858 | /.$putCase consumeInvalidInterfaceDeclaration(); $break ./ |
| 859 | /:$readableName BlockStatement:/ |
| 860 | BlockStatement ::= AnnotationTypeDeclaration |
| 861 | /.$putCase consumeInvalidAnnotationTypeDeclaration(); $break ./ |
| 862 | /:$readableName BlockStatement:/ |
| 863 | BlockStatement ::= EnumDeclaration |
| 864 | /.$putCase consumeInvalidEnumDeclaration(); $break ./ |
| 865 | /:$readableName BlockStatement:/ |
| 866 | |
| 867 | LocalVariableDeclarationStatement ::= LocalVariableDeclaration ';' |
| 868 | /.$putCase consumeLocalVariableDeclarationStatement(); $break ./ |
| 869 | /:$readableName LocalVariableDeclarationStatement:/ |
| 870 | |
| 871 | LocalVariableDeclaration ::= Type PushModifiers VariableDeclarators |
| 872 | /.$putCase consumeLocalVariableDeclaration(); $break ./ |
| 873 | -- 1.1 feature |
| 874 | -- The modifiers part of this rule makes the grammar more permissive. |
| 875 | -- The only modifier here is final. We put Modifiers to allow multiple modifiers |
| 876 | -- This will require to check the validity of the modifier |
| 877 | LocalVariableDeclaration ::= Modifiers Type PushRealModifiers VariableDeclarators |
| 878 | /.$putCase consumeLocalVariableDeclaration(); $break ./ |
| 879 | /:$readableName LocalVariableDeclaration:/ |
| 880 | |
| 881 | PushModifiers ::= $empty |
| 882 | /.$putCase consumePushModifiers(); $break ./ |
| 883 | /:$readableName PushModifiers:/ |
| 884 | |
| 885 | PushModifiersForHeader ::= $empty |
| 886 | /.$putCase consumePushModifiersForHeader(); $break ./ |
| 887 | /:$readableName PushModifiersForHeader:/ |
| 888 | |
| 889 | PushRealModifiers ::= $empty |
| 890 | /.$putCase consumePushRealModifiers(); $break ./ |
| 891 | /:$readableName PushRealModifiers:/ |
| 892 | |
| 893 | Statement -> StatementWithoutTrailingSubstatement |
| 894 | Statement -> LabeledStatement |
| 895 | Statement -> IfThenStatement |
| 896 | Statement -> IfThenElseStatement |
| 897 | Statement -> WhileStatement |
| 898 | Statement -> ForStatement |
| 899 | ----------------------------------------------- |
| 900 | -- 1.5 feature |
| 901 | ----------------------------------------------- |
| 902 | Statement -> EnhancedForStatement |
| 903 | /:$readableName Statement:/ |
| 904 | /:$recovery_template ;:/ |
| 905 | |
| 906 | StatementNoShortIf -> StatementWithoutTrailingSubstatement |
| 907 | StatementNoShortIf -> LabeledStatementNoShortIf |
| 908 | StatementNoShortIf -> IfThenElseStatementNoShortIf |
| 909 | StatementNoShortIf -> WhileStatementNoShortIf |
| 910 | StatementNoShortIf -> ForStatementNoShortIf |
| 911 | ----------------------------------------------- |
| 912 | -- 1.5 feature |
| 913 | ----------------------------------------------- |
| 914 | StatementNoShortIf -> EnhancedForStatementNoShortIf |
| 915 | /:$readableName Statement:/ |
| 916 | |
| 917 | StatementWithoutTrailingSubstatement -> AssertStatement |
| 918 | StatementWithoutTrailingSubstatement -> Block |
| 919 | StatementWithoutTrailingSubstatement -> EmptyStatement |
| 920 | StatementWithoutTrailingSubstatement -> ExpressionStatement |
| 921 | StatementWithoutTrailingSubstatement -> SwitchStatement |
| 922 | StatementWithoutTrailingSubstatement -> DoStatement |
| 923 | StatementWithoutTrailingSubstatement -> BreakStatement |
| 924 | StatementWithoutTrailingSubstatement -> ContinueStatement |
| 925 | StatementWithoutTrailingSubstatement -> ReturnStatement |
| 926 | StatementWithoutTrailingSubstatement -> SynchronizedStatement |
| 927 | StatementWithoutTrailingSubstatement -> ThrowStatement |
| 928 | StatementWithoutTrailingSubstatement -> TryStatement |
| 929 | /:$readableName Statement:/ |
| 930 | |
| 931 | EmptyStatement ::= ';' |
| 932 | /.$putCase consumeEmptyStatement(); $break ./ |
| 933 | /:$readableName EmptyStatement:/ |
| 934 | |
| 935 | LabeledStatement ::= Label ':' Statement |
| 936 | /.$putCase consumeStatementLabel() ; $break ./ |
| 937 | /:$readableName LabeledStatement:/ |
| 938 | |
| 939 | LabeledStatementNoShortIf ::= Label ':' StatementNoShortIf |
| 940 | /.$putCase consumeStatementLabel() ; $break ./ |
| 941 | /:$readableName LabeledStatement:/ |
| 942 | |
| 943 | Label ::= 'Identifier' |
| 944 | /.$putCase consumeLabel() ; $break ./ |
| 945 | /:$readableName Label:/ |
| 946 | |
| 947 | ExpressionStatement ::= StatementExpression ';' |
| 948 | /. $putCase consumeExpressionStatement(); $break ./ |
| 949 | ExpressionStatement ::= ExplicitConstructorInvocation |
| 950 | /:$readableName Statement:/ |
| 951 | |
| 952 | StatementExpression ::= Assignment |
| 953 | StatementExpression ::= PreIncrementExpression |
| 954 | StatementExpression ::= PreDecrementExpression |
| 955 | StatementExpression ::= PostIncrementExpression |
| 956 | StatementExpression ::= PostDecrementExpression |
| 957 | StatementExpression ::= MethodInvocation |
| 958 | StatementExpression ::= ClassInstanceCreationExpression |
| 959 | /:$readableName Expression:/ |
| 960 | |
| 961 | IfThenStatement ::= 'if' '(' Expression ')' Statement |
| 962 | /.$putCase consumeStatementIfNoElse(); $break ./ |
| 963 | /:$readableName IfStatement:/ |
| 964 | |
| 965 | IfThenElseStatement ::= 'if' '(' Expression ')' StatementNoShortIf 'else' Statement |
| 966 | /.$putCase consumeStatementIfWithElse(); $break ./ |
| 967 | /:$readableName IfStatement:/ |
| 968 | |
| 969 | IfThenElseStatementNoShortIf ::= 'if' '(' Expression ')' StatementNoShortIf 'else' StatementNoShortIf |
| 970 | /.$putCase consumeStatementIfWithElse(); $break ./ |
| 971 | /:$readableName IfStatement:/ |
| 972 | |
| 973 | SwitchStatement ::= 'switch' '(' Expression ')' OpenBlock SwitchBlock |
| 974 | /.$putCase consumeStatementSwitch() ; $break ./ |
| 975 | /:$readableName SwitchStatement:/ |
| 976 | |
| 977 | SwitchBlock ::= '{' '}' |
| 978 | /.$putCase consumeEmptySwitchBlock() ; $break ./ |
| 979 | |
| 980 | SwitchBlock ::= '{' SwitchBlockStatements '}' |
| 981 | SwitchBlock ::= '{' SwitchLabels '}' |
| 982 | SwitchBlock ::= '{' SwitchBlockStatements SwitchLabels '}' |
| 983 | /.$putCase consumeSwitchBlock() ; $break ./ |
| 984 | /:$readableName SwitchBlock:/ |
| 985 | |
| 986 | SwitchBlockStatements -> SwitchBlockStatement |
| 987 | SwitchBlockStatements ::= SwitchBlockStatements SwitchBlockStatement |
| 988 | /.$putCase consumeSwitchBlockStatements() ; $break ./ |
| 989 | /:$readableName SwitchBlockStatements:/ |
| 990 | |
| 991 | SwitchBlockStatement ::= SwitchLabels BlockStatements |
| 992 | /.$putCase consumeSwitchBlockStatement() ; $break ./ |
| 993 | /:$readableName SwitchBlockStatement:/ |
| 994 | |
| 995 | SwitchLabels -> SwitchLabel |
| 996 | SwitchLabels ::= SwitchLabels SwitchLabel |
| 997 | /.$putCase consumeSwitchLabels() ; $break ./ |
| 998 | /:$readableName SwitchLabels:/ |
| 999 | |
| 1000 | SwitchLabel ::= 'case' ConstantExpression ':' |
| 1001 | /. $putCase consumeCaseLabel(); $break ./ |
| 1002 | |
| 1003 | SwitchLabel ::= 'default' ':' |
| 1004 | /. $putCase consumeDefaultLabel(); $break ./ |
| 1005 | /:$readableName SwitchLabel:/ |
| 1006 | |
| 1007 | WhileStatement ::= 'while' '(' Expression ')' Statement |
| 1008 | /.$putCase consumeStatementWhile() ; $break ./ |
| 1009 | /:$readableName WhileStatement:/ |
| 1010 | |
| 1011 | WhileStatementNoShortIf ::= 'while' '(' Expression ')' StatementNoShortIf |
| 1012 | /.$putCase consumeStatementWhile() ; $break ./ |
| 1013 | /:$readableName WhileStatement:/ |
| 1014 | |
| 1015 | DoStatement ::= 'do' Statement 'while' '(' Expression ')' ';' |
| 1016 | /.$putCase consumeStatementDo() ; $break ./ |
| 1017 | /:$readableName DoStatement:/ |
| 1018 | |
| 1019 | ForStatement ::= 'for' '(' ForInitopt ';' Expressionopt ';' ForUpdateopt ')' Statement |
| 1020 | /.$putCase consumeStatementFor() ; $break ./ |
| 1021 | /:$readableName ForStatement:/ |
| 1022 | |
| 1023 | ForStatementNoShortIf ::= 'for' '(' ForInitopt ';' Expressionopt ';' ForUpdateopt ')' StatementNoShortIf |
| 1024 | /.$putCase consumeStatementFor() ; $break ./ |
| 1025 | /:$readableName ForStatement:/ |
| 1026 | |
| 1027 | --the minus one allows to avoid a stack-to-stack transfer |
| 1028 | ForInit ::= StatementExpressionList |
| 1029 | /.$putCase consumeForInit() ; $break ./ |
| 1030 | ForInit -> LocalVariableDeclaration |
| 1031 | /:$readableName ForInit:/ |
| 1032 | |
| 1033 | ForUpdate -> StatementExpressionList |
| 1034 | /:$readableName ForUpdate:/ |
| 1035 | |
| 1036 | StatementExpressionList -> StatementExpression |
| 1037 | StatementExpressionList ::= StatementExpressionList ',' StatementExpression |
| 1038 | /.$putCase consumeStatementExpressionList() ; $break ./ |
| 1039 | /:$readableName StatementExpressionList:/ |
| 1040 | |
| 1041 | -- 1.4 feature |
| 1042 | AssertStatement ::= 'assert' Expression ';' |
| 1043 | /.$putCase consumeSimpleAssertStatement() ; $break ./ |
| 1044 | /:$compliance 1.4:/ |
| 1045 | |
| 1046 | AssertStatement ::= 'assert' Expression ':' Expression ';' |
| 1047 | /.$putCase consumeAssertStatement() ; $break ./ |
| 1048 | /:$readableName AssertStatement:/ |
| 1049 | /:$compliance 1.4:/ |
| 1050 | |
| 1051 | BreakStatement ::= 'break' ';' |
| 1052 | /.$putCase consumeStatementBreak() ; $break ./ |
| 1053 | |
| 1054 | BreakStatement ::= 'break' Identifier ';' |
| 1055 | /.$putCase consumeStatementBreakWithLabel() ; $break ./ |
| 1056 | /:$readableName BreakStatement:/ |
| 1057 | |
| 1058 | ContinueStatement ::= 'continue' ';' |
| 1059 | /.$putCase consumeStatementContinue() ; $break ./ |
| 1060 | |
| 1061 | ContinueStatement ::= 'continue' Identifier ';' |
| 1062 | /.$putCase consumeStatementContinueWithLabel() ; $break ./ |
| 1063 | /:$readableName ContinueStatement:/ |
| 1064 | |
| 1065 | ReturnStatement ::= 'return' Expressionopt ';' |
| 1066 | /.$putCase consumeStatementReturn() ; $break ./ |
| 1067 | /:$readableName ReturnStatement:/ |
| 1068 | |
| 1069 | ThrowStatement ::= 'throw' Expression ';' |
| 1070 | /.$putCase consumeStatementThrow(); $break ./ |
| 1071 | /:$readableName ThrowStatement:/ |
| 1072 | |
| 1073 | SynchronizedStatement ::= OnlySynchronized '(' Expression ')' Block |
| 1074 | /.$putCase consumeStatementSynchronized(); $break ./ |
| 1075 | /:$readableName SynchronizedStatement:/ |
| 1076 | |
| 1077 | OnlySynchronized ::= 'synchronized' |
| 1078 | /.$putCase consumeOnlySynchronized(); $break ./ |
| 1079 | /:$readableName OnlySynchronized:/ |
| 1080 | |
| 1081 | TryStatement ::= 'try' TryBlock Catches |
| 1082 | /.$putCase consumeStatementTry(false); $break ./ |
| 1083 | TryStatement ::= 'try' TryBlock Catchesopt Finally |
| 1084 | /.$putCase consumeStatementTry(true); $break ./ |
| 1085 | /:$readableName TryStatement:/ |
| 1086 | |
| 1087 | TryBlock ::= Block ExitTryBlock |
| 1088 | /:$readableName Block:/ |
| 1089 | |
| 1090 | ExitTryBlock ::= $empty |
| 1091 | /.$putCase consumeExitTryBlock(); $break ./ |
| 1092 | /:$readableName ExitTryBlock:/ |
| 1093 | |
| 1094 | Catches -> CatchClause |
| 1095 | Catches ::= Catches CatchClause |
| 1096 | /.$putCase consumeCatches(); $break ./ |
| 1097 | /:$readableName Catches:/ |
| 1098 | |
| 1099 | CatchClause ::= 'catch' '(' FormalParameter ')' Block |
| 1100 | /.$putCase consumeStatementCatch() ; $break ./ |
| 1101 | /:$readableName CatchClause:/ |
| 1102 | |
| 1103 | Finally ::= 'finally' Block |
| 1104 | /:$readableName Finally:/ |
| 1105 | /:$recovery_template finally { }:/ |
| 1106 | |
| 1107 | --18.12 Productions from 14: Expressions |
| 1108 | |
| 1109 | --for source positioning purpose |
| 1110 | PushLPAREN ::= '(' |
| 1111 | /.$putCase consumeLeftParen(); $break ./ |
| 1112 | /:$readableName (:/ |
| 1113 | /:$recovery_template (:/ |
| 1114 | PushRPAREN ::= ')' |
| 1115 | /.$putCase consumeRightParen(); $break ./ |
| 1116 | /:$readableName ):/ |
| 1117 | /:$recovery_template ):/ |
| 1118 | |
| 1119 | Primary -> PrimaryNoNewArray |
| 1120 | Primary -> ArrayCreationWithArrayInitializer |
| 1121 | Primary -> ArrayCreationWithoutArrayInitializer |
| 1122 | /:$readableName Expression:/ |
| 1123 | |
| 1124 | PrimaryNoNewArray -> Literal |
| 1125 | PrimaryNoNewArray ::= 'this' |
| 1126 | /.$putCase consumePrimaryNoNewArrayThis(); $break ./ |
| 1127 | |
| 1128 | PrimaryNoNewArray ::= PushLPAREN Expression_NotName PushRPAREN |
| 1129 | /.$putCase consumePrimaryNoNewArray(); $break ./ |
| 1130 | |
| 1131 | PrimaryNoNewArray ::= PushLPAREN Name PushRPAREN |
| 1132 | /.$putCase consumePrimaryNoNewArrayWithName(); $break ./ |
| 1133 | |
| 1134 | PrimaryNoNewArray -> ClassInstanceCreationExpression |
| 1135 | PrimaryNoNewArray -> FieldAccess |
| 1136 | --1.1 feature |
| 1137 | PrimaryNoNewArray ::= Name '.' 'this' |
| 1138 | /.$putCase consumePrimaryNoNewArrayNameThis(); $break ./ |
| 1139 | PrimaryNoNewArray ::= Name '.' 'super' |
| 1140 | /.$putCase consumePrimaryNoNewArrayNameSuper(); $break ./ |
| 1141 | |
| 1142 | --1.1 feature |
| 1143 | --PrimaryNoNewArray ::= Type '.' 'class' |
| 1144 | --inline Type in the previous rule in order to make the grammar LL1 instead |
| 1145 | -- of LL2. The result is the 3 next rules. |
| 1146 | |
| 1147 | PrimaryNoNewArray ::= Name '.' 'class' |
| 1148 | /.$putCase consumePrimaryNoNewArrayName(); $break ./ |
| 1149 | |
| 1150 | PrimaryNoNewArray ::= Name Dims '.' 'class' |
| 1151 | /.$putCase consumePrimaryNoNewArrayArrayType(); $break ./ |
| 1152 | |
| 1153 | PrimaryNoNewArray ::= PrimitiveType Dims '.' 'class' |
| 1154 | /.$putCase consumePrimaryNoNewArrayPrimitiveArrayType(); $break ./ |
| 1155 | |
| 1156 | PrimaryNoNewArray ::= PrimitiveType '.' 'class' |
| 1157 | /.$putCase consumePrimaryNoNewArrayPrimitiveType(); $break ./ |
| 1158 | |
| 1159 | PrimaryNoNewArray -> MethodInvocation |
| 1160 | PrimaryNoNewArray -> ArrayAccess |
| 1161 | /:$readableName Expression:/ |
| 1162 | --1.1 feature |
| 1163 | -- |
| 1164 | -- In Java 1.0 a ClassBody could not appear at all in a |
| 1165 | -- ClassInstanceCreationExpression. |
| 1166 | -- |
| 1167 | |
| 1168 | AllocationHeader ::= 'new' ClassType '(' ArgumentListopt ')' |
| 1169 | /.$putCase consumeAllocationHeader(); $break ./ |
| 1170 | /:$readableName AllocationHeader:/ |
| 1171 | |
| 1172 | ClassInstanceCreationExpression ::= 'new' OnlyTypeArguments ClassType '(' ArgumentListopt ')' ClassBodyopt |
| 1173 | /.$putCase consumeClassInstanceCreationExpressionWithTypeArguments(); $break ./ |
| 1174 | |
| 1175 | ClassInstanceCreationExpression ::= 'new' ClassType '(' ArgumentListopt ')' ClassBodyopt |
| 1176 | /.$putCase consumeClassInstanceCreationExpression(); $break ./ |
| 1177 | --1.1 feature |
| 1178 | |
| 1179 | ClassInstanceCreationExpression ::= Primary '.' 'new' OnlyTypeArguments ClassType '(' ArgumentListopt ')' ClassBodyopt |
| 1180 | /.$putCase consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ; $break ./ |
| 1181 | |
| 1182 | ClassInstanceCreationExpression ::= Primary '.' 'new' ClassType '(' ArgumentListopt ')' ClassBodyopt |
| 1183 | /.$putCase consumeClassInstanceCreationExpressionQualified() ; $break ./ |
| 1184 | |
| 1185 | --1.1 feature |
| 1186 | ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' ClassType '(' ArgumentListopt ')' ClassBodyopt |
| 1187 | /.$putCase consumeClassInstanceCreationExpressionQualified() ; $break ./ |
| 1188 | /:$readableName ClassInstanceCreationExpression:/ |
| 1189 | |
| 1190 | ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' OnlyTypeArguments ClassType '(' ArgumentListopt ')' ClassBodyopt |
| 1191 | /.$putCase consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ; $break ./ |
| 1192 | /:$readableName ClassInstanceCreationExpression:/ |
| 1193 | |
| 1194 | ClassInstanceCreationExpressionName ::= Name '.' |
| 1195 | /.$putCase consumeClassInstanceCreationExpressionName() ; $break ./ |
| 1196 | /:$readableName ClassInstanceCreationExpressionName:/ |
| 1197 | |
| 1198 | ClassBodyopt ::= $empty --test made using null as contents |
| 1199 | /.$putCase consumeClassBodyopt(); $break ./ |
| 1200 | ClassBodyopt ::= EnterAnonymousClassBody ClassBody |
| 1201 | /:$readableName ClassBody:/ |
| 1202 | /:$no_statements_recovery:/ |
| 1203 | |
| 1204 | EnterAnonymousClassBody ::= $empty |
| 1205 | /.$putCase consumeEnterAnonymousClassBody(); $break ./ |
| 1206 | /:$readableName EnterAnonymousClassBody:/ |
| 1207 | |
| 1208 | ArgumentList ::= Expression |
| 1209 | ArgumentList ::= ArgumentList ',' Expression |
| 1210 | /.$putCase consumeArgumentList(); $break ./ |
| 1211 | /:$readableName ArgumentList:/ |
| 1212 | |
| 1213 | ArrayCreationHeader ::= 'new' PrimitiveType DimWithOrWithOutExprs |
| 1214 | /.$putCase consumeArrayCreationHeader(); $break ./ |
| 1215 | |
| 1216 | ArrayCreationHeader ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs |
| 1217 | /.$putCase consumeArrayCreationHeader(); $break ./ |
| 1218 | /:$readableName ArrayCreationHeader:/ |
| 1219 | |
| 1220 | ArrayCreationWithoutArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs |
| 1221 | /.$putCase consumeArrayCreationExpressionWithoutInitializer(); $break ./ |
| 1222 | /:$readableName ArrayCreationWithoutArrayInitializer:/ |
| 1223 | |
| 1224 | ArrayCreationWithArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs ArrayInitializer |
| 1225 | /.$putCase consumeArrayCreationExpressionWithInitializer(); $break ./ |
| 1226 | /:$readableName ArrayCreationWithArrayInitializer:/ |
| 1227 | |
| 1228 | ArrayCreationWithoutArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs |
| 1229 | /.$putCase consumeArrayCreationExpressionWithoutInitializer(); $break ./ |
| 1230 | |
| 1231 | ArrayCreationWithArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs ArrayInitializer |
| 1232 | /.$putCase consumeArrayCreationExpressionWithInitializer(); $break ./ |
| 1233 | |
| 1234 | DimWithOrWithOutExprs ::= DimWithOrWithOutExpr |
| 1235 | DimWithOrWithOutExprs ::= DimWithOrWithOutExprs DimWithOrWithOutExpr |
| 1236 | /.$putCase consumeDimWithOrWithOutExprs(); $break ./ |
| 1237 | /:$readableName Dimensions:/ |
| 1238 | |
| 1239 | DimWithOrWithOutExpr ::= '[' Expression ']' |
| 1240 | DimWithOrWithOutExpr ::= '[' ']' |
| 1241 | /. $putCase consumeDimWithOrWithOutExpr(); $break ./ |
| 1242 | /:$readableName Dimension:/ |
| 1243 | -- ----------------------------------------------- |
| 1244 | |
| 1245 | Dims ::= DimsLoop |
| 1246 | /. $putCase consumeDims(); $break ./ |
| 1247 | /:$readableName Dimensions:/ |
| 1248 | DimsLoop -> OneDimLoop |
| 1249 | DimsLoop ::= DimsLoop OneDimLoop |
| 1250 | /:$readableName Dimensions:/ |
| 1251 | OneDimLoop ::= '[' ']' |
| 1252 | /. $putCase consumeOneDimLoop(); $break ./ |
| 1253 | /:$readableName Dimension:/ |
| 1254 | |
| 1255 | FieldAccess ::= Primary '.' 'Identifier' |
| 1256 | /.$putCase consumeFieldAccess(false); $break ./ |
| 1257 | |
| 1258 | FieldAccess ::= 'super' '.' 'Identifier' |
| 1259 | /.$putCase consumeFieldAccess(true); $break ./ |
| 1260 | /:$readableName FieldAccess:/ |
| 1261 | |
| 1262 | MethodInvocation ::= Name '(' ArgumentListopt ')' |
| 1263 | /.$putCase consumeMethodInvocationName(); $break ./ |
| 1264 | |
| 1265 | MethodInvocation ::= Name '.' OnlyTypeArguments 'Identifier' '(' ArgumentListopt ')' |
| 1266 | /.$putCase consumeMethodInvocationNameWithTypeArguments(); $break ./ |
| 1267 | |
| 1268 | MethodInvocation ::= Primary '.' OnlyTypeArguments 'Identifier' '(' ArgumentListopt ')' |
| 1269 | /.$putCase consumeMethodInvocationPrimaryWithTypeArguments(); $break ./ |
| 1270 | |
| 1271 | MethodInvocation ::= Primary '.' 'Identifier' '(' ArgumentListopt ')' |
| 1272 | /.$putCase consumeMethodInvocationPrimary(); $break ./ |
| 1273 | |
| 1274 | MethodInvocation ::= 'super' '.' OnlyTypeArguments 'Identifier' '(' ArgumentListopt ')' |
| 1275 | /.$putCase consumeMethodInvocationSuperWithTypeArguments(); $break ./ |
| 1276 | |
| 1277 | MethodInvocation ::= 'super' '.' 'Identifier' '(' ArgumentListopt ')' |
| 1278 | /.$putCase consumeMethodInvocationSuper(); $break ./ |
| 1279 | /:$readableName MethodInvocation:/ |
| 1280 | |
| 1281 | ArrayAccess ::= Name '[' Expression ']' |
| 1282 | /.$putCase consumeArrayAccess(true); $break ./ |
| 1283 | ArrayAccess ::= PrimaryNoNewArray '[' Expression ']' |
| 1284 | /.$putCase consumeArrayAccess(false); $break ./ |
| 1285 | ArrayAccess ::= ArrayCreationWithArrayInitializer '[' Expression ']' |
| 1286 | /.$putCase consumeArrayAccess(false); $break ./ |
| 1287 | /:$readableName ArrayAccess:/ |
| 1288 | |
| 1289 | PostfixExpression -> Primary |
| 1290 | PostfixExpression ::= Name |
| 1291 | /.$putCase consumePostfixExpression(); $break ./ |
| 1292 | PostfixExpression -> PostIncrementExpression |
| 1293 | PostfixExpression -> PostDecrementExpression |
| 1294 | /:$readableName Expression:/ |
| 1295 | |
| 1296 | PostIncrementExpression ::= PostfixExpression '++' |
| 1297 | /.$putCase consumeUnaryExpression(OperatorIds.PLUS,true); $break ./ |
| 1298 | /:$readableName PostIncrementExpression:/ |
| 1299 | |
| 1300 | PostDecrementExpression ::= PostfixExpression '--' |
| 1301 | /.$putCase consumeUnaryExpression(OperatorIds.MINUS,true); $break ./ |
| 1302 | /:$readableName PostDecrementExpression:/ |
| 1303 | |
| 1304 | --for source managment purpose |
| 1305 | PushPosition ::= $empty |
| 1306 | /.$putCase consumePushPosition(); $break ./ |
| 1307 | /:$readableName PushPosition:/ |
| 1308 | |
| 1309 | UnaryExpression -> PreIncrementExpression |
| 1310 | UnaryExpression -> PreDecrementExpression |
| 1311 | UnaryExpression ::= '+' PushPosition UnaryExpression |
| 1312 | /.$putCase consumeUnaryExpression(OperatorIds.PLUS); $break ./ |
| 1313 | UnaryExpression ::= '-' PushPosition UnaryExpression |
| 1314 | /.$putCase consumeUnaryExpression(OperatorIds.MINUS); $break ./ |
| 1315 | UnaryExpression -> UnaryExpressionNotPlusMinus |
| 1316 | /:$readableName Expression:/ |
| 1317 | |
| 1318 | PreIncrementExpression ::= '++' PushPosition UnaryExpression |
| 1319 | /.$putCase consumeUnaryExpression(OperatorIds.PLUS,false); $break ./ |
| 1320 | /:$readableName PreIncrementExpression:/ |
| 1321 | |
| 1322 | PreDecrementExpression ::= '--' PushPosition UnaryExpression |
| 1323 | /.$putCase consumeUnaryExpression(OperatorIds.MINUS,false); $break ./ |
| 1324 | /:$readableName PreDecrementExpression:/ |
| 1325 | |
| 1326 | UnaryExpressionNotPlusMinus -> PostfixExpression |
| 1327 | UnaryExpressionNotPlusMinus ::= '~' PushPosition UnaryExpression |
| 1328 | /.$putCase consumeUnaryExpression(OperatorIds.TWIDDLE); $break ./ |
| 1329 | UnaryExpressionNotPlusMinus ::= '!' PushPosition UnaryExpression |
| 1330 | /.$putCase consumeUnaryExpression(OperatorIds.NOT); $break ./ |
| 1331 | UnaryExpressionNotPlusMinus -> CastExpression |
| 1332 | /:$readableName Expression:/ |
| 1333 | |
| 1334 | CastExpression ::= PushLPAREN PrimitiveType Dimsopt PushRPAREN InsideCastExpression UnaryExpression |
| 1335 | /.$putCase consumeCastExpressionWithPrimitiveType(); $break ./ |
| 1336 | CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression Dimsopt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus |
| 1337 | /.$putCase consumeCastExpressionWithGenericsArray(); $break ./ |
| 1338 | CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression '.' ClassOrInterfaceType Dimsopt PushRPAREN InsideCastExpressionWithQualifiedGenerics UnaryExpressionNotPlusMinus |
| 1339 | /.$putCase consumeCastExpressionWithQualifiedGenericsArray(); $break ./ |
| 1340 | CastExpression ::= PushLPAREN Name PushRPAREN InsideCastExpressionLL1 UnaryExpressionNotPlusMinus |
| 1341 | /.$putCase consumeCastExpressionLL1(); $break ./ |
| 1342 | CastExpression ::= PushLPAREN Name Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus |
| 1343 | /.$putCase consumeCastExpressionWithNameArray(); $break ./ |
| 1344 | /:$readableName CastExpression:/ |
| 1345 | |
| 1346 | OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments |
| 1347 | /.$putCase consumeOnlyTypeArgumentsForCastExpression(); $break ./ |
| 1348 | /:$readableName TypeArguments:/ |
| 1349 | |
| 1350 | InsideCastExpression ::= $empty |
| 1351 | /.$putCase consumeInsideCastExpression(); $break ./ |
| 1352 | /:$readableName InsideCastExpression:/ |
| 1353 | InsideCastExpressionLL1 ::= $empty |
| 1354 | /.$putCase consumeInsideCastExpressionLL1(); $break ./ |
| 1355 | /:$readableName InsideCastExpression:/ |
| 1356 | InsideCastExpressionWithQualifiedGenerics ::= $empty |
| 1357 | /.$putCase consumeInsideCastExpressionWithQualifiedGenerics(); $break ./ |
| 1358 | /:$readableName InsideCastExpression:/ |
| 1359 | |
| 1360 | MultiplicativeExpression -> UnaryExpression |
| 1361 | MultiplicativeExpression ::= MultiplicativeExpression '*' UnaryExpression |
| 1362 | /.$putCase consumeBinaryExpression(OperatorIds.MULTIPLY); $break ./ |
| 1363 | MultiplicativeExpression ::= MultiplicativeExpression '/' UnaryExpression |
| 1364 | /.$putCase consumeBinaryExpression(OperatorIds.DIVIDE); $break ./ |
| 1365 | MultiplicativeExpression ::= MultiplicativeExpression '%' UnaryExpression |
| 1366 | /.$putCase consumeBinaryExpression(OperatorIds.REMAINDER); $break ./ |
| 1367 | /:$readableName Expression:/ |
| 1368 | |
| 1369 | AdditiveExpression -> MultiplicativeExpression |
| 1370 | AdditiveExpression ::= AdditiveExpression '+' MultiplicativeExpression |
| 1371 | /.$putCase consumeBinaryExpression(OperatorIds.PLUS); $break ./ |
| 1372 | AdditiveExpression ::= AdditiveExpression '-' MultiplicativeExpression |
| 1373 | /.$putCase consumeBinaryExpression(OperatorIds.MINUS); $break ./ |
| 1374 | /:$readableName Expression:/ |
| 1375 | |
| 1376 | ShiftExpression -> AdditiveExpression |
| 1377 | ShiftExpression ::= ShiftExpression '<<' AdditiveExpression |
| 1378 | /.$putCase consumeBinaryExpression(OperatorIds.LEFT_SHIFT); $break ./ |
| 1379 | ShiftExpression ::= ShiftExpression '>>' AdditiveExpression |
| 1380 | /.$putCase consumeBinaryExpression(OperatorIds.RIGHT_SHIFT); $break ./ |
| 1381 | ShiftExpression ::= ShiftExpression '>>>' AdditiveExpression |
| 1382 | /.$putCase consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT); $break ./ |
| 1383 | /:$readableName Expression:/ |
| 1384 | |
| 1385 | RelationalExpression -> ShiftExpression |
| 1386 | RelationalExpression ::= RelationalExpression '<' ShiftExpression |
| 1387 | /.$putCase consumeBinaryExpression(OperatorIds.LESS); $break ./ |
| 1388 | RelationalExpression ::= RelationalExpression '>' ShiftExpression |
| 1389 | /.$putCase consumeBinaryExpression(OperatorIds.GREATER); $break ./ |
| 1390 | RelationalExpression ::= RelationalExpression '<=' ShiftExpression |
| 1391 | /.$putCase consumeBinaryExpression(OperatorIds.LESS_EQUAL); $break ./ |
| 1392 | RelationalExpression ::= RelationalExpression '>=' ShiftExpression |
| 1393 | /.$putCase consumeBinaryExpression(OperatorIds.GREATER_EQUAL); $break ./ |
| 1394 | /:$readableName Expression:/ |
| 1395 | |
| 1396 | InstanceofExpression -> RelationalExpression |
| 1397 | InstanceofExpression ::= InstanceofExpression 'instanceof' ReferenceType |
| 1398 | /.$putCase consumeInstanceOfExpression(); $break ./ |
| 1399 | /:$readableName Expression:/ |
| 1400 | |
| 1401 | EqualityExpression -> InstanceofExpression |
| 1402 | EqualityExpression ::= EqualityExpression '==' InstanceofExpression |
| 1403 | /.$putCase consumeEqualityExpression(OperatorIds.EQUAL_EQUAL); $break ./ |
| 1404 | EqualityExpression ::= EqualityExpression '!=' InstanceofExpression |
| 1405 | /.$putCase consumeEqualityExpression(OperatorIds.NOT_EQUAL); $break ./ |
| 1406 | /:$readableName Expression:/ |
| 1407 | |
| 1408 | AndExpression -> EqualityExpression |
| 1409 | AndExpression ::= AndExpression '&' EqualityExpression |
| 1410 | /.$putCase consumeBinaryExpression(OperatorIds.AND); $break ./ |
| 1411 | /:$readableName Expression:/ |
| 1412 | |
| 1413 | ExclusiveOrExpression -> AndExpression |
| 1414 | ExclusiveOrExpression ::= ExclusiveOrExpression '^' AndExpression |
| 1415 | /.$putCase consumeBinaryExpression(OperatorIds.XOR); $break ./ |
| 1416 | /:$readableName Expression:/ |
| 1417 | |
| 1418 | InclusiveOrExpression -> ExclusiveOrExpression |
| 1419 | InclusiveOrExpression ::= InclusiveOrExpression '|' ExclusiveOrExpression |
| 1420 | /.$putCase consumeBinaryExpression(OperatorIds.OR); $break ./ |
| 1421 | /:$readableName Expression:/ |
| 1422 | |
| 1423 | ConditionalAndExpression -> InclusiveOrExpression |
| 1424 | ConditionalAndExpression ::= ConditionalAndExpression '&&' InclusiveOrExpression |
| 1425 | /.$putCase consumeBinaryExpression(OperatorIds.AND_AND); $break ./ |
| 1426 | /:$readableName Expression:/ |
| 1427 | |
| 1428 | ConditionalOrExpression -> ConditionalAndExpression |
| 1429 | ConditionalOrExpression ::= ConditionalOrExpression '||' ConditionalAndExpression |
| 1430 | /.$putCase consumeBinaryExpression(OperatorIds.OR_OR); $break ./ |
| 1431 | /:$readableName Expression:/ |
| 1432 | |
| 1433 | ConditionalExpression -> ConditionalOrExpression |
| 1434 | ConditionalExpression ::= ConditionalOrExpression '?' Expression ':' ConditionalExpression |
| 1435 | /.$putCase consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ; $break ./ |
| 1436 | /:$readableName Expression:/ |
| 1437 | |
| 1438 | AssignmentExpression -> ConditionalExpression |
| 1439 | AssignmentExpression -> Assignment |
| 1440 | /:$readableName Expression:/ |
| 1441 | /:$recovery_template Identifier:/ |
| 1442 | |
| 1443 | Assignment ::= PostfixExpression AssignmentOperator AssignmentExpression |
| 1444 | /.$putCase consumeAssignment(); $break ./ |
| 1445 | /:$readableName Assignment:/ |
| 1446 | |
| 1447 | -- this rule is added to parse an array initializer in a assigment and then report a syntax error knowing the exact senario |
| 1448 | InvalidArrayInitializerAssignement ::= PostfixExpression AssignmentOperator ArrayInitializer |
| 1449 | /:$readableName ArrayInitializerAssignment:/ |
| 1450 | /:$recovery:/ |
| 1451 | Assignment ::= InvalidArrayInitializerAssignement |
| 1452 | /.$putcase ignoreExpressionAssignment();$break ./ |
| 1453 | /:$recovery:/ |
| 1454 | |
| 1455 | AssignmentOperator ::= '=' |
| 1456 | /.$putCase consumeAssignmentOperator(EQUAL); $break ./ |
| 1457 | AssignmentOperator ::= '*=' |
| 1458 | /.$putCase consumeAssignmentOperator(MULTIPLY); $break ./ |
| 1459 | AssignmentOperator ::= '/=' |
| 1460 | /.$putCase consumeAssignmentOperator(DIVIDE); $break ./ |
| 1461 | AssignmentOperator ::= '%=' |
| 1462 | /.$putCase consumeAssignmentOperator(REMAINDER); $break ./ |
| 1463 | AssignmentOperator ::= '+=' |
| 1464 | /.$putCase consumeAssignmentOperator(PLUS); $break ./ |
| 1465 | AssignmentOperator ::= '-=' |
| 1466 | /.$putCase consumeAssignmentOperator(MINUS); $break ./ |
| 1467 | AssignmentOperator ::= '<<=' |
| 1468 | /.$putCase consumeAssignmentOperator(LEFT_SHIFT); $break ./ |
| 1469 | AssignmentOperator ::= '>>=' |
| 1470 | /.$putCase consumeAssignmentOperator(RIGHT_SHIFT); $break ./ |
| 1471 | AssignmentOperator ::= '>>>=' |
| 1472 | /.$putCase consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT); $break ./ |
| 1473 | AssignmentOperator ::= '&=' |
| 1474 | /.$putCase consumeAssignmentOperator(AND); $break ./ |
| 1475 | AssignmentOperator ::= '^=' |
| 1476 | /.$putCase consumeAssignmentOperator(XOR); $break ./ |
| 1477 | AssignmentOperator ::= '|=' |
| 1478 | /.$putCase consumeAssignmentOperator(OR); $break ./ |
| 1479 | /:$readableName AssignmentOperator:/ |
| 1480 | /:$recovery_template =:/ |
| 1481 | |
| 1482 | Expression -> AssignmentExpression |
| 1483 | /:$readableName Expression:/ |
| 1484 | /:$recovery_template Identifier:/ |
| 1485 | |
| 1486 | -- The following rules are for optional nonterminals. |
| 1487 | -- |
| 1488 | ClassHeaderExtendsopt ::= $empty |
| 1489 | ClassHeaderExtendsopt -> ClassHeaderExtends |
| 1490 | /:$readableName ClassHeaderExtends:/ |
| 1491 | |
| 1492 | Expressionopt ::= $empty |
| 1493 | /.$putCase consumeEmptyExpression(); $break ./ |
| 1494 | Expressionopt -> Expression |
| 1495 | /:$readableName Expression:/ |
| 1496 | |
| 1497 | ConstantExpression -> Expression |
| 1498 | /:$readableName ConstantExpression:/ |
| 1499 | |
| 1500 | --------------------------------------------------------------------------------------- |
| 1501 | -- |
| 1502 | -- The rules below are for optional terminal symbols. An optional comma, |
| 1503 | -- is only used in the context of an array initializer - It is a |
| 1504 | -- "syntactic sugar" that otherwise serves no other purpose. By contrast, |
| 1505 | -- an optional identifier is used in the definition of a break and |
| 1506 | -- continue statement. When the identifier does not appear, a NULL |
| 1507 | -- is produced. When the identifier is present, the user should use the |
| 1508 | -- corresponding TOKEN(i) method. See break statement as an example. |
| 1509 | -- |
| 1510 | --------------------------------------------------------------------------------------- |
| 1511 | |
| 1512 | ,opt -> $empty |
| 1513 | ,opt -> , |
| 1514 | /:$readableName ,:/ |
| 1515 | |
| 1516 | ClassBodyDeclarationsopt ::= $empty |
| 1517 | /.$putCase consumeEmptyClassBodyDeclarationsopt(); $break ./ |
| 1518 | ClassBodyDeclarationsopt ::= NestedType ClassBodyDeclarations |
| 1519 | /.$putCase consumeClassBodyDeclarationsopt(); $break ./ |
| 1520 | /:$readableName ClassBodyDeclarations:/ |
| 1521 | |
| 1522 | Modifiersopt ::= $empty |
| 1523 | /. $putCase consumeDefaultModifiers(); $break ./ |
| 1524 | Modifiersopt ::= Modifiers |
| 1525 | /.$putCase consumeModifiers(); $break ./ |
| 1526 | /:$readableName Modifiers:/ |
| 1527 | |
| 1528 | BlockStatementsopt ::= $empty |
| 1529 | /.$putCase consumeEmptyBlockStatementsopt(); $break ./ |
| 1530 | BlockStatementsopt -> BlockStatements |
| 1531 | /:$readableName BlockStatements:/ |
| 1532 | |
| 1533 | Dimsopt ::= $empty |
| 1534 | /. $putCase consumeEmptyDimsopt(); $break ./ |
| 1535 | Dimsopt -> Dims |
| 1536 | /:$readableName Dimensions:/ |
| 1537 | |
| 1538 | ArgumentListopt ::= $empty |
| 1539 | /. $putCase consumeEmptyArgumentListopt(); $break ./ |
| 1540 | ArgumentListopt -> ArgumentList |
| 1541 | /:$readableName ArgumentList:/ |
| 1542 | |
| 1543 | MethodHeaderThrowsClauseopt ::= $empty |
| 1544 | MethodHeaderThrowsClauseopt -> MethodHeaderThrowsClause |
| 1545 | /:$readableName MethodHeaderThrowsClause:/ |
| 1546 | |
| 1547 | FormalParameterListopt ::= $empty |
| 1548 | /.$putcase consumeFormalParameterListopt(); $break ./ |
| 1549 | FormalParameterListopt -> FormalParameterList |
| 1550 | /:$readableName FormalParameterList:/ |
| 1551 | |
| 1552 | ClassHeaderImplementsopt ::= $empty |
| 1553 | ClassHeaderImplementsopt -> ClassHeaderImplements |
| 1554 | /:$readableName ClassHeaderImplements:/ |
| 1555 | |
| 1556 | InterfaceMemberDeclarationsopt ::= $empty |
| 1557 | /. $putCase consumeEmptyInterfaceMemberDeclarationsopt(); $break ./ |
| 1558 | InterfaceMemberDeclarationsopt ::= NestedType InterfaceMemberDeclarations |
| 1559 | /. $putCase consumeInterfaceMemberDeclarationsopt(); $break ./ |
| 1560 | /:$readableName InterfaceMemberDeclarations:/ |
| 1561 | |
| 1562 | NestedType ::= $empty |
| 1563 | /.$putCase consumeNestedType(); $break./ |
| 1564 | /:$readableName NestedType:/ |
| 1565 | |
| 1566 | ForInitopt ::= $empty |
| 1567 | /. $putCase consumeEmptyForInitopt(); $break ./ |
| 1568 | ForInitopt -> ForInit |
| 1569 | /:$readableName ForInit:/ |
| 1570 | |
| 1571 | ForUpdateopt ::= $empty |
| 1572 | /. $putCase consumeEmptyForUpdateopt(); $break ./ |
| 1573 | ForUpdateopt -> ForUpdate |
| 1574 | /:$readableName ForUpdate:/ |
| 1575 | |
| 1576 | InterfaceHeaderExtendsopt ::= $empty |
| 1577 | InterfaceHeaderExtendsopt -> InterfaceHeaderExtends |
| 1578 | /:$readableName InterfaceHeaderExtends:/ |
| 1579 | |
| 1580 | Catchesopt ::= $empty |
| 1581 | /. $putCase consumeEmptyCatchesopt(); $break ./ |
| 1582 | Catchesopt -> Catches |
| 1583 | /:$readableName Catches:/ |
| 1584 | |
| 1585 | ----------------------------------------------- |
| 1586 | -- 1.5 features : enum type |
| 1587 | ----------------------------------------------- |
| 1588 | EnumDeclaration ::= EnumHeader EnumBody |
| 1589 | /. $putCase consumeEnumDeclaration(); $break ./ |
| 1590 | /:$readableName EnumDeclaration:/ |
| 1591 | |
| 1592 | EnumHeader ::= EnumHeaderName ClassHeaderImplementsopt |
| 1593 | /. $putCase consumeEnumHeader(); $break ./ |
| 1594 | /:$readableName EnumHeader:/ |
| 1595 | |
| 1596 | EnumHeaderName ::= Modifiersopt 'enum' Identifier |
| 1597 | /. $putCase consumeEnumHeaderName(); $break ./ |
| 1598 | /:$compliance 1.5:/ |
| 1599 | EnumHeaderName ::= Modifiersopt 'enum' Identifier TypeParameters |
| 1600 | /. $putCase consumeEnumHeaderNameWithTypeParameters(); $break ./ |
| 1601 | /:$readableName EnumHeaderName:/ |
| 1602 | /:$compliance 1.5:/ |
| 1603 | |
| 1604 | EnumBody ::= '{' EnumBodyDeclarationsopt '}' |
| 1605 | /. $putCase consumeEnumBodyNoConstants(); $break ./ |
| 1606 | EnumBody ::= '{' ',' EnumBodyDeclarationsopt '}' |
| 1607 | /. $putCase consumeEnumBodyNoConstants(); $break ./ |
| 1608 | EnumBody ::= '{' EnumConstants ',' EnumBodyDeclarationsopt '}' |
| 1609 | /. $putCase consumeEnumBodyWithConstants(); $break ./ |
| 1610 | EnumBody ::= '{' EnumConstants EnumBodyDeclarationsopt '}' |
| 1611 | /. $putCase consumeEnumBodyWithConstants(); $break ./ |
| 1612 | /:$readableName EnumBody:/ |
| 1613 | |
| 1614 | EnumConstants -> EnumConstant |
| 1615 | EnumConstants ::= EnumConstants ',' EnumConstant |
| 1616 | /.$putCase consumeEnumConstants(); $break ./ |
| 1617 | /:$readableName EnumConstants:/ |
| 1618 | |
| 1619 | EnumConstantHeaderName ::= Modifiersopt Identifier |
| 1620 | /.$putCase consumeEnumConstantHeaderName(); $break ./ |
| 1621 | /:$readableName EnumConstantHeaderName:/ |
| 1622 | |
| 1623 | EnumConstantHeader ::= EnumConstantHeaderName ForceNoDiet Argumentsopt RestoreDiet |
| 1624 | /.$putCase consumeEnumConstantHeader(); $break ./ |
| 1625 | /:$readableName EnumConstantHeader:/ |
| 1626 | |
| 1627 | EnumConstant ::= EnumConstantHeader ForceNoDiet ClassBody RestoreDiet |
| 1628 | /.$putCase consumeEnumConstantWithClassBody(); $break ./ |
| 1629 | EnumConstant ::= EnumConstantHeader |
| 1630 | /.$putCase consumeEnumConstantNoClassBody(); $break ./ |
| 1631 | /:$readableName EnumConstant:/ |
| 1632 | |
| 1633 | Arguments ::= '(' ArgumentListopt ')' |
| 1634 | /.$putCase consumeArguments(); $break ./ |
| 1635 | /:$readableName Arguments:/ |
| 1636 | |
| 1637 | Argumentsopt ::= $empty |
| 1638 | /.$putCase consumeEmptyArguments(); $break ./ |
| 1639 | Argumentsopt -> Arguments |
| 1640 | /:$readableName Argumentsopt:/ |
| 1641 | |
| 1642 | EnumDeclarations ::= ';' ClassBodyDeclarationsopt |
| 1643 | /.$putCase consumeEnumDeclarations(); $break ./ |
| 1644 | /:$readableName EnumDeclarations:/ |
| 1645 | |
| 1646 | EnumBodyDeclarationsopt ::= $empty |
| 1647 | /.$putCase consumeEmptyEnumDeclarations(); $break ./ |
| 1648 | EnumBodyDeclarationsopt -> EnumDeclarations |
| 1649 | /:$readableName EnumBodyDeclarationsopt:/ |
| 1650 | |
| 1651 | ----------------------------------------------- |
| 1652 | -- 1.5 features : enhanced for statement |
| 1653 | ----------------------------------------------- |
| 1654 | EnhancedForStatement ::= EnhancedForStatementHeader Statement |
| 1655 | /.$putCase consumeEnhancedForStatement(); $break ./ |
| 1656 | /:$readableName EnhancedForStatement:/ |
| 1657 | |
| 1658 | EnhancedForStatementNoShortIf ::= EnhancedForStatementHeader StatementNoShortIf |
| 1659 | /.$putCase consumeEnhancedForStatement(); $break ./ |
| 1660 | /:$readableName EnhancedForStatementNoShortIf:/ |
| 1661 | |
| 1662 | EnhancedForStatementHeaderInit ::= 'for' '(' Type PushModifiers Identifier Dimsopt |
| 1663 | /.$putCase consumeEnhancedForStatementHeaderInit(false); $break ./ |
| 1664 | /:$readableName EnhancedForStatementHeaderInit:/ |
| 1665 | |
| 1666 | EnhancedForStatementHeaderInit ::= 'for' '(' Modifiers Type PushRealModifiers Identifier Dimsopt |
| 1667 | /.$putCase consumeEnhancedForStatementHeaderInit(true); $break ./ |
| 1668 | /:$readableName EnhancedForStatementHeaderInit:/ |
| 1669 | |
| 1670 | EnhancedForStatementHeader ::= EnhancedForStatementHeaderInit ':' Expression ')' |
| 1671 | /.$putCase consumeEnhancedForStatementHeader(); $break ./ |
| 1672 | /:$readableName EnhancedForStatementHeader:/ |
| 1673 | /:$compliance 1.5:/ |
| 1674 | |
| 1675 | ----------------------------------------------- |
| 1676 | -- 1.5 features : static imports |
| 1677 | ----------------------------------------------- |
| 1678 | SingleStaticImportDeclaration ::= SingleStaticImportDeclarationName ';' |
| 1679 | /.$putCase consumeImportDeclaration(); $break ./ |
| 1680 | /:$readableName SingleStaticImportDeclaration:/ |
| 1681 | |
| 1682 | SingleStaticImportDeclarationName ::= 'import' 'static' Name |
| 1683 | /.$putCase consumeSingleStaticImportDeclarationName(); $break ./ |
| 1684 | /:$readableName SingleStaticImportDeclarationName:/ |
| 1685 | /:$compliance 1.5:/ |
| 1686 | |
| 1687 | StaticImportOnDemandDeclaration ::= StaticImportOnDemandDeclarationName ';' |
| 1688 | /.$putCase consumeImportDeclaration(); $break ./ |
| 1689 | /:$readableName StaticImportOnDemandDeclaration:/ |
| 1690 | |
| 1691 | StaticImportOnDemandDeclarationName ::= 'import' 'static' Name '.' '*' |
| 1692 | /.$putCase consumeStaticImportOnDemandDeclarationName(); $break ./ |
| 1693 | /:$readableName StaticImportOnDemandDeclarationName:/ |
| 1694 | /:$compliance 1.5:/ |
| 1695 | |
| 1696 | ----------------------------------------------- |
| 1697 | -- 1.5 features : generics |
| 1698 | ----------------------------------------------- |
| 1699 | TypeArguments ::= '<' TypeArgumentList1 |
| 1700 | /.$putCase consumeTypeArguments(); $break ./ |
| 1701 | /:$readableName TypeArguments:/ |
| 1702 | /:$compliance 1.5:/ |
| 1703 | |
| 1704 | OnlyTypeArguments ::= '<' TypeArgumentList1 |
| 1705 | /.$putCase consumeOnlyTypeArguments(); $break ./ |
| 1706 | /:$readableName TypeArguments:/ |
| 1707 | /:$compliance 1.5:/ |
| 1708 | |
| 1709 | TypeArgumentList1 -> TypeArgument1 |
| 1710 | /:$compliance 1.5:/ |
| 1711 | TypeArgumentList1 ::= TypeArgumentList ',' TypeArgument1 |
| 1712 | /.$putCase consumeTypeArgumentList1(); $break ./ |
| 1713 | /:$readableName TypeArgumentList1:/ |
| 1714 | /:$compliance 1.5:/ |
| 1715 | |
| 1716 | TypeArgumentList -> TypeArgument |
| 1717 | /:$compliance 1.5:/ |
| 1718 | TypeArgumentList ::= TypeArgumentList ',' TypeArgument |
| 1719 | /.$putCase consumeTypeArgumentList(); $break ./ |
| 1720 | /:$readableName TypeArgumentList:/ |
| 1721 | /:$compliance 1.5:/ |
| 1722 | |
| 1723 | TypeArgument ::= ReferenceType |
| 1724 | /.$putCase consumeTypeArgument(); $break ./ |
| 1725 | /:$compliance 1.5:/ |
| 1726 | TypeArgument -> Wildcard |
| 1727 | /:$readableName TypeArgument:/ |
| 1728 | /:$compliance 1.5:/ |
| 1729 | |
| 1730 | TypeArgument1 -> ReferenceType1 |
| 1731 | /:$compliance 1.5:/ |
| 1732 | TypeArgument1 -> Wildcard1 |
| 1733 | /:$readableName TypeArgument1:/ |
| 1734 | /:$compliance 1.5:/ |
| 1735 | |
| 1736 | ReferenceType1 ::= ReferenceType '>' |
| 1737 | /.$putCase consumeReferenceType1(); $break ./ |
| 1738 | /:$compliance 1.5:/ |
| 1739 | ReferenceType1 ::= ClassOrInterface '<' TypeArgumentList2 |
| 1740 | /.$putCase consumeTypeArgumentReferenceType1(); $break ./ |
| 1741 | /:$readableName ReferenceType1:/ |
| 1742 | /:$compliance 1.5:/ |
| 1743 | |
| 1744 | TypeArgumentList2 -> TypeArgument2 |
| 1745 | /:$compliance 1.5:/ |
| 1746 | TypeArgumentList2 ::= TypeArgumentList ',' TypeArgument2 |
| 1747 | /.$putCase consumeTypeArgumentList2(); $break ./ |
| 1748 | /:$readableName TypeArgumentList2:/ |
| 1749 | /:$compliance 1.5:/ |
| 1750 | |
| 1751 | TypeArgument2 -> ReferenceType2 |
| 1752 | /:$compliance 1.5:/ |
| 1753 | TypeArgument2 -> Wildcard2 |
| 1754 | /:$readableName TypeArgument2:/ |
| 1755 | /:$compliance 1.5:/ |
| 1756 | |
| 1757 | ReferenceType2 ::= ReferenceType '>>' |
| 1758 | /.$putCase consumeReferenceType2(); $break ./ |
| 1759 | /:$compliance 1.5:/ |
| 1760 | ReferenceType2 ::= ClassOrInterface '<' TypeArgumentList3 |
| 1761 | /.$putCase consumeTypeArgumentReferenceType2(); $break ./ |
| 1762 | /:$readableName ReferenceType2:/ |
| 1763 | /:$compliance 1.5:/ |
| 1764 | |
| 1765 | TypeArgumentList3 -> TypeArgument3 |
| 1766 | TypeArgumentList3 ::= TypeArgumentList ',' TypeArgument3 |
| 1767 | /.$putCase consumeTypeArgumentList3(); $break ./ |
| 1768 | /:$readableName TypeArgumentList3:/ |
| 1769 | /:$compliance 1.5:/ |
| 1770 | |
| 1771 | TypeArgument3 -> ReferenceType3 |
| 1772 | TypeArgument3 -> Wildcard3 |
| 1773 | /:$readableName TypeArgument3:/ |
| 1774 | /:$compliance 1.5:/ |
| 1775 | |
| 1776 | ReferenceType3 ::= ReferenceType '>>>' |
| 1777 | /.$putCase consumeReferenceType3(); $break ./ |
| 1778 | /:$readableName ReferenceType3:/ |
| 1779 | /:$compliance 1.5:/ |
| 1780 | |
| 1781 | Wildcard ::= '?' |
| 1782 | /.$putCase consumeWildcard(); $break ./ |
| 1783 | /:$compliance 1.5:/ |
| 1784 | Wildcard ::= '?' WildcardBounds |
| 1785 | /.$putCase consumeWildcardWithBounds(); $break ./ |
| 1786 | /:$readableName Wildcard:/ |
| 1787 | /:$compliance 1.5:/ |
| 1788 | |
| 1789 | WildcardBounds ::= 'extends' ReferenceType |
| 1790 | /.$putCase consumeWildcardBoundsExtends(); $break ./ |
| 1791 | /:$compliance 1.5:/ |
| 1792 | WildcardBounds ::= 'super' ReferenceType |
| 1793 | /.$putCase consumeWildcardBoundsSuper(); $break ./ |
| 1794 | /:$readableName WildcardBounds:/ |
| 1795 | /:$compliance 1.5:/ |
| 1796 | |
| 1797 | Wildcard1 ::= '?' '>' |
| 1798 | /.$putCase consumeWildcard1(); $break ./ |
| 1799 | /:$compliance 1.5:/ |
| 1800 | Wildcard1 ::= '?' WildcardBounds1 |
| 1801 | /.$putCase consumeWildcard1WithBounds(); $break ./ |
| 1802 | /:$readableName Wildcard1:/ |
| 1803 | /:$compliance 1.5:/ |
| 1804 | |
| 1805 | WildcardBounds1 ::= 'extends' ReferenceType1 |
| 1806 | /.$putCase consumeWildcardBounds1Extends(); $break ./ |
| 1807 | /:$compliance 1.5:/ |
| 1808 | WildcardBounds1 ::= 'super' ReferenceType1 |
| 1809 | /.$putCase consumeWildcardBounds1Super(); $break ./ |
| 1810 | /:$readableName WildcardBounds1:/ |
| 1811 | /:$compliance 1.5:/ |
| 1812 | |
| 1813 | Wildcard2 ::= '?' '>>' |
| 1814 | /.$putCase consumeWildcard2(); $break ./ |
| 1815 | /:$compliance 1.5:/ |
| 1816 | Wildcard2 ::= '?' WildcardBounds2 |
| 1817 | /.$putCase consumeWildcard2WithBounds(); $break ./ |
| 1818 | /:$readableName Wildcard2:/ |
| 1819 | /:$compliance 1.5:/ |
| 1820 | |
| 1821 | WildcardBounds2 ::= 'extends' ReferenceType2 |
| 1822 | /.$putCase consumeWildcardBounds2Extends(); $break ./ |
| 1823 | /:$compliance 1.5:/ |
| 1824 | WildcardBounds2 ::= 'super' ReferenceType2 |
| 1825 | /.$putCase consumeWildcardBounds2Super(); $break ./ |
| 1826 | /:$readableName WildcardBounds2:/ |
| 1827 | /:$compliance 1.5:/ |
| 1828 | |
| 1829 | Wildcard3 ::= '?' '>>>' |
| 1830 | /.$putCase consumeWildcard3(); $break ./ |
| 1831 | /:$compliance 1.5:/ |
| 1832 | Wildcard3 ::= '?' WildcardBounds3 |
| 1833 | /.$putCase consumeWildcard3WithBounds(); $break ./ |
| 1834 | /:$readableName Wildcard3:/ |
| 1835 | /:$compliance 1.5:/ |
| 1836 | |
| 1837 | WildcardBounds3 ::= 'extends' ReferenceType3 |
| 1838 | /.$putCase consumeWildcardBounds3Extends(); $break ./ |
| 1839 | /:$compliance 1.5:/ |
| 1840 | WildcardBounds3 ::= 'super' ReferenceType3 |
| 1841 | /.$putCase consumeWildcardBounds3Super(); $break ./ |
| 1842 | /:$readableName WildcardBound3:/ |
| 1843 | /:$compliance 1.5:/ |
| 1844 | |
| 1845 | TypeParameterHeader ::= Identifier |
| 1846 | /.$putCase consumeTypeParameterHeader(); $break ./ |
| 1847 | /:$readableName TypeParameter:/ |
| 1848 | /:$compliance 1.5:/ |
| 1849 | |
| 1850 | TypeParameters ::= '<' TypeParameterList1 |
| 1851 | /.$putCase consumeTypeParameters(); $break ./ |
| 1852 | /:$readableName TypeParameters:/ |
| 1853 | /:$compliance 1.5:/ |
| 1854 | |
| 1855 | TypeParameterList -> TypeParameter |
| 1856 | /:$compliance 1.5:/ |
| 1857 | TypeParameterList ::= TypeParameterList ',' TypeParameter |
| 1858 | /.$putCase consumeTypeParameterList(); $break ./ |
| 1859 | /:$readableName TypeParameterList:/ |
| 1860 | /:$compliance 1.5:/ |
| 1861 | |
| 1862 | TypeParameter -> TypeParameterHeader |
| 1863 | /:$compliance 1.5:/ |
| 1864 | TypeParameter ::= TypeParameterHeader 'extends' ReferenceType |
| 1865 | /.$putCase consumeTypeParameterWithExtends(); $break ./ |
| 1866 | /:$compliance 1.5:/ |
| 1867 | TypeParameter ::= TypeParameterHeader 'extends' ReferenceType AdditionalBoundList |
| 1868 | /.$putCase consumeTypeParameterWithExtendsAndBounds(); $break ./ |
| 1869 | /:$readableName TypeParameter:/ |
| 1870 | /:$compliance 1.5:/ |
| 1871 | |
| 1872 | AdditionalBoundList -> AdditionalBound |
| 1873 | /:$compliance 1.5:/ |
| 1874 | AdditionalBoundList ::= AdditionalBoundList AdditionalBound |
| 1875 | /.$putCase consumeAdditionalBoundList(); $break ./ |
| 1876 | /:$readableName AdditionalBoundList:/ |
| 1877 | |
| 1878 | AdditionalBound ::= '&' ReferenceType |
| 1879 | /.$putCase consumeAdditionalBound(); $break ./ |
| 1880 | /:$readableName AdditionalBound:/ |
| 1881 | /:$compliance 1.5:/ |
| 1882 | |
| 1883 | TypeParameterList1 -> TypeParameter1 |
| 1884 | /:$compliance 1.5:/ |
| 1885 | TypeParameterList1 ::= TypeParameterList ',' TypeParameter1 |
| 1886 | /.$putCase consumeTypeParameterList1(); $break ./ |
| 1887 | /:$readableName TypeParameterList1:/ |
| 1888 | /:$compliance 1.5:/ |
| 1889 | |
| 1890 | TypeParameter1 ::= TypeParameterHeader '>' |
| 1891 | /.$putCase consumeTypeParameter1(); $break ./ |
| 1892 | /:$compliance 1.5:/ |
| 1893 | TypeParameter1 ::= TypeParameterHeader 'extends' ReferenceType1 |
| 1894 | /.$putCase consumeTypeParameter1WithExtends(); $break ./ |
| 1895 | /:$compliance 1.5:/ |
| 1896 | TypeParameter1 ::= TypeParameterHeader 'extends' ReferenceType AdditionalBoundList1 |
| 1897 | /.$putCase consumeTypeParameter1WithExtendsAndBounds(); $break ./ |
| 1898 | /:$readableName TypeParameter1:/ |
| 1899 | /:$compliance 1.5:/ |
| 1900 | |
| 1901 | AdditionalBoundList1 -> AdditionalBound1 |
| 1902 | /:$compliance 1.5:/ |
| 1903 | AdditionalBoundList1 ::= AdditionalBoundList AdditionalBound1 |
| 1904 | /.$putCase consumeAdditionalBoundList1(); $break ./ |
| 1905 | /:$readableName AdditionalBoundList1:/ |
| 1906 | /:$compliance 1.5:/ |
| 1907 | |
| 1908 | AdditionalBound1 ::= '&' ReferenceType1 |
| 1909 | /.$putCase consumeAdditionalBound1(); $break ./ |
| 1910 | /:$readableName AdditionalBound1:/ |
| 1911 | /:$compliance 1.5:/ |
| 1912 | |
| 1913 | ------------------------------------------------- |
| 1914 | -- Duplicate rules to remove ambiguity for (x) -- |
| 1915 | ------------------------------------------------- |
| 1916 | PostfixExpression_NotName -> Primary |
| 1917 | PostfixExpression_NotName -> PostIncrementExpression |
| 1918 | PostfixExpression_NotName -> PostDecrementExpression |
| 1919 | /:$readableName Expression:/ |
| 1920 | |
| 1921 | UnaryExpression_NotName -> PreIncrementExpression |
| 1922 | UnaryExpression_NotName -> PreDecrementExpression |
| 1923 | UnaryExpression_NotName ::= '+' PushPosition UnaryExpression |
| 1924 | /.$putCase consumeUnaryExpression(OperatorIds.PLUS); $break ./ |
| 1925 | UnaryExpression_NotName ::= '-' PushPosition UnaryExpression |
| 1926 | /.$putCase consumeUnaryExpression(OperatorIds.MINUS); $break ./ |
| 1927 | UnaryExpression_NotName -> UnaryExpressionNotPlusMinus_NotName |
| 1928 | /:$readableName Expression:/ |
| 1929 | |
| 1930 | UnaryExpressionNotPlusMinus_NotName -> PostfixExpression_NotName |
| 1931 | UnaryExpressionNotPlusMinus_NotName ::= '~' PushPosition UnaryExpression |
| 1932 | /.$putCase consumeUnaryExpression(OperatorIds.TWIDDLE); $break ./ |
| 1933 | UnaryExpressionNotPlusMinus_NotName ::= '!' PushPosition UnaryExpression |
| 1934 | /.$putCase consumeUnaryExpression(OperatorIds.NOT); $break ./ |
| 1935 | UnaryExpressionNotPlusMinus_NotName -> CastExpression |
| 1936 | /:$readableName Expression:/ |
| 1937 | |
| 1938 | MultiplicativeExpression_NotName -> UnaryExpression_NotName |
| 1939 | MultiplicativeExpression_NotName ::= MultiplicativeExpression_NotName '*' UnaryExpression |
| 1940 | /.$putCase consumeBinaryExpression(OperatorIds.MULTIPLY); $break ./ |
| 1941 | MultiplicativeExpression_NotName ::= Name '*' UnaryExpression |
| 1942 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.MULTIPLY); $break ./ |
| 1943 | MultiplicativeExpression_NotName ::= MultiplicativeExpression_NotName '/' UnaryExpression |
| 1944 | /.$putCase consumeBinaryExpression(OperatorIds.DIVIDE); $break ./ |
| 1945 | MultiplicativeExpression_NotName ::= Name '/' UnaryExpression |
| 1946 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.DIVIDE); $break ./ |
| 1947 | MultiplicativeExpression_NotName ::= MultiplicativeExpression_NotName '%' UnaryExpression |
| 1948 | /.$putCase consumeBinaryExpression(OperatorIds.REMAINDER); $break ./ |
| 1949 | MultiplicativeExpression_NotName ::= Name '%' UnaryExpression |
| 1950 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.REMAINDER); $break ./ |
| 1951 | /:$readableName Expression:/ |
| 1952 | |
| 1953 | AdditiveExpression_NotName -> MultiplicativeExpression_NotName |
| 1954 | AdditiveExpression_NotName ::= AdditiveExpression_NotName '+' MultiplicativeExpression |
| 1955 | /.$putCase consumeBinaryExpression(OperatorIds.PLUS); $break ./ |
| 1956 | AdditiveExpression_NotName ::= Name '+' MultiplicativeExpression |
| 1957 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.PLUS); $break ./ |
| 1958 | AdditiveExpression_NotName ::= AdditiveExpression_NotName '-' MultiplicativeExpression |
| 1959 | /.$putCase consumeBinaryExpression(OperatorIds.MINUS); $break ./ |
| 1960 | AdditiveExpression_NotName ::= Name '-' MultiplicativeExpression |
| 1961 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.MINUS); $break ./ |
| 1962 | /:$readableName Expression:/ |
| 1963 | |
| 1964 | ShiftExpression_NotName -> AdditiveExpression_NotName |
| 1965 | ShiftExpression_NotName ::= ShiftExpression_NotName '<<' AdditiveExpression |
| 1966 | /.$putCase consumeBinaryExpression(OperatorIds.LEFT_SHIFT); $break ./ |
| 1967 | ShiftExpression_NotName ::= Name '<<' AdditiveExpression |
| 1968 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.LEFT_SHIFT); $break ./ |
| 1969 | ShiftExpression_NotName ::= ShiftExpression_NotName '>>' AdditiveExpression |
| 1970 | /.$putCase consumeBinaryExpression(OperatorIds.RIGHT_SHIFT); $break ./ |
| 1971 | ShiftExpression_NotName ::= Name '>>' AdditiveExpression |
| 1972 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.RIGHT_SHIFT); $break ./ |
| 1973 | ShiftExpression_NotName ::= ShiftExpression_NotName '>>>' AdditiveExpression |
| 1974 | /.$putCase consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT); $break ./ |
| 1975 | ShiftExpression_NotName ::= Name '>>>' AdditiveExpression |
| 1976 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.UNSIGNED_RIGHT_SHIFT); $break ./ |
| 1977 | /:$readableName Expression:/ |
| 1978 | |
| 1979 | RelationalExpression_NotName -> ShiftExpression_NotName |
| 1980 | RelationalExpression_NotName ::= ShiftExpression_NotName '<' ShiftExpression |
| 1981 | /.$putCase consumeBinaryExpression(OperatorIds.LESS); $break ./ |
| 1982 | RelationalExpression_NotName ::= Name '<' ShiftExpression |
| 1983 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.LESS); $break ./ |
| 1984 | RelationalExpression_NotName ::= ShiftExpression_NotName '>' ShiftExpression |
| 1985 | /.$putCase consumeBinaryExpression(OperatorIds.GREATER); $break ./ |
| 1986 | RelationalExpression_NotName ::= Name '>' ShiftExpression |
| 1987 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.GREATER); $break ./ |
| 1988 | RelationalExpression_NotName ::= RelationalExpression_NotName '<=' ShiftExpression |
| 1989 | /.$putCase consumeBinaryExpression(OperatorIds.LESS_EQUAL); $break ./ |
| 1990 | RelationalExpression_NotName ::= Name '<=' ShiftExpression |
| 1991 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.LESS_EQUAL); $break ./ |
| 1992 | RelationalExpression_NotName ::= RelationalExpression_NotName '>=' ShiftExpression |
| 1993 | /.$putCase consumeBinaryExpression(OperatorIds.GREATER_EQUAL); $break ./ |
| 1994 | RelationalExpression_NotName ::= Name '>=' ShiftExpression |
| 1995 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.GREATER_EQUAL); $break ./ |
| 1996 | /:$readableName Expression:/ |
| 1997 | |
| 1998 | InstanceofExpression_NotName -> RelationalExpression_NotName |
| 1999 | InstanceofExpression_NotName ::= Name 'instanceof' ReferenceType |
| 2000 | /.$putCase consumeInstanceOfExpressionWithName(); $break ./ |
| 2001 | InstanceofExpression_NotName ::= InstanceofExpression_NotName 'instanceof' ReferenceType |
| 2002 | /.$putCase consumeInstanceOfExpression(); $break ./ |
| 2003 | /:$readableName Expression:/ |
| 2004 | |
| 2005 | EqualityExpression_NotName -> InstanceofExpression_NotName |
| 2006 | EqualityExpression_NotName ::= EqualityExpression_NotName '==' InstanceofExpression |
| 2007 | /.$putCase consumeEqualityExpression(OperatorIds.EQUAL_EQUAL); $break ./ |
| 2008 | EqualityExpression_NotName ::= Name '==' InstanceofExpression |
| 2009 | /.$putCase consumeEqualityExpressionWithName(OperatorIds.EQUAL_EQUAL); $break ./ |
| 2010 | EqualityExpression_NotName ::= EqualityExpression_NotName '!=' InstanceofExpression |
| 2011 | /.$putCase consumeEqualityExpression(OperatorIds.NOT_EQUAL); $break ./ |
| 2012 | EqualityExpression_NotName ::= Name '!=' InstanceofExpression |
| 2013 | /.$putCase consumeEqualityExpressionWithName(OperatorIds.NOT_EQUAL); $break ./ |
| 2014 | /:$readableName Expression:/ |
| 2015 | |
| 2016 | AndExpression_NotName -> EqualityExpression_NotName |
| 2017 | AndExpression_NotName ::= AndExpression_NotName '&' EqualityExpression |
| 2018 | /.$putCase consumeBinaryExpression(OperatorIds.AND); $break ./ |
| 2019 | AndExpression_NotName ::= Name '&' EqualityExpression |
| 2020 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.AND); $break ./ |
| 2021 | /:$readableName Expression:/ |
| 2022 | |
| 2023 | ExclusiveOrExpression_NotName -> AndExpression_NotName |
| 2024 | ExclusiveOrExpression_NotName ::= ExclusiveOrExpression_NotName '^' AndExpression |
| 2025 | /.$putCase consumeBinaryExpression(OperatorIds.XOR); $break ./ |
| 2026 | ExclusiveOrExpression_NotName ::= Name '^' AndExpression |
| 2027 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.XOR); $break ./ |
| 2028 | /:$readableName Expression:/ |
| 2029 | |
| 2030 | InclusiveOrExpression_NotName -> ExclusiveOrExpression_NotName |
| 2031 | InclusiveOrExpression_NotName ::= InclusiveOrExpression_NotName '|' ExclusiveOrExpression |
| 2032 | /.$putCase consumeBinaryExpression(OperatorIds.OR); $break ./ |
| 2033 | InclusiveOrExpression_NotName ::= Name '|' ExclusiveOrExpression |
| 2034 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.OR); $break ./ |
| 2035 | /:$readableName Expression:/ |
| 2036 | |
| 2037 | ConditionalAndExpression_NotName -> InclusiveOrExpression_NotName |
| 2038 | ConditionalAndExpression_NotName ::= ConditionalAndExpression_NotName '&&' InclusiveOrExpression |
| 2039 | /.$putCase consumeBinaryExpression(OperatorIds.AND_AND); $break ./ |
| 2040 | ConditionalAndExpression_NotName ::= Name '&&' InclusiveOrExpression |
| 2041 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.AND_AND); $break ./ |
| 2042 | /:$readableName Expression:/ |
| 2043 | |
| 2044 | ConditionalOrExpression_NotName -> ConditionalAndExpression_NotName |
| 2045 | ConditionalOrExpression_NotName ::= ConditionalOrExpression_NotName '||' ConditionalAndExpression |
| 2046 | /.$putCase consumeBinaryExpression(OperatorIds.OR_OR); $break ./ |
| 2047 | ConditionalOrExpression_NotName ::= Name '||' ConditionalAndExpression |
| 2048 | /.$putCase consumeBinaryExpressionWithName(OperatorIds.OR_OR); $break ./ |
| 2049 | /:$readableName Expression:/ |
| 2050 | |
| 2051 | ConditionalExpression_NotName -> ConditionalOrExpression_NotName |
| 2052 | ConditionalExpression_NotName ::= ConditionalOrExpression_NotName '?' Expression ':' ConditionalExpression |
| 2053 | /.$putCase consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ; $break ./ |
| 2054 | ConditionalExpression_NotName ::= Name '?' Expression ':' ConditionalExpression |
| 2055 | /.$putCase consumeConditionalExpressionWithName(OperatorIds.QUESTIONCOLON) ; $break ./ |
| 2056 | /:$readableName Expression:/ |
| 2057 | |
| 2058 | AssignmentExpression_NotName -> ConditionalExpression_NotName |
| 2059 | AssignmentExpression_NotName -> Assignment |
| 2060 | /:$readableName Expression:/ |
| 2061 | |
| 2062 | Expression_NotName -> AssignmentExpression_NotName |
| 2063 | /:$readableName Expression:/ |
| 2064 | ----------------------------------------------- |
| 2065 | -- 1.5 features : end of generics |
| 2066 | ----------------------------------------------- |
| 2067 | ----------------------------------------------- |
| 2068 | -- 1.5 features : annotation - Metadata feature jsr175 |
| 2069 | ----------------------------------------------- |
| 2070 | AnnotationTypeDeclarationHeaderName ::= Modifiers '@' PushRealModifiers interface Identifier |
| 2071 | /.$putCase consumeAnnotationTypeDeclarationHeaderName() ; $break ./ |
| 2072 | /:$compliance 1.5:/ |
| 2073 | AnnotationTypeDeclarationHeaderName ::= Modifiers '@' PushRealModifiers interface Identifier TypeParameters |
| 2074 | /.$putCase consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ; $break ./ |
| 2075 | /:$compliance 1.5:/ |
| 2076 | AnnotationTypeDeclarationHeaderName ::= '@' PushModifiersForHeader interface Identifier TypeParameters |
| 2077 | /.$putCase consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ; $break ./ |
| 2078 | /:$compliance 1.5:/ |
| 2079 | AnnotationTypeDeclarationHeaderName ::= '@' PushModifiersForHeader interface Identifier |
| 2080 | /.$putCase consumeAnnotationTypeDeclarationHeaderName() ; $break ./ |
| 2081 | /:$readableName AnnotationTypeDeclarationHeaderName:/ |
| 2082 | /:$compliance 1.5:/ |
| 2083 | |
| 2084 | AnnotationTypeDeclarationHeader ::= AnnotationTypeDeclarationHeaderName ClassHeaderExtendsopt ClassHeaderImplementsopt |
| 2085 | /.$putCase consumeAnnotationTypeDeclarationHeader() ; $break ./ |
| 2086 | /:$readableName AnnotationTypeDeclarationHeader:/ |
| 2087 | /:$compliance 1.5:/ |
| 2088 | |
| 2089 | AnnotationTypeDeclaration ::= AnnotationTypeDeclarationHeader AnnotationTypeBody |
| 2090 | /.$putCase consumeAnnotationTypeDeclaration() ; $break ./ |
| 2091 | /:$readableName AnnotationTypeDeclaration:/ |
| 2092 | /:$compliance 1.5:/ |
| 2093 | |
| 2094 | AnnotationTypeBody ::= '{' AnnotationTypeMemberDeclarationsopt '}' |
| 2095 | /:$readableName AnnotationTypeBody:/ |
| 2096 | /:$compliance 1.5:/ |
| 2097 | |
| 2098 | AnnotationTypeMemberDeclarationsopt ::= $empty |
| 2099 | /.$putCase consumeEmptyAnnotationTypeMemberDeclarationsopt() ; $break ./ |
| 2100 | /:$compliance 1.5:/ |
| 2101 | AnnotationTypeMemberDeclarationsopt ::= NestedType AnnotationTypeMemberDeclarations |
| 2102 | /.$putCase consumeAnnotationTypeMemberDeclarationsopt() ; $break ./ |
| 2103 | /:$readableName AnnotationTypeMemberDeclarations:/ |
| 2104 | /:$compliance 1.5:/ |
| 2105 | |
| 2106 | AnnotationTypeMemberDeclarations -> AnnotationTypeMemberDeclaration |
| 2107 | /:$compliance 1.5:/ |
| 2108 | AnnotationTypeMemberDeclarations ::= AnnotationTypeMemberDeclarations AnnotationTypeMemberDeclaration |
| 2109 | /.$putCase consumeAnnotationTypeMemberDeclarations() ; $break ./ |
| 2110 | /:$readableName AnnotationTypeMemberDeclarations:/ |
| 2111 | /:$compliance 1.5:/ |
| 2112 | |
| 2113 | AnnotationMethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '(' |
| 2114 | /.$putCase consumeMethodHeaderNameWithTypeParameters(true); $break ./ |
| 2115 | AnnotationMethodHeaderName ::= Modifiersopt Type 'Identifier' '(' |
| 2116 | /.$putCase consumeMethodHeaderName(true); $break ./ |
| 2117 | /:$readableName MethodHeaderName:/ |
| 2118 | /:$compliance 1.5:/ |
| 2119 | |
| 2120 | AnnotationMethodHeaderDefaultValueopt ::= $empty |
| 2121 | /.$putCase consumeEmptyMethodHeaderDefaultValue() ; $break ./ |
| 2122 | /:$readableName MethodHeaderDefaultValue:/ |
| 2123 | /:$compliance 1.5:/ |
| 2124 | AnnotationMethodHeaderDefaultValueopt ::= DefaultValue |
| 2125 | /.$putCase consumeMethodHeaderDefaultValue(); $break ./ |
| 2126 | /:$readableName MethodHeaderDefaultValue:/ |
| 2127 | /:$compliance 1.5:/ |
| 2128 | |
| 2129 | AnnotationMethodHeader ::= AnnotationMethodHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderExtendedDims AnnotationMethodHeaderDefaultValueopt |
| 2130 | /.$putCase consumeMethodHeader(); $break ./ |
| 2131 | /:$readableName AnnotationMethodHeader:/ |
| 2132 | /:$compliance 1.5:/ |
| 2133 | |
| 2134 | AnnotationTypeMemberDeclaration ::= AnnotationMethodHeader ';' |
| 2135 | /.$putCase consumeAnnotationTypeMemberDeclaration() ; $break ./ |
| 2136 | /:$compliance 1.5:/ |
| 2137 | AnnotationTypeMemberDeclaration -> ConstantDeclaration |
| 2138 | /:$compliance 1.5:/ |
| 2139 | AnnotationTypeMemberDeclaration -> ConstructorDeclaration |
| 2140 | /:$compliance 1.5:/ |
| 2141 | AnnotationTypeMemberDeclaration -> TypeDeclaration |
| 2142 | /:$readableName AnnotationTypeMemberDeclaration:/ |
| 2143 | /:$compliance 1.5:/ |
| 2144 | |
| 2145 | DefaultValue ::= 'default' MemberValue |
| 2146 | /:$readableName DefaultValue:/ |
| 2147 | /:$compliance 1.5:/ |
| 2148 | |
| 2149 | Annotation -> NormalAnnotation |
| 2150 | /:$compliance 1.5:/ |
| 2151 | Annotation -> MarkerAnnotation |
| 2152 | /:$compliance 1.5:/ |
| 2153 | Annotation -> SingleMemberAnnotation |
| 2154 | /:$readableName Annotation:/ |
| 2155 | /:$compliance 1.5:/ |
| 2156 | |
| 2157 | AnnotationName ::= '@' Name |
| 2158 | /.$putCase consumeAnnotationName() ; $break ./ |
| 2159 | /:$readableName AnnotationName:/ |
| 2160 | /:$compliance 1.5:/ |
| 2161 | |
| 2162 | NormalAnnotation ::= AnnotationName '(' MemberValuePairsopt ')' |
| 2163 | /.$putCase consumeNormalAnnotation() ; $break ./ |
| 2164 | /:$readableName NormalAnnotation:/ |
| 2165 | /:$compliance 1.5:/ |
| 2166 | |
| 2167 | MemberValuePairsopt ::= $empty |
| 2168 | /.$putCase consumeEmptyMemberValuePairsopt() ; $break ./ |
| 2169 | /:$compliance 1.5:/ |
| 2170 | MemberValuePairsopt -> MemberValuePairs |
| 2171 | /:$readableName MemberValuePairsopt:/ |
| 2172 | /:$compliance 1.5:/ |
| 2173 | |
| 2174 | MemberValuePairs -> MemberValuePair |
| 2175 | /:$compliance 1.5:/ |
| 2176 | MemberValuePairs ::= MemberValuePairs ',' MemberValuePair |
| 2177 | /.$putCase consumeMemberValuePairs() ; $break ./ |
| 2178 | /:$readableName MemberValuePairs:/ |
| 2179 | /:$compliance 1.5:/ |
| 2180 | |
| 2181 | MemberValuePair ::= SimpleName '=' EnterMemberValue MemberValue ExitMemberValue |
| 2182 | /.$putCase consumeMemberValuePair() ; $break ./ |
| 2183 | /:$readableName MemberValuePair:/ |
| 2184 | /:$compliance 1.5:/ |
| 2185 | |
| 2186 | EnterMemberValue ::= $empty |
| 2187 | /.$putCase consumeEnterMemberValue() ; $break ./ |
| 2188 | /:$readableName EnterMemberValue:/ |
| 2189 | /:$compliance 1.5:/ |
| 2190 | |
| 2191 | ExitMemberValue ::= $empty |
| 2192 | /.$putCase consumeExitMemberValue() ; $break ./ |
| 2193 | /:$readableName ExitMemberValue:/ |
| 2194 | /:$compliance 1.5:/ |
| 2195 | |
| 2196 | MemberValue -> ConditionalExpression_NotName |
| 2197 | /:$compliance 1.5:/ |
| 2198 | MemberValue ::= Name |
| 2199 | /.$putCase consumeMemberValueAsName() ; $break ./ |
| 2200 | /:$compliance 1.5:/ |
| 2201 | MemberValue -> Annotation |
| 2202 | /:$compliance 1.5:/ |
| 2203 | MemberValue -> MemberValueArrayInitializer |
| 2204 | /:$readableName MemberValue:/ |
| 2205 | /:$recovery_template Identifier:/ |
| 2206 | /:$compliance 1.5:/ |
| 2207 | |
| 2208 | MemberValueArrayInitializer ::= EnterMemberValueArrayInitializer '{' PushLeftBrace MemberValues ',' '}' |
| 2209 | /.$putCase consumeMemberValueArrayInitializer() ; $break ./ |
| 2210 | /:$compliance 1.5:/ |
| 2211 | MemberValueArrayInitializer ::= EnterMemberValueArrayInitializer '{' PushLeftBrace MemberValues '}' |
| 2212 | /.$putCase consumeMemberValueArrayInitializer() ; $break ./ |
| 2213 | /:$compliance 1.5:/ |
| 2214 | MemberValueArrayInitializer ::= EnterMemberValueArrayInitializer '{' PushLeftBrace ',' '}' |
| 2215 | /.$putCase consumeEmptyMemberValueArrayInitializer() ; $break ./ |
| 2216 | /:$compliance 1.5:/ |
| 2217 | MemberValueArrayInitializer ::= EnterMemberValueArrayInitializer '{' PushLeftBrace '}' |
| 2218 | /.$putCase consumeEmptyMemberValueArrayInitializer() ; $break ./ |
| 2219 | /:$readableName MemberValueArrayInitializer:/ |
| 2220 | /:$compliance 1.5:/ |
| 2221 | |
| 2222 | EnterMemberValueArrayInitializer ::= $empty |
| 2223 | /.$putCase consumeEnterMemberValueArrayInitializer() ; $break ./ |
| 2224 | /:$readableName EnterMemberValueArrayInitializer:/ |
| 2225 | /:$compliance 1.5:/ |
| 2226 | |
| 2227 | MemberValues -> MemberValue |
| 2228 | /:$compliance 1.5:/ |
| 2229 | MemberValues ::= MemberValues ',' MemberValue |
| 2230 | /.$putCase consumeMemberValues() ; $break ./ |
| 2231 | /:$readableName MemberValues:/ |
| 2232 | /:$compliance 1.5:/ |
| 2233 | |
| 2234 | MarkerAnnotation ::= AnnotationName |
| 2235 | /.$putCase consumeMarkerAnnotation() ; $break ./ |
| 2236 | /:$readableName MarkerAnnotation:/ |
| 2237 | /:$compliance 1.5:/ |
| 2238 | |
| 2239 | SingleMemberAnnotationMemberValue ::= MemberValue |
| 2240 | /.$putCase consumeSingleMemberAnnotationMemberValue() ; $break ./ |
| 2241 | /:$readableName MemberValue:/ |
| 2242 | /:$compliance 1.5:/ |
| 2243 | |
| 2244 | SingleMemberAnnotation ::= AnnotationName '(' SingleMemberAnnotationMemberValue ')' |
| 2245 | /.$putCase consumeSingleMemberAnnotation() ; $break ./ |
| 2246 | /:$readableName SingleMemberAnnotation:/ |
| 2247 | /:$compliance 1.5:/ |
| 2248 | -------------------------------------- |
| 2249 | -- 1.5 features : end of annotation -- |
| 2250 | -------------------------------------- |
| 2251 | |
| 2252 | ----------------------------------- |
| 2253 | -- 1.5 features : recovery rules -- |
| 2254 | ----------------------------------- |
| 2255 | RecoveryMethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '(' |
| 2256 | /.$putCase consumeRecoveryMethodHeaderNameWithTypeParameters(); $break ./ |
| 2257 | /:$compliance 1.5:/ |
| 2258 | RecoveryMethodHeaderName ::= Modifiersopt Type 'Identifier' '(' |
| 2259 | /.$putCase consumeRecoveryMethodHeaderName(); $break ./ |
| 2260 | /:$readableName MethodHeaderName:/ |
| 2261 | |
| 2262 | RecoveryMethodHeader ::= RecoveryMethodHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderExtendedDims AnnotationMethodHeaderDefaultValueopt |
| 2263 | /.$putCase consumeMethodHeader(); $break ./ |
| 2264 | RecoveryMethodHeader ::= RecoveryMethodHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderExtendedDims MethodHeaderThrowsClause |
| 2265 | /.$putCase consumeMethodHeader(); $break ./ |
| 2266 | /:$readableName MethodHeader:/ |
| 2267 | ----------------------------------- |
| 2268 | -- 1.5 features : recovery rules -- |
| 2269 | ----------------------------------- |
| 2270 | |
| 2271 | /. } |
| 2272 | }./ |
| 2273 | |
| 2274 | $names |
| 2275 | |
| 2276 | PLUS_PLUS ::= '++' |
| 2277 | MINUS_MINUS ::= '--' |
| 2278 | EQUAL_EQUAL ::= '==' |
| 2279 | LESS_EQUAL ::= '<=' |
| 2280 | GREATER_EQUAL ::= '>=' |
| 2281 | NOT_EQUAL ::= '!=' |
| 2282 | LEFT_SHIFT ::= '<<' |
| 2283 | RIGHT_SHIFT ::= '>>' |
| 2284 | UNSIGNED_RIGHT_SHIFT ::= '>>>' |
| 2285 | PLUS_EQUAL ::= '+=' |
| 2286 | MINUS_EQUAL ::= '-=' |
| 2287 | MULTIPLY_EQUAL ::= '*=' |
| 2288 | DIVIDE_EQUAL ::= '/=' |
| 2289 | AND_EQUAL ::= '&=' |
| 2290 | OR_EQUAL ::= '|=' |
| 2291 | XOR_EQUAL ::= '^=' |
| 2292 | REMAINDER_EQUAL ::= '%=' |
| 2293 | LEFT_SHIFT_EQUAL ::= '<<=' |
| 2294 | RIGHT_SHIFT_EQUAL ::= '>>=' |
| 2295 | UNSIGNED_RIGHT_SHIFT_EQUAL ::= '>>>=' |
| 2296 | OR_OR ::= '||' |
| 2297 | AND_AND ::= '&&' |
| 2298 | PLUS ::= '+' |
| 2299 | MINUS ::= '-' |
| 2300 | NOT ::= '!' |
| 2301 | REMAINDER ::= '%' |
| 2302 | XOR ::= '^' |
| 2303 | AND ::= '&' |
| 2304 | MULTIPLY ::= '*' |
| 2305 | OR ::= '|' |
| 2306 | TWIDDLE ::= '~' |
| 2307 | DIVIDE ::= '/' |
| 2308 | GREATER ::= '>' |
| 2309 | LESS ::= '<' |
| 2310 | LPAREN ::= '(' |
| 2311 | RPAREN ::= ')' |
| 2312 | LBRACE ::= '{' |
| 2313 | RBRACE ::= '}' |
| 2314 | LBRACKET ::= '[' |
| 2315 | RBRACKET ::= ']' |
| 2316 | SEMICOLON ::= ';' |
| 2317 | QUESTION ::= '?' |
| 2318 | COLON ::= ':' |
| 2319 | COMMA ::= ',' |
| 2320 | DOT ::= '.' |
| 2321 | EQUAL ::= '=' |
| 2322 | AT ::= '@' |
| 2323 | ELLIPSIS ::= '...' |
| 2324 | |
| 2325 | $end |
| 2326 | -- need a carriage return after the $end |