Commit fc8c8a52 authored by Alexandre Julliard's avatar Alexandre Julliard

wrc: Report an error when encountering non-ASCII characters.

parent 5d569956
...@@ -573,7 +573,7 @@ L\" { ...@@ -573,7 +573,7 @@ L\" {
} }
{ws}+ want_id = wanted_id; /* Eat whitespace */ {ws}+ want_id = wanted_id; /* Eat whitespace */
<INITIAL>. return yytext[0]; <INITIAL>[ -~] return yytext[0];
<*>.|\n { <*>.|\n {
/* Catch all rule to find any unmatched text */ /* Catch all rule to find any unmatched text */
...@@ -582,8 +582,8 @@ L\" { ...@@ -582,8 +582,8 @@ L\" {
line_number++; line_number++;
char_number = 1; char_number = 1;
} }
parser_warning("Unmatched text '%c' (0x%02x) YY_START=%d\n", parser_error("Unmatched text '%c' (0x%02x) YY_START=%d",
isprint(*yytext & 0xff) ? *yytext : '.', *yytext, YY_START); isprint((unsigned char)*yytext) ? *yytext : '.', *yytext, YY_START);
} }
<<EOF>> current_codepage = -1; yyterminate(); <<EOF>> current_codepage = -1; yyterminate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment