Changeset View
Changeset View
Standalone View
Standalone View
devel/re2c/pkg-descr
re2c is a tool for generating C-based recognizers from regular | Re2c is a free and open-source lexer generator for C, C++ and Go with a | ||||
expressions. re2c-based scanners are efficient: for programming | focus on generating fast code. It compiles regular expression | ||||
languages, given similar specifications, an re2c-based scanner is | specifications to deterministic finite automata and encodes them in the | ||||
typically almost twice as fast as a flex-based scanner with little or no | form of conditional jumps in the target language. This approach is | ||||
increase in size (possibly a decrease on cisc architectures). Indeed, | generally faster than table-based lexers, and the generated code is easier | ||||
re2c-based scanners are quite competitive with hand-crafted ones. | to debug and understand. A flexible user interface allows one to adapt the | ||||
generated lexer to a particular environment and input model, avoiding the | |||||
overhead on unnecessary checks and buffers. Re2c is based on the lookahead | |||||
TDFA algorithm that allows it to perform fast and lightweight submatch | |||||
extraction. | |||||
WWW: http://re2c.org/ | WWW: https://re2c.org/ |