bug-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Do you consider this a gprolog bug?


From: Daniel Diaz
Subject: Re: Do you consider this a gprolog bug?
Date: Thu, 26 Jun 2008 15:02:35 +0200
User-agent: Thunderbird 2.0.0.9 (X11/20071209)

Yes it is a bug.

Thank You Dave for this report


Dave Sworin a écrit :
Hello,

----------------------------------------
The file "testcase.pl" is shown below between the cut (-----) lines.
----------------------------------------
mypred(ATOM,LENGTH) :-
    sub_atom(ATOM,_,2,AFTER_BEGIN,'/*'),
    sub_atom(ATOM,_,2,AFTER_END,'*/'),
    LENGTH is (AFTER_BEGIN - AFTER_END).
----------------------------------------

The following was executed from an xterm running bash.
This was on Fedora Core 4, but I also see this
same problem on SUSE 9.3 and Fedora 7.  I've
tried lots of things but I think this is a bug.  The problem

occurs when compiling a prolog source file.  This is just

a simple predicate to show the problem.  The same thing

happens in the code I am really developing. Please advise.

Further below is the gplcvWClub file in the /tmp directory.

address@hidden ceg]$ gprolog
GNU Prolog 1.3.0
By Daniel Diaz
Copyright (C) 1999-2007 Daniel Diaz
| ?- ['testcase.pl'].
compiling /home/daves/dock/projects/ceg/testcase.pl for byte code...
/home/daves/dock/projects/ceg/testcase.pl compiled, 4 lines read - 813
    bytes written, 9 ms
uncaught exception: error(syntax_error('/tmp/gplcvWClub:13 (char:71)
    expression expected'),read/2)
| ?-

% compiler: GNU Prolog 1.3.0 (Jan 4 2007)
% file    : /home/daves/dock/projects/ceg/testcase.pl
% date    : 6 25 2008
% time    : 10:34:30


file_name('/home/daves/dock/projects/ceg/testcase.pl').


predicate(mypred/2,1,static,private,user,1).


clause(:-(mypred(A,B),','(sub_atom(A,C,2,D,/*),','(sub_atom(A,E,2,F,*/),is(B,-(D,F))))),[
    allocate(4),
    get_variable(y(0),0),
    get_variable(y(1),1),
    put_value(y(0),0),
    put_void(1),
    put_integer(2,2),
    put_variable(y(2),3),
    put_atom(/*,4),
    call(sub_atom/5),
    put_value(y(0),0),
    put_void(1),
    put_integer(2,2),
    put_variable(y(3),3),
    put_atom(*/,4),
    call(sub_atom/5),
    put_value(y(1),0),
    put_structure((-)/2,1),
    unify_local_value(y(2)),
    unify_local_value(y(3)),
    deallocate,
    execute((is)/2)]).

Dave



--
Ce message a été vérifié par *MailScanner* <http://www.mailscanner.info/>
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.


------------------------------------------------------------------------

_______________________________________________
Bug-prolog mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-prolog


--
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]