fr.jussieu.script
Class MyTokenizer
java.lang.Object
fr.jussieu.script.MyTokenizer
public class MyTokenizer
- extends java.lang.Object
The MyTokenizer
class takes an input stream and
parses it into "tokens", allowing the tokens to be
read one at a time.
A token is a word made of characters except "blanks".
- Version:
- 1, 15/08/03
- Author:
- Jean-Baptiste Yunès
Field Summary |
static int |
EOF
|
static int |
TOKEN
|
Constructor Summary |
MyTokenizer(java.io.Reader reader)
Create a tokenizer that parses the given character stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EOF
public static final int EOF
- See Also:
- Constant Field Values
TOKEN
public static final int TOKEN
- See Also:
- Constant Field Values
MyTokenizer
public MyTokenizer(java.io.Reader reader)
- Create a tokenizer that parses the given character stream.
- Parameters:
reader
- a Reader object providing the input stream.
read
public int read()
throws java.io.IOException
- Read a character
- Throws:
java.io.IOException
nextToken
public int nextToken()
currentToken
public java.lang.String currentToken()
lineno
public int lineno()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object