5 ms·
The problem with that is that math expressions are just another grammar from the point of view of the parser generator, so if that is handled incorrectly then t
by jules 8y ago
The problem with that is that math expressions are just another grammar from the point of view of the parser generator, so if that is handled incorrectly then the parser generator is broken. You see this problem in recursive descent parser generators that try to handle left recursion. In other words, incorrect handling of precedence is just one symptom of the bug. If you hand write the parser then you can work around that on a case by case basis, but a parser generator should be correct on all grammars.