export interface Terminal {
    token: string;
    text: string;
}
export interface Parent {
    token: string;
    children: (Parent | Terminal)[];
}
export declare class Symbol {
    isTerminal: boolean;
    token: string;
    constructor(token: string, isTerminal?: boolean);
    equals(other: Symbol): boolean;
    toString(): string;
}
export declare class Rule {
    lhs: Symbol;
    rhs: Symbol[];
    constructor(lhs: Symbol, rhs: Symbol[]);
    equals(other: Rule): boolean;
    isNullable(): boolean;
    toString(): string;
}
declare class DotRule {
    rule: Rule;
    dot: number;
    constructor(rule: Rule, dot: number);
    equals(other: DotRule): boolean;
    isComplete(): boolean;
    nextSymbol(): Symbol;
    advance(): DotRule;
    toString(): string;
}
declare class State {
    dotRule: DotRule;
    origin: number;
    edge: number;
    previous: State[][];
    constructor(dotRule: DotRule, origin: number, edge: number);
    equals(other: State): boolean;
    toString(): string;
}
export declare class Grammar {
    rules: Rule[];
    start: Symbol;
    constructor(rules: Rule[], start: Symbol);
}
export declare class Earley {
    grammar: Grammar;
    memory: State[][];
    sentence: Terminal[];
    constructor(grammar: Grammar);
    addState(dotRule: DotRule, origin: number, edge: number): State;
    parse(sentence: Terminal[]): Parent | null;
    scanner(state: State): void;
    predictor(state: State): void;
    completer(complete: State): void;
    buildTree(complete: State): Parent;
}
export {};
