From 697c1c0cd3815eee72b3eedb874fe0e044a69432 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Mon, 15 Oct 2012 17:11:14 +1100 Subject: Some bug fixes for the solver. Still doesn't work in clang, though. --- impl/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'impl/main.cpp') diff --git a/impl/main.cpp b/impl/main.cpp index 6fbbda9..e3e0ae3 100644 --- a/impl/main.cpp +++ b/impl/main.cpp @@ -50,7 +50,7 @@ Expression& treeToExpression(pANTLR3_BASE_TREE node, EquationSystem& syste Operator* op = NULL; if (name == "min") { op = new Minimum(); - } else if (name == "+") { + } else if (name == "+" || name == "add") { op = new Addition(); } else if (name == "-") { if (args.size() == 1) { @@ -58,11 +58,13 @@ Expression& treeToExpression(pANTLR3_BASE_TREE node, EquationSystem& syste } else { op = new Subtraction(); } - } else if (name == "*") { + } else if (name == "sub") { + op = new Subtraction(); + } else if (name == "*" || name == "mult") { op = new Multiplication(); } else if (name == ";") { op = new Comma(); - } else if (name == "GUARD") { + } else if (name == "GUARD" || name == "guard") { op = new Guard(); } else { std::cout << "throw exception" << *(char*)NULL; -- cgit v1.2.3