%% example of Juafsky and Martin :- multifile macro/2. :- ensure_loaded(twolevel). %% oblig(Pairs,Trans,Left,Right) %% opt(Pairs,Trans,Left,Right) %% comp(Pairs,Trans,Left,Right) %% twolevel(List) where List is a list of such rules macro(einsertion, twolevel([ei])). %%% <==> rules use "comp" ("composite") %%% comp(FeasiblePairs, TransducedString, LeftContext, RightContext) %%% N:m <==> _ p: macro(ei, comp(pairs, 0:e, [{x,s,z}, (+):0], [s,(+):0] )). macro(pairs,{a..z,0:e,(+):0}). macro(sybs, {x,s,z}).