[antlr-interest] Development of an XQuery parser with full-text extensions, project report

David Holroyd dave at badgers-in-foil.co.uk
Sat Dec 29 14:41:18 PST 2007


On Sat, Dec 29, 2007 at 01:25:01AM +0100, Johannes Luber wrote:
> David Holroyd schrieb:
> > On Fri, Dec 28, 2007 at 03:02:47AM +0200, Guntis Ozols wrote:
> >> Two things polluting my grammar file which i'd like to factor out are:
> >> - package declarations (should be possible to specify as command line opt.)
> > [...]
> > 
> > It would be nice if ANTLR understood packages.  It should be something
> > in the grammar though, not a command-line option.  This knowledge could
> > allow ANTLR to automatically find pkg/T.tokens when tokenVocab=pgk.T is
> > used, for instance.
> > 
> > All a bit Java specific, of course.
> 
> I'm sure, that there are ways to map packaging to other systems, like
> namespaces in C#.

Oh yes, and of course ANTLR should try to tread some path that sits
nicely with the respective concepts in different target languages.

I just meant that the requirement for such a feature, just in order to
make things work reasonably, is specific to Java, because Java ties
package structure to folder structure in a way that (I understand) C#
doesn't with namespaces.

It would be nice for ANTLR to 'just know' what folder files should be
generated in (for the Java target), rather than needing to be told
explicitly so as to match the package structure.


ta,
dave

-- 
http://david.holroyd.me.uk/


More information about the antlr-interest mailing list