I would like to know if anyone has the information or experience how to do that which is easy but it does not appear when This is the idea of trying to program: for example a string in which there is an equation: "2 * x = 10" for example (this is simple, but it can be very complex, such as sqrt (54) * 35 = x ^ 2; and so on ....) and the program will return x = 5 and possibly log how it will get it.
Is this possible? If yes, then does anyone lead? This site (for information) is what does the same thing in PHP but not open source.
Thanks for any help!
This is called "parsing", and although computer science has already solved this problem As long as you do not understand it well, there is a complete computer science discipline that describes the problem solving. In C you should define the grammar of your input (possibly with the preceding rules in it), then lexical analysis on your input, then parse result and finally your parse Evaluate Tree
In languages such as Ruby, however, because you have such a full support for string manipulation and because you have such a power of such great runtime, then you have a problem with your line of the same code You can solve this with: >
Yes, it will cover more than what you ask.
/ html>
Comments
Post a Comment