Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Solution to content assist...Internal<project>Parser.java static initiailizer size limit
Solution to content assist...Internal<project>Parser.java static initiailizer size limit [message #758365] Tue, 22 November 2011 21:42 Go to next message
John J. Franey is currently offline John J. FraneyFriend
Messages: 55
Registered: July 2009
Member
After running the xtext workflow on my grammar, I got this error:

Quote:
The code for the static initializer is exceeding the 65535 bytes limit InternalProjectParser.java /org.jjflyboy.tjpeditor.ui/src-gen/org/jjflyboy/tjpeditor/ui/contentassist/antlr/internal line 23 Java Problem


antlr has a resolution which I found on their email archive with a google, so I applied this with:
parser.antlr.XtextAntlrGeneratorFragment {
   antlrParam = "-Xmaxinlinedfastates" antlrParam = "100000"
   antlrParam = "-Xmaxswitchcaselabels" antlrParam = "30000"
   antlrParam = "-Xminswitchalts" antlrParam="1"
}


That had no effect.

It took me a while to notice that the fragment above is not the one that generates the content assist parser. So, then I applied the antlr params to:
// generates a more lightweight Antlr parser and lexer tailored for content assist
fragment = parser.antlr.XtextAntlrUiGeneratorFragment {
   antlrParam = "-Xmaxinlinedfastates" antlrParam = "100000"
   antlrParam = "-Xmaxswitchcaselabels" antlrParam = "30000"
   antlrParam = "-Xminswitchalts" antlrParam="1"
}


Now, I do not have the problem. Thanks to the xtext team for allowing this to be straight forward and user-understandable.

Re: Solution to content assist...Internal&lt;project&gt;Parser.java static initiailizer size [message #758483 is a reply to message #758365] Wed, 23 November 2011 12:34 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
Please try to set

parser.antlr.XtextAntlrGeneratorFragment {
options = {
classSplitting=true
}
....
in all Antlr fragments.

Am 22.11.11 22:42, schrieb John J. Franey:
> After running the xtext workflow on my grammar, I got this error:
>
> Quote:
>> The code for the static initializer is exceeding the 65535 bytes limit
>> InternalProjectParser.java
>> /org.jjflyboy.tjpeditor.ui/src-gen/org/jjflyboy/tjpeditor/ui/contentassist/antlr/internal
>> line 23 Java Problem
>
>
> antlr has a resolution which I found on their email archive with a
> google, so I applied this with:
>
> parser.antlr.XtextAntlrGeneratorFragment {
> antlrParam = "-Xmaxinlinedfastates" antlrParam = "100000"
> antlrParam = "-Xmaxswitchcaselabels" antlrParam = "30000"
> antlrParam = "-Xminswitchalts" antlrParam="1"
> }
>
>
> That had no effect.
>
> It took me a while to notice that the fragment above is not the one that
> generates the content assist parser. So, then I applied the antlr params
> to:
>
> // generates a more lightweight Antlr parser and lexer tailored for
> content assist
> fragment = parser.antlr.XtextAntlrUiGeneratorFragment {
> antlrParam = "-Xmaxinlinedfastates" antlrParam = "100000"
> antlrParam = "-Xmaxswitchcaselabels" antlrParam = "30000"
> antlrParam = "-Xminswitchalts" antlrParam="1"
> }
>
>
> Now, I do not have the problem. Thanks to the xtext team for allowing
> this to be straight forward and user-understandable.
>
>


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
Re: Solution to content assist...Internal&lt;project&gt;Parser.java static initiailizer size [message #758507 is a reply to message #758483] Wed, 23 November 2011 13:56 Go to previous message
John J. Franey is currently offline John J. FraneyFriend
Messages: 55
Registered: July 2009
Member
Thank you.
Previous Topic:Xtext 2.1: using Xbase expressions
Next Topic:get current name file
Goto Forum:
  


Current Time: Sun Mar 29 22:42:55 GMT 2020

Powered by FUDForum. Page generated in 0.01977 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top