[antlr-interest] Some Problem with tree parser
David Holroyd
dave at badgers-in-foil.co.uk
Mon Apr 30 02:32:30 PDT 2007
On Mon, Apr 30, 2007 at 02:21:12AM -0700, femtowin1 wrote:
> actually this is already a tree grammar.
>
> program:^(STATEMENT_LIST s=statement*
> ....
Ah, sorry. I've got no tree-grammar experience either :(
> >On Mon, Apr 30, 2007 at 01:58:23AM -0700, femtowin1 wrote:
> >> options {
> >> tokenVocab=Rubyv3; // reuse token types
> >> ASTLabelType=CommonTree; // $label will have type CommonTree
> >> }
> >
> >> I've tried s+=statement*
> >
> >I don't use the += operator, but could it be that you need output=AST;
> >in your options section?
--
http://david.holroyd.me.uk/
More information about the antlr-interest
mailing list