a070b1eb31
This is basically the same concept as lex, except this time it doesn't turn your code inside out, and it generates actual C code to parse the expressions (not tables), and the resulting code is usually about 2 times faster than flex.
6 lines
405 B
Text
6 lines
405 B
Text
re2c is a tool for generating C-based recognizers from regular
|
|
expressions. re2c-based scanners are efficient: for programming
|
|
languages, given similar specifications, an re2c-based scanner is
|
|
typically almost twice as fast as a flex-based scanner with little or no
|
|
increase in size (possibly a decrease on cisc architectures). Indeed,
|
|
re2c-based scanners are quite competitive with hand-crafted ones.
|