Hello,

While trying to migrate a parser grammar file from ANTLR v2 to ANTLR v3
I came across the following errors in the generated Parser.java:

   1. The code for the static initializer is exceeding the 65535 bytes
limit

and:

   2. The code of method specialStateTransition(int, IntStream) is
exceeding the 65535 bytes limit.

One solution to work around problem #1 seems to be spreading the static
initializations from the Parser.java file across more compilation units,
but it is definitely cumbersome and not scalable.

Regarding problem #2, I came across several mail threads, but none
provided a clear & scalable solution.

I have to mention that the grammar worked well in ANTLR v2 (the
generated parser was ~40 000 lines of code as opposed to the one
generated with ANTLR v3 which counts ~300 000 loc). I also have to point
out that the grammar is very large ( ~600 rule definitions and ~5000
loc).

My questions are:

Are there any known solutions/workarounds for these problems?
Is there a known approach for fixing such issues related to big
grammars? (N.B. Generation takes a few minutes and even opening the
generated parser with a basic text editor is quite sluggish)

Thank you,
    Alex Marin


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to