import * as CharSet from './char-set.js'; import * as Stream from './stream.js'; import * as Table from './table.js'; import * as AST from './ast.js'; type StdRegexWithoutMetaInfo = ({ type: "epsilon"; } | { type: "literal"; charset: CharSet.CharSet; } | { type: "concat"; left: StdRegex; right: StdRegex; } | { type: "union"; left: StdRegex; right: StdRegex; } | { type: "star"; inner: StdRegex; }); type ExtRegexWithoutMetaInfo = ({ type: "epsilon"; } | { type: "literal"; charset: CharSet.CharSet; } | { type: "concat"; left: ExtRegex; right: ExtRegex; } | { type: "union"; left: ExtRegex; right: ExtRegex; } | { type: "star"; inner: ExtRegex; } | { type: "intersection"; left: ExtRegex; right: ExtRegex; } | { type: "complement"; inner: ExtRegex; }); export type StdRegex = StdRegexWithoutMetaInfo & { hash: number; isStdRegex: true; }; export type ExtRegex = ExtRegexWithoutMetaInfo & { hash: number; isStdRegex: boolean; }; export declare function withMetaInfo(regex: StdRegexWithoutMetaInfo): StdRegex; export declare function withMetaInfo(regex: ExtRegexWithoutMetaInfo): ExtRegex; export declare function isStdRegex(regex: ExtRegex): regex is StdRegex; export declare const epsilon: StdRegex; export declare function literal(charset: CharSet.CharSet): StdRegex; export declare const empty: StdRegex; export declare function concat(left: StdRegex, right: StdRegex): StdRegex; export declare function concat(left: ExtRegex, right: ExtRegex): ExtRegex; export declare function union(left: StdRegex, right: StdRegex): StdRegex; export declare function union(left: ExtRegex, right: ExtRegex): ExtRegex; export declare function star(inner: StdRegex): StdRegex; export declare function star(inner: ExtRegex): ExtRegex; export declare function intersection(left: ExtRegex, right: ExtRegex): ExtRegex; export declare function complement(inner: ExtRegex): ExtRegex; export declare const anySingleChar: StdRegex; export declare function singleChar(char: string): StdRegex; export declare function string(str: string): StdRegex; export declare function optional(regex: StdRegex): StdRegex; export declare function optional(regex: ExtRegex): ExtRegex; export declare function seq(res: StdRegex[]): StdRegex; export declare function seq(res: ExtRegex[]): ExtRegex; export declare function repeat(regex: StdRegex, bounds?: AST.RepeatBounds): StdRegex; export declare function repeat(regex: ExtRegex, bounds?: AST.RepeatBounds): ExtRegex; export declare const dotStar: StdRegex; export declare function isEmpty(regex: ExtRegex): boolean; export declare class CacheOverflowError extends Error { name: string; } export declare function charCodeDerivative(charCode: number, regex: StdRegex, cache: Table.Table): StdRegex; export declare function charCodeDerivative(charCode: number, regex: ExtRegex, cache: Table.Table): ExtRegex; export declare function derivative(str: string, regex: StdRegex): StdRegex; export declare function derivative(str: string, regex: ExtRegex): ExtRegex; export declare function isNullable(regex: ExtRegex): boolean; export declare function matches(regex: ExtRegex, string: string): boolean; export declare function equal(regexA: ExtRegex, regexB: ExtRegex): boolean; export type DerivativeClassesCache = { classes: Map; intersections: Table.Table; }; export declare function derivativeClasses(regex: ExtRegex, cache: DerivativeClassesCache): CharSet.CharSet[]; export declare class VeryLargeSyntaxTreeError extends Error { name: string; } export declare function toRegExp(regex: StdRegex): RegExp; export declare function toString(regex: StdRegex): string; export declare function enumerate(regex: StdRegex): Stream.Stream; export declare function sample(re: StdRegex, seed: number): Generator; export declare function size(regex: StdRegex): bigint | undefined; export declare function nodeCount(regex: ExtRegex, cache?: Map): number; export declare function debugShow(regex: ExtRegex): string; export declare function debugPrint(regex: ExtRegex): void; export declare function debugShowAux(regex: ExtRegex): unknown; export {};