by ImprobableTruth · 6y ago · 0 comments
(3) Exp -> Exp2
(4) Exp2 -> Exp2 * Exp3
(5) Exp3 -> Exp2 / Exp2
(6) Exp2 -> Exp3
There are reasons why we usually give variables more meaningful names than var1, var2, var3.(Obviously I agree that if the parser can be expanded dynamically with operators with numeric priorities, then you need numeric priorities. But that is a very different case.)