public abstract class BaseRepairingTokenBuffer extends Object implements IRepairingTokenBuffer
| Modifier and Type | Field and Description | 
|---|---|
protected ASToken | 
eofToken  | 
protected List<SyntaxProblem> | 
errors  | 
protected boolean | 
insertSemis  | 
protected boolean | 
nextIsSemicolon  | 
protected int | 
position  | 
protected static ASToken | 
SEMICOLON  | 
| Constructor and Description | 
|---|
BaseRepairingTokenBuffer(String sourcePath)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addError(SyntaxProblem error)
Adds a syntax error that we encountered during parsing 
 | 
int | 
LA(int i)
Looks ahead an arbitrary distance and returns back the token type. 
 | 
ASToken | 
lookAheadSkipInsertedSemicolon()
Get the first non-fix-up-semicolon from the look-ahead. 
 | 
ASToken | 
LT(int i)
Looks ahead an arbitrary distance and returns back the token. 
 | 
int | 
mark()
Marks the position in the underlying token buffer. 
 | 
protected void | 
onSemicolonInserted()
This method is called when an optional semicolon is inserted and is going
 to be returned as the next token. 
 | 
void | 
setEnableSemicolonInsertion(boolean enable)
Enables or disables the insertion of semicolons 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconsume, insertSemicolon, matchOptionalSemicolon, previous, rewindprotected int position
protected ASToken eofToken
protected final List<SyntaxProblem> errors
protected boolean nextIsSemicolon
protected boolean insertSemis
protected static final ASToken SEMICOLON
public BaseRepairingTokenBuffer(String sourcePath)
public void setEnableSemicolonInsertion(boolean enable)
IRepairingTokenBuffersetEnableSemicolonInsertion in interface IRepairingTokenBufferenable - true if we should insert semicolons into the token streamprotected final void onSemicolonInserted()
IRepairingTokenBuffer.insertSemicolon(boolean).public void addError(SyntaxProblem error)
IRepairingTokenBufferaddError in interface IRepairingTokenBuffererror - the SyntaxProblem to addpublic final int mark()
IRepairingTokenBuffermark in interface IRepairingTokenBufferpublic ASToken LT(int i)
IRepairingTokenBufferLT in interface IRepairingTokenBufferi - the offset to look aheadpublic ASToken lookAheadSkipInsertedSemicolon()
IRepairingTokenBufferlookAheadSkipInsertedSemicolon in interface IRepairingTokenBufferpublic final int LA(int i)
IRepairingTokenBufferLA in interface IRepairingTokenBufferi - the offset to look aheadCopyright © 2016 The Apache Software Foundation. All rights reserved.