All Packages Class Hierarchy This Package Previous Next Index
Class grapher.ScanWord
java.lang.Object
|
+----java.io.StreamTokenizer
|
+----grapher.ScanWord
- public class ScanWord
- extends java.io.StreamTokenizer
Class ScanWord
Version 1.0 January 1995
Copyright (C) 1996 Leigh Brookshaw
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
This class extends the StreamTokenizer class. It allows words
to be defined and recognised and returned as a token. The TT_NUMBER
token of the StreamTokenizer is also modified so that scientific notation
is recognised.
-
ERROR
-
-
is
- Private Variables
-
kwords
-
-
STRING
-
-
StringChar
-
-
UNKNOWN
- Constants
-
ScanWord(InputStream)
-
Constructors
-
addKeyWord(String, int)
-
Public Methods
-
closeStream()
-
-
getKeyValue(String)
-
-
getNumber(String)
-
Protected Methods
-
nextWord()
-
-
resetKeyWords()
-
-
resetWordSyntax()
-
-
setStringChar(char)
-
UNKNOWN
public static final int UNKNOWN
- Constants
ERROR
public static final int ERROR
STRING
public static final int STRING
is
private java.io.InputStream is
- Private Variables
kwords
private java.util.Hashtable kwords
StringChar
private char StringChar
ScanWord
public ScanWord(java.io.InputStream in)
- Constructors
addKeyWord
public void addKeyWord(java.lang.String s,
int i)
- Public Methods
getKeyValue
public int getKeyValue(java.lang.String s)
resetKeyWords
public void resetKeyWords()
nextWord
public int nextWord()
setStringChar
public void setStringChar(char c)
getNumber
protected int getNumber(java.lang.String s)
- Protected Methods
resetWordSyntax
protected void resetWordSyntax()
closeStream
protected void closeStream()
All Packages Class Hierarchy This Package Previous Next Index