package orsetto
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=151ca6df499bd3de7aa89a4e1627411fbee24c4dea6e0e71ce21f06f181ee654
md5=00393728b481c2bf15919a8202732335
doc/orsetto.cf/Cf_number_scan/index.html
Module Cf_number_scan
Parser combinators for numeric types.
Overview
This module implements functional combinators for parsing common numeric types in typical textual presentations.
Types and Constants
In this section various utility types are defined for use in specializing the general number scanning engine.
val binary : radix
The binary (base 2) radix.
val octal : radix
The octal (base 8) radix.
val decimal : radix
The decimal (base 10) radix.
val hexadecimal : radix
The hexadecimal (base 16) radix.
The generalized algebraic data type (GADT) representing scanning options qualified by option type.
The generalized algebraic data type (GADT) representing return value types qualified by option type.
The abstract type representing scanner controllers comprising a return type and the option qualifiers.
Use ctrl ?opt ret
to make a scanner control that for the return type represented by ret
. If ~opt
is used then it specifies a list of options for scanning the input stream accordingly.
Functor
module type Basis = sig ... end
Define a module of this type to specialize the number scanner for specific underlying symbol types.
module type Profile = sig ... end
The signature of a general number scanner module.
Use Create(B)
to specialize the number scanner according to B
.
module ASCII :
Profile with type 'a t := 'a Cf_scan.ASCII.t and type 'a form := 'a
A distinguished number scanner for simple ASCII character symbols.