Documentation

Auto.Parser.LeanLex

Instances For
    Equations
    Instances For
      Instances For

        Taking complement of b with respect to the set of ascii characters

        Equations
        Instances For
          Equations
          Instances For
            inductive Auto.Regex.ERE :
            Instances For

              Match any character in the string

              Equations
              Instances For

                Match the given string

                Equations
                Instances For

                  Optional, corresponding to ?

                  Equations
                  Instances For

                    Nonempty sequence of, corresponding to +

                    Equations
                    Instances For
                      structure Auto.Regex.CharGrouping (σ : Type) [Hashable σ] [BEq σ] :

                      Given an ERE, group characters that behaves the same, according to all the brackets in this ERE

                      Instances For
                        def Auto.Regex.instInhabitedCharGrouping.default {a✝ : Type} {a✝¹ : Hashable a✝} {a✝² : BEq a✝} :
                        Equations
                        Instances For
                          structure Auto.Regex.ADFA (σ : Type) [Hashable σ] [BEq σ] :

                          Annotated DFA, the lexer table

                          Instances For
                            instance Auto.Regex.instInhabitedADFA {a✝ : Type} {a✝¹ : Hashable a✝} {a✝² : BEq a✝} :
                            Equations
                            def Auto.Regex.instInhabitedADFA.default {a✝ : Type} {a✝¹ : Hashable a✝} {a✝² : BEq a✝} :
                            ADFA a✝
                            Equations
                            Instances For
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  def Auto.Regex.CharGrouping.toStringAux {σ : Type} [Hashable σ] [BEq σ] :
                                  CharGrouping σ(symbListToString : Array σString) → String
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Equations
                                    Instances For
                                      def Auto.Regex.CharGrouping.getGroup {σ : Type} [Hashable σ] [BEq σ] (cg : CharGrouping σ) (c : σ) :
                                      Equations
                                      Instances For
                                        def Auto.Regex.ADFA.toStringAux {σ : Type} [Hashable σ] [BEq σ] :
                                        ADFA σ(symbListToString : Array σString) → String
                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          def Auto.Regex.ADFA.toString {σ : Type} [Hashable σ] [BEq σ] [ToString σ] (a : ADFA σ) :
                                          Equations
                                          Instances For
                                            def Auto.Regex.ADFA.getAttrs {σ : Type} [Hashable σ] [BEq σ] [ToString σ] (a : ADFA σ) (state : Nat) :
                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    def Auto.Regex.ERE.toADFA (e : ERE) (prependStartP : Bool := true) :
                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      Instances For
                                                        Instances For
                                                          Instances For
                                                            Equations
                                                            Instances For
                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For

                                                                Usage : First use ERE.toADFA to generate the lexing table in another file <f> and use initialize to store it, then call the following function in another file, where the ADFA is the one initialized in <f>. Leftmost match, eager (in finding the first matching character) and matches at least one character. short = false : Longest match, default short = true : Shortest match strict = false: Start from the first valid character, default strict = true : Start from the first character of s Note that if we can't find the matching first character with strict = false, we just return incomplete This function takes an ADFA generated by ERE.toADFA (e : ERE), a string s. It first finds the leftmost character in s that is a [valid first character of the lexicon] (thus the name eager). Then, it returns the longest match (as a substring) if there is one, and returns none otherwise. We prepend s with the "beginning of string" group and append to s the "end of string" group

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