import type { Combinator, ParseContext } from '../types.ts'; import type { LexBodyRecognizer } from './lex-body.ts'; import type { LexProgramSpec, ResolvedClass } from './program.ts'; /** A selected composite lexical body. Failure state is already published. * `scan` is present only for the balanced shell and indexes the canonical * driver-owned scan pool; it is not another recognizer implementation. */ export type LexProgramRunner = { (input: string, pos: number, ctx: ParseContext, scan?: Combinator): number; readonly scan?: number; }; export declare const LEX_NODE_TERMINAL = 0; export declare const LEX_NODE_SEQUENCE2 = 1; export declare const LEX_NODE_SEQUENCE3 = 2; export declare const LEX_NODE_SEQUENCE4 = 3; export declare const LEX_NODE_SEQUENCE5 = 4; export declare const LEX_NODE_CHOICE2 = 5; export declare const LEX_NODE_CHOICE4 = 6; export declare const LEX_NODE_CHOICE8 = 7; export declare const LEX_NODE_NOT = 8; export declare const LEX_NODE_OPTIONAL = 9; export declare function lexProgramDigest(words: readonly number[]): number; /** Decode one fixed selected-body tuple. There is no lexical opcode loop on * the parse path: each supported tuple becomes one scalar closure here. */ export declare function buildLexProgramRunner(spec: LexProgramSpec, matchers: readonly LexBodyRecognizer[], classes: readonly ResolvedClass[], expected: readonly (readonly string[])[]): LexProgramRunner; //# sourceMappingURL=lex-program.d.ts.map