c++: make parser::symbol_name public

Reported by Martin Blais <blais@furius.ca>.
https://lists.gnu.org/r/help-bison/2020-05/msg00005.html

* data/skeletons/lalr1.cc (symbol_name): Make it public.
Add a private hidden hook to enable testing of private parts.
* tests/local.at (AT_DATA_GRAMMAR_PROLOGUE): Help Emacs find the right
language mode.
* tests/c++.at (C++ Variant-based Symbols Unit Tests): Check that we
can read symbol_name.
This commit is contained in:
Akim Demaille
2020-05-10 09:00:38 +02:00
parent c3585f41ef
commit 6bb37dbe27
4 changed files with 40 additions and 25 deletions

View File

@@ -500,7 +500,7 @@ m4_define([AT_DATA_SOURCE_PROLOGUE],
# The prologue that should be included in any grammar whose parser is
# meant to be compiled.
m4_define([AT_DATA_GRAMMAR_PROLOGUE],
[[%code top {
[[%code top { /* -*- ]AT_LANG[ -*- */
]AT_DATA_SOURCE_PROLOGUE[]dnl
[}
]])