at.jku.risc.stout.hoau.data
public class InputParser extends Object
Modifier and Type | Field and Description |
---|---|
static char |
CLOSING_PARENTHESIS
default = ')'.
|
static char |
LAMBDA_NAME
default = '\' => Any word after the '\' will become a bound variable.
|
static char |
OPENING_PARENTHESIS
default = '('.
|
static char |
TYPE_CONSTRUCTOR
default = '-'.
|
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! Hedge variables are denoted by upper case letters. |
Constructor and Description |
---|
InputParser()
Like InputParser(NodeFactory, boolean) with a new
NodeFactory instance and forceType set to false.
|
InputParser(NodeFactory nodeFactory,
boolean forceType)
Constructor with the used NodeFactory.
|
Modifier and Type | Method and Description |
---|---|
<T extends Equation> |
parseEquation(Reader in1,
Reader in2,
EquationSystem<T> eqSys,
int maxReduce) |
<T extends Equation> |
parseEquationSystem(String in,
EquationSystem<T> eqSys,
int maxReduce)
Parses a string and puts all the equations into the given equation
system.
|
TermNode |
parseSequence(Reader in)
Parses a sequence of terms out of the given Reader and
returns it.
|
TermNode |
parseSequence(String in)
Use parseSequence(Reader) if possible! It performs better
and saves space by reading directly from the data stream;)
|
TermNode |
parseTerm(Reader in)
Parses a term out of the given Reader and returns it.
|
TermNode |
parseTerm(String in)
Use parseTerm(Reader) if possible! It performs better and
saves space by reading directly from the data stream;)
|
void |
tryBoundVarPrefix(String in,
String... prefix)
This method tries to find a suitable prefix for fresh bound variables.
|
void |
tryFreeVarPrefix(String in,
String... prefix)
This method tries to find a suitable prefix for fresh free variables.
|
public static char CLOSING_PARENTHESIS
public static char LAMBDA_NAME
public static char OPENING_PARENTHESIS
public static char TYPE_CONSTRUCTOR
public static char VARIABLE_START
public InputParser()
public InputParser(NodeFactory nodeFactory, boolean forceType)
public <T extends Equation> void parseEquation(Reader in1, Reader in2, EquationSystem<T> eqSys, int maxReduce) throws NotNormalizableException, MalformedTermException, IOException
public <T extends Equation> void parseEquationSystem(String in, EquationSystem<T> eqSys, int maxReduce) throws IOException, ControlledException
IOException
ControlledException
public TermNode parseSequence(Reader in) throws IOException, MalformedTermException
IOException
MalformedTermException
public TermNode parseSequence(String in) throws IOException, MalformedTermException
IOException
MalformedTermException
public TermNode parseTerm(Reader in) throws IOException, MalformedTermException
IOException
MalformedTermException
public TermNode parseTerm(String in) throws IOException, MalformedTermException
IOException
MalformedTermException
public void tryBoundVarPrefix(String in, String... prefix)
public void tryFreeVarPrefix(String in, String... prefix)