]> Repositorios git - scryer-prolog.git/commitdiff
correct phrase/2
authorMark Thom <[email protected]>
Mon, 8 Oct 2018 17:02:48 +0000 (11:02 -0600)
committerMark Thom <[email protected]>
Mon, 8 Oct 2018 17:02:48 +0000 (11:02 -0600)
src/prolog/lib/dcgs.pl
src/tests.rs

index 7bad699732d87d7f9e05ddff88dc03f2347abec7..6ff86a79b04ff97ec5c30174ea7e55477e913aa4 100644 (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).
index c6e182c9dba5154d01e4de66a23dee52899c8101..d963f39204d30b36257ddfc84095dc1ad5a4d6c8 100644 (file)
@@ -1890,9 +1890,9 @@ fn test_queries_on_dcgs()
       instant('Lightning Bolt') --> [].".as_bytes());
 
     assert_prolog_success!(&mut wam, "?- phrase(ability(destroy, X), P).",
-                           [["P = [destroy, target, creature | _4]", "X = 'Llanowar Elves'"],
-                            ["P = [destroy, target, artifact | _4]", "X = 'Ankh of Mishra'"],
-                            ["P = [destroy, target, land | _4]", "X = 'Mountain'"]]);
+                           [["P = [destroy, target, creature]", "X = 'Llanowar Elves'"],
+                            ["P = [destroy, target, artifact]", "X = 'Ankh of Mishra'"],
+                            ["P = [destroy, target, land]", "X = 'Mountain'"]]);
 }
 
 #[test]