[Xtext] static initializer size problem in generated parser code [message #57078] |
Sun, 12 July 2009 15:23  |
Eclipse User |
|
|
|
Hi,
Recently I get the following compilation error when building my Xtext
project:
the code for the static initializer is exceeding the 65535 bytes limit
I have had this compilation error before in other contexts and it means what
it says. There is to much static data to represent in the currently defined
..class format. However, I have not checked if there are any ways to work
around this with the compiler. The file this error is reported for what
seems to be the generated source for antlr: Internet<MyDsl>Parser.java in
the ...parser.antlr.internal package.
If I comment out parts of my xtext grammar the message goes away so I
suppose there is nothing I can do but try to make my grammar more compact.
Any ideas about how to work around this? Unfortunately I am kind of stuck if
I can't continue enhancing the grammar. Just trying to think about how I
could work around this without aborting this.
Any ideas appreciated.
Thanks,
Derek
|
|
|
|
|
Re: [Xtext] static initializer size problem in generated parser code [message #62944 is a reply to message #62909] |
Thu, 23 July 2009 12:59  |
Eclipse User |
|
|
|
Hi Stefano,
I'm not aware of an existing solution for this problem. It may be
possible to rewrite your grammar, extract common sequences into terminal
rules or something similar. But I'm afraid this will not work out very well.
There are plans (nothing fixed so far) to update Antlr to v3.1.3, dunno
whether this would help.
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 23.07.2009 11:08 Uhr, schrieb Stefano Cottafavi:
> Hi,
> I actually came across the same problem. I have a quite expensive
> grammar with a lot of literal keywords (such as "FixedReferenceFrame"
> "RigidiBodyDeformation" and so on...) I have to match.
>
> I was wondering if someone has been able to solve the problem and how
> (if "manually" is the case).
> Also, how about the use of antlr3.1 instead of the actual 3.0? is this
> critical? how can be done?
>
> Thanks
> Stefano
|
|
|
Powered by
FUDForum. Page generated in 0.04613 seconds