|
||||||||||
| 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(Preprocessor2... preprocessors)
|
|
| Method Summary | |
|---|---|
void |
addAllTokens(List<Token> allNewtokens)
Add a list of tokens to the list without notifying preprocessors. |
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 |
void |
addTokenAndProcess(TokenType tokenType,
String value,
String originalValue,
int linePosition,
int columnPosition)
Add a new token and notify the preprocessors |
void |
addTrivia(Trivia trivia)
|
Token |
get(int i)
|
Comments |
getComments()
|
Comments |
getComments(CommentAnalyser commentAnalyser)
|
Collection<Token> |
getCommentTokens()
|
File |
getFile()
|
String |
getFileAbsolutePath()
|
String |
getFileName()
|
Token |
getFirstToken()
|
Token |
getLastToken()
|
List<Token> |
getTokens()
|
void |
pushBackTokenAndProcess(Token token,
Preprocessor2 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,
Preprocessor2 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(Preprocessor2... preprocessors)
public LexerOutput(List<Token> tokens)
| Method Detail |
|---|
public List<Token> getTokens()
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 addTokenAndProcess(TokenType tokenType,
String value,
String originalValue,
int linePosition,
int columnPosition)
tokenType - value - originalValue - linePosition - columnPosition -
public void pushBackTokenAndProcess(Token token,
Preprocessor2 preprocessorToExclude)
public void pushBackTokensAndProcess(List<Token> tokens,
Preprocessor2 preprocessorToExclude)
public void addTrivia(Trivia trivia)
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 Comments getComments(CommentAnalyser commentAnalyser)
public Collection<Token> getCommentTokens()
public Token get(int i)
public String toString()
toString in class Objectpublic void setTokens(List<Token> tokens)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||