mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
d: remove unnecessary methods from the Lexer interface
The complete symbol approach in yylex removes the need for the methods semanticVal, startPos and endPos, which were used when the values were reported separately. * data/skeletons/lalr1.d: Here. * doc/bison.texi: Remove sections about the three methods. * examples/d/calc/calc.y, examples/d/simple/calc.y: Remove the unused methods. * tests/calc.at, tests/d.at, tests/scanner.at: Test it.
This commit is contained in:
committed by
Akim Demaille
parent
27109d9d4a
commit
32bb53870b
@@ -53,23 +53,7 @@ import std.format;
|
||||
* parser <tt>]b4_parser_class[</tt>.
|
||||
*/
|
||||
public interface Lexer
|
||||
{]b4_locations_if([[
|
||||
/**
|
||||
* Method to retrieve the beginning position of the last scanned token.
|
||||
* @@return the position at which the last scanned token starts. */
|
||||
Position startPos ();
|
||||
|
||||
/**
|
||||
* Method to retrieve the ending position of the last scanned token.
|
||||
* @@return the first position beyond the last scanned token. */
|
||||
Position endPos ();
|
||||
|
||||
]])[
|
||||
/**
|
||||
* Method to retrieve the semantic value of the last scanned token.
|
||||
* @@return the semantic value of the last scanned token. */
|
||||
Value semanticVal ();
|
||||
|
||||
{
|
||||
/**
|
||||
* Entry point for the scanner. Returns the token identifier corresponding
|
||||
* to the next token and prepares to return the semantic value
|
||||
|
||||
Reference in New Issue
Block a user