diff --git a/programs/winedbg/debug.l b/programs/winedbg/debug.l index afb8bb111e1..e8387e41209 100644 --- a/programs/winedbg/debug.l +++ b/programs/winedbg/debug.l @@ -74,7 +74,7 @@ DIGIT [0-9] HEXDIGIT [0-9a-fA-F] FORMAT [ubcdgiswx] IDENTIFIER [_a-zA-Z~][_a-zA-Z0-9~@]* -PATHNAME [/_a-zA-Z\.~][/_a-zA-Z0-9\.~@]* +PATHNAME [-/_a-zA-Z\.~][-/_a-zA-Z0-9\.~@]* STRING \"[^\n"]+\" %s FORMAT_EXPECTED @@ -98,6 +98,11 @@ STRING \"[^\n"]+\" <*>\n { BEGIN(INITIAL); syntax_error = 0; return tEOL; } /* Indicates end of command. Reset state. */ + /* This rule must precede the ones below, */ + /* otherwise paths like '/' or '0x9' would */ + /* get parsed as an operator or tNUM */ +{PATHNAME} { yylval.string = lexeme_alloc(yytext); return tPATH; } + "||" { return OP_LOR; } "&&" { return OP_LAND; } "==" { return OP_EQ; } @@ -205,8 +210,6 @@ all { return tALL; } {IDENTIFIER} { yylval.string = lexeme_alloc(yytext); return tIDENTIFIER; } "$"{IDENTIFIER} { yylval.string = lexeme_alloc(yytext+1); return tINTVAR; } -{PATHNAME} { yylval.string = lexeme_alloc(yytext); return tPATH; } - <*>[ \t\r]+ /* Eat up whitespace and DOS LF */ . { BEGIN(ASTRING_EXPECTED); yyless(0); return tNOPROCESS;}