public class TokenParser extends Object
Modifier and Type | Field and Description |
---|---|
static char |
BLANK
Corresponds to a blank character.
|
static char |
CLOSEPAREN |
private int |
current |
private static int |
EOI |
private static char |
EOIchar |
private boolean |
ignoreParenGroups |
private String |
last |
private int |
length |
static char |
NEWLINE |
static char |
OPENPAREN |
private boolean |
putBack |
static char |
QUOTE
Corresponds to a double quote character.
|
private boolean |
quotesIn |
static char |
RETURN |
static char |
SLASH
Corresponds to a forward slash character.
|
String |
source |
static char |
TAB |
Constructor and Description |
---|
TokenParser() |
TokenParser(String string) |
Modifier and Type | Method and Description |
---|---|
static String |
concatString(String[] array) |
private char |
getCharAt(int position) |
String |
getNextToken() |
String |
getNextTokenAcceptingParenGroups() |
String |
getNextTokenQuotesIn() |
String |
getRemaining() |
static String |
makeFit(String s) |
private int |
nextNonSpacePositionFrom(int position) |
void |
putback()
"Puts back" the last token into the buffer so that the next call to
getNextToken() will return the same token again.
|
static String |
quoteString(String s) |
void |
reset(String string) |
private static final int EOI
private static final char EOIchar
public static final char QUOTE
public static final char SLASH
public static final char BLANK
public static final char NEWLINE
public static final char TAB
public static final char RETURN
public static final char OPENPAREN
public static final char CLOSEPAREN
public String source
private int length
private int current
private boolean quotesIn
private boolean ignoreParenGroups
private boolean putBack
private String last
public TokenParser()
public TokenParser(String string)
public void reset(String string)
public String getNextTokenQuotesIn()
public String getNextTokenAcceptingParenGroups()
public String getNextToken()
public String getRemaining()
current
public void putback()
private char getCharAt(int position)
private int nextNonSpacePositionFrom(int position)