public abstract class InputParser
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
file
File reference.
|
int |
ql
Query length.
|
int |
qm
Marked query position.
|
int |
qp
Current query position.
|
java.lang.String |
query
Input query.
|
| Modifier | Constructor and Description |
|---|---|
protected |
InputParser(java.lang.String q)
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 |
input()
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 query
public final int ql
public java.lang.String file
public int qp
public int qm
protected InputParser(java.lang.String q)
q - input queryprotected 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 input()