Hi everyone,
I wanna write a tree grammar. But when I write "tree grammar MyGrammar;" at
the beginning of my .g file and then write some lexer rules such as
INTEGER : ('0'..'9')+
, I get an error saying "lexer rule INTEGER not allowed in parser". How
would I handle this issue? If I first write "grammar MyGrammar;" to my .g
file and after listing rules and tokens write "tree grammar MyGrammar;" in
order to parsing the tree, I get a syntax error. In ANTLR v2, we were able
to declare lexer, parser, and then tree walker in the same .g file. What is
the way of it in v3? Or how would I declare tokens such as INTEGER above to
the tree grammar?
--
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address