@fauton/cfg
Version:
A package to work with context free grammars and LL1 parsers
16 lines (15 loc) • 478 B
TypeScript
import { IContextFreeGrammarInput } from "./types";
/**
* Find follow of all the variables of cfg
* @param inputCfg Input context free grammar
* @returns A record where keys are variables and values is follow(variable)
*/
export declare function findFollow(inputCfg: IContextFreeGrammarInput): {
first: {
[x: string]: {
first: string[];
substitutions: string[][];
};
};
follow: Record<string, string[]>;
};