From 2de61eb3df07519dfa02fbc44ab244603d1a901e Mon Sep 17 00:00:00 2001 From: John Millaway Date: Tue, 13 Aug 2002 21:19:39 +0000 Subject: [PATCH] Include start condition symbols in header. --- main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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"); -- 2.40.0