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
Parsers in JavaScript
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Leif Gensert
April 22, 2020
Technology
0
49
Parsers in JavaScript
This is an introduction to parsers in JavaScript with examples of PEG.js
Leif Gensert
April 22, 2020
Tweet
Share
More Decks by Leif Gensert
See All by Leif Gensert
Sorbet - Is it really that tasty?
leifg
0
55
state_of_functional_programming.pdf
leifg
0
49
Bugs - What are they good for
leifg
0
25
Building Event Sourced Apps
leifg
1
840
Unicode Spaß
leifg
0
45
Event Sourcing - The Story Telling of Processes
leifg
1
75
Elixir Releases
leifg
0
140
Introduction to Rails
leifg
0
52
JRuby - The enterprise view
leifg
1
110
Other Decks in Technology
See All in Technology
Frontier Agents (Kiro autonomous agent / AWS Security Agent / AWS DevOps Agent) の紹介
msysh
3
160
AI駆動開発を事業のコアに置く
tasukuonizawa
1
140
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.6k
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
150
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
1
430
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
460
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.2k
配列に見る bash と zsh の違い
kazzpapa3
1
130
データ民主化のための LLM 活用状況と課題紹介(IVRy の場合)
wxyzzz
2
700
2026年、サーバーレスの現在地 -「制約と戦う技術」から「当たり前の実行基盤」へ- /serverless2026
slsops
2
220
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
320
Featured
See All Featured
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
160
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
450
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
How to make the Groovebox
asonas
2
1.9k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
From π to Pie charts
rasagy
0
120
Skip the Path - Find Your Career Trail
mkilby
0
54
Producing Creativity
orderedlist
PRO
348
40k
Utilizing Notion as your number one productivity tool
mfonobong
3
220
Git: the NoSQL Database
bkeepers
PRO
432
66k
Transcript
Hello World Parsers with JavaScript
None
Programming === Hiking
Compilers Reverse Engineering Building Developer Tools
You don't Say
Every single program can be reduced to Input Transformation Output
* Former Boss
None
Human Readable Parsing Machine Readable Grammar
None
"in 11 seconds" 11 "11 seconds ago" -11 "in 5
minutes" 300 "in 1 minute and 30 seconds ago" 90 "now" 0
Leif Demo
// 1 + 2 add(1,2) // 1 + (5 -
3) add(1, subtract(5,3)) // 1 + 5 * 3 add(1, multiply(5,3)) // (1 + 5) * 3 multiply(add(1,5), 3)
Leif Demo
What else? Domain Specific NLP Config Files (Re)Implement Programming Languages
Abstract Syntax Tree add(1, multiply(5,3)) { type: "callExpression", name: "add",
arguments: [1 { type: "callExpression", name: "add", arguments: [5, 3] }] }
Why?
Focus!
None
Leif Demo
- Parsers seem intimidating - Helps you understand Recursion -
Try out formulon.io
Shopping List
Back
Back