antlr-ng
Version:
Next generation ANTLR Tool
21 lines (20 loc) • 735 B
TypeScript
import { DecisionInfo, ParseInfo } from "antlr4ng";
/** CLI parameters for the interpreter tool. */
export interface IInterpreterCliParameters {
grammars: string[];
inputFile?: string;
startRuleName: string;
encoding: BufferEncoding;
tokens?: boolean;
tree?: boolean;
trace?: boolean;
profile?: string;
}
/** Interpret a lexer/parser, optionally printing tree string and dumping profile info */
export declare class Interpreter {
static readonly profilerColumnNames: string[];
static getValue(decisionInfo: DecisionInfo, ruleNamesByDecision: string[], decision: number, col: number): number | string;
run(): Promise<ParseInfo | undefined>;
private dumpProfilerCSV;
}