/usr/share/doc/re2c/examples/c
// re2c $INPUT -o $OUTPUT --case-ranges -i int lex(const char *YYCURSOR) { // C/C++ code /*!re2c re2c:define:YYCTYPE = char; // configurations re2c:yyfill:enable = 0; // // alpha = [a-zA-Z]; // named definitions ident = alpha (alpha | [0-9])*; // // ident { return 0; } // rules * { return 1; } // */ } // // int main() { // C/C++ code return lex("qwerty42"); // } //
.
Edit
..
Edit
01_basic.c
Edit
01_basic.re
Edit
__run_all.sh
Edit
conditions
Edit
encodings
Edit
eof
Edit
fill
Edit
generic_api
Edit
headers
Edit
includes
Edit
real_world
Edit
reuse
Edit
state
Edit
submatch
Edit