antlr-ng
Version:
Next generation ANTLR Tool
35 lines (34 loc) • 1.59 kB
TypeScript
import { AttributeDict } from "./tool/AttributeDict.js";
/**
* Various constant value that were scattered all over the place. Collect them here to minimize circular dependencies.
*/
export declare class Constants {
static readonly GrammarExtension = ".g4";
static readonly LegacyGrammarExtension = ".g";
static readonly AllGrammarExtensions: string[];
static readonly DefaultNodeName = "DEFAULT_MODE";
static readonly PrecedenceOptionName = "p";
static readonly TokenIndexOptionName = "tokenIndex";
static readonly VocabFileExtension = ".tokens";
static readonly GrammarFromStringName = "<string>";
static readonly EorTokenType = 1;
static readonly Down = 2;
static readonly Up = 3;
/**
* Rule refs have a predefined set of attributes as well as the return values and args.
*
* These must be consistent with ActionTranslator.rulePropToModelMap, ...
*/
static readonly predefinedRulePropertiesDict: AttributeDict;
/**
* All {@link Token} scopes (token labels) share the same fixed scope of of predefined attributes. I keep this
* out of the {@link Token} interface to avoid a runtime type leakage.
*/
static readonly predefinedTokenDict: AttributeDict;
/**
* Provides a map of names of predefined constants which are likely to appear as the argument for lexer commands.
* These names are required during code generation for creating {@link LexerAction} instances that are usable
* by a lexer interpreter.
*/
static readonly COMMON_CONSTANTS: Map<string, number>;
}