export interface Terminal { type: string; pattern: RegExp; } export interface LexTree { type: string; match: RegExpMatchArray; index: number; line: number; } export interface LexTreeUnknown extends LexTree { type: "unknown"; } export declare class Lexer { private terminals; static split(input: string, comment?: RegExp): LexTree[]; static splitOffside(input: string, comment?: RegExp): LexTree[]; constructor(terminals: Terminal[]); next(token: LexTreeUnknown, index?: number, activeTerminals?: Record): LexTree; lex(tokens: LexTree[]): LexTree[]; }