]> git.saurik.com Git - bison.git/blobdiff - src/muscle-tab.c
lalr1.cc: check (and fix) %initial-action exception safety
[bison.git] / src / muscle-tab.c
index bd1fd174719941c0ea86b2e727e34404d6dbf13f..37a0f0e8ea95b8a179f8b1be1a4103047f9ce30d 100644 (file)
@@ -426,6 +426,7 @@ muscle_percent_define_insert (char const *variable, location variable_loc,
   if (how == MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE
       && muscle_find_const (name))
     {
+      unsigned i = 0;
       muscle_percent_define_how how_old =
         atoi (muscle_find_const (how_name));
       if (how_old == MUSCLE_PERCENT_DEFINE_F)
@@ -433,10 +434,11 @@ muscle_percent_define_insert (char const *variable, location variable_loc,
           free (variable_tr);
           return;
         }
-      complain_at (variable_loc, _("%%define variable %s redefined"),
-                   quote (variable));
-      complain_at (muscle_percent_define_get_loc (variable),
-                   _("previous definition"));
+      complain_at_indent (variable_loc, &i,
+                          _("%%define variable %s redefined"), quote (variable));
+      i += SUB_INDENT;
+      complain_at_indent (muscle_percent_define_get_loc (variable), &i,
+                          _("previous definition"));
     }
 
   MUSCLE_INSERT_STRING (name, value);
@@ -591,12 +593,15 @@ muscle_percent_define_check_values (char const * const *values)
             }
           if (!*values)
             {
+              unsigned i = 0;
               location loc = muscle_percent_define_get_loc (*variablep);
-              complain_at(loc,
-                          _("invalid value for %%define variable %s: %s"),
-                          quote (*variablep), quote_n (1, value));
+              complain_at_indent (loc, &i,
+                                _("invalid value for %%define variable %s: %s"),
+                                  quote (*variablep), quote_n (1, value));
+              i += SUB_INDENT;
               for (values = variablep + 1; *values; ++values)
-                complain_at (loc, _("accepted value: %s"), quote (*values));
+                complain_at_indent (loc, &i, _("accepted value: %s"),
+                                    quote (*values));
             }
           else
             {