public interface Lexer
Modifier and Type | Method and Description |
---|---|
void |
parse(javax.swing.text.Segment segment,
int ofst,
java.util.List<Token> tokens)
This is the only method a Lexer needs to implement.
|
void parse(javax.swing.text.Segment segment, int ofst, java.util.List<Token> tokens)
segment
- Text to parse.ofst
- offset to add to start of each token (useful for nesting)tokens
- List of Tokens to be added. This is done so that the caller creates the
appropriate List implementation and size. The parse method just adds to the list