~/talk

Text Parsing the Case for Monads

Talkat PyCon Israel 2017 · 2017-06-11..06-13· [functional-programming, python]
name:Yoav Luft
links:none on file
slides:none on file

Compares two concrete Python parser libraries: pyparsing (2001) and a Python port of Parsec, showing identical CSV parsers where pyparsing gives a richer result object and Parsec requires manual trimming but is terser. Implements a counted-field parser that fails early and a CSV builder that returns nested lists. Demonstrates parser combinators implemented as functions/classes and a generator decorator that turns a generator yielding parsers into a single parser, binding intermediate results and short‑circuiting on failures. Notes monads (Either/Maybe) power the bind semantics.

AI-written summary · about

  1. 0:00Introduction
  2. 1:04Text parsing overview
  3. 2:21Limitations of Yacc
  4. 4:33Parsing libraries in Python
  5. 7:24Comparing parsing methods
  6. 8:57Combinator design pattern
  7. 10:12Implementing combinators
  8. 13:11Understanding monads
  9. 18:55Monadic parsing logic
  10. 21:35Generator-based parsing
  11. 24:01Conclusion and history
~/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.