]> git.saurik.com Git - bison.git/blobdiff - src/getargs.c
Display the changes in cross-options.texi.
[bison.git] / src / getargs.c
index a8d1c5480ddb519257ff353e05b673daea27fc44..aebc240128ae485c005dbd528b35429419b681c9 100644 (file)
@@ -176,6 +176,7 @@ static const char * const trace_args[] =
   "grammar    - reading, reducing the grammar",
   "resource   - memory consumption (where available)",
   "sets       - grammar sets: firsts, nullable etc.",
   "grammar    - reading, reducing the grammar",
   "resource   - memory consumption (where available)",
   "sets       - grammar sets: firsts, nullable etc.",
+  "muscles    - m4 definitions passed to the skeleton",
   "tools      - m4 invocation",
   "m4         - m4 traces",
   "skeleton   - skeleton postprocessing",
   "tools      - m4 invocation",
   "m4         - m4 traces",
   "skeleton   - skeleton postprocessing",
@@ -194,6 +195,7 @@ static const int trace_types[] =
   trace_grammar,
   trace_resource,
   trace_sets,
   trace_grammar,
   trace_resource,
   trace_sets,
+  trace_muscles,
   trace_tools,
   trace_m4,
   trace_skeleton,
   trace_tools,
   trace_m4,
   trace_skeleton,
@@ -246,6 +248,11 @@ usage (int status)
             program_name);
   else
     {
             program_name);
   else
     {
+      /* For ../build-aux/cross-options.pl to work, use the format:
+               ^  -S, --long[=ARGS] (whitespace)
+        A --long option is required.
+        Otherwise, add exceptions to ../build-aux/cross-options.pl.  */
+
       printf (_("Usage: %s [OPTION]... FILE\n"), program_name);
       fputs (_("\
 Generate LALR(1) and GLR parsers.\n\
       printf (_("Usage: %s [OPTION]... FILE\n"), program_name);
       fputs (_("\
 Generate LALR(1) and GLR parsers.\n\
@@ -497,7 +504,7 @@ static struct option const long_options[] =
 /* Build a location for the current command line argument. */
 static
 location
 /* Build a location for the current command line argument. */
 static
 location
-command_line_location()
+command_line_location (void)
 {
   location res;
   /* "<command line>" is used in GCC's messages about -D. */
 {
   location res;
   /* "<command line>" is used in GCC's messages about -D. */
@@ -529,9 +536,8 @@ getargs (int argc, char *argv[])
           char* value = strchr (optarg, '=');
           if (value)
             *value++ = 0;
           char* value = strchr (optarg, '=');
           if (value)
             *value++ = 0;
-          else
-            value = "";
-          muscle_percent_define_insert (name, command_line_location (), value);
+          muscle_percent_define_insert (name, command_line_location (),
+                                        value ? value : "");
         }
        break;
 
         }
        break;