[antlr-interest] Some Problem with tree parser

femtowin1 femtowin1 at gmail.com
Mon Apr 30 02:21:12 PDT 2007


actually this is already a tree grammar.

program:^(STATEMENT_LIST s=statement* 
  ....


>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?
>
>
>ta,
>dave
>
>-- 
>http://david.holroyd.me.uk/
>
______________________________________
Sent from my www.pageflakes.com startpage


More information about the antlr-interest mailing list