A lexer skeleton based on the design of the go template parser: https://golang.org/pkg/text/template/parse/