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:
@@ -283,10 +283,13 @@ sign('+') --> "+".
|
|||||||
|
|
||||||
double_quote('"') --> "\"".
|
double_quote('"') --> "\"".
|
||||||
|
|
||||||
list_ws(String) -->
|
list_ws(Ls) -->
|
||||||
partial_string(String),
|
list(Ls),
|
||||||
ws.
|
ws.
|
||||||
|
|
||||||
|
list([]) --> [].
|
||||||
|
list([L|Ls]) --> [L], list(Ls).
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ruleml_assert_item//1 specifies the elements of RuleML that may
|
* ruleml_assert_item//1 specifies the elements of RuleML that may
|
||||||
* appear as items in a RuleML Assert performative, an implicitly
|
* appear as items in a RuleML Assert performative, an implicitly
|
||||||
|
|||||||
Reference in New Issue
Block a user