org.egothor.parser.plain
Class Plain

java.lang.Object
  extended by org.egothor.parser.plain.Plain
All Implemented Interfaces:
Sequence<Token>

public class Plain
extends java.lang.Object
implements Sequence<Token>

The Plain object is an extension of Tokenizer. It is a simple tokenizer of plain text streams.

Author:
Leo Galambos
See Also:
Simple

Constructor Summary
Plain(CharStream reader)
          Construct a Plain object using the given Reader.
 
Method Summary
 Token next()
          Return the next Token.
 void reset(CharStream reader)
          Reset the parser using the given Reader.
 void reset(Simple parser)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Plain

public Plain(CharStream reader)
Construct a Plain object using the given Reader. It uses a Simple parser.

Parameters:
reader - the Reader
Method Detail

reset

public void reset(CharStream reader)
Reset the parser using the given Reader. If there is no parser a new one is constructed using the given Reader, otherwise an already existing one is reinitialized with the Reader. If the parameter is null it is a signal that there are no more tokens in the stream.

Parameters:
reader - the input stream used by the parser

reset

public void reset(Simple parser)
Description of the Method

Parameters:
parser - Description of the Parameter

next

public Token next()
Return the next Token.

Specified by:
next in interface Sequence<Token>
Returns:
the next Token
See Also:
Simple.next()