[antlr-interest] tree walking and semantic analysis

Andy Tripp antlr at jazillian.com
Mon Feb 2 12:34:21 PST 2009


Carter,

You'll probably need to be more specific in order to get a response.
On handling errors during treewalking, did you read the section in the TDAR book?
On the issue of keeping things "clean" in the treewalker, you'll have to be more specific
on what you've tried and what you don't like about it.
The treewalker approach naturally means that you specify the shape of the tree in your tree grammar.
If you want to slice the problem a different way, then maybe a treewalker isn't the right approach.

Andy

Carter Cheng wrote:
> Hi,
> 
> This is my first attempt at trying to build a compiler frontend and I have run into some problems which I am not sure how to resolve with ANTLR. The two issues are how to generate semantic analysis pass errors from the tree walking code and how best to design the passes code which conceptually keeps things like various context checks and type checks cleanly separated. 
> 
> Is there a canonical way to do this with ANTLR (and perhaps some example projects out there from ppl who have implemented full compilers)?
> 
> Thanks in advance,
> 
> Carter.  
> 
> 
>       
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
> 



More information about the antlr-interest mailing list