logoalt Hacker News

qalmakka • today at 9:40 AM • 0 replies • view on HN

If you use the shunting yard algorithm or similar for infix binary operators it's trivial to define a table with operator precedence values and use that. You can have a bunch of operators all at the same priority but it is the same complexity really, the algorithm is pretty trivial