org.jsesoft.jpp
Class KeywordIdentifierState

java.lang.Object
  |
  +--org.jsesoft.jpp.State
        |
        +--org.jsesoft.jpp.IdentifierState
              |
              +--org.jsesoft.jpp.KeywordIdentifierState

public class KeywordIdentifierState
extends IdentifierState

Checks for keyword, otherwise identifier.

Description:

Copyright: Copyright (c) 2002 JSESoft

Company: JSESoft

Version:
1.0
Author:
JSESoft

Field Summary
protected  RootNode keywords
           
 
Fields inherited from class org.jsesoft.jpp.IdentifierState
buffer, tokenType
 
Constructor Summary
KeywordIdentifierState()
           
 
Method Summary
protected  void initialize()
           
 Token nextToken(java.io.PushbackReader reader, int character, Tokenizer tokenizer)
          Scans next keyword or identifier from reader.
 
Methods inherited from class org.jsesoft.jpp.IdentifierState
checkBuffer, isIdentifierPart
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keywords

protected RootNode keywords
Constructor Detail

KeywordIdentifierState

public KeywordIdentifierState()
Method Detail

initialize

protected void initialize()

nextToken

public Token nextToken(java.io.PushbackReader reader,
                       int character,
                       Tokenizer tokenizer)
                throws java.io.IOException
Scans next keyword or identifier from reader.
Overrides:
nextToken in class IdentifierState
Parameters:
reader - the reader to read characters from
character - the character starting the token
tokenizer - the tokenizer in duty
Returns:
the next token
Throws:
java.io.IOException - on any problem reading