<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Markus Helbig wrote:
<blockquote
 cite="mid:50f4d7ac0801280728r35daaf47u916d425e7cd1c274@mail.gmail.com"
 type="cite">
  <pre wrap="">ok this works, BUT using a DSL it fails again.

DSL:

[condition][]is a Person=Person()
[condition][]- female=sex == "f"
[condition][]- male=sex == "f"
[condition][]- age {value}=age=={value}

DSLR:

rule
    when
         ($person: is a Person
               - male
               - age 60
         or
         $person: is a Person
               - female
               - age 70)
    then
end

resolves to:
                                |
                               \/
.... ($person: Person( , sex="m", age == 60)
     or
      $person: Person(sex="f", age == 70))


the "," seems to be the problem ..
  </pre>
</blockquote>
I'm betting 'or' isn't doing what you think it's going? Conditional
Element 'or' results in sub rule generation, each rule is total
separate, so your above rule will result in two rules, both of which
can match and fire if satisfied. I'm guessing its the 'or' that is
screwing up the parsing with the extra quotation at the front? Can you
open a jira for this?<br>
<blockquote
 cite="mid:50f4d7ac0801280728r35daaf47u916d425e7cd1c274@mail.gmail.com"
 type="cite">
  <pre wrap="">
Cheers

Markus

2008/1/28, Krishnan Sivaramakrishna Iyer <a class="moz-txt-link-rfc2396E" href="mailto:krishiyer@gmail.com">&lt;krishiyer@gmail.com&gt;</a>:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi Markus,

can u try this please ?

(pensioner : Person( sex == "f", age &gt; 60 )
 or pensioner : Person( sex == "m", age &gt; 65 ) )

-Krishnan

Markus Helbig wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">This is from Drools documentation

Example 6.36. or with binding

pensioner : (or Person( sex == "f", age &gt; 60 )
                Person( sex == "m", age &gt; 65 ) )

Explicit binding on each Pattern is also allowed.

(or pensioner : Person( sex == "f", age &gt; 60 )
    pensioner : Person( sex == "m", age &gt; 65 ) )


but trying to get this to work resolves in:

[60,8]: unknown:60:8 Unexpected token 'or'[62,8]: unknown:62:8
mismatched token: [@639,2279:2291='Person',&lt;7&gt;,62:8]; expecting type
RIGHT_PAREN[62,81]: unknown:62:81 mismatched token:
[@656,2352:2352=')',&lt;12&gt;,62:81]; expecting type THEN

Any ideas (using Drools 4.0.4)?

Cheers

Markus
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>

      </pre>
    </blockquote>
    <pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>

    </pre>
  </blockquote>
  <pre wrap=""><!---->_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>

  </pre>
</blockquote>
<br>
</body>
</html>