Package | Description |
---|---|
org.antlr.v4 | |
org.antlr.v4.analysis | |
org.antlr.v4.parse | |
org.antlr.v4.semantics | |
org.antlr.v4.tool | |
org.antlr.v4.tool.ast |
Modifier and Type | Method and Description |
---|---|
GrammarRootAST |
Tool.parse(String fileName,
org.antlr.runtime.CharStream in) |
GrammarRootAST |
Tool.parseGrammar(String fileName) |
GrammarRootAST |
Tool.parseGrammarFromString(String grammar) |
Modifier and Type | Method and Description |
---|---|
List<GrammarRootAST> |
Tool.sortGrammarByTokenVocab(List<String> fileNames) |
Modifier and Type | Method and Description |
---|---|
Grammar |
Tool.createGrammar(GrammarRootAST ast)
Given the raw AST of a grammar, create a grammar object
associated with the AST.
|
static GrammarAST |
Tool.findOptionValueAST(GrammarRootAST root,
String option)
Manually get option node from tree; return null if no defined.
|
Modifier and Type | Field and Description |
---|---|
GrammarRootAST |
LeftRecursiveRuleTransformer.ast |
Modifier and Type | Method and Description |
---|---|
boolean |
LeftRecursiveRuleTransformer.translateLeftRecursiveRule(GrammarRootAST ast,
LeftRecursiveRule r,
String language)
Return true if successful
|
Constructor and Description |
---|
LeftRecursiveRuleTransformer(GrammarRootAST ast,
Collection<Rule> rules,
Grammar g) |
Modifier and Type | Method and Description |
---|---|
void |
GrammarTreeVisitor.discoverGrammar(GrammarRootAST root,
GrammarAST ID) |
void |
GrammarTreeVisitor.finishGrammar(GrammarRootAST root,
GrammarAST ID) |
Modifier and Type | Method and Description |
---|---|
void |
BasicSemanticChecks.discoverGrammar(GrammarRootAST root,
GrammarAST ID) |
Modifier and Type | Field and Description |
---|---|
GrammarRootAST |
Grammar.ast |
Modifier and Type | Method and Description |
---|---|
GrammarRootAST |
GrammarTransformPipeline.extractImplicitLexer(Grammar combinedGrammar)
Build lexer grammar from combined grammar that looks like:
(COMBINED_GRAMMAR A
(tokens { X (= Y 'y'))
(OPTIONS (= x 'y'))
(@ members {foo})
(@ lexer header {package jj;})
(RULES (RULE .+)))
Move rules and actions to new tree, don't dup.
|
Modifier and Type | Method and Description |
---|---|
static Map<Integer,Interval> |
Grammar.getStateToGrammarRegionMap(GrammarRootAST ast,
IntervalSet grammarTokenTypes) |
static List<Pair<GrammarAST,GrammarAST>> |
Grammar.getStringLiteralAliasesFromLexerRules(GrammarRootAST ast)
Return list of (TOKEN_NAME node, 'literal' node) pairs
|
Constructor and Description |
---|
Grammar(Tool tool,
GrammarRootAST ast) |
LexerGrammar(Tool tool,
GrammarRootAST ast) |
Modifier and Type | Method and Description |
---|---|
GrammarRootAST |
GrammarRootAST.dupNode() |
Modifier and Type | Method and Description |
---|---|
Object |
GrammarASTVisitor.visit(GrammarRootAST node) |
Constructor and Description |
---|
GrammarRootAST(GrammarRootAST node) |
Copyright © 1992–2020 ANTLR. All rights reserved.