Rob Pike Builds a Go Lexer with State Functions
GoogleFOSSSydney · Talk · YouTube title: Lexical Scanning in Go - Rob Pike
Why it's here
HN returns to it for years as an elegant introduction to writing a lexer that is easy to follow even without a parsing background.
What it covers
Rob Pike shows how the Go text/template lexer is built, using state functions, goroutines and channels. The talk was given at a Google Technology User Group in Sydney in 2011.