I have an Antlr3-generated Java lexer/parser for this MySQL grammar.
Eclipse Neon can compile the above lexer/parser just fine. The resulting program too runs just fine.
However, the Oracle Java 8 compiler gives a 'code too large' error for the same Java code:
[javac] .../MySQLParser.java:27: error: code too large
[javac] public static final String[] tokenNames = new String[] {
[javac] ^
[javac] 1 error
Questions:
If the Java code being compiled were really too large (> 64K), shouldn't have both compilers yielded the same error?
If it is the bytecode that is too large, is there any way to get the Oracle compiler to generate a space-efficient code similar to Eclipse's?
For code maintenance reasons, I'd prefer neither to edit the original MySQL grammar I got from the Antlr site, nor edit the generated Java parser/lexer code to make it small enough for Oracle. So, would prefer some "meta", compiler-level workaround.
Does the above error message mean that the problem is with just
tokenNames
being too big? Or, is it the overall class that it's a member of that's too big?