correct phrase/2

This commit is contained in:
Mark Thom
2018-10-08 11:02:48 -06:00
parent 1dc015b91f
commit 9a6094bad2
2 changed files with 4 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ phrase(G, Ls0) :-
phrase(G, Ls0) :-
nonvar(G), G = (G1, G2), !, phrase(G1, Ls0, Ls1), phrase(G2, Ls1).
phrase(G, Ls0) :-
call(G, Ls0, _).
call(G, Ls0, []).
phrase(G, Ls0, Ls1) :-
nonvar(G), G = [_|_], !, append(G, Ls1, Ls0).