1.0.1 • Published 2 years ago
jly-parser v1.0.1
Usage
type grammar = {
startSymbol: string;
tokens: (string[]) | string;
operators: {
0: "left" | "right",
[index: number]: string
}[];// e.g. [["left","A","B","C"],["right","D"]]
bnf: {
[nonterminal: string]: {
handle: (string[]) | string;
func?: (symbols: any) => void;
}[]
}
}
example:
See example