[antlr-interest] Generating tree walkers.
monty at codetransform.com
Tue Jun 22 11:55:57 PDT 2004
On Jun 22, 2004, at 9:14 AM, Bharath Sundararaman wrote:
> I have the lexer, parser and an AST for a PASCAL-like grammar and I
> like to perform semantic analysis/symbol table checks/constant folding
> Is it a cumbersome task to write a tree walker for the abstract syntax
> to perform these checks? When you perform semantic analysis on your
> would you prefer to walk the tree or would you just embed it in your
> as actions?
I prefer to build the symbol table during the parse (necessary to parse
C). Analysis I like to do in tree passes, it's cleaner because it's a
simplification of the grammar which you build so that it doesn't have
ambiguities or extraneous punctuation, etc.
ANTLR & Java Consultant -- http://www.codetransform.com
ANSI C/GCC transformation toolkit --
Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
More information about the antlr-interest