Numeric parsers #
ASCII parsers for natural numbers, integers and scientific notation.
def
ParseIt.Char.ASCII.parseNat
{ε ι : Type}
{m : Type → Type}
[Std.Iterator ι Id Char]
[Std.Iterators.Finite ι Id]
[Error ε ι Char]
[Monad m]
(decimalOnly : Bool := true)
:
Parse a Nat. Unless decimalOnly is true, a leading 0 introduces binary (0b), hexadecimal
(0x) or octal digits.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
ParseIt.Char.ASCII.parseInt
{ε ι : Type}
{m : Type → Type}
[Std.Iterator ι Id Char]
[Std.Iterators.Finite ι Id]
[Error ε ι Char]
[Monad m]
(decimalOnly : Bool := true)
:
Parse an Int, with an optional sign.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
ParseIt.Char.ASCII.parseScientific
{ε ι : Type}
{m : Type → Type}
[Std.Iterator ι Id Char]
[Std.Iterators.Finite ι Id]
[Error ε ι Char]
[Monad m]
(α : Type)
[OfScientific α]
:
Parse an unsigned number in scientific notation.
Equations
- One or more equations did not get rendered due to their size.