From: Akim Demaille Date: Sat, 16 Aug 2008 13:29:30 +0000 (+0200) Subject: Avoid trailing spaces. X-Git-Tag: v2.7.90~1095 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/30bb2edccf7f352a0c149513905f5e1fcac04aaf?ds=sidebyside Avoid trailing spaces. * data/c.m4: b4_comment(TEXT): Don't indent empty lines. * data/lalr1.cc: Don't indent before rule and symbol actions, as they can be empty, and anyway this incorrectly indents the first action. --- diff --git a/ChangeLog b/ChangeLog index ed87b06d..e3c3e0e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-11-10 Akim Demaille + + Avoid trailing spaces. + * data/c.m4: b4_comment(TEXT): Don't indent empty lines. + * data/lalr1.cc: Don't indent before rule and symbol actions, as + they can be empty, and anyway this incorrectly indents the first + action. + 2008-11-10 Akim Demaille Comment changes. diff --git a/data/c.m4 b/data/c.m4 index 46ced826..430a5573 100644 --- a/data/c.m4 +++ b/data/c.m4 @@ -23,9 +23,12 @@ # b4_comment(TEXT) # ---------------- +# Put TEXT in comment. Avoid trailing spaces: don't indent empty lines. +# Avoid adding indentation to the first line, as the indentation comes +# from "/*". That's why we don't patsubst([$1], [^\(.\)], [ \1]). m4_define([b4_comment], [/* m4_bpatsubst([$1], [ -], [ - ]) */]) +\(.\)], [ + \1]) */]) # b4_identification # ----------------- diff --git a/data/lalr1.cc b/data/lalr1.cc index 578e24f4..c5433435 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -884,8 +884,8 @@ b4_percent_code_get[]dnl << yysym.location << ": "; switch (yytype) { -]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl -[ default: +]m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))[ + default: break; } yyo << ')'; @@ -1105,7 +1105,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))[; YY_REDUCE_PRINT (yyn); switch (yyn) { - ]b4_user_actions[ +]b4_user_actions[ default: break; }