[antlr-interest] intro..& questions

Robert Hill rob.hill at blueyonder.co.uk
Wed Jun 8 17:01:38 PDT 2005


Lol, of course you can hehehe!
...But only if you answer another daft question...

I've split my grammar out into 3 separate files, lexer,parser and
treewalker. I export the vocab from the lexer, and import into the parser
and the treewalker.
Now, I need to create some imaginary tokens to insert into the tree as place
holders for certain constructs to make the walking easier,but must I define
them in the lexers tokens{} block, since they'll never be used by the lexer?
It just seems more sensible that they should be in the parser (but how would
the token values be in sync if I could define them in both grammars......
er.....)
I've tried adding them to a tokens{} block parser just to see what happens,
but when walking the tree I get mismatched tokens because they end up with
different values in the parser and the tree walker.

(BTW...I just love being able to single step into the generated code & see
what its doing. The value of human readable code shouldn't be
underestimated)*

Cheers,

Rob


(*) another testimony for you Ter. :)


-----Original Message-----
From: Terence Parr [mailto:parrt at cs.usfca.edu] 
Sent: 08 June 2005 01:37
To: Robert Hill
Subject: Re: [antlr-interest] intro..& questions


On Jun 7, 2005, at 2:27 PM, Robert Hill wrote:
> I have to say, a stunningly useful bit of software Terrence, Nice one.

Wow!  Can I add that to the testimonials?

Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com



__________ NOD32 1.1100 (20050518) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com




More information about the antlr-interest mailing list