summaryrefslogtreecommitdiff
path: root/test/bug145.ci.re
blob: 9cf0793d6479deaba033b5e11e91df93886c6f4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <stdio.h>

/*!types:re2c*/

int test(const char* str)
{
    const unsigned char* YYCURSOR = (const unsigned char*)str;
    const unsigned char* YYMARKER;
    const unsigned char *YYCTXMARKER;
    int c = yycinit;

    /*!re2c
        re2c:define:YYCTYPE = "unsigned char";
        re2c:yyfill:enable = 0;
        re2c:define:YYGETCONDITION = "c";
        re2c:define:YYGETCONDITION:naked = 1;
        re2c:define:YYSETCONDITION = "c = @@;";
        re2c:define:YYSETCONDITION:naked = 1;

        //<*>* { return 0; }
        <init>* { return 0; }
        <init>"A" :=> C2
        <C2>* { return 0; }
        <C2>"B" { return 1; }
    */
}

int main()
{
    printf("%d\n", test("AB"));
    return 0;
}