import type { CompoundHandler, PrimitiveHandler } from './types.js'; import type { ExplicitRule, ImplicitRule, Rule, MappedRule } from './types.js'; import type { Options, State } from './types.js'; declare const parse: (input: string, rule: Rule, options?: Options) => T[]; declare const validate: (input: string, rule: Rule, options?: Options) => boolean; declare const match: (target: RegExp | string | string[], handler?: PrimitiveHandler | T) => ExplicitRule; declare const repeat: (rule: Rule, min: number, max: number, handler?: CompoundHandler) => ExplicitRule; declare const optional: (rule: Rule, handler?: CompoundHandler) => ExplicitRule; declare const star: (rule: Rule, handler?: CompoundHandler) => ExplicitRule; declare const plus: (rule: Rule, handler?: CompoundHandler) => ExplicitRule; declare const and: (rules: (MappedRule | Rule)[], handler?: CompoundHandler) => ExplicitRule; declare const or: (rules: (MappedRule | Rule)[], handler?: CompoundHandler) => ExplicitRule; declare const jump: (rules: Record>, handler?: CompoundHandler) => ExplicitRule; declare const negative: (rule: Rule) => ExplicitRule; declare const positive: (rule: Rule) => ExplicitRule; declare const grammar: (fn: (operators: { match: typeof match; repeat: typeof repeat; optional: typeof optional; star: typeof star; plus: typeof plus; and: typeof and; or: typeof or; jump: typeof jump; negative: typeof negative; positive: typeof positive; lazy: typeof lazy; }) => U) => U; declare const lazy: (getter: Function) => ExplicitRule; export { parse, validate }; export { match }; export { repeat, optional, star, plus }; export { and }; export { or, jump }; export { negative, positive }; export { grammar, lazy }; export type { CompoundHandler, PrimitiveHandler, ExplicitRule, ImplicitRule, Rule, Options, State };