Package antlr
Class GrammarAtom
- java.lang.Object
-
- antlr.GrammarElement
-
- antlr.AlternativeElement
-
- antlr.GrammarAtom
-
- Direct Known Subclasses:
CharLiteralElement
,StringLiteralElement
,TokenRefElement
,WildcardElement
abstract class GrammarAtom extends AlternativeElement
A GrammarAtom is either a token ref, a character ref, or string. The analysis doesn't care.
-
-
Field Summary
Fields Modifier and Type Field Description protected String
ASTNodeType
Set to type of AST node to create during parse.protected String
atomText
protected String
label
protected boolean
not
protected int
tokenType
-
Fields inherited from class antlr.AlternativeElement
autoGenType, enclosingRuleName, next
-
Fields inherited from class antlr.GrammarElement
AUTO_GEN_BANG, AUTO_GEN_CARET, AUTO_GEN_NONE, column, grammar, line
-
-
Constructor Summary
Constructors Constructor Description GrammarAtom(Grammar g, Token t, int autoGenType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getASTNodeType()
String
getLabel()
String
getText()
int
getType()
void
setASTNodeType(String type)
void
setLabel(String label_)
void
setOption(Token option, Token value)
String
toString()
-
Methods inherited from class antlr.AlternativeElement
getAutoGenType, setAutoGenType
-
Methods inherited from class antlr.GrammarElement
generate, getColumn, getLine, look
-
-
-
-
Method Detail
-
getLabel
public String getLabel()
- Overrides:
getLabel
in classAlternativeElement
-
getText
public String getText()
-
getType
public int getType()
-
setLabel
public void setLabel(String label_)
- Overrides:
setLabel
in classAlternativeElement
-
getASTNodeType
public String getASTNodeType()
-
setASTNodeType
public void setASTNodeType(String type)
-
toString
public String toString()
- Specified by:
toString
in classGrammarElement
-
-