UNPKG

ebnf-railroad-visualizer

Version:
21 lines (20 loc) 561 B
/** * Base class for all parts of a grammar (terminal symbols and non-terminal symbols). * Holds the name of the part and the follow parts of the part. * * See: * * {@link NTS} * * {@link TS} */ export declare abstract class Sym { readonly name: string; readonly id: number; constructor(name: string, id?: number); toString(): string; equals(other: Sym): boolean; /** * Returns true if the symbol is a terminal symbol. * @returns true if the symbol is a literal or a lower case identifier */ isTS(): boolean; }