public abstract class InputParser
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
file
File reference.
|
int |
il
Query length.
|
int |
im
Marked input position.
|
java.lang.String |
input
Input to be parsed.
|
int |
ip
Current input position.
|
| Modifier | Constructor and Description |
|---|---|
protected |
InputParser(java.lang.String in)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected char |
consume()
Returns next character.
|
protected boolean |
consume(int ch)
Peeks forward and consumes the character if it equals the specified one.
|
protected boolean |
consume(java.lang.String str)
Peeks forward and consumes the string if it equals the specified one.
|
protected char |
curr()
Returns the current character.
|
protected boolean |
curr(int ch)
Checks if the current character equals the specified one.
|
protected void |
file(IO f,
Context c)
Sets a file reference.
|
protected byte[] |
found()
Returns a "found" string, containing the current character.
|
protected InputInfo |
info()
Creates input information.
|
protected void |
mark()
Remembers the current position.
|
protected boolean |
more()
Checks if more characters are found.
|
protected char |
next()
Returns the next character.
|
protected static boolean |
quote(int ch)
Checks if the specified character is a quote.
|
protected java.lang.String |
rest()
Returns the remaining, unscanned query substring.
|
public final java.lang.String input
public final int il
public java.lang.String file
public int ip
public int im
protected InputParser(java.lang.String in)
in - inputprotected void file(IO f, Context c)
f - filec - database contextprotected final boolean more()
protected final char curr()
protected final boolean curr(int ch)
ch - character to be checkedprotected final void mark()
protected final char next()
protected final char consume()
protected final boolean consume(int ch)
ch - character to consumeprotected static final boolean quote(int ch)
ch - character to be checkedprotected final boolean consume(java.lang.String str)
str - string to consumeprotected final byte[] found()
protected final java.lang.String rest()
protected final InputInfo info()