Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328753

Summary: Too many constants error in generated internalXXXParser.java for huge grammar
Product: [Modeling] TMF Reporter: Philipp Salvisberg <philipp.salvisberg>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: sebastian.zarnekow
Version: 1.0.1Flags: sebastian.zarnekow: indigo+
Target Milestone: SR1   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Xtext grammar and MWE2 workflow to reproduce error message none

Description Philipp Salvisberg CLA 2010-10-26 14:09:43 EDT
Build Identifier: I20100608-0911

The size of the grammar is currently limited by the number of keywords. Class splitting does not address the generation of constants. I get the following error message:

>Too many constants, the constant pool for InternalPLSQLParser would exceed 65536 entries	>InternalPLSQLParser.java	
>/com.trivadis.codecheck.ui/src-gen/com/trivadis/codecheck/ui/contentassist/antlr/internal
>line 27	Java Problem
 
Currently the problem arises just in ui project, but I'm expecting this error in the grammar project too while expanding the language definition.

A fix or workaround is very welcome...


Reproducible: Always
Comment 1 Philipp Salvisberg CLA 2010-10-28 11:47:11 EDT
Created attachment 181962 [details]
Xtext grammar and MWE2 workflow to reproduce error message

to reproduce the error:

a) create a Xtext 1.01 project via Eclipse wizard, name the project com.trivads.foo, the language com.trivadis.foo.Foo with the extension foo

b) copy the Xtext grammar and MWE2 workflow form the attached archive into the src folder

c) start the MWE2 workflow with adjusted JVM parameters, e.g. -Xms40m -Xmx3072m -XX:MaxPermSize=512m

HTH
Comment 2 Sebastian Zarnekow CLA 2010-11-29 05:32:17 EST
This one seems to be related to the class splitting feature, too. We should try to handle this case.
Comment 3 Sebastian Zarnekow CLA 2010-12-06 03:41:23 EST
Removed target milestone M4.
Comment 4 Sebastian Zarnekow CLA 2011-08-03 09:50:02 EDT
Should be fixed with bug 349992 - the number of allowed static fields is now customizable.
Comment 5 Philipp Salvisberg CLA 2011-09-06 15:55:13 EDT
I've migrated the real life project from 1.0.1 to 2.0.1 and it works now using the standard Xtext generators. Thanks a lot!
Comment 6 Karsten Thoms CLA 2017-09-19 17:19:06 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 7 Karsten Thoms CLA 2017-09-19 17:30:37 EDT
Closing all bugs that were set to RESOLVED before Neon.0