Main Content

Parsing Expressions in Ruby

About the Talk

September 4, 2010 5:00 AM

Nashville, TN

Nashville, TN

Parsing expressions are a relatively new technique for creating parsers (and even interpreters) simply and quickly. Several popular Ruby projects make use of parsing expression grammars to parse relatively complex grammars, including Rails' new mail gem and Less CSS. In short, parsing expressions are a very handy tool that programmers can use whenever they need to parse something that can't really be expressed using regular expressions. The most popular library for creating parsing expression grammars in Ruby is currently Treetop. I tried to get into Treetop, but I found the codebase difficult to understand and a bit awkward. So I created my own library for parsing expressions called Citrus. I'd like to talk about both libraries, and spend more time on the idea of parsing expressions instead of touting a specific lib though.

Ratings and Recommendations

Avg. Rating

Average based
on 13 ratings

comments powered by Disqus