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:
org.drools.lang.DRLParser
For examples on how to work with it, look at the RuleParserTest.java unit
test.
[]s
Edson
2007/7/31, hypnosat7 <ablarbi(a)yahoo.fr>:
Hi,
I'm trying to recover errors information on parsing errors but I don't
know how to get a List<RecognitionException> from the DrlParser instance :
Reader drlReader2 = new
InputStreamReader(PackageValidator.class.getResourceAsStream
(PACKAGE_DRL));
DrlParser drlParser = new DrlParser();
PackageDescr packageDescr = drlParser.parse(drlReader2);
List<RecognitionException> parsingErrors = new
ArrayList<RecognitionException>();
parsingErrors = drlParser.getErrors() ????
May be I can extends the DrlParser class with I new method like :
getErrorRecognition
Is it a good Idea ?
Thanks
--
View this message in context:
http://www.nabble.com/parsing-errors-tf4192364.html#a11922150
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com