Re: [eclipse-clp-users] Consult failure

From: Kish Shen <kisshen_at_cisco.com>
Date: Fri, 19 Aug 2011 02:59:13 +0100
Hi Jan,

On 18/08/2011 17:23, Jan Burse wrote:
>
>
> expr(Z) -->  "-", !, term(X), {Y is -X}, expr_rest(Y,Z).
> expr(Y) -->  term(X), expr_rest(X,Y).
>
> expr_rest(X,T) -->  "+", !, term(Y), {Z is X+Y}, expr_rest(Z,T).
> expr_rest(X,T) -->  "-", !, term(Y), {Z is X-Y}, expr_rest(Z,T).
> expr_rest(X,X) -->  [].
>
> etc..
>
> And I get the following error:
>
> uncaught exception in exit_block(-127)
> Abort
>

127 (-127) is the error number, which is "syntax error : grammar rule 
body is not valid". The errpr is not properly processed, which is why 
you see the exit_block instead of the actual error. We will look into 
fixing this.

So the error is because the grammar rule you wrote is not valid for 
ECLiPSe -- this is because ECLiPSe have proper strings (as an atomic 
type), so the strings such as "." are real strings, and not list of 
ASCII code, and this is causing the error.

Cheers,

Kish

-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Fri Aug 19 2011 - 01:59:23 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET