Home » Modeling » TMF (Xtext) » Error: The code for the static initializer is exceeding the 65535 bytes limit
Error: The code for the static initializer is exceeding the 65535 bytes limit [message #1797710] |
Mon, 05 November 2018 09:20  |
Eclipse User |
|
|
|
Hello,
I am working on a fairly large grammar. After adding some more rules and running the workflow I get the above mentioned error in the Internal<myDSLName>Parser class.
I have tried moving the static tokenNames declaration to the getTokenNames() method (suggested by Sezgin).
And I have tried using the class splitting feature with the following options in the workflow:
language = StandardLanguage {
// ... name and stuff
parserGenerator = {
options = {
classSplitting = true
fieldsPerClass = "20"
methodsPerClass = "50"
}
}
}
I've tried many different combinations with numbers between 10 and 2000 for the two settings. The class splitting seems to work but the error stays the same.
Does this mean the grammar is too complex/ambiguous or might there be other solutions?
Regards,
Pierce
|
|
| | | |
Re: Error: The code for the static initializer is exceeding the 65535 bytes limit [message #1797782 is a reply to message #1797779] |
Tue, 06 November 2018 06:49   |
Eclipse User |
|
|
|
Hello Christian,
I don't think the tokennames are the problem, that's why the suggestion you linked doesn't work for me. As I said, the tokenNames array only contains 138 entries.
But the InternalParser also contains more static String arrays called dfa something. For my current grammar there is a String array called dfa_13s which is initialized with more than 9000 entries. It looks like this:
static final String[] dfa_13s = {
"\1\1\32\uffff\1\2\52\uffff\1\2",
"\1\3\11\uffff\1\4\1\5\1\6\1\7\1\10",
"",
"\1\12\1\uffff\1\11",
"\1\12\1\uffff\1\11",
"\1\12\1\uffff\1\11",
"\1\12\1\uffff\1\11",
"\1\12\1\uffff\1\11",
"\1\12\1\uffff\1\11",
"\1\13",
"\1\21\45\uffff\1\22\1\uffff\1\14\1\15\1\16\2\uffff\1\20\16\uffff\1\17",
"\1\12",
"\1\23\11\uffff\1\24\1\25\1\26\1\27\1\30",
"\1\31\11\uffff\1\32\1\33\1\34\1\35\1\36",
"\1\37",
"\1\40",
"\1\42\10\uffff\1\41",
"\1\43",
"\1\uffff",
"\1\45",
"\1\45",
"\1\45",
"\1\45",
"\1\45",
"\1\45",
"\1\54\45\uffff\1\22\1\uffff\1\50\1\47\1\51\1\46\1\uffff\1\53\16\uffff\1\52",
"\1\54\45\uffff\1\22\1\uffff\1\50\1\47\1\51\1\46\1\uffff\1\53\16\uffff\1\52",
"\1\54\45\uffff\1\22\1\uffff\1\50\1\47\1\51\1\46\1\uffff\1\53\16\uffff\1\52",
"\1\54\45\uffff\1\22\1\uffff\1\50\1\47\1\51\1\46\1\uffff\1\53\16\uffff\1\52",
"\1\54\45\uffff\1\22\1\uffff\1\50\1\47\1\51\1\46\1\uffff\1\53\16\uffff\1\52",
"\1\54\45\uffff\1\22\1\uffff\1\50\1\47\1\51\1\46\1\uffff\1\53\16\uffff\1\52",
// [...] and 9000 more lines
Should the class splitter also split these arrays? Or might these huge dfa arrays mean there is something wrong with my grammar?
Cheers,
Pierce
[Updated on: Tue, 06 November 2018 06:51] by Moderator
|
|
| | | | |
Goto Forum:
Current Time: Sat Jun 14 23:26:35 EDT 2025
Powered by FUDForum. Page generated in 0.05230 seconds
|