|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sonar.sslr.api.LexerOutput
public class LexerOutput
Constructor Summary | |
---|---|
LexerOutput(List<Token> tokens)
|
|
LexerOutput(Preprocessor... preprocessors)
|
Method Summary | |
---|---|
void |
addAllTokens(List<Token> allNewtokens)
Add a list of tokens to the list without notifying preprocessors. |
void |
addCommentToken(Token token)
|
void |
addPreprocessingToken(Token token)
|
void |
addToken(Token token)
Add a token to the list without notifying preprocessors. |
void |
addTokenAndProcess(TokenType tokenType,
String value,
int linePosition,
int columnPosition)
Add a new token and notify the preprocessors |
Token |
get(int i)
|
Comments |
getComments()
|
Map<Integer,Token> |
getCommentTokens()
|
File |
getFile()
|
String |
getFileAbsolutePath()
|
String |
getFileName()
|
Token |
getFirstToken()
|
Token |
getLastToken()
|
List<Token> |
getPreprocessingTokens()
|
List<Token> |
getTokens()
|
void |
pushBackTokenAndProcess(Token token,
Preprocessor preprocessorToExclude)
This method must be called by a preprocessor when a token has been temporary consumed by this preprocessor but finally must be pushed back to the LexerOutput. |
void |
pushBackTokensAndProcess(List<Token> tokens,
Preprocessor preprocessorToExclude)
This method must be called by a preprocessor when some tokens have been temporary consumed by this preprocessor but finally must be pushed back to the LexerOutput. |
void |
removeLastTokens(int numberOfTokensToRemove)
|
void |
setFile(File file)
|
void |
setTokens(List<Token> tokens)
|
int |
size()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LexerOutput(Preprocessor... preprocessors)
public LexerOutput(List<Token> tokens)
Method Detail |
---|
public List<Token> getTokens()
public List<Token> getPreprocessingTokens()
public Token getLastToken()
public Token getFirstToken()
public void removeLastTokens(int numberOfTokensToRemove)
public void addTokenAndProcess(TokenType tokenType, String value, int linePosition, int columnPosition)
tokenType
- value
- linePosition
- columnPosition
- public void pushBackTokenAndProcess(Token token, Preprocessor preprocessorToExclude)
public void pushBackTokensAndProcess(List<Token> tokens, Preprocessor preprocessorToExclude)
public void addPreprocessingToken(Token token)
public void addToken(Token token)
token
- public void addAllTokens(List<Token> allNewtokens)
token
- public void setFile(File file)
public File getFile()
public String getFileName()
public String getFileAbsolutePath()
public int size()
public Comments getComments()
public void addCommentToken(Token token)
public Map<Integer,Token> getCommentTokens()
public Token get(int i)
public String toString()
toString
in class Object
public void setTokens(List<Token> tokens)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |