[antlr-interest] Ignore reserved word and treat it as TOKEN

Hiten R antlr3 at gmail.com
Wed Mar 23 09:20:28 PDT 2011


Hi,


Working on this problem for two days and I don`t seem to be any closer than
where I started.


I have defined a combination of reserved words in grammar something like

//grammar
| ‘ip’ ‘route’ call_parser_method
| ‘some’ do_something_else


But when a parser encounters a line “some other line with ip text” it treats
ip token as a reserved word and it tries to look for a 'route' after ip and
finds 'text'. How do I get around this problem?


Any help would be appreciated.


Thx

Hiten


More information about the antlr-interest mailing list