public class Parser extends java.lang.Object implements IParser, java.io.Serializable
Constructor and Description |
---|
Parser(java.io.InputStream theoryText)
creating a parser with default operator interpretation
|
Parser(OperatorManager op,
java.io.InputStream theoryText)
creating a Parser specifing how to handle operators
and what text to parse
|
Parser(OperatorManager op,
java.lang.String theoryText)
creating a Parser specifing how to handle operators
and what text to parse
|
Parser(OperatorManager op,
java.lang.String theoryText,
java.util.HashMap<Term,java.lang.Integer> mapping)
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
|
Parser(java.lang.String theoryText,
java.util.HashMap<Term,java.lang.Integer> mapping)
creating a parser with default operator interpretation
|
Modifier and Type | Method and Description |
---|---|
int |
getCurrentLine() |
int |
getCurrentOffset() |
java.util.HashMap<Term,java.lang.Integer> |
getTextMapping() |
static boolean |
isAtom(java.lang.String s) |
java.util.Iterator<Term> |
iterator() |
Term |
nextTerm(boolean endNeeded)
Parses next term from the stream built on string.
|
int[] |
offsetToRowColumn(int offset) |
static Term |
parseSingleTerm(java.lang.String st)
Static service to get a term from its string representation
|
static Term |
parseSingleTerm(java.lang.String st,
OperatorManager op)
Static service to get a term from its string representation,
providing a specific operator manager
|
public Parser(OperatorManager op, java.io.InputStream theoryText)
public Parser(OperatorManager op, java.lang.String theoryText, java.util.HashMap<Term,java.lang.Integer> mapping)
public Parser(OperatorManager op, java.lang.String theoryText)
public Parser(java.lang.String theoryText, java.util.HashMap<Term,java.lang.Integer> mapping)
public Parser(java.lang.String theoryText)
public Parser(java.io.InputStream theoryText)
public java.util.Iterator<Term> iterator()
public Term nextTerm(boolean endNeeded) throws InvalidTermException
nextTerm
in interface IParser
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(java.lang.String st) throws InvalidTermException
InvalidTermException
public static Term parseSingleTerm(java.lang.String st, OperatorManager op) throws InvalidTermException
InvalidTermException
public java.util.HashMap<Term,java.lang.Integer> getTextMapping()
public int getCurrentLine()
getCurrentLine
in interface IParser
public int getCurrentOffset()
getCurrentOffset
in interface IParser
public int[] offsetToRowColumn(int offset)
offsetToRowColumn
in interface IParser
public static boolean isAtom(java.lang.String s)