exactly-n ( parser n -- parser' )


Vocabulary
peg.parsers

Inputs
parsera parser
nan integer


Outputs
parser'a parser


Word description
Returns a parser that matches an exact repetition of the input parser.

Examples
USING: peg peg.parsers prettyprint ; "aaa" "a" token 4 exactly-n parse => exception

USING: peg peg.parsers prettyprint ; "aaaa" "a" token 4 exactly-n parse .
V{ "a" "a" "a" "a" }


See also
at-least-n, at-most-n, from-m-to-n

Definition