From afda4f08a7a749e191197d173d7228c8b05eab96 Mon Sep 17 00:00:00 2001 From: helly Date: Sat, 9 Jul 2005 18:34:20 +0000 Subject: [PATCH] - More tests --- test/input5.c | 30 ++++++++++++++++++++++++++++++ test/input5.re | 6 ++++++ test/input6.c | 25 +++++++++++++++++++++++++ test/input6.re | 6 ++++++ 4 files changed, 67 insertions(+) create mode 100755 test/input5.c create mode 100755 test/input5.re create mode 100755 test/input6.c create mode 100755 test/input6.re diff --git a/test/input5.c b/test/input5.c new file mode 100755 index 00000000..d6501068 --- /dev/null +++ b/test/input5.c @@ -0,0 +1,30 @@ +/* Generated by re2c */ +#line 1 "input5.re" + +#line 5 "" +{ + YYCTYPE yych; + goto yy0; + ++YYCURSOR; +yy0: + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case 'a': goto yy2; + default: goto yy4; + } +yy2: ++YYCURSOR; + goto yy3; +yy3: +#line 3 "input5.re" +{ return 0; } +#line 22 "" +yy4: ++YYCURSOR; + goto yy5; +yy5: +#line 4 "input5.re" +{ return 1; } +#line 28 "" +} +#line 6 "input5.re" + diff --git a/test/input5.re b/test/input5.re new file mode 100755 index 00000000..7ea16ad4 --- /dev/null +++ b/test/input5.re @@ -0,0 +1,6 @@ +/*!re2c + +[a] { return 0; } +[^a] { return 1; } + +*/ diff --git a/test/input6.c b/test/input6.c new file mode 100755 index 00000000..ab20371e --- /dev/null +++ b/test/input6.c @@ -0,0 +1,25 @@ +/* Generated by re2c */ +#line 1 "input6.re" + +#line 5 "" +{ + YYCTYPE yych; + goto yy0; + ++YYCURSOR; +yy0: + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + goto yy3; + +#line 3 "input6.re" +{ return 0; } +#line 17 "" +yy3: ++YYCURSOR; + goto yy4; +yy4: +#line 4 "input6.re" +{ return 1; } +#line 23 "" +} +#line 6 "input6.re" + diff --git a/test/input6.re b/test/input6.re new file mode 100755 index 00000000..aaa32f86 --- /dev/null +++ b/test/input6.re @@ -0,0 +1,6 @@ +/*!re2c + +[]/[] { return 0; } +[\000-\377] { return 1; } + +*/ -- 2.40.0