import { int, nat } from "things"; import { GrammarSymbols } from "./grammar_symbols.js"; export declare class Rule { lhs: nat; rhs: int[]; constructor(lhs: nat, rhs: int[]); asString(symbols: GrammarSymbols): string; } /** Nonterminals are > 0, terminals are < 0, 0 is the end of the input. */ export declare class Grammar { start: nat; rules: Rule[]; constructor(start: nat, rules: Rule[]); } export declare function computeProductiveNonterminals(rules: (Rule | null)[]): Set; export declare function removeUnproductiveNonterminals(rules: Rule[]): Rule[];