public abstract class BaseRawMXMLTokenizer extends Object
Modifier and Type | Field and Description |
---|---|
protected StringBuilder |
aggregateContents
Contents of aggregate
|
protected int |
aggregateStart
Start offset of aggregate
|
protected int |
aggregateStartColumn
Column number of aggregate
|
protected int |
aggregateStartLine
Line number of aggregate
|
protected List<ICompilerProblem> |
problems |
Constructor and Description |
---|
BaseRawMXMLTokenizer() |
Modifier and Type | Method and Description |
---|---|
protected antlr.Token |
buildAggregateToken(int type)
Build a token from the current aggregated text and the given type
|
protected antlr.Token |
buildToken(int type)
Build a token of the specified type, using the current yytext(),
getOffset(), getLine(), and getColumn().
|
protected antlr.Token |
buildToken(int type,
int start,
int end,
int line,
int column,
String text) |
protected antlr.Token |
buildToken(int type,
String text)
Builds a token with the specified type and text, using the current
getOffset(), getLine(), and getColumn().
|
protected void |
continueAggregate()
Add the current yytext() to the current aggregate
|
protected void |
continueAggregate(antlr.Token token) |
protected void |
fillBuffer(StringBuilder builder) |
ASToken |
getBufferToken() |
abstract int |
getColumn()
Gets the current column number of the tokenizer.
|
protected String |
getContext(int line)
Get the current context as a string (to help with debugging)
|
String |
getLastTokenText() |
int |
getLastTokenType() |
abstract int |
getLine()
Gets the current line number of the tokenizer.
|
abstract int |
getOffset()
Gets the current offset of the tokenizer into the file buffer.
|
List<ICompilerProblem> |
getProblems() |
protected boolean |
hasAggregateContents() |
boolean |
hasBufferToken() |
boolean |
hasProblems() |
boolean |
isInE4XDatabinding() |
void |
reset() |
protected void |
setLastToken(antlr.Token token) |
protected void |
startAggregate()
Initialize a new aggregate with the current yytext() and position
|
protected void |
startAggregate(antlr.Token token) |
abstract String |
yytext()
Gets the text of the current token.
|
protected int aggregateStart
protected int aggregateStartLine
protected int aggregateStartColumn
protected StringBuilder aggregateContents
protected List<ICompilerProblem> problems
public abstract String yytext()
public abstract int getOffset()
public abstract int getLine()
public abstract int getColumn()
protected antlr.Token buildToken(int type, int start, int end, int line, int column, String text)
protected antlr.Token buildToken(int type, String text)
type
- token type (based on the appropriate XxxTokenTypes interface)protected antlr.Token buildToken(int type)
type
- token type (based on the appropriate XxxTokenTypes interface)public void reset()
public final int getLastTokenType()
public final String getLastTokenText()
protected void setLastToken(antlr.Token token)
protected final void startAggregate()
protected final void startAggregate(antlr.Token token)
protected void continueAggregate()
protected final void continueAggregate(antlr.Token token)
protected void fillBuffer(StringBuilder builder)
protected final boolean hasAggregateContents()
protected antlr.Token buildAggregateToken(int type)
type
- token type (based on the appropriate XxxTokenTypes interface)protected String getContext(int line)
line
- current line numberpublic boolean hasProblems()
public List<ICompilerProblem> getProblems()
public boolean hasBufferToken()
public ASToken getBufferToken()
public boolean isInE4XDatabinding()
Copyright © 2016 The Apache Software Foundation. All rights reserved.