| Modifier and Type | Field and Description |
|---|---|
org.stringtemplate.v4.STGroup |
LeftRecursiveRuleAnalyzer.codegenTemplates |
org.stringtemplate.v4.STGroup |
LeftRecursiveRuleAnalyzer.recRuleTemplates |
| Constructor and Description |
|---|
LeftFactoringRuleTransformer(GrammarRootAST ast,
Map<String,Rule> rules,
Grammar g) |
LeftFactoringRuleTransformer(GrammarRootAST ast,
Map<String,Rule> rules,
Grammar g) |
LeftFactoringRuleTransformer(GrammarRootAST ast,
Map<String,Rule> rules,
Grammar g) |
| Modifier and Type | Field and Description |
|---|---|
ATN |
ParserATNFactory.atn |
Grammar |
ParserATNFactory.g |
protected List<Tuple3<? extends Rule,? extends ATNState,? extends ATNState>> |
ParserATNFactory.preventEpsilonClosureBlocks |
protected List<Tuple3<? extends Rule,? extends ATNState,? extends ATNState>> |
ParserATNFactory.preventEpsilonOptionalBlocks |
| Modifier and Type | Method and Description |
|---|---|
ATNFactory.Handle |
ParserATNFactory._ruleRef(GrammarAST node) |
ATNFactory.Handle |
ParserATNFactory.action(ActionAST action)
Build what amounts to an epsilon transition with an action.
|
ATNFactory.Handle |
ATNFactory.action(ActionAST action)
Build what amounts to an epsilon transition with an action.
|
ATNFactory.Handle |
ParserATNFactory.action(String action) |
ATNFactory.Handle |
ATNFactory.action(String action) |
ATNFactory.Handle |
ParserATNFactory.alt(List<ATNFactory.Handle> els) |
ATNFactory.Handle |
ATNFactory.alt(List<ATNFactory.Handle> els) |
ATNFactory.Handle |
ParserATNFactory.block(BlockAST blkAST,
GrammarAST ebnfRoot,
List<ATNFactory.Handle> alts)
From
A|B|..|Z alternative block build |
ATNFactory.Handle |
ATNFactory.block(BlockAST blockAST,
GrammarAST ebnfRoot,
List<ATNFactory.Handle> alternativeGrips)
From A|B|..|Z alternative block build
o->o-A->o->o (last ATNState is blockEndATNState pointed to by all alts)
| ^
o->o-B->o--|
| |
...
|
ATNFactory.Handle |
ParserATNFactory.charSetLiteral(GrammarAST charSetAST)
[Aa] char sets not allowed in parser |
ATNFactory.Handle |
ATNFactory.charSetLiteral(GrammarAST charSetAST) |
ATN |
ParserATNFactory.createATN() |
ATN |
ATNFactory.createATN() |
ATNFactory.Handle |
ParserATNFactory.elemList(List<ATNFactory.Handle> els) |
ATNFactory.Handle |
ParserATNFactory.epsilon(GrammarAST node)
From an empty alternative build
o-e->o. |
ATNFactory.Handle |
ATNFactory.epsilon(GrammarAST node)
From an empty alternative build Grip o-e->o
|
ATNFactory.Handle |
ParserATNFactory.label(ATNFactory.Handle t) |
ATNFactory.Handle |
ATNFactory.label(ATNFactory.Handle t) |
ATNFactory.Handle |
ParserATNFactory.lexerAltCommands(ATNFactory.Handle alt,
ATNFactory.Handle cmds) |
ATNFactory.Handle |
ATNFactory.lexerAltCommands(ATNFactory.Handle alt,
ATNFactory.Handle cmds) |
ATNFactory.Handle |
ParserATNFactory.lexerCallCommand(GrammarAST ID,
GrammarAST arg) |
ATNFactory.Handle |
ATNFactory.lexerCallCommand(GrammarAST ID,
GrammarAST arg) |
ATNFactory.Handle |
ParserATNFactory.lexerCommand(GrammarAST ID) |
ATNFactory.Handle |
ATNFactory.lexerCommand(GrammarAST ID) |
ATNFactory.Handle |
ParserATNFactory.listLabel(ATNFactory.Handle t) |
ATNFactory.Handle |
ATNFactory.listLabel(ATNFactory.Handle t) |
protected ATNFactory.Handle |
ParserATNFactory.makeBlock(BlockStartState start,
BlockAST blkAST,
List<ATNFactory.Handle> alts) |
ATNState |
ParserATNFactory.newState() |
ATNState |
ATNFactory.newState() |
<T extends ATNState> |
ParserATNFactory.newState(Class<T> nodeType,
GrammarAST node) |
ATNState |
ParserATNFactory.newState(GrammarAST node) |
ATNFactory.Handle |
ParserATNFactory.optional(GrammarAST optAST,
ATNFactory.Handle blk)
From
(A)? build either: |
ATNFactory.Handle |
ATNFactory.optional(GrammarAST optAST,
ATNFactory.Handle blk)
From (A)? build either:
o--A->o
| ^
o---->|
or, if A is a block, just add an empty alt to the end of the block
|
ATNFactory.Handle |
ParserATNFactory.plus(GrammarAST plusAST,
ATNFactory.Handle blk)
From
(blk)+ build |
ATNFactory.Handle |
ATNFactory.plus(GrammarAST plusAST,
ATNFactory.Handle blk)
From (A)+ build
|---| (Transition 2 from A.right points at alt 1)
v | (follow of loop is Transition 1)
o->o-A-o->o
Meaning that the last ATNState in A points back to A's left Transition ATNState
and we add a new begin/end ATNState.
|
ATNFactory.Handle |
ParserATNFactory.range(GrammarAST a,
GrammarAST b)
Not valid for non-lexers.
|
ATNFactory.Handle |
ATNFactory.range(GrammarAST a,
GrammarAST b) |
ATNFactory.Handle |
ParserATNFactory.rule(GrammarAST ruleAST,
String name,
ATNFactory.Handle blk) |
ATNFactory.Handle |
ATNFactory.rule(GrammarAST ruleAST,
String name,
ATNFactory.Handle blk) |
ATNFactory.Handle |
ParserATNFactory.ruleRef(GrammarAST node)
For reference to rule
r, build |
ATNFactory.Handle |
ATNFactory.ruleRef(GrammarAST node)
For reference to rule r, build
o-e->(r) o
where (r) is the start of rule r and the trailing o is not linked
to from rule ref state directly (it's done thru the transition(0)
RuleClosureTransition.
|
ATNFactory.Handle |
ParserATNFactory.sempred(PredAST pred)
Build what amounts to an epsilon transition with a semantic
predicate action.
|
ATNFactory.Handle |
ATNFactory.sempred(PredAST pred)
Build what amounts to an epsilon transition with a semantic
predicate action.
|
ATNFactory.Handle |
ParserATNFactory.set(GrammarAST associatedAST,
List<GrammarAST> terminals,
boolean invert)
From set build single edge graph
o->o-set->o. |
ATNFactory.Handle |
ATNFactory.set(GrammarAST associatedAST,
List<GrammarAST> alts,
boolean invert) |
ATNFactory.Handle |
ParserATNFactory.star(GrammarAST starAST,
ATNFactory.Handle elem)
From
(blk)* build ( blk+ )? with *two* decisions, one for
entry and one for choosing alts of blk. |
ATNFactory.Handle |
ATNFactory.star(GrammarAST starAST,
ATNFactory.Handle blk)
From (A)* build
|---|
v |
o->o-A-o--o (Transition 2 from block end points at alt 1; follow is Transition 1)
| ^
o---------| (optional branch is 2nd alt of optional block containing A+)
Meaning that the last (end) ATNState in A points back to A's
left side ATNState and we add 3 new ATNStates (the
optional branch is built just like an optional subrule).
|
ATNFactory.Handle |
ParserATNFactory.stringLiteral(TerminalAST stringLiteralAST)
For a non-lexer, just build a simple token reference atom.
|
ATNFactory.Handle |
ATNFactory.stringLiteral(TerminalAST stringLiteralAST)
For a non-lexer, just build a simple token reference atom.
|
ATNFactory.Handle |
ParserATNFactory.tokenRef(TerminalAST node)
From label
A build graph o-A->o. |
ATNFactory.Handle |
ATNFactory.tokenRef(TerminalAST node) |
ATNFactory.Handle |
ParserATNFactory.wildcard(GrammarAST node)
Build an atom with all possible values in its label.
|
ATNFactory.Handle |
ATNFactory.wildcard(GrammarAST associatedAST)
Build an atom with all possible values in its label
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
ParserATNFactory._createATN(Collection<Rule> rules) |
ATNFactory.Handle |
ParserATNFactory._ruleRef(GrammarAST node) |
ATNFactory.Handle |
ParserATNFactory.action(ActionAST action)
Build what amounts to an epsilon transition with an action.
|
ATNFactory.Handle |
ATNFactory.action(ActionAST action)
Build what amounts to an epsilon transition with an action.
|
ATNFactory.Handle |
ParserATNFactory.action(String action) |
ATNFactory.Handle |
ATNFactory.action(String action) |
ATNFactory.Handle |
ParserATNFactory.alt(List<ATNFactory.Handle> els) |
ATNFactory.Handle |
ATNFactory.alt(List<ATNFactory.Handle> els) |
ATNFactory.Handle |
ParserATNFactory.block(BlockAST blkAST,
GrammarAST ebnfRoot,
List<ATNFactory.Handle> alts)
From
A|B|..|Z alternative block build |
ATNFactory.Handle |
ParserATNFactory.block(BlockAST blkAST,
GrammarAST ebnfRoot,
List<ATNFactory.Handle> alts)
From
A|B|..|Z alternative block build |
ATNFactory.Handle |
ParserATNFactory.block(BlockAST blkAST,
GrammarAST ebnfRoot,
List<ATNFactory.Handle> alts)
From
A|B|..|Z alternative block build |
ATNFactory.Handle |
ATNFactory.block(BlockAST blockAST,
GrammarAST ebnfRoot,
List<ATNFactory.Handle> alternativeGrips)
From A|B|..|Z alternative block build
o->o-A->o->o (last ATNState is blockEndATNState pointed to by all alts)
| ^
o->o-B->o--|
| |
...
|
ATNFactory.Handle |
ATNFactory.block(BlockAST blockAST,
GrammarAST ebnfRoot,
List<ATNFactory.Handle> alternativeGrips)
From A|B|..|Z alternative block build
o->o-A->o->o (last ATNState is blockEndATNState pointed to by all alts)
| ^
o->o-B->o--|
| |
...
|
ATNFactory.Handle |
ATNFactory.block(BlockAST blockAST,
GrammarAST ebnfRoot,
List<ATNFactory.Handle> alternativeGrips)
From A|B|..|Z alternative block build
o->o-A->o->o (last ATNState is blockEndATNState pointed to by all alts)
| ^
o->o-B->o--|
| |
...
|
static boolean |
ParserATNFactory.blockHasWildcardAlt(GrammarAST block)
(BLOCK (ALT .)) or (BLOCK (ALT 'a') (ALT .)). |
ATNFactory.Handle |
ParserATNFactory.charSetLiteral(GrammarAST charSetAST)
[Aa] char sets not allowed in parser |
ATNFactory.Handle |
ATNFactory.charSetLiteral(GrammarAST charSetAST) |
ATNFactory.Handle |
ParserATNFactory.elemList(List<ATNFactory.Handle> els) |
protected void |
ParserATNFactory.epsilon(ATNState a,
ATNState b) |
protected void |
ParserATNFactory.epsilon(ATNState a,
ATNState b,
boolean prepend) |
ATNFactory.Handle |
ParserATNFactory.epsilon(GrammarAST node)
From an empty alternative build
o-e->o. |
ATNFactory.Handle |
ATNFactory.epsilon(GrammarAST node)
From an empty alternative build Grip o-e->o
|
boolean |
ParserATNFactory.expectNonGreedy(BlockAST blkAST) |
protected int |
ParserATNFactory.getTokenType(GrammarAST atom) |
boolean |
ParserATNFactory.isSLLDecision(BlockAST blkAST) |
ATNFactory.Handle |
ParserATNFactory.label(ATNFactory.Handle t) |
ATNFactory.Handle |
ATNFactory.label(ATNFactory.Handle t) |
ATNFactory.Handle |
ParserATNFactory.lexerAltCommands(ATNFactory.Handle alt,
ATNFactory.Handle cmds) |
ATNFactory.Handle |
ParserATNFactory.lexerAltCommands(ATNFactory.Handle alt,
ATNFactory.Handle cmds) |
ATNFactory.Handle |
ATNFactory.lexerAltCommands(ATNFactory.Handle alt,
ATNFactory.Handle cmds) |
ATNFactory.Handle |
ATNFactory.lexerAltCommands(ATNFactory.Handle alt,
ATNFactory.Handle cmds) |
ATNFactory.Handle |
ParserATNFactory.lexerCallCommand(GrammarAST ID,
GrammarAST arg) |
ATNFactory.Handle |
ParserATNFactory.lexerCallCommand(GrammarAST ID,
GrammarAST arg) |
ATNFactory.Handle |
ATNFactory.lexerCallCommand(GrammarAST ID,
GrammarAST arg) |
ATNFactory.Handle |
ATNFactory.lexerCallCommand(GrammarAST ID,
GrammarAST arg) |
ATNFactory.Handle |
ParserATNFactory.lexerCommand(GrammarAST ID) |
ATNFactory.Handle |
ATNFactory.lexerCommand(GrammarAST ID) |
ATNFactory.Handle |
ParserATNFactory.listLabel(ATNFactory.Handle t) |
ATNFactory.Handle |
ATNFactory.listLabel(ATNFactory.Handle t) |
protected ATNFactory.Handle |
ParserATNFactory.makeBlock(BlockStartState start,
BlockAST blkAST,
List<ATNFactory.Handle> alts) |
protected ATNFactory.Handle |
ParserATNFactory.makeBlock(BlockStartState start,
BlockAST blkAST,
List<ATNFactory.Handle> alts) |
protected ATNFactory.Handle |
ParserATNFactory.makeBlock(BlockStartState start,
BlockAST blkAST,
List<ATNFactory.Handle> alts) |
<T extends ATNState> |
ParserATNFactory.newState(Class<T> nodeType,
GrammarAST node) |
static void |
ATNOptimizer.optimize(Grammar g,
ATN atn) |
static void |
ATNOptimizer.optimize(Grammar g,
ATN atn) |
ATNFactory.Handle |
ParserATNFactory.optional(GrammarAST optAST,
ATNFactory.Handle blk)
From
(A)? build either: |
ATNFactory.Handle |
ParserATNFactory.optional(GrammarAST optAST,
ATNFactory.Handle blk)
From
(A)? build either: |
ATNFactory.Handle |
ATNFactory.optional(GrammarAST optAST,
ATNFactory.Handle blk)
From (A)? build either:
o--A->o
| ^
o---->|
or, if A is a block, just add an empty alt to the end of the block
|
ATNFactory.Handle |
ATNFactory.optional(GrammarAST optAST,
ATNFactory.Handle blk)
From (A)? build either:
o--A->o
| ^
o---->|
or, if A is a block, just add an empty alt to the end of the block
|
ATNFactory.Handle |
ParserATNFactory.plus(GrammarAST plusAST,
ATNFactory.Handle blk)
From
(blk)+ build |
ATNFactory.Handle |
ParserATNFactory.plus(GrammarAST plusAST,
ATNFactory.Handle blk)
From
(blk)+ build |
ATNFactory.Handle |
ATNFactory.plus(GrammarAST plusAST,
ATNFactory.Handle blk)
From (A)+ build
|---| (Transition 2 from A.right points at alt 1)
v | (follow of loop is Transition 1)
o->o-A-o->o
Meaning that the last ATNState in A points back to A's left Transition ATNState
and we add a new begin/end ATNState.
|
ATNFactory.Handle |
ATNFactory.plus(GrammarAST plusAST,
ATNFactory.Handle blk)
From (A)+ build
|---| (Transition 2 from A.right points at alt 1)
v | (follow of loop is Transition 1)
o->o-A-o->o
Meaning that the last ATNState in A points back to A's left Transition ATNState
and we add a new begin/end ATNState.
|
ATNFactory.Handle |
ParserATNFactory.range(GrammarAST a,
GrammarAST b)
Not valid for non-lexers.
|
ATNFactory.Handle |
ParserATNFactory.range(GrammarAST a,
GrammarAST b)
Not valid for non-lexers.
|
ATNFactory.Handle |
ATNFactory.range(GrammarAST a,
GrammarAST b) |
ATNFactory.Handle |
ATNFactory.range(GrammarAST a,
GrammarAST b) |
ATNFactory.Handle |
ParserATNFactory.rule(GrammarAST ruleAST,
String name,
ATNFactory.Handle blk) |
ATNFactory.Handle |
ParserATNFactory.rule(GrammarAST ruleAST,
String name,
ATNFactory.Handle blk) |
ATNFactory.Handle |
ParserATNFactory.rule(GrammarAST ruleAST,
String name,
ATNFactory.Handle blk) |
ATNFactory.Handle |
ATNFactory.rule(GrammarAST ruleAST,
String name,
ATNFactory.Handle blk) |
ATNFactory.Handle |
ATNFactory.rule(GrammarAST ruleAST,
String name,
ATNFactory.Handle blk) |
ATNFactory.Handle |
ATNFactory.rule(GrammarAST ruleAST,
String name,
ATNFactory.Handle blk) |
ATNFactory.Handle |
ParserATNFactory.ruleRef(GrammarAST node)
For reference to rule
r, build |
ATNFactory.Handle |
ATNFactory.ruleRef(GrammarAST node)
For reference to rule r, build
o-e->(r) o
where (r) is the start of rule r and the trailing o is not linked
to from rule ref state directly (it's done thru the transition(0)
RuleClosureTransition.
|
ATNFactory.Handle |
ParserATNFactory.sempred(PredAST pred)
Build what amounts to an epsilon transition with a semantic
predicate action.
|
ATNFactory.Handle |
ATNFactory.sempred(PredAST pred)
Build what amounts to an epsilon transition with a semantic
predicate action.
|
ATNFactory.Handle |
ParserATNFactory.set(GrammarAST associatedAST,
List<GrammarAST> terminals,
boolean invert)
From set build single edge graph
o->o-set->o. |
ATNFactory.Handle |
ParserATNFactory.set(GrammarAST associatedAST,
List<GrammarAST> terminals,
boolean invert)
From set build single edge graph
o->o-set->o. |
ATNFactory.Handle |
ATNFactory.set(GrammarAST associatedAST,
List<GrammarAST> alts,
boolean invert) |
ATNFactory.Handle |
ATNFactory.set(GrammarAST associatedAST,
List<GrammarAST> alts,
boolean invert) |
void |
ParserATNFactory.setCurrentRuleName(String name) |
void |
ATNFactory.setCurrentRuleName(String name) |
ATNFactory.Handle |
ParserATNFactory.star(GrammarAST starAST,
ATNFactory.Handle elem)
From
(blk)* build ( blk+ )? with *two* decisions, one for
entry and one for choosing alts of blk. |
ATNFactory.Handle |
ParserATNFactory.star(GrammarAST starAST,
ATNFactory.Handle elem)
From
(blk)* build ( blk+ )? with *two* decisions, one for
entry and one for choosing alts of blk. |
ATNFactory.Handle |
ATNFactory.star(GrammarAST starAST,
ATNFactory.Handle blk)
From (A)* build
|---|
v |
o->o-A-o--o (Transition 2 from block end points at alt 1; follow is Transition 1)
| ^
o---------| (optional branch is 2nd alt of optional block containing A+)
Meaning that the last (end) ATNState in A points back to A's
left side ATNState and we add 3 new ATNStates (the
optional branch is built just like an optional subrule).
|
ATNFactory.Handle |
ATNFactory.star(GrammarAST starAST,
ATNFactory.Handle blk)
From (A)* build
|---|
v |
o->o-A-o--o (Transition 2 from block end points at alt 1; follow is Transition 1)
| ^
o---------| (optional branch is 2nd alt of optional block containing A+)
Meaning that the last (end) ATNState in A points back to A's
left side ATNState and we add 3 new ATNStates (the
optional branch is built just like an optional subrule).
|
ATNFactory.Handle |
ParserATNFactory.stringLiteral(TerminalAST stringLiteralAST)
For a non-lexer, just build a simple token reference atom.
|
ATNFactory.Handle |
ATNFactory.stringLiteral(TerminalAST stringLiteralAST)
For a non-lexer, just build a simple token reference atom.
|
ATNFactory.Handle |
ParserATNFactory.tokenRef(TerminalAST node)
From label
A build graph o-A->o. |
ATNFactory.Handle |
ATNFactory.tokenRef(TerminalAST node) |
void |
ATNVisitor.visit_(ATNState s,
Set<Integer> visited) |
void |
ATNVisitor.visit_(ATNState s,
Set<Integer> visited) |
void |
ATNVisitor.visit(ATNState s) |
void |
TailEpsilonRemover.visitState(ATNState p) |
void |
ATNVisitor.visitState(ATNState s) |
ATNFactory.Handle |
ParserATNFactory.wildcard(GrammarAST node)
Build an atom with all possible values in its label.
|
ATNFactory.Handle |
ATNFactory.wildcard(GrammarAST associatedAST)
Build an atom with all possible values in its label
|
| Constructor and Description |
|---|
ParserATNFactory(Grammar g) |
TailEpsilonRemover(ATN atn) |
| Modifier and Type | Field and Description |
|---|---|
Grammar |
DefaultOutputModelFactory.g |
Grammar |
CodeGenerator.g |
CodeGenerator |
DefaultOutputModelFactory.gen |
String |
CodeGenerator.language |
Tool |
CodeGenerator.tool |
| Modifier and Type | Method and Description |
|---|---|
CodeGenerator |
OutputModelFactory.getGenerator() |
Grammar |
DefaultOutputModelFactory.getGrammar() |
Target |
OutputModelFactory.getTarget() |
org.stringtemplate.v4.STGroup |
Target.getTemplates() |
static List<SrcOp> |
DefaultOutputModelFactory.list(Collection<? extends SrcOp> values) |
static List<SrcOp> |
DefaultOutputModelFactory.list(SrcOp... values) |
protected org.stringtemplate.v4.STGroup |
Target.loadTemplates() |
| Constructor and Description |
|---|
CodeGenerator(Grammar g) |
CodeGenerator(Tool tool,
Grammar g,
String language) |
CodeGenerator(Tool tool,
Grammar g,
String language) |
DefaultOutputModelFactory(CodeGenerator gen) |
| Constructor and Description |
|---|
SemPred(OutputModelFactory factory,
ActionAST ast) |
| Modifier and Type | Method and Description |
|---|---|
Future<JDialog> |
TreeViewer.open() |
protected static JDialog |
TreeViewer.showInDialog(TreeViewer viewer) |
| Modifier and Type | Method and Description |
|---|---|
static String |
Trees.toStringTree(Tree t,
TreeTextProvider nodeTextProvider)
Print out a whole tree in LISP form.
|
| Modifier and Type | Method and Description |
|---|---|
static Attribute |
ScopeParser.parseAttributeDef(ActionAST action,
Tuple2<String,Integer> decl,
Grammar g)
For decls like "String foo" or "char *foo32[]" compute the ID
and type declarations.
|
| Modifier and Type | Field and Description |
|---|---|
protected ANTLRErrorStrategy |
Parser._errHandler
The error handling strategy for the parser.
|
static VocabularyImpl |
VocabularyImpl.EMPTY_VOCABULARY
Gets an empty
Vocabulary instance. |
protected Tuple2<? extends TokenSource,CharStream> |
CommonToken.source
This is the backing field for
CommonToken.getTokenSource() and
CommonToken.getInputStream(). |
protected TokenSource |
BufferedTokenStream.tokenSource
The
TokenSource from which tokens for this stream are fetched. |
| Modifier and Type | Method and Description |
|---|---|
Token |
TokenFactory.create(int type,
String text)
Generically useful
|
Token |
TokenFactory.create(Tuple2<? extends TokenSource,CharStream> source,
int type,
String text,
int channel,
int start,
int stop,
int line,
int charPositionInLine)
This is the method used to create tokens in the lexer and in the
error handling strategy.
|
protected String |
DefaultErrorStrategy.escapeWSAndQuote(String s) |
Token |
TokenStream.get(int i)
Gets the
Token at the specified index in the stream. |
ATN |
Recognizer.getATN()
Get the
ATN used by the recognizer for prediction. |
ATN |
Parser.getATNWithBypassAlts()
The ATN with bypass alternatives is expensive to create so we create it
lazily.
|
protected BitSet |
DiagnosticErrorListener.getConflictingAlts(BitSet reportedAlts,
ATNConfigSet configs)
Computes the set of conflicting or ambiguous alternatives from a
configuration set, if that information was not already provided by the
parser.
|
Token |
Parser.getCurrentToken()
Match needs to return the current input symbol, which gets put
into the label for the associated token ref; e.g., x=ID.
|
String |
VocabularyImpl.getDisplayName(int tokenType) |
String |
Vocabulary.getDisplayName(int tokenType)
Gets the display name of a token type.
|
ANTLRErrorStrategy |
Parser.getErrorHandler() |
String |
Recognizer.getErrorHeader(RecognitionException e)
What is the error header, normally line/character position information?
|
List<? extends ANTLRErrorListener<? super Symbol>> |
Recognizer.getErrorListeners() |
protected IntervalSet |
DefaultErrorStrategy.getErrorRecoverySet(Parser recognizer) |
IntervalSet |
Parser.getExpectedTokens()
Computes the set of input symbols which could follow the current parser
state and context, as given by
Recognizer.getState() and Parser.getContext(),
respectively. |
protected IntervalSet |
DefaultErrorStrategy.getExpectedTokens(Parser recognizer) |
IntervalSet |
Parser.getExpectedTokensWithinCurrentRule() |
ATNInterpreter |
Recognizer.getInterpreter()
Get the ATN interpreter used by the recognizer for prediction.
|
protected Token |
DefaultErrorStrategy.getMissingSymbol(Parser recognizer)
Conjure up a missing token during error recovery.
|
List<ParseTreeListener> |
Parser.getParseListeners() |
Map<String,Integer> |
Recognizer.getRuleIndexMap()
Get a map from rule names to rule indexes.
|
String |
Recognizer.getSerializedATN()
If this recognizer was generated, it will have a serialized ATN
representation of the grammar.
|
String |
TokenSource.getSourceName()
Gets the name of the underlying input source.
|
String |
IntStream.getSourceName()
Gets the name of the underlying symbol source.
|
String |
UnbufferedTokenStream.getText() |
String |
TokenStream.getText()
Return the text of all tokens in the stream.
|
String |
BufferedTokenStream.getText()
Get the text of all tokens in this buffer.
|
String |
UnbufferedTokenStream.getText(Interval interval) |
String |
TokenStream.getText(Interval interval)
Return the text of all tokens within the specified
interval. |
String |
CharStream.getText(Interval interval)
This method returns the text for a range of characters within this input
stream.
|
String |
BufferedTokenStream.getText(Interval interval) |
String |
UnbufferedTokenStream.getText(Object start,
Object stop) |
String |
TokenStream.getText(Object start,
Object stop)
Return the text of all tokens in this stream between
start and
stop (inclusive). |
String |
BufferedTokenStream.getText(Object start,
Object stop) |
String |
UnbufferedTokenStream.getText(RuleContext ctx) |
String |
TokenStream.getText(RuleContext ctx)
Return the text of all tokens in the source interval of the specified
context.
|
String |
BufferedTokenStream.getText(RuleContext ctx) |
TokenFactory |
TokenSource.getTokenFactory()
Gets the
TokenFactory this token source is currently using for
creating Token objects from the input. |
TokenFactory |
ListTokenSource.getTokenFactory()
Gets the
TokenFactory this token source is currently using for
creating Token objects from the input. |
TokenSource |
TokenStream.getTokenSource()
Gets the underlying
TokenSource which provides tokens for this
stream. |
Map<String,Integer> |
Recognizer.getTokenTypeMap()
Get a map from token names to token types.
|
Vocabulary |
Recognizer.getVocabulary()
Get the vocabulary used by the recognizer.
|
Token |
TokenStream.LT(int k)
|
Token |
BufferedTokenStream.LT(int k) |
Token |
Parser.match(int ttype)
Match current input symbol against
ttype. |
Token |
Parser.matchWildcard()
Match current input symbol as a wildcard.
|
Token |
TokenSource.nextToken()
Return a
Token object from your input stream (usually a
CharStream). |
Token |
ANTLRErrorStrategy.recoverInline(Parser recognizer)
This method is called when an unexpected symbol is encountered during an
inline match operation, such as
Parser.match(int). |
| Modifier and Type | Method and Description |
|---|---|
protected void |
UnbufferedTokenStream.add(Token t) |
void |
Recognizer.addErrorListener(ANTLRErrorListener<? super Symbol> listener) |
void |
Parser.addParseListener(ParseTreeListener listener)
Registers
listener to receive events during the parsing process. |
protected void |
DefaultErrorStrategy.beginErrorCondition(Parser recognizer)
This method is called to enter error recovery mode when a recognition
exception is reported.
|
protected void |
DefaultErrorStrategy.consumeUntil(Parser recognizer,
IntervalSet set)
Consume tokens until one matches the given token set.
|
protected void |
DefaultErrorStrategy.consumeUntil(Parser recognizer,
IntervalSet set)
Consume tokens until one matches the given token set.
|
Token |
TokenFactory.create(Tuple2<? extends TokenSource,CharStream> source,
int type,
String text,
int channel,
int start,
int stop,
int line,
int charPositionInLine)
This is the method used to create tokens in the lexer and in the
error handling strategy.
|
protected void |
DefaultErrorStrategy.endErrorCondition(Parser recognizer)
This method is called to leave error recovery mode after recovering from
a recognition exception.
|
void |
Parser.enterRule(ParserRuleContext localctx,
int state,
int ruleIndex)
Always called by generated parsers upon entry to a rule.
|
protected String |
DefaultErrorStrategy.escapeWSAndQuote(String s) |
protected BitSet |
DiagnosticErrorListener.getConflictingAlts(BitSet reportedAlts,
ATNConfigSet configs)
Computes the set of conflicting or ambiguous alternatives from a
configuration set, if that information was not already provided by the
parser.
|
protected <T extends Token> |
DiagnosticErrorListener.getDecisionDescription(Parser recognizer,
DFA dfa) |
protected <T extends Token> |
DiagnosticErrorListener.getDecisionDescription(Parser recognizer,
DFA dfa) |
String |
Recognizer.getErrorHeader(RecognitionException e)
What is the error header, normally line/character position information?
|
protected IntervalSet |
DefaultErrorStrategy.getErrorRecoverySet(Parser recognizer) |
protected IntervalSet |
DefaultErrorStrategy.getExpectedTokens(Parser recognizer) |
protected Token |
DefaultErrorStrategy.getMissingSymbol(Parser recognizer)
Conjure up a missing token during error recovery.
|
protected String |
DefaultErrorStrategy.getSymbolText(Token symbol) |
protected int |
DefaultErrorStrategy.getSymbolType(Token symbol) |
String |
TokenStream.getText(Interval interval)
Return the text of all tokens within the specified
interval. |
String |
CharStream.getText(Interval interval)
This method returns the text for a range of characters within this input
stream.
|
String |
TokenStream.getText(RuleContext ctx)
Return the text of all tokens in the source interval of the specified
context.
|
boolean |
ANTLRErrorStrategy.inErrorRecoveryMode(Parser recognizer)
Tests whether or not
recognizer is in the process of recovering
from an error. |
void |
ANTLRFileStream.load(String fileName,
String encoding)
Deprecated.
|
protected void |
DefaultErrorStrategy.notifyErrorListeners(Parser recognizer,
String message,
RecognitionException e) |
void |
Parser.notifyErrorListeners(String msg) |
void |
Parser.notifyErrorListeners(Token offendingToken,
String msg,
RecognitionException e) |
void |
Parser.notifyErrorListeners(Token offendingToken,
String msg,
RecognitionException e) |
void |
ANTLRErrorStrategy.recover(Parser recognizer,
RecognitionException e)
This method is called to recover from exception
e. |
void |
ANTLRErrorStrategy.recover(Parser recognizer,
RecognitionException e)
This method is called to recover from exception
e. |
Token |
ANTLRErrorStrategy.recoverInline(Parser recognizer)
This method is called when an unexpected symbol is encountered during an
inline match operation, such as
Parser.match(int). |
void |
Recognizer.removeErrorListener(ANTLRErrorListener<? super Symbol> listener) |
void |
ParserErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs)
This method is called by the parser when a full-context prediction
results in an ambiguity.
|
void |
ParserErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs)
This method is called by the parser when a full-context prediction
results in an ambiguity.
|
void |
ParserErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs)
This method is called by the parser when a full-context prediction
results in an ambiguity.
|
void |
DiagnosticErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
DiagnosticErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
BaseErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
BaseErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
BaseErrorListener.reportAmbiguity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
void |
ParserErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
SimulatorState conflictState)
This method is called when an SLL conflict occurs and the parser is about
to use the full context information to make an LL decision.
|
void |
ParserErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
SimulatorState conflictState)
This method is called when an SLL conflict occurs and the parser is about
to use the full context information to make an LL decision.
|
void |
ParserErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
SimulatorState conflictState)
This method is called when an SLL conflict occurs and the parser is about
to use the full context information to make an LL decision.
|
void |
DiagnosticErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
SimulatorState conflictState) |
void |
DiagnosticErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
SimulatorState conflictState) |
void |
DiagnosticErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
SimulatorState conflictState) |
void |
BaseErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
SimulatorState conflictState) |
void |
BaseErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
SimulatorState conflictState) |
void |
BaseErrorListener.reportAttemptingFullContext(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
SimulatorState conflictState) |
void |
ParserErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
SimulatorState acceptState)
This method is called by the parser when a full-context prediction has a
unique result.
|
void |
ParserErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
SimulatorState acceptState)
This method is called by the parser when a full-context prediction has a
unique result.
|
void |
ParserErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
SimulatorState acceptState)
This method is called by the parser when a full-context prediction has a
unique result.
|
void |
DiagnosticErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
SimulatorState acceptState) |
void |
DiagnosticErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
SimulatorState acceptState) |
void |
DiagnosticErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
SimulatorState acceptState) |
void |
BaseErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
SimulatorState acceptState) |
void |
BaseErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
SimulatorState acceptState) |
void |
BaseErrorListener.reportContextSensitivity(Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
SimulatorState acceptState) |
void |
ANTLRErrorStrategy.reportError(Parser recognizer,
RecognitionException e)
Report any kind of
RecognitionException. |
void |
ANTLRErrorStrategy.reportError(Parser recognizer,
RecognitionException e)
Report any kind of
RecognitionException. |
protected void |
DefaultErrorStrategy.reportFailedPredicate(Parser recognizer,
FailedPredicateException e)
This is called by
DefaultErrorStrategy.reportError(org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.RecognitionException) when the exception is a
FailedPredicateException. |
protected void |
DefaultErrorStrategy.reportFailedPredicate(Parser recognizer,
FailedPredicateException e)
This is called by
DefaultErrorStrategy.reportError(org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.RecognitionException) when the exception is a
FailedPredicateException. |
protected void |
DefaultErrorStrategy.reportInputMismatch(Parser recognizer,
InputMismatchException e)
This is called by
DefaultErrorStrategy.reportError(org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.RecognitionException) when the exception is an
InputMismatchException. |
protected void |
DefaultErrorStrategy.reportInputMismatch(Parser recognizer,
InputMismatchException e)
This is called by
DefaultErrorStrategy.reportError(org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.RecognitionException) when the exception is an
InputMismatchException. |
void |
ANTLRErrorStrategy.reportMatch(Parser recognizer)
This method is called by when the parser successfully matches an input
symbol.
|
protected void |
DefaultErrorStrategy.reportMissingToken(Parser recognizer)
This method is called to report a syntax error which requires the
insertion of a missing token into the input stream.
|
protected void |
DefaultErrorStrategy.reportNoViableAlternative(Parser recognizer,
NoViableAltException e)
This is called by
DefaultErrorStrategy.reportError(org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.RecognitionException) when the exception is a
NoViableAltException. |
protected void |
DefaultErrorStrategy.reportNoViableAlternative(Parser recognizer,
NoViableAltException e)
This is called by
DefaultErrorStrategy.reportError(org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.RecognitionException) when the exception is a
NoViableAltException. |
protected void |
DefaultErrorStrategy.reportUnwantedToken(Parser recognizer)
This method is called to report a syntax error which requires the removal
of a token from the input stream.
|
void |
ANTLRErrorStrategy.reset(Parser recognizer)
Reset the error handler state for the specified
recognizer. |
void |
Parser.setErrorHandler(ANTLRErrorStrategy handler) |
void |
Recognizer.setInterpreter(ATNInterpreter interpreter)
Set the ATN interpreter used by the recognizer for prediction.
|
void |
TokenSource.setTokenFactory(TokenFactory factory)
Set the
TokenFactory this token source should use for creating
Token objects from the input. |
void |
ListTokenSource.setTokenFactory(TokenFactory factory)
Set the
TokenFactory this token source should use for creating
Token objects from the input. |
protected Token |
DefaultErrorStrategy.singleTokenDeletion(Parser recognizer)
This method implements the single-token deletion inline error recovery
strategy.
|
protected boolean |
DefaultErrorStrategy.singleTokenInsertion(Parser recognizer)
This method implements the single-token insertion inline error recovery
strategy.
|
void |
ANTLRErrorStrategy.sync(Parser recognizer)
This method provides the error handler with an opportunity to handle
syntactic or semantic errors in the input stream before they result in a
RecognitionException. |
<T extends Token> |
BaseErrorListener.syntaxError(Recognizer<T,?> recognizer,
T offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e) |
<T extends Token> |
BaseErrorListener.syntaxError(Recognizer<T,?> recognizer,
T offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e) |
<T extends Symbol> |
ProxyErrorListener.syntaxError(Recognizer<T,?> recognizer,
T offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e) |
<T extends Symbol> |
ProxyErrorListener.syntaxError(Recognizer<T,?> recognizer,
T offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e) |
<T extends Symbol> |
ANTLRErrorListener.syntaxError(Recognizer<T,?> recognizer,
T offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e)
Upon syntax error, notify any interested parties.
|
<T extends Symbol> |
ANTLRErrorListener.syntaxError(Recognizer<T,?> recognizer,
T offendingSymbol,
int line,
int charPositionInLine,
String msg,
RecognitionException e)
Upon syntax error, notify any interested parties.
|
| Constructor and Description |
|---|
ANTLRFileStream(String fileName)
Deprecated.
|
ANTLRFileStream(String fileName,
String encoding)
Deprecated.
|
BufferedTokenStream(TokenSource tokenSource) |
CommonToken(Token oldToken)
Constructs a new
CommonToken as a copy of another Token. |
CommonToken(Tuple2<? extends TokenSource,CharStream> source,
int type,
int channel,
int start,
int stop) |
CommonTokenStream(TokenSource tokenSource)
Constructs a new
CommonTokenStream using the specified token
source and the default token channel (Token.DEFAULT_CHANNEL). |
CommonTokenStream(TokenSource tokenSource,
int channel)
Constructs a new
CommonTokenStream using the specified token
source and filtering tokens to the specified channel. |
FailedPredicateException(Parser recognizer) |
FailedPredicateException(Parser recognizer,
String predicate) |
FailedPredicateException(Parser recognizer,
String predicate,
String message) |
InputMismatchException(Parser recognizer) |
LexerInterpreter(String grammarFileName,
Vocabulary vocabulary,
Collection<String> ruleNames,
Collection<String> modeNames,
ATN atn,
CharStream input)
Deprecated.
|
LexerInterpreter(String grammarFileName,
Vocabulary vocabulary,
Collection<String> ruleNames,
Collection<String> channelNames,
Collection<String> modeNames,
ATN atn,
CharStream input) |
LexerNoViableAltException(Lexer lexer,
CharStream input,
int startIndex,
ATNConfigSet deadEndConfigs) |
ListTokenSource(List<? extends Token> tokens)
Constructs a new
ListTokenSource instance from the specified
collection of Token objects. |
ListTokenSource(List<? extends Token> tokens,
String sourceName)
Constructs a new
ListTokenSource instance from the specified
collection of Token objects and source name. |
NoViableAltException(Parser recognizer) |
NoViableAltException(Recognizer<Token,?> recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
NoViableAltException(Recognizer<Token,?> recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
NoViableAltException(Recognizer<Token,?> recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
NoViableAltException(Recognizer<Token,?> recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
NoViableAltException(Recognizer<Token,?> recognizer,
TokenStream input,
Token startToken,
Token offendingToken,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx) |
ParserInterpreter(ParserInterpreter old)
A copy constructor that creates a new parser interpreter by reusing
the fields of a previous interpreter.
|
ParserInterpreter(String grammarFileName,
Vocabulary vocabulary,
Collection<String> ruleNames,
ATN atn,
TokenStream input) |
| Modifier and Type | Field and Description |
|---|---|
ATN |
LL1Analyzer.atn |
ATN |
ATNSimulator.atn |
DFA[] |
ATN.decisionToDFA |
List<DecisionState> |
ATN.decisionToState
Each subrule/rule is a decision point and we must track them so we
can go back later and build DFA predictors for them.
|
static PredictionContext |
PredictionContext.EMPTY_FULL |
static PredictionContext |
PredictionContext.EMPTY_LOCAL |
static DFAState |
ATNSimulator.ERROR
Must distinguish between missing edge and edge we know leads nowhere
|
ATNState |
RuleTransition.followState
What node to begin computations following ref to rule
|
TokenStream |
DecisionEventInfo.input
The input token stream which is being parsed.
|
Map<String,TokensStartState> |
ATN.modeNameToStartState |
DFA[] |
ATN.modeToDFA |
List<TokensStartState> |
ATN.modeToStartState |
SemanticContext[] |
SemanticContext.AND.opnds |
SemanticContext[] |
SemanticContext.OR.opnds |
PredictionContext |
SingletonPredictionContext.parent |
PredictionContext[] |
ArrayPredictionContext.parents |
protected LexerATNSimulator.SimState |
LexerATNSimulator.prevAccept
Used during DFA/ATN exec to record the most recent accept configuration info
|
int[] |
ArrayPredictionContext.returnStates |
IntervalSet |
SetTransition.set |
List<ATNState> |
ATN.states |
ATNState |
Transition.target
The target of this transition.
|
| Modifier and Type | Method and Description |
|---|---|
protected ATNConfig |
ParserATNSimulator.actionTransition(ATNConfig config,
ActionTransition t) |
protected DFAState |
ParserATNSimulator.addDFAContextState(DFA dfa,
ATNConfigSet configs,
int returnContext,
PredictionContextCache contextCache)
See comment on LexerInterpreter.addDFAState.
|
protected DFAState |
ParserATNSimulator.addDFAEdge(DFA dfa,
DFAState fromState,
int t,
IntegerList contextTransitions,
ATNConfigSet toConfigs,
PredictionContextCache contextCache) |
protected DFAState |
LexerATNSimulator.addDFAEdge(DFAState from,
int t,
ATNConfigSet q) |
protected DFAState |
LexerATNSimulator.addDFAState(ATNConfigSet configs)
Add a new DFA state if there isn't one with this set of
configurations already.
|
protected DFAState |
ParserATNSimulator.addDFAState(DFA dfa,
ATNConfigSet configs,
PredictionContextCache contextCache)
See comment on LexerInterpreter.addDFAState.
|
static LexerActionExecutor |
LexerActionExecutor.append(LexerActionExecutor lexerActionExecutor,
LexerAction lexerAction)
Creates a
LexerActionExecutor which executes the actions for
the input lexerActionExecutor followed by a specified
lexerAction. |
protected ATNConfigSet |
ParserATNSimulator.applyPrecedenceFilter(ATNConfigSet configs,
ParserRuleContext globalContext,
PredictionContextCache contextCache)
This method transforms the start state computed by
ParserATNSimulator.computeStartState(org.antlr.v4.runtime.dfa.DFA, org.antlr.v4.runtime.ParserRuleContext, boolean) to the special start state used by a
precedence DFA for a particular precedence value. |
protected ATNConfigSet |
LexerATNSimulator.computeStartState(CharStream input,
ATNState p) |
protected SimulatorState |
ParserATNSimulator.computeStartState(DFA dfa,
ParserRuleContext globalContext,
boolean useContext) |
protected DFAState |
LexerATNSimulator.computeTargetState(CharStream input,
DFAState s,
int t)
Compute a target state for an edge in the DFA, and attempt to add the
computed state and corresponding edge to the DFA.
|
protected Tuple2<DFAState,ParserRuleContext> |
ParserATNSimulator.computeTargetState(DFA dfa,
DFAState s,
ParserRuleContext remainingGlobalContext,
int t,
boolean useContext,
PredictionContextCache contextCache)
Compute a target state for an edge in the DFA, and attempt to add the
computed state and corresponding edge to the DFA.
|
protected DFAState |
ParserATNSimulator.createDFAState(DFA dfa,
ATNConfigSet configs) |
static Transition |
ATNSimulator.edgeFactory(ATN atn,
int type,
int src,
int trg,
int arg1,
int arg2,
int arg3,
List<IntervalSet> sets)
|
protected Transition |
ATNDeserializer.edgeFactory(ATN atn,
int type,
int src,
int trg,
int arg1,
int arg2,
int arg3,
List<IntervalSet> sets) |
LexerAction |
LexerIndexedCustomAction.getAction()
Gets the lexer action to execute.
|
LexerActionType |
LexerAction.getActionType()
Gets the serialization type of the lexer action.
|
static BitSet |
PredictionMode.getAlts(ATNConfigSet configs)
Get union of all alts from configs.
|
BitSet |
AmbiguityInfo.getAmbiguousAlternatives()
Gets the set of alternatives in the decision that lead to a valid parse.
|
static Collection<BitSet> |
PredictionMode.getConflictingAltSubsets(ATNConfigSet configs)
This function gets the conflicting alt subsets from a configuration set.
|
PredictionContext |
ATNConfig.getContext() |
DecisionInfo[] |
ParseInfo.getDecisionInfo()
Gets an array of
DecisionInfo instances containing the profiling
information gathered for each decision in the ATN. |
static ATNDeserializationOptions |
ATNDeserializationOptions.getDefaultOptions() |
DFA |
LexerATNSimulator.getDFA(int mode) |
IntervalSet |
ATN.getExpectedTokens(int stateNumber,
RuleContext context)
Computes the set of input symbols which could follow ATN state number
stateNumber in the specified full context. |
LexerAction[] |
LexerActionExecutor.getLexerActions()
Gets the lexer actions to be executed by this executor.
|
List<Integer> |
ParseInfo.getLLDecisions()
Gets the decision numbers for decisions that required one or more
full-context predictions during parsing.
|
abstract Collection<SemanticContext> |
SemanticContext.Operator.getOperands()
Gets the operands for the semantic context operator.
|
abstract PredictionContext |
PredictionContext.getParent(int index) |
PredictionMode |
ParserATNSimulator.getPredictionMode() |
BitSet |
ATNConfigSet.getRepresentedAlternatives()
Get the set of all alternatives represented by configurations in this
set.
|
String |
ParserATNSimulator.getRuleName(int index) |
SemanticContext |
ATNConfig.getSemanticContext() |
ATNState |
ATNConfig.getState()
Gets the ATN state associated with this configuration
|
static Map<ATNState,BitSet> |
PredictionMode.getStateToAltMap(ATNConfigSet configs)
Get a map from state to alt subset from a configuration set.
|
String |
LexerATNSimulator.getText(CharStream input)
Get the text matched so far for the current token.
|
String |
ParserATNSimulator.getTokenName(int t) |
String |
LexerATNSimulator.getTokenName(int t) |
IntervalSet |
SetTransition.label() |
IntervalSet |
RangeTransition.label() |
IntervalSet |
AtomTransition.label() |
IntervalSet |
LL1Analyzer.LOOK(ATNState s,
ATNState stopState,
PredictionContext ctx)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
IntervalSet |
LL1Analyzer.LOOK(ATNState s,
PredictionContext ctx)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
IntervalSet |
ATN.nextTokens(ATNState s)
Compute the set of valid tokens that can occur starting in
s and
staying in same rule. |
IntervalSet |
ATN.nextTokens(ATNState s,
PredictionContext ctx)
Compute the set of valid tokens that can occur starting in state
s. |
protected NoViableAltException |
ParserATNSimulator.noViableAlt(TokenStream input,
ParserRuleContext outerContext,
ATNConfigSet configs,
int startIndex) |
protected ATNConfigSet |
ParserATNSimulator.removeAllConfigsNotInRuleStopState(ATNConfigSet configs,
PredictionContextCache contextCache)
Return a configuration set containing only the configurations from
configs which are in a RuleStopState. |
protected ATNConfig |
ParserATNSimulator.ruleTransition(ATNConfig config,
RuleTransition t,
PredictionContextCache contextCache) |
String |
WildcardTransition.toString() |
String |
SetTransition.toString() |
String |
RangeTransition.toString() |
String |
PredicateTransition.toString() |
String |
EpsilonTransition.toString() |
String |
AtomTransition.toString() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
LL1Analyzer._LOOK(ATNState s,
ATNState stopState,
PredictionContext ctx,
IntervalSet look,
Set<ATNConfig> lookBusy,
BitSet calledRuleStack,
boolean seeThruPreds,
boolean addEOF)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
protected void |
LL1Analyzer._LOOK(ATNState s,
ATNState stopState,
PredictionContext ctx,
IntervalSet look,
Set<ATNConfig> lookBusy,
BitSet calledRuleStack,
boolean seeThruPreds,
boolean addEOF)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
protected void |
LL1Analyzer._LOOK(ATNState s,
ATNState stopState,
PredictionContext ctx,
IntervalSet look,
Set<ATNConfig> lookBusy,
BitSet calledRuleStack,
boolean seeThruPreds,
boolean addEOF)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
protected void |
LL1Analyzer._LOOK(ATNState s,
ATNState stopState,
PredictionContext ctx,
IntervalSet look,
Set<ATNConfig> lookBusy,
BitSet calledRuleStack,
boolean seeThruPreds,
boolean addEOF)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
protected void |
LL1Analyzer._LOOK(ATNState s,
ATNState stopState,
PredictionContext ctx,
IntervalSet look,
Set<ATNConfig> lookBusy,
BitSet calledRuleStack,
boolean seeThruPreds,
boolean addEOF)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
protected void |
LexerATNSimulator.accept(CharStream input,
LexerActionExecutor lexerActionExecutor,
int startIndex,
int index,
int line,
int charPos) |
protected ATNConfig |
ParserATNSimulator.actionTransition(ATNConfig config,
ActionTransition t) |
protected ATNConfig |
ParserATNSimulator.actionTransition(ATNConfig config,
ActionTransition t) |
int |
ParserATNSimulator.adaptivePredict(TokenStream input,
int decision,
ParserRuleContext outerContext) |
int |
ParserATNSimulator.adaptivePredict(TokenStream input,
int decision,
ParserRuleContext outerContext,
boolean useContext) |
protected DFAState |
ParserATNSimulator.addDFAContextState(DFA dfa,
ATNConfigSet configs,
int returnContext,
PredictionContextCache contextCache)
See comment on LexerInterpreter.addDFAState.
|
protected DFAState |
ParserATNSimulator.addDFAContextState(DFA dfa,
ATNConfigSet configs,
int returnContext,
PredictionContextCache contextCache)
See comment on LexerInterpreter.addDFAState.
|
protected DFAState |
ParserATNSimulator.addDFAEdge(DFA dfa,
DFAState fromState,
int t,
IntegerList contextTransitions,
ATNConfigSet toConfigs,
PredictionContextCache contextCache) |
protected DFAState |
ParserATNSimulator.addDFAEdge(DFA dfa,
DFAState fromState,
int t,
IntegerList contextTransitions,
ATNConfigSet toConfigs,
PredictionContextCache contextCache) |
protected DFAState |
ParserATNSimulator.addDFAEdge(DFA dfa,
DFAState fromState,
int t,
IntegerList contextTransitions,
ATNConfigSet toConfigs,
PredictionContextCache contextCache) |
protected DFAState |
LexerATNSimulator.addDFAEdge(DFAState from,
int t,
ATNConfigSet q) |
protected DFAState |
LexerATNSimulator.addDFAEdge(DFAState from,
int t,
ATNConfigSet q) |
protected void |
LexerATNSimulator.addDFAEdge(DFAState p,
int t,
DFAState q) |
protected void |
LexerATNSimulator.addDFAEdge(DFAState p,
int t,
DFAState q) |
protected DFAState |
LexerATNSimulator.addDFAState(ATNConfigSet configs)
Add a new DFA state if there isn't one with this set of
configurations already.
|
protected DFAState |
ParserATNSimulator.addDFAState(DFA dfa,
ATNConfigSet configs,
PredictionContextCache contextCache)
See comment on LexerInterpreter.addDFAState.
|
protected DFAState |
ParserATNSimulator.addDFAState(DFA dfa,
ATNConfigSet configs,
PredictionContextCache contextCache)
See comment on LexerInterpreter.addDFAState.
|
static boolean |
PredictionMode.allConfigsInRuleStopStates(ATNConfigSet configs)
Checks if all configurations in
configs are in a
RuleStopState. |
static boolean |
PredictionMode.allSubsetsConflict(Collection<BitSet> altsets)
Determines if every alternative subset in
altsets contains more
than one alternative. |
static boolean |
PredictionMode.allSubsetsEqual(Collection<BitSet> altsets)
Determines if every alternative subset in
altsets is equivalent. |
static LexerActionExecutor |
LexerActionExecutor.append(LexerActionExecutor lexerActionExecutor,
LexerAction lexerAction)
Creates a
LexerActionExecutor which executes the actions for
the input lexerActionExecutor followed by a specified
lexerAction. |
protected ATNConfigSet |
ParserATNSimulator.applyPrecedenceFilter(ATNConfigSet configs,
ParserRuleContext globalContext,
PredictionContextCache contextCache)
This method transforms the start state computed by
ParserATNSimulator.computeStartState(org.antlr.v4.runtime.dfa.DFA, org.antlr.v4.runtime.ParserRuleContext, boolean) to the special start state used by a
precedence DFA for a particular precedence value. |
protected void |
LexerATNSimulator.captureSimState(LexerATNSimulator.SimState settings,
CharStream input,
DFAState dfaState) |
protected void |
LexerATNSimulator.captureSimState(LexerATNSimulator.SimState settings,
CharStream input,
DFAState dfaState) |
protected void |
LexerATNSimulator.captureSimState(LexerATNSimulator.SimState settings,
CharStream input,
DFAState dfaState) |
protected void |
ParserATNSimulator.closure(ATNConfig config,
ATNConfigSet configs,
ATNConfigSet intermediate,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean hasMoreContexts,
PredictionContextCache contextCache,
int depth,
boolean treatEofAsEpsilon) |
protected void |
ParserATNSimulator.closure(ATNConfig config,
ATNConfigSet configs,
ATNConfigSet intermediate,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean hasMoreContexts,
PredictionContextCache contextCache,
int depth,
boolean treatEofAsEpsilon) |
protected void |
ParserATNSimulator.closure(ATNConfig config,
ATNConfigSet configs,
ATNConfigSet intermediate,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean hasMoreContexts,
PredictionContextCache contextCache,
int depth,
boolean treatEofAsEpsilon) |
protected void |
ParserATNSimulator.closure(ATNConfig config,
ATNConfigSet configs,
ATNConfigSet intermediate,
Set<ATNConfig> closureBusy,
boolean collectPredicates,
boolean hasMoreContexts,
PredictionContextCache contextCache,
int depth,
boolean treatEofAsEpsilon) |
protected void |
ParserATNSimulator.closure(ATNConfigSet sourceConfigs,
ATNConfigSet configs,
boolean collectPredicates,
boolean hasMoreContext,
PredictionContextCache contextCache,
boolean treatEofAsEpsilon) |
protected boolean |
LexerATNSimulator.closure(CharStream input,
ATNConfig config,
ATNConfigSet configs,
boolean currentAltReachedAcceptState,
boolean speculative,
boolean treatEofAsEpsilon)
Since the alternatives within any lexer decision are ordered by
preference, this method stops pursuing the closure as soon as an accept
state is reached.
|
protected boolean |
LexerATNSimulator.closure(CharStream input,
ATNConfig config,
ATNConfigSet configs,
boolean currentAltReachedAcceptState,
boolean speculative,
boolean treatEofAsEpsilon)
Since the alternatives within any lexer decision are ordered by
preference, this method stops pursuing the closure as soon as an accept
state is reached.
|
protected boolean |
LexerATNSimulator.closure(CharStream input,
ATNConfig config,
ATNConfigSet configs,
boolean currentAltReachedAcceptState,
boolean speculative,
boolean treatEofAsEpsilon)
Since the alternatives within any lexer decision are ordered by
preference, this method stops pursuing the closure as soon as an accept
state is reached.
|
protected ATNConfigSet |
LexerATNSimulator.computeStartState(CharStream input,
ATNState p) |
protected ATNConfigSet |
LexerATNSimulator.computeStartState(CharStream input,
ATNState p) |
protected DFAState |
LexerATNSimulator.computeTargetState(CharStream input,
DFAState s,
int t)
Compute a target state for an edge in the DFA, and attempt to add the
computed state and corresponding edge to the DFA.
|
protected DFAState |
LexerATNSimulator.computeTargetState(CharStream input,
DFAState s,
int t)
Compute a target state for an edge in the DFA, and attempt to add the
computed state and corresponding edge to the DFA.
|
protected Tuple2<DFAState,ParserRuleContext> |
ParserATNSimulator.computeTargetState(DFA dfa,
DFAState s,
ParserRuleContext remainingGlobalContext,
int t,
boolean useContext,
PredictionContextCache contextCache)
Compute a target state for an edge in the DFA, and attempt to add the
computed state and corresponding edge to the DFA.
|
protected Tuple2<DFAState,ParserRuleContext> |
ParserATNSimulator.computeTargetState(DFA dfa,
DFAState s,
ParserRuleContext remainingGlobalContext,
int t,
boolean useContext,
PredictionContextCache contextCache)
Compute a target state for an edge in the DFA, and attempt to add the
computed state and corresponding edge to the DFA.
|
protected boolean |
ParserATNSimulator.configWithAltAtStopState(Collection<ATNConfig> configs,
int alt) |
void |
LexerATNSimulator.consume(CharStream input) |
void |
LexerATNSimulator.copyState(LexerATNSimulator simulator) |
static ATNConfig |
ATNConfig.create(ATNState state,
int alt,
PredictionContext context) |
static ATNConfig |
ATNConfig.create(ATNState state,
int alt,
PredictionContext context,
SemanticContext semanticContext) |
static ATNConfig |
ATNConfig.create(ATNState state,
int alt,
PredictionContext context,
SemanticContext semanticContext) |
static ATNConfig |
ATNConfig.create(ATNState state,
int alt,
PredictionContext context,
SemanticContext semanticContext,
LexerActionExecutor lexerActionExecutor) |
static ATNConfig |
ATNConfig.create(ATNState state,
int alt,
PredictionContext context,
SemanticContext semanticContext,
LexerActionExecutor lexerActionExecutor) |
protected DFAState |
ParserATNSimulator.createDFAState(DFA dfa,
ATNConfigSet configs) |
protected DFAState |
ParserATNSimulator.createDFAState(DFA dfa,
ATNConfigSet configs) |
int |
ATN.defineDecisionState(DecisionState s) |
void |
ATN.defineMode(String name,
TokensStartState s) |
void |
ATN.defineMode(String name,
TokensStartState s) |
static ATN |
ATNSimulator.deserialize(char[] data)
Deprecated.
Use
ATNDeserializer.deserialize(char[]) instead. |
ATN |
ATNDeserializer.deserialize(char[] data) |
void |
ParserATNSimulator.dumpDeadEndConfigs(NoViableAltException nvae) |
static Transition |
ATNSimulator.edgeFactory(ATN atn,
int type,
int src,
int trg,
int arg1,
int arg2,
int arg3,
List<IntervalSet> sets)
|
protected Transition |
ATNDeserializer.edgeFactory(ATN atn,
int type,
int src,
int trg,
int arg1,
int arg2,
int arg3,
List<IntervalSet> sets) |
protected BitSet |
ParserATNSimulator.evalSemanticContext(DFAState.PredPrediction[] predPredictions,
ParserRuleContext outerContext,
boolean complete)
Look through a list of predicate/alt pairs, returning alts for the
pairs that win.
|
protected boolean |
ParserATNSimulator.evalSemanticContext(SemanticContext pred,
ParserRuleContext parserCallStack,
int alt)
Evaluate a semantic context within a specific parser context.
|
protected boolean |
LexerATNSimulator.evaluatePredicate(CharStream input,
int ruleIndex,
int predIndex,
boolean speculative)
Evaluate a predicate specified in the lexer.
|
protected int |
LexerATNSimulator.execATN(CharStream input,
DFAState ds0) |
protected int |
LexerATNSimulator.execATN(CharStream input,
DFAState ds0) |
protected int |
ParserATNSimulator.execATN(DFA dfa,
TokenStream input,
int startIndex,
SimulatorState initialState)
Performs ATN simulation to compute a predicted alternative based
upon the remaining input, but also updates the DFA cache to avoid
having to traverse the ATN again for the same input sequence.
|
protected int |
ParserATNSimulator.execATN(DFA dfa,
TokenStream input,
int startIndex,
SimulatorState initialState)
Performs ATN simulation to compute a predicted alternative based
upon the remaining input, but also updates the DFA cache to avoid
having to traverse the ATN again for the same input sequence.
|
protected int |
ParserATNSimulator.execATN(DFA dfa,
TokenStream input,
int startIndex,
SimulatorState initialState)
Performs ATN simulation to compute a predicted alternative based
upon the remaining input, but also updates the DFA cache to avoid
having to traverse the ATN again for the same input sequence.
|
protected int |
ParserATNSimulator.execDFA(DFA dfa,
TokenStream input,
int startIndex,
SimulatorState state) |
protected int |
ParserATNSimulator.execDFA(DFA dfa,
TokenStream input,
int startIndex,
SimulatorState state) |
protected int |
ParserATNSimulator.execDFA(DFA dfa,
TokenStream input,
int startIndex,
SimulatorState state) |
void |
LexerTypeAction.execute(Lexer lexer)
Execute the lexer action in the context of the specified
Lexer. |
void |
LexerSkipAction.execute(Lexer lexer)
Execute the lexer action in the context of the specified
Lexer. |
void |
LexerPushModeAction.execute(Lexer lexer)
Execute the lexer action in the context of the specified
Lexer. |
void |
LexerPopModeAction.execute(Lexer lexer)
Execute the lexer action in the context of the specified
Lexer. |
void |
LexerMoreAction.execute(Lexer lexer)
Execute the lexer action in the context of the specified
Lexer. |
void |
LexerModeAction.execute(Lexer lexer)
Execute the lexer action in the context of the specified
Lexer. |
void |
LexerCustomAction.execute(Lexer lexer)
Execute the lexer action in the context of the specified
Lexer. |
void |
LexerChannelAction.execute(Lexer lexer)
Execute the lexer action in the context of the specified
Lexer. |
void |
LexerAction.execute(Lexer lexer)
Execute the lexer action in the context of the specified
Lexer. |
void |
LexerActionExecutor.execute(Lexer lexer,
CharStream input,
int startIndex)
Execute the actions encapsulated by this executor within the context of a
particular
Lexer. |
static PredictionContext |
PredictionContext.fromRuleContext(ATN atn,
RuleContext outerContext) |
static PredictionContext |
PredictionContext.fromRuleContext(ATN atn,
RuleContext outerContext) |
static PredictionContext |
PredictionContext.fromRuleContext(ATN atn,
RuleContext outerContext,
boolean fullContext) |
static PredictionContext |
PredictionContext.fromRuleContext(ATN atn,
RuleContext outerContext,
boolean fullContext) |
static BitSet |
PredictionMode.getAlts(ATNConfigSet configs)
Get union of all alts from configs.
|
static BitSet |
PredictionMode.getAlts(Collection<BitSet> altsets)
Gets the complete set of represented alternatives for a collection of
alternative subsets.
|
static PredictionContext |
PredictionContext.getCachedContext(PredictionContext context,
ConcurrentMap<PredictionContext,PredictionContext> contextCache,
PredictionContext.IdentityHashMap visited) |
static PredictionContext |
PredictionContext.getCachedContext(PredictionContext context,
ConcurrentMap<PredictionContext,PredictionContext> contextCache,
PredictionContext.IdentityHashMap visited) |
static PredictionContext |
PredictionContext.getCachedContext(PredictionContext context,
ConcurrentMap<PredictionContext,PredictionContext> contextCache,
PredictionContext.IdentityHashMap visited) |
static Collection<BitSet> |
PredictionMode.getConflictingAltSubsets(ATNConfigSet configs)
This function gets the conflicting alt subsets from a configuration set.
|
protected ATNConfig |
ParserATNSimulator.getEpsilonTarget(ATNConfig config,
Transition t,
boolean collectPredicates,
boolean inContext,
PredictionContextCache contextCache,
boolean treatEofAsEpsilon) |
protected ATNConfig |
ParserATNSimulator.getEpsilonTarget(ATNConfig config,
Transition t,
boolean collectPredicates,
boolean inContext,
PredictionContextCache contextCache,
boolean treatEofAsEpsilon) |
protected ATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
ATNConfig config,
Transition t,
ATNConfigSet configs,
boolean speculative,
boolean treatEofAsEpsilon) |
protected ATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
ATNConfig config,
Transition t,
ATNConfigSet configs,
boolean speculative,
boolean treatEofAsEpsilon) |
protected ATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
ATNConfig config,
Transition t,
ATNConfigSet configs,
boolean speculative,
boolean treatEofAsEpsilon) |
protected ATNConfig |
LexerATNSimulator.getEpsilonTarget(CharStream input,
ATNConfig config,
Transition t,
ATNConfigSet configs,
boolean speculative,
boolean treatEofAsEpsilon) |
protected DFAState |
ParserATNSimulator.getExistingTargetState(DFAState s,
int t)
Get an existing target state for an edge in the DFA.
|
protected DFAState |
LexerATNSimulator.getExistingTargetState(DFAState s,
int t)
Get an existing target state for an edge in the DFA.
|
protected SemanticContext[] |
ParserATNSimulator.getPredsForAmbigAlts(BitSet ambigAlts,
ATNConfigSet configs,
int nalts) |
protected SemanticContext[] |
ParserATNSimulator.getPredsForAmbigAlts(BitSet ambigAlts,
ATNConfigSet configs,
int nalts) |
protected void |
LexerATNSimulator.getReachableConfigSet(CharStream input,
ATNConfigSet closure,
ATNConfigSet reach,
int t)
Given a starting configuration set, figure out all ATN configurations
we can reach upon input
t. |
protected void |
LexerATNSimulator.getReachableConfigSet(CharStream input,
ATNConfigSet closure,
ATNConfigSet reach,
int t)
Given a starting configuration set, figure out all ATN configurations
we can reach upon input
t. |
protected void |
LexerATNSimulator.getReachableConfigSet(CharStream input,
ATNConfigSet closure,
ATNConfigSet reach,
int t)
Given a starting configuration set, figure out all ATN configurations
we can reach upon input
t. |
protected ATNState |
ParserATNSimulator.getReachableTarget(ATNConfig source,
Transition trans,
int ttype) |
protected ATNState |
ParserATNSimulator.getReachableTarget(ATNConfig source,
Transition trans,
int ttype) |
static int |
PredictionMode.getSingleViableAlt(Collection<BitSet> altsets) |
protected SimulatorState |
ParserATNSimulator.getStartState(DFA dfa,
TokenStream input,
ParserRuleContext outerContext,
boolean useContext) |
protected SimulatorState |
ParserATNSimulator.getStartState(DFA dfa,
TokenStream input,
ParserRuleContext outerContext,
boolean useContext) |
protected SimulatorState |
ParserATNSimulator.getStartState(DFA dfa,
TokenStream input,
ParserRuleContext outerContext,
boolean useContext) |
static Map<ATNState,BitSet> |
PredictionMode.getStateToAltMap(ATNConfigSet configs)
Get a map from state to alt subset from a configuration set.
|
String |
LexerATNSimulator.getText(CharStream input)
Get the text matched so far for the current token.
|
protected int |
ParserATNSimulator.getUniqueAlt(Collection<ATNConfig> configs) |
static int |
PredictionMode.getUniqueAlt(Collection<BitSet> altsets)
Returns the unique alternative predicted by all alternative subsets in
altsets. |
protected int |
ParserATNSimulator.handleNoViableAlt(TokenStream input,
int startIndex,
SimulatorState previous)
This method is used to improve the localization of error messages by
choosing an alternative rather than throwing a
NoViableAltException in particular prediction scenarios where the
ATNSimulator.ERROR state was reached during ATN simulation. |
protected int |
ParserATNSimulator.handleNoViableAlt(TokenStream input,
int startIndex,
SimulatorState previous)
This method is used to improve the localization of error messages by
choosing an alternative rather than throwing a
NoViableAltException in particular prediction scenarios where the
ATNSimulator.ERROR state was reached during ATN simulation. |
static boolean |
PredictionMode.hasConflictingAltSet(Collection<BitSet> altsets)
Determines if any single alternative subset in
altsets contains
more than one alternative. |
static boolean |
PredictionMode.hasNonConflictingAltSet(Collection<BitSet> altsets)
Determines if any single alternative subset in
altsets contains
exactly one alternative. |
static boolean |
PredictionMode.hasSLLConflictTerminatingPrediction(PredictionMode mode,
ATNConfigSet configs)
Computes the SLL prediction termination condition.
|
static boolean |
PredictionMode.hasStateAssociatedWithOneAlt(ATNConfigSet configs) |
IntervalSet |
LL1Analyzer.LOOK(ATNState s,
ATNState stopState,
PredictionContext ctx)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
IntervalSet |
LL1Analyzer.LOOK(ATNState s,
ATNState stopState,
PredictionContext ctx)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
IntervalSet |
LL1Analyzer.LOOK(ATNState s,
PredictionContext ctx)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
IntervalSet |
LL1Analyzer.LOOK(ATNState s,
PredictionContext ctx)
Compute set of tokens that can follow
s in the ATN in the
specified ctx. |
protected void |
ATNDeserializer.markPrecedenceDecisions(ATN atn)
Analyze the
StarLoopEntryState states in the specified ATN to set
the StarLoopEntryState.precedenceRuleDecision field to the
correct value. |
int |
LexerATNSimulator.match(CharStream input,
int mode) |
protected int |
LexerATNSimulator.matchATN(CharStream input) |
IntervalSet |
ATN.nextTokens(ATNState s)
Compute the set of valid tokens that can occur starting in
s and
staying in same rule. |
IntervalSet |
ATN.nextTokens(ATNState s,
PredictionContext ctx)
Compute the set of valid tokens that can occur starting in state
s. |
protected NoViableAltException |
ParserATNSimulator.noViableAlt(TokenStream input,
ParserRuleContext outerContext,
ATNConfigSet configs,
int startIndex) |
protected NoViableAltException |
ParserATNSimulator.noViableAlt(TokenStream input,
ParserRuleContext outerContext,
ATNConfigSet configs,
int startIndex) |
protected NoViableAltException |
ParserATNSimulator.noViableAlt(TokenStream input,
ParserRuleContext outerContext,
ATNConfigSet configs,
int startIndex) |
protected ATNConfig |
ParserATNSimulator.precedenceTransition(ATNConfig config,
PrecedencePredicateTransition pt,
boolean collectPredicates,
boolean inContext) |
protected ATNConfig |
ParserATNSimulator.precedenceTransition(ATNConfig config,
PrecedencePredicateTransition pt,
boolean collectPredicates,
boolean inContext) |
protected ATNConfig |
ParserATNSimulator.predTransition(ATNConfig config,
PredicateTransition pt,
boolean collectPredicates,
boolean inContext) |
protected ATNConfig |
ParserATNSimulator.predTransition(ATNConfig config,
PredicateTransition pt,
boolean collectPredicates,
boolean inContext) |
protected ATNConfigSet |
ParserATNSimulator.removeAllConfigsNotInRuleStopState(ATNConfigSet configs,
PredictionContextCache contextCache)
Return a configuration set containing only the configurations from
configs which are in a RuleStopState. |
void |
ATN.removeState(ATNState state) |
protected void |
ProfilingATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
protected void |
ProfilingATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
protected void |
ProfilingATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) |
protected void |
ParserATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs)
If context sensitive parsing, we know it's ambiguity not conflict
|
protected void |
ParserATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs)
If context sensitive parsing, we know it's ambiguity not conflict
|
protected void |
ParserATNSimulator.reportAmbiguity(DFA dfa,
DFAState D,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs)
If context sensitive parsing, we know it's ambiguity not conflict
|
protected void |
ParserATNSimulator.reportAttemptingFullContext(DFA dfa,
BitSet conflictingAlts,
SimulatorState conflictState,
int startIndex,
int stopIndex) |
protected void |
ParserATNSimulator.reportAttemptingFullContext(DFA dfa,
BitSet conflictingAlts,
SimulatorState conflictState,
int startIndex,
int stopIndex) |
protected void |
ParserATNSimulator.reportContextSensitivity(DFA dfa,
int prediction,
SimulatorState acceptState,
int startIndex,
int stopIndex) |
protected void |
ParserATNSimulator.reportContextSensitivity(DFA dfa,
int prediction,
SimulatorState acceptState,
int startIndex,
int stopIndex) |
static int |
PredictionMode.resolvesToJustOneViableAlt(Collection<BitSet> altsets)
Full LL prediction termination.
|
protected ATNConfig |
ParserATNSimulator.ruleTransition(ATNConfig config,
RuleTransition t,
PredictionContextCache contextCache) |
protected ATNConfig |
ParserATNSimulator.ruleTransition(ATNConfig config,
RuleTransition t,
PredictionContextCache contextCache) |
void |
ATNConfig.setContext(PredictionContext context) |
void |
ParserATNSimulator.setPredictionMode(PredictionMode predictionMode) |
ATNConfig |
ATNConfig.transform(ATNState state,
boolean checkNonGreedy) |
ATNConfig |
ATNConfig.transform(ATNState state,
LexerActionExecutor lexerActionExecutor,
boolean checkNonGreedy) |
ATNConfig |
ATNConfig.transform(ATNState state,
PredictionContext context,
boolean checkNonGreedy) |
ATNConfig |
ATNConfig.transform(ATNState state,
SemanticContext semanticContext,
boolean checkNonGreedy) |
ATNConfig |
ATNConfig.transform(ATNState state,
SemanticContext semanticContext,
boolean checkNonGreedy) |
| Constructor and Description |
|---|
ActionTransition(ATNState target,
int ruleIndex) |
ActionTransition(ATNState target,
int ruleIndex,
int actionIndex,
boolean isCtxDependent) |
AmbiguityInfo(int decision,
SimulatorState state,
BitSet ambigAlts,
TokenStream input,
int startIndex,
int stopIndex)
Constructs a new instance of the
AmbiguityInfo class with the
specified detailed ambiguity information. |
AmbiguityInfo(int decision,
SimulatorState state,
BitSet ambigAlts,
TokenStream input,
int startIndex,
int stopIndex)
Constructs a new instance of the
AmbiguityInfo class with the
specified detailed ambiguity information. |
AmbiguityInfo(int decision,
SimulatorState state,
BitSet ambigAlts,
TokenStream input,
int startIndex,
int stopIndex)
Constructs a new instance of the
AmbiguityInfo class with the
specified detailed ambiguity information. |
ATN(ATNType grammarType,
int maxTokenType)
Used for runtime deserialization of ATNs from strings
|
ATNConfig(ATNConfig c,
ATNState state,
PredictionContext context) |
ATNConfig(ATNConfig c,
ATNState state,
PredictionContext context) |
ATNConfig(ATNConfig c,
ATNState state,
PredictionContext context) |
ATNConfig(ATNState state,
int alt,
PredictionContext context) |
ATNConfig(ATNState state,
int alt,
PredictionContext context) |
ATNSimulator(ATN atn) |
AtomTransition(ATNState target,
int label) |
ContextSensitivityInfo(int decision,
SimulatorState state,
TokenStream input,
int startIndex,
int stopIndex)
Constructs a new instance of the
ContextSensitivityInfo class
with the specified detailed context sensitivity information. |
ContextSensitivityInfo(int decision,
SimulatorState state,
TokenStream input,
int startIndex,
int stopIndex)
Constructs a new instance of the
ContextSensitivityInfo class
with the specified detailed context sensitivity information. |
DecisionEventInfo(int decision,
SimulatorState state,
TokenStream input,
int startIndex,
int stopIndex,
boolean fullCtx) |
EpsilonTransition(ATNState target) |
EpsilonTransition(ATNState target,
int outermostPrecedenceReturn) |
ErrorInfo(int decision,
SimulatorState state,
TokenStream input,
int startIndex,
int stopIndex)
Constructs a new instance of the
ErrorInfo class with the
specified detailed syntax error information. |
ErrorInfo(int decision,
SimulatorState state,
TokenStream input,
int startIndex,
int stopIndex)
Constructs a new instance of the
ErrorInfo class with the
specified detailed syntax error information. |
LexerActionExecutor(LexerAction[] lexerActions)
Constructs an executor for a sequence of
LexerAction actions. |
LexerATNSimulator(ATN atn) |
LexerATNSimulator(Lexer recog,
ATN atn) |
LexerIndexedCustomAction(int offset,
LexerAction action)
Constructs a new indexed custom action by associating a character offset
with a
LexerAction. |
LL1Analyzer(ATN atn) |
LookaheadEventInfo(int decision,
SimulatorState state,
int predictedAlt,
TokenStream input,
int startIndex,
int stopIndex,
boolean fullCtx)
Constructs a new instance of the
LookaheadEventInfo class with
the specified detailed lookahead information. |
NotSetTransition(ATNState target,
IntervalSet set) |
ParseInfo(ProfilingATNSimulator atnSimulator) |
ParserATNSimulator(ATN atn)
Testing only!
|
ParserATNSimulator(Parser parser,
ATN atn) |
PrecedencePredicateTransition(ATNState target,
int precedence) |
PredicateEvalInfo(SimulatorState state,
int decision,
TokenStream input,
int startIndex,
int stopIndex,
SemanticContext semctx,
boolean evalResult,
int predictedAlt)
Constructs a new instance of the
PredicateEvalInfo class with the
specified detailed predicate evaluation information. |
PredicateEvalInfo(SimulatorState state,
int decision,
TokenStream input,
int startIndex,
int stopIndex,
SemanticContext semctx,
boolean evalResult,
int predictedAlt)
Constructs a new instance of the
PredicateEvalInfo class with the
specified detailed predicate evaluation information. |
PredicateEvalInfo(SimulatorState state,
int decision,
TokenStream input,
int startIndex,
int stopIndex,
SemanticContext semctx,
boolean evalResult,
int predictedAlt)
Constructs a new instance of the
PredicateEvalInfo class with the
specified detailed predicate evaluation information. |
PredicateTransition(ATNState target,
int ruleIndex,
int predIndex,
boolean isCtxDependent) |
RangeTransition(ATNState target,
int from,
int to) |
RuleTransition(RuleStartState ruleStart,
int ruleIndex,
ATNState followState)
Deprecated.
|
RuleTransition(RuleStartState ruleStart,
int ruleIndex,
ATNState followState)
Deprecated.
|
RuleTransition(RuleStartState ruleStart,
int ruleIndex,
int precedence,
ATNState followState) |
RuleTransition(RuleStartState ruleStart,
int ruleIndex,
int precedence,
ATNState followState) |
SemanticContext.AND(SemanticContext a,
SemanticContext b) |
SemanticContext.AND(SemanticContext a,
SemanticContext b) |
SemanticContext.OR(SemanticContext a,
SemanticContext b) |
SemanticContext.OR(SemanticContext a,
SemanticContext b) |
SetTransition(ATNState target,
IntervalSet set) |
SimulatorState(ParserRuleContext outerContext,
DFAState s0,
boolean useContext,
ParserRuleContext remainingOuterContext) |
Transition(ATNState target) |
WildcardTransition(ATNState target) |
| Modifier and Type | Field and Description |
|---|---|
ATNState |
DFA.atnStartState
From which ATN state did we create this DFA?
|
ATNConfigSet |
DFAState.configs |
SemanticContext |
DFAState.PredPrediction.pred |
AtomicReference<DFAState> |
DFA.s0
This is the start state for SLL prediction.
|
AtomicReference<DFAState> |
DFA.s0full
This is the start state for full context prediction.
|
ConcurrentMap<DFAState,DFAState> |
DFA.states
A set of all DFA states.
|
| Modifier and Type | Method and Description |
|---|---|
EdgeMap<T> |
EdgeMap.clear() |
Set<Map.Entry<Integer,T>> |
EdgeMap.entrySet() |
protected String |
LexerDFASerializer.getEdgeLabel(int i) |
EmptyEdgeMap<DFAState> |
DFA.getEmptyContextEdgeMap()
Gets an empty edge map initialized with the minimum and maximum context
values allowed to be stored in this DFA.
|
EmptyEdgeMap<DFAState> |
DFA.getEmptyEdgeMap()
Gets an empty edge map initialized with the minimum and maximum symbol
values allowed to be stored in this DFA.
|
EdgeMap<T> |
EdgeMap.put(int key,
T value) |
EdgeMap<T> |
EdgeMap.putAll(EdgeMap<? extends T> m) |
EdgeMap<T> |
EdgeMap.remove(int key) |
Map<Integer,T> |
EdgeMap.toMap() |
| Modifier and Type | Method and Description |
|---|---|
EdgeMap<T> |
EdgeMap.putAll(EdgeMap<? extends T> m) |
String |
DFA.toString(Vocabulary vocabulary) |
String |
DFA.toString(Vocabulary vocabulary,
String[] ruleNames) |
| Constructor and Description |
|---|
DFA(ATNState atnStartState)
Constructs a
DFA instance associated with a lexer mode. |
DFA(ATNState atnStartState,
int decision)
Constructs a
DFA instance associated with a decision. |
DFASerializer(DFA dfa,
Recognizer<?,?> parser) |
DFASerializer(DFA dfa,
String[] tokenNames)
Deprecated.
Use
DFASerializer.DFASerializer(DFA, Vocabulary) instead. |
DFASerializer(DFA dfa,
String[] tokenNames,
String[] ruleNames,
ATN atn)
Deprecated.
|
DFASerializer(DFA dfa,
Vocabulary vocabulary) |
DFASerializer(DFA dfa,
Vocabulary vocabulary) |
DFASerializer(DFA dfa,
Vocabulary vocabulary,
String[] ruleNames,
ATN atn) |
DFASerializer(DFA dfa,
Vocabulary vocabulary,
String[] ruleNames,
ATN atn) |
DFAState.PredPrediction(SemanticContext pred,
int alt) |
DFAState(DFA dfa,
ATNConfigSet configs)
Constructs a new
DFAState for a DFA. |
DFAState(DFA dfa,
ATNConfigSet configs)
Constructs a new
DFAState for a DFA. |
DFAState(EmptyEdgeMap<DFAState> emptyEdges,
EmptyEdgeMap<DFAState> emptyContextEdges,
ATNConfigSet configs)
Constructs a new
DFAState with explicit initial values for the
outgoing edge and context edge maps. |
DFAState(EmptyEdgeMap<DFAState> emptyEdges,
EmptyEdgeMap<DFAState> emptyContextEdges,
ATNConfigSet configs)
Constructs a new
DFAState with explicit initial values for the
outgoing edge and context edge maps. |
DFAState(EmptyEdgeMap<DFAState> emptyEdges,
EmptyEdgeMap<DFAState> emptyContextEdges,
ATNConfigSet configs)
Constructs a new
DFAState with explicit initial values for the
outgoing edge and context edge maps. |
LexerDFASerializer(DFA dfa) |
| Modifier and Type | Field and Description |
|---|---|
protected AbstractEqualityComparator<? super K> |
FlexibleHashMap.comparator |
protected AbstractEqualityComparator<? super T> |
Array2DHashSet.comparator |
| Modifier and Type | Method and Description |
|---|---|
IntSet |
IntSet.addAll(IntSet set)
Modify the current
IntSet object to contain all elements that are
present in itself, the specified set, or both. |
protected String |
IntervalSet.elementName(Vocabulary vocabulary,
int a) |
static IntervalSet |
IntervalSet.of(int a)
Create a set with a single element, el.
|
static char[] |
Utils.readFile(String fileName) |
static char[] |
Utils.readFile(String fileName,
String encoding) |
static IntervalSet |
IntervalSet.subtract(IntervalSet left,
IntervalSet right)
Compute the set difference between two interval sets.
|
List<Integer> |
IntSet.toList()
Return a list containing the elements represented by the current set.
|
static IntervalSet |
Utils.toSet(BitSet bits) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
IntervalSet.elementName(Vocabulary vocabulary,
int a) |
static char[] |
Utils.readFile(String fileName) |
static char[] |
Utils.readFile(String fileName,
String encoding) |
static <T> void |
Utils.removeAll(Iterable<T> iterable,
Predicate<? super T> predicate) |
static <T> void |
Utils.removeAll(Iterable<T> iterable,
Predicate<? super T> predicate) |
static <T> void |
Utils.removeAll(List<T> list,
Predicate<? super T> predicate) |
static <T> void |
Utils.removeAll(List<T> list,
Predicate<? super T> predicate) |
static IntervalSet |
Utils.toSet(BitSet bits) |
String |
IntervalSet.toString(Vocabulary vocabulary) |
static void |
Utils.writeFile(File file,
byte[] content) |
static void |
Utils.writeFile(File file,
byte[] content) |
static void |
Utils.writeFile(String fileName,
String content) |
static void |
Utils.writeFile(String fileName,
String content) |
static void |
Utils.writeFile(String fileName,
String content,
String encoding) |
static void |
Utils.writeFile(String fileName,
String content,
String encoding) |
| Constructor and Description |
|---|
IntegerList(Collection<Integer> list) |
IntegerList(IntegerList list) |
IntegerStack(IntegerStack list) |
| Modifier and Type | Method and Description |
|---|---|
static List<? extends Tree> |
Trees.getAncestors(Tree t)
Return a list of all ancestors of this node.
|
Interval |
SyntaxTree.getSourceInterval()
Return an
Interval indicating the index in the
TokenStream of the first and last token associated with this
subtree. |
| Modifier and Type | Method and Description |
|---|---|
void |
ParseTreeListener.enterEveryRule(ParserRuleContext ctx) |
void |
ParseTreeListener.exitEveryRule(ParserRuleContext ctx) |
static List<? extends Tree> |
Trees.getAncestors(Tree t)
Return a list of all ancestors of this node.
|
static String |
Trees.getNodeText(Tree t,
List<String> ruleNames) |
static String |
Trees.getNodeText(Tree t,
Parser recog) |
static ParserRuleContext |
Trees.getRootOfSubtreeEnclosingRegion(ParseTree t,
int startTokenIndex,
int stopTokenIndex)
Find smallest subtree of t enclosing range startTokenIndex..stopTokenIndex
inclusively using postorder traversal.
|
protected boolean |
AbstractParseTreeVisitor.shouldVisitNextChild(RuleNode node,
Result currentResult)
This method is called after visiting each child in
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode). |
static String |
Trees.toStringTree(Tree t)
Print out a whole tree in LISP form.
|
static String |
Trees.toStringTree(Tree t,
List<String> ruleNames)
Print out a whole tree in LISP form.
|
static String |
Trees.toStringTree(Tree t,
Parser recog)
Print out a whole tree in LISP form.
|
Result |
ParseTreeVisitor.visit(ParseTree tree)
Visit a parse tree, and return a user-defined result of the operation.
|
Result |
AbstractParseTreeVisitor.visit(ParseTree tree)
Visit a parse tree, and return a user-defined result of the operation.
|
Result |
ParseTreeVisitor.visitChildren(RuleNode node)
Visit the children of a node, and return a user-defined result
of the operation.
|
Result |
AbstractParseTreeVisitor.visitChildren(RuleNode node)
Visit the children of a node, and return a user-defined result
of the operation.
|
Result |
ParseTreeVisitor.visitErrorNode(ErrorNode node)
Visit an error node, and return a user-defined result of the operation.
|
void |
ParseTreeListener.visitErrorNode(ErrorNode node) |
Result |
AbstractParseTreeVisitor.visitErrorNode(ErrorNode node)
Visit an error node, and return a user-defined result of the operation.
|
Result |
ParseTreeVisitor.visitTerminal(TerminalNode node)
Visit a terminal node, and return a user-defined result of the operation.
|
void |
ParseTreeListener.visitTerminal(TerminalNode node) |
Result |
AbstractParseTreeVisitor.visitTerminal(TerminalNode node)
Visit a terminal node, and return a user-defined result of the operation.
|
| Modifier and Type | Method and Description |
|---|---|
List<ParseTreeMatch> |
ParseTreePattern.findAll(ParseTree tree,
String xpath)
Find all nodes using XPath and then try to match those subtrees against
this tree pattern.
|
List<ParseTree> |
ParseTreeMatch.getAll(String label)
Return all nodes matching a rule or token tag with the specified label.
|
MultiMap<String,ParseTree> |
ParseTreeMatch.getLabels()
Return a mapping from label → [list of nodes].
|
Lexer |
ParseTreePatternMatcher.getLexer()
Used to convert the tree pattern string into a series of tokens.
|
ParseTreePatternMatcher |
ParseTreePattern.getMatcher()
Get the
ParseTreePatternMatcher which created this tree pattern. |
Parser |
ParseTreePatternMatcher.getParser()
Used to collect to the grammar file name, token names, rule names for
used to parse the pattern into a parse tree.
|
String |
ParseTreePattern.getPattern()
Get the tree pattern in concrete syntax form.
|
ParseTreePattern |
ParseTreeMatch.getPattern()
Get the tree pattern we are matching against.
|
ParseTree |
ParseTreePattern.getPatternTree()
Get the tree pattern as a
ParseTree. |
String |
RuleTagToken.getRuleName()
Gets the name of the rule associated with this rule tag.
|
String |
TokenTagToken.getTokenName()
Gets the token name.
|
ParseTree |
ParseTreeMatch.getTree()
Get the parse tree we are trying to match to a pattern.
|
ParseTreeMatch |
ParseTreePattern.match(ParseTree tree)
Match a specific parse tree against this tree pattern.
|
ParseTreeMatch |
ParseTreePatternMatcher.match(ParseTree tree,
ParseTreePattern pattern)
Compare
pattern matched against tree and return a
ParseTreeMatch object that contains the matched elements, or the
node at which the match failed. |
| Modifier and Type | Method and Description |
|---|---|
List<ParseTreeMatch> |
ParseTreePattern.findAll(ParseTree tree,
String xpath)
Find all nodes using XPath and then try to match those subtrees against
this tree pattern.
|
List<ParseTreeMatch> |
ParseTreePattern.findAll(ParseTree tree,
String xpath)
Find all nodes using XPath and then try to match those subtrees against
this tree pattern.
|
List<ParseTree> |
ParseTreeMatch.getAll(String label)
Return all nodes matching a rule or token tag with the specified label.
|
ParseTreeMatch |
ParseTreePattern.match(ParseTree tree)
Match a specific parse tree against this tree pattern.
|
ParseTreeMatch |
ParseTreePatternMatcher.match(ParseTree tree,
ParseTreePattern pattern)
Compare
pattern matched against tree and return a
ParseTreeMatch object that contains the matched elements, or the
node at which the match failed. |
ParseTreeMatch |
ParseTreePatternMatcher.match(ParseTree tree,
ParseTreePattern pattern)
Compare
pattern matched against tree and return a
ParseTreeMatch object that contains the matched elements, or the
node at which the match failed. |
boolean |
ParseTreePattern.matches(ParseTree tree)
Determine whether or not a parse tree matches this tree pattern.
|
protected ParseTree |
ParseTreePatternMatcher.matchImpl(ParseTree tree,
ParseTree patternTree,
MultiMap<String,ParseTree> labels)
|
protected ParseTree |
ParseTreePatternMatcher.matchImpl(ParseTree tree,
ParseTree patternTree,
MultiMap<String,ParseTree> labels)
|
protected ParseTree |
ParseTreePatternMatcher.matchImpl(ParseTree tree,
ParseTree patternTree,
MultiMap<String,ParseTree> labels)
|
| Constructor and Description |
|---|
ParseTreeMatch(ParseTree tree,
ParseTreePattern pattern,
MultiMap<String,ParseTree> labels,
ParseTree mismatchedNode)
Constructs a new instance of
ParseTreeMatch from the specified
parse tree and pattern. |
ParseTreeMatch(ParseTree tree,
ParseTreePattern pattern,
MultiMap<String,ParseTree> labels,
ParseTree mismatchedNode)
Constructs a new instance of
ParseTreeMatch from the specified
parse tree and pattern. |
ParseTreeMatch(ParseTree tree,
ParseTreePattern pattern,
MultiMap<String,ParseTree> labels,
ParseTree mismatchedNode)
Constructs a new instance of
ParseTreeMatch from the specified
parse tree and pattern. |
ParseTreePattern(ParseTreePatternMatcher matcher,
String pattern,
int patternRuleIndex,
ParseTree patternTree)
Construct a new instance of the
ParseTreePattern class. |
ParseTreePattern(ParseTreePatternMatcher matcher,
String pattern,
int patternRuleIndex,
ParseTree patternTree)
Construct a new instance of the
ParseTreePattern class. |
ParseTreePattern(ParseTreePatternMatcher matcher,
String pattern,
int patternRuleIndex,
ParseTree patternTree)
Construct a new instance of the
ParseTreePattern class. |
RuleTagToken(String ruleName,
int bypassTokenType)
Constructs a new instance of
RuleTagToken with the specified rule
name and bypass token type and no label. |
RuleTagToken(String ruleName,
int bypassTokenType,
String label)
Constructs a new instance of
RuleTagToken with the specified rule
name, bypass token type, and label. |
TokenTagToken(String tokenName,
int type)
Constructs a new instance of
TokenTagToken for an unlabeled tag
with the specified token name and type. |
TokenTagToken(String tokenName,
int type,
String label)
Constructs a new instance of
TokenTagToken with the specified
token name, type, and label. |
| Modifier and Type | Method and Description |
|---|---|
String[] |
XPathLexer.getChannelNames() |
String[] |
XPathLexer.getModeNames() |
Vocabulary |
XPathLexer.getVocabulary() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
SymbolChecks.checkDeclarationRuleConflicts(Rule r,
AttributeDict attributes,
Set<String> ruleNames,
ErrorType errorType) |
protected void |
SymbolChecks.checkDeclarationRuleConflicts(Rule r,
AttributeDict attributes,
Set<String> ruleNames,
ErrorType errorType) |
protected void |
SymbolChecks.checkDeclarationRuleConflicts(Rule r,
AttributeDict attributes,
Set<String> ruleNames,
ErrorType errorType) |
protected void |
SymbolChecks.checkLocalConflictingDeclarations(Rule r,
AttributeDict attributes,
AttributeDict referenceAttributes,
ErrorType errorType) |
protected void |
SymbolChecks.checkLocalConflictingDeclarations(Rule r,
AttributeDict attributes,
AttributeDict referenceAttributes,
ErrorType errorType) |
protected void |
SymbolChecks.checkReservedNames(Collection<Rule> rules) |
| Modifier and Type | Field and Description |
|---|---|
LinkedHashMap<String,Attribute> |
AttributeDict.attributes
The list of
Attribute objects. |
org.antlr.runtime.TokenStream |
Grammar.originalTokenStream
If we transform grammar, track original unaltered token stream.
|
org.antlr.runtime.TokenStream |
Grammar.tokenStream
Track token stream used to create this grammar
|
Tool |
Grammar.tool |
| Modifier and Type | Method and Description |
|---|---|
Object[] |
ANTLRMessage.getArgs() |
ErrorType |
ANTLRMessage.getErrorType() |
String[] |
Grammar.getTokenLiteralNames()
Gets the literal names assigned to tokens in the grammar.
|
String |
Grammar.getTokenName(int ttype)
Gets the name by which a token can be referenced in the generated code.
|
String[] |
Grammar.getTokenSymbolicNames()
Gets the symbolic names assigned to tokens in the grammar.
|
Vocabulary |
Grammar.getVocabulary()
Gets a
Vocabulary instance describing the vocabulary used by the
grammar. |
Set<String> |
AttributeDict.intersection(AttributeDict other)
Return the set of keys that collide from
this and other. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Grammar.defineRule(Rule r)
Define the specified rule in the grammar.
|
boolean |
Grammar.undefineRule(Rule r)
Undefine the specified rule from this
Grammar instance. |
| Constructor and Description |
|---|
ANTLRMessage(ErrorType errorType) |
ANTLRMessage(ErrorType errorType,
Throwable e,
org.antlr.runtime.Token offendingToken,
Object... args) |
ANTLRMessage(ErrorType errorType,
org.antlr.runtime.Token offendingToken,
Object... args) |
Grammar(Tool tool,
GrammarRootAST ast) |
| Modifier and Type | Field and Description |
|---|---|
org.antlr.runtime.TokenStream |
GrammarRootAST.tokenStream
Track stream used to create this tree
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,GrammarAST> |
GrammarASTWithOptions.getOptions() |
Copyright © 1992–2020 Tunnel Vision Laboratories, LLC. All rights reserved.