Nov 17, 2011 at 3:34 PM
Edited Nov 17, 2011 at 3:35 PM
Hi, I have a question regarding my project where i'm using Irony.
What i currently have is the following
addblockcmd = new
addblockcmd.Rule = ToTerm("addblock")
+ nameoptions + getpos + getrot + getsize + getdsize + getcog + getdmass + getmass +
I was wondering whether there is a way (besides writing a rule for every single option) to be able to accept input so that the order after nameoptions, is independant but also can only occur once.
so to make it more clear:
addblock block1 pos 1 rot 2 size 3, dsize 4 cog 5 dmass 6 mass 7; (this is acceptabel according to rule)
addblock block1 rot 2 pos 1 size 3, dsize 4 cog 5 dmass 6 mass 7; (this is NOT acceptabel according to rule, because pos should be before rot)
However, if i change the rule so that all to options (getpos, getrot, getsize, getdsize ......) is in a makestarrule it would create the problem of people being able to put getpos twice or even more times for one instance of addblock.
is there a way to define the rule so that all the options after nameoptions can be given without a specific order, but also can be entered only once for every command (like getpos)????????