[antlr-interest] Using a Parser as a TokenFilter

Trey Spiva Trey.Spiva at embarcadero.com
Wed Jun 26 10:02:00 PDT 2002


> > Only pity that those 'kludges' were necessary to work around
> > the EOL/EOF
> > stuff, it obscures the concept a bit. Then again nothing is
> > ever easy ;)
> 
> Ah, the joys of ANTLR... but really, it is cool what you can do when you
> know what you are doing.  If a couple other people could find a use for
> this
> technique then we can look at supporting it somehow from antlr the tool.
> 
[Trey Spiva] 
Visual Basic will allow you to reserved words as data member names. (Who
thought that was a good idea?)  The syntax is:

[ (<RESERVE WORD> | IDENTIFIER) ]

I thought that this technique would be a good solution.  It will at least
keep me from having to write something like the following:

[ (LOOP | IF | END | WHILE | DO| ... | IDENTIFIER) ]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list