UNPKG

@multila/multila-parser-generator

Version:
46 lines (45 loc) 876 B
/** * Table with ACTIONs and GOTOs that can be used for a bottom-up parser of * type LR1. */ export declare class LR1_Table { /** * Rows of the table (one row for each state). */ rows: LR1_TableRow[]; /** * Stringify table. * @returns stringified version */ toString(): string; } /** * Row of the parse table. */ export declare class LR1_TableRow { /** * ACTION entries. */ actionEntries: { [terminal: string]: LR1_TableEntry; }; /** * GOTO entries. */ gotoEntries: { [nonTerminal: string]: LR1_TableEntry; }; /** * Stringify table row. * @returns stringified version */ toString(): string; } /** * Table entry. * Reduce: rule index, shift|goto: successor state */ export declare class LR1_TableEntry { shift: boolean; value: number; }