Unsolved how to parse a Math Equation from string to expression?
-
how to parse a Math Equation from string to expression?
eg.i got this strinig from UI: "a+b-cd/e+f3+10012", how can i get the expression(which means a+b-cd/e+f3+10012 in code), can later, i can just caculate this equation whenver i want: int x = a+b-cd/e+f3+100*12; -
-
If you wish to correctly parse expressions, then this book you need to read: Compilers-Principles-Techniques-Alfred-Aho