UNPKG

@light0x00/parser-generator

Version:

A Parser Generator

32 lines (31 loc) 791 B
import { Symbol } from "@/Definition"; import { ItemSet, AugmentedGrammar, State, AutomataTools } from "../Definition"; export declare class SLRAutotamaTools implements AutomataTools { /** * 求指定项集的闭包 * * 例 * 考虑文法: * E->E+T | T * T->T*F | F * F->(E) | id * * 输入: * E->·E+T * E->·T * * 输出: * E->·E+T * E->·T * T->·T*F * T->·F * F->·(E) * F->·id * * @param itemSet 项集 */ closure(itemSet: ItemSet): ItemSet; GOTO(I: ItemSet, inputSymbol: Symbol): ItemSet; getStartState(grammar: AugmentedGrammar): State; } export declare function constructStateSet_SLR(grammar: AugmentedGrammar): import("../Definition").StateSet;