|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.StreamTokenizer
marf.nlp.util.NLPStreamTokenizer
NLP Stream Tokenizer. Allows pushing back multiple tokens and has a reader reverence to be able to reset it.
$Id: NLPStreamTokenizer.java,v 1.18 2006/01/19 04:13:18 mokhov Exp $
| Field Summary | |
protected int |
iPushBackupLevel
Default push backup level of 2. |
protected java.util.Stack |
oPushBackup
A stack to push back tokens. |
protected java.io.Reader |
oReader
Keep a reference to the Reader ourselves to be able to reset(). |
protected Token |
oTopToken
Reference to the token on the top of our own stack. |
| Fields inherited from class java.io.StreamTokenizer |
nval, sval, TT_EOF, TT_EOL, TT_NUMBER, TT_WORD, ttype |
| Constructor Summary | |
NLPStreamTokenizer(java.io.Reader poReader)
NLP Stream Tokenizer based on a reader. |
|
| Method Summary | |
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
java.lang.String |
getNextToken()
Returns a next token from the NLP stream or the stack if any were pushed back. |
int |
lineno()
Returns the current line number (of the latest/top token). |
int |
nextToken()
Retrieves the next token from the stream or local stack. |
void |
pushBack()
Overridden to place tokens back onto to stack, virtually of any number of tokens. |
void |
reset()
Resets the internal reader's stream. |
| Methods inherited from class java.io.StreamTokenizer |
commentChar, eolIsSignificant, lowerCaseMode, ordinaryChar, ordinaryChars, parseNumbers, quoteChar, resetSyntax, slashSlashComments, slashStarComments, toString, whitespaceChars, wordChars |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.io.Reader oReader
reset().
reset()protected java.util.Stack oPushBackup
protected int iPushBackupLevel
protected Token oTopToken
| Constructor Detail |
public NLPStreamTokenizer(java.io.Reader poReader)
poReader - reader to use to read tokens/lexemes| Method Detail |
public java.lang.String getNextToken()
throws java.io.IOException
java.io.IOException
public void reset()
throws java.io.IOException
java.io.IOException
public int nextToken()
throws java.io.IOException
nextToken() of the parent
is called.
java.io.IOExceptionStreamTokenizer.ttypepublic void pushBack()
public int lineno()
public static java.lang.String getMARFSourceCodeRevision()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||