Documentation

ParseIt.Char.Basic

Character parsers #

Parsers for character tokens. These work with any iterator of Char, such as CharIterator. Character classes are ASCII only; Unicode classes are planned separately.

@[inline]
def ParseIt.Char.char {ε ι : Type} {m : Type → Type} [Std.Iterator ι Id Char] [Std.Iterators.Productive ι Id] [Error ε ι Char] [Monad m] (c : Char) :
ParserT ε ι Char m Char

char c accepts and returns character c.

Equations
Instances For
    def ParseIt.Char.string {ε ι : Type} {m : Type → Type} [Std.Iterator ι Id Char] [Std.Iterators.Productive ι Id] [Error ε ι Char] [Monad m] (s : String) :

    string s accepts the characters of s in order and returns s.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[inline]
      def ParseIt.Char.space {ε ι : Type} {m : Type → Type} [Std.Iterator ι Id Char] [Std.Iterators.Productive ι Id] [Error ε ι Char] [Monad m] :
      ParserT ε ι Char m Char

      Parse space (U+0020).

      Equations
      Instances For
        @[inline]
        def ParseIt.Char.tab {ε ι : Type} {m : Type → Type} [Std.Iterator ι Id Char] [Std.Iterators.Productive ι Id] [Error ε ι Char] [Monad m] :
        ParserT ε ι Char m Char

        Parse horizontal tab (U+0009).

        Equations
        Instances For
          @[inline]

          Parse line feed (U+000A).

          Equations
          Instances For
            @[inline]

            Parse carriage return (U+000D).

            Equations
            Instances For
              @[inline]
              def ParseIt.Char.eol {ε ι : Type} {m : Type → Type} [Std.Iterator ι Id Char] [Std.Iterators.Productive ι Id] [Error ε ι Char] [Monad m] :
              ParserT ε ι Char m Char

              Parse end of line: line feed, optionally preceded by carriage return.

              Equations
              Instances For

                Parse whitespace character (space and U+0009 to U+000D).

                Equations
                Instances For

                  Parse uppercase letter character (A to Z).

                  Equations
                  Instances For

                    Parse lowercase letter character (a to z).

                    Equations
                    Instances For

                      Parse alphabetic character (A to Z and a to z).

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

                        Parse numeric character (0 to 9).

                        Equations
                        Instances For

                          Parse letter or digit character (A to Z, a to z and 0 to 9).

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

                            Parse control character (U+0000 to U+001F and U+007F).

                            Equations
                            Instances For
                              def ParseIt.Char.ASCII.digit {ε ι : Type} {m : Type → Type} [Std.Iterator ι Id Char] [Std.Iterators.Productive ι Id] [Error ε ι Char] [Monad m] :
                              ParserT ε ι Char m (Fin 10)

                              Parse decimal digit (0 to 9).

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

                                Parse binary digit (0 or 1).

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

                                  Parse octal digit (0 to 7).

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    def ParseIt.Char.ASCII.hexDigit {ε ι : Type} {m : Type → Type} [Std.Iterator ι Id Char] [Std.Iterators.Productive ι Id] [Error ε ι Char] [Monad m] :
                                    ParserT ε ι Char m (Fin 16)

                                    Parse hexadecimal digit (0 to 9, A to F and a to f).

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