import { OpenXmlError } from '../utils/exceptions'; export declare class TokenizerError extends OpenXmlError { readonly name = "TokenizerError"; } export declare const LITERAL = "LITERAL"; export declare const OPERAND = "OPERAND"; export declare const FUNC = "FUNC"; export declare const ARRAY = "ARRAY"; export declare const PAREN = "PAREN"; export declare const SEP = "SEP"; export declare const OP_PRE = "OPERATOR-PREFIX"; export declare const OP_IN = "OPERATOR-INFIX"; export declare const OP_POST = "OPERATOR-POSTFIX"; export declare const WSPACE = "WHITE-SPACE"; type TokenType = typeof LITERAL | typeof OPERAND | typeof FUNC | typeof ARRAY | typeof PAREN | typeof SEP | typeof OP_PRE | typeof OP_IN | typeof OP_POST | typeof WSPACE; export declare const TEXT = "TEXT"; export declare const NUMBER = "NUMBER"; export declare const LOGICAL = "LOGICAL"; export declare const ERROR = "ERROR"; export declare const RANGE = "RANGE"; export declare const OPEN = "OPEN"; export declare const CLOSE = "CLOSE"; export declare const ARG = "ARG"; export declare const ROW = "ROW"; type TokenSubtype = '' | typeof TEXT | typeof NUMBER | typeof LOGICAL | typeof ERROR | typeof RANGE | typeof OPEN | typeof CLOSE | typeof ARG | typeof ROW; export interface Token { value: string; type: TokenType; subtype: TokenSubtype; } /** Build an OPERAND token, deriving the subtype from the value's shape. */ export declare function makeOperand(value: string): Token; /** * Build a "subexpression" token (FUNC / PAREN / ARRAY, OPEN or CLOSE). * * `value` must end with one of `{ } ( )`. If `func` is true, the type is forced * to FUNC regardless of the bare-bracket heuristic — mirrors the `func=True` * overload in openpyxl `Token.make_subexp`. */ export declare function makeSubexp(value: string, func?: boolean): Token; /** Build a SEP token (',' → ARG, ';' → ROW). */ export declare function makeSeparator(value: ',' | ';'): Token; /** Scientific-notation guard: matches a coefficient ending in `[Ee]`. */ export declare const SN_RE: RegExp; /** Whitespace run (space + LF, per Excel formula whitespace rules). */ export declare const WSPACE_RE: RegExp; /** "..."-delimited string literal. Internal `""` is an escaped quote. */ export declare const STRING_DOUBLE_RE: RegExp; /** '...'-delimited link / sheet name. Internal `''` is an escaped apostrophe. */ export declare const STRING_SINGLE_RE: RegExp; /** * Tokenize a formula string into a flat list of `Token`s. * * Mirrors `openpyxl.formula.tokenizer.Tokenizer(formula).items`. A formula that * does not start with `=` becomes a single LITERAL token. Empty input yields * the empty array. */ export declare function tokenize(formula: string): Token[]; /** Render a token list back into the original formula string. */ export declare function renderTokens(items: ReadonlyArray): string; export {};