org.histpop.ohpr.frames.dateparser
Class DateScanner

java.lang.Object
  extended by org.histpop.ohpr.frames.dateparser.DateScanner
All Implemented Interfaces:
java_cup.runtime.Scanner

public class DateScanner
extends java.lang.Object
implements java_cup.runtime.Scanner

A lexical token scanner for the dates as submitted from the query form.


Field Summary
protected static int eof
           
protected  java.io.Reader instream
           
protected  int lastPos
           
protected  int next_char
           
protected  int pos
           
protected  java.lang.String queryString
           
 
Constructor Summary
DateScanner(java.lang.String queryString)
           
 
Method Summary
protected  void advance()
          advance input by one character
protected  void init()
          initialize the scanner
protected  int lookahead()
          get a look ahead character, within advancing on the input stream
 java_cup.runtime.Symbol next_token()
          Return the next token, or new Symbol(0) on end-of-file.
 java.lang.String parsedString()
          find the token string which has been parsed so far
protected  java.lang.String remainingString()
          find the remaining unscanned token string
protected  java.lang.Integer scanNumber()
          scan for an unsigned integer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instream

protected java.io.Reader instream

next_char

protected int next_char

eof

protected static final int eof
See Also:
Constant Field Values

pos

protected int pos

lastPos

protected int lastPos

queryString

protected java.lang.String queryString
Constructor Detail

DateScanner

public DateScanner(java.lang.String queryString)
Method Detail

advance

protected void advance()
                throws java.io.IOException
advance input by one character

Throws:
java.io.IOException

init

protected void init()
             throws java.io.IOException
initialize the scanner

Throws:
java.io.IOException

remainingString

protected java.lang.String remainingString()
find the remaining unscanned token string


parsedString

public java.lang.String parsedString()
find the token string which has been parsed so far


scanNumber

protected java.lang.Integer scanNumber()
                                throws java.lang.Exception
scan for an unsigned integer

Throws:
java.lang.Exception

lookahead

protected int lookahead()
                 throws java.io.IOException
get a look ahead character, within advancing on the input stream

Throws:
java.io.IOException

next_token

public java_cup.runtime.Symbol next_token()
                                   throws java.lang.Exception
Return the next token, or new Symbol(0) on end-of-file.

Specified by:
next_token in interface java_cup.runtime.Scanner
Throws:
java.lang.Exception