[rules-users] Compound DSL statements

Chris Selwyn chris at selwyn-family.me.uk
Fri Dec 17 10:55:46 EST 2010


I tried creating a DSL something like the following:-

[when] there is a QQ with attr equal to {YYY} = there is a Q - with attr 
equal to {YYY}
[when]there is a Q = Question()
[when] - with attr equal to {YYY} = attr == "{YYY}"

but I find that the expansion does not seem to work right.

When I use this like

when
   there is a QQ with attr equal to abc
then
   ...

What this expands to is

Question() attr == "abc"

I was hoping that the condition would be put inside the pattern.

Is it not possible to make "compound" DSL statements that use inline "-" 
clauses?

Chris Selwyn



More information about the rules-users mailing list