3 ms·
Write a DSL. This is really easy in languages like Ruby that don't need parentheses around function parameters. You can write a Ruby DSL in a few hours and expa
by codebudo 8y ago
Write a DSL. This is really easy in languages like Ruby that don't need parentheses around function parameters. You can write a Ruby DSL in a few hours and expand on syntax, features as you like.
The next step is to actually parse code with an abstract syntax tree. The easy path here is actually javascript. There are many transpilers for JS so things like bluebird/harmony can work.
Next step is to do thing "the right way"(tm) with yak/bison and build a compilable language. For that, I suggest you read a few books on languages and understand concepts such as backus-naur form before continuing.