diff --git a/tool/test/org/antlr/v4/test/Java-LR.g4 b/tool/test/org/antlr/v4/test/Java-LR.g4 index 7e0963983..df28d82e3 100644 --- a/tool/test/org/antlr/v4/test/Java-LR.g4 +++ b/tool/test/org/antlr/v4/test/Java-LR.g4 @@ -504,7 +504,7 @@ literal | FloatingPointLiteral | CharacterLiteral | StringLiteral - | booleanLiteral + | BooleanLiteral | 'null' ; @@ -514,11 +514,6 @@ integerLiteral | DecimalLiteral ; -booleanLiteral - : 'true' - | 'false' - ; - // ANNOTATIONS annotations @@ -917,6 +912,13 @@ HexExponent : ('p'|'P') ('+'|'-')? ('0'..'9')+ ; fragment FloatTypeSuffix : ('f'|'F'|'d'|'D') ; +// §3.10.3 Boolean Literals + +BooleanLiteral + : 'true' + | 'false' + ; + CharacterLiteral : '\'' ( EscapeSequence | ~('\''|'\\') ) '\'' ; diff --git a/tool/test/org/antlr/v4/test/Java.g4 b/tool/test/org/antlr/v4/test/Java.g4 index 751cfcd06..69f29c57f 100644 --- a/tool/test/org/antlr/v4/test/Java.g4 +++ b/tool/test/org/antlr/v4/test/Java.g4 @@ -501,7 +501,7 @@ literal | FloatingPointLiteral | CharacterLiteral | StringLiteral - | booleanLiteral + | BooleanLiteral | 'null' ; @@ -511,11 +511,6 @@ integerLiteral | DecimalLiteral ; -booleanLiteral - : 'true' - | 'false' - ; - // ANNOTATIONS annotations @@ -1019,6 +1014,13 @@ HexExponent : ('p'|'P') ('+'|'-')? ('0'..'9')+ ; fragment FloatTypeSuffix : ('f'|'F'|'d'|'D') ; +// §3.10.3 Boolean Literals + +BooleanLiteral + : 'true' + | 'false' + ; + CharacterLiteral : '\'' ( EscapeSequence | ~('\''|'\\') ) '\'' ;