mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 14:23:04 +00:00
Initialize the muscle table before parsing the command line.
* src/getargs.c (quotearg.h, muscle_tab.h): Include. (getargs): Define file_name. * src/main.c (main): Initialize muscle_tab before calling getargs. * src/muscle_tab.c (muscle_init): No longer define file_name, as its value is not available yet.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <c-strcase.h>
|
||||
#include <configmake.h>
|
||||
#include <error.h>
|
||||
#include <quotearg.h>
|
||||
|
||||
/* Hack to get <getopt.h> to declare getopt with a prototype. */
|
||||
#if lint && ! defined __GNU_LIBRARY__
|
||||
@@ -43,6 +44,7 @@
|
||||
#include "complain.h"
|
||||
#include "files.h"
|
||||
#include "getargs.h"
|
||||
#include "muscle_tab.h"
|
||||
#include "uniqstr.h"
|
||||
|
||||
bool debug_flag;
|
||||
@@ -623,4 +625,5 @@ getargs (int argc, char *argv[])
|
||||
}
|
||||
|
||||
current_file = grammar_file = uniqstr_new (argv[optind]);
|
||||
MUSCLE_INSERT_C_STRING ("file_name", grammar_file);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user