Skip to content
Snippets Groups Projects

Resolve "Grammar Bugs (VariableArityParameter and multiple catch types)"

Merged Johannes Mey requested to merge bug/lexer-and-grammar-bugs into develop
3 files
+ 5
5
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -197,7 +197,7 @@ method_declarator ::= java_identifier formal_parameters (LBRACKET RBRACKET)*
formal_parameters ::= LPAREN ( formal_parameter ( COMMA formal_parameter )* )? RPAREN
formal_parameter ::= FINAL? type DOTS? variable_declarator_id
formal_parameter ::= FINAL? type ELLIPSIS? variable_declarator_id
constructor_declaration ::= type_parameters? java_identifier formal_parameters (THROWS name_list)? LBRACE explicit_constructor_invocation? block_statement* RBRACE
@@ -361,7 +361,7 @@ throw_statement ::= THROW expression SEMICOLON
synchronized_statement ::= SYNCHRONIZED LPAREN expression RPAREN block
try_statement ::= TRY ( LPAREN local_variable_declaration ( SEMICOLON local_variable_declaration )* SEMICOLON? RPAREN )? block ( CATCH LPAREN FINAL? type ( BIT_OR FINAL type )* variable_declarator_id RPAREN block )* ( FINALLY block )?
try_statement ::= TRY ( LPAREN local_variable_declaration ( SEMICOLON local_variable_declaration )* SEMICOLON? RPAREN )? block ( CATCH LPAREN FINAL? type ( BIT_OR FINAL? type )* variable_declarator_id RPAREN block )* ( FINALLY block )?
// TODO maybe change order!
annotation ::= ( normal_annotation | single_member_annotation | marker_annotation )
@@ -409,4 +409,4 @@ parameter_name ::= IDENTIFIER
method_name ::= IDENTIFIER
// unused keywords must still appear somewhere
unused_keywords ::= GOTO | CONST ELLIPSIS | PACKAGE
unused_keywords ::= GOTO | CONST | PACKAGE
Loading