public class PlainTokenRenderer extends Object implements TokenRenderer
Constructor and Description |
---|
PlainTokenRenderer() |
Modifier and Type | Method and Description |
---|---|
String |
endLine(int line)
Produce a string to signal end of a line.
|
String |
getEpilogue()
Gets a string to be added after token processing ends.
|
String |
getLineNumberFormat() |
String |
getPrologue()
Gets a string to be added before token processing begins.
|
boolean |
getShowLineNumber() |
String |
newLine(int line)
Produce a string to signal beginning of a line.
|
String |
render(int decision,
org.antlr.runtime.Token token)
Produce a string representation of the given token.
|
void |
setLineNumberFormat(String lineNumberFormat) |
void |
setShowLineNumber(boolean showLineNumber) |
public String endLine(int line)
TokenRenderer
endLine
in interface TokenRenderer
line
- the line being endedpublic String newLine(int line)
TokenRenderer
newLine
in interface TokenRenderer
line
- the current line numberpublic String render(int decision, org.antlr.runtime.Token token)
TokenRenderer
render
in interface TokenRenderer
decision
- the index of the decision (or the context) in which
the current token is being processed. The index refers to ANTLR
DebugEventListener.enterDecision(int)
.token
- the token to be rendered. Can be a hidden token as well.public String getEpilogue()
TokenRenderer
getEpilogue
in interface TokenRenderer
public String getPrologue()
TokenRenderer
getPrologue
in interface TokenRenderer
public boolean getShowLineNumber()
public void setShowLineNumber(boolean showLineNumber)
public String getLineNumberFormat()
public void setLineNumberFormat(String lineNumberFormat)
lineNumberFormat
- the lineNumberFormat to setCopyright © 2006–2018 Apache Software Foundation. All rights reserved.