[antlr-interest] Having a tree walker that does no rewrite, just a tree pass

Loring Craymer lgcraymer at yahoo.com
Fri Oct 19 08:18:57 PDT 2012


You don't need an output tree; just reuse the tree produced by the parser.

--Loring




>________________________________
> From: Stanislas Rusinsky <rusinskystanislas at yahoo.fr>
>To: ANTLR ML <antlr-interest at antlr.org> 
>Sent: Friday, October 19, 2012 4:33 AM
>Subject: [antlr-interest] Having a tree walker that does no rewrite, just a tree pass
> 
>Hi,
>
>I currently have a parser generating a tree, and a tree walker with stringtemplate.
>
>I'd like to implement a symbol table, and for different reasons not mentioned here I'd like to have a separate tree walker in-between the two.
>
>This tree walker shouldn't do any rewrite of the AST, so I took the current walker and stripped it of from its actions and rewrites, but I can't get it to just parse the tree, and do no rewrite: I get an empty tree on output.
>
>How should I proceed to have just a tree walker that "does nothing" but walk?
>
>(Using antlr 3.4)
>
>TIA
>
>Stan
>
>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