From 2275daee57c13a9826cfd0f295603190b7e38452 Mon Sep 17 00:00:00 2001 From: helly Date: Sat, 15 Apr 2006 18:51:36 +0000 Subject: [PATCH] - Add test for -i switch --- test/input11.i.c | 352 ++++++++++++++++++++++++++++++++++++++++++++++ test/input11.i.re | 15 ++ 2 files changed, 367 insertions(+) create mode 100755 test/input11.i.c create mode 100755 test/input11.i.re diff --git a/test/input11.i.c b/test/input11.i.c new file mode 100755 index 00000000..3bc3653b --- /dev/null +++ b/test/input11.i.c @@ -0,0 +1,352 @@ +/* Generated by re2c */ + +{ + YYCTYPE yych; + + if((YYLIMIT - YYCURSOR) < 6) YYFILL(6); + yych = *YYCURSOR; + switch(yych){ + case '-': goto yy7; + case '0': goto yy5; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy9; + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy4; + case 'r': goto yy2; + default: goto yy10; + } +yy2: + ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case 'e': goto yy15; + default: goto yy14; + } +yy3: + { return 1; } +yy4: + yych = *++YYCURSOR; + goto yy14; +yy5: + ++YYCURSOR; +yy6: + { return 2; } +yy7: + ++YYCURSOR; + switch((yych = *YYCURSOR)) { + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy11; + default: goto yy8; + } +yy8: + { return -1; } +yy9: + yych = *++YYCURSOR; + goto yy12; +yy10: + yych = *++YYCURSOR; + goto yy8; +yy11: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy12: + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': goto yy11; + default: goto yy6; + } +yy13: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; +yy14: + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy13; + default: goto yy3; + } +yy15: + yych = *++YYCURSOR; + switch(yych){ + case '2': goto yy16; + default: goto yy14; + } +yy16: + yych = *++YYCURSOR; + switch(yych){ + case 'c': goto yy17; + default: goto yy14; + } +yy17: + yych = *(YYMARKER = ++YYCURSOR); + switch(yych){ + case ':': goto yy18; + default: goto yy14; + } +yy18: + yych = *++YYCURSOR; + switch(yych){ + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case '_': + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy20; + default: goto yy19; + } +yy19: + YYCURSOR = YYMARKER; + goto yy3; +yy20: + ++YYCURSOR; + if(YYLIMIT == YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + switch(yych){ + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case ':': + case 'A': + case 'B': + case 'C': + case 'D': + case 'E': + case 'F': + case 'G': + case 'H': + case 'I': + case 'J': + case 'K': + case 'L': + case 'M': + case 'N': + case 'O': + case 'P': + case 'Q': + case 'R': + case 'S': + case 'T': + case 'U': + case 'V': + case 'W': + case 'X': + case 'Y': + case 'Z': + case '_': + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + case 'g': + case 'h': + case 'i': + case 'j': + case 'k': + case 'l': + case 'm': + case 'n': + case 'o': + case 'p': + case 'q': + case 'r': + case 's': + case 't': + case 'u': + case 'v': + case 'w': + case 'x': + case 'y': + case 'z': goto yy20; + default: goto yy22; + } +yy22: + { return 0; } +} + diff --git a/test/input11.i.re b/test/input11.i.re new file mode 100755 index 00000000..cda4c216 --- /dev/null +++ b/test/input11.i.re @@ -0,0 +1,15 @@ +/*!re2c + +letter = [a-zA-Z]; +digit = [0-9]; +number = "0" | ("-"? [1-9] digit*); +name = letter (letter|digit)*; +config = "re2c:" (letter|"_") (letter|digit|"_"|":")*; + +config { return 0; } +name { return 1; } +number { return 2; } + +.|"\n" { return -1; } + +*/ -- 2.40.0