Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » The code for the static initializer is exceeding the 65535 bytes limit
The code for the static initializer is exceeding the 65535 bytes limit [message #639078] Mon, 15 November 2010 08:53 Go to next message
Fran Blanco is currently offline Fran BlancoFriend
Messages: 20
Registered: October 2010
Junior Member
Hiii,

I have been reading about this error in the forum and i have tried to solve with several options:

- To update Eclipse and Xtext platform.
- To add Classsplitting=true in options in my MWE2...

But the error persists and I dont know how to solve it...
I am creating a grammar with 1000 commands and i knew that problem would appear sooner or later... Sad

Thz!

B
Re: The code for the static initializer is exceeding the 65535 bytes limit [message #639114 is a reply to message #639078] Mon, 15 November 2010 11:06 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
Do you have this problem in the lexer or in the parser ?
Re: The code for the static initializer is exceeding the 65535 bytes limit [message #639115 is a reply to message #639078] Mon, 15 November 2010 11:11 Go to previous messageGo to next message
Fran Blanco is currently offline Fran BlancoFriend
Messages: 20
Registered: October 2010
Junior Member
In the parser.

Description Resource Path Location Type
The code for the static initializer is exceeding the 65535 bytes limit InternalDSLParser.java /org.xtext.DSL.ui/src-gen/org/xtext/ui/contentassist/a ntlr/internal line 24 Java Problem

[Updated on: Mon, 15 November 2010 11:11]

Report message to a moderator

Re: The code for the static initializer is exceeding the 65535 bytes limit [message #640200 is a reply to message #639115] Fri, 19 November 2010 14:13 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Fran,

we tried to reduce the amount of generated code in the parser for Xtext
2.0. However, there is no workaround for Xtext 1.0.* besides the advice
to refactor your grammar.

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

Am 15.11.10 12:11, schrieb Fran Blanco:
> In the parser.
>
> Description Resource Path Location Type
> The code for the static initializer is exceeding the 65535 bytes limit
> InternalDSLParser.java
> /org.xtext.clanguage.ui/src-gen/org/xtext/ui/contentassist/a
> ntlr/internal line 24 Java Problem
>
Re: The code for the static initializer is exceeding the 65535 bytes limit [message #640869 is a reply to message #639078] Tue, 23 November 2010 11:48 Go to previous messageGo to next message
Fran Blanco is currently offline Fran BlancoFriend
Messages: 20
Registered: October 2010
Junior Member
I am trying to install the new version of Xtext (2.0) but i cannot do it...!

Anyway, i want to divide my grammar into three fragments to avoid the error... I hope to get it...!

Sebastian, when you tell me about to refactor my grammar, how can i do that? I write you a command structure i need to add in my grammar:

CPYF: // Todos los parametros bien puestos...
	cpyf='CPYF'
	('FROMFILE' '(' DIRECTORIO ')'   )
	('TOFILE' '(' ('*PRINT' | DIRECTORIO) ')' )
	('FROMMBR' '(' ('*FIRST'|'*ALL'| ID) ')' )?
	('TOMBR' '(' ('*FIRST'|'*ALL'|'*FROMMBR' | ID) ')'	)?
	('MBROPT' '('      ('*NONE' | '*ADD' | '*REPLACE' | '*UPDADD')	')'	)?
	('CRTFILE' '('	('*NO'|'*YES') ')'	)?
	('OUTFMT' '('	('*CHAR'|'*HEX')	')'	)?
	('PRINT' '('	('*NONE'|'*EXCLD' | '*COPIED' | '*ERROR') 	')'	)?
	('RCDFMT' '('	('*ONLY'|'*ALL' | ID)	')'	)?
	('FROMRCD' '('	('*START'|Dato)	')'	)?
	('TORCD' '('	('*END'|Dato)	')'	)?
	('FROMKEY' '('	('*NONE'|(INT |'*BLDKEY') (Valor)+    )	')'	)?
	('TOKEY' '('	('*NONE'|(INT |'*BLDKEY') (Valor)+    )	')'	)?
	('NBRRCDS' '('	('*END'| INT)	')'	)?
	('INCCHAR' '('	('*NONE'| ((ID |'*RCD'|'*FLD') (INT) (opincchar=OPINEQ) (Valor)) )	')'	)?
	('INCREL' '('	('*NONE' | ( (opincchar1=ANDOR) (ID) (opincchar2=OPINEQ) (Valor)  ) )	')'	)?
	('FMTOPT' '('  ('*NONE' | '*NOCHK' | '*CVTSRC' | LISTAFMTOPT)	')'	)?
	('SRCOPT' '('	('*SAME'| (('*SEQNBR' | '*DATE') ('*SEQNBR' | '*DATE')  ) )	')'	)?
	('SRCSEQ' '('	(Valor Valor)	')'	)?
	('ERRLVL' '('	(INT | '*NOMAX')	')'	)?
	('COMPRESS' '('	('*YES' | '*NO')	')'	)?;
LISTAFMTOPT:
	('*MAP' | '*DROP' | '*CVTFLOAT' | '*NULLFLAGS')+;


The commands have a lot of parameters frequently and I think the way i am introducing them is right...!

How you refactor this command?

I group them in a new DataType like:

Quote:


Tipo4:
COPYF1 |
COPYF2 |
COPYF3
...
...
COPYFn;



What do u think about this structure?

Thank again!!!

B.
Re: The code for the static initializer is exceeding the 65535 bytes limit [message #720028 is a reply to message #640869] Mon, 29 August 2011 17:37 Go to previous message
Alex Ruiz is currently offline Alex RuizFriend
Messages: 103
Registered: March 2011
Senior Member
There is a bug (which is fixed in 2.0.1) that might be related to your problem: https://bugs.eclipse.org/bugs/show_bug.cgi?id=349992
Previous Topic:AbstractFileSystemAccess needs getOutputPath(...) methods
Next Topic:Documentation on writing Xtend2 Template
Goto Forum:
  


Current Time: Thu Apr 25 06:52:57 GMT 2024

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

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

Back to the top