forked from jasder/antlr
fix playground
This commit is contained in:
parent
db1bfa9c03
commit
3575e9c3c7
|
@ -23,4 +23,4 @@ expr: INT
|
|||
|
||||
ID : ('a'..'z'|'A'..'Z')+ ;
|
||||
INT : '0'..'9'+ ;
|
||||
WS : (' '|'\t'|'\n'|'\r')+ {$channel=HIDDEN;} ;
|
||||
WS : (' '|'\t'|'\n'|'\r')+ {setChannel(HIDDEN);} ;
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
a = b;
|
|
@ -1,10 +0,0 @@
|
|||
grammar Fuzzy;
|
||||
|
||||
options { tokenVocab=JavaLR; }
|
||||
|
||||
scan: (pattern|.)* EOF ;
|
||||
|
||||
pattern
|
||||
: a=Identifier '=' b=Identifier ';'
|
||||
{System.out.printf("assign %s=%s", $a.text, $b.text);}
|
||||
;
|
|
@ -141,10 +141,10 @@ fragment
|
|||
UnicodeEscape
|
||||
: '\\' 'u' HexDigit HexDigit HexDigit HexDigit
|
||||
;// $ANTLR src "JavaCombined.g" 963
|
||||
ENUM: 'enum' {if (!enumIsKeyword) $type=Identifier;}
|
||||
ENUM: 'enum' {if (!enumIsKeyword) setType(Identifier);}
|
||||
;// $ANTLR src "JavaCombined.g" 966
|
||||
ASSERT
|
||||
: 'assert' {if (!assertIsKeyword) $type=Identifier;}
|
||||
: 'assert' {if (!assertIsKeyword) setType(Identifier);}
|
||||
;// $ANTLR src "JavaCombined.g" 970
|
||||
Identifier
|
||||
: Letter (Letter|JavaIDDigit)*
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
grammar T;
|
||||
options {k=3;}
|
||||
s : ID ;
|
||||
ID : 'a'..'z'+ ;
|
||||
WS : (' '|'\n') {skip();} ;
|
||||
|
|
Loading…
Reference in New Issue