RISC JKU

at.jku.risc.stout.urauc.data

Class InputParser<T extends Equation>



  • public class InputParser<T extends Equation>
    extends Object
    Tiny term parser with the following rules:
    • [A-Za-z1-9_.] are allowed for variable names and function names. Names can be of any length.
    • If the name is followed by an opening parenthesis a FunctionSymbol will be generated.
      • If the function name starts with an upper case letter and the first letter of the name is within [VARIABLE_START, z], it will be transformed into a context variable.
      • Else if the function name starts with an upper case letter, it will be transformed into a function variable.
      Parameter inside the pair of parenthesis are wrapped in a Hedge
    • Else if the name starts with HOLE_NAME a Hole will be created.
    • Else if the first letter of the name is within [ VARIABLE_START, z] an individual variable will be generated.
    • Else a FunctionSymbol with zero parameters (=constant) will be generated.
    Author:
    Alexander Baumgartner