digit-parser ( -- parser )


Vocabulary
parser-combinators.simple

Inputs
None

Outputs
parsera parser object


Word description
Return a parser that consumes a single digit from the input string. The numeric value of the digit consumed is the result of the parse.

Examples
USING: lists.lazy parser-combinators parser-combinators.simple prettyprint ; "123" digit-parser parse-1 .
1


See also
$see-also, integer-parser, string-parser, bold-parser, italic-parser, comma-list

Definition