public class FilterLexer extends DelegateLexer
| Modifier and Type | Class and Description |
|---|---|
static interface |
FilterLexer.Filter |
static class |
FilterLexer.SetFilter |
myDelegate| Constructor and Description |
|---|
FilterLexer(Lexer original,
FilterLexer.Filter filter) |
FilterLexer(Lexer original,
FilterLexer.Filter filter,
boolean[] stateFilter) |
| Modifier and Type | Method and Description |
|---|---|
void |
advance()
Advances the lexer to the next token.
|
LexerPosition |
getCurrentPosition()
Returns the current position and state of the lexer.
|
Lexer |
getOriginal() |
int |
getPrevTokenEnd() |
void |
locateToken() |
void |
restore(LexerPosition position)
Restores the lexer to the specified state and position.
|
void |
start(java.lang.CharSequence buffer,
int startOffset,
int endOffset,
int initialState)
Prepare for lexing character data from
buffer passed. |
getBufferEnd, getBufferSequence, getDelegate, getState, getTokenEnd, getTokenStart, getTokenTypegetTokenSequence, getTokenText, start, startpublic FilterLexer(Lexer original, FilterLexer.Filter filter, boolean[] stateFilter)
public FilterLexer(Lexer original, FilterLexer.Filter filter)
public Lexer getOriginal()
public void start(java.lang.CharSequence buffer,
int startOffset,
int endOffset,
int initialState)
Lexerbuffer passed. Internal lexer state is supposed to be initialState. It is guaranteed
that the value of initialState is the same as returned by Lexer.getState() method of this lexer at condition startOffset=getTokenStart().
This method is used to incrementally re-lex changed characters using lexing data acquired from this particular lexer sometime in the past.start in class DelegateLexerbuffer - character data for lexing.startOffset - offset to start lexing fromendOffset - offset to stop lexing atinitialState - the initial state of the lexer.public void advance()
Lexeradvance in class DelegateLexerpublic int getPrevTokenEnd()
public LexerPosition getCurrentPosition()
LexergetCurrentPosition in class LexerBasepublic void restore(LexerPosition position)
Lexerpublic final void locateToken()