| 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,
java.lang.String dot) |
| Modifier and Type | Field and Description |
|---|---|
java.util.List<java.util.Set<Rule>> |
LeftRecursionDetector.listOfRecursiveCycles
Holds a list of cycles (sets of rule names).
|
java.util.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,
java.util.Set<ATNState> visitedStates)
From state s, look for any transition to a rule that is currently
being traced.
|
| Constructor and Description |
|---|
LeftRecursiveRuleTransformer(GrammarRootAST ast,
java.util.Collection<Rule> rules,
Grammar g) |
| Modifier and Type | Field and Description |
|---|---|
Rule |
ParserATNFactory.currentRule |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Triple<Rule,ATNState,ATNState>> |
ParserATNFactory.preventEpsilonClosureBlocks |
protected java.util.List<Triple<Rule,ATNState,ATNState>> |
ParserATNFactory.preventEpsilonOptionalBlocks |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ParserATNFactory._createATN(java.util.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.
|
java.lang.String |
Target.getRuleFunctionContextStructName(Rule r) |
RuleFunction |
OutputModelController.rule(Rule r) |
RuleFunction |
ParserFactory.rule(Rule r) |
RuleFunction |
BlankOutputModelFactory.rule(Rule r) |
RuleFunction |
OutputModelFactory.rule(Rule r) |
java.util.List<SrcOp> |
OutputModelController.rulePostamble(RuleFunction function,
Rule r) |
java.util.List<SrcOp> |
DefaultOutputModelFactory.rulePostamble(RuleFunction function,
Rule r) |
java.util.List<SrcOp> |
BlankOutputModelFactory.rulePostamble(RuleFunction function,
Rule r) |
java.util.List<SrcOp> |
OutputModelFactory.rulePostamble(RuleFunction function,
Rule r) |
| Modifier and Type | Field and Description |
|---|---|
Rule |
RuleFunction.rule |
| Modifier and Type | Field and Description |
|---|---|
java.util.LinkedHashMap<Rule,RuleActionFunction> |
Lexer.actionFuncs |
java.util.Collection<Rule> |
Recognizer.rules |
java.util.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,
java.lang.String ctxType) |
RuleFunction(OutputModelFactory factory,
Rule r) |
RuleSempredFunction(OutputModelFactory factory,
Rule r,
java.lang.String ctxType) |
| Modifier and Type | Method and Description |
|---|---|
void |
AltLabelStructDecl.addDispatchMethods(Rule r) |
void |
StructDecl.addDispatchMethods(Rule r) |
| Constructor and Description |
|---|
AltLabelStructDecl(OutputModelFactory factory,
Rule r,
int altNum,
java.lang.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 |
|---|---|
(package private) java.util.Map<java.lang.String,Rule> |
SymbolChecks.nameToRuleMap |
OrderedHashMap<java.lang.String,Rule> |
RuleCollector.rules |
| Modifier and Type | Method and Description |
|---|---|
Rule |
AttributeChecks.isolatedRuleRef(java.lang.String x) |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Map<Rule,java.util.Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(Grammar g)
Find all rules reachable from r directly or indirectly for all r in g
|
static java.util.Map<Rule,java.util.Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(Grammar g)
Find all rules reachable from r directly or indirectly for all r in g
|
static java.util.Map<Rule,java.util.Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(Grammar g,
java.util.Collection<Rule> rules) |
static java.util.Map<Rule,java.util.Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(Grammar g,
java.util.Collection<Rule> rules) |
static java.util.Map<Rule,java.util.Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(LexerGrammar g,
java.lang.String modeName) |
static java.util.Map<Rule,java.util.Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(LexerGrammar g,
java.lang.String modeName) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
SymbolChecks.checkDeclarationRuleConflicts(Rule r,
AttributeDict attributes,
java.util.Set<java.lang.String> ruleNames,
ErrorType errorType) |
void |
SymbolChecks.checkForAttributeConflicts(Rule r) |
void |
SymbolChecks.checkForLabelConflict(Rule r,
GrammarAST labelID) |
private void |
SymbolChecks.checkForOverlap(Grammar g,
Rule rule1,
Rule rule2,
java.util.List<java.lang.String> firstTokenStringValues,
java.util.List<java.lang.String> secondTokenStringValues)
For same rule compare values from next index:
TOKEN_WITH_SAME_VALUES: 'asdf' | 'asdf';
For different rules compare from start value:
TOKEN1: 'asdf';
TOKEN2: 'asdf';
|
private void |
SymbolChecks.checkForTypeMismatch(Rule r,
LabelElementPair prevLabelPair,
LabelElementPair labelPair) |
private void |
SymbolChecks.checkLabelPairs(Rule r,
java.util.Map<java.lang.String,LabelElementPair> labelNameSpace,
java.util.List<LabelElementPair> pairs) |
protected void |
SymbolChecks.checkLocalConflictingDeclarations(Rule r,
AttributeDict attributes,
AttributeDict referenceAttributes,
ErrorType errorType) |
private java.util.List<java.lang.String> |
SymbolChecks.getSingleTokenValues(Rule rule)
list of simple string literals for rule
|
(package private) boolean |
SemanticPipeline.hasTypeOrMoreCommand(Rule r) |
| Modifier and Type | Method and Description |
|---|---|
void |
SymbolChecks.checkForLabelConflicts(java.util.Collection<Rule> rules)
Make sure a label doesn't conflict with another symbol.
|
protected void |
SymbolChecks.checkReservedNames(java.util.Collection<Rule> rules) |
static java.util.Map<Rule,java.util.Set<Rule>> |
UseDefAnalyzer.getRuleDependencies(Grammar g,
java.util.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 |
|---|---|
java.util.List<Rule> |
Grammar.indexToRule |
MultiMap<java.lang.String,Rule> |
LexerGrammar.modes
DEFAULT_MODE rules are added first due to grammar syntax order
|
OrderedHashMap<java.lang.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(java.lang.String name) |
Rule |
Grammar.getRule(java.lang.String grammarName,
java.lang.String ruleName) |
Rule |
Rule.resolveToRule(java.lang.String x) |
Rule |
Alternative.resolveToRule(java.lang.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(java.util.Collection<? extends java.util.Collection<Rule>> cycles) |
void |
ErrorManager.leftRecursionCycles(java.lang.String fileName,
java.util.Collection<? extends java.util.Collection<Rule>> cycles) |
| Constructor and Description |
|---|
Alternative(Rule r,
int altNum) |
| Constructor and Description |
|---|
LeftRecursionCyclesMessage(java.lang.String fileName,
java.util.Collection<? extends java.util.Collection<Rule>> cycles) |