[antlr-interest] (newbie) Code too large problem

Terence Parr parrt at cs.usfca.edu
Thu Aug 2 21:20:53 PDT 2007


Hmm...yeah, must have million keywords or other tokens in your grammar.

I'm working on the solution (for v3.1) but that won't be available  
for a while.  I'd suggest doing a bunch of fragment rules and then  
having a non-fragment rule invoke a bunch of other rules that call  
all the fragment tokens...try to break up into functions.  Look at  
output java code.
Ter

On Aug 2, 2007, at 8:40 PM, ali azimi wrote:

> Hi,
>
> I have this error message and have been spending much time to  
> remedy it without success. I have another grammar which is much  
> bigger than this one and works perfectly. Could you please advice  
> me? The code is big and I can not post it on the forum. However if  
> anyone wants kindly to have a look at it I can mail. It must be  
> some kind of looping happening in it. When I exclude some parts of  
> the grammar by turning them to comments the debugger lets me to  
> carry on.
>
> Thank you in advance. I appreciate it alot.
>
> Best regards,
>
> Al
>
> The error message:
>
> [04:26:33] 1 error
> [04:26:54] \tmp\antlrworks\FpCif4Lexer.java:4551: code too large
> [04:26:54]     public void mTokens() throws RecognitionException {
> [04:26:54]                 ^
> [04:26:55] 1 error
>
> Be a better Globetrotter. Get better travel answers from someone  
> who knows.
> Yahoo! Answers - Check it out.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070802/d3a10c34/attachment.html 


More information about the antlr-interest mailing list