forked from jasder/antlr
allow "tokens {}"
This commit is contained in:
parent
c8a51ccfad
commit
ea652962ea
|
@ -1,9 +1,13 @@
|
|||
ANTLR v4 Honey Badger
|
||||
|
||||
September 28, 2012
|
||||
|
||||
* empty "tokens {}" is ok now.
|
||||
|
||||
September 22, 2012
|
||||
|
||||
* Rule exception handlers weren't passed to the generated code
|
||||
* $ruleattribute.foo weren't handled properly
|
||||
* Added -package option
|
||||
|
||||
September 18, 2012 -- 4.0b1 release
|
||||
September 18, 2012 -- 4.0b1 release
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
grammar T;
|
||||
<<<<<<< .merge_file_0gRgFB
|
||||
s : A ;
|
||||
A : 'a';
|
||||
=======
|
||||
|
||||
tokens {}
|
||||
s : INT+ ;
|
||||
|
||||
ID : [a-z]+ ;
|
||||
INT : [0-9]+ ;
|
||||
WS : [ \t\n]+ -> skip ;
|
||||
>>>>>>> .merge_file_bd3U11
|
||||
|
|
|
@ -284,6 +284,7 @@ delegateGrammar
|
|||
*/
|
||||
tokensSpec
|
||||
: TOKENS_SPEC id (COMMA id)* RBRACE -> ^(TOKENS_SPEC id+)
|
||||
| TOKENS_SPEC RBRACE ->
|
||||
;
|
||||
|
||||
// A declaration of a language target specifc section,
|
||||
|
|
Loading…
Reference in New Issue