Consuming Gherkin: One Byte at a Time
summary
Ragel replaces a slow treetop lexer and implements the Gherkin parser used by Cucumber, producing compact state machines, language outputs for Ruby C and Java, and an evented listener-based lexer that tests with a scan helper and test spy. The real gains are concrete: a 150× slower legacy treetop falls away to a 10–15× speedup in Ruby and another ~10× when moved to C, and the parser proves fast, polyglot, and maintainable.
AI-written summary · about
chapters (6)
- 0:00Start
- 0:06Platinum Sponsor
- 0:16Consuming Gherkin: One Byte At a Time
- 2:53Some Perfectly Normal Syntax
- 27:23What the Tests Told Us
- 28:49Test Spy Listener
related talks
52mTreetop: Syntactic Analysis with Ruby
38mTreating objects like people
32mParsing Ruby
32mTime flies like an arrow; Fruit flies like a banana: Parsers for Great Good
33mRuby the Hard Way: Writing Bytecode to Optimize Plain Ruby
30m(Re)make Regexp in Ruby: Democratizing internals for the JIT
46mGrammar a BNF like Ruby DSL Parsing
28mMaking the RBS Parser Faster
