[antlr-interest] Re: yet more thoughts on error handling / recovery
Terence Parr
parrt at cs.usfca.edu
Tue Jun 29 15:21:30 PDT 2004
On Jun 29, 2004, at 2:45 PM, micheal_jor wrote:
> --- In antlr-interest at yahoogroups.com, Terence Parr <parrt at c...> wrote:
>>> It's not _that_ big a deal to implement up/left pointers. See my GCC
>>> grammar :) Just jump up to the enclosing alt and you're set.
>>
>> Doing in a general way for arbitrary tree construction when you have
>> actions involved can be tricky ;)
>
> Not sure I agree. In one of my projects I found that most of the
> issues {with tree-construction/tree-parsing} can be resolved with a
> custom ASTFactory that understands that the custom ASTNode class had
> parent/previousSibling links too.
>
> I seem to remember needing a addChildEx() method. Can't quite remember
> if this was due to a shortcoming in the ASTFactory model or was just
> to keep some legacy code - that used addChild() - tickling along fine.
Roger that. I'll keep this in mind.
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!
Cofounder, http://www.peerscope.com pure link sharing
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