correct handling of ! in phrase/{2,3}, get rid of extraneous choice points in put_atts/2 and get_atts/2, allow loading of non-module files from the command line and use_module/{2,3}
This commit is contained in:
@@ -9,6 +9,8 @@ phrase(G, G) :-
|
||||
nonvar(G), G = [_|_], !.
|
||||
phrase(G, Ls0) :-
|
||||
nonvar(G), G = (G1, G2), !, phrase(G1, Ls0, Ls1), phrase(G2, Ls1, []).
|
||||
phrase(G, Ls0) :-
|
||||
nonvar(G), G == !, !, Ls0 = [].
|
||||
phrase(G, Ls0) :-
|
||||
call(G, Ls0, []).
|
||||
|
||||
@@ -17,6 +19,8 @@ phrase(G, Ls0, Ls1) :-
|
||||
phrase(G, Ls0, Ls2) :-
|
||||
nonvar(G), G = (G1, G2), !,
|
||||
phrase(G1, Ls0, Ls1), phrase(G2, Ls1, Ls2).
|
||||
phrase(G, Ls0, Ls1) :-
|
||||
nonvar(G), G == !, !, Ls0 = [], Ls1 = [].
|
||||
phrase(G, Ls0, Ls1) :-
|
||||
call(G, Ls0, Ls1).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user