Grammar element with cross-reference [message #1409736] |
Mon, 18 August 2014 17:55  |
Eclipse User |
|
|
|
I'm struggling to figure out how (if possible) to define my grammar such that I can specify either an entity or a cross-reference to an entity of the same type, e.g.:
Entity:
'entity' name = ID id = STRING
form = (FormRef | [FormRef])
;
Form:
'form' name = ID
....
;
When I generate the XText artifacts I get the following warning:
Decision can match input such as "'form' RULE_ID RULE_STRING" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
And then when running my model, I can only parse input for an explicit definition of form and not the cross-reference.
Is there any way to accomplish this?
Can anyone offer me some assistance or direction?
Thanks!
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04117 seconds