fr.jussieu.script
Class MyTokenizer

java.lang.Object
  extended by 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.
 
Method Summary
 java.lang.String currentToken()
           
 int lineno()
           
 int nextToken()
           
 int read()
          Read a character
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EOF

public static final int EOF
See Also:
Constant Field Values

TOKEN

public static final int TOKEN
See Also:
Constant Field Values
Constructor Detail

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.
Method Detail

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