From 848a17fa336ad7399e7c2baf40dd4c7dcbe1971e Mon Sep 17 00:00:00 2001 From: Adela Vais Date: Thu, 10 Dec 2020 22:36:24 +0200 Subject: [PATCH] d: change name of YYParser.Symbol's semanticValue() to value() Member value was renamed to value_ to avoid the name clash. * data/skeletons/d.m4: Change member names. * data/skeletons/lalr1.d: Adjust. --- data/skeletons/d.m4 | 6 +++--- data/skeletons/lalr1.d | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/skeletons/d.m4 b/data/skeletons/d.m4 index b84d4e94..5362fb8e 100644 --- a/data/skeletons/d.m4 +++ b/data/skeletons/d.m4 @@ -460,7 +460,7 @@ m4_define([b4_symbol_type_define], struct Symbol { private SymbolKind kind; - private ]b4_yystype[ value;]b4_locations_if([[ + private ]b4_yystype[ value_;]b4_locations_if([[ private YYLocation location_;]])[ this(TokenKind token]b4_locations_if([[, YYLocation loc]])[) { @@ -472,12 +472,12 @@ m4_define([b4_symbol_type_define], this(TokenKind token, typeof(mixin("YYSemanticType." ~ member)) val]b4_locations_if([[, YYLocation loc]])[) { kind = yytranslate_(token); - mixin("value." ~ member ~ " = val;");]b4_locations_if([ + mixin("value_." ~ member ~ " = val;");]b4_locations_if([ location_ = loc;])[ } } SymbolKind token() { return kind; } - ]b4_yystype[ semanticValue() { return value; }]b4_locations_if([[ + ]b4_yystype[ value() { return value_; }]b4_locations_if([[ YYLocation location() { return location_; }]])[ } ]]) diff --git a/data/skeletons/lalr1.d b/data/skeletons/lalr1.d index d126d499..cea08dca 100644 --- a/data/skeletons/lalr1.d +++ b/data/skeletons/lalr1.d @@ -493,7 +493,7 @@ m4_popdef([b4_at_dollar])])dnl yycdebugln ("Reading a token");]])[ Symbol yysymbol = yylex(); yychar = yysymbol.token(); - yylval = yysymbol.semanticValue();]b4_locations_if([[ + yylval = yysymbol.value();]b4_locations_if([[ yylloc = yysymbol.location();]])[ }