[antlr-interest] Changing from buildAST=false to buildAST=true

Terence Parr parrt at cs.usfca.edu
Wed Jun 8 11:32:22 PDT 2005


On Jun 8, 2005, at 11:24 AM, Bryan Ewbank wrote:

> Okay, so I'm changing one of my passes from exploration/annotation to
> tree surgery, and therefore need to change it from buildAST=false to
> buildAST=true.
>
> The problem I'm encoutering is that this seems to mean I need to
> change all references to subrule names from simply "subrule" to
> "#subrule" in my actions.
>
> E.g., given this:
>      a: #(A b c d)   { b->setValue(foo); }
> It appears I need to change this to:
>      a: #(A b c d)   { #b->setValue(foo); }
>
> Is this true, or do I misunderstand?

Hi Bryan,

It probably is...

Unfortunately, I allowed label to work just like #label.  Technically  
it should be #label, but by virtue of the implementation plain label  
also worked...i'm going to disallow that in this new version.

Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com



More information about the antlr-interest mailing list