Parsing errors : "0+(-0)-0+1" and "6+((7-2)/5-9)*0.5-2+1" :)

Nov 20, 2010 at 1:51 AM
Edited Nov 20, 2010 at 2:05 AM

Parsing in sample demo application of expression

"6+((7-2)/5-9)*0.5-2+1" equals "-1" which is not correct

Also, in you program,

"6+((7-2)/5-9)*0.5-2"  equals "0"which is correct
"6+((7-2)/5-9)*0.5-2+1" equals "-1" which is incorrect
"6+((7-2)/5-9)*0.5-2+1+1" euqals to "-2" which is incorrect
"6+((7-2)/5-9)*0.5-2+1+1+1" euqals to "-3" which is incorrect
"6+((7-2)/5-9)*0.5-2+1+1+1+1" euqals to "-4" which is incorrect
"6+((7-2)/5-9)*0.5-2+1+1+1+1+1" euqals to "-5" which is incorrect, e.t.c

Happy coding!

P.S.

Later in night, i tested the results on a perfectly simple test case:

0+(-0)-0+1 == -1
0+(-0)-0+1+1== -2
0+(-0)-0+1+1+1== -3
0+(-0)-0+1+1+1+1 == -4
0+(-0)-0+1+1+1+1+1== -5

Your parser is working perfecty, but unfortunately producing an incorrect results.

I think you must review you sorce code base before solving this issue.

Happy coding!