[PATCH 3/3] style: fix missing space before paren

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.patches
Message-ID <[email protected]>
* cfg.mk (_space_before_paren_exempt): Be less laxist.
* src/output.c, src/reader.c: Fix space before paren issues.
Pacify the warnings where applicable.
---
 cfg.mk       | 2 +-
 src/output.c | 8 ++++----
 src/reader.c | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index e1547a05..2a1b0831 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -126,7 +126,7 @@ _sed_rm_comments_q = $(subst ','\'',$(_sed_remove_comments))
 
 _space_before_paren_exempt =? \\n\\$$
 _space_before_paren_exempt = \
-  (^ *\#|(LA)?LR\([01]\)|percent_(code|define)|b4_syncline|m4_(define|init)|symbol)
+  (^ *\#|(LA)?LR\([01]\)|percent_(code|define)|b4_syncline|m4_(define|init))
 # Ensure that there is a space before each open parenthesis in C code.
 sc_space_before_open_paren:
 	@if $(VC_LIST_EXCEPT) | grep -l '\.[ch]$$' > /dev/null; then	\
diff --git a/src/output.c b/src/output.c
index db996283..d550c470 100644
--- a/src/output.c
+++ b/src/output.c
@@ -249,7 +249,7 @@ prepare_symbol_names (char const *muscle_name)
       if (i)
         obstack_1grow (&format_obstack, ' ');
       if (translatable)
-        obstack_sgrow (&format_obstack, "]b4_symbol_translate([");
+        obstack_sgrow (&format_obstack, "]b4_symbol_translate""([");
       obstack_escape (&format_obstack, cp);
       if (translatable)
         obstack_sgrow (&format_obstack, "])[");
@@ -554,7 +554,7 @@ prepare_symbol_definitions (void)
   /* Map "orig NUM" to new numbers.  See data/README.  */
   for (symbol_number i = ntokens; i < nsyms + nuseless_nonterminals; ++i)
     {
-      obstack_printf (&format_obstack, "symbol(orig %d, number)", i);
+      obstack_printf (&format_obstack, "symbol""(orig %d, number)", i);
       const char *key = obstack_finish0 (&format_obstack);
       MUSCLE_INSERT_INT (key, nterm_map ? nterm_map[i - ntokens] : i);
     }
@@ -565,12 +565,12 @@ prepare_symbol_definitions (void)
       const char *key;
 
 #define SET_KEY(Entry)                                          \
-      obstack_printf (&format_obstack, "symbol(%d, %s)",        \
+      obstack_printf (&format_obstack, "symbol""(%d, %s)",        \
                       i, Entry);                                \
       key = obstack_finish0 (&format_obstack);
 
 #define SET_KEY2(Entry, Suffix)                                 \
-      obstack_printf (&format_obstack, "symbol(%d, %s_%s)",     \
+      obstack_printf (&format_obstack, "symbol""(%d, %s_%s)",     \
                       i, Entry, Suffix);                        \
       key = obstack_finish0 (&format_obstack);
 
diff --git a/src/reader.c b/src/reader.c
index 29222ef3..2bc1cf6e 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -406,8 +406,8 @@ grammar_midrule_action (void)
      action.  Create the MIDRULE.  */
   location dummy_loc = current_rule->action_props.location;
   symbol *dummy = dummy_symbol_get (dummy_loc);
-  symbol_type_set(dummy,
-                  current_rule->action_props.type, current_rule->action_props.location);
+  symbol_type_set (dummy,
+                   current_rule->action_props.type, current_rule->action_props.location);
   symbol_list *midrule = symbol_list_sym_new (dummy, dummy_loc);
 
   /* Remember named_ref of previous action. */
-- 
2.28.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.