[antlr-interest] tree parsers vs visitors & xml translators etc...
Sander Mägi
sander at aqris.com
Fri May 10 03:06:46 PDT 2002
Hi,
Is it also simple to find all "potentially exportable" classes with xpath
query.
Consider this example:
class InterestingClass {
class InterestingInner {
}
{
class UninterestingClass {
class UninterestingInner {
}
}
}
}
What would be the xpath query to get all 'Interesting' classes - the ones
that will be potentially usable from other classes.
Sander
----- Original Message -----
From: "Silvain Piree" <s.piree at enneya.com>
To: <antlr-interest at yahoogroups.com>
Sent: Friday, May 10, 2002 9:33 AM
Subject: Re: [antlr-interest] tree parsers vs visitors & xml translators
etc...
> > Can anybody comment on the visitor/xslt side?
> > How would you do this "find class defs" problem efficiently?
>
> The problem with Java is that you also have anonymous
> classes that can be defined within methods as part of an
> expression.
>
> So, if you really want to find ALL class definitions, then
> you also have to analyze methods and expressions :-(
>
> A good XPath implementation will support indexing
> of elements, so that a query like "//class" will not need
> to traverse the tree, but instead only needs to look in the
> index (which is very efficient).
>
> ANTLR tree transformation certainly can be usefull,
> but the simplicity of XPath queries nested in your java
> source is difficult to beat for many simple purposes.
>
> Silvain
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list