[antlr-interest] Partitioning Antlr grammar into a couple files

Jim Idle jimi at temporal-wave.com
Wed Feb 20 08:28:26 PST 2008


This is a feature of ANTLR 3.1. You can use a snapshot release of this
(see downloads page) and try the import directive.

 

Jim

 

 

 

From: Vitaliy [mailto:Vitaliy at dbsophic.com] 
Sent: Wednesday, February 20, 2008 5:08 AM
To: antlr-interest at antlr.org
Subject: [antlr-interest] Partitioning Antlr grammar into a couple files

 

Hello,

 

I found no reference about this in the documentation - 

I wonder if it's possible to divide the grammar definition between
multiple number of files - 

 

I've defined a pretty large grammar - around 150 rules, spanning over
1500 lines.

When I first tried to generate the code using AntlrWorks, it just got
stuck, and after adding more memory to the process, it managed to
generate almost 200,000 lines of C# code.

 

Anyway, It's really hard to test \ manage such a big grammar. Is there a
way to split it between a number of files?

 

Thanks,

Vitaliy


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080220/45d5d541/attachment.html 


More information about the antlr-interest mailing list