From 11a616917af37e485d466144733ccf6760c5e192 Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Tue, 31 Mar 2020 01:28:16 +0200 Subject: [PATCH] introduce and use nonterminal list//1 Example: ?- phrase(list(Ls), Ls0). Ls = [], Ls0 = [] ; Ls = [_A], Ls0 = [_A] ; Ls = [_A,_B], Ls0 = [_A,_B] ; Ls = [_A,_B,_C], Ls0 = [_A,_B,_C] ; ... --- src/prolog/examples/bimetatrans_ruleml.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/prolog/examples/bimetatrans_ruleml.pl b/src/prolog/examples/bimetatrans_ruleml.pl index 7c0028d5..ea56c2e2 100644 --- a/src/prolog/examples/bimetatrans_ruleml.pl +++ b/src/prolog/examples/bimetatrans_ruleml.pl @@ -283,10 +283,13 @@ sign('+') --> "+". double_quote('"') --> "\"". -list_ws(String) --> - partial_string(String), +list_ws(Ls) --> + list(Ls), ws. +list([]) --> []. +list([L|Ls]) --> [L], list(Ls). + /* * ruleml_assert_item//1 specifies the elements of RuleML that may * appear as items in a RuleML Assert performative, an implicitly -- 2.54.0