ebnf-railroad-visualizer
Version:
A web-based EBNF railroad diagram visualizer
29 lines (28 loc) • 785 B
TypeScript
import { Sym } from '../scannerparser/Sym.js';
import { Identifier } from './Identifier.js';
import { Literal } from './Literal.js';
import { Expression } from './Expression.js';
export declare enum FactorType {
Identifier = 0,
Literal = 1,
Group = 2,
Repetition = 3,
Optionally = 4
}
/**
* A factor is a single symbol or a group of symbols defined as:
*
* ```plaintext
* FACTOR = IDENTIFIER
* | LITERAL
* | "(" EXPRESSION ")"
* | "{" EXPRESSION "}
* | "[" EXPRESSION "]" .
* ```
*/
export declare class Factor extends Sym {
readonly type: FactorType;
readonly value: Identifier | Literal | Expression;
constructor(type: FactorType, value: Identifier | Literal | Expression, id?: number);
toString(): string;
}