[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 00/12] RFC: yyreport_error_message
From: |
Akim Demaille |
Subject: |
[PATCH 00/12] RFC: yyreport_error_message |
Date: |
Thu, 16 Jan 2020 07:58:11 +0100 |
Here is my proposal for the first batch of changes to improve the
generation of error messages. There remains of course much to do:
- the case of push parsers
- parse.error rich and dequoted yytname
- support for translated string aliases
- documentation
- other skeletons (those that don't have LAC support will get
poor quality results. GLR might be a challenge.)
Please, comment the design and implementation here. However, you
might find it easier to read here:
https://github.com/akimd/bison/pull/16.
I would have liked to extract more commits that deal with the test
suite from this thread, but it was too entangled, and I already spent
too much time in git rebase and fixing conflicts. Sorry about that.
Akim Demaille (12):
yacc.c: extract yyerror_message_arguments
yacc.c: store token numbers, not token strings
yacc.c: style: avoid macros
yacc.c: add custom error message generation
yacc.c: check custom error messages
tests: compute verbose error messages from the custom ones
yacc.c: isolate yyexpected_tokens
yacc.c: let custom error messages see the location
yacc.c: check custom error messages with parse-params
tests: a clearer test for parse-params
yacc.c: pass the parse-params to yyreport_syntax_error
yacc.c: portability to G++ 4.8
data/skeletons/bison.m4 | 5 +-
data/skeletons/yacc.c | 248 ++++++++++++++++++++++++++--------------
examples/c/calc/calc.y | 55 ++++++++-
tests/calc.at | 192 +++++++++++++++++++------------
tests/local.at | 82 ++++++++++---
tests/testsuite.at | 2 +-
6 files changed, 401 insertions(+), 183 deletions(-)
--
2.24.1
- RFC: custom error messages, Akim Demaille, 2020/01/03
- Re: RFC: custom error messages, Christian Schoenebeck, 2020/01/03
- Re: RFC: custom error messages, Akim Demaille, 2020/01/05
- Re: RFC: custom error messages, Christian Schoenebeck, 2020/01/09
- Re: RFC: custom error messages, Akim Demaille, 2020/01/10
- Re: RFC: custom error messages, Christian Schoenebeck, 2020/01/14
- Re: RFC: custom error messages, Akim Demaille, 2020/01/14
- [PATCH 00/12] RFC: yyreport_error_message,
Akim Demaille <=
- Re: [PATCH 00/12] RFC: yyreport_error_message, Akim Demaille, 2020/01/18
- [PATCH 02/12] yacc.c: store token numbers, not token strings, Akim Demaille, 2020/01/16
- [PATCH 03/12] yacc.c: style: avoid macros, Akim Demaille, 2020/01/16
- [PATCH 01/12] yacc.c: extract yyerror_message_arguments, Akim Demaille, 2020/01/16
- [PATCH 04/12] yacc.c: add custom error message generation, Akim Demaille, 2020/01/16
- [PATCH 06/12] tests: compute verbose error messages from the custom ones, Akim Demaille, 2020/01/16
- [PATCH 05/12] yacc.c: check custom error messages, Akim Demaille, 2020/01/16
- [PATCH 07/12] yacc.c: isolate yyexpected_tokens, Akim Demaille, 2020/01/16
- [PATCH 08/12] yacc.c: let custom error messages see the location, Akim Demaille, 2020/01/16
- [PATCH 09/12] yacc.c: check custom error messages with parse-params, Akim Demaille, 2020/01/16