Vocabularypeg.
parsersInputsOutputsWord descriptionReturns a parser that matches between and including m to n repetitions of the input parser.
ExamplesUSING: peg peg.parsers prettyprint ;
"aaa" "a" token 3 4 from-m-to-n parse .
V{ "a" "a" "a" }
USING: peg peg.parsers prettyprint ;
"aaaa" "a" token 3 4 from-m-to-n parse .
V{ "a" "a" "a" "a" }
USING: peg peg.parsers prettyprint ;
"aaaaa" "a" token 3 4 from-m-to-n parse .
V{ "a" "a" "a" "a" }
See alsoexactly-n,
at-most-n,
at-least-nDefinition