[antlr-interest] Article against TreeWalkers

Terence Parr parrt at cs.usfca.edu
Wed Mar 8 09:02:20 PST 2006


On Mar 8, 2006, at 8:54 AM, Jeff Barnes wrote:
> Andy sez:
> I realized that tree parsing is identical to text parsing, albeit  
> in two dimensions instead of one.

I've been trying to scream that as loud as I can...not loud enough I  
guess. ;)  All v3 recognizers derive from same base class, so even in  
practice recog. is all the same thing: 1D or 2D :)

> Jeff sez:
>
> LOL! I never got that either. To me, a tree seems multi- 
> dimensional; a table is two-dimensional. Terrence??

a : ^(A B) ;

is same as

a : A DOWN B UP ;

if you insert those imaginary navigation nodes, it is just a simple  
1D grammar. :)  v3 does this.  Rather a nice generalization, right?   
I have a paper waiting to be written on this...stupid lame hands  
prevents more papers...oh and my job doing grad directorship at USF  
takes most of my time right now... ;)

Ter


More information about the antlr-interest mailing list