There is quite often a way to rejig the lexer to avoid the huge expansion, if you post your grammar, maybe we can help. I think that such issues will go away in v4 :-)
Jim > -----Original Message----- > From: [email protected] [mailto:antlr-interest- > [email protected]] On Behalf Of Marcus Klimstra > Sent: Thursday, May 27, 2010 2:19 AM > To: [email protected] > Subject: [antlr-interest] Solution for specialStateTransition exceeding > 65k > > Hi, > > I ran into the problem of the huge specialStateTransition bytecode size > when using many gated semantic predicates in the lexer (in all my lexer > rules actually). After a google search I found that this is a known > issue to which there are some workarounds, but no real solutions. At > first I used the workaround to manually add local variables for the > outer-class references, but at some point even that no longer worked. > Therefore I changed the Java code generator to create seperate methods > for each switch-case. This works quite well for me, so I wanted to > share it with the community. Note that I only tested this in the lexer, > since my parser has no specialStateTransition-method at the moment. I > also added annotations to suppress the useless warnings in the > generated code. A diff-file with these changes is attached. > > - Marcus 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.
