UNPKG

antlr-ng

Version:

Next generation ANTLR Tool

52 lines (51 loc) 1.92 kB
import type { AltAST } from "../../tool/ast/AltAST.js"; import type { GrammarAST } from "../../tool/ast/GrammarAST.js"; import type { ErrorManager } from "../../tool/ErrorManager.js"; import type { CommonTreeNodeStream } from "../CommonTreeNodeStream.js"; import { TreeParser } from "../TreeParser.js"; /** Find left-recursive rules */ export declare class LeftRecursiveRuleWalker extends TreeParser { protected numAlts: number; protected ruleName: string; private currentOuterAltNumber; private readonly singleAtomLookaheadValues; private readonly singleAtomWithActionLookaheadValues; constructor(input: CommonTreeNodeStream, errorManager: ErrorManager); recursiveRule(): boolean; protected setAltAssoc(altTree: AltAST, alt: number): void; protected binaryAlt(altTree: AltAST, alt: number): void; protected prefixAlt(altTree: AltAST, alt: number): void; protected suffixAlt(altTree: AltAST, alt: number): void; protected otherAlt(altTree: AltAST, alt: number): void; protected setReturnValues(t: GrammarAST): void; private exceptionGroup; private exceptionHandler; private finallyClause; private ruleModifier; private ruleBlock; private outerAlternative; private binary; private prefix; private suffix; private nonLeftRecur; private recurse; private recurseNoLabel; private elementOptions; private elementOption; private element; private epsilonElement; private setElement; private ebnf; private block; private alternative; private atom; private syntacticPredicate1; private syntacticPredicate2; private syntacticPredicate3; /** * A manual implementation of the ANTLR3 DFA prediction for the element rule. * * @returns `true` if the element rule is a viable candidate for the current input, otherwise `false`. */ private predictElement; }