[antlr-interest] Partitioning Antlr grammar into a couple files
Gavin Lambert
antlr at mirality.co.nz
Sun Jun 15 04:19:13 PDT 2008
At 23:02 15/06/2008, Vitaliy wrote:
>Does anyone has an idea how can a large grammar definition be
split
>between a multiple number of files?
>I've defined a pretty large grammar - around 160 rules, spanning
>over 3000 lines, and growing.
>Antlr generated code is huge as well - around 25,000 lines of
code
>for the lexer and the parser each, after optimizations.
>It's really hard to test \ manage such a big grammar. Is there a
>way to split it between a number of files?
>Any kind of an import or using directive?
No, but 3.1 supports inheritance, which can accomplish the same
effect. I think :) (I haven't actually used it myself.)
More information about the antlr-interest
mailing list