OSDN Git Service
(root)
/
joypy
/
Thun.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8116b83
)
minor cleanup
author
Simon Forman
<sforman@hushmail.com>
Tue, 13 Aug 2019 18:58:31 +0000
(11:58 -0700)
committer
Simon Forman
<sforman@hushmail.com>
Tue, 13 Aug 2019 18:58:31 +0000
(11:58 -0700)
thun/gnu-prolog/DCG_basics.pl
patch
|
blob
|
history
diff --git
a/thun/gnu-prolog/DCG_basics.pl
b/thun/gnu-prolog/DCG_basics.pl
index
b44fd1b
..
406f739
100644
(file)
--- a/
thun/gnu-prolog/DCG_basics.pl
+++ b/
thun/gnu-prolog/DCG_basics.pl
@@
-52,8
+52,6
@@
digit(Ch) --> [Ch], { nonvar(Ch), between(0'0, 0'9, Ch) }.
is_glyph(Ch) :- Ch =\= 0'[, Ch =\= 0'], between(0'!, 0'~, Ch).
is_space(Ch) :- Ch =:= 32 ; between(9, 13, Ch).
-one_or_more(E, List) --> one_or_more_(List, E).
-
-one_or_more_([Ch|Rest], P) --> call(P, Ch), one_or_more_(Rest, P).
-one_or_more_([Ch], P) --> call(P, Ch).
+one_or_more(P, [Ch|Rest]) --> call(P, Ch), one_or_more(P, Rest).
+one_or_more(P, [Ch] ) --> call(P, Ch).