Parses regular expression source into a spanned syntax tree and then into an immutable term. Other packages use it to compile, compare and print regular expressions.
Union uses | or ∪. Intersection uses & and binds more tightly than union. Concatenation binds more tightly than intersection and can use ·. Prefix ~ complements its operand over the model alphabet. Postfix *, +, ?, {n}, {n,} and {n,m} bind most tightly. Parentheses group expressions. ε denotes the empty word and ∅ the empty language.
A class such as [abc] expands into a union. A range such as [a-c] follows the declared alphabet order. Without a declared alphabet, single-code-point endpoints follow Unicode scalar order. Reversed ranges and empty classes are invalid. Counts expand under the supplied budget. Unquoted &, ~ and [ introduce the new operators and classes. A { after an atom introduces a count. Quote or escape these symbols to use them literally, as in "&", "~", "[" and "{". The printer quotes these literals. Closing delimiters, commas and hyphens keep their literal meaning outside their own contexts. Quoted tokens accept Unicode escapes such as "\u{1F642}".
parseSyntax)buildRegex, RegexBuilder)normalizeForClassical)derivative)isNullable, symbolsOf)checkRegex)printRegex, printedLength)regexTextCodec)dumpRegex, dumpSyntax, regexDecoder, encodeRegex, regexIssueDecoder)SyntaxTree)Regex, RegexBuilder, RegexId, RegexNode)RegexEscape, RegexIssueCode, RegexOperator, RegexToken, SyntaxKind)MAX_NESTING_DEPTH, MAX_SOURCE_LENGTH)