[antlr-interest] sub-tree tree parsing

Terence Parr parrt at cs.usfca.edu
Sun Dec 7 14:29:27 PST 2008


On Dec 7, 2008, at 2:21 PM, Sohail Somani wrote:

> Hi,
>
> I've been out of ANTLR for a little while but I seem to recall that
> sub-tree tree parsing was going to be made possible. That is, given a
> tree grammar, you could write a parser that would only need to
> understand a part of it. This was in contrast to replicating the whole
> grammar in each tree parser.
>
> You could call it a "rule-based" tree parser.
>
> Did this ever occur or did I dream it?

Welcome back Sohail!  Heh, just happened (in my dev branch).  Search  
for tree pattern matching in archives for link to code.

see this too

http://www.antlr.org/wiki/display/~admin/2008/11/30/Example+tree 
+rewriting+with+patterns
http://www.antlr.org/wiki/display/~admin/2008/11/29/Woohoo%21+Tree 
+pattern+matching%2C+rewriting+a+reality

Ter


More information about the antlr-interest mailing list