Hilbert II - Version 0.03.01

org.qedeq.kernel.parser
Class SimpleMathParser

java.lang.Object
  extended byorg.qedeq.kernel.parser.MathParser
      extended byorg.qedeq.kernel.parser.SimpleMathParser

public final class SimpleMathParser
extends MathParser

Parse term or formula data into Terms. This parser uses simple ascii text operators.

Version:
$Revision: 1.1 $

Constructor Summary
SimpleMathParser(TextInput input, List operators)
          Constructor.
 
Method Summary
protected  boolean eot(String token)
          Is this an end of term token?
protected  Operator getOperator(String token)
          Get an operator for that token.
protected  List getOperators(String token)
          Get operators for that token.
protected  String readToken()
          Read next token from input and move reading position.
 
Methods inherited from class org.qedeq.kernel.parser.MathParser
clearMark, eof, getChar, getOperators, getRewindStackSize, getToken, markPosition, readChar, readTerm, rewindPosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleMathParser

public SimpleMathParser(TextInput input,
                        List operators)
Constructor.

Parameters:
input - Parse this input.
operators - List of operators.
Method Detail

readToken

protected final String readToken()
Description copied from class: MathParser
Read next token from input and move reading position. A token is a recognized character sequence. A token is no elementary whitespace. Also a dosn't start or end with elementary whitespace.

Specified by:
readToken in class MathParser
Returns:
Token read, is null if end of data reached.

getOperator

protected final Operator getOperator(String token)
Description copied from class: MathParser
Get an operator for that token. If there are more than one possibilities the first matching is returned.

Specified by:
getOperator in class MathParser
Parameters:
token - Get an operator for this token.
Returns:
Operator. Might be null.

getOperators

protected final List getOperators(String token)
Description copied from class: MathParser
Get operators for that token. If there are more than one possibilities all matching are returned.

Specified by:
getOperators in class MathParser
Parameters:
token - Get operators for this token.
Returns:
Operators. Might be null.

eot

protected boolean eot(String token)
Description copied from class: MathParser
Is this an end of term token?

Specified by:
eot in class MathParser
Parameters:
token - Check this token.
Returns:
Is this an end of term token.

Hilbert II - Version 0.03.01

©left GNU General Public Licence
All Rights Reserved.