org.qedeq.kernel.bo.parser
Class AsciiMathParser

java.lang.Object
  extended by org.qedeq.kernel.bo.parser.MathParser
      extended by org.qedeq.kernel.bo.parser.AsciiMathParser

public final class AsciiMathParser
extends MathParser

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

Author:
Michael Meyling

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

Constructor Detail

AsciiMathParser

public AsciiMathParser()
Constructor.

Method Detail

readToken

protected final java.lang.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(java.lang.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 java.util.List getOperators(java.lang.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(java.lang.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.


Copyright © 2014. All Rights Reserved.