Time flies like an arrow, fruit flies like a banana
summary
Shows why natural language garden-path ambiguity maps to code parsing and demonstrates a working Ruby example: a StringScanner tokenizer feeding a parser that builds ASTs for simple math (handles parentheses, plus/times). Compares hand‑rolled recursive descent (easy but can loop and mis-handle associativity) with bottom‑up shift‑reduce (stack reductions, LR style), cites parser generators like Yacc/Bison/Racc, and argues regexes fail for non‑regular grammars such as URLs.
AI-written summary · about
chapters (11)
- 0:00Start
- 3:01ADA DEVELOPERS
- 6:32Garden Path Sentences
- 7:15GRANDMOTHER OF EIGHT MAKES HOLE IN ONE
- 7:29EYE DROPS OFF SHELF
- 7:40MILK DRINKERS ARE TURNING TO POWDER
- 9:29The young man drank beer"/ "The young man the boat
- 13:25Slightly Harder Math Rules
- 17:06Problems with Recursive Descent parsers
- 24:08Language Hierarchy
- 28:16Conclusion
related talks
32mTime flies like an arrow; Fruit flies like a banana: Parsers for Great Good
46mGrammar a BNF like Ruby DSL Parsing
52mA bird's eye view of a parser
50mSyntaxation
29mMy Little Parser: Tooling is Magic
48mRapid Programming Language Prototypes with Ruby RACC
26mLiberating Ruby's Parser from Lexer Hacks
26mSlaying the Dragon
