public class LLJavaLexer3<D> extends java.lang.Object implements java.util.function.Supplier<LLJavaLexer3.Token<D>>
| Modifier and Type | Class and Description |
|---|---|
static class |
LLJavaLexer3.Token<D>
Immutable LLJava tokens.
|
static class |
LLJavaLexer3.TokenType
Enumeration of LLJava token types.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MIN_COLUMN |
static int |
DEFAULT_MIN_LINE |
| Constructor and Description |
|---|
LLJavaLexer3(D documentId,
java.io.Reader in)
DOCUMENT ME
|
| Modifier and Type | Method and Description |
|---|---|
java.util.function.Supplier<LLJavaLexer3.Token<D>> |
discard(LLJavaLexer3.TokenType first,
LLJavaLexer3.TokenType... rest)
Returns a functional object that supplies the tokens of this
lexer, except for the given types.
|
java.util.function.Supplier<LLJavaLexer3.Token<D>> |
discard(java.util.Set<LLJavaLexer3.TokenType> types)
Returns a functional object that supplies the tokens of this
lexer, except for the given types.
|
LLJavaLexer3.Token<D> |
get() |
void |
setMinColumn(int minColumn)
Sets the number of the first column of each line in the input document.
|
void |
setMinLine(int minLine)
Sets the number of the first line in the input document.
|
java.util.stream.Stream<LLJavaLexer3.Token<D>> |
stream()
Returns a sequential token stream with this lexer as its source.
|
public static final int DEFAULT_MIN_LINE
public static final int DEFAULT_MIN_COLUMN
public void setMinLine(int minLine)
If this method is not invoked, the default value is DEFAULT_MIN_LINE (1).
To avoid inconsistencies, this method should only be invoked before the first token is produced.
minLine - the number of the first line in the input
documentpublic void setMinColumn(int minColumn)
If this method is not invoked, the default value is DEFAULT_MIN_COLUMN (1).
To avoid inconsistencies, this method should only be invoked before the first token is produced.
minColumn - the number of the first column of each line in
the input documentpublic LLJavaLexer3.Token<D> get()
get in interface java.util.function.Supplier<LLJavaLexer3.Token<D>>public java.util.stream.Stream<LLJavaLexer3.Token<D>> stream()
public java.util.function.Supplier<LLJavaLexer3.Token<D>> discard(LLJavaLexer3.TokenType first, LLJavaLexer3.TokenType... rest)
first - a token type to discardrest - an array of more token types to discardpublic java.util.function.Supplier<LLJavaLexer3.Token<D>> discard(java.util.Set<LLJavaLexer3.TokenType> types)
types - a set of token types to discardsee also the complete user documentation .