Ernest,

It is often helpful to have the parser spit out the column number of the
line with a parse error.

A while back I modified jess to track and display (on a parse error) the
current column number during parsing but lost the mods. I can reimplement
the changes using the current code base - just let me know if you would like
to see them.

alan

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:ejfried@;ca.sandia.gov]
Sent: Wednesday, October 23, 2002 9:27 AM
To: [EMAIL PROTECTED]
Subject: Re: JESS: Message saying it is not a multislot, when actually,
it is...



I think Alexander Lamb wrote:
> 
> However, when loading the rule, I get the following message:
> 
> ERROR: Jess reported an error in routine Jesp.parsePattern
>     while executing (batch
> /Users/alamb/Development/OrMed2Proto/Protocols.jess).
>   Message: selectedCompleterResponse is not a multislot .
>   Program text: ( defrule KEY_SCRIPT0 ( OrmedRequest ( key "script" ) (
> ormedContext ?c ) ( OBJECT ?r ) ) ( OrmedContext (
selectedCompleterResponse
> ?s & : ( and ( neq ?s nil ) ( eq "ASP" ( get ?s key ) ) ) (  at line 17.
> 

When the Jess parser produces an error message, the very last token
(here "(") is the one that caused the error -- i.e., Jess saw that "("
and was expecteing something else. If you have an editor like vi or
Emacs that can show you matching parentheses, use it to check for the
open paren that matches the third ")" after "get ?s key" above, and
you'll find that it matches the "(" before "and" -- i.e., there's a
missing close parenthesis, and so the "(" at the end makes this look
like you are matching multiple items in the selectedCompleterResponse
slot. Stick another ")" before that last "(" and you should be fine.

I personally couldn't survive without Emacs.


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to