Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » mismatched input 'cmpResearchItem' expecting RULE_ID
mismatched input 'cmpResearchItem' expecting RULE_ID [message #870693] Wed, 09 May 2012 07:20 Go to next message
Martin Gerhardy is currently offline Martin Gerhardy
Messages: 4
Registered: July 2009
Location: Germany, Hamburg
Junior Member

Hi,

I'm getting the error "mismatched input 'cmpResearchItem' expecting RULE_ID" when loading attached research.ufo with my also attached grammar.

component cmpResearchItem extends panel {
[...]
}


with the grammar:

[...]
/** components can extend any ui node */
UINodeComponent:
	"component" name=ID "extends" superComponent=[UINodeComponent|UINodeType] "{" ("{"
	(properties+=UINodeProperties)* "}")? (nodes+=UINode)* "}";
[...]


can anyone please help me to fix it? attached is the full grammar and the full script file that i'm trying to parse.

I'm using xtext 2.2.1

Thanks a lot


---
Member of the UFO:AI team

[Updated on: Wed, 09 May 2012 07:24]

Report message to a moderator

Re: mismatched input 'cmpResearchItem' expecting RULE_ID [message #870794 is a reply to message #870693] Wed, 09 May 2012 13:25 Go to previous messageGo to next message
Martin Gerhardy is currently offline Martin Gerhardy
Messages: 4
Registered: July 2009
Location: Germany, Hamburg
Junior Member

the latest version of the grammar is available here: ufoai.git.sourceforge.net/git/gitweb.cgi?p=ufoai/ufoai;a=blob_plain;f=eclipse/net.sourceforge.ufoai.dsl/src/net/sourceforge/ufoai/UFOScript.xtext;hb=HEAD

---
Member of the UFO:AI team
Re: mismatched input 'cmpResearchItem' expecting RULE_ID [message #870803 is a reply to message #870794] Wed, 09 May 2012 14:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 4419
Registered: July 2009
Senior Member
Hi,

you terminal UFO_STRING hides the terminal ID

~Christian
Re: mismatched input 'cmpResearchItem' expecting RULE_ID [message #870816 is a reply to message #870803] Wed, 09 May 2012 14:54 Go to previous message
Martin Gerhardy is currently offline Martin Gerhardy
Messages: 4
Registered: July 2009
Location: Germany, Hamburg
Junior Member

thanks a lot - that fixed it.

---
Member of the UFO:AI team
Previous Topic:Getting a Lexer from a file extension
Next Topic:Xtext 2.3 M6 Grammar Editor can't resolve JavaVMTypes import correctly
Goto Forum:
  


Current Time: Thu May 23 00:10:09 EDT 2013

Powered by FUDForum. Page generated in 0.02201 seconds