~/talk

"Parsing Expression Grammars (PEG)"

Talkat Gopherpalooza 2019 · on Friday, 2019-11-08· [go]
slides:none on file

A go.mod parser is built in about 20 minutes using PEGs and Pigeon (github.com/MNA/pigeon) to generate Go code, with go generate driving regeneration and action blocks producing go.mod manifest structs from parsed text. Tests drive the grammar evolution from a permissive any-character rule to rules that parse module name, go version and single or parenthesized dependency lists. Noteable details: conversion pain from pigeon returning []interface{} and earlier regex-to-parser work improving render times by two orders of magnitude.

AI-written summary · about

  1. 0:00Start
  2. 1:13Let's use regexes!
  3. 3:14Parsing Expression Grammars
  4. 4:30Project Layout
  5. 7:37Tests!
  6. 13:24Parsing Dependencies
  7. 15:33Multiple Dependencies
~/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.