Handbook
Glossary
range ( min max -- parser )
Vocabulary
peg
Inputs
min
a character
max
a character
Outputs
parser
a
parser
Word description
Returns a parser that matches a single character that lies within the range of characters given, inclusive.
Examples
: digit ( -- parser ) CHAR: 0 CHAR: 9 range ;
Definition
USING:
kernel
peg.private
;
IN:
peg
:
range
( min max -- parser )
range-parser
boa
wrap-peg
;