Alright fixed all 3 of those problems you gave PFA as well as added support for arrays. It's all in the top post.
PHP Code:
this.evl("(3*(1+2))*2");
This didn't work because there was a problem when sending nested parantesses. It would actually call convertToPostFix(3*1+2) instead of convertToPostFix(3*(1+2)). Works now after adding 2 small lines of code.
PHP Code:
this.evl("3--2");
If you put this into Graal, it will give you a compile error actually. Since I added support for negatives, just do 3- -2 or so.
PHP Code:
this.evl("3-(-2.2)");
Works now since I added support for negatives. Basically it will use - as an operator if there was no operator proceding it. Otherwise it just adds it to the operand. Probably will not work right if you did something like:
Since it will try to get makevar("-this.foo") which doesn't exist. I will fix that later too.