[antlr-interest] Java Grammar

James Abley james.abley at gmail.com
Sun Nov 23 12:04:44 PST 2008


2008/11/23 Gavin Lambert <antlr at mirality.co.nz>:
> At 08:11 24/11/2008, Simon wrote:
>  >But I've just realized that without access to the referenced
>  >classes (source or binary form) it is still not possible to
>  >do that.
>  >
>  >  a.b.c.D.X.z()
>  >
>  >Where does the class name end and the field access start?
>  >There is simply no way to answer that question without
>  >access to the classes.
>
> Well, I've noticed that normally Java namespaces tend to have a
> lowercase initial letter, while classes have an uppercase initial
> letter.  Is that actually a requirement of the language or is it
> just a convention?  If it's a requirement then you should be able
> to use that as a hint :)

Convention only. There are some notable packages which break the
convention; Doug Lea's concurrency library springs to mind.

http://g.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html

>
> Otherwise, you're right, you'll need access to the classes.  But
> you'd need that anyway if you want to verify that the
> classes/members being used actually exist (as javac does).
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>


More information about the antlr-interest mailing list