summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorJohn Millaway <john43@users.sourceforge.net>2002-08-13 21:19:39 +0000
committerJohn Millaway <john43@users.sourceforge.net>2002-08-13 21:19:39 +0000
commit2de61eb3df07519dfa02fbc44ab244603d1a901e (patch)
tree245f428b0b1ae72ee53680e4159467aa10f215f0 /main.c
parentb19fc6297a8238f7e722641ad30db95840eaf054 (diff)
Include start condition symbols in header.
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/main.c b/main.c
index 6a70aca..4e47485 100644
--- a/main.c
+++ b/main.c
@@ -564,9 +564,16 @@ int exit_status;
nlines++;
}
+ fprintf(header_out,"#line %d \"%s\"\n", (++nlines)+1, headerfilename);
+
+ /* Print the prefixed start conditions. */
+ for (i=1; i <= lastsc; i++)
+ fprintf(header_out, "#define %sSC_%s %d\n",
+ strcmp(prefix,"yy") ? prefix : "YY",
+ scname[i], i-1);
+
/* Kill ALL flex-related macros. This is so the user
* can #include more than one generated header file. */
- fprintf(header_out,"#line %d \"%s\"", (++nlines)+1, headerfilename);
fprintf(header_out,"\n");
fprintf(header_out,"#undef BEGIN\n");
fprintf(header_out,"#undef ECHO\n");