Hello Go community!
It is an old project: the first release was in 1993. It has been used in the C world for many years, but the Go backend has been added only recently. The tool is a preprocessor for Go programs (to be used with `go generate`) that compiles declarative regular expression specifications to a deterministic finite automaton. It is well suited for all kinds of lexical analyzers starting from small string-processing routines and up to full-sized tokenizers for programming languages, etc.
The key features of re2c are:
- generating fast lexers that match or exceed the speed of hand-written code
- flexible user interface that allows to use it in different environments and with different input models
- fast submatch extraction based on the lookahead-TDFA algorithm
Resources:
Feedback from the Go community is welcome!
Ulya Trofimovich