<br>   Sorry, my focus was on the feature, so I was not clear. <br>   This is how the documentation should look overall. I will use [ ] to denote groups.<br><br>   Any pattern takes the form:<br><br>&lt;pattern_decl&gt; ::= &lt;variable&gt; : &lt;pattern&gt;<br>
<br>   You can combine patterns using infix or prefix CEs &quot;and&quot; and &quot;or&quot; (both forms are equivalents). Example using &quot;or&quot;:<br><br>&lt;pattern_decl&gt; [ or &lt;pattern_decl&gt; ]*<br>( or &lt;pattern_decl&gt; [ &lt;pattern_decl&gt; ]* )<br>
<br>   Now, there is this beast in the syntax that allow a special case of &quot;or&quot; that works only like this:<br><br>&lt;variable&gt; : ( &lt;pattern&gt; [ or &lt;pattern&gt; ]* ) <br>   <br>  For the special case above, only infix &quot;or&quot; is accepted and the internal patterns don&#39;t accept bindings.<br>
<br>  I agree with you that a fix is needed: either we remove the syntax completely or we keep it for backward compatibility, but either way we need the documentation to be updated accordingly.<br><br>  I think the orthogonal form is less error prone because it is orthogonal and you would rarely use it when writing rules manually (binding to the same variable), and if you do, you are explicitly showing your intent. <br>
<br>  Anyway, discussion is still open, but the docs needs clarification, yes.<br><br>   []s<br>   Edson<br><br><br><div class="gmail_quote">2009/3/16 Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2009/3/16 Edson Tirelli <span dir="ltr">&lt;<a href="mailto:tirelli@post.com" target="_blank">tirelli@post.com</a>&gt;</span><br>
<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>   This is an old discussion. Single binding on &quot;or&quot; is a non-orthogonal special case on the language syntax that was introduced in the early days when we only had &quot;infix&quot; CEs. When we started to support prefix CE, the special case was not updated, and as a result, the single binding works only with infix.<br>


</blockquote></div><div><br>The example I&#39;ve posted is practically identical to Example 7.55, or with binding. So, if it&#39;s not in the language, it&#39;d better not be in the documentation :-)<br><br>As for the individual binding, as in<div class="im">
<br>
      (or $t : Trigger(fa == 1)<br>            $t : Trigger(fa == 2))<br></div>the documentation ought to caution against using different names, at least when these names are used on the RHS.<br><br></div>I agree that or groups with bindings on patterns are tricky. But is the form that&#39;s now accepted by the compiler less error-prone than the one the compiler refuses?<br>

</div><br>Wolfgang<br><br><br>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>