class ScriptLineParser extends 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 String |
ADMISSIBLE_CHARS |
private int |
col
current column number
|
static String |
COMMAND_KEY
Under this key, the command of
|
private String |
file
the filename from which the script is taken.
|
private int |
line
current line number
|
static String |
LITERAL_KEY |
private int |
readChars
number of characters read so far
|
private 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(Reader reader) |
ScriptLineParser(String filename) |
| Modifier and Type | Method and Description |
|---|---|
private void |
exc(int c) |
int |
getColumn() |
int |
getLine() |
int |
getReadChars()
Get the number of characters read so far.
|
private boolean |
isIDChar(int c) |
static void |
main(String[] args) |
Map<String,String> |
parseCommand() |
void |
setLocation(Location location) |
public static final String COMMAND_KEY
public static final String LITERAL_KEY
private static final String ADMISSIBLE_CHARS
private final Reader reader
private int col
private int line
private String file
private int readChars
private int stringInitChar
public ScriptLineParser(Reader reader)
public ScriptLineParser(String filename) throws IOException
IOExceptionpublic Map<String,String> parseCommand() throws IOException, ScriptException
IOExceptionScriptExceptionprivate boolean isIDChar(int c)
private void exc(int c)
throws ScriptException
ScriptExceptionpublic int getReadChars()
public int getLine()
public int getColumn()
public void setLocation(Location location)