Handbook
Glossary
comma-list ( element -- parser )
Vocabulary
parser-combinators
.
simple
Inputs
element
a parser object
Outputs
parser
a parser object
Word description
Return a parser that parses comma separated lists of elements.
element-parser
should be a parser that can parse the elements. The result of the parser is a sequence of the parsed elements.
Examples
USING: lists.lazy parser-combinators parser-combinators.simple prettyprint ; "1,2,3,4" integer-parser comma-list parse-1 .
{ 1 2 3 4 }
See also
$see-also
,
digit-parser
,
integer-parser
,
string-parser
,
bold-parser
,
italic-parser
Definition
USING:
parser-combinators
;
IN:
parser-combinators.simple
:
comma-list
( element -- parser )
","
token
list-of
;