Top Fields Constructors Methods
org.antlr.analysis

public Class ActionLabel

extends Label
Class Inheritance
Imports
org.antlr.tool.Grammar, .GrammarAST

Field Summary

Modifier and TypeField and Description
public GrammarAST
Inherited from org.antlr.analysis.Label:
ACTIONDOWNEOFEOR_TOKEN_TYPEEOTEPSILONEPSILON_STRINVALIDlabellabelSetMAX_CHAR_VALUEMIN_ATOM_VALUEMIN_CHAR_VALUEMIN_TOKEN_TYPENUM_FAUX_LABELSSEMPREDSETUP

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public String
toString()

Overrides org.antlr.analysis.Label.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.
public String
Inherited from org.antlr.analysis.Label:
addclonecompareToequalsgetAtomgetSemanticContextgetSethashCodeintersectisAtomisSemanticPredicateisSetmatchesmatchesmatchessetSet

Field Detail

actionASTback to summary
public GrammarAST actionAST

Constructor Detail

ActionLabelback to summary
public ActionLabel(GrammarAST actionAST)

Method Detail

isActionback to summary
public boolean isAction()

Overrides org.antlr.analysis.Label.isAction.

Annotations
@Override
isEpsilonback to summary
public boolean isEpsilon()

Overrides org.antlr.analysis.Label.isEpsilon.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.antlr.analysis.Label.toString.

Doc from org.antlr.analysis.Label.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. I must compare the text of all the predicates to truly answer whether {p1,p2} .equals {p1,p2}. Unfortunately, I cannot rely on the AST.equals() to work properly so I must do a brute force O(n^2) nested traversal of the Set doing a String compare. At this point, Labels are not compared for equals when they are predicates, but here's the code for future use.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override
toStringback to summary
public String toString(Grammar g)

Overrides org.antlr.analysis.Label.toString.

Annotations
@Override