import { ColumnAndRow } from "./ColumnAndRow";
import { RegexNode, StringTransformer } from "./internal";
import { Token } from "./Token";
import { initializeCharacter } from "./utils/Character";
export interface SlexOptions<TokenType> {
    EOF_TYPE: TokenType;
    isHigherPrecedence: (options: {
        current: TokenType;
        next: TokenType;
    }) => boolean;
    whitespaceCharacters?: string[];
    ignoreTokens?: TokenType[];
}
export declare class Slex<TokenType, Metadata> {
    readonly options: SlexOptions<TokenType>;
    environment: Map<string, RegexNode<TokenType>>;
    Character: {
        isDigit: (ch: string) => boolean;
        isAlphabetic: (ch: string) => boolean;
        isAlphabeticUppercase: (ch: string) => boolean;
        isAlphabeticLowercase: (ch: string) => boolean;
        isControl: (ch: string) => boolean;
        isSymbolic: (ch: string) => boolean;
        isWhitespace: (ch: string) => boolean;
    };
    constructor(options: SlexOptions<TokenType>);
    addRule(name: string, expression: string, emit?: TokenType, transformer?: StringTransformer): void;
    generate(input: string, metadataGenerator: () => Metadata): RegexEngine<TokenType, Metadata>;
}
export type TokenResult<TokenType, Metadata> = {
    success: true;
    token: Token<TokenType, Metadata>;
} | {
    success: false;
    reason: string;
    line: number;
    column: number;
};
export declare class RegexEngine<TokenType, Metadata> {
    readonly options: SlexOptions<TokenType>;
    readonly environment: Map<string, RegexNode<TokenType>>;
    readonly metadataGenerator: () => Metadata;
    readonly input: string;
    currentCharacterIndex: number;
    startCharacterIndex: number;
    Character: ReturnType<typeof initializeCharacter>;
    constructor(options: SlexOptions<TokenType>, environment: Map<string, RegexNode<TokenType>>, metadataGenerator: () => Metadata, input: string);
    private peek;
    private ignoreWhitespace;
    peekNextToken(): Token<TokenType, Metadata>;
    tryPeekNextToken(): TokenResult<TokenType, Metadata>;
    getNextToken(): Token<TokenType, Metadata>;
    tryGetNextToken(): TokenResult<TokenType, Metadata>;
    private tryGetNextNonSkippedToken;
    private _tryGetNextToken;
    hasNextToken(): boolean;
}
export { Token, ColumnAndRow };
