style: use midrule only, not mid-rule

The code was already using midrule only, never mid_rule.  This is
simpler to remember, and matches a similar change we made from
look-ahead to lookahead.

* NEWS, doc/bison.texi, src/reader.c, src/scan-code.h, src/scan-code.l
* tests/actions.at, tests/c++.at, tests/existing.at: here.
This commit is contained in:
Akim Demaille
2018-09-19 22:00:46 +02:00
parent b7613423ce
commit bbfa419b89
8 changed files with 106 additions and 106 deletions

22
NEWS
View File

@@ -1024,7 +1024,7 @@ GNU Bison NEWS
Although introduced more than four years ago, XML and Graphviz reports
were not properly documented.
The translation of mid-rule actions is now described.
The translation of midrule actions is now described.
* Noteworthy changes in release 2.6.5 (2012-11-07) [stable]
@@ -2020,16 +2020,16 @@ GNU Bison NEWS
The prologue alternatives are experimental. More user feedback will help to
determine whether they should become permanent features.
** Revised warning: unset or unused mid-rule values
** Revised warning: unset or unused midrule values
Since Bison 2.2, Bison has warned about mid-rule values that are set but not
Since Bison 2.2, Bison has warned about midrule values that are set but not
used within any of the actions of the parent rule. For example, Bison warns
about unused $2 in:
exp: '1' { $$ = 1; } '+' exp { $$ = $1 + $4; };
Now, Bison also warns about mid-rule values that are used but not set. For
example, Bison warns about unset $$ in the mid-rule action in:
Now, Bison also warns about midrule values that are used but not set. For
example, Bison warns about unset $$ in the midrule action in:
exp: '1' { $1 = 1; } '+' exp { $$ = $2 + $4; };
@@ -2055,7 +2055,7 @@ GNU Bison NEWS
Bison no longer supports the "%symbol-default" notation from Bison 2.3a.
"<*>" and "<>" combined achieve the same effect with one exception: Bison no
longer applies any %destructor to a mid-rule value if that mid-rule value is
longer applies any %destructor to a midrule value if that midrule value is
not actually ever referenced using either $$ or $n in a semantic action.
The default %destructor's and %printer's are experimental. More user
@@ -2233,7 +2233,7 @@ GNU Bison NEWS
| exp "+" exp { $$ = $1; (void) $3; }
;
If there are mid-rule actions, the warning is issued if no action
If there are midrule actions, the warning is issued if no action
uses it. The following triggers no warning: $1 and $3 are used.
exp: exp { push ($1); } '+' exp { push ($3); sum (); };
@@ -2508,13 +2508,13 @@ GNU Bison NEWS
typed: ... untyped;
** Values of mid-rule actions
** Values of midrule actions
The following code:
foo: { ... } { $$ = $1; } ...
was incorrectly rejected: $1 is defined in the second mid-rule
action, and is equal to the $$ of the first mid-rule action.
was incorrectly rejected: $1 is defined in the second midrule
action, and is equal to the $$ of the first midrule action.
* Changes in version 1.50, 2002-10-04:
@@ -2650,7 +2650,7 @@ GNU Bison NEWS
** Type clashes
Previous versions don't complain when there is a type clash on
the default action if the rule has a mid-rule action, such as in:
the default action if the rule has a midrule action, such as in:
%type <foo> bar
%%