[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/10] todo: update
From: |
Akim Demaille |
Subject: |
[PATCH 10/10] todo: update |
Date: |
Tue, 7 Apr 2020 07:13:57 +0200 |
* TODO (YYERRCODE): Remove, handled by YYSYMBOL_ERROR.
---
TODO | 46 ++++++----------------------------------------
1 file changed, 6 insertions(+), 40 deletions(-)
diff --git a/TODO b/TODO
index 1e589ddc..915d1e72 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,7 @@
* Bison 3.6
+** api.symbol.prefix
+Something similar to api.token.prefix for SymbolKind.
+
** Documentation
- yyexpected_tokens in all the languages.
- YYNOMEM
@@ -20,6 +23,9 @@ We could use "number" and "code".
Update: the current best options would be "token kind" and "symbol kind",
instead of "token type" and "symbol type".
+*** yytokentype
+Make an alias so that it is about "kind", not "type".
+
*** The documentation
You can explicitly specify the numeric code for a token type...
@@ -285,46 +291,6 @@ It would be a very nice source of inspiration for the
other languages.
Valentin Tolmer is working on this.
-** YYERRCODE
-Why don't we output the token name of the error token in the output? It is
-explicitly skipped:
-
- /* Skip error token and tokens without identifier. */
- if (sym != errtoken && id)
-
-Of course there are issues with name spaces, but if we disable we have
-something which seems to be more simpler and more consistent instead
-of the special case YYERRCODE.
-
- enum yytokentype {
- error = 256,
- // ...
- };
-
-
-We could (should?) also treat the case of the undef_token, which is
-numbered 257 for yylex, and 2 internal. Both appear for instance in
-toknum:
-
- const unsigned short
- parser::yytoken_number_[] =
- {
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
-
-while here
-
- enum yytokentype {
- TOK_EOF = 0,
- TOK_EQ = 258,
-
-so both 256 and 257 are "mysterious".
-
- const char*
- const parser::yytname_[] =
- {
- "\"end of command\"", "error", "$undefined", "\"=\"", "\"break\"",
-
-
** yychar == yyempty_
The code in yyerrlab reads:
--
2.26.0
- [PATCH 00/10] Make recent feature better looking, Akim Demaille, 2020/04/07
- [PATCH 01/10] c: make the generated YYSTYPE nicer to read, Akim Demaille, 2020/04/07
- [PATCH 02/10] c: make the token kind definition nicer to read, Akim Demaille, 2020/04/07
- [PATCH 03/10] c: make the symbol kind definition nicer to read, Akim Demaille, 2020/04/07
- [PATCH 05/10] java: use getExpectedTokens, not yyexpectedTokens, Akim Demaille, 2020/04/07
- [PATCH 04/10] java: style: fix coding style, Akim Demaille, 2020/04/07
- [PATCH 07/10] java: prefer null to YYSYMBOL_YYEMPTY, Akim Demaille, 2020/04/07
- [PATCH 10/10] todo: update,
Akim Demaille <=
- [PATCH 06/10] java: rename Lexer.yyreportSyntaxError as reportSyntaxError, Akim Demaille, 2020/04/07
- [PATCH 08/10] java: document new features, Akim Demaille, 2020/04/07
- [PATCH 09/10] skeletons: beware not to use yyarg when it's null, Akim Demaille, 2020/04/07