Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Decision can match input such as "RULE_ID" using multiple alternatives
Decision can match input such as "RULE_ID" using multiple alternatives [message #1806134] Fri, 03 May 2019 10:20 Go to next message
Marshall Charron is currently offline Marshall CharronFriend
Messages: 72
Registered: August 2018
Member
Hi,

I am implementing a DSL using Xtext, at some point in my syntax I want to write something like :
object instanceOfObject in user1

OR
object instanceOfObject.port1 in user1


OR
object user1 out user2


OR
object user1 out role1


Here is the syntax I tried, but I get this error :

Decision can match input such as "RULE_ID" using multiple alternatives: 1, 2

Could you see the problem ? From your experience what would be the best strategy for the syntax I want to accomplish ?

Object:
	'object' (name=ID ':')?  attributeSubject=attributeSubjectObject effect=Effect commObject=attributeSubjectObject
;

attributeSubjectObject:
	(attributeSubject=[SubjectAny] (attributeSubjectElements=SubjectElements)?) | otherCommSubjets=[OtherSubjets]
;

Effect:
	in='in' | 
	out='out'
;

SubjectElements:
	ObjectPort | ObjectState
;

SubjectAny:
	Object | InstanceObject
;

OtherSubjets:
	Role | User
;



Thanks a lot

[Updated on: Fri, 03 May 2019 10:21]

Report message to a moderator

Re: Decision can match input such as "RULE_ID" using multiple alternatives [message #1806135 is a reply to message #1806134] Fri, 03 May 2019 10:37 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

The grammar is incomplete. The ambiguity will come from a different part.

Please read: https://blogs.itemis.com/en/debugging-xtext-grammars-what-to-do-when-your-language-is-ambiguous
Previous Topic:Repeatable active annotations
Next Topic:Lean serializer
Goto Forum:
  


Current Time: Thu Apr 25 07:46:29 GMT 2024

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

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

Back to the top