[antlr-interest] Re: Questions about learning ANTLR
Ric Klaren
klaren at cs.utwente.nl
Tue Oct 8 05:03:27 PDT 2002
Hi,
On Mon, Oct 07, 2002 at 03:38:09PM -0400, Hensley, Richard wrote:
> Ok, now the whole thing makes sense. There are two approaches to having
> literal strings in parser rules.
>
> 1) put double quoted strings directly in parser rules
-> Error prone one typo and you have a new token..
> 2) create a tokens { } section with literal strings, and
> reference the tokens in parser rules
-> More structural imho, newer antlr's generate warnings for tokens just
defined outside the tokens section.
Cheers,
Ric
--
-----+++++*****************************************************+++++++++-------
---- Ric Klaren ----- klaren at cs.utwente.nl ----- +31 53 4893722 ----
-----+++++*****************************************************+++++++++-------
Human beings, who are almost unique in having the ability to learn
from the experience of others, are also remarkable for their apparent
disinclination to do so. --- Douglas Adams, Last Chance to See
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list