~/talk

Demystifying Parsers

Talkat Elm Conf 2018 · on Wednesday, 2018-09-26· [compilers-and-language-design]
slides:none on file

Shows how to parse YAML-like lists in Elm by actually building a parser with elm/parser and using concrete combinators: chompWhile, chompIf, getChompString, loop and oneOf. Demonstrates that consuming a character commits the path (no backtracking), implements an inline list parser, then extends it to nested, indentation-aware lists using getColumn. Presents error-message insertion, test-driven iteration, and confirms the parsers work on examples without exotic machinery—just small helpers, recursion via loop, and careful chomp logic.

AI-written summary · about

  1. 0:00Introduction to parsers
  2. 2:24What is a parser
  3. 4:12Parser library overview
  4. 6:44Basic parsing with chomp
  5. 9:16Chomp helpers and string parsing
  6. 10:38Handling optional elements
  7. 12:53Parser commitment and failure
  8. 13:35Recursive parsing with loops
  9. 15:39Parsing inline lists
  10. 17:04Error messages in parsers
  11. 18:12Parsers are simple
  12. 18:52Testing parsers with TDD
  13. 19:14Parsing indentation in YAML
  14. 21:44Conclusion and resources
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.