Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » The method ruleeState() is undefined for the type InternalRpcIDLParser4
The method ruleeState() is undefined for the type InternalRpcIDLParser4 [message #1151388] Wed, 23 October 2013 10:07 Go to next message
chris yo is currently offline chris yoFriend
Messages: 146
Registered: February 2013
Senior Member
I got an error in my xtext compilation:
The code for the static initializer is exceeding the 65535 bytes limit InternalRpcIDLParser.java /org.xtext.rpcIDL.ui/src-gen/org/xtext/ui/contentassist/antlr/internal line 23 Java Problem

I searched online regarding the solution and I found that I can fix it by adding these in XtextAntlrGeneratorFragment and XtextAntlrUIGeneratorFragment:
options = {
                classSplitting=true
                fieldsPerClass="200"
                methodsPerClass="100"
                  }


This got rid of the 65535 limit error but introduces a lot of other bugs.

This is the error:
The method ruleeState() is undefined for the type InternalRpcIDLParser4 InternalRpcIDLParser.java /org.xtext.rpcIDL/src-gen/org/xtext/parser/antlr/internal line 24785 Java Problem

eState is an enum in my grammar file. All the errors are about an undefined method rule of all my enum in the grammar file.

Does someone have an idea on how to fix this?
Re: The method ruleeState() is undefined for the type InternalRpcIDLParser4 [message #1152496 is a reply to message #1151388] Thu, 24 October 2013 02:48 Go to previous messageGo to next message
chris yo is currently offline chris yoFriend
Messages: 146
Registered: February 2013
Senior Member
Update:

I tweak the values for fieldsPerClass and methodsPerClass, and set it to 200 and 500 respectively, which made the errors go away.
But the generator is not able to do the sorting algorithm correctly. I am using the
java.util.Comparator.

Question:
How will I compute for the appropriate values to be set in fieldsPerClass and methodsPerClass?

Aside from adding these options in XtextAntlrGeneratorFragment and XtextAntlrUIGeneratorFragment, are there other settings I need to do to make this work correctly?
Re: The method ruleeState() is undefined for the type InternalRpcIDLParser4 [message #1395203 is a reply to message #1152496] Sun, 06 July 2014 14:52 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1746
Registered: July 2009
Senior Member
I'm hitting the 65535 bytes limit, too. And for me specifying the recommended options of classSplitting etc. also makes the resulting parser uncompilable (methods are called from scopes where they are not available).

Is there anything else I need to specify?

For now, I found that using the default numbers (rather then the recommended 200 e.g.) works around the problem but this feels fragile to me...

thanks
Stephan
Previous Topic:Maven repository for 2.7.0-SNAPSHOT
Next Topic:Possible to extend Google'S Go using Xtext?
Goto Forum:
  


Current Time: Thu Dec 12 13:42:14 GMT 2019

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

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

Back to the top