[antlr-interest] Excluding keywords
Avid Trober
avidtrober at gmail.com
Wed Jun 10 20:40:29 PDT 2009
I saw something close to my problem on the wiki, http://www.antlr.org/pipermail/antlr-interest/2006-June/016563.html
But, I've got an "extra rule", filter. Must I resort to an action, or is there a way to do this purely in the grammar file?
filter : // identifier, but *not* a keyword
;
keyword : APPLY
| BROWSE
| CLOSE
| OPEN
;
identifier : ('A'..'Z' | 'a'..'z') ('A'..'Z' | 'a'..'z' | '0'..'9' | '_')*
;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090610/ecc618c6/attachment.html
More information about the antlr-interest
mailing list