Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Parsing for Humans
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Yorick Peterse
May 20, 2014
Programming
110
2
Share
Parsing for Humans
Presentation for the Amsterdam Ruby user group.
Yorick Peterse
May 20, 2014
More Decks by Yorick Peterse
See All by Yorick Peterse
Garbage Collection Crash Course
yorickpeterse
1
390
Making GitLab Faster
yorickpeterse
2
480
Rubinius & The Eternal Yak
yorickpeterse
1
280
Oga
yorickpeterse
3
210
Other Decks in Programming
See All in Programming
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
640
Symfony AI in Action - SymfonyLive Berlin 2026
chr_hertel
1
120
My daily life on Ruby
a_matsuda
3
180
GitHubCopilotCLIをはじめよう.pdf
htkym
0
320
10 Tips of AWS ~Gen AI on AWS~
licux
5
540
Agentic Elixir
whatyouhide
0
440
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
170
Vibe NLP for Applied NLP
inesmontani
PRO
0
600
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.4k
KMP × Kotlin 2.3 - How Android Got Slower While iOS Builds Improved by 47%
rio432
0
130
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
140
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
140
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
280
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
270
Code Reviewing Like a Champion
maltzj
528
40k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
290
Paper Plane
katiecoart
PRO
1
49k
First, design no harm
axbom
PRO
2
1.2k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Building the Perfect Custom Keyboard
takai
2
750
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
190
Transcript
Parsing For Humans
@yorickpeterse (Github, Twitter, Gmail, etc)
Olery http://olery.com/
Parsing “Analysing a string of symbols according to the rules
of a grammar.”
10 + 10
number = [0-9]+ operator = “+”
Vocabulary Token, AST, Lexer & Parser
Token A label for a specific part of the input.
10 [:INTEGER, “10”]
Abstract Syntax Tree A tree structure representing the input.
Markdown Lists * Item * Nested item
(unordered-list (list “Item” (unordered-list (list “Nested item”))))
Lexer Takes raw input and returns a sequence of tokens.
Parser Takes tokens as input and returns an AST.
Available Tools
ANTLR, Bison, Coco/R, Flex, Happy, Lemon, jQuery, Parslet, Racc, Ragel,
Rexical, Treetop, Yacc
Ragel & Racc
Ragel “A finite state machine compiler.”
“<!--” any* “-->” => { … };
$ ragel -R lexer.rl -o lexer.rb
Racc “A LALR(1) parser generator.”
expression : NUMBER OPERATOR NUMBER { … } ;
$ racc -o parser.rb parser.y
Oga Parsing XML/HTML in Ruby https://github.com/yorickpeterse/oga
Questions?