Parsing Expressions in Ruby
summary
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
chapters (5)
related talks
43mGrammars, Parsers, and Interpreters, In Ruby
32mTime flies like an arrow; Fruit flies like a banana: Parsers for Great Good
39mRegular Expressions Inside Out
52mTreetop: Syntactic Analysis with Ruby
51mForbidden Fruit: A Test of Ruby's Parse Tree
32mParsing Ruby
33mWriting DSL's with Parslet
31mService Denied! Understanding How Regex DoS Attacks Work
