diff --git a/tool/playground/AA.g b/tool/playground/AA.g index da3fb75fe..bb22bf9b2 100644 --- a/tool/playground/AA.g +++ b/tool/playground/AA.g @@ -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);} ; diff --git a/tool/playground/Fuzzy-input b/tool/playground/Fuzzy-input deleted file mode 100644 index 321b51018..000000000 --- a/tool/playground/Fuzzy-input +++ /dev/null @@ -1 +0,0 @@ -a = b; diff --git a/tool/playground/Fuzzy.g4 b/tool/playground/Fuzzy.g4 deleted file mode 100644 index a9c1ba601..000000000 --- a/tool/playground/Fuzzy.g4 +++ /dev/null @@ -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);} - ; diff --git a/tool/playground/JavaLexer.g b/tool/playground/JavaLexer.g index ec88e509a..46a4963ad 100644 --- a/tool/playground/JavaLexer.g +++ b/tool/playground/JavaLexer.g @@ -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)* diff --git a/tool/playground/T.g b/tool/playground/T.g index 3cf82b68e..03d4c1128 100644 --- a/tool/playground/T.g +++ b/tool/playground/T.g @@ -1,4 +1,5 @@ grammar T; +options {k=3;} s : ID ; ID : 'a'..'z'+ ; WS : (' '|'\n') {skip();} ;