~/talk

Grammars, Parsers, and Interpreters, In Ruby

Talkat RubyConf 2010 · 2010-11-11..11-13· [ruby]
slides:none on file

Argues that parsing expression grammars (PEG) beat sprawling regular expressions for well defined formats, demonstrates two Ruby tools Citrus and Treetop, and shows a working calculator interpreter implemented in ~100 lines that reproduces Ruby operator semantics. Reports a benchmark where Citrus is about 50% faster than Treetop on ruby 1.9.2, explains match objects that extend with Ruby modules, shows decent parse error diagnostics, and cautions PEGs are poor for ambiguous natural language.

AI-written summary · about

  1. 0:00Start
  2. 3:43Parser What Is a Parser
  3. 9:45Parsing Expressions
  4. 13:23Treetop
  5. 16:07Case-Insensitive Strings
  6. 17:41Star Number Notation
  7. 22:17Demonstrations
  8. 25:31Abstract Syntax Tree
  9. 26:59Addition Grammar
  10. 31:43Semantic Data
~/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.