mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
d: create alias Symbol for YYParse.Symbol
* data/skeletons/lalr1.d: Here. * doc/bison.texi: Document it. * 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:
committed by
Akim Demaille
parent
848a17fa33
commit
13bb2b78b3
@@ -81,7 +81,7 @@ class CalcLexer(R) : Lexer
|
||||
YYSemanticType semanticVal_;
|
||||
YYSemanticType semanticVal() @property { return semanticVal_; }
|
||||
|
||||
YYParser.Symbol yylex()
|
||||
Symbol yylex()
|
||||
{
|
||||
$2
|
||||
}
|
||||
@@ -143,16 +143,16 @@ AT_KEYWORDS([d])
|
||||
|
||||
AT_CHECK_D_MINIMAL_W_LEXER([
|
||||
%define api.token.raw true
|
||||
%union { int ival; }], [return YYParser.Symbol(TokenKind.END);])
|
||||
%union { int ival; }], [return Symbol(TokenKind.END);])
|
||||
AT_CHECK_D_GREP([[ END = 3,]])
|
||||
|
||||
AT_CHECK_D_MINIMAL_W_LEXER([
|
||||
%define api.token.raw false
|
||||
%union { int ival; }], [return YYParser.Symbol(TokenKind.END);])
|
||||
%union { int ival; }], [return Symbol(TokenKind.END);])
|
||||
AT_CHECK_D_GREP([[ END = 258,]])
|
||||
|
||||
AT_CHECK_D_MINIMAL_W_LEXER([
|
||||
%union { int ival; }], [return YYParser.Symbol(TokenKind.END);])
|
||||
%union { int ival; }], [return Symbol(TokenKind.END);])
|
||||
AT_CHECK_D_GREP([[ END = 3,]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
Reference in New Issue
Block a user