Hilbert II - Version 0.03.01

org.qedeq.kernel.latex
Class LatexTextParser

java.lang.Object
  extended byorg.qedeq.kernel.latex.LatexTextParser

public final class LatexTextParser
extends Object

Transform LaTeX into QEDEQ format.

Version:
$Revision: 1.1 $

Method Summary
protected  void clearMark()
          Forget last remembered position.
 boolean eof()
          Are there still any characters to read?
protected  int getChar()
          Reads a single character and does not change the reading position.
protected  long getPosition()
          Get byte position.
 int getRewindStackSize()
          Get rewind stack size.
 String getToken()
          Read next token from input but don't move reading position.
protected  void markPosition()
          Remember current position.
protected  int readChar()
          Reads a single character and increments the reading position by one.
protected  String readToken()
          Read next token from input stream.
protected  long rewindPosition()
          Rewind to previous marked position.
static String transform(String input)
          Parse LaTeX text into QEDEQ module string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

transform

public static final String transform(String input)
Parse LaTeX text into QEDEQ module string.

Parameters:
input - Parse this input.
Returns:
QEDEQ module string.

readToken

protected final String readToken()
Read next token from input stream.

Returns:
Read token.

getToken

public final String getToken()
Read next token from input but don't move reading position.

Returns:
Token read, is null if end of data reached.

markPosition

protected final void markPosition()
Remember current position.


rewindPosition

protected final long rewindPosition()
Rewind to previous marked position. Also clears the mark.

Returns:
Current position before pop.

clearMark

protected final void clearMark()
Forget last remembered position.


getPosition

protected long getPosition()
Get byte position.

Returns:
Position.

getChar

protected final int getChar()
Reads a single character and does not change the reading position.

Returns:
character read, if there are no more chars Character.MAX_VALUE is returned

readChar

protected final int readChar()
Reads a single character and increments the reading position by one.

Returns:
character read, if there are no more chars Character.MAX_VALUE is returned

eof

public final boolean eof()
Are there still any characters to read?

Returns:
Anything left for reading further?

getRewindStackSize

public final int getRewindStackSize()
Get rewind stack size.

Returns:
Rewind stack size.

Hilbert II - Version 0.03.01

©left GNU General Public Licence
All Rights Reserved.