|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jimmc.roots.StringParser
String parser parses a string into a series of smaller strings using shell-style rules: unquoted strings are broken at spaces, or strings can be quoted using double or single quotes. Backslash can be used to quote a single character, either within or outside of a string.
Constructor Summary | |
StringParser(java.lang.String input)
Create a string parser. |
Method Summary | |
protected void |
addQuotedString(java.lang.StringBuffer sb,
int quoteChar)
Add characters within quotes to the buffer. |
java.lang.String |
getNextString()
Get the next string from the input. |
protected boolean |
isEos()
Return true if we are at the end of the string. |
static void |
main(java.lang.String[] args)
A main routine for testing. |
protected int |
nextChar()
Get the next character from the string. |
protected int |
nextCharAfterWhiteSpace()
Skip over white space, return next char. |
java.lang.String[] |
parse()
Parse our string into an array of strings. |
static java.lang.String[] |
parse(java.lang.String input)
Convenience routine to parse a string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StringParser(java.lang.String input)
Method Detail |
public static java.lang.String[] parse(java.lang.String input)
public java.lang.String[] parse()
public java.lang.String getNextString()
protected void addQuotedString(java.lang.StringBuffer sb, int quoteChar)
protected int nextCharAfterWhiteSpace()
protected int nextChar()
protected boolean isEos()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |