import { GrammarObject, GrammarProduction, HCG3ProductionBody, HCG3Symbol } from "../types/grammar_nodes.js"; export declare const enum ItemIndex { body_id = 0, length = 1, offset = 2, state = 3 } export declare class ItemGraphNode { subitems: ItemGraphNode[]; supitems: ItemGraphNode[]; item: Item; id?: number; name?: string; /** * Higher score represents a greater depth from the root nodes. */ score?: number; } /** * Represents a state within a production body, with an offset * indicating the current considered symbol of the body. If offset * is the same as the number symbols that make up the body, then * the Item is at the END state of the body. An item item that is * at the END state indicates a successful parse of the production * body. */ export declare class Item extends Array { static fromString(str: string): Item; static fromArray(array: Array): Item; constructor(body_id: number, length: number, offset: number, state?: number); get atEND(): boolean; get id(): string; get body(): number; get len(): number; get state(): number; get offset(): number; copy(body?: number, length?: number, offset?: number, state?: number): Item; body_(grammar: GrammarObject): HCG3ProductionBody; sym(grammar: GrammarObject): HCG3Symbol; render(grammar: GrammarObject): string; renderUnformatted(grammar: GrammarObject): string; rup(grammar: any): string; renderUnformattedWithProduction(grammar: GrammarObject): string; getProductionID(grammar: GrammarObject): number; getProduction(grammar: GrammarObject): GrammarProduction; getProductionAtSymbol(grammar: GrammarObject): GrammarProduction; /** * Returns the item incremented to its final position. * @returns Item */ toEND(): Item; increment(): Item | null; decrement(): Item | null; match(item: Item): boolean; toString(): string; /** * returns new Item that is a copy of this except * depth is set to d */ toState(d: number): Item; } export declare function getGotoItems(grammar: GrammarObject, active_productions: number[], items: Item[], out?: Item[], all?: boolean): Item[]; export declare function itemsToProductionIDs(items: Item[], grammar: GrammarObject): number[]; export declare function Items_Have_The_Same_Active_Symbol(items: Item[], grammar: GrammarObject): boolean;