here is my expression parser using shunting-yard algorithm it work well as expected except in one situation , when I use unary minus like in -2*3 it wont work (I think it s
One option is to put a 0 in front if the first character is '-'. You have to do this also when the - is after a (.
Nicer ones are implementing either the unary minus operator or treating it as part of the number literal.