Package org.antlr.v4.codegen.model
Class Choice
java.lang.Object
org.antlr.v4.codegen.model.OutputModelObject
org.antlr.v4.codegen.model.SrcOp
org.antlr.v4.codegen.model.RuleElement
org.antlr.v4.codegen.model.Choice
The class hierarchy underneath SrcOp is pretty deep but makes sense that,
for example LL1StarBlock is a kind of LL1Loop which is a kind of Choice.
The problem is it's impossible to figure
out how to construct one of these deeply nested objects because of the
long super constructor call chain. Instead, I decided to in-line all of
this and then look for opportunities to re-factor code into functions.
It makes sense to use a class hierarchy to share data fields, but I don't
think it makes sense to factor code using super constructors because
it has too much work to do.
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
Fields inherited from class org.antlr.v4.codegen.model.RuleElement
stateNumber
Fields inherited from class org.antlr.v4.codegen.model.SrcOp
enclosingBlock, enclosingRuleRunction, uniqueID
Fields inherited from class org.antlr.v4.codegen.model.OutputModelObject
ast, factory
-
Constructor Summary
ConstructorsConstructorDescriptionChoice
(OutputModelFactory factory, GrammarAST blkOrEbnfRootAST, List<CodeBlockForAlt> alts) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPreambleOp
(SrcOp op) getAltLookaheadAsStringLists
(IntervalSet[] altLookSets) getThrowNoViableAlt
(OutputModelFactory factory, GrammarAST blkAST, IntervalSet expecting) Methods inherited from class org.antlr.v4.codegen.model.SrcOp
getContextName, getOuterMostAltCodeBlock
-
Field Details
-
decision
public int decision -
label
-
alts
-
preamble
-
-
Constructor Details
-
Choice
-
-
Method Details
-
addPreambleOp
-
getAltLookaheadAsStringLists
-
addCodeForLookaheadTempVar
-
getThrowNoViableAlt
public ThrowNoViableAlt getThrowNoViableAlt(OutputModelFactory factory, GrammarAST blkAST, IntervalSet expecting)
-