<br>&nbsp;&nbsp;&nbsp; DrlParser.getErrors() will give you a list of errors but they are not RecognitionException errors... they are higher level exceptions. If you want raw RecognitionExceptions, you will need to work with the antlr generated parser:
<br><br>org.drools.lang.DRLParser<br><br>&nbsp;&nbsp; For examples on how to work with it, look at the RuleParserTest.java unit test.<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div><span class="gmail_quote">2007/7/31, hypnosat7 &lt;<a href="mailto:ablarbi@yahoo.fr">
ablarbi@yahoo.fr</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Hi,<br><br>&nbsp;&nbsp;I&#39;m trying to recover errors information on parsing errors but I don&#39;t
<br>know how to get a List&lt;RecognitionException&gt; from the DrlParser instance :<br><br>Reader drlReader2 = new<br>InputStreamReader(PackageValidator.class.getResourceAsStream(PACKAGE_DRL));<br>DrlParser drlParser = new DrlParser();
<br>PackageDescr packageDescr = drlParser.parse(drlReader2);<br>List&lt;RecognitionException&gt; parsingErrors = new<br>ArrayList&lt;RecognitionException&gt;();<br>parsingErrors = drlParser.getErrors() ????<br><br>May be I can extends the DrlParser class with I new method like :
<br>getErrorRecognition<br>Is it a good Idea ?<br><br>Thanks<br>--<br>View this message in context: <a href="http://www.nabble.com/parsing-errors-tf4192364.html#a11922150">http://www.nabble.com/parsing-errors-tf4192364.html#a11922150
</a><br>Sent from the drools - user mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli
<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>