From 976b8302be087d3ef7e196b1887d7b812000b3df Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Wed, 7 Aug 2019 23:28:28 -0700 Subject: [PATCH] grow/shrink as DCGs. --- thun/thun.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thun/thun.pl b/thun/thun.pl index ba8b483..4cc91f9 100644 --- a/thun/thun.pl +++ b/thun/thun.pl @@ -313,8 +313,8 @@ to_fixed_point(DCG, Ei, Eo) :- phrase(DCG, Ei, E), % Apply DCG... (Ei=E -> Eo=E ; to_fixed_point(DCG, E, Eo)). % ...until a fixed-point is reached. -grow(Ei, Eo) :- to_fixed_point(rebo(expando, grow ), Ei, Eo). -shrink(Ei, Eo) :- to_fixed_point(rebo(contracto, shrink), Ei, Eo). +grow --> to_fixed_point(rebo(expando, grow )). +shrink --> to_fixed_point(rebo(contracto, shrink)). % format_n(N) --> {number(N), !, number_codes(N, Codes)}, Codes.