[antlr-interest] The AST thus far before an error

Terence Parr parrt at cs.usfca.edu
Mon Nov 22 14:09:25 PST 2004



On Nov 22, 2004, at 1:36 PM, Paul J. Lucas wrote:

>
> 	It seems to be the case that, during parsing and AST
> 	generation, if an exception is thrown, the AST is trashed
> 	(specifically, the value of returnAST isn't propagated back up
> 	the call-stack).
>
> 	This is most unforunate.  I *really* need to build and keep the
> 	AST right up to the point an exception is thrown.  Is there any
> 	way to do this?

You can probably toss in an exception handler on each rule which 
prevents it from rippling back up the call chain.  Would that work?  Or 
I think an option will simply turn off all automatic recovery.

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!





 
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