[antlr-interest] brief analysis of java.g's tree building in 2.x vsproposed 3.0

Terence Parr parrt at cs.usfca.edu
Thu Feb 3 17:03:27 PST 2005


On Jan 31, 2005, at 7:46 PM, Loring Craymer wrote:

> I'm going to try to stop after this response.  There are a couple of 
> inline
> 2.8 syntax variants below, but Ter has almost converged on 2.8 
> functionality
> with his introduction of subrule rewrites.  Consider interchanging 
> nodes:
>
> foo :
>     A B { A } C D ;

This one doesn't make sense to me :O

> or
> foo_a :
>     A B { B A } C D ;

This either.  Do you mean ^{ B A }?

> would be handled in Ter's syntax via
>
> foo_ter :
>     ( A B -> B A ) C D ;

actually

foo_ter :
   A B C D -> B A C D
   ;

I'm still thinking about the subrule with -> concept.

 >Unless I am mistaken, you have introduced the "complexity" that you
 >originally decried.  Am I correct in this?

Nope ;)

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