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

Anakreon anakreonmejdi at yahoo.gr
Wed Sep 8 03:25:00 PDT 2004

Francis ANDRE wrote:
>>Hi.  Well, that's pretty specialized.  Further, all you have to do is
>>add them to the hashtable of literals with the same token type and
>>it'll just work. :)
> Yes, it is what I have done for now
> But the problem is the maintenance and the lisibility of a grammar
> maintained by a third party. IMHO, it would better to express the fact that
> a token has more than one lexeme or textual representaiton in the grammar
> itself than in a additional derivative generated lexer. (Just for you to get
> my point, my grammar has more than 260 tokens with at least 20 synonyms)
> Make the evidence evident whenever possible is a quite good rule when
> programming!
I agree with this opinion although I have never faced a case where
synonimes are required. Synonimes is part of the language so it should
be expressed in antlr instead of doing it via action code.


Yahoo! Groups Links

<*> To visit your group on the web, go to:

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

<*> Your use of Yahoo! Groups is subject to:

More information about the antlr-interest mailing list