~/talk

Parsing from first principles

Talkat WebCamp Zagreb 2019 · 2019-10-11..10-12· [compilers-and-language-design]
slides:none on file

Builds a working SQL subset parser in Elixir using parser combinators (char, satisfy, choice, many, map, sequence, token, separated_list) and a lazy combinator to handle recursion for subqueries. Demo is ~160 lines and produces an AST map for SELECT columns and FROM (identifiers or subqueries); a production version grew to ~1,500 lines. Error reporting is basic; recommends adding position tracking, a two‑pass lexer, or using NimbleParsec for performance while keeping the combinator workflow for clarity.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 3:51Why avoid parsing fear
  3. 11:52Parser combinators introduction
  4. 23:11Parsing single characters
  5. 33:29Building identifier parser
  6. 40:12Handling whitespace and tokens
  7. 44:06Parsing SQL keywords
  8. 47:18Select statement structure
  9. 53:20Supporting subqueries
  10. 55:06Error handling challenges
  11. 59:21Final impressions and lessons
  12. 1:02:09Q&A and closing
~/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.