[antlr-interest] Composite grammar issues

Kumar Rangarajan kumar.r at s7software.com
Thu Apr 16 08:31:53 PDT 2009


Hi,

First things first. Thanks for creating such a wonderful tool. We use  
Antlr for our project work, and recently we switched to using  
composite grammars, as we are a distributed team, and multiple people  
need to modify various portions of the grammar file.

While most things just work out of the box or could be trivially  
worked around, one breaking issue is related to the way the lexer is  
generated, if the composite grammar defines any lexer rules. I am  
using Java code generation, and we see that the contents of the  
"header" defined either in the composite file or in the central lexer  
file does not get copied to the generated lexer code.

This breaks our packaging structure, as the package statement is  
normally mentioned in the "header" section of either the central or  
composite grammars, and because it does not propagate to the generated  
lexer code, it breaks compilation.

I see that the same issue was reported last year and a bug has been  
filed for the same - http://www.antlr.org/jira/browse/ANTLR-370

It would be great if anyone can provide a workaround for this or can  
provide any updates on the potential fix.

Thanks again for creating this (I mean the tool, not the bug :)).

Thanks,
:-)

"To err is human, to moo is bovine"

(Yup taken from the ANTLR book)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090416/499dfa62/attachment.html 


More information about the antlr-interest mailing list