[antlr-interest] Oh my, code too large

Alexander Gängel alexander at gaengel.de
Tue Feb 19 06:53:30 PST 2008


Is there any solution too this Problem?

I just run into it an now I'm not sure  how I can modify my Grammar to 
get it to work.

Alexander

Fred schrieb:
> I have recently run into this (previously posted) problem and was
> wondering what the status was?
> There is a slight difference though, the error is found in a tree
> grammar rather than a lexer.
>
> "The problem is real.
> Java effectively limits you to 65KBytes per method of byte-code.
> The source of the limit is the definition of  the class files.
> A class file includes, for each method, a table of  exception handlers,
> and each of the entries in these tables includes the address
> (in bytes relative to the beginning of the method) of the
> beginning and end of the try-block, stored as two 16-bit integers.
> There is no way around this.
> I hope that there are people out there  who can make suggestions as to
> how to modify your lexer to generate
> less code."
> Peace
> - John
>
>
> On Dec 13, 2007, at 2:51 PM, Andreas Ravnestad wrote:
>
>   
>> On 12/13/07, Andreas Ravnestad <andreas.ravnestad at gmail.com> wrote:
>>     
>>> Sometimes ANTLR generates a lexer which will make javac choke on
>>> itself with a message resembling this:
>>>
>>>  code too large
>>>     public int specialStateTransition(int s, IntStream input)throws
>>>       
> NoViableAltException {
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080219/f57ba43a/attachment.html 


More information about the antlr-interest mailing list