'true' and 'false' are both lexed as a BooleanLiteral token

This commit is contained in:
Sam Harwell 2013-05-18 11:09:22 -05:00
parent d9e1289d13
commit 9bd3e965ef
2 changed files with 16 additions and 12 deletions

View File

@ -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 | ~('\''|'\\') ) '\''
;

View File

@ -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 | ~('\''|'\\') ) '\''
;