Documentation

Regex.Syntax.Ast.Ast

Abstract syntax tree for a single regular expression. #

The abstract syntax tree Syntax.AstItems.Ast.

The type of an error that occurred while building an AST.

  • BackRefenceInvalid : ErrorKind

    Backrefence invalid.

  • CaptureLimitExceeded : ErrorKind

    The capturing group limit was exceeded.

  • ClassEscapeInvalid : ErrorKind

    An invalid escape sequence was found in a character class set.

  • ClassRangeInvalid : ErrorKind

    An invalid character class range was found.

  • ClassRangeLiteral : ErrorKind

    An invalid range boundary was found in a character class.

  • ClassUnclosed : ErrorKind

    An opening [ was found with no corresponding closing ].

  • DecimalInvalid : ErrorKind

    An invalid decimal number was given where one was expected.

  • EndQuoteWithoutOpenQuote : ErrorKind

    End quote without a corresponding open quote.

  • EscapeHexEmpty : ErrorKind

    A bracketed hex literal was empty.

  • EscapeHexInvalid : ErrorKind

    A bracketed hex literal did not correspond to a Unicode scalar value.

  • EscapeHexInvalidDigit : ErrorKind

    An invalid hexadecimal digit was found.

  • EscapeUnexpectedEof : ErrorKind

    EOF was found before an escape sequence was completed.

  • EscapeUnrecognized : ErrorKind

    An unrecognized escape sequence.

  • FixedWidtExcpected : ErrorKind

    Fixed width in look behind

  • FlagDanglingNegation : ErrorKind

    A dangling negation was used when setting flags, e.g., i-.

  • FlagDuplicate : ErrorKind

    A flag was used twice, e.g., i-i.

  • FlagRepeatedNegation : ErrorKind

    The negation operator was used twice, e.g., -i-s.

  • FlagUnexpectedEof : ErrorKind

    Expected a flag but got EOF, e.g., (?.

  • FlagUnrecognized : ErrorKind

    Unrecognized flag, e.g., a.

  • GroupNameDuplicate : ErrorKind

    A duplicate capture name was found.

  • GroupNameEmpty : ErrorKind

    A capture group name is empty, e.g., (?P<>abc).

  • GroupNameInvalid : ErrorKind

    An invalid character was seen for a capture group name.

  • GroupNameNotFound : ErrorKind

    A capture group name is not found of a backreference.

  • GroupNameUnexpectedEof : ErrorKind

    A closing > could not be found for a capture group name.

  • GroupUnclosed : ErrorKind

    An unclosed group, e.g., (ab.

  • GroupUnopened : ErrorKind

    An unopened group, e.g., ab).

  • NestLimitExceeded : ErrorKind

    The nest limit was exceeded.

  • RepetitionCountInvalid : ErrorKind

    The range provided in a counted repetition operator is invalid.

  • RepetitionCountDecimalEmpty : ErrorKind

    An opening { was not followed by a valid decimal value.

  • RepetitionCountUnclosed : ErrorKind

    An opening { was found with no corresponding closing }.

  • RepetitionMissing : ErrorKind

    A repetition operator was applied to a missing sub-expression.

  • RepetitionUngreedyAndPossessive : ErrorKind

    A repetition operator was ungreedy and possessive.

  • SpecialWordBoundaryUnclosed : ErrorKind

    The special word boundary syntax, \b{something}, was used, but either EOF without } was seen, or an invalid character in the braces was seen.

  • SpecialWordBoundaryUnrecognized : ErrorKind

    The special word boundary syntax, \b{something}, was used, but something was not recognized as a valid word boundary kind.

  • SpecialWordOrRepetitionUnexpectedEof : ErrorKind

    The syntax \b{ was observed, but afterwards the end of the pattern was observed without being able to tell whether it was meant to be a bounded repetition on the \b or the beginning of a special word boundary assertion.

  • UnicodeClassInvalid : ErrorKind

    The Unicode class is not valid.

  • UnsupportedBackreference : ErrorKind

    When octal support is disabled, this error is produced when an octal escape is used.

  • UnsupportedLookAround : ErrorKind

    When syntax similar to PCRE's look-around is used, this error is returned.

  • UnkownAsciiClass : ErrorKind

    ClassAsci not found.

  • EscapeOctalInvalid : ErrorKind

    A octal literal did not correspond to a Unicode scalar value.

  • FeatureNotImplementedSubroutines : ErrorKind

    Feature not implemented.

  • FeatureNotImplementedFlagShorthand : ErrorKind

    Feature not implemented.

  • FeatureNotImplementedAtomicGroup : ErrorKind

    Feature not implemented.

  • FeatureNotImplementedConditionalExpression : ErrorKind

    Feature not implemented.

  • FeatureNotImplementedBranchResetGroup : ErrorKind

    Feature not implemented.

  • FeatureNotImplementedControlVerbs : ErrorKind

    Feature not implemented.

  • FeatureNotImplementedFlagExtended : ErrorKind

    Feature not implemented.

Instances For
    def Syntax.AstItems.toError (s : String) (kind : ErrorKind) (msg : String := "") :
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Syntax.AstItems.toErrorAt (s : String) (i : Nat) (kind : ErrorKind) (msg : String := "") :
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        The type of a Unicode hex literal.

        • x : HexLiteralKind

          A \x prefix. When used without brackets, this form is limited to one digit (Pcre flavor).

        • X : HexLiteralKind

          A \x prefix. When used without brackets, this form is limited to two digits.

        • UnicodeShort : HexLiteralKind

          A \u prefix. When used without brackets, this form is limited to four digits.

        Instances For

          The kind of a single literal expression.

          • Verbatim : LiteralKind

            The literal is written verbatim, e.g., a or .

          • Hex : HexLiteralKindLiteralKind

            The literal is written as a hex code with a fixed number of digits like '\u0061'

          • HexBrace : HexLiteralKindLiteralKind

            The literal is written as a hex code with a bracketed number of digits. The only restriction is that the bracketed hex code must refer to a valid Unicode scalar value.

          Instances For

            A single character literal, which includes escape sequences.

            • span : Substring

              The span of this literal.

            • The kind of this literal.

            • c : Char

              The Unicode scalar value corresponding to this literal.

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

                    A backrefence to a capturung group.

                    • span : Substring

                      The span of this backrefence.

                    • n : Nat

                      number of the capturung group.

                    Instances For
                      Equations
                      Instances For

                        A range repetition operator.

                        Instances For

                          The kind of a repetition operator.

                          Instances For

                            The repetition operator itself.

                            Instances For
                              Equations
                              Instances For

                                A single character class range in a set.

                                • span : Substring

                                  The span of this range.

                                • start : Literal

                                  The start of this range.

                                • end : Literal

                                  The end of this range.

                                • isLe : self.start.c self.end.c

                                  assertion

                                Instances For
                                  Equations
                                  Instances For

                                    A single flag.

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

                                      The kind of an item in a group of flags.

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

                                        A single item in a group of flags.

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

                                          A group of flags.

                                          Instances For

                                            The kind of a Lookaround.

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

                                              The kind of a group.

                                              Instances For

                                                The type of op used in a Unicode character class.

                                                Instances For

                                                  The available forms of Unicode character classes.

                                                  Instances For

                                                    A Unicode character class.

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

                                                      An assertion kind.

                                                      Instances For

                                                        A single zero-width assertion.

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

                                                          The available ASCII character classes.

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

                                                              An ASCII character class.

                                                              • span : Substring

                                                                The span of this assertion.

                                                              • The kind of ASCII class.

                                                              • negated : Bool

                                                                Whether the class is negated or not

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

                                                                The available Perl character classes.

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

                                                                  A Perl character class.

                                                                  • span : Substring

                                                                    The span of this assertion.

                                                                  • The kind of Perl class.

                                                                  • negated : Bool

                                                                    Whether the class is negated or not

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

                                                                    A repetition operation applied to a regular expression.

                                                                    Instances For

                                                                      A grouped regular expression.

                                                                      Instances For

                                                                        A group of flags that is not applied to a particular regular expression.

                                                                        Instances For

                                                                          A primitive is an expression with no sub-expressions.

                                                                          Instances For

                                                                            A union of items inside a character class set.

                                                                            Instances For

                                                                              A single component of a character class set.

                                                                              Instances For

                                                                                The type of a Unicode character class set operation.

                                                                                • Intersection : ClassSetBinaryOpKind

                                                                                  The intersection of two sets, e.g., \pN&&[a-z].

                                                                                • Difference : ClassSetBinaryOpKind

                                                                                  The difference of two sets, e.g., \pN--[0-9].

                                                                                • SymmetricDifference : ClassSetBinaryOpKind

                                                                                  The symmetric difference of two sets. The symmetric difference is the set of elements belonging to one but not both sets.

                                                                                Instances For

                                                                                  A Unicode character class set operation.

                                                                                  Instances For

                                                                                    A character class set.

                                                                                    Instances For

                                                                                      A bracketed character class, e.g., [a-z0-9].

                                                                                      Instances For

                                                                                        An alternation of regular expressions.

                                                                                        Instances For

                                                                                          A concatenation of regular expressions.

                                                                                          Instances For

                                                                                            An abstract syntax tree for a single regular expression.

                                                                                            Instances For

                                                                                              Return this union as a character class set item.

                                                                                              Equations
                                                                                              • One or more equations did not get rendered due to their size.
                                                                                              Instances For
                                                                                                Equations
                                                                                                Instances For
                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      Equations
                                                                                                      Instances For
                                                                                                        Equations
                                                                                                        Instances For
                                                                                                          Equations
                                                                                                          Instances For
                                                                                                            Equations
                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                            Instances For
                                                                                                              Equations
                                                                                                              Instances For
                                                                                                                Equations
                                                                                                                Instances For
                                                                                                                  Equations
                                                                                                                  Instances For
                                                                                                                    Equations
                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                    @[irreducible]
                                                                                                                    Equations
                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                    Instances For
                                                                                                                      @[irreducible]
                                                                                                                      Equations
                                                                                                                      Instances For
                                                                                                                        Equations
                                                                                                                        Instances For
                                                                                                                          Equations
                                                                                                                          Instances For
                                                                                                                            Equations
                                                                                                                            Instances For
                                                                                                                              Equations
                                                                                                                              Instances For
                                                                                                                                Equations
                                                                                                                                Instances For
                                                                                                                                  partial def Syntax.AstItems.find (ast : Ast) (p : AstBool) :
                                                                                                                                  Equations
                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                  Instances For
                                                                                                                                    @[irreducible]

                                                                                                                                    capture groups with a backreference should have fixed width

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