<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="address"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="country-region" downloadurl="http://www.5iantlavalamp.com/"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place" downloadurl="http://www.5iantlavalamp.com/"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-GB link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Oops sorry about that rookie mistake,
thanks for the info on Drools!<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Alex<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
rules-dev-bounces@lists.jboss.org [mailto:rules-dev-bounces@lists.jboss.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Edson Tirelli<br>
<b><span style='font-weight:bold'>Sent:</span></b> 23 February 2009 14:30<br>
<b><span style='font-weight:bold'>To:</span></b> Rules Dev List<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [rules-dev]
org.drools.rule.InvalidRulePackage: [0,-1]</span></font><span lang=EN-US><o:p></o:p></span></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
&nbsp;&nbsp; Drools 4 is tried and tested. Only the error message is not clear
for the uninitiated.<br>
<br>
&nbsp;&nbsp; The error message means that the Lexer found the end of the file
without finding a close character for a given token. In your case, looking more
carefully, a String:<o:p></o:p></span></font></p>

<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>settle_selection(&quot;test&quot;,20001&quot;,&quot;W&quot;);<o:p></o:p></span></font></pre>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
&nbsp;&nbsp;&nbsp; Drools 5 is in Milestone 5 now. Not recommended for
production, but stable enough for early adopters.<br>
<br>
&nbsp;&nbsp;&nbsp; []s<br>
&nbsp;&nbsp;&nbsp; Edson<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>2009/2/23 Zevenbergen, Alex &lt;<a
href="mailto:azevenbergen@paddypower.com">azevenbergen@paddypower.com</a>&gt;<o:p></o:p></span></font></p>

<div link=blue vlink=blue>

<div>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Thanks for your answer, but I get the same with 'end'</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Is the current release of drools 5 a stable one? I used 4
because I assumed it would be 'tried and tested'</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Thanks,</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Alex</span></font><o:p></o:p></p>

<p><font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>&nbsp;</span></font><o:p></o:p></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>

<hr size=2 width="100%" align=center>

</span></font></div>

<p><b><font size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'> <a
href="mailto:rules-dev-bounces@lists.jboss.org" target="_blank">rules-dev-bounces@lists.jboss.org</a>
[mailto:<a href="mailto:rules-dev-bounces@lists.jboss.org" target="_blank">rules-dev-bounces@lists.jboss.org</a>]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Edson Tirelli<br>
<b><span style='font-weight:bold'>Sent:</span></b> 23 February 2009 13:24<br>
<b><span style='font-weight:bold'>To:</span></b> Rules Dev List<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [rules-dev]
org.drools.rule.InvalidRulePackage: [0,-1]</span></font><o:p></o:p></p>

</div>

<div>

<div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p style='margin-bottom:12.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><br>
&nbsp;&nbsp; Lower case: 'end'.<br>
<br>
&nbsp;&nbsp; It seems this is a Drools 4 parser error message. In Drools 5 we
have much better error messages and they are documented.<br>
<br>
&nbsp;&nbsp; []s<br>
&nbsp;&nbsp; Edson<o:p></o:p></span></font></p>

<div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>2009/2/23
Zevenbergen, Alex &lt;<a href="mailto:azevenbergen@paddypower.com"
target="_blank">azevenbergen@paddypower.com</a>&gt;<o:p></o:p></span></font></p>

<div link=blue vlink=purple>

<div>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Hi
all,</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>I'm
just starting to use drools, I am using it to house the rules regarding
settlement of sports markets and such my rule packages should be relatively
simple and straight forward (ie when match winner = x then settle x as winner)</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>However
my first attempt to create a drl is failing with the following error</span></font><o:p></o:p></p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>

<p><font size=2 color=red face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:red;background:white'><span style='-moz-background-clip: -moz-initial;
-moz-background-origin: -moz-initial;-moz-background-inline-policy: -moz-initial;
background-attachment:scroll;background-position-x:0%;background-position-y:
0%'>org.drools.rule.InvalidRulePackage: [0,-1]: unknown:0:-1 mismatched token:
[@-1,0:0='&lt;no text&gt;',&lt;-1&gt;,0:-1]; expecting type END</span></span></font><o:p></o:p></p>

<p><font size=2 color=red face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:red'>&nbsp;</span></font><o:p></o:p></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>and I cant find much documentation online to help solve it.</span></font><o:p></o:p></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>&nbsp;</span></font><o:p></o:p></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>The complete drl file is:</span></font><o:p></o:p></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>&nbsp;</span></font><o:p></o:p></p>

<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>package xxx..rules.tennis<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp;<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>import xxx.object.Fact<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>import java.util.HashMap<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>import function xxx.Settle_Selection.settle_selection<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp;<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp;<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>rule &quot;Player 1 wins match&quot;<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp; &nbsp; &nbsp; salience 100<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp; &nbsp; &nbsp; agenda-group &quot;tennis&quot;<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp; &nbsp; &nbsp; when<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $f : Fact()<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; eval(($f.details[&quot;END_MATCH&quot;].toUpper().toString().equal(&quot;TRUE&quot;)))<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp; &nbsp; &nbsp; then<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; settle_selection(&quot;test&quot;,20001&quot;,&quot;W&quot;);<br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'><br>
<br>
<o:p></o:p></span></font></pre><pre><font size=2 face="Courier New"><span
style='font-size:10.0pt'>END<o:p></o:p></span></font></pre><pre><font size=2
face="Courier New"><span style='font-size:10.0pt'>&nbsp;<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>&nbsp;<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>&nbsp;<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>Thanks in advance,<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>Alex<o:p></o:p></span></font></pre>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>&nbsp;</span></font><o:p></o:p></p>

</div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><br>
________________________________________________________________________<br>
Privileged, confidential and/or copyright information may be contained in this
communication. This e-mail and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they are
addressed. If you are not the intended addressee, you may not copy, forward,
disclose or otherwise use this e-mail or any part of it in any way whatsoever.
To do so is prohibited and may be unlawful. If you have received this email in
error <br>
please notify the sender immediately.<br>
<br>
Paddy Power PLC may monitor the content of e-mail sent and received for the
purpose of ensuring compliance with its policies and procedures.<br>
<br>
Paddy Power plc, Airton House, <st1:Street w:st="on"><st1:address w:st="on">Airton
  Road</st1:address></st1:Street>, Tallaght, <st1:City w:st="on">Dublin</st1:City>
24 Registered in <st1:country-region w:st="on"><st1:place w:st="on">Ireland</st1:place></st1:country-region>:
16956<br>
________________________________________________________________________<o:p></o:p></span></font></p>

</div>

<p style='margin-bottom:12.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'><br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><o:p></o:p></span></font></p>

</div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><br>
<br clear=all>
<br>
-- <br>
&nbsp;Edson Tirelli<br>
&nbsp;JBoss Drools Core Development<br>
&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com"
target="_blank">www.jboss.com</a><o:p></o:p></span></font></p>

</div>

</div>

</div>

<div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
________________________________________________________________________<br>
Privileged, confidential and/or copyright information may be contained in this
communication. This e-mail and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they are
addressed. If you are not the intended addressee, you may not copy, forward,
disclose or otherwise use this e-mail or any part of it in any way whatsoever.
To do so is prohibited and may be unlawful. If you have received this email in
error <br>
please notify the sender immediately.<br>
<br>
Paddy Power PLC may monitor the content of e-mail sent and received for the
purpose of ensuring compliance with its policies and procedures.<br>
<br>
Paddy Power plc, Airton House, <st1:Street w:st="on"><st1:address w:st="on">Airton
  Road</st1:address></st1:Street>, Tallaght, <st1:City w:st="on">Dublin</st1:City>
24 Registered in <st1:country-region w:st="on"><st1:place w:st="on">Ireland</st1:place></st1:country-region>:
16956<br>
________________________________________________________________________<o:p></o:p></span></font></p>

</div>

</div>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br clear=all>
<br>
-- <br>
&nbsp;Edson Tirelli<br>
&nbsp;JBoss Drools Core Development<br>
&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><o:p></o:p></span></font></p>

</div>


<BR>
________________________________________________________________________<BR>
Privileged, confidential and/or copyright information may be contained in this communication. This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended addressee, you may not copy, forward, disclose or otherwise use this e-mail or any part of it in any way whatsoever. To do so is prohibited and may be unlawful. If you have received this email in error <BR>
please notify the sender immediately.<BR>
<BR>
Paddy Power PLC may monitor the content of e-mail sent and received for the purpose of ensuring compliance with its policies and procedures.<BR>
<BR>
Paddy Power plc, Airton House, Airton Road, Tallaght, Dublin 24  Registered in Ireland: 16956<BR>
________________________________________________________________________<BR>
</body>

</html>