]> granicus.if.org Git - flex/commitdiff
scanner: no YYTABLES_NAME macro unless requested
authorjannick0 <jannick0@users.noreply.github.com>
Fri, 29 Dec 2017 15:44:29 +0000 (16:44 +0100)
committerWill Estes <westes575@gmail.com>
Tue, 22 May 2018 20:51:26 +0000 (16:51 -0400)
src/misc.c

index 745e6a8f30f9bac88b11f28e84caebbfc950db49..5e63291b27e349ccc2857cc3a701c8aeac1a40b1 100644 (file)
@@ -776,8 +776,9 @@ void skelout (void)
                                        outn ((char *) (yydmap_buf.elts));
                        }
             else if (cmd_match (CMD_DEFINE_YYTABLES)) {
-                out_str("#define YYTABLES_NAME \"%s\"\n",
-                        tablesname?tablesname:"yytables");
+                if ( tablesext )
+                    out_str( "#define YYTABLES_NAME \"%s\"\n",
+                           tablesname ? tablesname : "yytables" );
             }
                        else if (cmd_match (CMD_IF_CPP_ONLY)) {
                                /* only for C++ */