I’m currently trying to create a small DSL for a project of mine.
I’m looking for inspiration on how to fit stuff together. Anybody have links to great tutorials, guides, blogposts etc. about creating DSLs?
I’ve looked at Thoughtbots (https://robots.thoughtbot.com/writing-a-domain-specific-language-in-ruby), however I don’t find it quite fulfilling enough.
Are you looking to implement a full AST parser?
What I’m trying to actually do, is write a DSL, which allows me to easily write C++ code, for including Fortran library calls in my C++ library. So yeah… there’s that…
I just want a more thorough tutorial/guide on how to structure your module, for easily DSL making in Ruby.
Just a few from a quick search
Ruby’s has some of its own AST stuff like Ripper. Seattle.rb has ParseTree and RubyParser. Treetop is another.