|
Hilbert II - Version 0.03.04 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.qedeq.kernel.parser.MathParser
Parse term or formula data into Term
s.
Constructor Summary | |
MathParser(MementoTextInput input,
List operators)
Constructor. |
Method Summary | |
protected void |
clearMark()
Forget last remembered position. |
boolean |
eof()
Are there still any characters to read? |
protected abstract boolean |
eot(String token)
Is this an end of term token? |
protected int |
getChar()
Reads a single character and does not change the reading position. |
protected abstract Operator |
getOperator(String token)
Get an operator for that token. |
protected List |
getOperators()
|
protected abstract List |
getOperators(String token)
Get operators for that token. |
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. |
Term |
readTerm()
Reads (maximal possible) Term from input. |
protected abstract String |
readToken()
Read next token from input and move reading position. |
protected long |
rewindPosition()
Rewind to previous marked position. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MathParser(MementoTextInput input, List operators)
input
- Input source to parse.operators
- Operator list.Method Detail |
protected final List getOperators()
public final Term readTerm() throws ParserException
ParserException
- Parsing failed.protected abstract Operator getOperator(String token)
token
- Get an operator for this token.
null
.protected abstract List getOperators(String token)
token
- Get operators for this token.
null
.protected abstract String readToken()
null
if end of data reached.public final String getToken()
null
if end of data reached.protected final void markPosition()
protected final long rewindPosition()
protected final void clearMark()
protected final int getChar()
Character.MAX_VALUE
is returnedprotected final int readChar()
Character.MAX_VALUE
is returnedprotected abstract boolean eot(String token)
token
- Check this token.
public final boolean eof()
public final int getRewindStackSize()
|
Hilbert II - Version 0.03.04 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
©left GNU General Public Licence All Rights Reserved. |