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.


Variable Index

 o ERROR
 o is
Private Variables
 o kwords
 o STRING
 o StringChar
 o UNKNOWN
Constants

Constructor Index

 o ScanWord(InputStream)
Constructors

Method Index

 o addKeyWord(String, int)
Public Methods
 o closeStream()
 o getKeyValue(String)
 o getNumber(String)
Protected Methods
 o nextWord()
 o resetKeyWords()
 o resetWordSyntax()
 o setStringChar(char)

Variables

 o UNKNOWN
 public static final int UNKNOWN
Constants

 o ERROR
 public static final int ERROR
 o STRING
 public static final int STRING
 o is
 private java.io.InputStream is
Private Variables

 o kwords
 private java.util.Hashtable kwords
 o StringChar
 private char StringChar

Constructors

 o ScanWord
 public ScanWord(java.io.InputStream in)
Constructors

Methods

 o addKeyWord
 public void addKeyWord(java.lang.String s,
                        int i)
Public Methods

 o getKeyValue
 public int getKeyValue(java.lang.String s)
 o resetKeyWords
 public void resetKeyWords()
 o nextWord
 public int nextWord()
 o setStringChar
 public void setStringChar(char c)
 o getNumber
 protected int getNumber(java.lang.String s)
Protected Methods

 o resetWordSyntax
 protected void resetWordSyntax()
 o closeStream
 protected void closeStream()

All Packages  Class Hierarchy  This Package  Previous  Next  Index