class ScriptLineParser
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
ScriptLineParser.State
The state of the regular expression parser.
|
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
ADMISSIBLE_CHARS |
private int |
col
current column number
|
static java.lang.String |
COMMAND_KEY
Under this key, the command of
|
private java.lang.String |
file
the filename from which the script is taken.
|
private int |
line
current line number
|
static java.lang.String |
LITERAL_KEY |
private int |
pos |
private int |
readChars
number of characters read so far
|
private java.io.Reader |
reader
This is the source of characters
|
private int |
stringInitChar
While within a string literal, this stores the character with which the
string has started.
|
Constructor and Description |
---|
ScriptLineParser(java.io.Reader reader) |
ScriptLineParser(java.lang.String filename) |
Modifier and Type | Method and Description |
---|---|
private void |
exc(int c) |
int |
getColumn() |
int |
getLine() |
int |
getPosition() |
int |
getReadChars()
Get the number of characters read so far.
|
private boolean |
isIDChar(int c) |
static void |
main(java.lang.String[] args) |
java.util.Map<java.lang.String,java.lang.String> |
parseCommand() |
void |
setLocation(Location location) |
public static final java.lang.String COMMAND_KEY
public static final java.lang.String LITERAL_KEY
private static final java.lang.String ADMISSIBLE_CHARS
private final java.io.Reader reader
private int col
private int line
private int pos
private java.lang.String file
private int readChars
private int stringInitChar
public ScriptLineParser(java.io.Reader reader)
public ScriptLineParser(java.lang.String filename) throws java.io.IOException
java.io.IOException
public java.util.Map<java.lang.String,java.lang.String> parseCommand() throws java.io.IOException, ScriptException
java.io.IOException
ScriptException
private boolean isIDChar(int c)
private void exc(int c) throws ScriptException
ScriptException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public int getReadChars()
public int getLine()
public int getColumn()
public int getPosition()
public void setLocation(Location location)