Documentation

ParseIt.Char.Numeric

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) :
ParserT ε ι Char m Nat

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) :
    ParserT ε ι Char m Int

    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 α] :
      ParserT ε ι Char m α

      Parse an unsigned number in scientific notation.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Parse a Float, with an optional sign.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For