mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
style: rename semanticVal as value
* data/skeletons/README-D.txt: Remove, now useless and obsolete. * data/skeletons/glr2.cc, examples/d/calc/calc.y, * tests/calc.at, tests/d.at, tests/scanner.at (semanticVal): Replace with... (value): this.
This commit is contained in:
@@ -563,7 +563,7 @@ class CalcLexer(R) : Lexer
|
||||
|
||||
]AT_YYERROR_DEFINE[
|
||||
|
||||
Value semanticVal_;]AT_LOCATION_IF([[
|
||||
Value value_;]AT_LOCATION_IF([[
|
||||
Location location;
|
||||
]])[
|
||||
int parseInt ()
|
||||
@@ -600,8 +600,8 @@ class CalcLexer(R) : Lexer
|
||||
// Numbers.
|
||||
if (input.front.isNumber)
|
||||
{
|
||||
semanticVal_.ival = parseInt;
|
||||
return Symbol(TokenKind.]AT_TOKEN_PREFIX[NUM, semanticVal_.ival]AT_LOCATION_IF([[, location]])[);
|
||||
value_.ival = parseInt;
|
||||
return Symbol(TokenKind.]AT_TOKEN_PREFIX[NUM, value_.ival]AT_LOCATION_IF([[, location]])[);
|
||||
}
|
||||
|
||||
// Individual characters
|
||||
|
||||
@@ -78,8 +78,6 @@ class CalcLexer(R) : Lexer
|
||||
|
||||
void yyerror(string s) {}
|
||||
|
||||
Value semanticVal_;
|
||||
|
||||
Symbol yylex()
|
||||
{
|
||||
$2
|
||||
|
||||
@@ -115,7 +115,7 @@ class YYLexer(R) : Lexer
|
||||
|
||||
]AT_YYERROR_DEFINE[
|
||||
|
||||
Value semanticVal_;
|
||||
Value value_;
|
||||
|
||||
Symbol yylex ()
|
||||
{
|
||||
@@ -131,8 +131,8 @@ class YYLexer(R) : Lexer
|
||||
switch (c)
|
||||
{
|
||||
case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
|
||||
semanticVal_.val = c - '0';
|
||||
return Symbol(TokenKind.NUM, semanticVal_.val);
|
||||
value_.val = c - '0';
|
||||
return Symbol(TokenKind.NUM, value_.val);
|
||||
case '+': return Symbol(TokenKind.PLUS);
|
||||
case '-': return Symbol(TokenKind.MINUS);
|
||||
case '*': return Symbol(TokenKind.STAR);
|
||||
|
||||
Reference in New Issue
Block a user