Relative Content

Tag Archive for equationyacclex

Single variable equations using yacc and lex

I am making a chat using lex and yacc. Now the chat can answer different questions and make simple calculus using +, -, * and / . I want to add a functionality that permits the chat to do some simple single variable equations like ax+b=c or a+bx=c.I tried something but everytime it returns that the value of x = 0. I am not sure how to approach this problem.