]> Repositorios git - scryer-prolog.git/commitdiff
use seq//1 and ... //0 which are now available in library(dcgs)
authorMarkus Triska <[email protected]>
Sat, 27 Nov 2021 15:19:16 +0000 (16:19 +0100)
committerMarkus Triska <[email protected]>
Sat, 27 Nov 2021 15:32:44 +0000 (16:32 +0100)
src/lib/xpath.pl

index d5e13c6debac51929b624073f6b00864368942a2..1701e4248ac49480a438fb070cfe93b77329777c 100644 (file)
@@ -540,7 +540,7 @@ xpath_condition(contains(Haystack, Needle), Value) :-          % contains(Haysta
     !,
     val_or_function(Haystack, Value, HaystackValue),
     val_or_function(Needle, Value, NeedleValue),
-    (   phrase((list(_),list(NeedleValue),list(_)), HaystackValue)
+    (   phrase((...,seq(NeedleValue),...), HaystackValue)
     ->  true
     ).
 xpath_condition(Spec, Dom) :-
@@ -626,10 +626,7 @@ text_of_list([H|T]) -->
 
 text_of_1(element(_,_,Content)) -->
         text_of_list(Content).
-text_of_1([C|Cs]) --> list([C|Cs]).
-
-list([]) --> [].
-list([L|Ls]) --> [L], list(Ls).
+text_of_1([C|Cs]) --> seq([C|Cs]).
 
 % For now, we use number_chars/2 to parse XML numbers.
 % If the need arises, we can extend this to additional