mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
* 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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user