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.
 
[EMAIL PROTECTED] 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
 


      
_______________________________________________
Bug-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-prolog

Reply via email to