Advertisement
Guest User

Java.g4

a guest
Aug 28th, 2013
427
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 81.19 KB | None | 0 0
  1. grammar Java;
  2. @parser::members {String ruleName; }
  3.  
  4. start : compilationUnitSuf EOF;
  5.  
  6. compilationUnit
  7. : packageDeclaration? importDeclaration* typeDeclaration*
  8. ;
  9.  
  10. packageDeclaration
  11. : annotation* 'package' qualifiedName ';'
  12. ;
  13.  
  14. importDeclaration
  15. : 'import' 'static'? qualifiedName ('.' '*')? ';'
  16. ;
  17.  
  18. typeDeclaration
  19. : classOrInterfaceModifier* classDeclaration
  20. | classOrInterfaceModifier* enumDeclaration
  21. | classOrInterfaceModifier* interfaceDeclaration
  22. | classOrInterfaceModifier* annotationTypeDeclaration
  23. | ';'
  24. ;
  25.  
  26. modifier
  27. : classOrInterfaceModifier
  28. | ('native' | 'synchronized' | 'transient' | 'volatile')
  29. ;
  30.  
  31. classOrInterfaceModifier
  32. : annotation
  33. | ('public' | 'protected' | 'private' | 'static' | 'abstract' | 'final' | 'strictfp')
  34. ;
  35.  
  36. variableModifier
  37. : 'final'
  38. | annotation
  39. ;
  40.  
  41. classDeclaration
  42. : 'class' Identifier typeParameters? ('extends' type)? ('implements' typeList)? classBody
  43. ;
  44.  
  45. typeParameters
  46. : '<' typeParameter (',' typeParameter)* '>'
  47. ;
  48.  
  49. typeParameter
  50. : Identifier ('extends' typeBound)?
  51. ;
  52.  
  53. typeBound
  54. : type ('&' type)*
  55. ;
  56.  
  57. enumDeclaration
  58. : ENUM Identifier ('implements' typeList)? '{' enumConstants? ','? enumBodyDeclarations? '}'
  59. ;
  60.  
  61. enumConstants
  62. : enumConstant (',' enumConstant)*
  63. ;
  64.  
  65. enumConstant
  66. : annotation* Identifier arguments? classBody?
  67. ;
  68.  
  69. enumBodyDeclarations
  70. : ';' classBodyDeclaration*
  71. ;
  72.  
  73. interfaceDeclaration
  74. : 'interface' Identifier typeParameters? ('extends' typeList)? interfaceBody
  75. ;
  76.  
  77. typeList
  78. : type (',' type)*
  79. ;
  80.  
  81. classBody
  82. : '{' classBodyDeclaration* '}'
  83. ;
  84.  
  85. interfaceBody
  86. : '{' interfaceBodyDeclaration* '}'
  87. ;
  88.  
  89. classBodyDeclaration
  90. : ';'
  91. | 'static'? block
  92. | modifier* memberDeclaration
  93. ;
  94.  
  95. memberDeclaration
  96. : methodDeclaration
  97. | genericMethodDeclaration
  98. | fieldDeclaration
  99. | constructorDeclaration
  100. | genericConstructorDeclaration
  101. | interfaceDeclaration
  102. | annotationTypeDeclaration
  103. | classDeclaration
  104. | enumDeclaration
  105. ;
  106.  
  107. methodDeclaration
  108. : type Identifier formalParameters ('[' ']')* ('throws' qualifiedNameList)? (methodBody | ';')
  109. | 'void' Identifier formalParameters ('[' ']')* ('throws' qualifiedNameList)? (methodBody | ';')
  110. ;
  111.  
  112. genericMethodDeclaration
  113. : typeParameters methodDeclaration
  114. ;
  115.  
  116. constructorDeclaration
  117. : Identifier formalParameters ('throws' qualifiedNameList)? constructorBody
  118. ;
  119.  
  120. genericConstructorDeclaration
  121. : typeParameters constructorDeclaration
  122. ;
  123.  
  124. fieldDeclaration
  125. : type variableDeclarators ';'
  126. ;
  127.  
  128. interfaceBodyDeclaration
  129. : modifier* interfaceMemberDeclaration
  130. | ';'
  131. ;
  132.  
  133. interfaceMemberDeclaration
  134. : constDeclaration
  135. | interfaceMethodDeclaration
  136. | genericInterfaceMethodDeclaration
  137. | interfaceDeclaration
  138. | annotationTypeDeclaration
  139. | classDeclaration
  140. | enumDeclaration
  141. ;
  142.  
  143. constDeclaration
  144. : type constantDeclarator (',' constantDeclarator)* ';'
  145. ;
  146.  
  147. constantDeclarator
  148. : Identifier ('[' ']')* '=' variableInitializer
  149. ;
  150.  
  151. interfaceMethodDeclaration
  152. : type Identifier formalParameters ('[' ']')* ('throws' qualifiedNameList)? ';'
  153. | 'void' Identifier formalParameters ('[' ']')* ('throws' qualifiedNameList)? ';'
  154. ;
  155.  
  156. genericInterfaceMethodDeclaration
  157. : typeParameters interfaceMethodDeclaration
  158. ;
  159.  
  160. variableDeclarators
  161. : variableDeclarator (',' variableDeclarator)*
  162. ;
  163.  
  164. variableDeclarator
  165. : variableDeclaratorId ('=' variableInitializer)?
  166. ;
  167.  
  168. variableDeclaratorId
  169. : Identifier ('[' ']')*
  170. ;
  171.  
  172. variableInitializer
  173. : arrayInitializer
  174. | expression
  175. ;
  176.  
  177. arrayInitializer
  178. : '{' (variableInitializer (',' variableInitializer)* (',')?)? '}'
  179. ;
  180.  
  181. packageOrTypeName
  182. : qualifiedName
  183. ;
  184.  
  185. enumConstantName
  186. : Identifier
  187. ;
  188.  
  189. typeName
  190. : qualifiedName
  191. ;
  192.  
  193. type
  194. : classOrInterfaceType ('[' ']')*
  195. | primitiveType ('[' ']')*
  196. ;
  197.  
  198. classOrInterfaceType
  199. : Identifier typeArguments? ('.' Identifier typeArguments?)*
  200. ;
  201.  
  202. primitiveType
  203. : 'boolean'
  204. | 'char'
  205. | 'byte'
  206. | 'short'
  207. | 'int'
  208. | 'long'
  209. | 'float'
  210. | 'double'
  211. ;
  212.  
  213. typeArguments
  214. : '<' typeArgument (',' typeArgument)* '>'
  215. ;
  216.  
  217. typeArgument
  218. : type
  219. | '?' (('extends' | 'super') type)?
  220. ;
  221.  
  222. qualifiedNameList
  223. : qualifiedName (',' qualifiedName)*
  224. ;
  225.  
  226. formalParameters
  227. : '(' formalParameterList? ')'
  228. ;
  229.  
  230. formalParameterList
  231. : formalParameter (',' formalParameter)* (',' lastFormalParameter)?
  232. | lastFormalParameter
  233. ;
  234.  
  235. formalParameter
  236. : variableModifier* type variableDeclaratorId
  237. ;
  238.  
  239. lastFormalParameter
  240. : variableModifier* type '...' variableDeclaratorId
  241. ;
  242.  
  243. methodBody
  244. : block
  245. ;
  246.  
  247. constructorBody
  248. : block
  249. ;
  250.  
  251. qualifiedName
  252. : Identifier ('.' Identifier)*
  253. ;
  254.  
  255. literal
  256. : IntegerLiteral
  257. | FloatingPointLiteral
  258. | CharacterLiteral
  259. | StringLiteral
  260. | BooleanLiteral
  261. | 'null'
  262. ;
  263.  
  264. annotation
  265. : '@' annotationName ('(' (elementValuePairs | elementValue)? ')')?
  266. ;
  267.  
  268. annotationName
  269. : qualifiedName
  270. ;
  271.  
  272. elementValuePairs
  273. : elementValuePair (',' elementValuePair)*
  274. ;
  275.  
  276. elementValuePair
  277. : Identifier '=' elementValue
  278. ;
  279.  
  280. elementValue
  281. : expression
  282. | annotation
  283. | elementValueArrayInitializer
  284. ;
  285.  
  286. elementValueArrayInitializer
  287. : '{' (elementValue (',' elementValue)*)? (',')? '}'
  288. ;
  289.  
  290. annotationTypeDeclaration
  291. : '@' 'interface' Identifier annotationTypeBody
  292. ;
  293.  
  294. annotationTypeBody
  295. : '{' (annotationTypeElementDeclaration)* '}'
  296. ;
  297.  
  298. annotationTypeElementDeclaration
  299. : modifier* annotationTypeElementRest
  300. | ';'
  301. ;
  302.  
  303. annotationTypeElementRest
  304. : type annotationMethodOrConstantRest ';'
  305. | classDeclaration ';'?
  306. | interfaceDeclaration ';'?
  307. | enumDeclaration ';'?
  308. | annotationTypeDeclaration ';'?
  309. ;
  310.  
  311. annotationMethodOrConstantRest
  312. : annotationMethodRest
  313. | annotationConstantRest
  314. ;
  315.  
  316. annotationMethodRest
  317. : Identifier '(' ')' defaultValue?
  318. ;
  319.  
  320. annotationConstantRest
  321. : variableDeclarators
  322. ;
  323.  
  324. defaultValue
  325. : 'default' elementValue
  326. ;
  327.  
  328. block
  329. : '{' blockStatement* '}'
  330. ;
  331.  
  332. blockStatement
  333. : localVariableDeclarationStatement
  334. | statement
  335. | typeDeclaration
  336. ;
  337.  
  338. localVariableDeclarationStatement
  339. : localVariableDeclaration ';'
  340. ;
  341.  
  342. localVariableDeclaration
  343. : variableModifier* type variableDeclarators
  344. ;
  345.  
  346. statement
  347. : block
  348. | ASSERT expression (':' expression)? ';'
  349. | 'if' parExpression statement ('else' statement)?
  350. | 'for' '(' forControl ')' statement
  351. | 'while' parExpression statement
  352. | 'do' statement 'while' parExpression ';'
  353. | 'try' block (catchClause+ finallyBlock? | finallyBlock)
  354. | 'try' resourceSpecification block catchClause* finallyBlock?
  355. | 'switch' parExpression '{' switchBlockStatementGroup* switchLabel* '}'
  356. | 'synchronized' parExpression block
  357. | 'return' expression? ';'
  358. | 'throw' expression ';'
  359. | 'break' Identifier? ';'
  360. | 'continue' Identifier? ';'
  361. | ';'
  362. | statementExpression ';'
  363. | Identifier ':' statement
  364. ;
  365.  
  366. catchClause
  367. : 'catch' '(' variableModifier* catchType Identifier ')' block
  368. ;
  369.  
  370. catchType
  371. : qualifiedName ('|' qualifiedName)*
  372. ;
  373.  
  374. finallyBlock
  375. : 'finally' block
  376. ;
  377.  
  378. resourceSpecification
  379. : '(' resources ';'? ')'
  380. ;
  381.  
  382. resources
  383. : resource (';' resource)*
  384. ;
  385.  
  386. resource
  387. : variableModifier* classOrInterfaceType variableDeclaratorId '=' expression
  388. ;
  389.  
  390. switchBlockStatementGroup
  391. : switchLabel+ blockStatement+
  392. ;
  393.  
  394. switchLabel
  395. : 'case' constantExpression ':'
  396. | 'case' enumConstantName ':'
  397. | 'default' ':'
  398. ;
  399.  
  400. forControl
  401. : enhancedForControl
  402. | forInit? ';' expression? ';' forUpdate?
  403. ;
  404.  
  405. forInit
  406. : localVariableDeclaration
  407. | expressionList
  408. ;
  409.  
  410. enhancedForControl
  411. : variableModifier* type Identifier ':' expression
  412. ;
  413.  
  414. forUpdate
  415. : expressionList
  416. ;
  417.  
  418. parExpression
  419. : '(' expression ')'
  420. ;
  421.  
  422. expressionList
  423. : expression (',' expression)*
  424. ;
  425.  
  426. statementExpression
  427. : expression
  428. ;
  429.  
  430. constantExpression
  431. : expression
  432. ;
  433.  
  434. expression
  435. : primary
  436. | expression '.' Identifier
  437. | expression '.' 'this'
  438. | expression '.' 'new' nonWildcardTypeArguments? innerCreator
  439. | expression '.' 'super' superSuffix
  440. | expression '.' explicitGenericInvocation
  441. | expression '[' expression ']'
  442. | expression '(' expressionList? ')'
  443. | 'new' creator
  444. | '(' type ')' expression
  445. | expression ('++' | '--')
  446. | ('+' | '-' | '++' | '--') expression
  447. | ('~' | '!') expression
  448. | expression ('*' | '/' | '%') expression
  449. | expression ('+' | '-') expression
  450. | expression ('<' '<' | '>' '>' '>' | '>' '>') expression
  451. | expression ('<=' | '>=' | '>' | '<') expression
  452. | expression 'instanceof' type
  453. | expression ('==' | '!=') expression
  454. | expression '&' expression
  455. | expression '^' expression
  456. | expression '|' expression
  457. | expression '&&' expression
  458. | expression '||' expression
  459. | expression '?' expression ':' expression
  460. | expression ('='<assoc=right> | '+='<assoc=right> | '-='<assoc=right> | '*='<assoc=right> | '/='<assoc=right> | '&='<assoc=right> | '|='<assoc=right> | '^='<assoc=right> | '>>='<assoc=right> | '>>>='<assoc=right> | '<<='<assoc=right> | '%='<assoc=right>) expression
  461. ;
  462.  
  463. primary
  464. : '(' expression ')'
  465. | 'this'
  466. | 'super'
  467. | literal
  468. | Identifier
  469. | type '.' 'class'
  470. | 'void' '.' 'class'
  471. | nonWildcardTypeArguments (explicitGenericInvocationSuffix | 'this' arguments)
  472. ;
  473.  
  474. creator
  475. : nonWildcardTypeArguments createdName classCreatorRest
  476. | createdName (arrayCreatorRest | classCreatorRest)
  477. ;
  478.  
  479. createdName
  480. : Identifier typeArgumentsOrDiamond? ('.' Identifier typeArgumentsOrDiamond?)*
  481. | primitiveType
  482. ;
  483.  
  484. innerCreator
  485. : Identifier nonWildcardTypeArgumentsOrDiamond? classCreatorRest
  486. ;
  487.  
  488. arrayCreatorRest
  489. : '[' (']' ('[' ']')* arrayInitializer | expression ']' ('[' expression ']')* ('[' ']')*)
  490. ;
  491.  
  492. classCreatorRest
  493. : arguments classBody?
  494. ;
  495.  
  496. explicitGenericInvocation
  497. : nonWildcardTypeArguments explicitGenericInvocationSuffix
  498. ;
  499.  
  500. nonWildcardTypeArguments
  501. : '<' typeList '>'
  502. ;
  503.  
  504. typeArgumentsOrDiamond
  505. : '<' '>'
  506. | typeArguments
  507. ;
  508.  
  509. nonWildcardTypeArgumentsOrDiamond
  510. : '<' '>'
  511. | nonWildcardTypeArguments
  512. ;
  513.  
  514. superSuffix
  515. : arguments
  516. | '.' Identifier arguments?
  517. ;
  518.  
  519. explicitGenericInvocationSuffix
  520. : 'super' superSuffix
  521. | Identifier arguments
  522. ;
  523.  
  524. arguments
  525. : '(' expressionList? ')'
  526. ;
  527.  
  528. compilationUnitSuf
  529. : typeDeclaration*
  530. | typeDeclarationSuf typeDeclaration*
  531. | typeDeclaration typeDeclaration*
  532. | importDeclaration* typeDeclaration*
  533. | importDeclarationSuf importDeclaration* typeDeclaration*
  534. | importDeclaration importDeclaration* typeDeclaration*
  535. | packageDeclarationSuf importDeclaration* typeDeclaration*
  536. | packageDeclaration importDeclaration* typeDeclaration*
  537. ;
  538.  
  539. packageDeclarationSuf
  540. : ';'
  541. | qualifiedNameSuf ';'
  542. | qualifiedName ';'
  543. | 'package' qualifiedName ';'
  544. | annotation* 'package' qualifiedName ';'
  545. | annotationSuf annotation* 'package' qualifiedName ';'
  546. | annotation annotation* 'package' qualifiedName ';'
  547. ;
  548.  
  549. importDeclarationSuf
  550. : ';'
  551. | '*' ';'
  552. | '.' '*' ';'
  553. | qualifiedNameSuf ('.' '*')? ';'
  554. | qualifiedName ('.' '*')? ';'
  555. | 'static' qualifiedName ('.' '*')? ';'
  556. | 'import' 'static'? qualifiedName ('.' '*')? ';'
  557. ;
  558.  
  559. typeParametersSuf
  560. : '>'
  561. | (',' typeParameter)* '>'
  562. | typeParameterSuf (',' typeParameter)* '>'
  563. | typeParameter (',' typeParameter)* '>'
  564. | ',' typeParameter (',' typeParameter)* '>'
  565. | '<' typeParameter (',' typeParameter)* '>'
  566. ;
  567.  
  568. typeParameterSuf
  569. : typeBoundSuf
  570. | typeBound
  571. | 'extends' typeBound
  572. | Identifier ('extends' typeBound)?
  573. ;
  574.  
  575. typeBoundSuf
  576. : ('&' type)*
  577. | typeSuf ('&' type)*
  578. | type ('&' type)*
  579. | '&' type ('&' type)*
  580. ;
  581.  
  582. typeListSuf
  583. : (',' type)*
  584. | typeSuf (',' type)*
  585. | type (',' type)*
  586. | ',' type (',' type)*
  587. ;
  588.  
  589. variableDeclaratorIdSuf
  590. : ('[' ']')*
  591. | ']' ('[' ']')*
  592. | '[' ']' ('[' ']')*
  593. | Identifier ('[' ']')*
  594. ;
  595.  
  596. packageOrTypeNameSuf
  597. : qualifiedNameSuf
  598. | qualifiedName
  599. ;
  600.  
  601. enumConstantNameSuf
  602. : Identifier
  603. ;
  604.  
  605. typeNameSuf
  606. : qualifiedNameSuf
  607. | qualifiedName
  608. ;
  609.  
  610. primitiveTypeSuf
  611. : 'boolean'
  612. | 'char'
  613. | 'byte'
  614. | 'short'
  615. | 'int'
  616. | 'long'
  617. | 'float'
  618. | 'double'
  619. ;
  620.  
  621. qualifiedNameListSuf
  622. : (',' qualifiedName)*
  623. | qualifiedNameSuf (',' qualifiedName)*
  624. | qualifiedName (',' qualifiedName)*
  625. | ',' qualifiedName (',' qualifiedName)*
  626. ;
  627.  
  628. qualifiedNameSuf
  629. : ('.' Identifier)*
  630. | Identifier ('.' Identifier)*
  631. | '.' Identifier ('.' Identifier)*
  632. ;
  633.  
  634. literalSuf
  635. : IntegerLiteral
  636. | FloatingPointLiteral
  637. | CharacterLiteral
  638. | StringLiteral
  639. | BooleanLiteral
  640. | 'null'
  641. ;
  642.  
  643. annotationNameSuf
  644. : qualifiedNameSuf
  645. | qualifiedName
  646. ;
  647.  
  648. catchTypeSuf
  649. : ('|' qualifiedName)*
  650. | qualifiedNameSuf ('|' qualifiedName)*
  651. | qualifiedName ('|' qualifiedName)*
  652. | '|' qualifiedName ('|' qualifiedName)*
  653. ;
  654.  
  655. createdNameSuf
  656. : ('.' Identifier typeArgumentsOrDiamond?)*
  657. | typeArgumentsOrDiamondSuf ('.' Identifier typeArgumentsOrDiamond?)*
  658. | typeArgumentsOrDiamond ('.' Identifier typeArgumentsOrDiamond?)*
  659. | Identifier typeArgumentsOrDiamond? ('.' Identifier typeArgumentsOrDiamond?)*
  660. | '.' Identifier typeArgumentsOrDiamond? ('.' Identifier typeArgumentsOrDiamond?)*
  661. | primitiveTypeSuf
  662. | primitiveType
  663. ;
  664.  
  665. nonWildcardTypeArgumentsSuf
  666. : '>'
  667. | typeListSuf '>'
  668. | typeList '>'
  669. | '<' typeList '>'
  670. ;
  671.  
  672. typeArgumentsOrDiamondSuf
  673. : '>'
  674. | '<' '>'
  675. | typeArgumentsSuf
  676. | typeArguments
  677. ;
  678.  
  679. nonWildcardTypeArgumentsOrDiamondSuf
  680. : '>'
  681. | '<' '>'
  682. | nonWildcardTypeArgumentsSuf
  683. | nonWildcardTypeArguments
  684. ;
  685.  
  686. classOrInterfaceTypeSuf : {ruleName = "classOrInterfaceTypeSuf"; } s1;
  687. typeSuf : {ruleName = "typeSuf"; } s1;
  688. typeArgumentsSuf : {ruleName = "typeArgumentsSuf"; } s1;
  689. typeArgumentSuf : {ruleName = "typeArgumentSuf"; } s1;
  690.  
  691. s1 : v1_1 | v1_2 | v1_3 | v1_4;
  692.  
  693. v1_1 : {ruleName.equals("classOrInterfaceTypeSuf")}? t1 | t1 v1_5;
  694. v1_2 : {ruleName.equals("typeSuf") || ruleName.equals("typeArgumentSuf")}? t3 | t3 v1_6;
  695. v1_3 : {ruleName.equals("typeArgumentsSuf")}? t5 | t5 v1_7;
  696. v1_4 : {ruleName.equals("typeArgumentSuf")}? t7 | t7 v1_8;
  697. v1_8 : {ruleName.equals("typeArgumentsSuf")}? t6 | t6 v1_7;
  698. v1_5 : {ruleName.equals("typeSuf") || ruleName.equals("typeArgumentSuf")}? t4 | t4 v1_6;
  699. v1_6 : v1_8;
  700. v1_7 : {ruleName.equals("classOrInterfaceTypeSuf")}? t2 | t2 v1_5;
  701.  
  702. genericInterfaceMethodDeclarationSuf : {ruleName = "genericInterfaceMethodDeclarationSuf"; } s2;
  703. constantExpressionSuf : {ruleName = "constantExpressionSuf"; } s2;
  704. constructorBodySuf : {ruleName = "constructorBodySuf"; } s2;
  705. enumConstantSuf : {ruleName = "enumConstantSuf"; } s2;
  706. fieldDeclarationSuf : {ruleName = "fieldDeclarationSuf"; } s2;
  707. finallyBlockSuf : {ruleName = "finallyBlockSuf"; } s2;
  708. annotationTypeElementRestSuf : {ruleName = "annotationTypeElementRestSuf"; } s2;
  709. classOrInterfaceModifierSuf : {ruleName = "classOrInterfaceModifierSuf"; } s2;
  710. methodDeclarationSuf : {ruleName = "methodDeclarationSuf"; } s2;
  711. genericMethodDeclarationSuf : {ruleName = "genericMethodDeclarationSuf"; } s2;
  712. variableModifierSuf : {ruleName = "variableModifierSuf"; } s2;
  713. variableDeclaratorsSuf : {ruleName = "variableDeclaratorsSuf"; } s2;
  714. forUpdateSuf : {ruleName = "forUpdateSuf"; } s2;
  715. elementValueArrayInitializerSuf : {ruleName = "elementValueArrayInitializerSuf"; } s2;
  716. lastFormalParameterSuf : {ruleName = "lastFormalParameterSuf"; } s2;
  717. explicitGenericInvocationSuf : {ruleName = "explicitGenericInvocationSuf"; } s2;
  718. statementSuf : {ruleName = "statementSuf"; } s2;
  719. classDeclarationSuf : {ruleName = "classDeclarationSuf"; } s2;
  720. memberDeclarationSuf : {ruleName = "memberDeclarationSuf"; } s2;
  721. annotationTypeBodySuf : {ruleName = "annotationTypeBodySuf"; } s2;
  722. elementValuePairSuf : {ruleName = "elementValuePairSuf"; } s2;
  723. forInitSuf : {ruleName = "forInitSuf"; } s2;
  724. arrayCreatorRestSuf : {ruleName = "arrayCreatorRestSuf"; } s2;
  725. typeDeclarationSuf : {ruleName = "typeDeclarationSuf"; } s2;
  726. annotationConstantRestSuf : {ruleName = "annotationConstantRestSuf"; } s2;
  727. arrayInitializerSuf : {ruleName = "arrayInitializerSuf"; } s2;
  728. catchClauseSuf : {ruleName = "catchClauseSuf"; } s2;
  729. formalParametersSuf : {ruleName = "formalParametersSuf"; } s2;
  730. methodBodySuf : {ruleName = "methodBodySuf"; } s2;
  731. classBodyDeclarationSuf : {ruleName = "classBodyDeclarationSuf"; } s2;
  732. annotationMethodRestSuf : {ruleName = "annotationMethodRestSuf"; } s2;
  733. formalParameterListSuf : {ruleName = "formalParameterListSuf"; } s2;
  734. annotationTypeDeclarationSuf : {ruleName = "annotationTypeDeclarationSuf"; } s2;
  735. enhancedForControlSuf : {ruleName = "enhancedForControlSuf"; } s2;
  736. annotationTypeElementDeclarationSuf : {ruleName = "annotationTypeElementDeclarationSuf"; } s2;
  737. classBodySuf : {ruleName = "classBodySuf"; } s2;
  738. statementExpressionSuf : {ruleName = "statementExpressionSuf"; } s2;
  739. parExpressionSuf : {ruleName = "parExpressionSuf"; } s2;
  740. resourceSuf : {ruleName = "resourceSuf"; } s2;
  741. switchLabelSuf : {ruleName = "switchLabelSuf"; } s2;
  742. constDeclarationSuf : {ruleName = "constDeclarationSuf"; } s2;
  743. interfaceDeclarationSuf : {ruleName = "interfaceDeclarationSuf"; } s2;
  744. annotationMethodOrConstantRestSuf : {ruleName = "annotationMethodOrConstantRestSuf"; } s2;
  745. genericConstructorDeclarationSuf : {ruleName = "genericConstructorDeclarationSuf"; } s2;
  746. formalParameterSuf : {ruleName = "formalParameterSuf"; } s2;
  747. explicitGenericInvocationSuffixSuf : {ruleName = "explicitGenericInvocationSuffixSuf"; } s2;
  748. elementValuePairsSuf : {ruleName = "elementValuePairsSuf"; } s2;
  749. elementValueSuf : {ruleName = "elementValueSuf"; } s2;
  750. annotationSuf : {ruleName = "annotationSuf"; } s2;
  751. expressionListSuf : {ruleName = "expressionListSuf"; } s2;
  752. localVariableDeclarationStatementSuf : {ruleName = "localVariableDeclarationStatementSuf"; } s2;
  753. expressionSuf : {ruleName = "expressionSuf"; } s2;
  754. interfaceBodyDeclarationSuf : {ruleName = "interfaceBodyDeclarationSuf"; } s2;
  755. argumentsSuf : {ruleName = "argumentsSuf"; } s2;
  756. forControlSuf : {ruleName = "forControlSuf"; } s2;
  757. enumBodyDeclarationsSuf : {ruleName = "enumBodyDeclarationsSuf"; } s2;
  758. superSuffixSuf : {ruleName = "superSuffixSuf"; } s2;
  759. blockStatementSuf : {ruleName = "blockStatementSuf"; } s2;
  760. classCreatorRestSuf : {ruleName = "classCreatorRestSuf"; } s2;
  761. resourceSpecificationSuf : {ruleName = "resourceSpecificationSuf"; } s2;
  762. interfaceMethodDeclarationSuf : {ruleName = "interfaceMethodDeclarationSuf"; } s2;
  763. variableDeclaratorSuf : {ruleName = "variableDeclaratorSuf"; } s2;
  764. switchBlockStatementGroupSuf : {ruleName = "switchBlockStatementGroupSuf"; } s2;
  765. defaultValueSuf : {ruleName = "defaultValueSuf"; } s2;
  766. modifierSuf : {ruleName = "modifierSuf"; } s2;
  767. resourcesSuf : {ruleName = "resourcesSuf"; } s2;
  768. enumDeclarationSuf : {ruleName = "enumDeclarationSuf"; } s2;
  769. enumConstantsSuf : {ruleName = "enumConstantsSuf"; } s2;
  770. variableInitializerSuf : {ruleName = "variableInitializerSuf"; } s2;
  771. innerCreatorSuf : {ruleName = "innerCreatorSuf"; } s2;
  772. primarySuf : {ruleName = "primarySuf"; } s2;
  773. localVariableDeclarationSuf : {ruleName = "localVariableDeclarationSuf"; } s2;
  774. interfaceBodySuf : {ruleName = "interfaceBodySuf"; } s2;
  775. interfaceMemberDeclarationSuf : {ruleName = "interfaceMemberDeclarationSuf"; } s2;
  776. creatorSuf : {ruleName = "creatorSuf"; } s2;
  777. constructorDeclarationSuf : {ruleName = "constructorDeclarationSuf"; } s2;
  778. constantDeclaratorSuf : {ruleName = "constantDeclaratorSuf"; } s2;
  779. blockSuf : {ruleName = "blockSuf"; } s2;
  780.  
  781. s2 : v2_1 | v2_2 | v2_3 | v2_4 | v2_5 | v2_6 | v2_7 | v2_8 | v2_9 | v2_10 | v2_11 | v2_12 | v2_13 | v2_14 | v2_15 | v2_16 | v2_17 | v2_18 | v2_19 | v2_20 | v2_21 | v2_22 | v2_23 | v2_24 | v2_25 | v2_26 | v2_27 | v2_28 | v2_29 | v2_30 | v2_31 | v2_32 | v2_33 | v2_34 | v2_35 | v2_36 | v2_37 | v2_38 | v2_39 | v2_40 | v2_41 | v2_42 | v2_43 | v2_44 | v2_45 | v2_46 | v2_47 | v2_48 | v2_49 | v2_50 | v2_51 | v2_52 | v2_53 | v2_54 | v2_55 | v2_56 | v2_57 | v2_58 | v2_59 | v2_60 | v2_61 | v2_62 | v2_63 | v2_64 | v2_65 | v2_66 | v2_67 | v2_68 | v2_69 | v2_70 | v2_71 | v2_72 | v2_73 | v2_74 | v2_75 | v2_76 | v2_77 | v2_78;
  782.  
  783. v2_1 : {ruleName.equals("genericInterfaceMethodDeclarationSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf")}? t9 | t9 v2_79;
  784. v2_2 : {ruleName.equals("constantExpressionSuf")}? t11 | t11 v2_80;
  785. v2_3 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("constructorBodySuf") || ruleName.equals("constructorDeclarationSuf") || ruleName.equals("genericConstructorDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf")}? t13 | t13 v2_81;
  786. v2_4 : {ruleName.equals("enumConstantSuf")}? t15 | t15 v2_82;
  787. v2_5 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("fieldDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf")}? t19 | t19 v2_83;
  788. v2_6 : {ruleName.equals("blockStatementSuf") || ruleName.equals("finallyBlockSuf") || ruleName.equals("statementSuf")}? t21 | t21 v2_84;
  789. v2_7 : {ruleName.equals("annotationTypeElementDeclarationSuf") || ruleName.equals("annotationTypeElementRestSuf")}? t23 | t23 v2_85;
  790. v2_8 : {ruleName.equals("classOrInterfaceModifierSuf") || ruleName.equals("modifierSuf")}? t29 | t29 v2_86;
  791. v2_9 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("methodDeclarationSuf") || ruleName.equals("genericMethodDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf")}? t31 | t31 v2_87;
  792. v2_10 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("genericMethodDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf")}? t34 | t34 v2_88;
  793. v2_11 : {ruleName.equals("variableModifierSuf")}? t36 | t36 v2_89;
  794. v2_12 : {ruleName.equals("forInitSuf") || ruleName.equals("annotationConstantRestSuf") || ruleName.equals("variableDeclaratorsSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("localVariableDeclarationSuf")}? t38 | t38 v2_90;
  795. v2_13 : {ruleName.equals("forUpdateSuf") || ruleName.equals("forControlSuf")}? t40 | t40 v2_91;
  796. v2_14 : {ruleName.equals("elementValueSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("elementValueArrayInitializerSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("annotationMethodRestSuf")}? t42 | t42 v2_92;
  797. v2_15 : {ruleName.equals("lastFormalParameterSuf") || ruleName.equals("formalParameterListSuf")}? t44 | t44 v2_93;
  798. v2_16 : {ruleName.equals("elementValueSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("expressionSuf") || ruleName.equals("forControlSuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("explicitGenericInvocationSuf")}? t46 | t46 v2_94;
  799. v2_17 : {ruleName.equals("blockStatementSuf") || ruleName.equals("statementSuf")}? t48 | t48 v2_95;
  800. v2_18 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("typeDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf") || ruleName.equals("classDeclarationSuf")}? t60 | t60 v2_96;
  801. v2_19 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf")}? t62 | t62 v2_97;
  802. v2_20 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("annotationTypeBodySuf") || ruleName.equals("typeDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf") || ruleName.equals("annotationTypeDeclarationSuf")}? t72 | t72 v2_98;
  803. v2_21 : {ruleName.equals("elementValuePairSuf")}? t74 | t74 v2_99;
  804. v2_22 : {ruleName.equals("forInitSuf")}? t76 | t76 v2_100;
  805. v2_23 : {ruleName.equals("elementValueSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("arrayCreatorRestSuf") || ruleName.equals("expressionSuf") || ruleName.equals("forControlSuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("creatorSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("defaultValueSuf")}? t79 | t79 v2_101;
  806. v2_24 : {ruleName.equals("blockStatementSuf") || ruleName.equals("typeDeclarationSuf")}? t82 | t82 v2_102;
  807. v2_25 : {ruleName.equals("annotationConstantRestSuf") || ruleName.equals("annotationMethodOrConstantRestSuf")}? t88 | t88 v2_103;
  808. v2_26 : {ruleName.equals("elementValueSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("arrayCreatorRestSuf") || ruleName.equals("expressionSuf") || ruleName.equals("arrayInitializerSuf") || ruleName.equals("forControlSuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("creatorSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf")}? t90 | t90 v2_104;
  809. v2_27 : {ruleName.equals("catchClauseSuf")}? t92 | t92 v2_105;
  810. v2_28 : {ruleName.equals("formalParametersSuf")}? t95 | t95 v2_106;
  811. v2_29 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("methodDeclarationSuf") || ruleName.equals("genericMethodDeclarationSuf") || ruleName.equals("methodBodySuf") || ruleName.equals("classBodyDeclarationSuf")}? t13 | t13 v2_107;
  812. v2_30 : {ruleName.equals("classBodyDeclarationSuf")}? t99 | t99 v2_108;
  813. v2_31 : {ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("annotationMethodRestSuf")}? t103 | t103 v2_109;
  814. v2_32 : {ruleName.equals("formalParameterListSuf")}? t105 | t105 v2_110;
  815. v2_33 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("typeDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf") || ruleName.equals("annotationTypeDeclarationSuf")}? t108 | t108 v2_111;
  816. v2_34 : {ruleName.equals("enhancedForControlSuf") || ruleName.equals("forControlSuf")}? t110 | t110 v2_112;
  817. v2_35 : {ruleName.equals("annotationTypeElementDeclarationSuf")}? t113 | t113 v2_113;
  818. v2_36 : {ruleName.equals("elementValueSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("enumConstantSuf") || ruleName.equals("expressionSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("forControlSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("classCreatorRestSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("classDeclarationSuf") || ruleName.equals("memberDeclarationSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("typeDeclarationSuf") || ruleName.equals("innerCreatorSuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("classBodyDeclarationSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("creatorSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("classBodySuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf")}? t116 | t116 v2_114;
  819. v2_37 : {ruleName.equals("statementExpressionSuf")}? t11 | t11 v2_115;
  820. v2_38 : {ruleName.equals("parExpressionSuf")}? t120 | t120 v2_116;
  821. v2_39 : {ruleName.equals("resourceSuf")}? t122 | t122 v2_117;
  822. v2_40 : {ruleName.equals("switchLabelSuf")}? t125 | t125 v2_118;
  823. v2_41 : {ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("constDeclarationSuf")}? t127 | t127 v2_119;
  824. v2_42 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("typeDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("interfaceDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf")}? t129 | t129 v2_120;
  825. v2_43 : {ruleName.equals("annotationMethodOrConstantRestSuf")}? t131 | t131 v2_121;
  826. v2_44 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("genericConstructorDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf")}? t134 | t134 v2_122;
  827. v2_45 : {ruleName.equals("formalParameterSuf")}? t136 | t136 v2_123;
  828. v2_46 : {ruleName.equals("elementValueSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("expressionSuf") || ruleName.equals("forControlSuf") || ruleName.equals("primarySuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("explicitGenericInvocationSuf") || ruleName.equals("explicitGenericInvocationSuffixSuf")}? t138 | t138 v2_124;
  829. v2_47 : {ruleName.equals("elementValuePairsSuf")}? t141 | t141 v2_125;
  830. v2_48 : {ruleName.equals("elementValueSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("annotationMethodRestSuf")}? t143 | t143 v2_126;
  831. v2_49 : {ruleName.equals("elementValueSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("classOrInterfaceModifierSuf") || ruleName.equals("annotationSuf") || ruleName.equals("variableModifierSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("modifierSuf") || ruleName.equals("annotationMethodRestSuf")}? t147 | t147 v2_127;
  832. v2_50 : {ruleName.equals("forInitSuf") || ruleName.equals("expressionListSuf") || ruleName.equals("forUpdateSuf") || ruleName.equals("forControlSuf")}? t150 | t150 v2_128;
  833. v2_51 : {ruleName.equals("blockStatementSuf") || ruleName.equals("localVariableDeclarationStatementSuf")}? t152 | t152 v2_129;
  834. v2_52 : {ruleName.equals("elementValueSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("expressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("forControlSuf") || ruleName.equals("annotationMethodRestSuf")}? t154 | t154 v2_130;
  835. v2_53 : {ruleName.equals("interfaceBodyDeclarationSuf")}? t162 | t162 v2_131;
  836. v2_54 : {ruleName.equals("elementValueSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("expressionSuf") || ruleName.equals("argumentsSuf") || ruleName.equals("forControlSuf") || ruleName.equals("primarySuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("superSuffixSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("explicitGenericInvocationSuf") || ruleName.equals("explicitGenericInvocationSuffixSuf")}? t165 | t165 v2_132;
  837. v2_55 : {ruleName.equals("forControlSuf")}? t167 | t167 v2_133;
  838. v2_56 : {ruleName.equals("enumBodyDeclarationsSuf")}? t172 | t172 v2_134;
  839. v2_57 : {ruleName.equals("elementValueSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("expressionSuf") || ruleName.equals("forControlSuf") || ruleName.equals("primarySuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("superSuffixSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("explicitGenericInvocationSuf") || ruleName.equals("explicitGenericInvocationSuffixSuf")}? t174 | t174 v2_135;
  840. v2_58 : {ruleName.equals("blockStatementSuf")}? t176 | t176 v2_136;
  841. v2_59 : {ruleName.equals("elementValueSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("innerCreatorSuf") || ruleName.equals("expressionSuf") || ruleName.equals("forControlSuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("creatorSuf") || ruleName.equals("classCreatorRestSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("defaultValueSuf")}? t180 | t180 v2_137;
  842. v2_60 : {ruleName.equals("resourceSpecificationSuf")}? t183 | t183 v2_138;
  843. v2_61 : {ruleName.equals("genericInterfaceMethodDeclarationSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("interfaceMethodDeclarationSuf")}? t185 | t185 v2_139;
  844. v2_62 : {ruleName.equals("variableDeclaratorSuf")}? t187 | t187 v2_140;
  845. v2_63 : {ruleName.equals("switchBlockStatementGroupSuf")}? t189 | t189 v2_141;
  846. v2_64 : {ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("annotationMethodRestSuf")}? t192 | t192 v2_142;
  847. v2_65 : {ruleName.equals("modifierSuf")}? t194 | t194 v2_143;
  848. v2_66 : {ruleName.equals("resourcesSuf")}? t196 | t196 v2_144;
  849. v2_67 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("typeDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf") || ruleName.equals("enumDeclarationSuf")}? t198 | t198 v2_145;
  850. v2_68 : {ruleName.equals("enumConstantsSuf")}? t201 | t201 v2_146;
  851. v2_69 : {ruleName.equals("variableInitializerSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("variableDeclaratorSuf")}? t203 | t203 v2_147;
  852. v2_70 : {ruleName.equals("elementValueSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("innerCreatorSuf") || ruleName.equals("expressionSuf") || ruleName.equals("forControlSuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("defaultValueSuf")}? t206 | t206 v2_148;
  853. v2_71 : {ruleName.equals("elementValueSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("expressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("forControlSuf") || ruleName.equals("primarySuf") || ruleName.equals("annotationMethodRestSuf")}? t208 | t208 v2_149;
  854. v2_72 : {ruleName.equals("forInitSuf") || ruleName.equals("localVariableDeclarationSuf")}? t212 | t212 v2_150;
  855. v2_73 : {ruleName.equals("interfaceBodySuf") || ruleName.equals("memberDeclarationSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("typeDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("interfaceDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf")}? t215 | t215 v2_151;
  856. v2_74 : {ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf")}? t217 | t217 v2_152;
  857. v2_75 : {ruleName.equals("elementValueSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("creatorSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("expressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("forControlSuf") || ruleName.equals("annotationMethodRestSuf")}? t225 | t225 v2_153;
  858. v2_76 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("constructorDeclarationSuf") || ruleName.equals("genericConstructorDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf")}? t228 | t228 v2_154;
  859. v2_77 : {ruleName.equals("constantDeclaratorSuf")}? t231 | t231 v2_155;
  860. v2_78 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("methodDeclarationSuf") || ruleName.equals("genericMethodDeclarationSuf") || ruleName.equals("constructorBodySuf") || ruleName.equals("constructorDeclarationSuf") || ruleName.equals("catchClauseSuf") || ruleName.equals("methodBodySuf") || ruleName.equals("finallyBlockSuf") || ruleName.equals("genericConstructorDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf") || ruleName.equals("statementSuf") || ruleName.equals("blockSuf")}? t233 | t233 v2_156;
  861. v2_107 : v2_87;
  862. v2_106 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("methodDeclarationSuf") || ruleName.equals("genericMethodDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf")}? t32 | t32 v2_87 | {ruleName.equals("genericInterfaceMethodDeclarationSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("interfaceMethodDeclarationSuf")}? t186 | t186 v2_139 | {ruleName.equals("memberDeclarationSuf") || ruleName.equals("constructorDeclarationSuf") || ruleName.equals("genericConstructorDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf")}? t230 | t230 v2_154;
  863. v2_109 : v2_121;
  864. v2_130 : v2_80 | {ruleName.equals("blockStatementSuf") || ruleName.equals("statementSuf")}? t53 | t53 v2_95 | {ruleName.equals("elementValueSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("arrayCreatorRestSuf") || ruleName.equals("expressionSuf") || ruleName.equals("forControlSuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("creatorSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("defaultValueSuf")}? t80 | t80 v2_101 | v2_112 | v2_115 | {ruleName.equals("parExpressionSuf")}? t96 | t96 v2_116 | v2_117 | v2_126 | {ruleName.equals("forInitSuf") || ruleName.equals("expressionListSuf") || ruleName.equals("forUpdateSuf") || ruleName.equals("forControlSuf")}? t151 | t151 v2_128 | {ruleName.equals("elementValueSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("expressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("forControlSuf") || ruleName.equals("annotationMethodRestSuf")}? t159 | t159 v2_130 | {ruleName.equals("forControlSuf")}? t170 | t170 v2_133 | v2_147 | {ruleName.equals("elementValueSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("expressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("forControlSuf") || ruleName.equals("primarySuf") || ruleName.equals("annotationMethodRestSuf")}? t96 | t96 v2_149;
  865. v2_108 : {ruleName.equals("elementValueSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("enumConstantSuf") || ruleName.equals("expressionSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("forControlSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("classCreatorRestSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("classDeclarationSuf") || ruleName.equals("memberDeclarationSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("typeDeclarationSuf") || ruleName.equals("innerCreatorSuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("classBodyDeclarationSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("creatorSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("classBodySuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf")}? t117 | t117 v2_114 | {ruleName.equals("enumBodyDeclarationsSuf")}? t173 | t173 v2_134;
  866. v2_103 : v2_121;
  867. v2_132 : {ruleName.equals("enumConstantSuf")}? t18 | t18 v2_82 | v2_124 | v2_135 | {ruleName.equals("elementValueSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("innerCreatorSuf") || ruleName.equals("expressionSuf") || ruleName.equals("forControlSuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("creatorSuf") || ruleName.equals("classCreatorRestSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("defaultValueSuf")}? t18 | t18 v2_137 | v2_149;
  868. v2_131 : {ruleName.equals("interfaceBodySuf") || ruleName.equals("memberDeclarationSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("typeDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("interfaceDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf")}? t216 | t216 v2_151;
  869. v2_102 : v2_136;
  870. v2_134 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("typeDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf") || ruleName.equals("enumDeclarationSuf")}? t199 | t199 v2_145;
  871. v2_105 : {ruleName.equals("blockStatementSuf") || ruleName.equals("statementSuf")}? t55 | t55 v2_95;
  872. v2_133 : {ruleName.equals("blockStatementSuf") || ruleName.equals("statementSuf")}? t57 | t57 v2_95;
  873. v2_104 : v2_101 | v2_147;
  874. v2_79 : v2_152;
  875. v2_80 : {ruleName.equals("switchLabelSuf")}? t126 | t126 v2_118;
  876. v2_83 : v2_97;
  877. v2_84 : v2_95;
  878. v2_81 : v2_154;
  879. v2_82 : {ruleName.equals("enumConstantsSuf")}? t202 | t202 v2_146;
  880. v2_135 : v2_124 | v2_130;
  881. v2_136 : {ruleName.equals("switchBlockStatementGroupSuf")}? t190 | t190 v2_141 | {ruleName.equals("memberDeclarationSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("methodDeclarationSuf") || ruleName.equals("genericMethodDeclarationSuf") || ruleName.equals("constructorBodySuf") || ruleName.equals("constructorDeclarationSuf") || ruleName.equals("catchClauseSuf") || ruleName.equals("methodBodySuf") || ruleName.equals("finallyBlockSuf") || ruleName.equals("genericConstructorDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf") || ruleName.equals("statementSuf") || ruleName.equals("blockSuf")}? t234 | t234 v2_156;
  882. v2_137 : v2_148 | v2_153;
  883. v2_100 : {ruleName.equals("forControlSuf")}? t169 | t169 v2_133;
  884. v2_101 : v2_153;
  885. v2_138 : {ruleName.equals("blockStatementSuf") || ruleName.equals("statementSuf")}? t50 | t50 v2_95;
  886. v2_139 : v2_79 | v2_152;
  887. v2_141 : {ruleName.equals("blockStatementSuf") || ruleName.equals("statementSuf")}? t54 | t54 v2_95;
  888. v2_140 : {ruleName.equals("forInitSuf") || ruleName.equals("annotationConstantRestSuf") || ruleName.equals("variableDeclaratorsSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("localVariableDeclarationSuf")}? t39 | t39 v2_90;
  889. v2_145 : {ruleName.equals("annotationTypeElementDeclarationSuf") || ruleName.equals("annotationTypeElementRestSuf")}? t24 | t24 v2_85 | v2_97 | v2_102 | v2_152;
  890. v2_144 : {ruleName.equals("resourceSpecificationSuf")}? t184 | t184 v2_138;
  891. v2_143 : {ruleName.equals("classBodyDeclarationSuf")}? t101 | t101 v2_108 | {ruleName.equals("annotationTypeElementDeclarationSuf")}? t114 | t114 v2_113 | {ruleName.equals("interfaceBodyDeclarationSuf")}? t164 | t164 v2_131;
  892. v2_142 : v2_109;
  893. v2_86 : {ruleName.equals("blockStatementSuf") || ruleName.equals("typeDeclarationSuf")}? t83 | t83 v2_102 | v2_143;
  894. v2_85 : v2_113;
  895. v2_88 : v2_97;
  896. v2_87 : v2_88 | v2_97;
  897. v2_89 : {ruleName.equals("lastFormalParameterSuf") || ruleName.equals("formalParameterListSuf")}? t45 | t45 v2_93 | {ruleName.equals("catchClauseSuf")}? t93 | t93 v2_105 | {ruleName.equals("enhancedForControlSuf") || ruleName.equals("forControlSuf")}? t111 | t111 v2_112 | {ruleName.equals("resourceSuf")}? t123 | t123 v2_117 | {ruleName.equals("formalParameterSuf")}? t137 | t137 v2_123 | {ruleName.equals("forInitSuf") || ruleName.equals("localVariableDeclarationSuf")}? t213 | t213 v2_150;
  898. v2_90 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("fieldDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf")}? t20 | t20 v2_83 | v2_103 | v2_150;
  899. v2_91 : v2_133;
  900. v2_92 : v2_126;
  901. v2_93 : v2_110;
  902. v2_94 : v2_130;
  903. v2_95 : {ruleName.equals("blockStatementSuf") || ruleName.equals("statementSuf")}? t58 | t58 v2_95 | v2_136;
  904. v2_148 : v2_130;
  905. v2_149 : v2_130;
  906. v2_146 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("typeDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf") || ruleName.equals("enumDeclarationSuf")}? t200 | t200 v2_145;
  907. v2_147 : {ruleName.equals("elementValueSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("arrayCreatorRestSuf") || ruleName.equals("expressionSuf") || ruleName.equals("arrayInitializerSuf") || ruleName.equals("forControlSuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("creatorSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf")}? t91 | t91 v2_104 | v2_140 | v2_155;
  908. v2_125 : {ruleName.equals("elementValueSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("classOrInterfaceModifierSuf") || ruleName.equals("annotationSuf") || ruleName.equals("variableModifierSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("modifierSuf") || ruleName.equals("annotationMethodRestSuf")}? t96 | t96 v2_127;
  909. v2_154 : v2_97 | v2_122;
  910. v2_153 : v2_130;
  911. v2_124 : v2_94 | v2_149;
  912. v2_156 : v2_81 | v2_84 | {ruleName.equals("blockStatementSuf") || ruleName.equals("statementSuf")}? t59 | t59 v2_95 | v2_105 | v2_107 | v2_108;
  913. v2_127 : {ruleName.equals("enumConstantSuf")}? t16 | t16 v2_82 | v2_86 | v2_89 | v2_126;
  914. v2_155 : {ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("constDeclarationSuf")}? t128 | t128 v2_119;
  915. v2_126 : {ruleName.equals("elementValueSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("elementValueArrayInitializerSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("annotationMethodRestSuf")}? t43 | t43 v2_92 | v2_99 | {ruleName.equals("elementValueSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("classOrInterfaceModifierSuf") || ruleName.equals("annotationSuf") || ruleName.equals("variableModifierSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("modifierSuf") || ruleName.equals("annotationMethodRestSuf")}? t96 | t96 v2_127 | v2_142;
  916. v2_129 : v2_136;
  917. v2_150 : v2_100 | {ruleName.equals("blockStatementSuf") || ruleName.equals("localVariableDeclarationStatementSuf")}? t20 | t20 v2_129;
  918. v2_128 : v2_91 | v2_100 | {ruleName.equals("elementValueSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("expressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("forControlSuf") || ruleName.equals("annotationMethodRestSuf")}? t96 | t96 v2_130 | {ruleName.equals("elementValueSuf") || ruleName.equals("variableInitializerSuf") || ruleName.equals("elementValuePairSuf") || ruleName.equals("constantExpressionSuf") || ruleName.equals("expressionSuf") || ruleName.equals("argumentsSuf") || ruleName.equals("forControlSuf") || ruleName.equals("primarySuf") || ruleName.equals("annotationMethodRestSuf") || ruleName.equals("enhancedForControlSuf") || ruleName.equals("superSuffixSuf") || ruleName.equals("statementExpressionSuf") || ruleName.equals("resourceSuf") || ruleName.equals("constantDeclaratorSuf") || ruleName.equals("variableDeclaratorSuf") || ruleName.equals("annotationMethodOrConstantRestSuf") || ruleName.equals("defaultValueSuf") || ruleName.equals("explicitGenericInvocationSuf") || ruleName.equals("explicitGenericInvocationSuffixSuf")}? t96 | t96 v2_132;
  919. v2_152 : v2_131;
  920. v2_151 : v2_120;
  921. v2_99 : {ruleName.equals("elementValuePairsSuf")}? t142 | t142 v2_125;
  922. v2_98 : v2_111;
  923. v2_97 : v2_108;
  924. v2_96 : {ruleName.equals("annotationTypeElementDeclarationSuf") || ruleName.equals("annotationTypeElementRestSuf")}? t24 | t24 v2_85 | v2_97 | v2_102 | v2_152;
  925. v2_120 : {ruleName.equals("annotationTypeElementDeclarationSuf") || ruleName.equals("annotationTypeElementRestSuf")}? t24 | t24 v2_85 | v2_97 | v2_102 | v2_152;
  926. v2_121 : {ruleName.equals("annotationTypeElementDeclarationSuf") || ruleName.equals("annotationTypeElementRestSuf")}? t20 | t20 v2_85;
  927. v2_122 : v2_97;
  928. v2_123 : {ruleName.equals("formalParameterListSuf")}? t107 | t107 v2_110;
  929. v2_116 : {ruleName.equals("blockStatementSuf") || ruleName.equals("statementSuf")}? t51 | t51 v2_95;
  930. v2_115 : {ruleName.equals("blockStatementSuf") || ruleName.equals("statementSuf")}? t20 | t20 v2_95;
  931. v2_114 : v2_82 | v2_96 | v2_137;
  932. v2_113 : {ruleName.equals("memberDeclarationSuf") || ruleName.equals("interfaceMemberDeclarationSuf") || ruleName.equals("blockStatementSuf") || ruleName.equals("annotationTypeBodySuf") || ruleName.equals("typeDeclarationSuf") || ruleName.equals("interfaceBodyDeclarationSuf") || ruleName.equals("classBodyDeclarationSuf") || ruleName.equals("annotationTypeDeclarationSuf")}? t73 | t73 v2_98;
  933. v2_119 : v2_152;
  934. v2_118 : {ruleName.equals("blockStatementSuf") || ruleName.equals("statementSuf")}? t52 | t52 v2_95 | {ruleName.equals("switchBlockStatementGroupSuf")}? t191 | t191 v2_141;
  935. v2_117 : {ruleName.equals("resourcesSuf")}? t197 | t197 v2_144;
  936. v2_111 : {ruleName.equals("annotationTypeElementDeclarationSuf") || ruleName.equals("annotationTypeElementRestSuf")}? t24 | t24 v2_85 | v2_97 | v2_102 | v2_152;
  937. v2_112 : v2_133;
  938. v2_110 : {ruleName.equals("formalParametersSuf")}? t96 | t96 v2_106;
  939.  
  940. t131: annotationMethodRest | annotationConstantRest;
  941. t141: (',' elementValuePair)* | elementValuePair (',' elementValuePair)* | ',' elementValuePair (',' elementValuePair)*;
  942. t40: expressionList;
  943. t9: interfaceMethodDeclaration | typeParametersSuf interfaceMethodDeclaration | typeParameters interfaceMethodDeclaration;
  944. t202: (',' enumConstant)*;
  945. t194: classOrInterfaceModifier | 'native' | 'synchronized' | 'transient' | 'volatile';
  946. t23: ';' | annotationMethodOrConstantRest ';' | typeSuf annotationMethodOrConstantRest ';' | type annotationMethodOrConstantRest ';' | classDeclaration ';'? | interfaceDeclaration ';'? | enumDeclaration ';'? | annotationTypeDeclaration ';'?;
  947. t189: blockStatement blockStatement* | switchLabel switchLabel* blockStatement+;
  948. t6: (',' typeArgument)* '>';
  949. t20: ';';
  950. t50: block catchClause* finallyBlock?;
  951. t53: ';' | (':' expression)? ';';
  952. t231: variableInitializer | '=' variableInitializer | ('[' ']')* '=' variableInitializer | ']' ('[' ']')* '=' variableInitializer | '[' ']' ('[' ']')* '=' variableInitializer | Identifier ('[' ']')* '=' variableInitializer;
  953. t142: (',' elementValuePair)*;
  954. t198: '}' | enumBodyDeclarations '}' | ',' enumBodyDeclarations? '}' | enumConstants ','? enumBodyDeclarations? '}' | '{' enumConstants? ','? enumBodyDeclarations? '}' | typeListSuf '{' enumConstants? ','? enumBodyDeclarations? '}' | typeList '{' enumConstants? ','? enumBodyDeclarations? '}' | 'implements' typeList '{' enumConstants? ','? enumBodyDeclarations? '}' | Identifier ('implements' typeList)? '{' enumConstants? ','? enumBodyDeclarations? '}' | ENUM Identifier ('implements' typeList)? '{' enumConstants? ','? enumBodyDeclarations? '}';
  955. t72: '}' | (annotationTypeElementDeclaration)* '}' | annotationTypeElementDeclaration (annotationTypeElementDeclaration)* '}' | '{' (annotationTypeElementDeclaration)* '}';
  956. t111: variableModifier* type Identifier ':' expression;
  957. t74: elementValue | '=' elementValue | Identifier '=' elementValue;
  958. t186: ('[' ']')* ('throws' qualifiedNameList)? ';';
  959. t24: ';'?;
  960. t172: classBodyDeclaration* | classBodyDeclaration classBodyDeclaration* | ';' classBodyDeclaration*;
  961. t128: (',' constantDeclarator)* ';';
  962. t88: variableDeclarators;
  963. t79: arrayInitializer | ('[' ']')* arrayInitializer | ']' ('[' ']')* arrayInitializer | '[' ']' ('[' ']')* arrayInitializer | ('[' ']')* | ']' ('[' ']')* | '[' ']' ('[' ']')* | ('[' expression ']')* ('[' ']')* | ']' ('[' expression ']')* ('[' ']')* | expression ']' ('[' expression ']')* ('[' ']')* | '[' expression ']' ('[' expression ']')* ('[' ']')* | '[' (']' ('[' ']')* arrayInitializer | expression ']' ('[' expression ']')* ('[' ']')*);
  964. t54: switchBlockStatementGroup* switchLabel* '}';
  965. t152: ';' | localVariableDeclaration ';';
  966. t134: constructorDeclaration | typeParametersSuf constructorDeclaration | typeParameters constructorDeclaration;
  967. t197: (';' resource)*;
  968. t173: classBodyDeclaration*;
  969. t215: '}' | interfaceBodyDeclaration* '}' | interfaceBodyDeclaration interfaceBodyDeclaration* '}' | '{' interfaceBodyDeclaration* '}';
  970. t126: ':';
  971. t55: catchClause* finallyBlock?;
  972. t180: classBody | arguments classBody?;
  973. t201: (',' enumConstant)* | enumConstant (',' enumConstant)* | ',' enumConstant (',' enumConstant)*;
  974. t73: (annotationTypeElementDeclaration)* '}';
  975. t1: ('.' Identifier typeArguments?)* | typeArguments ('.' Identifier typeArguments?)* | Identifier typeArguments? ('.' Identifier typeArguments?)* | '.' Identifier typeArguments? ('.' Identifier typeArguments?)*;
  976. t21: block | 'finally' block;
  977. t192: elementValue | 'default' elementValue;
  978. t46: explicitGenericInvocationSuffix | nonWildcardTypeArgumentsSuf explicitGenericInvocationSuffix | nonWildcardTypeArguments explicitGenericInvocationSuffix;
  979. t170: ';' forUpdate?;
  980. t116: '}' | classBodyDeclaration* '}' | classBodyDeclaration classBodyDeclaration* '}' | '{' classBodyDeclaration* '}';
  981. t36: 'final' | annotation;
  982. t162: interfaceMemberDeclaration | modifier* interfaceMemberDeclaration | modifier modifier* interfaceMemberDeclaration | ';';
  983. t13: block;
  984. t62: methodDeclaration | genericMethodDeclaration | fieldDeclaration | constructorDeclaration | genericConstructorDeclaration | interfaceDeclaration | annotationTypeDeclaration | classDeclaration | enumDeclaration;
  985. t110: expression | ':' expression | Identifier ':' expression | typeSuf Identifier ':' expression | type Identifier ':' expression | variableModifier* type Identifier ':' expression | variableModifier variableModifier* type Identifier ':' expression;
  986. t42: '}' | ',' '}' | (',' elementValue)* (',')? '}' | elementValue (',' elementValue)* (',')? '}' | ',' elementValue (',' elementValue)* (',')? '}' | '{' (elementValue (',' elementValue)*)? (',')? '}';
  987. t4: ('[' ']')*;
  988. t3: ('[' ']')* | ']' ('[' ']')* | '[' ']' ('[' ']')* | classOrInterfaceType ('[' ']')* | primitiveTypeSuf ('[' ']')* | primitiveType ('[' ']')*;
  989. t117: classBodyDeclaration* '}';
  990. t167: enhancedForControl | forUpdate | ';' forUpdate? | expression ';' forUpdate? | ';' expression? ';' forUpdate? | forInit ';' expression? ';' forUpdate?;
  991. t52: switchLabel* '}';
  992. t225: classCreatorRest | createdNameSuf classCreatorRest | createdName classCreatorRest | nonWildcardTypeArgumentsSuf createdName classCreatorRest | nonWildcardTypeArguments createdName classCreatorRest | arrayCreatorRest | createdNameSuf (arrayCreatorRest | classCreatorRest) | createdName (arrayCreatorRest | classCreatorRest);
  993. t114: modifier* annotationTypeElementRest;
  994. t82: classDeclaration | classOrInterfaceModifier* classDeclaration | classOrInterfaceModifier classOrInterfaceModifier* classDeclaration | enumDeclaration | classOrInterfaceModifier* enumDeclaration | classOrInterfaceModifier classOrInterfaceModifier* enumDeclaration | interfaceDeclaration | classOrInterfaceModifier* interfaceDeclaration | classOrInterfaceModifier classOrInterfaceModifier* interfaceDeclaration | annotationTypeDeclaration | classOrInterfaceModifier* annotationTypeDeclaration | classOrInterfaceModifier classOrInterfaceModifier* annotationTypeDeclaration | ';';
  995. t196: (';' resource)* | resource (';' resource)* | ';' resource (';' resource)*;
  996. t59: (catchClause+ finallyBlock? | finallyBlock) | catchClause* finallyBlock?;
  997. t91: (',' variableInitializer)* (',')? '}';
  998. t95: ')' | formalParameterList ')' | '(' formalParameterList? ')';
  999. t18: classBody?;
  1000. t234: blockStatement* '}';
  1001. t105: lastFormalParameter | ',' lastFormalParameter | (',' formalParameter)* (',' lastFormalParameter)? | formalParameter (',' formalParameter)* (',' lastFormalParameter)? | ',' formalParameter (',' formalParameter)* (',' lastFormalParameter)?;
  1002. t90: '}' | ',' '}' | (',' variableInitializer)* (',')? '}' | variableInitializer (',' variableInitializer)* (',')? '}' | ',' variableInitializer (',' variableInitializer)* (',')? '}' | '{' (variableInitializer (',' variableInitializer)* (',')?)? '}';
  1003. t83: classOrInterfaceModifier* classDeclaration | classOrInterfaceModifier* enumDeclaration | classOrInterfaceModifier* interfaceDeclaration | classOrInterfaceModifier* annotationTypeDeclaration;
  1004. t93: variableModifier* catchType Identifier ')' block;
  1005. t147: ')' | elementValuePairs ')' | elementValue ')' | '(' (elementValuePairs | elementValue)? ')' | annotationNameSuf ('(' (elementValuePairs | elementValue)? ')')? | annotationName ('(' (elementValuePairs | elementValue)? ')')? | '@' annotationName ('(' (elementValuePairs | elementValue)? ')')?;
  1006. t11: expression;
  1007. t143: expression | annotation | elementValueArrayInitializer;
  1008. t29: annotation | 'public' | 'protected' | 'private' | 'static' | 'abstract' | 'final' | 'strictfp';
  1009. t159: '.' Identifier | '.' 'this' | '.' 'new' nonWildcardTypeArguments? innerCreator | '.' 'super' superSuffix | '.' explicitGenericInvocation | ']' | '[' expression ']' | '(' expressionList? ')' | ('++' | '--') | ('*' | '/' | '%') expression | ('+' | '-') expression | ('<' '<' | '>' '>' '>' | '>' '>') expression | ('<=' | '>=' | '>' | '<') expression | 'instanceof' type | ('==' | '!=') expression | '&' expression | '^' expression | '|' expression | '&&' expression | '||' expression | ':' expression | '?' expression ':' expression | ('='<assoc=right> | '+='<assoc=right> | '-='<assoc=right> | '*='<assoc=right> | '/='<assoc=right> | '&='<assoc=right> | '|='<assoc=right> | '^='<assoc=right> | '>>='<assoc=right> | '>>>='<assoc=right> | '<<='<assoc=right> | '%='<assoc=right>) expression;
  1010. t58: 'else' statement | 'while' parExpression ';';
  1011. t122: expression | '=' expression | variableDeclaratorIdSuf '=' expression | variableDeclaratorId '=' expression | classOrInterfaceTypeSuf variableDeclaratorId '=' expression | classOrInterfaceType variableDeclaratorId '=' expression | variableModifier* classOrInterfaceType variableDeclaratorId '=' expression | variableModifier variableModifier* classOrInterfaceType variableDeclaratorId '=' expression;
  1012. t15: classBody | arguments classBody? | Identifier arguments? classBody? | annotation* Identifier arguments? classBody? | annotation annotation* Identifier arguments? classBody?;
  1013. t154: primary | Identifier | '.' Identifier | expression '.' Identifier | 'this' | '.' 'this' | expression '.' 'this' | innerCreator | nonWildcardTypeArgumentsSuf innerCreator | nonWildcardTypeArguments innerCreator | 'new' nonWildcardTypeArguments? innerCreator | '.' 'new' nonWildcardTypeArguments? innerCreator | expression '.' 'new' nonWildcardTypeArguments? innerCreator | superSuffix | 'super' superSuffix | '.' 'super' superSuffix | expression '.' 'super' superSuffix | explicitGenericInvocation | '.' explicitGenericInvocation | expression '.' explicitGenericInvocation | ']' | expression ']' | '[' expression ']' | expression '[' expression ']' | ')' | expressionList ')' | '(' expressionList? ')' | expression '(' expressionList? ')' | creator | 'new' creator | expression | ')' expression | typeSuf ')' expression | type ')' expression | '(' type ')' expression | '++' | '--' | expression ('++' | '--') | '+' expression | '-' expression | '++' expression | '--' expression | '~' expression | '!' expression | '*' expression | '/' expression | '%' expression | expression ('*' | '/' | '%') expression | expression ('+' | '-') expression | '<' expression | '<' '<' expression | '>' expression | '>' '>' expression | '>' '>' '>' expression | expression ('<' '<' | '>' '>' '>' | '>' '>') expression | '<=' expression | '>=' expression | expression ('<=' | '>=' | '>' | '<') expression | typeSuf | type | 'instanceof' type | expression 'instanceof' type | '==' expression | '!=' expression | expression ('==' | '!=') expression | '&' expression | expression '&' expression | '^' expression | expression '^' expression | '|' expression | expression '|' expression | '&&' expression | expression '&&' expression | '||' expression | expression '||' expression | ':' expression | expression ':' expression | '?' expression ':' expression | expression '?' expression ':' expression | '='<assoc=right> expression | '+='<assoc=right> expression | '-='<assoc=right> expression | '*='<assoc=right> expression | '/='<assoc=right> expression | '&='<assoc=right> expression | '|='<assoc=right> expression | '^='<assoc=right> expression | '>>='<assoc=right> expression | '>>>='<assoc=right> expression | '<<='<assoc=right> expression | '%='<assoc=right> expression | expression ('='<assoc=right> | '+='<assoc=right> | '-='<assoc=right> | '*='<assoc=right> | '/='<assoc=right> | '&='<assoc=right> | '|='<assoc=right> | '^='<assoc=right> | '>>='<assoc=right> | '>>>='<assoc=right> | '<<='<assoc=right> | '%='<assoc=right>) expression;
  1014. t208: ')' | expression ')' | '(' expression ')' | 'this' | 'super' | literalSuf | literal | Identifier | 'class' | '.' 'class' | typeSuf '.' 'class' | type '.' 'class' | 'void' '.' 'class' | explicitGenericInvocationSuffix | arguments | 'this' arguments | nonWildcardTypeArgumentsSuf (explicitGenericInvocationSuffix | 'this' arguments) | nonWildcardTypeArguments (explicitGenericInvocationSuffix | 'this' arguments);
  1015. t2: ('.' Identifier typeArguments?)*;
  1016. t190: blockStatement*;
  1017. t5: '>' | (',' typeArgument)* '>' | typeArgument (',' typeArgument)* '>' | ',' typeArgument (',' typeArgument)* '>' | '<' typeArgument (',' typeArgument)* '>';
  1018. t150: (',' expression)* | expression (',' expression)* | ',' expression (',' expression)*;
  1019. t113: annotationTypeElementRest | modifier* annotationTypeElementRest | modifier modifier* annotationTypeElementRest | ';';
  1020. t138: superSuffix | 'super' superSuffix | arguments | Identifier arguments;
  1021. t187: variableInitializer | '=' variableInitializer | variableDeclaratorIdSuf ('=' variableInitializer)? | variableDeclaratorId ('=' variableInitializer)?;
  1022. t174: arguments | Identifier arguments? | '.' Identifier arguments?;
  1023. t164: modifier* interfaceMemberDeclaration;
  1024. t60: classBody | typeListSuf classBody | typeList classBody | 'implements' typeList classBody | typeSuf ('implements' typeList)? classBody | type ('implements' typeList)? classBody | 'extends' type ('implements' typeList)? classBody | typeParametersSuf ('extends' type)? ('implements' typeList)? classBody | typeParameters ('extends' type)? ('implements' typeList)? classBody | Identifier typeParameters? ('extends' type)? ('implements' typeList)? classBody | 'class' Identifier typeParameters? ('extends' type)? ('implements' typeList)? classBody;
  1025. t101: modifier* memberDeclaration;
  1026. t212: variableDeclarators | typeSuf variableDeclarators | type variableDeclarators | variableModifier* type variableDeclarators | variableModifier variableModifier* type variableDeclarators;
  1027. t233: '}' | blockStatement* '}' | blockStatement blockStatement* '}' | '{' blockStatement* '}';
  1028. t19: ';' | variableDeclarators ';' | typeSuf variableDeclarators ';' | type variableDeclarators ';';
  1029. t129: interfaceBody | typeListSuf interfaceBody | typeList interfaceBody | 'extends' typeList interfaceBody | typeParametersSuf ('extends' typeList)? interfaceBody | typeParameters ('extends' typeList)? interfaceBody | Identifier typeParameters? ('extends' typeList)? interfaceBody | 'interface' Identifier typeParameters? ('extends' typeList)? interfaceBody;
  1030. t185: ';' | qualifiedNameListSuf ';' | qualifiedNameList ';' | 'throws' qualifiedNameList ';' | ('[' ']')* ('throws' qualifiedNameList)? ';' | ']' ('[' ']')* ('throws' qualifiedNameList)? ';' | '[' ']' ('[' ']')* ('throws' qualifiedNameList)? ';' | formalParameters ('[' ']')* ('throws' qualifiedNameList)? ';' | Identifier formalParameters ('[' ']')* ('throws' qualifiedNameList)? ';' | typeSuf Identifier formalParameters ('[' ']')* ('throws' qualifiedNameList)? ';' | type Identifier formalParameters ('[' ']')* ('throws' qualifiedNameList)? ';' | 'void' Identifier formalParameters ('[' ']')* ('throws' qualifiedNameList)? ';';
  1031. t169: ';' expression? ';' forUpdate?;
  1032. t213: variableModifier* type variableDeclarators;
  1033. t7: type | 'extends' type | 'super' type | '?' (('extends' | 'super') type)?;
  1034. t16: annotation* Identifier arguments? classBody?;
  1035. t31: methodBody | ';' | qualifiedNameListSuf (methodBody | ';') | qualifiedNameList (methodBody | ';') | 'throws' qualifiedNameList (methodBody | ';') | ('[' ']')* ('throws' qualifiedNameList)? (methodBody | ';') | ']' ('[' ']')* ('throws' qualifiedNameList)? (methodBody | ';') | '[' ']' ('[' ']')* ('throws' qualifiedNameList)? (methodBody | ';') | formalParameters ('[' ']')* ('throws' qualifiedNameList)? (methodBody | ';') | Identifier formalParameters ('[' ']')* ('throws' qualifiedNameList)? (methodBody | ';') | typeSuf Identifier formalParameters ('[' ']')* ('throws' qualifiedNameList)? (methodBody | ';') | type Identifier formalParameters ('[' ']')* ('throws' qualifiedNameList)? (methodBody | ';') | 'void' Identifier formalParameters ('[' ']')* ('throws' qualifiedNameList)? (methodBody | ';');
  1036. t92: block | ')' block | Identifier ')' block | catchTypeSuf Identifier ')' block | catchType Identifier ')' block | variableModifier* catchType Identifier ')' block | variableModifier variableModifier* catchType Identifier ')' block | '(' variableModifier* catchType Identifier ')' block | 'catch' '(' variableModifier* catchType Identifier ')' block;
  1037. t103: defaultValue | ')' defaultValue? | '(' ')' defaultValue? | Identifier '(' ')' defaultValue?;
  1038. t191: switchLabel* blockStatement+;
  1039. t230: ('throws' qualifiedNameList)? constructorBody;
  1040. t32: ('[' ']')* ('throws' qualifiedNameList)? (methodBody | ';');
  1041. t76: localVariableDeclaration | expressionList;
  1042. t43: (',' elementValue)* (',')? '}';
  1043. t127: ';' | (',' constantDeclarator)* ';' | constantDeclarator (',' constantDeclarator)* ';' | ',' constantDeclarator (',' constantDeclarator)* ';' | typeSuf constantDeclarator (',' constantDeclarator)* ';' | type constantDeclarator (',' constantDeclarator)* ';';
  1044. t200: ','? enumBodyDeclarations? '}';
  1045. t57: ')' statement;
  1046. t34: methodDeclaration | typeParametersSuf methodDeclaration | typeParameters methodDeclaration;
  1047. t80: ']' ('[' expression ']')* ('[' ']')*;
  1048. t151: (',' expression)*;
  1049. t38: (',' variableDeclarator)* | variableDeclarator (',' variableDeclarator)* | ',' variableDeclarator (',' variableDeclarator)*;
  1050. t45: variableModifier* type '...' variableDeclaratorId;
  1051. t165: ')' | expressionList ')' | '(' expressionList? ')';
  1052. t107: (',' formalParameter)* (',' lastFormalParameter)?;
  1053. t183: ')' | ';' ')' | resources ';'? ')' | '(' resources ';'? ')';
  1054. t39: (',' variableDeclarator)*;
  1055. t96: ')';
  1056. t203: arrayInitializer | expression;
  1057. t136: variableDeclaratorIdSuf | variableDeclaratorId | typeSuf variableDeclaratorId | type variableDeclaratorId | variableModifier* type variableDeclaratorId | variableModifier variableModifier* type variableDeclaratorId;
  1058. t51: statement ('else' statement)? | statement | ';' | '{' switchBlockStatementGroup* switchLabel* '}' | block;
  1059. t123: variableModifier* classOrInterfaceType variableDeclaratorId '=' expression;
  1060. t137: variableModifier* type variableDeclaratorId;
  1061. t199: '}';
  1062. t216: interfaceBodyDeclaration* '}';
  1063. t44: variableDeclaratorIdSuf | variableDeclaratorId | '...' variableDeclaratorId | typeSuf '...' variableDeclaratorId | type '...' variableDeclaratorId | variableModifier* type '...' variableDeclaratorId | variableModifier variableModifier* type '...' variableDeclaratorId;
  1064. t184: ';'? ')';
  1065. t48: block | ';' | expression ';' | ':' expression ';' | expression (':' expression)? ';' | ASSERT expression (':' expression)? ';' | statement | 'else' statement | statement ('else' statement)? | parExpression statement ('else' statement)? | 'if' parExpression statement ('else' statement)? | ')' statement | forControl ')' statement | '(' forControl ')' statement | 'for' '(' forControl ')' statement | parExpression statement | 'while' parExpression statement | parExpression ';' | 'while' parExpression ';' | statement 'while' parExpression ';' | 'do' statement 'while' parExpression ';' | finallyBlock | catchClause catchClause* finallyBlock? | block (catchClause+ finallyBlock? | finallyBlock) | 'try' block (catchClause+ finallyBlock? | finallyBlock) | catchClause* finallyBlock? | block catchClause* finallyBlock? | resourceSpecification block catchClause* finallyBlock? | 'try' resourceSpecification block catchClause* finallyBlock? | '}' | switchLabel* '}' | switchLabel switchLabel* '}' | switchBlockStatementGroup* switchLabel* '}' | switchBlockStatementGroup switchBlockStatementGroup* switchLabel* '}' | '{' switchBlockStatementGroup* switchLabel* '}' | parExpression '{' switchBlockStatementGroup* switchLabel* '}' | 'switch' parExpression '{' switchBlockStatementGroup* switchLabel* '}' | parExpression block | 'synchronized' parExpression block | 'return' expression? ';' | 'throw' expression ';' | Identifier ';' | 'break' Identifier? ';' | 'continue' Identifier? ';' | statementExpression ';' | ':' statement | Identifier ':' statement;
  1066. t108: annotationTypeBody | Identifier annotationTypeBody | 'interface' Identifier annotationTypeBody | '@' 'interface' Identifier annotationTypeBody;
  1067. t125: ':' | constantExpression ':' | 'case' constantExpression ':' | enumConstantNameSuf ':' | enumConstantName ':' | 'case' enumConstantName ':' | 'default' ':';
  1068. t228: constructorBody | qualifiedNameListSuf constructorBody | qualifiedNameList constructorBody | 'throws' qualifiedNameList constructorBody | formalParameters ('throws' qualifiedNameList)? constructorBody | Identifier formalParameters ('throws' qualifiedNameList)? constructorBody;
  1069. t99: ';' | block | 'static' block | memberDeclaration | modifier* memberDeclaration | modifier modifier* memberDeclaration;
  1070. t120: ')' | expression ')' | '(' expression ')';
  1071. t206: classCreatorRest | nonWildcardTypeArgumentsOrDiamondSuf classCreatorRest | nonWildcardTypeArgumentsOrDiamond classCreatorRest | Identifier nonWildcardTypeArgumentsOrDiamond? classCreatorRest;
  1072. t176: localVariableDeclarationStatement | statement | typeDeclaration;
  1073. t217: constDeclaration | interfaceMethodDeclaration | genericInterfaceMethodDeclaration | interfaceDeclaration | annotationTypeDeclaration | classDeclaration | enumDeclaration;
  1074.  
  1075. // LEXER
  1076.  
  1077. // §3.9 Keywords
  1078.  
  1079. ABSTRACT : 'abstract';
  1080. ASSERT : 'assert';
  1081. BOOLEAN : 'boolean';
  1082. BREAK : 'break';
  1083. BYTE : 'byte';
  1084. CASE : 'case';
  1085. CATCH : 'catch';
  1086. CHAR : 'char';
  1087. CLASS : 'class';
  1088. CONST : 'const';
  1089. CONTINUE : 'continue';
  1090. DEFAULT : 'default';
  1091. DO : 'do';
  1092. DOUBLE : 'double';
  1093. ELSE : 'else';
  1094. ENUM : 'enum';
  1095. EXTENDS : 'extends';
  1096. FINAL : 'final';
  1097. FINALLY : 'finally';
  1098. FLOAT : 'float';
  1099. FOR : 'for';
  1100. IF : 'if';
  1101. GOTO : 'goto';
  1102. IMPLEMENTS : 'implements';
  1103. IMPORT : 'import';
  1104. INSTANCEOF : 'instanceof';
  1105. INT : 'int';
  1106. INTERFACE : 'interface';
  1107. LONG : 'long';
  1108. NATIVE : 'native';
  1109. NEW : 'new';
  1110. PACKAGE : 'package';
  1111. PRIVATE : 'private';
  1112. PROTECTED : 'protected';
  1113. PUBLIC : 'public';
  1114. RETURN : 'return';
  1115. SHORT : 'short';
  1116. STATIC : 'static';
  1117. STRICTFP : 'strictfp';
  1118. SUPER : 'super';
  1119. SWITCH : 'switch';
  1120. SYNCHRONIZED : 'synchronized';
  1121. THIS : 'this';
  1122. THROW : 'throw';
  1123. THROWS : 'throws';
  1124. TRANSIENT : 'transient';
  1125. TRY : 'try';
  1126. VOID : 'void';
  1127. VOLATILE : 'volatile';
  1128. WHILE : 'while';
  1129.  
  1130. // §3.10.1 Integer Literals
  1131.  
  1132. IntegerLiteral
  1133. : DecimalIntegerLiteral
  1134. | HexIntegerLiteral
  1135. | OctalIntegerLiteral
  1136. | BinaryIntegerLiteral
  1137. ;
  1138.  
  1139. fragment
  1140. DecimalIntegerLiteral
  1141. : DecimalNumeral IntegerTypeSuffix?
  1142. ;
  1143.  
  1144. fragment
  1145. HexIntegerLiteral
  1146. : HexNumeral IntegerTypeSuffix?
  1147. ;
  1148.  
  1149. fragment
  1150. OctalIntegerLiteral
  1151. : OctalNumeral IntegerTypeSuffix?
  1152. ;
  1153.  
  1154. fragment
  1155. BinaryIntegerLiteral
  1156. : BinaryNumeral IntegerTypeSuffix?
  1157. ;
  1158.  
  1159. fragment
  1160. IntegerTypeSuffix
  1161. : [lL]
  1162. ;
  1163.  
  1164. fragment
  1165. DecimalNumeral
  1166. : '0'
  1167. | NonZeroDigit (Digits? | Underscores Digits)
  1168. ;
  1169.  
  1170. fragment
  1171. Digits
  1172. : Digit (DigitOrUnderscore* Digit)?
  1173. ;
  1174.  
  1175. fragment
  1176. Digit
  1177. : '0'
  1178. | NonZeroDigit
  1179. ;
  1180.  
  1181. fragment
  1182. NonZeroDigit
  1183. : [1-9]
  1184. ;
  1185.  
  1186. fragment
  1187. DigitOrUnderscore
  1188. : Digit
  1189. | '_'
  1190. ;
  1191.  
  1192. fragment
  1193. Underscores
  1194. : '_'+
  1195. ;
  1196.  
  1197. fragment
  1198. HexNumeral
  1199. : '0' [xX] HexDigits
  1200. ;
  1201.  
  1202. fragment
  1203. HexDigits
  1204. : HexDigit (HexDigitOrUnderscore* HexDigit)?
  1205. ;
  1206.  
  1207. fragment
  1208. HexDigit
  1209. : [0-9a-fA-F]
  1210. ;
  1211.  
  1212. fragment
  1213. HexDigitOrUnderscore
  1214. : HexDigit
  1215. | '_'
  1216. ;
  1217.  
  1218. fragment
  1219. OctalNumeral
  1220. : '0' Underscores? OctalDigits
  1221. ;
  1222.  
  1223. fragment
  1224. OctalDigits
  1225. : OctalDigit (OctalDigitOrUnderscore* OctalDigit)?
  1226. ;
  1227.  
  1228. fragment
  1229. OctalDigit
  1230. : [0-7]
  1231. ;
  1232.  
  1233. fragment
  1234. OctalDigitOrUnderscore
  1235. : OctalDigit
  1236. | '_'
  1237. ;
  1238.  
  1239. fragment
  1240. BinaryNumeral
  1241. : '0' [bB] BinaryDigits
  1242. ;
  1243.  
  1244. fragment
  1245. BinaryDigits
  1246. : BinaryDigit (BinaryDigitOrUnderscore* BinaryDigit)?
  1247. ;
  1248.  
  1249. fragment
  1250. BinaryDigit
  1251. : [01]
  1252. ;
  1253.  
  1254. fragment
  1255. BinaryDigitOrUnderscore
  1256. : BinaryDigit
  1257. | '_'
  1258. ;
  1259.  
  1260. // §3.10.2 Floating-Point Literals
  1261.  
  1262. FloatingPointLiteral
  1263. : DecimalFloatingPointLiteral
  1264. | HexadecimalFloatingPointLiteral
  1265. ;
  1266.  
  1267. fragment
  1268. DecimalFloatingPointLiteral
  1269. : Digits '.' Digits? ExponentPart? FloatTypeSuffix?
  1270. | '.' Digits ExponentPart? FloatTypeSuffix?
  1271. | Digits ExponentPart FloatTypeSuffix?
  1272. | Digits FloatTypeSuffix
  1273. ;
  1274.  
  1275. fragment
  1276. ExponentPart
  1277. : ExponentIndicator SignedInteger
  1278. ;
  1279.  
  1280. fragment
  1281. ExponentIndicator
  1282. : [eE]
  1283. ;
  1284.  
  1285. fragment
  1286. SignedInteger
  1287. : Sign? Digits
  1288. ;
  1289.  
  1290. fragment
  1291. Sign
  1292. : [+-]
  1293. ;
  1294.  
  1295. fragment
  1296. FloatTypeSuffix
  1297. : [fFdD]
  1298. ;
  1299.  
  1300. fragment
  1301. HexadecimalFloatingPointLiteral
  1302. : HexSignificand BinaryExponent FloatTypeSuffix?
  1303. ;
  1304.  
  1305. fragment
  1306. HexSignificand
  1307. : HexNumeral '.'?
  1308. | '0' [xX] HexDigits? '.' HexDigits
  1309. ;
  1310.  
  1311. fragment
  1312. BinaryExponent
  1313. : BinaryExponentIndicator SignedInteger
  1314. ;
  1315.  
  1316. fragment
  1317. BinaryExponentIndicator
  1318. : [pP]
  1319. ;
  1320.  
  1321. // §3.10.3 Boolean Literals
  1322.  
  1323. BooleanLiteral
  1324. : 'true'
  1325. | 'false'
  1326. ;
  1327.  
  1328. // §3.10.4 Character Literals
  1329.  
  1330. CharacterLiteral
  1331. : '\'' SingleCharacter '\''
  1332. | '\'' EscapeSequence '\''
  1333. ;
  1334.  
  1335. fragment
  1336. SingleCharacter
  1337. : ~['\\]
  1338. ;
  1339.  
  1340. // §3.10.5 String Literals
  1341.  
  1342. StringLiteral
  1343. : '"' StringCharacters? '"'
  1344. ;
  1345.  
  1346. fragment
  1347. StringCharacters
  1348. : StringCharacter+
  1349. ;
  1350.  
  1351. fragment
  1352. StringCharacter
  1353. : ~["\\]
  1354. | EscapeSequence
  1355. ;
  1356.  
  1357. // §3.10.6 Escape Sequences for Character and String Literals
  1358.  
  1359. fragment
  1360. EscapeSequence
  1361. : '\\' [btnfr"'\\]
  1362. | OctalEscape
  1363. | UnicodeEscape
  1364. ;
  1365.  
  1366. fragment
  1367. OctalEscape
  1368. : '\\' OctalDigit
  1369. | '\\' OctalDigit OctalDigit
  1370. | '\\' ZeroToThree OctalDigit OctalDigit
  1371. ;
  1372.  
  1373. fragment
  1374. UnicodeEscape
  1375. : '\\' 'u' HexDigit HexDigit HexDigit HexDigit
  1376. ;
  1377.  
  1378. fragment
  1379. ZeroToThree
  1380. : [0-3]
  1381. ;
  1382.  
  1383. // §3.10.7 The Null Literal
  1384.  
  1385. NullLiteral
  1386. : 'null'
  1387. ;
  1388.  
  1389. // §3.11 Separators
  1390.  
  1391. LPAREN : '(';
  1392. RPAREN : ')';
  1393. LBRACE : '{';
  1394. RBRACE : '}';
  1395. LBRACK : '[';
  1396. RBRACK : ']';
  1397. SEMI : ';';
  1398. COMMA : ',';
  1399. DOT : '.';
  1400.  
  1401. // §3.12 Operators
  1402.  
  1403. ASSIGN : '=';
  1404. GT : '>';
  1405. LT : '<';
  1406. BANG : '!';
  1407. TILDE : '~';
  1408. QUESTION : '?';
  1409. COLON : ':';
  1410. EQUAL : '==';
  1411. LE : '<=';
  1412. GE : '>=';
  1413. NOTEQUAL : '!=';
  1414. AND : '&&';
  1415. OR : '||';
  1416. INC : '++';
  1417. DEC : '--';
  1418. ADD : '+';
  1419. SUB : '-';
  1420. MUL : '*';
  1421. DIV : '/';
  1422. BITAND : '&';
  1423. BITOR : '|';
  1424. CARET : '^';
  1425. MOD : '%';
  1426.  
  1427. ADD_ASSIGN : '+=';
  1428. SUB_ASSIGN : '-=';
  1429. MUL_ASSIGN : '*=';
  1430. DIV_ASSIGN : '/=';
  1431. AND_ASSIGN : '&=';
  1432. OR_ASSIGN : '|=';
  1433. XOR_ASSIGN : '^=';
  1434. MOD_ASSIGN : '%=';
  1435. LSHIFT_ASSIGN : '<<=';
  1436. RSHIFT_ASSIGN : '>>=';
  1437. URSHIFT_ASSIGN : '>>>=';
  1438.  
  1439. // §3.8 Identifiers (must appear after all keywords in the grammar)
  1440.  
  1441. Identifier
  1442. : JavaLetter JavaLetterOrDigit*
  1443. ;
  1444.  
  1445. fragment
  1446. JavaLetter
  1447. : [a-zA-Z$_] // these are the "java letters" below 0xFF
  1448. | // covers all characters above 0xFF which are not a surrogate
  1449. ~[\u0000-\u00FF\uD800-\uDBFF]
  1450. {Character.isJavaIdentifierStart(_input.LA(-1))}?
  1451. | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
  1452. [\uD800-\uDBFF] [\uDC00-\uDFFF]
  1453. {Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}?
  1454. ;
  1455.  
  1456. fragment
  1457. JavaLetterOrDigit
  1458. : [a-zA-Z0-9$_] // these are the "java letters or digits" below 0xFF
  1459. | // covers all characters above 0xFF which are not a surrogate
  1460. ~[\u0000-\u00FF\uD800-\uDBFF]
  1461. {Character.isJavaIdentifierPart(_input.LA(-1))}?
  1462. | // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
  1463. [\uD800-\uDBFF] [\uDC00-\uDFFF]
  1464. {Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}?
  1465. ;
  1466.  
  1467. //
  1468. // Additional symbols not defined in the lexical specification
  1469. //
  1470.  
  1471. AT : '@';
  1472. ELLIPSIS : '...';
  1473.  
  1474. //
  1475. // Whitespace and comments
  1476. //
  1477.  
  1478. WS : [ \t\r\n\u000C]+ -> skip
  1479. ;
  1480.  
  1481. COMMENT
  1482. : '/*' .*? '*/' -> skip
  1483. ;
  1484.  
  1485. LINE_COMMENT
  1486. : '//' ~[\r\n]* -> skip
  1487. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement