[antlr-interest] On trees and JavaBeans, part 2: tree creation

Martin Probst mail at martin-probst.com
Mon Apr 18 07:54:27 PDT 2005


Hi,

Interesting posts.

> [For "bean walking", this is an entirely new ballgame, and I 
> haven't finished thinking through it. Current tree parsers 
> are positional. Instead, the new type of tree parser could 
> check properties instead of "next child".
> I need to chew on this a bit more to get a good example 
> before I propose it...]

Did you take a look at Apache JXPath? It uses an XPathy language to query
object graphs. Afaik it does this by using reflection, but this is of course
not necessary in ANTLR. 

E.g. "foo/bar" looks (from the current node) for a property named "foo", and
within that for a "bar". XPath is quite a nice language for
querying/traversing trees and its probably already quite familiar to many
people.

Regards,
Martin



More information about the antlr-interest mailing list