[RFA] Remove la_error
Simon Marchi
simon.marchi@polymtl.ca
Mon Jun 18 18:05:00 GMT 2018
On 2018-06-03 18:28, Tom Tromey wrote:
> While working on the parser code, I noticed that yyerror is exported
> from each parser. It is used by this code in parse.c:
>
> TRY
> {
> if (lang->la_parser (&ps))
> lang->la_error (NULL);
> }
>
> However, it seems to me that la_error will never be called here,
> because in every case, la_parser throws an exception on error -- each
> implementation of yyerror just calls error.
>
> So, this patch removes la_error and makes all the yyerror functions
> static. This is handy primarily because it makes it simpler to make
> the expression parsers pure.
>
> Tested by the buildbot.
LGTM, thanks.
Simon
More information about the Gdb-patches
mailing list