grow/shrink as DCGs.
This commit is contained in:
parent
4ea77cf1be
commit
976b8302be
|
|
@ -313,8 +313,8 @@ to_fixed_point(DCG, Ei, Eo) :-
|
||||||
phrase(DCG, Ei, E), % Apply DCG...
|
phrase(DCG, Ei, E), % Apply DCG...
|
||||||
(Ei=E -> Eo=E ; to_fixed_point(DCG, E, Eo)). % ...until a fixed-point is reached.
|
(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).
|
grow --> to_fixed_point(rebo(expando, grow )).
|
||||||
shrink(Ei, Eo) :- to_fixed_point(rebo(contracto, shrink), Ei, Eo).
|
shrink --> to_fixed_point(rebo(contracto, shrink)).
|
||||||
|
|
||||||
|
|
||||||
% format_n(N) --> {number(N), !, number_codes(N, Codes)}, Codes.
|
% format_n(N) --> {number(N), !, number_codes(N, Codes)}, Codes.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue