elm/parser

Regular expressions are quite confusing and difficult to use. This library provides a coherent alternative that handles more cases and produces clearer code.

(Readme.md from the package)

type alias Point =
  { x : Float
  , y : Float
  }

point : Parser Point
point =
  succeed Point
    |. symbol "("
    |. spaces
    |= float
    |. spaces
    |. symbol ","
    |. spaces
    |= float
    |. spaces
    |. symbol ")"

This is a summary of the talk Demystifying Parsers by Tereza Sokol.

Basics

Pipeline

This subject is explained at 4:48 in the Video.

Strings

This subject is explained at 7:20 in the Video.

Loops

This subject is explained at 14:10 in the Video.

Error messages

This subject is explained at 17:04 in the Video.

Further Reading

Last updated