Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Beginner Question: Xtext Error RULE_ID
Beginner Question: Xtext Error RULE_ID [message #1196848] Tue, 19 November 2013 16:30 Go to next message
René Czerny is currently offline René CzernyFriend
Messages: 2
Registered: November 2013
Junior Member
Hello everybody!
I just recently started diving into the world of Xtext and am stuck for quite some time now.
I have created a grammar and when I test my reference model, I get an error:

mismatched input '"At which university are you studying?"' expecting RULE_ID

The error occurs at line 11 of the model.
Even after some time of googling, I couldn't get any wiser as to why this problem occurs. Something apparently isn't working with the References.
Maybe someone could help me find this problem? I'm sure it is quite some beginner mistake I made.

Thank you very much!
Cheers,
René

P.s.: Please find the model and the grammar attached as .txt files.

P.p.s:
I am using Eclipse Modeling Tools
Version: Kepler Service Release 1
Build id: 20130919-0819
and the Xtext Plugin
do you need some more information?
  • Attachment: grammar.txt
    (Size: 0.92KB, Downloaded 272 times)
  • Attachment: model.txt
    (Size: 0.92KB, Downloaded 252 times)
Re: Beginner Question: Xtext Error RULE_ID [message #1196873 is a reply to message #1196848] Tue, 19 November 2013 16:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

first you should avoid blanks in keywords. use 'this' 'is' 'a' 'sentence' instead
then your grammar seems to be ambigous regarding the comma
then question=[ClosedQuestion] is a cross reference. sure you want to do that.
if so change the grammar to question=[ClosedQuestion|STRING], you would although have to change the IQualifiedNameProvider
since you can cross ref only stuff that has a name


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Beginner Question: Xtext Error RULE_ID [message #1198860 is a reply to message #1196873] Wed, 20 November 2013 14:53 Go to previous message
René Czerny is currently offline René CzernyFriend
Messages: 2
Registered: November 2013
Junior Member
Hello!
Thank you very much for the great hints! It was very helpful indeed and I managed to move forward to the next problem Wink
Thank you!

Cheers,
René
Previous Topic:Multiple Outline Views
Next Topic:Yet another parsing rule question (cross reference)
Goto Forum:
  


Current Time: Tue Apr 23 17:32:45 GMT 2024

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

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

Back to the top