[antlr-interest] Re: ANTLR274: Small functional extension proposal: synonym

lgcraymer lgc at mail1.jpl.nasa.gov
Tue Sep 7 17:33:39 PDT 2004


Didn't dlg support this sort of thing via token sets?  I'm with Ter on
this one, BTW--this sort of aliasing can be done in the parser
(including setting the token type, if that is desirable) easily and
with minor effort in the lexer (check the ID tokens to see if they
match any in the list and setting the token type if they do--that is
expensive, but no more so than for an automated mechanism).  The
parser approach is the more efficient, so why support it in the lexer?

--Loring


--- In antlr-interest at yahoogroups.com, Terence Parr <parrt at c...> wrote:
> 
> On Sep 7, 2004, at 12:29 PM, Monty Zukowski wrote:
> 
> > Actually this comes up more than you might think.  It wouldn't be that
> > hard to do, would it?
> 
> Well, I normally argue that adding a feature (even if easy to do) 
> should require lots of motivation.  I've never run into the problem 
> except perhaps in some minor way and I've done a few grammars.  Can you 
> give some more examples?
> 
> Thanks,
> Ter
> --
> CS Professor & Grad Director, University of San Francisco
> Creator, ANTLR Parser Generator, http://www.antlr.org
> Cofounder, http://www.jguru.com
> Cofounder, http://www.knowspam.net enjoy email again!



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list