Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Beginner Question: Xtext Error RULE_ID
Beginner Question: Xtext Error RULE_ID [message #1196848] Tue, 19 November 2013 11:30 Go to next message
Eclipse UserFriend
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 291 times)
  • Attachment: model.txt
    (Size: 0.92KB, Downloaded 270 times)
Re: Beginner Question: Xtext Error RULE_ID [message #1196873 is a reply to message #1196848] Tue, 19 November 2013 11:46 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Beginner Question: Xtext Error RULE_ID [message #1198860 is a reply to message #1196873] Wed, 20 November 2013 09:53 Go to previous message
Eclipse UserFriend
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: Mon Jul 07 10:32:48 EDT 2025

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

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

Back to the top