tests: let yacc's yyerror take its argument as a const string
Some of yacc error messages are const strings; it makes no sense for
yyerror to take a 'char *', it should be a 'const char *' as POSIX now
requires.
Fixes all the failures reported by Kiyoshi Kanazawa.
<https://lists.gnu.org/r/bug-bison/2021-09/msg00005.html>
See bug#50469 <https://debbugs.gnu.org/50469>.