Package mepk.builtin

Class MEPKParsers

java.lang.Object
mepk.builtin.MEPKParsers

public class MEPKParsers extends Object
Parsers for expressions, etc.

Example: MEPKParsers.Expr("(> (+ x (1)) (0))").

  • Method Details

    • Expr

      public static Expression Expr(String expressionAsString)
      Parse the given expression string (in "Ghilbert format") to an Expression instance. An expression is of the form (> (+ x (1)) (0))
      Parameters:
      expressionAsString - the string to parse
      Returns:
      the parsed expression
      Throws:
      MEPKParseException - if parsing failed
    • Stat

      public static Statement Stat(String statementAsString)
      Parse the given statement string to a Statement instance. A statement is of the form DISTINCT (x y) AND (Nat x) AND (Real y) AND (> x y) ==> (Real x).
      Parameters:
      statementAsString - the string to parse
      Returns:
      the parsed statement
      Throws:
      MEPKParseException - if parsing failed