at.jku.risc.stout.urauc.data
public class InputParser<T extends Equation> extends Object
Modifier and Type | Field and Description |
---|---|
static char |
CLOSING_PARENTHESIS |
static char |
HOLE_NAME
default = '@' => Any word starting with '@' will become a hole.
|
static char |
OPENING_PARENTHESIS |
static char |
VARIABLE_START
default = 'u' => A word starting with 'u-z' will become a variable.
VARIABLE_START has to be a lower case letter! Context variables are denoted by upper case letters. |
Constructor and Description |
---|
InputParser(EquationSystem<T> sys) |
Modifier and Type | Method and Description |
---|---|
boolean |
isNameChar(int codePoint) |
static Alignment |
parseAlignment(AntiUnifyProblem aup,
String alignment,
boolean checkAdmissible) |
static Set<TermAtom> |
parseAtomSet(String atomsCSV) |
void |
parseEquationSystem(String aupsIn)
Parses a system of anti-unification equations which are separated by
semicolon.
|
T |
parseHedgeEquation(Reader leftHedge,
Reader rightHedge)
A hedge equation has the form:
(s1, s2,...) =^= (t1, t2,...) |
TermNode |
parseTerm(Reader in) |
TermNode |
parseTerm(String in)
Use parseTerm(Reader) if possible! It performs much better
and saves space by reading directly from the data stream!!!
|
void |
reset()
Resets the state of the parser.
|
public static char CLOSING_PARENTHESIS
public static char HOLE_NAME
public static char OPENING_PARENTHESIS
public static char VARIABLE_START
public InputParser(EquationSystem<T> sys)
public boolean isNameChar(int codePoint)
public static Alignment parseAlignment(AntiUnifyProblem aup, String alignment, boolean checkAdmissible) throws IllegalAlignmentException
IllegalAlignmentException
public void parseEquationSystem(String aupsIn) throws MalformedTermException
MalformedTermException
public T parseHedgeEquation(Reader leftHedge, Reader rightHedge) throws IOException, MalformedTermException
leftHedge
- The left sequence (s1, s2,...)rightHedge
- The right sequence (t1, t2,...)IOException
MalformedTermException
public TermNode parseTerm(Reader in) throws IOException, MalformedTermException
IOException
MalformedTermException
public TermNode parseTerm(String in) throws IOException, MalformedTermException
IOException
MalformedTermException
public void reset()