Parser derivation

Parsers and Functional Programming

Monadic parsers

This lecture

A simple EDSL for parsing

Reference semantics

Parser0: our first implementation

code

Parser1: removing bind

code

Transforming parsers of type Parser0 into parsers of type Parser1

Parser2: improving choice

code

Transforming parsers of type Parser1 into parsers of type Parser2

Parser3: optimizing (>>=)

Summary