list-of-many ( items separator -- parser )


Vocabulary
peg.parsers

Inputs
itemsa sequence
separatora parser


Outputs
parsera parser


Word description
Returns a parser that returns a list of items separated by the separator parser. Hides the separators and matches a list of two or more items.

Notes
Use list-of to return a list of only one item.

Examples
USING: peg peg.parsers prettyprint ; "a" "a" token "," token list-of-many parse => exception

USING: peg peg.parsers prettyprint ; "a,a,a,a" "a" token "," token list-of-many parse .
V{ "a" "a" "a" "a" }


See also
list-of

Definition


: list-of-many ( items separator -- parser ) hide t (list-of) ;