[antlr-interest] "code too large" / can't split AST output into smaller files

Florian Weimer fw at deneb.enyo.de
Sun Oct 10 05:25:32 PDT 2010

* Andreas Stefik:

>>   Also, I might be stating the obvious, but I lost some time on this
>> recently: usually the "code too large" refers to a method that is over
>> the 64k limit, and not due to the size of the whole class. If that is
>> your case, it does not help to split the grammar, as the offending
>> method will sill be there.
> Is this a limitation in Java?

Not really, it's a limitation in Oracle's Java compiler.  The compiler
could automatically partition the method into several smaller methods
when it hits the limit.  Not doing this is a bit like having a C
compiler which refuses to allow declaring more than five local
variables because the target architecture has only got five
callee-saved registers.

More information about the antlr-interest mailing list