public class PredicateLabel extends Label
| Modifier and Type | Field and Description |
|---|---|
protected SemanticContext |
semanticContext
A tree of semantic predicates from the grammar AST if label==SEMPRED.
|
ACTION, DOWN, EOF, EOR_TOKEN_TYPE, EOT, EPSILON, EPSILON_STR, INVALID, label, labelSet, MAX_CHAR_VALUE, MIN_ATOM_VALUE, MIN_CHAR_VALUE, MIN_TOKEN_TYPE, NUM_FAUX_LABELS, SEMPRED, SET, UP| Constructor and Description |
|---|
PredicateLabel(GrammarAST predicateASTNode)
Make a semantic predicate label
|
PredicateLabel(SemanticContext semCtx)
Make a semantic predicates label
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
SemanticContext |
getSemanticContext() |
int |
hashCode() |
boolean |
isSemanticPredicate() |
String |
toString()
Predicates are lists of AST nodes from the NFA created from the
grammar, but the same predicate could be cut/paste into multiple
places in the grammar.
|
String |
toString(Grammar g) |
protected SemanticContext semanticContext
public PredicateLabel(GrammarAST predicateASTNode)
public PredicateLabel(SemanticContext semCtx)
public boolean isSemanticPredicate()
isSemanticPredicate in class Labelpublic SemanticContext getSemanticContext()
getSemanticContext in class Labelpublic String toString()
LabelCopyright © 1992–2014 ANTLR. All rights reserved.