|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sonar.sslr.api.Preprocessor2
public abstract class Preprocessor2
A Preprocessor can be used to modify the content of the LexerOuput before launching the parser. A proprocessor can be used for instance to replace a token or a list of tokens by another token or list of tokens.
| Constructor Summary | |
|---|---|
Preprocessor2()
|
|
| Method Summary | |
|---|---|
void |
endLexing(LexerOutput output)
Method calls after having lexed a source code. |
abstract boolean |
process(Token token,
LexerOutput output)
This method is called just before adding a new Token to the LexerOutput. |
void |
startLexing()
Method calls before starting lexing the source code. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Preprocessor2()
| Method Detail |
|---|
public abstract boolean process(Token token,
LexerOutput output)
token - the token to preprocessoutput - the lexer output that can be used to inject any tokens.
public void endLexing(LexerOutput output)
public void startLexing()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||