These toy-intepreters are very useful for putting scripting support in your applications.
I recently wrote something similar for allowing evaluation to be applied to arbitrary golang objects/structures - so that I could write simple scripts rather than hard-coding logic in my application.
With only a few primitives it becomes very useful!
3 comments
[ 5.7 ms ] story [ 22.0 ms ] threadSee more at : https://en.wikipedia.org/wiki/Shunting-yard_algorithm
I recently wrote something similar for allowing evaluation to be applied to arbitrary golang objects/structures - so that I could write simple scripts rather than hard-coding logic in my application.
With only a few primitives it becomes very useful!
https://github.com/skx/evalfilter