UNPKG

dotlr

Version:

An LR(1) parser generator and visualizer created for educational purposes.

15 lines (14 loc) 1.24 kB
import type { Action, AtomicPattern, GrammarError, Item, ParserError, ParsingError, Rule, Token, Tree } from "./types"; export declare function stringifyToken(token: Token, noApostrophes?: boolean): string; export declare function stringifyAtom(atom: AtomicPattern, noApostrophes?: boolean): string; export declare function stringifyItem(item: Item, noApostrophes?: boolean): string; export declare function stringifyRule(rule: Rule, noApostrophes?: boolean): string; export declare function stringifyLookahead(item: Token[], noApostrophes?: boolean): string; export declare function stringifyAction(action: Action): string; export declare function stringifyActionVerbose(action: Action, rules: Rule[], noApostrophes?: boolean): string; export declare function stringifyTreeStack(tree: Tree[], noApostrophes?: boolean): string[]; export declare function stringifyTree(tree: Tree, indent?: string, isLast?: boolean): string; export declare function stringifyGrammarError(e: GrammarError): string; export declare function stringifyParsingError(error: ParsingError): string; export declare function stringifyParserError(error: ParserError): string; export declare function stringifyError(error: GrammarError | ParsingError | ParserError): string;