Package | Description |
---|---|
org.antlr.v4 | |
org.antlr.v4.analysis | |
org.antlr.v4.automata | |
org.antlr.v4.codegen | |
org.antlr.v4.codegen.model | |
org.antlr.v4.codegen.model.decl | |
org.antlr.v4.semantics | |
org.antlr.v4.tool |
Modifier and Type | Method and Description |
---|---|
protected void |
Tool.writeDOTFile(Grammar g,
Rule r,
String dot) |
Modifier and Type | Field and Description |
---|---|
List<Set<Rule>> |
LeftRecursionDetector.listOfRecursiveCycles
Holds a list of cycles (sets of rule names).
|
Collection<Rule> |
LeftRecursiveRuleTransformer.rules |
Modifier and Type | Method and Description |
---|---|
protected void |
LeftRecursionDetector.addRulesToCycle(Rule enclosingRule,
Rule targetRule)
enclosingRule calls targetRule.
|
boolean |
LeftRecursionDetector.check(Rule enclosingRule,
ATNState s,
Set<ATNState> visitedStates)
From state s, look for any transition to a rule that is currently
being traced.
|
Constructor and Description |
---|
LeftRecursiveRuleTransformer(GrammarRootAST ast,
Collection<Rule> rules,
Grammar g) |
Modifier and Type | Field and Description |
---|---|
Rule |
ParserATNFactory.currentRule |
Modifier and Type | Field and Description |
---|---|
protected List<Triple<Rule,ATNState,ATNState>> |
ParserATNFactory.preventEpsilonClosureBlocks |
protected List<Triple<Rule,ATNState,ATNState>> |
ParserATNFactory.preventEpsilonOptionalBlocks |
Modifier and Type | Method and Description |
---|---|
protected void |
ParserATNFactory._createATN(Collection<Rule> rules) |
Modifier and Type | Method and Description |
---|---|
void |
OutputModelController.buildLexerRuleActions(Lexer lexer,
Rule r) |
void |
OutputModelController.buildNormalRuleFunction(Rule r,
RuleFunction function) |
void |
OutputModelController.buildRuleFunction(Parser parser,
Rule r)
Create RuleFunction per rule and update sempreds,actions of parser
output object with stuff found in r.
|
String |
Target.getRuleFunctionContextStructName(Rule r) |
RuleFunction |
OutputModelController.rule(Rule r) |
RuleFunction |
BlankOutputModelFactory.rule(Rule r) |
RuleFunction |
ParserFactory.rule(Rule r) |
RuleFunction |
OutputModelFactory.rule(Rule r) |
List<SrcOp> |
OutputModelController.rulePostamble(RuleFunction function,
Rule r) |
List<SrcOp> |
BlankOutputModelFactory.rulePostamble(RuleFunction function,
Rule r) |
List<SrcOp> |
DefaultOutputModelFactory.rulePostamble(RuleFunction function,
Rule r) |
List<SrcOp> |
OutputModelFactory.rulePostamble(RuleFunction function,
Rule r) |
Modifier and Type | Field and Description |
---|---|
Rule |
RuleFunction.rule |
Modifier and Type | Field and Description |
---|---|
LinkedHashMap<Rule,RuleActionFunction> |
Lexer.actionFuncs |
Collection<Rule> |
Recognizer.rules |
LinkedHashMap<Rule,RuleSempredFunction> |
Recognizer.sempredFuncs |
Modifier and Type | Method and Description |
---|---|
void |
RuleFunction.addContextGetters(OutputModelFactory factory,
Rule r) |
void |
RuleFunction.fillNamedActions(OutputModelFactory factory,
Rule r) |
Constructor and Description |
---|
RuleActionFunction(OutputModelFactory factory,
Rule r,
String ctxType) |
RuleFunction(OutputModelFactory factory,
Rule r) |
RuleSempredFunction(OutputModelFactory factory,
Rule r,
String ctxType) |
Modifier and Type | Method and Description |
---|---|
void |
StructDecl.addDispatchMethods(Rule r) |
void |
AltLabelStructDecl.addDispatchMethods(Rule r) |
Constructor and Description |
---|
AltLabelStructDecl(OutputModelFactory factory,
Rule r,
int altNum,
String label) |
StructDecl(OutputModelFactory factory,
Rule r) |
Modifier and Type | Field and Description |
---|---|
Rule |
SymbolCollector.currentRule |
Rule |
AttributeChecks.r |
Rule |
ActionSniffer.r |
Modifier and Type | Field and Description |
---|---|
OrderedHashMap<String,Rule> |
RuleCollector.rules |
Modifier and Type | Method and Description |
---|---|
Rule |
AttributeChecks.isolatedRuleRef(String x) |
Modifier and Type | Method and Description |
---|---|
static Map<Rule,Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(Grammar g)
Find all rules reachable from r directly or indirectly for all r in g
|
static Map<Rule,Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(Grammar g)
Find all rules reachable from r directly or indirectly for all r in g
|
static Map<Rule,Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(Grammar g,
Collection<Rule> rules) |
static Map<Rule,Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(Grammar g,
Collection<Rule> rules) |
static Map<Rule,Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(LexerGrammar g,
String modeName) |
static Map<Rule,Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(LexerGrammar g,
String modeName) |
Modifier and Type | Method and Description |
---|---|
protected void |
SymbolChecks.checkDeclarationRuleConflicts(Rule r,
AttributeDict attributes,
Set<String> ruleNames,
ErrorType errorType) |
void |
SymbolChecks.checkForAttributeConflicts(Rule r) |
void |
SymbolChecks.checkForLabelConflict(Rule r,
GrammarAST labelID) |
protected void |
SymbolChecks.checkLocalConflictingDeclarations(Rule r,
AttributeDict attributes,
AttributeDict referenceAttributes,
ErrorType errorType) |
Modifier and Type | Method and Description |
---|---|
void |
SymbolChecks.checkForLabelConflicts(Collection<Rule> rules)
Make sure a label doesn't conflict with another symbol.
|
protected void |
SymbolChecks.checkReservedNames(Collection<Rule> rules) |
static Map<Rule,Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(Grammar g,
Collection<Rule> rules) |
Constructor and Description |
---|
ActionSniffer(Grammar g,
Rule r,
Alternative alt,
ActionAST node,
org.antlr.runtime.Token actionToken) |
AttributeChecks(Grammar g,
Rule r,
Alternative alt,
ActionAST node,
org.antlr.runtime.Token actionToken) |
Modifier and Type | Class and Description |
---|---|
class |
LeftRecursiveRule |
Modifier and Type | Field and Description |
---|---|
Rule |
Alternative.rule |
Modifier and Type | Field and Description |
---|---|
List<Rule> |
Grammar.indexToRule |
MultiMap<String,Rule> |
LexerGrammar.modes
DEFAULT_MODE rules are added first due to grammar syntax order
|
OrderedHashMap<String,Rule> |
Grammar.rules
All rules defined in this specific grammar, not imported.
|
Modifier and Type | Method and Description |
---|---|
Rule |
Grammar.getRule(int index) |
Rule |
Grammar.getRule(String name) |
Rule |
Grammar.getRule(String grammarName,
String ruleName) |
Rule |
Rule.resolveToRule(String x) |
Rule |
Alternative.resolveToRule(String x)
x can be ruleref or rule label.
|
Modifier and Type | Method and Description |
---|---|
boolean |
LexerGrammar.defineRule(Rule r) |
boolean |
Grammar.defineRule(Rule r)
Define the specified rule in the grammar.
|
boolean |
LexerGrammar.undefineRule(Rule r) |
boolean |
Grammar.undefineRule(Rule r)
Undefine the specified rule from this
Grammar instance. |
Modifier and Type | Method and Description |
---|---|
protected static org.antlr.runtime.Token |
LeftRecursionCyclesMessage.getStartTokenOfFirstRule(Collection<? extends Collection<Rule>> cycles) |
void |
ErrorManager.leftRecursionCycles(String fileName,
Collection<? extends Collection<Rule>> cycles) |
Constructor and Description |
---|
Alternative(Rule r,
int altNum) |
Constructor and Description |
---|
LeftRecursionCyclesMessage(String fileName,
Collection<? extends Collection<Rule>> cycles) |
Copyright © 1992–2020 ANTLR. All rights reserved.