[antlr-interest] Re: TreeParser fails to find matched node in input tree

micheal_jor open.zone at virgin.net
Wed May 7 13:13:10 PDT 2003


Update:

As a kind of sanity check, I have modified the grammar to generate 
Java and C++ instead and the relevant section of the output is the 
same. This issue would be present in a Java and C++ version of the 
TreeParser too.

Is this related to the complexity of the pattern the TreeParser is 
matching in the classDecl rule?. Should I split the rule into a 
number of less complex rules? e.g.

classDecl
: #( CLASS IDENT
     baseSpec
     body
  )

Cheers,

Micheal


> Given the rules below (assume memberDecl is properly defined), my 
> TreeParser always complains about the RCURLY not being found (it 
> finds ASTNULL instead) even though the RCURLY is definitely in the 
> input tree.
> 
> classDecl
> : #( CLASS IDENT
>      #( BASE (typeName)* )
>      #( BODY memberDecls RCURLY )
>   )
> 
> memberDecls
> : ( memberDecl )*
> 
> I am using ANTLR/C# and I just wanted to check this isn't a known 
> issue.
> 
> Cheers,
> 
> Micheal


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list