Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » NoSuchMethodException
NoSuchMethodException [message #1695670] Mon, 18 May 2015 12:34 Go to next message
Dominik Reinert is currently offline Dominik ReinertFriend
Messages: 14
Registered: May 2015
Junior Member
Hello,

When I finished building my Language (a simple IF - Then architecture) I tried to build it like described on the xtext documentation page (https://www.eclipse.org/Xtext/documentation/101_five_minutes.html).

When I created the new File I got this Message:

'java.lang.NoSuchMethodException: org.xtext.example.mydsl.parser.antlr.internal.InternalMyDslParser.entryRuleLanguage()'

Can anybody help me pls?
Re: NoSuchMethodException [message #1695672 is a reply to message #1695670] Mon, 18 May 2015 12:39 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
Are you sureyou didnot forget to regenerate the lan.guage and there are no error messages when generating?
Can you share a grammar that reproduces the problem


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: NoSuchMethodException [message #1695716 is a reply to message #1695672] Mon, 18 May 2015 14:46 Go to previous messageGo to next message
Dominik Reinert is currently offline Dominik ReinertFriend
Messages: 14
Registered: May 2015
Junior Member
This is the grammar:

grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals

generate ruleLanguage "http://www.xtext.org/example/mydsl/MyDsl"

import "http://www.eclipse.org/emf/2002/Ecore" as ecore

ruleLanguage:
	'if ['timeInMs=INT']('conds=CONDITIONS')then('actions=ACTIONS')';
	
/* There can be as many conditions as the user wants to */
/* link to another									   */
CONDITIONS returns Expression:
	SCOND ({CONDITIONS.left=current} '&' right=SCOND)*;
	
/* This is how one condition is set up:				   */
/* name << value									   */
/* for example:										   */
/* sensor1.temperature << 100°C						   */
SCOND returns Expression:
	sname=ID COMP value=INT;

/* These are the possible operators (comparison only)  */	
COMP:
	'<<' | '>>' | '==' | '<=' | '>=';

/* The conditions defined earlier can also have as many */
/* actions as the user wants                            */
ACTIONS returns Expression:
	ACTION ({ACTIONS.left=current}'&' right=ACTION)*;

/* An action has a name and gets a parameter list, e.g.:*/
/* sendEmail ("example@googlemail.com")				    */
ACTION returns Expression:
	fname=ID '(' params=PARLIST ')';

/* Whatever comes here should just be given to the      */
/* called function of the main program                  */	
PARLIST returns Expression:
	MOREPAR ({PARLIST.left=current} ',' right=MOREPAR)*;
	
MOREPAR  returns Expression:
	{MOREPAR}MOREPARValue=MOREPARValue ;
	
MOREPARValue returns ecore::EString:(INT | ID);	


and no, there are no problems when generating. I only needed to download the antlr 3.0 builder and it worked fine. (I installed it after I was told in the console that it would be needed)

Also, it was no problem to start a new eclipse with the set xtext properties.
Re: NoSuchMethodException [message #1695717 is a reply to message #1695716] Mon, 18 May 2015 14:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
can you pleasye file a ticket for that. workaround: stick to std. java Naming Conventions

RuleLanguage


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: NoSuchMethodException [message #1695769 is a reply to message #1695717] Tue, 19 May 2015 07:53 Go to previous message
Dominik Reinert is currently offline Dominik ReinertFriend
Messages: 14
Registered: May 2015
Junior Member
That was the problem. I was missing the first capital letter in Rule.

Thank you
Previous Topic:Apply scoping without grammar ref
Next Topic:Semantic Highlighting
Goto Forum:
  


Current Time: Fri Mar 29 02:34:22 GMT 2024

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

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

Back to the top