[antlr-interest] Huge amounts of follow sets
Andreas Meyer
andreas.meyer at smartshift.de
Fri Feb 13 08:50:25 PST 2009
Dear ANTLR developers!
I have a huge grammar with lots of ambiguities (its a language with 600
keywords, that can also be used as identifiers ...). It worked fine with
ANTLR 2.7, but after upgrading it to 3.1, I finally get an error when
compiling the generated parser: method size exceeds 64k. This is due to
the number of follow-sets being generated and initialized ( > 6000). One
workaround would be: move assignments from class-level to methods (up to
some number of assignments per method), and then call these functions
from one "master" function. Are there any other alternatives, other than
(probably) making the grammar less ambiguous? Thanks for any hints!
Best Regards,
Andreas Meyer
(smartshift.de)
More information about the antlr-interest
mailing list