public class Parser extends Object implements Serializable
Constructor and Description |
---|
Parser(InputStream theoryText)
creating a parser with default operator interpretation
|
Parser(alice.tuprolog.OperatorManager op,
InputStream theoryText)
creating a Parser specifing how to handle operators
and what text to parse
|
Parser(alice.tuprolog.OperatorManager op,
String theoryText)
creating a Parser specifing how to handle operators
and what text to parse
|
Parser(String theoryText)
creating a parser with default operator interpretation
|
Modifier and Type | Method and Description |
---|---|
int |
getCurrentLine() |
static boolean |
isAtom(String s) |
Iterator |
iterator() |
Term |
nextTerm(boolean endNeeded)
Parses next term from the stream built on string.
|
static Term |
parseSingleTerm(String st)
Static service to get a term from its string representation
|
static Term |
parseSingleTerm(String st,
alice.tuprolog.OperatorManager op)
Static service to get a term from its string representation,
providing a specific operator manager
|
public Parser(alice.tuprolog.OperatorManager op, InputStream theoryText)
public Parser(alice.tuprolog.OperatorManager op, String theoryText)
public Parser(String theoryText)
public Parser(InputStream theoryText)
public Iterator iterator()
public Term nextTerm(boolean endNeeded) throws InvalidTermException
endNeeded
- true if it is required to parse the end token
(a period), false otherwise.InvalidTermException
- if a syntax error is found.public static Term parseSingleTerm(String st) throws InvalidTermException
InvalidTermException
public static Term parseSingleTerm(String st, alice.tuprolog.OperatorManager op) throws InvalidTermException
InvalidTermException
public int getCurrentLine()
public static boolean isAtom(String s)
Copyright © 2015. All rights reserved.