github.com/chronos-tachyon/go-runestream (go): Package runestream implements streaming decodes of text data.  Using RuneStream is conceptually similar to using ReadRune() / UnreadRune() from bufio.Reader, but with unbounded backtracking and a mechanism for explicitly managing how deep the backtracking state goes.  RuneStream also tracks the human-friendly position (lines and columns) of each character within the text file, and it has some convenience methods for extracting multi-rune sequences that match a pattern.  Bare-bones usage:  Advanced usage:  Save points:
Keywords: lexer|lexing