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]
    ;  ...
This commit is contained in:
Markus Triska
2020-03-31 01:28:16 +02:00
parent a89f03f27d
commit 11a616917a

View File

@@ -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