[antlr-interest] Multiple grammar files

Waldemar Sauer waldemarsauer at hotmail.com
Mon May 26 22:26:14 PDT 2008


I'm writing a grammar that getting close to 2000 lines. It is becoming cumbersome to find stuff in there, so I was wondering: what is the recommended way in antlr to separate a single grammar into separate files? Let’s say you have the following grammar g1.g:
 
grammar g1; options { language=C;  }
a: b c;
b: ‘literal1’;
c: ‘literal2’;
 
How can I put the rules for b and c in separate files?
 
 
_________________________________________________________________
Change the world with e-mail. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ChangeWorld
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080527/a5c3569e/attachment.html 


More information about the antlr-interest mailing list