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: Syntax.AstItems.ErrorKind
Backrefence invalid.
- CaptureLimitExceeded: Syntax.AstItems.ErrorKind
The capturing group limit was exceeded.
- ClassEscapeInvalid: Syntax.AstItems.ErrorKind
An invalid escape sequence was found in a character class set.
- ClassRangeInvalid: Syntax.AstItems.ErrorKind
An invalid character class range was found.
- ClassRangeLiteral: Syntax.AstItems.ErrorKind
An invalid range boundary was found in a character class.
- ClassUnclosed: Syntax.AstItems.ErrorKind
An opening
[
was found with no corresponding closing]
. - DecimalInvalid: Syntax.AstItems.ErrorKind
An invalid decimal number was given where one was expected.
- EndQuoteWithoutOpenQuote: Syntax.AstItems.ErrorKind
End quote without a corresponding open quote.
- EscapeHexEmpty: Syntax.AstItems.ErrorKind
A bracketed hex literal was empty.
- EscapeHexInvalid: Syntax.AstItems.ErrorKind
A bracketed hex literal did not correspond to a Unicode scalar value.
- EscapeHexInvalidDigit: Syntax.AstItems.ErrorKind
An invalid hexadecimal digit was found.
- EscapeUnexpectedEof: Syntax.AstItems.ErrorKind
EOF was found before an escape sequence was completed.
- EscapeUnrecognized: Syntax.AstItems.ErrorKind
An unrecognized escape sequence.
- FixedWidtExcpected: Syntax.AstItems.ErrorKind
Fixed width in look behind
- FlagDanglingNegation: Syntax.AstItems.ErrorKind
A dangling negation was used when setting flags, e.g.,
i-
. - FlagDuplicate: Syntax.AstItems.ErrorKind
A flag was used twice, e.g.,
i-i
. - FlagRepeatedNegation: Syntax.AstItems.ErrorKind
The negation operator was used twice, e.g.,
-i-s
. - FlagUnexpectedEof: Syntax.AstItems.ErrorKind
Expected a flag but got EOF, e.g.,
(?
. - FlagUnrecognized: Syntax.AstItems.ErrorKind
Unrecognized flag, e.g.,
a
. - GroupNameDuplicate: Syntax.AstItems.ErrorKind
A duplicate capture name was found.
- GroupNameEmpty: Syntax.AstItems.ErrorKind
A capture group name is empty, e.g.,
(?P<>abc)
. - GroupNameInvalid: Syntax.AstItems.ErrorKind
An invalid character was seen for a capture group name.
- GroupNameNotFound: Syntax.AstItems.ErrorKind
A capture group name is not found of a backreference.
- GroupNameUnexpectedEof: Syntax.AstItems.ErrorKind
A closing
>
could not be found for a capture group name. - GroupUnclosed: Syntax.AstItems.ErrorKind
An unclosed group, e.g.,
(ab
. - GroupUnopened: Syntax.AstItems.ErrorKind
An unopened group, e.g.,
ab)
. - NestLimitExceeded: Syntax.AstItems.ErrorKind
The nest limit was exceeded.
- RepetitionCountInvalid: Syntax.AstItems.ErrorKind
The range provided in a counted repetition operator is invalid.
- RepetitionCountDecimalEmpty: Syntax.AstItems.ErrorKind
An opening
{
was not followed by a valid decimal value. - RepetitionCountUnclosed: Syntax.AstItems.ErrorKind
An opening
{
was found with no corresponding closing}
. - RepetitionMissing: Syntax.AstItems.ErrorKind
A repetition operator was applied to a missing sub-expression.
- RepetitionUngreedyAndPossessive: Syntax.AstItems.ErrorKind
A repetition operator was ungreedy and possessive.
- SpecialWordBoundaryUnclosed: Syntax.AstItems.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: Syntax.AstItems.ErrorKind
The special word boundary syntax,
\b{something}
, was used, butsomething
was not recognized as a valid word boundary kind. - SpecialWordOrRepetitionUnexpectedEof: Syntax.AstItems.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: Syntax.AstItems.ErrorKind
The Unicode class is not valid.
- UnsupportedBackreference: Syntax.AstItems.ErrorKind
When octal support is disabled, this error is produced when an octal escape is used.
- UnsupportedLookAround: Syntax.AstItems.ErrorKind
When syntax similar to PCRE's look-around is used, this error is returned.
- UnkownAsciiClass: Syntax.AstItems.ErrorKind
ClassAsci not found.
- EscapeOctalInvalid: Syntax.AstItems.ErrorKind
A octal literal did not correspond to a Unicode scalar value.
- FeatureNotImplementedSubroutines: Syntax.AstItems.ErrorKind
Feature not implemented.
- FeatureNotImplementedFlagShorthand: Syntax.AstItems.ErrorKind
Feature not implemented.
- FeatureNotImplementedAtomicGroup: Syntax.AstItems.ErrorKind
Feature not implemented.
- FeatureNotImplementedConditionalExpression: Syntax.AstItems.ErrorKind
Feature not implemented.
- FeatureNotImplementedBranchResetGroup: Syntax.AstItems.ErrorKind
Feature not implemented.
- FeatureNotImplementedControlVerbs: Syntax.AstItems.ErrorKind
Feature not implemented.
- FeatureNotImplementedFlagExtended: Syntax.AstItems.ErrorKind
Feature not implemented.
Instances For
Equations
- Syntax.AstItems.instToStringErrorKind = { toString := Syntax.AstItems.ErrorKind.toString }
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
The type of a Unicode hex literal.
- x: Syntax.AstItems.HexLiteralKind
A
\x
prefix. When used without brackets, this form is limited to one digit (Pcre flavor). - X: Syntax.AstItems.HexLiteralKind
A
\x
prefix. When used without brackets, this form is limited to two digits. - UnicodeShort: Syntax.AstItems.HexLiteralKind
A
\u
prefix. When used without brackets, this form is limited to four digits.
Instances For
Equations
- Syntax.AstItems.HexLiteralKind.x.digits = 1
- Syntax.AstItems.HexLiteralKind.X.digits = 2
- Syntax.AstItems.HexLiteralKind.UnicodeShort.digits = 4
Instances For
The kind of a single literal expression.
- Verbatim: Syntax.AstItems.LiteralKind
The literal is written verbatim, e.g.,
a
or☃
. - Hex: Syntax.AstItems.HexLiteralKind → Syntax.AstItems.LiteralKind
The literal is written as a hex code with a fixed number of digits like '\u0061'
- HexBrace: Syntax.AstItems.HexLiteralKind → Syntax.AstItems.LiteralKind
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
Equations
- Syntax.AstItems.LiteralKind.Verbatim.toString = "Verbatim"
- (Syntax.AstItems.LiteralKind.Hex Syntax.AstItems.HexLiteralKind.x).toString = "Hex x"
- (Syntax.AstItems.LiteralKind.Hex Syntax.AstItems.HexLiteralKind.X).toString = "Hex X"
- (Syntax.AstItems.LiteralKind.Hex Syntax.AstItems.HexLiteralKind.UnicodeShort).toString = "Hex UnicodeShort"
- (Syntax.AstItems.LiteralKind.HexBrace Syntax.AstItems.HexLiteralKind.x).toString = "HexBrace x"
- (Syntax.AstItems.LiteralKind.HexBrace Syntax.AstItems.HexLiteralKind.X).toString = "HexBrace X"
- (Syntax.AstItems.LiteralKind.HexBrace Syntax.AstItems.HexLiteralKind.UnicodeShort).toString = "HexBrace UnicodeShort"
Instances For
Equations
A single character literal, which includes escape sequences.
- span : Substring
The span of this literal.
- kind : Syntax.AstItems.LiteralKind
The kind of this literal.
- c : Char
The Unicode scalar value corresponding to this literal.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Syntax.AstItems.Literal.toLiteral c p f t = { span := { str := p, startPos := f, stopPos := t }, kind := Syntax.AstItems.LiteralKind.Verbatim, c := c }
Instances For
Equations
- Syntax.AstItems.instToStringLiteral = { toString := Syntax.AstItems.Literal.toString }
A backrefence to a capturung group.
Instances For
Equations
Instances For
Equations
- Syntax.AstItems.instToStringBackRef = { toString := Syntax.AstItems.BackRef.toString }
A range repetition operator.
- Exactly: Nat → Syntax.AstItems.RepetitionRange
{m}
- AtLeast: Nat → Syntax.AstItems.RepetitionRange
{m,}
- Bounded: Nat → Nat → Syntax.AstItems.RepetitionRange
{m,n}
Instances For
Equations
- (Syntax.AstItems.RepetitionRange.Exactly n).toString = toString "Exactly " ++ toString n ++ toString ""
- (Syntax.AstItems.RepetitionRange.AtLeast n).toString = toString "AtLeast " ++ toString n ++ toString ""
- (Syntax.AstItems.RepetitionRange.Bounded m n).toString = toString "Bounded " ++ toString m ++ toString "," ++ toString n ++ toString ""
Instances For
The kind of a repetition operator.
- ZeroOrOne: Syntax.AstItems.RepetitionKind
?
- ZeroOrMore: Syntax.AstItems.RepetitionKind
*
- OneOrMore: Syntax.AstItems.RepetitionKind
+
- Range: Syntax.AstItems.RepetitionRange → Syntax.AstItems.RepetitionKind
Instances For
Equations
- Syntax.AstItems.RepetitionKind.ZeroOrOne.toString = "?"
- Syntax.AstItems.RepetitionKind.ZeroOrMore.toString = "*"
- Syntax.AstItems.RepetitionKind.OneOrMore.toString = "+"
- (Syntax.AstItems.RepetitionKind.Range r).toString = toString "Range " ++ toString r ++ toString ""
Instances For
The repetition operator itself.
- span : Substring
The span of this Repetition .
The kind of this Repetition .
Instances For
Equations
Instances For
A single character class range in a set.
- span : Substring
The span of this range.
- start : Syntax.AstItems.Literal
The start of this range.
- end : Syntax.AstItems.Literal
The end of this range.
- isLe : self.start.c ≤ self.end.c
assertion
Instances For
A single flag.
- CaseInsensitive: Syntax.AstItems.Flag
i
- MultiLine: Syntax.AstItems.Flag
m
- DotMatchesNewLine: Syntax.AstItems.Flag
s
- SwapGreed: Syntax.AstItems.Flag
U
- Unicode: Syntax.AstItems.Flag
u
- CRLF: Syntax.AstItems.Flag
R
- Extended: Syntax.AstItems.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.
- Negation: Syntax.AstItems.FlagsItemKind
A negation operator applied to all subsequent flags in the enclosing group.
- Flag: Syntax.AstItems.Flag → Syntax.AstItems.FlagsItemKind
A single flag in a group.
Instances For
Equations
- One or more equations did not get rendered due to their size.
A single item in a group of flags.
- span : Substring
The span of this item.
The kind of this item.
Instances For
Equations
- One or more equations did not get rendered due to their size.
A group of flags.
- span : Substring
The span of this item.
- items : Array Syntax.AstItems.FlagsItem
The kind of this item.
Instances For
Equations
- Syntax.AstItems.instToStringFlags = { toString := fun (flags : Syntax.AstItems.Flags) => toString "Flags " ++ toString flags.items ++ toString "" }
The kind of a Lookaround.
- PositiveLookahead: Syntax.AstItems.LookaroundKind
- NegativeLookahead: Syntax.AstItems.LookaroundKind
- PositiveLookbehind: Nat → Syntax.AstItems.LookaroundKind
- NegativeLookbehind: Nat → Syntax.AstItems.LookaroundKind
Instances For
Equations
- One or more equations did not get rendered due to their size.
The kind of a group.
- CaptureIndex: Nat → Option String → Syntax.AstItems.GroupKind
- NonCapturing: Syntax.AstItems.Flags → Syntax.AstItems.GroupKind
- Lookaround: Syntax.AstItems.LookaroundKind → Syntax.AstItems.GroupKind
Instances For
Equations
- (Syntax.AstItems.GroupKind.CaptureIndex i s).toString = toString "CaptureIndex " ++ toString i ++ toString " name " ++ toString s ++ toString ""
- (Syntax.AstItems.GroupKind.NonCapturing flags).toString = toString "NonCapturing " ++ toString flags ++ toString ""
- (Syntax.AstItems.GroupKind.Lookaround kind).toString = toString "Lookaround " ++ toString kind ++ toString ""
Instances For
Equations
- Syntax.AstItems.instToStringGroupKind = { toString := Syntax.AstItems.GroupKind.toString }
The type of op used in a Unicode character class.
Instances For
Equations
- Syntax.AstItems.instToStringClassUnicodeOpKind = { toString := fun (v : Syntax.AstItems.ClassUnicodeOpKind) => match v with | Syntax.AstItems.ClassUnicodeOpKind.Equal => "Equal" }
The available forms of Unicode character classes.
- OneLetter: Char → Syntax.AstItems.ClassUnicodeKind
A one letter abbreviated class, e.g.,
\pN
. - Named: String → Syntax.AstItems.ClassUnicodeKind
A binary property, general category or script. The string may be empty.
- NamedValue: Syntax.AstItems.ClassUnicodeOpKind → String → String → Syntax.AstItems.ClassUnicodeKind
A property name and an associated value.
Instances For
Equations
- (Syntax.AstItems.ClassUnicodeKind.OneLetter c).toString = toString "OneLetter '" ++ toString c ++ toString "'"
- (Syntax.AstItems.ClassUnicodeKind.Named s).toString = toString "Named '" ++ toString s ++ toString "'"
- (Syntax.AstItems.ClassUnicodeKind.NamedValue op n v).toString = toString "NamedValue " ++ toString op ++ toString " " ++ toString n ++ toString " " ++ toString v ++ toString ""
Instances For
A Unicode character class.
Instances For
Equations
- One or more equations did not get rendered due to their size.
An assertion kind.
- StartLine: Syntax.AstItems.AssertionKind
^
- EndLine: Syntax.AstItems.AssertionKind
$
- EndLineWithOptionalLF: Syntax.AstItems.AssertionKind
$
pcre flavor - StartText: Syntax.AstItems.AssertionKind
\A
- EndText: Syntax.AstItems.AssertionKind
\z
- EndTextWithOptionalLF: Syntax.AstItems.AssertionKind
\Z
pcre flavor - WordBoundary: Syntax.AstItems.AssertionKind
\b
- NotWordBoundary: Syntax.AstItems.AssertionKind
\B
- WordBoundaryStart: Syntax.AstItems.AssertionKind
\b{start}
- WordBoundaryEnd: Syntax.AstItems.AssertionKind
\b{end}
- WordBoundaryStartHalf: Syntax.AstItems.AssertionKind
\b{start-half}
- WordBoundaryEndHalf: Syntax.AstItems.AssertionKind
\b{end-half}
- PreviousMatch: Syntax.AstItems.AssertionKind
\G
- ClearMatches: Syntax.AstItems.AssertionKind
\K
Instances For
Equations
- Syntax.AstItems.AssertionKind.StartLine.toString = toString "StartLine"
- Syntax.AstItems.AssertionKind.EndLine.toString = toString "EndLine"
- Syntax.AstItems.AssertionKind.EndLineWithOptionalLF.toString = toString "EndLineWithOptionalLF"
- Syntax.AstItems.AssertionKind.StartText.toString = toString "StartText"
- Syntax.AstItems.AssertionKind.EndText.toString = toString "EndText"
- Syntax.AstItems.AssertionKind.EndTextWithOptionalLF.toString = toString "EndTextWithOptionalLF"
- Syntax.AstItems.AssertionKind.WordBoundary.toString = toString "WordBoundary"
- Syntax.AstItems.AssertionKind.NotWordBoundary.toString = toString "NotWordBoundary"
- Syntax.AstItems.AssertionKind.WordBoundaryStart.toString = toString "WordBoundaryStart"
- Syntax.AstItems.AssertionKind.WordBoundaryEnd.toString = toString "WordBoundaryEnd"
- Syntax.AstItems.AssertionKind.WordBoundaryStartHalf.toString = toString "WordBoundaryStartHalf"
- Syntax.AstItems.AssertionKind.WordBoundaryEndHalf.toString = toString "WordBoundaryEndHalf"
- Syntax.AstItems.AssertionKind.PreviousMatch.toString = toString "PreviousMatch"
- Syntax.AstItems.AssertionKind.ClearMatches.toString = toString "ClearMatches"
Instances For
A single zero-width assertion.
- span : Substring
The span of this assertion.
The assertion kind.
Instances For
Equations
- One or more equations did not get rendered due to their size.
The available ASCII character classes.
- Alnum: Syntax.AstItems.ClassAsciiKind
[0-9A-Za-z]
- Alpha: Syntax.AstItems.ClassAsciiKind
[A-Za-z]
- Ascii: Syntax.AstItems.ClassAsciiKind
[\x00-\x7F]
- Blank: Syntax.AstItems.ClassAsciiKind
[ \t]
- Cntrl: Syntax.AstItems.ClassAsciiKind
[\x00-\x1F\x7F]
- Digit: Syntax.AstItems.ClassAsciiKind
[0-9]
- Graph: Syntax.AstItems.ClassAsciiKind
[!-~]
- Lower: Syntax.AstItems.ClassAsciiKind
[a-z]
- Print: Syntax.AstItems.ClassAsciiKind
[ -~]
- Punct: Syntax.AstItems.ClassAsciiKind
...
- Space: Syntax.AstItems.ClassAsciiKind
[\t\n\v\f\r ]
- Upper: Syntax.AstItems.ClassAsciiKind
[A-Z]
- Word: Syntax.AstItems.ClassAsciiKind
[0-9A-Za-z_]
- Xdigit: Syntax.AstItems.ClassAsciiKind
[0-9A-Fa-f]
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
Equations
- One or more equations did not get rendered due to their size.
The available Perl character classes.
- Digit: Syntax.AstItems.ClassPerlKind
Decimal numbers.
- Space: Syntax.AstItems.ClassPerlKind
Whitespace.
- Word: Syntax.AstItems.ClassPerlKind
Word characters.
- Newline: Syntax.AstItems.ClassPerlKind
Newline.
- VerticalSpace: Syntax.AstItems.ClassPerlKind
Whitespace.
- HorizontalSpace: Syntax.AstItems.ClassPerlKind
Whitespace.
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.
A repetition operation applied to a regular expression.
- mk: Substring → Syntax.AstItems.RepetitionOp → Bool → Bool → Syntax.AstItems.Ast → Syntax.AstItems.Repetition
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.
- Literal: Syntax.AstItems.Literal → Syntax.AstItems.Primitive
- BackRef: Syntax.AstItems.BackRef → Syntax.AstItems.Primitive
- Dot: Substring → Syntax.AstItems.Primitive
- Assertion: Syntax.AstItems.Assertion → Syntax.AstItems.Primitive
- Unicode: Syntax.AstItems.ClassUnicode → Syntax.AstItems.Primitive
- Perl: Syntax.AstItems.ClassPerl → Syntax.AstItems.Primitive
Instances For
A union of items inside a character class set.
Instances For
A single component of a character class set.
- Empty: Substring → Syntax.AstItems.ClassSetItem
An empty item.
- Literal: Syntax.AstItems.Literal → Syntax.AstItems.ClassSetItem
A single literal.
- Range: Syntax.AstItems.ClassSetRange → Syntax.AstItems.ClassSetItem
A range between two literals.
- Ascii: Syntax.AstItems.ClassAscii → Syntax.AstItems.ClassSetItem
An ASCII character class, e.g.,
[:alnum:]
or[:punct:]
. - Unicode: Syntax.AstItems.ClassUnicode → Syntax.AstItems.ClassSetItem
A Unicode character class, e.g.,
\pL
or\p{Greek}
. - Perl: Syntax.AstItems.ClassPerl → Syntax.AstItems.ClassSetItem
A perl character class, e.g.,
\d
or\W
. - Bracketed: Syntax.AstItems.ClassBracketed → Syntax.AstItems.ClassSetItem
A bracketed character class set, which may contain zero or more character ranges and/or zero or more nested classes. e.g.,
[a-zA-Z\pL]
. - Union: Syntax.AstItems.ClassSetUnion → Syntax.AstItems.ClassSetItem
A union of items.
Instances For
The type of a Unicode character class set operation.
- Intersection: Syntax.AstItems.ClassSetBinaryOpKind
The intersection of two sets, e.g.,
\pN&&[a-z]
. - Difference: Syntax.AstItems.ClassSetBinaryOpKind
The difference of two sets, e.g.,
\pN--[0-9]
. - SymmetricDifference: Syntax.AstItems.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.
- mk: Substring → Syntax.AstItems.ClassSetBinaryOpKind → Syntax.AstItems.ClassSet → Syntax.AstItems.ClassSet → Syntax.AstItems.ClassSetBinaryOp
Instances For
A character class set.
- Item: Syntax.AstItems.ClassSetItem → Syntax.AstItems.ClassSet
An item, which can be a single literal, range, nested character class or a union of items.
- BinaryOp: Syntax.AstItems.ClassSetBinaryOp → Syntax.AstItems.ClassSet
A single binary operation (i.e., &&, -- or ~~).
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.
- Empty: Syntax.AstItems.Ast
An empty regex that matches everything.
- Flags: Syntax.AstItems.SetFlags → Syntax.AstItems.Ast
A set of flags, e.g.,
(?is)
. - Literal: Syntax.AstItems.Literal → Syntax.AstItems.Ast
A single character literal, which includes escape sequences.
- BackRef: Syntax.AstItems.BackRef → Syntax.AstItems.Ast
A backrefence to a capturung group.
- Dot: Substring → Syntax.AstItems.Ast
The "any character" class.
- Assertion: Syntax.AstItems.Assertion → Syntax.AstItems.Ast
A single zero-width assertion.
- ClassUnicode: Syntax.AstItems.ClassUnicode → Syntax.AstItems.Ast
A single Unicode character class, e.g.,
\pL
or\p{Greek}
. - ClassPerl: Syntax.AstItems.ClassPerl → Syntax.AstItems.Ast
A single perl character class, e.g.,
\d
or\W
. - ClassBracketed: Syntax.AstItems.ClassBracketed → Syntax.AstItems.Ast
A single bracketed character class set, which may contain zero or more character range.
- Repetition: Syntax.AstItems.Repetition → Syntax.AstItems.Ast
A repetition operator applied to an arbitrary regular expression.
- Alternation: Syntax.AstItems.Alternation → Syntax.AstItems.Ast
An alternation of regular expressions.
- Group: Syntax.AstItems.Group → Syntax.AstItems.Ast
A grouped regular expression.
- Concat: Syntax.AstItems.Concat → Syntax.AstItems.Ast
A concatenation of regular expressions.
Instances For
Equations
- Syntax.AstItems.instInhabitedAst = { default := Syntax.AstItems.Ast.Empty }
Equations
- (Syntax.AstItems.ClassSetUnion.mk span items).items = items
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
- (Syntax.AstItems.ClassBracketed.mk span negated kind).span = span
Instances For
Equations
- (Syntax.AstItems.ClassBracketed.mk span negated kind).negate = negated
Instances For
Equations
- (Syntax.AstItems.Concat.mk span asts).span = span
Instances For
Equations
- (Syntax.AstItems.Concat.mk span asts).asts = asts
Instances For
Equations
- concat.into_ast = match concat.asts.size with | 0 => Syntax.AstItems.Ast.Empty | 1 => concat.asts[0]! | x => Syntax.AstItems.Ast.Concat concat
Instances For
Equations
- (Syntax.AstItems.Alternation.mk span asts).asts = asts
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- (Syntax.AstItems.Primitive.Literal lit).into_ast = Syntax.AstItems.Ast.Literal lit
- (Syntax.AstItems.Primitive.BackRef n).into_ast = Syntax.AstItems.Ast.BackRef n
- (Syntax.AstItems.Primitive.Dot span).into_ast = Syntax.AstItems.Ast.Dot span
- (Syntax.AstItems.Primitive.Assertion a).into_ast = Syntax.AstItems.Ast.Assertion a
- (Syntax.AstItems.Primitive.Unicode cls).into_ast = Syntax.AstItems.Ast.ClassUnicode cls
- (Syntax.AstItems.Primitive.Perl cls).into_ast = Syntax.AstItems.Ast.ClassPerl cls
Instances For
Equations
- (Syntax.AstItems.Primitive.Literal lit).into_class_set_item = Except.ok (Syntax.AstItems.ClassSetItem.Literal lit)
- (Syntax.AstItems.Primitive.Perl cls).into_class_set_item = Except.ok (Syntax.AstItems.ClassSetItem.Perl cls)
- (Syntax.AstItems.Primitive.Unicode cls).into_class_set_item = Except.ok (Syntax.AstItems.ClassSetItem.Unicode cls)
- p.into_class_set_item = Except.error "into_class_set_item, unexpected entry"
Instances For
Equations
- (Syntax.AstItems.Primitive.Literal lit).into_class_literal = Except.ok lit
- (Syntax.AstItems.Primitive.Perl a).into_class_literal = Except.error "escape sequence unexpected in range"
- p.into_class_literal = Except.error "into_class_literal, unexpected entry"
Instances For
Equations
- (Syntax.AstItems.Group.mk span kind ast).kind = kind
Instances For
Equations
- (Syntax.AstItems.Group.mk span kind ast).ast = ast
Instances For
Equations
- (Syntax.AstItems.ClassSetBinaryOp.mk span kind lhs rhs).kind = kind
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
Equations
- One or more equations did not get rendered due to their size.
- (Syntax.AstItems.ClassSetItem.Empty a).toStringClassSetItem col = toString "ItemEmpty"
- (Syntax.AstItems.ClassSetItem.Literal lit).toStringClassSetItem col = toString "Item " ++ toString lit ++ toString ""
- (Syntax.AstItems.ClassSetItem.Range range).toStringClassSetItem col = toString "Item " ++ toString range ++ toString ""
- (Syntax.AstItems.ClassSetItem.Ascii cls).toStringClassSetItem col = toString "Item " ++ toString cls ++ toString ""
- (Syntax.AstItems.ClassSetItem.Perl cls).toStringClassSetItem col = toString "Item " ++ toString cls ++ toString ""
- (Syntax.AstItems.ClassSetItem.Unicode cls).toStringClassSetItem col = toString "Item " ++ toString cls ++ toString ""
- (Syntax.AstItems.ClassSetItem.Union union).toStringClassSetItem col = toString "Item Union " ++ toString (Syntax.AstItems.ClassSetItem.toStringClassSetUnion union col) ++ toString ""
Instances For
Equations
- Syntax.AstItems.instToStringClassSetUnion = { toString := fun (union : Syntax.AstItems.ClassSetUnion) => Syntax.AstItems.ClassSetItem.toStringClassSetUnion union 0 }
Equations
- Syntax.AstItems.instToStringClassSetItem = { toString := fun (item : Syntax.AstItems.ClassSetItem) => item.toStringClassSetItem 0 }
Equations
- Syntax.AstItems.ClassSetBinaryOpKind.Intersection.toString = toString "Intersection"
- Syntax.AstItems.ClassSetBinaryOpKind.Difference.toString = toString "Difference"
- Syntax.AstItems.ClassSetBinaryOpKind.SymmetricDifference.toString = toString "SymmetricDifference"
Instances For
Equations
Instances For
Equations
- Syntax.AstItems.instToStringClassSet = { toString := fun (s : Syntax.AstItems.ClassSet) => s.toString 0 }
Equations
- (Syntax.AstItems.Repetition.mk span op greedy possessive ast).op = op
Instances For
Equations
- (Syntax.AstItems.Repetition.mk span op greedy possessive ast).greedy = greedy
Instances For
Equations
- (Syntax.AstItems.Repetition.mk span op greedy possessive ast).possessive = possessive
Instances For
Equations
- (Syntax.AstItems.Repetition.mk span op greedy possessive ast).ast = ast
Instances For
Equations
- Syntax.AstItems.span Syntax.AstItems.Ast.Empty = default
- Syntax.AstItems.span (Syntax.AstItems.Ast.Flags (Syntax.AstItems.SetFlags.mk span flags)) = span
- Syntax.AstItems.span (Syntax.AstItems.Ast.Literal lit) = lit.span
- Syntax.AstItems.span (Syntax.AstItems.Ast.BackRef br) = br.span
- Syntax.AstItems.span (Syntax.AstItems.Ast.Dot span) = span
- Syntax.AstItems.span (Syntax.AstItems.Ast.Assertion { span := span, kind := kind }) = span
- Syntax.AstItems.span (Syntax.AstItems.Ast.ClassUnicode cls) = cls.span
- Syntax.AstItems.span (Syntax.AstItems.Ast.ClassPerl cls) = cls.span
- Syntax.AstItems.span (Syntax.AstItems.Ast.ClassBracketed (Syntax.AstItems.ClassBracketed.mk span negated kind)) = span
- Syntax.AstItems.span (Syntax.AstItems.Ast.Repetition (Syntax.AstItems.Repetition.mk span op greedy possessive ast_2)) = span
- Syntax.AstItems.span (Syntax.AstItems.Ast.Alternation (Syntax.AstItems.Alternation.mk span asts)) = span
- Syntax.AstItems.span (Syntax.AstItems.Ast.Group (Syntax.AstItems.Group.mk span kind ast_2)) = span
- Syntax.AstItems.span (Syntax.AstItems.Ast.Concat concat) = concat.span
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Syntax.AstItems.toString Syntax.AstItems.Ast.Empty col = toString "Empty"
- Syntax.AstItems.toString (Syntax.AstItems.Ast.Flags (Syntax.AstItems.SetFlags.mk span flags)) col = toString "Flags " ++ toString flags ++ toString ""
- Syntax.AstItems.toString (Syntax.AstItems.Ast.Literal lit) col = toString "" ++ toString lit ++ toString ""
- Syntax.AstItems.toString (Syntax.AstItems.Ast.BackRef br) col = toString "" ++ toString br ++ toString ""
- Syntax.AstItems.toString (Syntax.AstItems.Ast.Dot span) col = toString "Dot " ++ toString (Syntax.AstItems.spanToString span) ++ toString ""
- Syntax.AstItems.toString (Syntax.AstItems.Ast.Assertion a) col = toString "Assertion " ++ toString a ++ toString ""
- Syntax.AstItems.toString (Syntax.AstItems.Ast.ClassUnicode cls) col = toString "ClassUnicode " ++ toString cls ++ toString ""
- Syntax.AstItems.toString (Syntax.AstItems.Ast.ClassPerl cls) col = toString "ClassPerl " ++ toString cls ++ toString ""
Instances For
Equations
- Syntax.AstItems.instToStringAst = { toString := fun (ast : Syntax.AstItems.Ast) => Syntax.AstItems.toString ast 0 }
Equations
- One or more equations did not get rendered due to their size.
- Syntax.AstItems.get_fixed_width pattern (Syntax.AstItems.Ast.Literal a) = pure 1
- Syntax.AstItems.get_fixed_width pattern (Syntax.AstItems.Ast.Dot a) = pure 1
- Syntax.AstItems.get_fixed_width pattern (Syntax.AstItems.Ast.ClassBracketed a) = pure 1
- Syntax.AstItems.get_fixed_width pattern (Syntax.AstItems.Ast.ClassUnicode a) = pure 1
- Syntax.AstItems.get_fixed_width pattern (Syntax.AstItems.Ast.ClassPerl a) = pure 1
- Syntax.AstItems.get_fixed_width pattern (Syntax.AstItems.Ast.Assertion a) = pure 0
- Syntax.AstItems.get_fixed_width pattern (Syntax.AstItems.Ast.Flags a) = pure 0
- Syntax.AstItems.get_fixed_width pattern (Syntax.AstItems.Ast.Repetition rep) = throw (Syntax.AstItems.toError pattern Syntax.AstItems.ErrorKind.FixedWidtExcpected)
- Syntax.AstItems.get_fixed_width pattern (Syntax.AstItems.Ast.Group (Syntax.AstItems.Group.mk span (Syntax.AstItems.GroupKind.Lookaround a) ast_2)) = pure 0
- Syntax.AstItems.get_fixed_width pattern ast = throw (Syntax.AstItems.toError pattern Syntax.AstItems.ErrorKind.FixedWidtExcpected)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
capture groups with a backreference should have fixed width
Equations
- One or more equations did not get rendered due to their size.