mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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:
@@ -17,14 +17,14 @@
|
||||
|
||||
AT_BANNER([[User Actions.]])
|
||||
|
||||
## ------------------ ##
|
||||
## Mid-rule actions. ##
|
||||
## ------------------ ##
|
||||
## ----------------- ##
|
||||
## Midrule actions. ##
|
||||
## ----------------- ##
|
||||
|
||||
AT_SETUP([Mid-rule actions])
|
||||
AT_SETUP([Midrule actions])
|
||||
|
||||
# Bison once forgot the mid-rule actions. It was because the action
|
||||
# was attached to the host rule (the one with the mid-rule action),
|
||||
# Bison once forgot the midrule actions. It was because the action
|
||||
# was attached to the host rule (the one with the midrule action),
|
||||
# instead of being attached to the empty rule dedicated to this
|
||||
# action.
|
||||
|
||||
@@ -64,11 +64,11 @@ AT_PARSER_CHECK([./input], 0,
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
## ------------------------ ##
|
||||
## Typed mid-rule actions. ##
|
||||
## ------------------------ ##
|
||||
## ----------------------- ##
|
||||
## Typed midrule actions. ##
|
||||
## ----------------------- ##
|
||||
|
||||
AT_SETUP([Typed mid-rule actions])
|
||||
AT_SETUP([Typed midrule actions])
|
||||
|
||||
AT_BISON_OPTION_PUSHDEFS
|
||||
AT_DATA_GRAMMAR([[input.y]],
|
||||
@@ -123,7 +123,7 @@ AT_DATA_GRAMMAR([[1.y]],
|
||||
[[%%
|
||||
exp: a b;
|
||||
a: /* empty. */ {};
|
||||
// A mid-rule action does not count as an empty rule.
|
||||
// A midrule action does not count as an empty rule.
|
||||
b: {} {};
|
||||
]])
|
||||
|
||||
@@ -1463,11 +1463,11 @@ AT_CLEANUP
|
||||
|
||||
|
||||
|
||||
## ------------------------------------------------------ ##
|
||||
## Default %printer and %destructor for mid-rule values. ##
|
||||
## ------------------------------------------------------ ##
|
||||
## ----------------------------------------------------- ##
|
||||
## Default %printer and %destructor for midrule values. ##
|
||||
## ----------------------------------------------------- ##
|
||||
|
||||
AT_SETUP([Default %printer and %destructor for mid-rule values])
|
||||
AT_SETUP([Default %printer and %destructor for midrule values])
|
||||
|
||||
AT_BISON_OPTION_PUSHDEFS([%debug])
|
||||
AT_DATA_GRAMMAR([[input.y]],
|
||||
|
||||
10
tests/c++.at
10
tests/c++.at
@@ -409,15 +409,15 @@ m4_popdef([AT_TEST])
|
||||
|
||||
|
||||
|
||||
## ------------------------------------- ##
|
||||
## Variants and Typed Mid-rule Actions. ##
|
||||
## ------------------------------------- ##
|
||||
## ------------------------------------ ##
|
||||
## Variants and Typed Midrule Actions. ##
|
||||
## ------------------------------------ ##
|
||||
|
||||
AT_SETUP([Variants and Typed Mid-rule Actions])
|
||||
AT_SETUP([Variants and Typed Midrule Actions])
|
||||
|
||||
# See http://lists.gnu.org/archive/html/bug-bison/2017-06/msg00000.html.
|
||||
#
|
||||
# Check that typed mid-rule actions behave properly (pre-construction
|
||||
# Check that typed midrule actions behave properly (pre-construction
|
||||
# of $$ before the user action, support of %printer and %destructor,
|
||||
# etc.).
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ m4_popdef([AT_LALR1_DIFF_CHECK])
|
||||
## ----------------------- ##
|
||||
|
||||
# We have been careful to strip all the actions excepts the
|
||||
# mid-rule actions.
|
||||
# midrule actions.
|
||||
#
|
||||
# There are 65 SR conflicts. Bison was once wrong, due to an incorrect
|
||||
# computation of nullable. It reported 485 SR conflicts!
|
||||
|
||||
Reference in New Issue
Block a user