Posts tagged dsls

Parsing Text the Racket Way

:: racket, macros, dsls, tutorials

By: Mike Delmonaco

Have you ever needed to process some raw text and extract only parts of it? Most of the time, you can get by with some nasty regular expressions with groups, but sometimes the pattern that you’re trying to process is too complicated for regular expressions. That’s what parsers are good for, and they’re also the first step in an interpreter/compiler!

In this post, we’ll discover parsers and create a domain-specific language for creating parsers in Racket.