antlr-ng
Version:
Next generation ANTLR Tool
25 lines (24 loc) • 1.37 kB
TypeScript
import { GrammarTreeVisitor } from "../tree/walkers/GrammarTreeVisitor.js";
import { MultiMap } from "stringtemplate4ts";
import { ActionAST } from "../tool/ast/ActionAST.js";
import { AltAST } from "../tool/ast/AltAST.js";
import { GrammarAST } from "../tool/ast/GrammarAST.js";
import type { GrammarRootAST } from "../tool/ast/GrammarRootAST.js";
import { RuleAST } from "../tool/ast/RuleAST.js";
import { Grammar } from "../tool/Grammar.js";
import { Rule } from "../tool/Rule.js";
export declare class RuleCollector extends GrammarTreeVisitor {
/** Which grammar are we checking? */
g: Grammar;
nameToRuleMap: Map<string, Rule>;
ruleToAltLabels: MultiMap<string, GrammarAST>;
altLabelToRuleName: Map<string, string>;
private grammarCaseInsensitive;
constructor(g: Grammar);
process(ast: GrammarRootAST): void;
discoverRule(rule: RuleAST, id: GrammarAST, modifiers: GrammarAST[], arg: ActionAST | undefined, returns: ActionAST | undefined, thrws: GrammarAST, options: GrammarAST, locals: ActionAST | undefined, actions: GrammarAST[], block: GrammarAST): void;
discoverOuterAlt(alt: AltAST): void;
grammarOption(id: GrammarAST, valueAST: GrammarAST): void;
discoverLexerRule(rule: RuleAST, id: GrammarAST, modifiers: GrammarAST[], options: GrammarAST | null, block: GrammarAST): void;
private getCaseInsensitiveValue;
}