[antlr-interest] problem with composite grammars

Maciej Gawinecki mgawinecki at gmail.com
Tue Mar 10 11:23:46 PDT 2009


Hello,

To overcome the problem ofexceeding code size of generated parser class 
I decided to make my SQL grammar more composite: I splitted it into 
lexer, parser and combined grammars, where the latter imports the first two:

   grammar AnsiSQL;
   import AnsiSQLLexer;
   import AnsiSQLParser;

However, I got the following error, which I don't understand:

   combined grammar AnsiSQL and imported lexer grammar AnsiSQLLexer both
   generate AnsiSQL_AnsiSQLLexer

What could be the reason and how can I solve the problem?

I'm working with ANTLRWork 1.2.3.

Maciej


More information about the antlr-interest mailing list