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:
Adela Vais
2020-12-10 22:49:28 +02:00
committed by Akim Demaille
parent 848a17fa33
commit 13bb2b78b3
8 changed files with 62 additions and 52 deletions

View File

@@ -75,7 +75,7 @@ public interface Lexer
* to the next token and prepares to return the semantic value
* ]b4_locations_if([and beginning/ending positions ])[of the token.
* @@return the token identifier corresponding to the next token. */
]b4_parser_class[.Symbol yylex ();
Symbol yylex ();
/**
* Entry point for error reporting. Emits an error
@@ -95,6 +95,8 @@ public interface Lexer
]])[
}
]b4_public_types_declare[
]b4_locations_if([b4_position_type_if([[
static assert(__traits(compiles,
(new ]b4_position_type[[1])[0]=(new ]b4_position_type[[1])[0]),