1 /* Generated by re2c */ 2 #line 1 "bug1472770_f.re" 3 // re2c $INPUT -o $OUTPUT -f 4 #define NULL ((char*) 0) 5 #define YYCTYPE char 6 #define YYCURSOR p 7 #define YYLIMIT p 8 #define YYMARKER q 9 #define YYFILL(n) 10 11 YYCTYPE yych; 12 int yySavedState; 13 14 #define YYGETSTATE() yySavedState 15 #define YYSETSTATE(n) yySavedState = n; 16 17 #include <stdio.h> 18 scan(char * p)19int scan(char *p) 20 { 21 int n = 0; 22 char *q; 23 24 printf("[--------------\n"); 25 printf("%s\n", p); 26 printf("]--------------\n"); 27 start: 28 29 #line 30 "bug1472770_f.c" 30 31 switch (YYGETSTATE()) { 32 default: 33 goto yy0; 34 case 0: 35 goto yyFillLabel0; 36 } 37 yy0: 38 goto yy1; 39 yy2: 40 ++YYCURSOR; 41 yy1: 42 YYSETSTATE(0); 43 if (YYLIMIT <= YYCURSOR) YYFILL(1); 44 yyFillLabel0: 45 yych = *YYCURSOR; 46 switch (yych) { 47 case 0x00: goto yy4; 48 case '\n': goto yy6; 49 default: goto yy2; 50 } 51 yy4: 52 ++YYCURSOR; 53 #line 33 "bug1472770_f.re" 54 { 55 return n; 56 } 57 #line 58 "bug1472770_f.c" 58 yy6: 59 ++YYCURSOR; 60 #line 28 "bug1472770_f.re" 61 { 62 ++n; 63 goto start; 64 } 65 #line 66 "bug1472770_f.c" 66 #line 36 "bug1472770_f.re" 67 68 } 69 main(int argc,char ** argv)70int main(int argc, char **argv) 71 { 72 int n = 0; 73 char *largv[4]; 74 75 if (argc < 2) 76 { 77 argc = 4; 78 argv = largv; 79 argv[1] = ""; 80 argv[2] = "1\n\n"; 81 argv[3] = "1\n2\n"; 82 } 83 while(++n < argc) 84 { 85 printf("%d\n", scan(argv[n])); 86 } 87 return 0; 88 } 89