=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/bc/bc.y,v retrieving revision 1.24 retrieving revision 1.25 diff -c -r1.24 -r1.25 *** src/usr.bin/bc/bc.y 2004/10/19 07:36:51 1.24 --- src/usr.bin/bc/bc.y 2005/03/17 16:59:31 1.25 *************** *** 1,5 **** %{ ! /* $OpenBSD: bc.y,v 1.24 2004/10/19 07:36:51 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek --- 1,5 ---- %{ ! /* $OpenBSD: bc.y,v 1.25 2005/03/17 16:59:31 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek *************** *** 31,37 **** */ #ifndef lint ! static const char rcsid[] = "$OpenBSD: bc.y,v 1.24 2004/10/19 07:36:51 otto Exp $"; #endif /* not lint */ #include --- 31,37 ---- */ #ifndef lint ! static const char rcsid[] = "$OpenBSD: bc.y,v 1.25 2005/03/17 16:59:31 otto Exp $"; #endif /* not lint */ #include *************** *** 190,195 **** --- 190,199 ---- { yyerrok; } + | error QUIT + { + yyerrok; + } ; semicolon_list : /* empty */ *************** *** 928,935 **** { char *str, *p; ! if (isspace(yytext[0]) || !isprint(yytext[0])) ! asprintf(&str, "%s: %s:%d: %s: ascii char 0x%x unexpected", __progname, filename, lineno, s, yytext[0]); else asprintf(&str, "%s: %s:%d: %s: %s unexpected", --- 932,942 ---- { char *str, *p; ! if (feof(yyin)) ! asprintf(&str, "%s: %s:%d: %s: unexpected EOF", ! __progname, filename, lineno, s); ! else if (isspace(yytext[0]) || !isprint(yytext[0])) ! asprintf(&str, "%s: %s:%d: %s: ascii char 0x%02x unexpected", __progname, filename, lineno, s, yytext[0]); else asprintf(&str, "%s: %s:%d: %s: %s unexpected",