Quintus to Gnu Prolog conversion

"Pauline Kra" <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
We have been running our parser with Quintus Prolog and wish to replace Quintus with Gnu Prolog. But the Gnu compiler finds syntax errors such as the ones below. I shall warmly appreciate suggestions for correcting the errors, and any information where a comparison of Gnu Prolog syntax to Quintus Prolog can be found.

Pauline Kra

 

:1:78: syntax error: , | ] or operator expected in list

        1 error(s)

compilation failed

 

chkforpuncttag(W,_) :-member(W,['/','<','>','-','[','{','_','+','=','|','\','?']),!.

 

 

:78:35: syntax error: current or previous operator needs brackets

:82:15: syntax error: current or previous operator needs brackets

 

get_tagsentence(['%','%'|Rest],Sent,Remainder) :-

     get_tagsentence(Rest,_,Rem),       % line 78

     get_tagsentence(Rem,Sent,Remainder).

get_tagsentence([X,.,Y,Z|Rest],[X,.],[Y,Z|Rest]) :-   % break up "140. 3+"

     number(X), number(Y), Z = '+', !.  % Y belongs to '+' for new sentence

get_tagsentence([X,.,Y,Z|Rest],[N|SRest],LRest) :-   % line 82

      number(X), number(Y),

      %(wdef(Z,unit,_); Z = x),

      Z \= '+',  % break up "140.  3+"

      !,

      name(X,D1), name(.,D2), name(Y,D3), name('E+00',D4),

      append([D1,D2,D3,D4],D), name(N,D), % put number together

      get_tagsentence([Z|Rest],SRest,LRest).

_______________________________________________
Users-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/users-prolog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.