2022/09-14

From SIPB Cluedumps

Jump to: navigation, search

[edit] Parsing Without Code Generators: Parser Combinators in Go with Generics

Date: September 14, 2022, at 6:00 PM
Presenters: Jeremy Brown
Location: 2-136
Abstract: Parser combinators are a composable way of building parsers in code; they stand in contrast to traditional parser generators like goyacc. They work particularly well in Go now that Go has generics, and they are remarkably easy to implement from scratch. In this tutorial, I’ll do a quick introduction to parser combinators, show you how to use a few primitives to implement a parser for a microlanguage, and dive under the abstraction layer and show you how to implement all the primitives—each in just a few lines of Go. I aim to give you an appreciation for both parser combinators as an approach to parsing, and for how much better Go generics have made life.

Programming experience is expected, not necessarily Go.

Coda: it may make a few readers happy to know that this talk will not include the following words or phrases: Functional Programming, monads, CAML, and Haskell.

Personal tools