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
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
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
190
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
2
150
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
230
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
240
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
200
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
330
Nuxt Server Components
wattanx
0
240
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
170
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
130
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
250
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
400
感情を設計する
ichimichi
5
1.1k
Featured
See All Featured
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
260
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Designing Experiences People Love
moore
143
24k
RailsConf 2023
tenderlove
30
1.4k
Producing Creativity
orderedlist
PRO
348
40k
Deep Space Network (abreviated)
tonyrice
0
110
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
170
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.4k
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?