forked from jasder/antlr
Fix Java test grammars
This commit is contained in:
parent
72c1fc8f6d
commit
6db106855f
|
@ -876,11 +876,11 @@ UnicodeEscape
|
|||
: '\\' 'u' HexDigit HexDigit HexDigit HexDigit
|
||||
;
|
||||
|
||||
ENUM: 'enum' {if (!enumIsKeyword) $type=Identifier;}
|
||||
ENUM: 'enum' {enumIsKeyword}?
|
||||
;
|
||||
|
||||
ASSERT
|
||||
: 'assert' {if (!assertIsKeyword) $type=Identifier;}
|
||||
: 'assert' {assertIsKeyword}?
|
||||
;
|
||||
|
||||
Identifier
|
||||
|
@ -930,7 +930,7 @@ WS : (' '|'\r'|'\t'|'\u000C'|'\n')+ -> channel(HIDDEN)
|
|||
;
|
||||
|
||||
COMMENT
|
||||
: '/*' .* '*/' -> channel(HIDDEN)
|
||||
: '/*' .*? '*/' -> channel(HIDDEN)
|
||||
;
|
||||
|
||||
LINE_COMMENT
|
||||
|
|
|
@ -969,11 +969,11 @@ UnicodeEscape
|
|||
: '\\' 'u' HexDigit HexDigit HexDigit HexDigit
|
||||
;
|
||||
|
||||
ENUM: 'enum' {if (!enumIsKeyword) $type=Identifier;}
|
||||
ENUM: 'enum' {enumIsKeyword}?
|
||||
;
|
||||
|
||||
ASSERT
|
||||
: 'assert' {if (!assertIsKeyword) $type=Identifier;}
|
||||
: 'assert' {assertIsKeyword}?
|
||||
;
|
||||
|
||||
Identifier
|
||||
|
@ -1019,13 +1019,13 @@ JavaIDDigit
|
|||
'\u1040'..'\u1049'
|
||||
;
|
||||
|
||||
WS : (' '|'\r'|'\t'|'\u000C'|'\n')+ {$channel=HIDDEN;}
|
||||
WS : (' '|'\r'|'\t'|'\u000C'|'\n')+ -> channel(HIDDEN)
|
||||
;
|
||||
|
||||
COMMENT
|
||||
: '/*' .* '*/' {$channel=HIDDEN;}
|
||||
: '/*' .*? '*/' -> channel(HIDDEN)
|
||||
;
|
||||
|
||||
LINE_COMMENT
|
||||
: '//' ~('\n'|'\r')* '\r'? '\n' {$channel=HIDDEN;}
|
||||
: '//' ~('\n'|'\r')* '\r'? '\n' -> channel(HIDDEN)
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue