I tried a few permutations with 5.1.x<div><br></div><div>Nested infix appears to have a few problems, as you describe (although your last example is incomplete); e.g.:-</div><div><br></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">rule &quot;Unknown error while parsing. This is a bug. Please contact the Development team.&quot;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">when</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">(or </font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-style-span" style="white-space: pre;">    </span>(</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-style-span" style="white-space: pre;">    </span>or Fact( ) Fact( )</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-style-span" style="white-space: pre;">    </span>)</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-style-span" style="white-space: pre;">    </span>Fact() </font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">)</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">then</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-style-span" style="white-space: pre;">    </span>//Something</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">end <br></font><br></div><div>Non-nested infix looked OK:-</div><div><br></div><div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">rule &quot;compiles OK - 1&quot;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">when</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">(or </font><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; ">Fact( ) Fact( ) </span><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; ">Fact()) </span></div>
<div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; ">then</span></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-style-span" style="white-space: pre; ">    </span>//Something</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">end <br></font></div></div><div><br></div><div>Post-fix appears OK:-</div><div><br></div><div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">rule &quot;compiles OK - 2&quot;</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">when</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">(</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    Fact() or </font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">    Fact()</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">) or </font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Fact() </font></div>
<div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; ">then</span></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-style-span" style="white-space: pre;">    </span>//Something</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">end</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-style-span" style="font-family: arial; "><div>
Based on my limited test it appears to be a bug and my advice would be to raise a JIRA.</div><div><br></div><div>As a work around you can change your rules in post-fix notation.</div><div><br></div><div>With kind regards,</div>
<div><br></div><div>Mike</div><div><br></div></span></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"> <br></font></div><div class="gmail_quote">On 26 October 2010 11:09, Swindells, Thomas <span dir="ltr">&lt;<a href="mailto:TSwindells@nds.com">TSwindells@nds.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">What are you actually trying to achieve?<br>
It would probably be a lot cleaner and better just to write these as separate rules - one for each case you want to consider.<br>
<br>
Thomas<br>
<div><div></div><div class="h5"><br>
&gt; -----Original Message-----<br>
&gt; From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-">rules-users-</a><br>
&gt; <a href="mailto:bounces@lists.jboss.org">bounces@lists.jboss.org</a>] On Behalf Of chrbonte<br>
&gt; Sent: 26 October 2010 10:52<br>
&gt; To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; Subject: [rules-users] no viable alternative at input &#39;or&#39;<br>
&gt;<br>
&gt;<br>
&gt; Hi<br>
&gt;<br>
&gt; I&#39;m struggling with the rule syntax. I took over this drools project of a<br>
&gt; collegue who left the company and am struggling with a bug in our<br>
&gt; application.<br>
&gt;<br>
&gt; The following works:<br>
&gt;<br>
&gt; rule &quot;cbo2&quot;<br>
&gt; when<br>
&gt; (or<br>
&gt; Patient(sex == &quot;F&quot;)<br>
&gt; Patient(sex == &quot;&quot;)<br>
&gt; )<br>
&gt; then<br>
&gt; ...<br>
&gt; end<br>
&gt;<br>
&gt; What doesn&#39;t work is the following:<br>
&gt;<br>
&gt; rule &quot;cbo&quot;<br>
&gt; when<br>
&gt; (or<br>
&gt;       (or<br>
&gt;               Patient(sex == &quot;F&quot;)<br>
&gt;               Patient(age &gt; 2)<br>
&gt;       )<br>
&gt;       Patient(sex == &quot;&quot;)<br>
&gt; )<br>
&gt; then<br>
&gt; ...<br>
&gt; end<br>
&gt;<br>
&gt; AND<br>
&gt;<br>
&gt; rule &quot;cbo&quot;<br>
&gt; when<br>
&gt; (or<br>
&gt;       (or<br>
&gt;               Patient(sex == &quot;F&quot;)<br>
&gt;               Patient(age &gt; 2)<br>
&gt;       )<br>
&gt; )<br>
&gt; then<br>
&gt; ...<br>
&gt; end<br>
&gt;<br>
&gt; -------------------<br>
&gt;<br>
&gt; Can someone please point me in the right direction or explain to me why I<br>
&gt; get &quot;no viable alternative at input &#39;or&#39; with the last 2 examples?<br>
&gt;<br>
&gt; Regards<br>
&gt; Christophe<br>
&gt; --<br>
&gt; View this message in context: <a href="http://drools-java-rules-" target="_blank">http://drools-java-rules-</a><br>
&gt; <a href="http://engine.46999.n3.nabble.com/no-viable-alternative-at-input-or-" target="_blank">engine.46999.n3.nabble.com/no-viable-alternative-at-input-or-</a><br>
&gt; tp1772702p1772702.html<br>
&gt; Sent from the Drools - User mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
<br>
</div></div>**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the <a href="mailto:postmaster@nds.com">postmaster@nds.com</a> and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.<br>

<br>
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00<br>
**************************************************************************************<br>
<div><div></div><div class="h5"><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>
</div></div></blockquote></div><br></div>