Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsAllow keywords in any order
https://www.eclipse.org/forums/index.php/mv/msg/439096/984412/#msg_984412
ClassDefinition : ('opt1'|'opt2'|'opt3')*? name=ID ";" ;
where "*?" means "any of them in any order but each one only once".
How can I do something like that?
Background: I have some places where a rule has 5-10 options and I want to enable users to give them in any order.
Regards,
A. Digulla]]>Aaron Digulla2012-11-14T17:26:13-00:00Re: Allow keywords in any order
https://www.eclipse.org/forums/index.php/mv/msg/439096/984457/#msg_984457
Christian Dietrich2012-11-14T18:11:36-00:00Re: Allow keywords in any order
https://www.eclipse.org/forums/index.php/mv/msg/439096/985386/#msg_985386
I see you are familiar with unordered groups, this solves the "any of them in any order" part.
Solve the "each of them only once" by a validation rule.
Regards,
~Karsten]]>Karsten Thoms2012-11-15T11:03:15-00:00Re: Allow keywords in any order
https://www.eclipse.org/forums/index.php/mv/msg/439096/985529/#msg_985529
For all the people who have the same problem, you can find an explanation and example here: http://www.eclipse.org/Xtext/documentation.html#syntax
Search for "Unordered Groups" in the page.
Regards,
A. Digulla]]>Aaron Digulla2012-11-15T13:21:10-00:00