Equation := Expression '=' Expression
Expression := Term { ('+' | '-') Term }
Term := Factor { '*' Factor }
Factor := Number | 'x' | '(' Expression ')'
Number := Digit | Digit Number
Digit := '0' | '1' | ... | '9'
x+x+x=10
4*x+2=19
3*x=3*x+1+2+3
(42-6*7)*x=2*5-10
Equation #1
x = 3.333333
Equation #2
x = 4.250000
Equation #3
No solution.
Equation #4
Infinitely many solutions.