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')+ ;
|
ID : ('a'..'z'|'A'..'Z')+ ;
|
||||||
INT : '0'..'9'+ ;
|
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
|
UnicodeEscape
|
||||||
: '\\' 'u' HexDigit HexDigit HexDigit HexDigit
|
: '\\' 'u' HexDigit HexDigit HexDigit HexDigit
|
||||||
;// $ANTLR src "JavaCombined.g" 963
|
;// $ANTLR src "JavaCombined.g" 963
|
||||||
ENUM: 'enum' {if (!enumIsKeyword) $type=Identifier;}
|
ENUM: 'enum' {if (!enumIsKeyword) setType(Identifier);}
|
||||||
;// $ANTLR src "JavaCombined.g" 966
|
;// $ANTLR src "JavaCombined.g" 966
|
||||||
ASSERT
|
ASSERT
|
||||||
: 'assert' {if (!assertIsKeyword) $type=Identifier;}
|
: 'assert' {if (!assertIsKeyword) setType(Identifier);}
|
||||||
;// $ANTLR src "JavaCombined.g" 970
|
;// $ANTLR src "JavaCombined.g" 970
|
||||||
Identifier
|
Identifier
|
||||||
: Letter (Letter|JavaIDDigit)*
|
: Letter (Letter|JavaIDDigit)*
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
grammar T;
|
grammar T;
|
||||||
|
options {k=3;}
|
||||||
s : ID ;
|
s : ID ;
|
||||||
ID : 'a'..'z'+ ;
|
ID : 'a'..'z'+ ;
|
||||||
WS : (' '|'\n') {skip();} ;
|
WS : (' '|'\n') {skip();} ;
|
||||||
|
|
Loading…
Reference in New Issue