I'm only just making the move from 4.0 to 4.1 so I don't know where
this crept in, but the following parse fine in 4.0.   I hope the solution
(on either my end or Jess's) is simple, because I have a lot of these,
and life in 4.0 finally became difficult enough for me to make the leap,
so I'd rather not go back!!

--Sidney Bailin



(deffunction extract-pegs
  (?string)
  (bind ?pegs (create$))
  (if (pegged-p ?string)
    then
    (bind ?tail (sub-stringX (+ (str-indexX "?=" ?string) 2)
                            (str-lengthX ?string)
                            ?string)
    )
    (while (pegged-p ?tail) do 
      (bind ?next-peg (sub-stringX 1
                                  (- (str-indexX "?=" ?tail) 1)
                                  ?tail
      ))
      (if (not (eq (sub-stringX 1 1 ?next-peg) "?"))
          then (bind ?next-peg (str-cat "?" ?next-peg))
      )
      (bind ?pegs (create$ ?pegs ?next-peg))
      (bind ?tail (str-cat (sub-stringX (+ (str-indexX "?=" ?tail) 2)
                                       (str-lengthX ?tail)
                                       ?tail
      )))
    )
    (if (> (str-lengthX ?tail) 0)
        then
        (if (not (eq (sub-stringX 1 1 ?tail) "?"))
                then 
                (bind ?tail (str-cat "?" ?tail))
        )
        (bind $?result (create$ ?pegs ?tail))
        else
        (bind ?result ?pegs)
    )
    else 
    (bind ?result ?pegs))
  )
  ?result
)

Rete Exception in routine JessToken::tokenToValue.
  Message: Unbound variable: result at line 334:  ?result .
        at jess.JessToken.tokenToValue(JessToken.java:39)
        at jess.Jesp.parseSexp(Jesp.java:125)
        at jess.Jesp.parse(Jesp.java:59)
        at jess.Rete.executeCommand(Rete.java:1116)
        at com.kevol.fam.rulebase.RuleLoadUtil.loadRuleFile(RuleLoadUtil.java:99)
        at com.kevol.fam.rulebase.RuleLoad.loadCoreRules(RuleLoad.java:165)
        at com.kevol.fam.rulebase.RuleLoad.<init>(RuleLoad.java:77)
        at com.kevol.fam.Fam.main(Fam.java:195)


(defrule retract-concept-justified-by-obsolete-negation-2
        (declare (salience 98))
        (assert-this diagram-fact ?bad-fact ?diagram ?concept 
                ?arg1-name ?arg1-id ?arg2-name ?arg2-id)
        (negative-justif-2 ?tag diagram-fact ?bad-fact 
                ?d:(or (eq ?d ?diagram) (eq ?d .))
                ?c:(or (eq ?c ?concept) (eq ?c .)) 
                ?a1:(or (eq ?a1 ?arg1-name) (eq ?a1 .)) 
                ?i1:(or (eq ?i1 ?arg1-id) (eq ?a1 .)) 
                ?a2:(or (eq ?a2 ?arg2-name) (eq ?a2 .)) 
                ?i2:(or (eq ?i2 ?arg2-id) (eq ?i2 .))) 
        (justified ?tag diagram-fact $?fact)
        ?fact-addr <- (diagram-fact $?fact)
=>
        (assert (retract-this diagram-fact ?fact))
        (assert (retract-justifications-too ?fact-addr))
)

Rete Exception in routine Jesp::parsePattern.
  Message: Bad slot value at line 538:  ( defrule 
retract-concept-justified-by-obsolete-negation-2 ( declare ( salience 98 ) ) ( 
assert-this diagram-fact ?bad-fact ?diagram ?concept ?arg1-name ?arg1-id ?arg2-name 
?arg2-id ) ( negative-justif-2 ?tag diagram-fact ?bad-fact ?d: ( .
        at jess.Jesp.parseError(Jesp.java:1481)
        at jess.Jesp.parsePattern(Jesp.java:1337)
        at jess.Jesp.doParseDefrule(Jesp.java:982)
        at jess.Jesp.parseDefrule(Jesp.java:867)
        at jess.Jesp.parseSexp(Jesp.java:142)
        at jess.Jesp.parse(Jesp.java:59)
        at jess.Rete.executeCommand(Rete.java:1116)
        at com.kevol.fam.rulebase.RuleLoadUtil.loadRuleFile(RuleLoadUtil.java:99)
        at com.kevol.fam.rulebase.RuleLoad.loadCoreRules(RuleLoad.java:165)
        at com.kevol.fam.rulebase.RuleLoad.<init>(RuleLoad.java:77)
        at com.kevol.fam.Fam.main(Fam.java:195)

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to