style: fix missing space before paren

* 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.
This commit is contained in:
Akim Demaille
2020-08-05 08:43:41 +02:00
parent 6aae4a7378
commit 89e42ffb4b
3 changed files with 7 additions and 7 deletions

2
cfg.mk
View File

@@ -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 \

View File

@@ -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);

View File

@@ -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. */