Cloneable
, Comparable<Label>
public class PredicateLabel extends Label
Modifier and Type | Field | 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 | Description |
---|---|
PredicateLabel(SemanticContext semCtx) |
Make a semantic predicates label
|
PredicateLabel(GrammarAST predicateASTNode) |
Make a semantic predicate label
|
Modifier and Type | Method | 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 Label
public SemanticContext getSemanticContext()
getSemanticContext
in class Label
public String toString()
Label
Copyright © 1992–2019 ANTLR. All rights reserved.