private static class LogicalExpressionConverter.Lexer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
caseSensitive
Should matches be checked case-sensitively?
|
private LogicalExpressionConverter.EToken |
current
Token most recently read from the expression
|
private java.util.Set<java.lang.String> |
delim
The word-delimiter characters.
|
private boolean |
hasDelim
Flag indicating if the last char(s) read was a word delimiter.
|
private int |
ord
The ordinal for a next found term
|
private java.io.Reader |
reader
String reader stream
|
private java.util.Map<java.lang.String,LogicalExpressionConverter.Term> |
terms
Distinct terms found in the expression
|
Modifier | Constructor and Description |
---|---|
private |
Lexer(java.io.Reader reader,
java.util.Set<java.lang.String> delim,
boolean caseSensitive)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
consume()
Mark the current token as having been consumed.
|
private void |
readNextToken()
Read the next token from the match expression.
|
(package private) LogicalExpressionConverter.EToken |
token()
Return the most recently read token, or
null if no more tokens are
available. |
private void |
wildcardError()
Record or throw an error about incorrect wildcard syntax.
|
private final java.io.Reader reader
private final boolean caseSensitive
private final java.util.Set<java.lang.String> delim
private LogicalExpressionConverter.EToken current
private boolean hasDelim
private final java.util.Map<java.lang.String,LogicalExpressionConverter.Term> terms
private int ord
private Lexer(java.io.Reader reader, java.util.Set<java.lang.String> delim, boolean caseSensitive)
reader
- Reader stream on the match expression text.caseSensitive
- true
to perform word match comparisons
case-sensitively, false
to ignore case.LogicalExpressionConverter.EToken token() throws java.io.IOException
null
if no more tokens are
available.null
.java.io.IOException
- if there is an I/O error reading from the stream.void consume()
private void readNextToken() throws java.io.IOException
java.io.IOException
- if there is an I/O error reading from the stream.private void wildcardError()
ErrorConditionException
- always.