<br> 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> For examples on how to work with it, look at the RuleParserTest.java unit test.<br><br> []s<br> Edson<br><br><div><span class="gmail_quote">2007/7/31, hypnosat7 <<a href="mailto:ablarbi@yahoo.fr">
ablarbi@yahoo.fr</a>>:</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> I'm trying to recover errors information on parsing errors but I don't
<br>know how to get a List<RecognitionException> 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<RecognitionException> parsingErrors = new<br>ArrayList<RecognitionException>();<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> Edson Tirelli
<br> Software Engineer - JBoss Rules Core Developer<br> Office: +55 11 3529-6000<br> Mobile: +55 11 9287-5646<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>