-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
The current parser implementation has the problem that the associativity of multiplication and division is reversed. Thus, 3 / 4 * 5 is parsed as 3 / (4 * 5) instead of the correct (3 / 4) * 5. The current approach of parsing the left-hand side of an expression one precendence-level lower and the right-hand side at the same level won't work now since making the left-hand side same level would make the parser left-recursive (infinite recursion). The best approach is probably to parse operands in a loop.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels