|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectalice.tuprolog.Parser
This class defines a parser of prolog terms and sentences.
| Field Summary | |
static int |
EOF
|
static int |
ERROR
|
static int |
TERM
|
| Constructor Summary | |
Parser(OperatorManager op,
java.lang.String theoryText)
creating a Parser specifing how to handle operators and what text to parse |
|
Parser(java.lang.String theoryText)
creating a parser with default operator interpretation |
|
| Method Summary | |
int |
getCurrentLine()
|
int |
getCurrentPos()
|
Term |
getCurrentTerm()
|
int |
getCurrentTermType()
|
alice.tuprolog.Tokenizer |
getTokenizer()
|
int |
readTerm(boolean endNeeded)
Parses next term from the stream built on string. |
void |
skip()
goes to EOF |
static Term |
toTerm(java.lang.String st)
Static service to get a term from its string representation |
static Term |
toTerm(java.lang.String st,
OperatorManager op)
Static service to get a term from its string representation, providing a specific operator manager |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int TERM
public static final int EOF
public static final int ERROR
| Constructor Detail |
public Parser(OperatorManager op,
java.lang.String theoryText)
public Parser(java.lang.String theoryText)
| Method Detail |
public int readTerm(boolean endNeeded)
public static Term toTerm(java.lang.String st)
throws InvalidTermException
InvalidTermException
public static Term toTerm(java.lang.String st,
OperatorManager op)
throws InvalidTermException
InvalidTermExceptionpublic int getCurrentPos()
public int getCurrentLine()
public Term getCurrentTerm()
public int getCurrentTermType()
public alice.tuprolog.Tokenizer getTokenizer()
public void skip()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||