public class SimpleSLTokenizer extends Object
Modifier and Type | Field and Description |
---|---|
private String |
content |
private int |
current |
private static String |
illegalFirstChar |
private static String |
msg |
Constructor and Description |
---|
SimpleSLTokenizer(String s)
Construct a SimpleSLTokenizer that will act on the given String
|
Modifier and Type | Method and Description |
---|---|
void |
consumeChar(char c)
Check that the next character (after eventual spaces) is
'c' and advance the pointer to the character just after
|
String |
getElement()
Return the next SL element (i.e.
|
private String |
getElement(boolean removeColon) |
private String |
getWord(boolean removeColon) |
static boolean |
isAWord(String s)
Test if the given string is a legal SL word using the FIPA XC00008D spec.
|
private boolean |
isSpace(char c) |
String |
nextToken()
Return the next SL token (i.e.
|
static String |
quoteString(String s)
Take a java String and quote it to form a legal FIPA SL0 string.
|
private void |
skipSpaces() |
private static final String msg
private String content
private int current
private static final String illegalFirstChar
public SimpleSLTokenizer(String s)
public String nextToken() throws Codec.CodecException
Codec.CodecException
public void consumeChar(char c) throws Codec.CodecException
Codec.CodecException
public String getElement() throws Codec.CodecException
Codec.CodecException
private String getElement(boolean removeColon) throws Codec.CodecException
Codec.CodecException
private String getWord(boolean removeColon)
private void skipSpaces()
private boolean isSpace(char c)
public static final boolean isAWord(String s)