[antlr-interest] Changes don't affect AST but require code regenration of tree parser?
Raphael Reitzig
r_reitzi at cs.uni-kl.de
Fri Aug 1 12:35:14 PDT 2008
Hi all!
Yesterday, I realized that I could spare a parser rule and needed one
extra possibility in another rule in a rather simple gramar. After the
changes, however, no other ASTs can be created than before. No more,
no less.
However, after I generated parser code, even the simplest examples
won't be accepted anymore. Tree gramar won't read a token it always
had, stating "No rule viable". I swore and searched and swore and
despaired - until I reminded myself of the "Clean and rebuild all if
anything is strange" mantra. I generated all code again, including the
tree walker. Note that tree gramar never changed! Though, now
everything works perfectly again.
What happened there? Why did an internal change in parser rules (even
lexer rules should not have been affected) render the genereated tree
walker code useless?
I suspect token definitions to have a hand in this, but why should
they have changed?
Regards
Raphael
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: PGP Digital Signature
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080801/388a4fdd/attachment.bin
More information about the antlr-interest
mailing list