~/talk

Parsing Expressions in Ruby

Talkat MountainWest RubyConf 2011 · 2011-03-17..03-18· [ruby]
slides:none on file

Regular expressions deadlock on deeply nested or ambiguous input and one URL regex stalls processes for tens of seconds; this shows why parsing expressions are recursive and avoid backtracking. The demo replaces Treetop with Citrus, a Ruby PEG library that builds parse trees with semantic blocks, converts RFC rules (including RFC3986 and IPv6) into code, evaluates math like Ruby, and reports readable errors; author claims turning an RFC into a working parser in RFC3986 spec→grammar in 25 minutes and the parser runs fast and maintainable.

AI-written summary · about

  1. 0:00Start
  2. 6:43What do we need?
  3. 9:39FLEXIBLE
  4. 13:50$ gem install citrus
  5. 15:14SYNTAX
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.