Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (23 sloc) 1.22 KB

Writing DSLs with Parslet

by Jason Garber


A well-designed DSL improves programmer productivity and communication with domain experts. The Ruby community has produced a number of very popular external DSLs--Coffeescript, HAML, SASS, and Cucumber to name a few.

Parslet makes it easy to write these kinds of DSLs in pure Ruby. In this talk you’ll learn the basics, feel out the limitations of several approaches and find some common solutions. In no time, you’ll have the power to make a great new DSL, slurp in obscure file formats, modify or fork other people’s grammars (like Gherkin, TOML, or JSON), or even write your own programming language!

Additional Notes

Jason has learned much about parsing since finishing whytheluckystiff’s RedCloth Ragel rewrite in 2008. He’s explored a number of parsing libraries and approaches, used Parslet to do natural language parsing for client work, and is currently rewriting RedCloth in Parslet. Jason is a Ruby developer at PromptWorks in Philadelphia.