diff --git a/tools/wrc/README.wrc b/tools/wrc/README.wrc index a33e6350730..1d7f5c3cae9 100644 --- a/tools/wrc/README.wrc +++ b/tools/wrc/README.wrc @@ -110,7 +110,7 @@ __FILE__ | "..." | Current filename as string __LINE__ | nnn | Current linenumber as integer __TIME__ | "23:59:59" | Timestring of compilation __DATE__ | "May 1 2000" | Datestring of compilation -__WRC__  1 | Wrc's major version +__WRC__ | 1 | Wrc's major version __WRC_MINOR__ | 1 | Wrc's minor version __WRC_MICRO__ | 7 | Wrc's minor version __WRC_PATCH__ | 8 | Alias of __WRC_MICRO__ diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l index 5a5d773aa2d..aa5684b8540 100644 --- a/tools/wrc/parser.l +++ b/tools/wrc/parser.l @@ -369,7 +369,7 @@ static struct keyword *iskeyword(char *kw) 0[oO][0-7]+[lL]? { yylval.num = strtoul(yytext+2, 0, 8); return toupper(yytext[yyleng-1]) == 'L' ? tLNUMBER : tNUMBER; } /* - * The next to rules scan identifiers and filenames. + * The next two rules scan identifiers and filenames. * This is achieved by using the priority ruling * of the scanner where a '.' is valid in a filename * and *only* in a filename. In this case, the second @@ -396,7 +396,7 @@ static struct keyword *iskeyword(char *kw) return tIDENT; } } -[A-Za-z_0-9.]+ yylval.str = make_string(yytext); return tFILENAME; +[A-Za-z_0-9./\\]+ yylval.str = make_string(yytext); return tFILENAME; /* * Wide string scanning