[antlr-interest] Big grammar => static initializer/method size is exceeding the 65535 bytes limit
Alex Marin
alex.marin at amiq.ro
Tue Nov 3 10:42:48 PST 2009
Hello,
I've managed to find an automated solution for one of the previously
reported errors, namely for:
The code for the static initializer is exceeding the 65535 bytes limit
The "fix" consists of modifying the StringTemplate that generates the
parser code so that static initializers are automatically included in
speparate classes (and properly referenced). By using static classes, all
of the code is contained in a single file, so the change is transparent
from a user's point of view.
You can find the modified code in the attached file.
Best regards,
Alex Marin
PS: In order to use the fix you have to replace the Java.stg from
org.antlr.codegen.templates.Java with this one and recompile antlr.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Java.stg
Type: application/octet-stream
Size: 44208 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20091103/12571cb8/attachment.obj
More information about the antlr-interest
mailing list