4 ms·
A while back I saw this video (link in the readme) showing the shunting yard algorithm and I decided to implement it in JavaScript. Here's the link to the repo
by atum47 2y ago
A while back I saw this video (link in the readme) showing the shunting yard algorithm and I decided to implement it in JavaScript.
Here's the link to the repository https://github.com/victorqribeiro/shuntingYard https://github.com/victorqribeiro/shuntingYard
Let me know what you think
- trealira 2y agoI like how simple it is. Thanks for sharing. By the way, I found one or two bugs. The empty parentheses alone are treated as undefined: > () undefined And I think any equation using empty parentheses as an expression gets treated as NaN: > 5 + () NaN Empty parentheses should probably just be a parse error.