Parsing Ruby
summary
Builds a simple grammar, implements lexical tokenization and shift/reduce parsing, and shows concrete tradeoffs: the standard-library Ripper hooks scanner and reduction events (about 200 handlers) so comment extraction and token streams work out of the box, but node values like a super call with args are nil unless handler logic or the sexp builder subclass is used. Compares yak/bison parser generators, parser gem, reparser, Tree-sitter and how each stays current or breaks with new Ruby syntax.
AI-written summary · about
chapters (18)
- 0:00Start
- 0:43Kevin Newton
- 1:58Game Plan
- 3:23Addition
- 5:08Parentheses
- 10:31Parser Generator
- 10:45Operator Precedence
- 11:33Building Up a Syntax Tree
- 12:09Syntax Tree
- 12:35History of the Repressor
- 14:08Ruby 1 0
- 15:31Streaming Concatenation
- 18:53Parse Tree
- 19:57Ruby Parser
- 20:38Ruby Intermediate Language
- 21:17Parser Gen
- 23:04Ruby Issue Tracker
- 24:50How Ripper Works
related talks
32mTime flies like an arrow; Fruit flies like a banana: Parsers for Great Good
43mGrammars, Parsers, and Interpreters, In Ruby
46mGrammar a BNF like Ruby DSL Parsing
26mLiberating Ruby's Parser from Lexer Hacks
52mTreetop: Syntactic Analysis with Ruby
29mHow does Lrama make the Ruby parser grammar G.O.A.T.?
27mGenerate Parsers! Prevent Exploits!
37mRuby Parser In IRB 20th Anniversary...Now Let Time Resume
