ebnf
Class Input

java.lang.Object
  |
  +--ebnf.Input

public class Input
extends java.lang.Object
implements oops.parser.Scanner

Lexical analyzer for ebnf.ebnf.

Author:
Bernd Kuehl, Bernd.Kuehl@informatik.uni-osnabrueck.de, Axel-Tobias Schreiner, axel@informatik.uni-osnabrueck.de, Jan Kraneis, jkraneis@informatik.uni-osnabrueck.de

Field Summary
protected  oops.parser.Set ID
          An oops.parser.Set.
protected  oops.parser.Set LIT
          An oops.parser.Set.
protected  oops.parser.Parser parser
          An oops.parser.Parser.
protected  java.io.StreamTokenizer st
          A java.io.StramTokenizer.
protected  oops.parser.Set tokenSet
          An oops.parser.Set.
 
Constructor Summary
Input()
           
 
Method Summary
 boolean advance()
          The advance() method needed by the oops.parser.Scanner interface.
 boolean atEnd()
          The atEnd() method needed by the oops.parser.Scanner interface.
 java.lang.Object node()
          The node() method needed by the oops.parser.Scanner interface.
 void scan(java.io.Reader r, oops.parser.Parser parser)
          The scan() method needed by the oops.parser.Scanner interface.
 oops.parser.Set tokenSet()
          The tokenSet() method needed by the oops.parser.Scanner interface.
 java.lang.String toString()
          Returns a String representation containing the current position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

st

protected java.io.StreamTokenizer st
A java.io.StramTokenizer.

parser

protected oops.parser.Parser parser
An oops.parser.Parser.

ID

protected oops.parser.Set ID
An oops.parser.Set. Stores lookahead for "ID".

LIT

protected oops.parser.Set LIT
An oops.parser.Set. Stores lookahead for "LIT".

tokenSet

protected oops.parser.Set tokenSet
An oops.parser.Set. Should be null or lookahead identifying token.
Constructor Detail

Input

public Input()
Method Detail

scan

public void scan(java.io.Reader r,
                 oops.parser.Parser parser)
          throws java.io.IOException
The scan() method needed by the oops.parser.Scanner interface.
Specified by:
scan in interface oops.parser.Scanner
Throws:
java.io.IOException -  

atEnd

public boolean atEnd()
The atEnd() method needed by the oops.parser.Scanner interface.
Specified by:
atEnd in interface oops.parser.Scanner
Returns:
true at the end of the input file, else false.

advance

public boolean advance()
                throws java.io.IOException
The advance() method needed by the oops.parser.Scanner interface.
Specified by:
advance in interface oops.parser.Scanner
Returns:
true on advance, false at the end of the input file.

tokenSet

public oops.parser.Set tokenSet()
The tokenSet() method needed by the oops.parser.Scanner interface.
Specified by:
tokenSet in interface oops.parser.Scanner
Returns:
single element lookahead set, null for unidentifiable token.

node

public java.lang.Object node()
The node() method needed by the oops.parser.Scanner interface.
Specified by:
node in interface oops.parser.Scanner
Returns:
always null.

toString

public java.lang.String toString()
Returns a String representation containing the current position.
Overrides:
toString in class java.lang.Object