users-prolog
[Top][All Lists]
Advanced

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

Quintus to Gnu Prolog conversion


From: Pauline Kra
Subject: Quintus to Gnu Prolog conversion
Date: Wed, 23 Apr 2008 11:38:26 -0400

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).

 


reply via email to

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