On Fri, Sep 21, 2018 at 07:25:41AM +0200, Claudio Jeker wrote:
> Fix some of the yyerror messages. Try to be a bit more clear than just
> "syntax error". Now only the yacc internal "syntax error" is left.
>
OK denis@
> --
> :wq Claudio
>
> ? obj
> Index: parse.y
> ===================================================================
> RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v
> retrieving revision 1.357
> diff -u -p -r1.357 parse.y
> --- parse.y 21 Sep 2018 05:13:35 -0000 1.357
> +++ parse.y 21 Sep 2018 05:23:29 -0000
> @@ -1405,7 +1405,7 @@ peeropts : REMOTEAS as4number {
> curpeer->conf.export_type =
> EXPORT_DEFAULT_ROUTE;
> } else {
> - yyerror("syntax error");
> + yyerror("syntax error: unknown '%s'", $2);
> free($2);
> YYERROR;
> }
> @@ -2194,7 +2194,7 @@ filter_elm : filter_prefix_h {
> YYERROR;
> }
> if (fmopts.m.prefixset.name[0] != '\0') {
> - yyerror("prefix-set filters already specified");
> + yyerror("prefix-set filter already specified");
> free($2);
> YYERROR;
> }
> @@ -3023,7 +3023,7 @@ top:
> *p = '\0';
> break;
> } else if (c == '\0') {
> - yyerror("syntax error");
> + yyerror("syntax error: unterminated quote");
> return (findeol());
> }
> if (p + 1 >= buf + sizeof(buf) - 1) {
>