4 ms·
If you want to implement an interpreter for a small language, in my experience, it is better to compile it to create an Abstract Syntax Tree with an eval functi
by fjfaase 6y ago
If you want to implement an interpreter for a small language, in my experience, it is better to compile it to create an Abstract Syntax Tree with an eval function. I have tried this approach in my Crystal Edit MySample clone with extended functionality. The build in script can be used to manipulate images. The scripting language has no functions and procedures, but for image manipulation scripts, this is usually no big deal. See more details, source code and example script (in the entries of my blog): http://www.iwriteiam.nl/MySample.html http://www.iwriteiam.nl/MySample.html