[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Forcing Bison's yacc.c to report more expected tokens on syntax erro
From: |
Akim Demaille |
Subject: |
Re: Forcing Bison's yacc.c to report more expected tokens on syntax error |
Date: |
Wed, 6 Feb 2019 21:07:29 +0100 |
Hi all,
> Le 6 févr. 2019 à 20:53, Derek Clegg <address@hidden> a écrit :
>
> I agree with Adrian — it would be nicer, in my opinion, to allow users to
> handle syntax errors directly, rather than always going through the bison
> code which formats syntax errors in a fixed way.
I also agree with this idea. But it's not that simple to change the existing
API, and the last time I asked for comments, I had nothing
(https://lists.gnu.org/archive/html/bison-patches/2018-11/msg00030.html,
https://lists.gnu.org/archive/html/bison-patches/2019-01/msg00037.html). Also,
the way to denote the culprit (the invalid token) is quite delicate (except for
the obvious case of keywords).
I will be back on this issue _after_ I have found a satisfactory answer about
internationalization, and escaping.