I wrote a program for drawing graphs of input functions, it remains to teach the computer to understand the entered function and transfer it to drawing. I read that
Independent writing of the parser is considered bad form
But, I cannot use any third-party libraries, especially ready-made programs (because I will not be able to google "math parser", download and embed it in the program).
Which algorithm for parsing mathematical formulas for functions is the simplest and, at the same time, efficient? I want to figure it out myself and write, moreover, I cannot do otherwise. I saw вот этот вариант , but it seemed to me not the best, although the method is good (the most similar idea came to mind), and with the number of functions and operations that I need to recognize, the length of the parser will be 10 times longer, than the rest of the program code. I am sure that there is a simpler and shorter version. I would be grateful for the help :)
Brief essence of the question: String -> parser -> готовая функция для отрисовки графиком .