package ch.bfh; import ch.bfh.parser.StatementParser; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); StatementParser sp = new StatementParser(); while (true) { System.out.print("Type your expression: "); String expression = scanner.nextLine(); try { sp.parseStatement(expression); System.out.println(sp.getValue()); } catch (Exception e) { System.out.println(e.getMessage()); } } } }