[antlr-interest] Problem building a real parser using v3

Kay Roepke kroepke at classdump.org
Mon Oct 2 14:51:39 PDT 2006


Hi!

On 2. Oct 2006, at 23:17 Uhr, Alexandre Porcelli wrote:

> "The code of method specialStateTransition(int) is exceeding the 65535
> bytes limit".

Gotta love Java, huh? *shakes head*

> Attached to this e-mail is my grammar file.
>
> And I'd like to ask to all of you what I'm doing wrong. Is there a
> better way to do it?

A transition becomes special if it either is composed of more 65534  
edges or must check some "special" predicate.
It seems the getCharPositionInLine() test is throwing it off. Looking  
at the generated code, the individual case labels of the switch all  
seem *very* similar. I wonder if we could optimize this a bit.

Sorry if I couldn't offer much help, but it might give you an idea of  
what's going on. I'll look into it further tomorrow, though Ter might  
be of more help, since he is the Master of Things :)

regards,

-k






More information about the antlr-interest mailing list