export interface MatchState { s: string; r: boolean; } export declare function initMatch(source: string): MatchState; export declare function backpedal(state: MatchState, chunk: string): void; export declare function reject(state: MatchState): void; export interface MatchFunc { (self: Self & MatchState, ...captures: string[]): void; } export declare type CaptureMatcher = [number, // match parens offset MatchFunc]; export interface Matcher { r: RegExp[]; m: CaptureMatcher[]; } export declare type MatchPath = [string, // regular expression to match MatchFunc]; export declare function parseSeq(matcher: Matcher, state: Self & MatchState): void; export declare function matchAny(matchers: MatchPath[]): Matcher; export declare function doMatch({ r: regex, m: match }: Matcher, state: Self & MatchState): void;