public static void main(String args[]) throws MalformedParenthesisException, InvalidOperandException, MalformedTokenException, MalformedDecimalException {
		
		while(true) {
		System.out.print("Welcome. Please enter an expression: ");
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
	      String inputExpression = null;

	      //  read the username from the command-line; need to use try/catch with the
	      //  readLine() method
	      try {
	         inputExpression = br.readLine();
	      } catch (IOException ioe) {
	         System.out.println("IO error trying to read your name!");
	         System.exit(1);
	      }

	      if(inputExpression.equals("exit") || inputExpression.equals("Exit"))
	    	  System.exit(0);
	      
	      try {
	      Expression e = new Expression(inputExpression);
	      
	      	System.out.println("Evaluates to: " + Double.valueOf(e.getExpressionValue()));
	      } catch (IllegalArgumentException e) {
	    	  
	    	  System.out.println(e.getLocalizedMessage());
	      }
	      
		}
	}