Parsing for Fun & Profit
Thursday 21st February 6:00pm at The Manchester Digital Laboratory (MadLab)
Parsers aren’t just useful for building compilers and interpreters. They can also come in handy for much simpler applications, e.g. transforming data structures, calculating metrics or minifying code. During this talk, Ash will guide us through the process of building a syntax highlighter for Ruby, in Ruby! He’ll show us how to:
- Define the syntax for a simple subset of Ruby
- Write a grammar file in Treetop one rule at a time (doing it TDD with RSpec, of course)
- Walk the data structure constructed by the Treetop parser
- Transform this syntax tree into HTML, to be syntax highlighted with CSS
Ash Moran is a freelance software developer & agile coach based in Manchester, and owner of PatchSpace Ltd. He has been using Ruby for many years, and has yet to find another language that makes writing high quality software so much fun.
As always, all are welcome; whether you’re a Ruby pro or a complete noob.
- 6:00pm :: Ruby/Rails Advice Drop-in Session – All levels welcome.
- 7:00pm :: Talk: Parsing for Fun & Profit by Ash Moran
- 7:45pm :: Q&A
- After :: Post-talk drinks and discussion in Common