]> granicus.if.org Git - re2c/commitdiff
- Improve readability
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Thu, 19 Apr 2007 01:15:31 +0000 (01:15 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Thu, 19 Apr 2007 01:15:31 +0000 (01:15 +0000)
re2c/test/condition_05.cg.c
re2c/test/condition_05.cg.re

index 162e3c3abc5b5f8fa7d9477a604a5de1761ab94d..b32c5187ba4558b97b59c08d1e27261ca61f2c29 100755 (executable)
@@ -56,63 +56,63 @@ char scan(Scanner *s)
                s->tok = s->cur;
 
 #line 59 "<stdout>"
-{
-       unsigned char yych;
-       static void *yyctable[2] = {
-               &&yyc_comment,
-               &&yyc_normal,
-       };
-       goto *yyctable[state];
+               {
+                       unsigned char yych;
+                       static void *yyctable[2] = {
+                               &&yyc_comment,
+                               &&yyc_normal,
+                       };
+                       goto *yyctable[state];
 /* *********************************** */
 yyc_comment:
 
-       if((s->lim - s->cur) < 2) { if(fill(s, 2) >= 0) break; };
-       yych = *s->cur;
-       if(yych != '*') goto yy4;
-       ++s->cur;
-       if((yych = *s->cur) == '/') goto yy5;
+                       if((s->lim - s->cur) < 2) { if(fill(s, 2) >= 0) break; };
+                       yych = *s->cur;
+                       if(yych != '*') goto yy4;
+                       ++s->cur;
+                       if((yych = *s->cur) == '/') goto yy5;
 yy3:
-#line 79 "condition_05.cg.re"
-       {
+#line 80 "condition_05.cg.re"
+                       {
                                goto yyc_comment;
                        }
 #line 80 "<stdout>"
 yy4:
-       yych = *++s->cur;
-       goto yy3;
+                       yych = *++s->cur;
+                       goto yy3;
 yy5:
-       ++s->cur;
-#line 75 "condition_05.cg.re"
-       {
+                       ++s->cur;
+#line 76 "condition_05.cg.re"
+                       {
                                continue;
                        }
 #line 90 "<stdout>"
 /* *********************************** */
 yyc_normal:
-       if((s->lim - s->cur) < 2) { if(fill(s, 2) >= 0) break; };
-       yych = *s->cur;
-       if(yych != '/') goto yy11;
-       ++s->cur;
-       if((yych = *s->cur) == '*') goto yy12;
+                       if((s->lim - s->cur) < 2) { if(fill(s, 2) >= 0) break; };
+                       yych = *s->cur;
+                       if(yych != '/') goto yy11;
+                       ++s->cur;
+                       if((yych = *s->cur) == '*') goto yy12;
 yy10:
-#line 70 "condition_05.cg.re"
-       {
+#line 71 "condition_05.cg.re"
+                       {
                                fputc(*s->tok, stdout);
                                continue;
                        }
 #line 104 "<stdout>"
 yy11:
-       yych = *++s->cur;
-       goto yy10;
+                       yych = *++s->cur;
+                       goto yy10;
 yy12:
-       ++s->cur;
-#line 66 "condition_05.cg.re"
-       {
+                       ++s->cur;
+#line 67 "condition_05.cg.re"
+                       {
                                goto yyc_comment;
                        }
 #line 114 "<stdout>"
-}
-#line 83 "condition_05.cg.re"
+               }
+#line 84 "condition_05.cg.re"
 
        }
 }
index 32db8d5be2c658fd2fd0aa31adf7432d6f0f83d9..7c702fa2df070a07a2fbbfffb13aa2105075cb76 100755 (executable)
@@ -61,6 +61,7 @@ re2c:define:YYMARKER    = s->ptr;
 re2c:define:YYFILL      = "{ if(fill(s, 2) >= 0) break; }";
 re2c:define:YYCONDITION = state;
 re2c:yyfill:parameter   = 0;
+re2c:indent:top         = 2;
 
 <normal>       "/*"
                        {