An implementation of the Shunting Yard algorithm (wiki) written in LUA.
Fiddle: https://www.jdoodle.com/ia/KMT
- LUA 5.4.6
local expression = "2 + 2"
local postfix = shuntingYardAlgorithm(expression)
print("Postfix:", table.concat(postfix, " "))
Show your support! Your (non-tax deductible) donation of Monero cryptocurrency is a sign of solidarity among web developers.
Being self taught, I have come a long way over the years. I certainly do not intend on making a living from this free feature, but my hope is to earn a few dollars to validate all of my hard work.
Monero Address: 447SPi8XcexZnF7kYGDboKB6mghWQzRfyScCgDP2r4f2JJTfLGeVcFpKEBT9jazYuW2YG4qn51oLwXpQJ3oEXkeXUsd6TCF