Documentation

Lean.Parser.Extension

Extensible parsing via attributes

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    Equations
    Equations
    Instances For
      @[inline, reducible]
      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
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Equations
              Instances For
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  inductive Lean.Parser.AliasValue (α : Type) :

                  Parser aliases for making ParserDescr extensible

                  Instances For
                    @[inline, reducible]
                    Equations
                    Instances For
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        Equations
                        Instances For
                          def Lean.Parser.getConstAlias {α : Type} (mapRef : IO.Ref (Lean.Parser.AliasTable α)) (aliasName : Lake.Name) :
                          IO α
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            def Lean.Parser.getUnaryAlias {α : Type} (mapRef : IO.Ref (Lean.Parser.AliasTable α)) (aliasName : Lake.Name) :
                            IO (αα)
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              def Lean.Parser.getBinaryAlias {α : Type} (mapRef : IO.Ref (Lean.Parser.AliasTable α)) (aliasName : Lake.Name) :
                              IO (ααα)
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                • declName : Lake.Name
                                • stackSz? : Option Nat

                                  Number of syntax nodes produced by this parser. none means "sum of input sizes".

                                • autoGroupArgs : Bool

                                  Whether arguments should be wrapped in group(·) if they do not produce exactly one syntax node.

                                Instances For
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    def Lean.Parser.registerAlias (aliasName : Lake.Name) (declName : Lake.Name) (p : Lean.Parser.ParserAliasValue) (kind? : optParam (Option Lean.SyntaxNodeKind) none) (info : optParam Lean.Parser.ParserAliasInfo { declName := Lean.Name.anonymous, stackSz? := some 1, autoGroupArgs := Option.isSome (some 1) }) :
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      Equations
                                      Instances For
                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          @[implemented_by Lean.Parser.mkParserOfConstantUnsafe]
                                          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
                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    @[implemented_by Lean.Parser.evalParserConstUnsafe]

                                                    Run declName if possible and inside a quotation, or else p. The ParserInfo will always be taken from p.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      def Lean.Parser.addBuiltinParser (catName : Lake.Name) (declName : Lake.Name) (leading : Bool) (p : Lean.Parser.Parser) (prio : Nat) :
                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        Equations
                                                        Instances For
                                                          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
                                                                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
                                                                    Instances For
                                                                      Equations
                                                                      Instances For
                                                                        def Lean.Parser.runParserCategory (env : Lean.Environment) (catName : Lake.Name) (input : String) (fileName : optParam String "<input>") :

                                                                        convenience function for testing

                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For
                                                                          def Lean.Parser.declareBuiltinParser (addFnName : Lake.Name) (catName : Lake.Name) (declName : Lake.Name) (prio : Nat) :
                                                                          Equations
                                                                          • One or more equations did not get rendered due to their size.
                                                                          Instances For
                                                                            Equations
                                                                            Instances For
                                                                              Equations
                                                                              Instances For
                                                                                Equations
                                                                                • One or more equations did not get rendered due to their size.
                                                                                Instances For

                                                                                  The parsing tables for builtin parsers are "stored" in the extracted source code.

                                                                                  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

                                                                                      A builtin parser attribute that can be extended by users.

                                                                                      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

                                                                                            If the parsing stack is of the form #[.., openCommand], we process the open command, and execute p

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

                                                                                              If the parsing stack is of the form #[.., openDecl], we process the open declaration, and execute p

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

                                                                                                Resolve the given parser name and return a list of candidates.

                                                                                                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

                                                                                                    Resolve the given parser name and return a list of candidates.

                                                                                                    Equations
                                                                                                    Instances For

                                                                                                      Resolve the given parser name and return a list of candidates.

                                                                                                      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