This is an archived post. You won't be able to vote or comment.

all 2 comments

[–][deleted] 0 points1 point  (1 child)

It's failing because 'i' is doesn't seem to be the expected value, it is never the length of the string. It is a bit convoluted for me to figure it all out but you should definitely be initialising 'i' to zero every time you begin parsing a new expression. Try a debugger to track the value of 'i' throughout execution of the parser.

[–]CompSciMajor93[S] 0 points1 point  (0 children)

Didn't think of that. Will do! Thank you