Hi folks,
when I build a grammar, first line of my java generated code is always :
public static final String[] tokenNames = new String[] { verly large array
list }
followed by a very long list of
public static final int ;
it's not the first thread on blowing the 65K static initializer when you
have a lot of tokens or rules.
Why not use more recent structures like Enum (available since java 1.5) that
can hold a string and an int for each token ? I think enum is final by
default.
as a little test, I made an enum class with all my tokens manually and that
enum class compiles fine.
Unfortunately, as the code has compile errors in java, refactoring is not
an option , and manually search / replace in 80.000 lines of generated code
will drive me nuts,
PS: is that mailing list available online? how can I access it ? receiving
all these mails in my mailbox becomes a little overhead for me.
keep on doing such a great job,
best regards,
patrick ericx
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.