d: create alias Value for YYSemanticType

* data/skeletons/d.m4: Here.
* data/skeletons/lalr1.d, examples/d/calc/calc.y, examples/d/simple/calc.y: Adjust.
* tests/calc.at, tests/d.at, tests/scanner.at: Test it.
This commit is contained in:
Adela Vais
2020-12-18 19:46:02 +02:00
committed by Akim Demaille
parent 8e44b24ba8
commit b00fa62e95
7 changed files with 21 additions and 20 deletions

View File

@@ -559,7 +559,7 @@ class CalcLexer(R) : Lexer
]AT_YYERROR_DEFINE[
YYSemanticType semanticVal_;]AT_LOCATION_IF([[
Value semanticVal_;]AT_LOCATION_IF([[
Location location;
public final @property YYPosition startPos()
@@ -572,7 +572,7 @@ class CalcLexer(R) : Lexer
return location.end;
}
]])[
public final @property YYSemanticType semanticVal()
public final @property Value semanticVal()
{
return semanticVal_;
}

View File

@@ -78,8 +78,8 @@ class CalcLexer(R) : Lexer
void yyerror(string s) {}
YYSemanticType semanticVal_;
YYSemanticType semanticVal() @property { return semanticVal_; }
Value semanticVal_;
Value semanticVal() @property { return semanticVal_; }
Symbol yylex()
{

View File

@@ -115,8 +115,8 @@ class YYLexer(R) : Lexer
]AT_YYERROR_DEFINE[
YYSemanticType semanticVal_;
public final @property YYSemanticType semanticVal ()
Value semanticVal_;
public final @property Value semanticVal ()
{
return semanticVal_;
}