Code example
Expression e1 = new Expression("2+3");
Expression e2 = new Expression3+4");
e1.checkSyntax();
e2.checkSyntax();
System.out.println("----- START");
System.out.println(e1.getErrorMessage());
System.out.println(e2.getErrorMessage());
System.out.println("----- END");
Code result:
----- START
[2+3] checking ...
[2+3] no errors.
[3+4] checking ...
[3+4] no errors.
----- END
Should be:
----- START
[2+3] checking ...
[2+3] no errors.
[3+4] checking ...
[3+4] no errors.
----- END