[antlr-interest] ANTLR 3.1, headers in imported grammars

Gavin Lambert antlr at mirality.co.nz
Wed Jun 18 13:21:05 PDT 2008


At 07:09 19/06/2008, Terence Parr wrote:
 >added bug to fix for 3.1
 >
 >http://www.antlr.org:8888/browse/ANTLR-301
 >
 >Actually, wait.  So we are saying that the header in root
 >grammar should override any in subgrammars?  In this case,
 >there are none so it inserts it?  That will be special case.
 >@members are not overridden for example.

That might be convenient for things like the package declaration, 
but probably very little else.  Maybe the Java target should adopt 
something similar to C#'s @namespace section specifically for the 
package specification, so it can replicate that and nothing else?

Also: it probably ought to be possible to put the sub-grammars in 
one package and the main grammar in a different one.



More information about the antlr-interest mailing list