diff --git a/ChangeLog b/ChangeLog index 30d4ba54..17e3f213 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,14 @@ * NEWS: Version 2.0b. + * tests/regression.at (Token definitions): Don't rely on + AT_PARSER_CHECK for data that contains backslashes. It currently + uses 'echo', and 'echo' isn't portable if its argument contains + backslashes. Problem found on OpenBSD 3.4. Also, do not assume + that the byte '\0xff' is not printable in the C locale; it is, + under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are + not printable, so use '\0x81' to test. + * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent version of GCC, since the macro is used with non-GCC compilers. diff --git a/tests/regression.at b/tests/regression.at index de62cdcc..eb85f290 100644 --- a/tests/regression.at +++ b/tests/regression.at @@ -345,9 +345,9 @@ int yylex (void); %token B_TOKEN "b" %token C_TOKEN 'c' %token 'd' D_TOKEN -%token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\377\x001\x0000ff??!" +%token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!" %% -exp: "a" "\\\'\?\"\a\b\f\n\r\t\v\001\377\x001\x0000ff??!"; +exp: "a" "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"; %% void yyerror (char const *s) @@ -370,9 +370,10 @@ main (void) AT_CHECK([bison -o input.c input.y]) AT_COMPILE([input]) -AT_PARSER_CHECK([./input], 1, [], -[syntax error, unexpected "\\'?\"\a\b\f\n\r\t\v\001\377\001\377?\?!", expecting a -]) +AT_DATA([experr], +[[syntax error, unexpected "\\'?\"\a\b\f\n\r\t\v\001\201\001\201?\?!", expecting a +]]) +AT_PARSER_CHECK([./input], 1, [], [experr]) AT_CLEANUP