RE2C: A lexer generator based on lookahead-TDFA

Ulya Trofimovich · Software Impacts · 2020

RE2C is a regular expression compiler: it transforms regular expressions into finite state machines and encodes them as programs in the target language. At the core of RE2C is the lookahead-TDFA algorithm that allows it to perform fast and lightweight submatch extraction. This article describes the algorithm used in RE2C and gives an example of TDFA construction.

Read the paper · More papers on PaperTik