|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jess.ReaderTokenizer
A simple Tokenizer implementation for the Jess language that takes its input from a Reader. Not serializable, as it contains a reference to a java.io.Reader.
(C) 2006 Sandia National Laboratories
Field Summary |
Fields inherited from interface jess.Tokenizer |
BLANK_MULTI, BLANK_PREFIX |
Constructor Summary | |
ReaderTokenizer(java.io.Reader ios,
boolean parseComments)
Constructor - use large buffer for FileReader, no buffering for everything else |
Method Summary | |
java.lang.String |
discardToEOL()
Discard characters from the current stream position to the end of the current line. |
void |
eatWhitespace()
Consume all characters up to, but not including, the next non-whitespace character |
int |
getStreamPos()
Return the current character offset. |
static boolean |
isALong(java.lang.String sval)
|
static boolean |
isAnInteger(java.lang.String sval)
|
JessToken |
nextToken()
Return the next parsed token, skipping over all whitespace. |
java.lang.String |
readLine()
Return characters from the current location to the end of the current line, as a String |
void |
reportNewlines(boolean b)
Specify whether newlines should be reported as tokens |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReaderTokenizer(java.io.Reader ios, boolean parseComments)
ios
- Method Detail |
public void reportNewlines(boolean b)
Tokenizer
reportNewlines
in interface Tokenizer
b
- true if newlines should be reportedpublic java.lang.String readLine() throws JessException
Tokenizer
readLine
in interface Tokenizer
JessException
- if anything goes wrongpublic JessToken nextToken() throws JessException
Tokenizer
nextToken
in interface Tokenizer
JessException
- if anything goes wrongpublic void eatWhitespace() throws JessException
Tokenizer
eatWhitespace
in interface Tokenizer
JessException
public static boolean isAnInteger(java.lang.String sval)
public static boolean isALong(java.lang.String sval)
public java.lang.String discardToEOL() throws JessException
Tokenizer
discardToEOL
in interface Tokenizer
JessException
- if anything goes wrongpublic int getStreamPos()
Tokenizer
getStreamPos
in interface Tokenizer
|
© 2007 Sandia Corporation | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |