On Jun 25, 2008, at 7:12 AM, benders wrote:
Hi, I am trying to parse this .clp file from the documentation.
You've already parsed it with the "parseExpression" line. I'm not sure what you're trying to do after that, but it's not parsing. Just examining the data structures for the rule? If you let us know what you're doing we might have more helpful advice.
for (int j=0;j<gs;j++) {ConditionalElement e = ce.getConditionalElement(j);System.out.println(e.toString());
A ConditionalElement is either a Pattern or a Group; you can use "isGroup()" to tell the difference. If it's not a Group, you can cast it to jess.Pattern, and use the (much larger) API of that class to extract information about the slots and the tests they contain.
--------------------------------------------------------- Ernest Friedman-Hill Informatics & Decision Sciences, Sandia National Laboratories PO Box 969, MS 9012, Livermore, CA 94550 http://www.jessrules.com -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
