~/talk

How to Build a Compiler

Talkat EmberConf 2016 · on Wednesday, 2016-03-30· [javascript]
slides:none on file

A working Lisp → JavaScript compiler gets built end to end: a tokenizer, recursive parser, AST traverser using a visitor, a transformer that maps into a Babel AST (with a parent context hack and top‑level calls wrapped as ExpressionStatements), and a code generator that prints identifiers numbers and semicolons. The implementation is compact at ~250 lines, translates S‑expressions to JS call expressions and commas, and is demoed live producing correct output, proving the pipeline actually works.

AI-written summary · about

  1. 0:00Introduction
  2. 1:17Why Compilers
  3. 2:07The Basics
  4. 4:26What is a Compiler
  5. 7:10Transformation
  6. 8:25Traversal
  7. 8:55Visiting
  8. 9:29Code Generation
  9. 10:20Compilers
  10. 11:50Lisp
  11. 13:15Tokenizer
  12. 16:45Parser
  13. 20:32Traverser
  14. 22:18Transformer
  15. 24:43Code Generator
  16. 25:47Pipeline
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.