antlr

Class GrammarAtom

abstract class GrammarAtom extends AlternativeElement

A GrammarAtom is either a token ref, a character ref, or string. The analysis doesn't care.
Field Summary
protected StringASTNodeType
Set to type of AST node to create during parse.
protected StringatomText
protected Stringlabel
protected booleannot
protected inttokenType
Constructor Summary
GrammarAtom(Grammar g, Token t, int autoGenType)
Method Summary
StringgetASTNodeType()
StringgetLabel()
StringgetText()
intgetType()
voidsetASTNodeType(String type)
voidsetLabel(String label_)
voidsetOption(Token option, Token value)
StringtoString()

Field Detail

ASTNodeType

protected String ASTNodeType
Set to type of AST node to create during parse. Defaults to what is set in the TokenSymbol.

atomText

protected String atomText

label

protected String label

not

protected boolean not

tokenType

protected int tokenType

Constructor Detail

GrammarAtom

public GrammarAtom(Grammar g, Token t, int autoGenType)

Method Detail

getASTNodeType

public String getASTNodeType()

getLabel

public String getLabel()

getText

public String getText()

getType

public int getType()

setASTNodeType

public void setASTNodeType(String type)

setLabel

public void setLabel(String label_)

setOption

public void setOption(Token option, Token value)

toString

public String toString()