next up previous contents
Next: Grammar and Lexicon Up: Prolog implementation Previous: Prolog implementation

 

Utilities

%% Basic predicates (do not worry about the definitions at this stage):

%% Linear precedence:
lp([],Z,Z).
lp([A|X],Y,[A|Z]) :- lp(X,Y,Z).

%% Backtrack (go back and take the next choice):
backtrack :- fail.

%% Carry on after backtracking:
perform(X) :- call(X),!,fail.
perform(_).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



Dafydd Gibbon
Thu Feb 12 11:04:00 MET 1998