mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 04:43:03 +00:00
support $<tag>$ in printers and destructors
* src/scan-code.l (SC_SYMBOL_ACTION): Accept $<tag>$, not just $$. * data/c.m4 (b4_dollar_dollar_): New. (b4_symbol_actions): Let b4_dollar_dollar use b4_dollar_dollar_. * NEWS, doc/bison.texi: Document it. * tests/actions.at: Check this for C and C++.
This commit is contained in:
@@ -264,8 +264,12 @@ ref -?[0-9]+|{id}|"["{id}"]"|"$"
|
||||
|
||||
<SC_SYMBOL_ACTION>
|
||||
{
|
||||
"$$" {
|
||||
obstack_sgrow (&obstack_for_string, "]b4_dollar_dollar[");
|
||||
"$"("<"{tag}">")?"$" {
|
||||
const char *type_name = NULL;
|
||||
fetch_type_name (yytext + 1, &type_name, *loc)[-1] = 0;
|
||||
obstack_sgrow (&obstack_for_string, "]b4_dollar_dollar(");
|
||||
obstack_quote (&obstack_for_string, type_name);
|
||||
obstack_sgrow (&obstack_for_string, ")[");
|
||||
self->is_value_used = true;
|
||||
}
|
||||
"@$" {
|
||||
|
||||
Reference in New Issue
Block a user