3 ms·
FWIW I encountered re2c in the Ninja lexer https://github.com/ninja-build/ninja/blob/master/src/lexer.in.cc#L123 https://github.com/ninja-build/ninja/blob/mast
by chubot 8y ago
FWIW I encountered re2c in the Ninja lexer
https://github.com/ninja-build/ninja/blob/master/src/lexer.in.cc#L123 https://github.com/ninja-build/ninja/blob/master/src/lexer.i...
and then used it for my own huge shell lexer:
The Oil Lexer: Introduction and Recap http://www.oilshell.org/blog/2017/12/15.html http://www.oilshell.org/blog/2017/12/15.html
The nice thing about it is that it doesn't impose any constraints on the structure of your code.
lex/flex probably have options not generate piles of messy C code with global variables at this point, but IMO there's no reason not to use re2c instead, so it's moot.