From c03d651b486c1562c208d549299445e8e576d3d1 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Wed, 8 Dec 2021 14:44:56 +0100 Subject: [PATCH] winedbg: Move module scoping to the lexer. This allows expressing module scoping with wildcard characters (eg kernel*!CreateFileA). Signed-off-by: Eric Pouech Signed-off-by: Alexandre Julliard --- programs/winedbg/dbg.y | 2 -- programs/winedbg/debug.l | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/programs/winedbg/dbg.y b/programs/winedbg/dbg.y index 79877b2c644..3e6ef34b836 100644 --- a/programs/winedbg/dbg.y +++ b/programs/winedbg/dbg.y @@ -164,8 +164,6 @@ pathname: identifier: tIDENTIFIER { $$ = $1; } - | tIDENTIFIER '!' tIDENTIFIER { $$ = lexeme_alloc_size(strlen($1) + 1 + strlen($3) + 1); - sprintf($$, "%s!%s", $1, $3); } ; list_arg: diff --git a/programs/winedbg/debug.l b/programs/winedbg/debug.l index a587a13fb70..280013799c9 100644 --- a/programs/winedbg/debug.l +++ b/programs/winedbg/debug.l @@ -100,6 +100,7 @@ HEXDIGIT [0-9a-fA-F] FORMAT [ubcdgiswxa] IDENTIFIER [_a-zA-Z~?][_a-zA-Z0-9~?@]* SCOPED_IDENTIFIER [_a-zA-Z~?][_a-zA-Z0-9~?@]*"::" +MODULE_IDENTIFIER [_a-zA-Z~?\*][_a-zA-Z0-9~?\*@]*"!" PATHNAME [\\/_a-zA-Z0-9\.~@][\\/\-_a-zA-Z0-9\.~@]* STRING \"(\\[^\n]|[^\\"\n])*\" @@ -243,7 +244,7 @@ union { return tUNION; } enum { return tENUM; } all { return tALL; } -{SCOPED_IDENTIFIER}*{IDENTIFIER} { dbg_lval.string = lexeme_alloc(yytext); return tIDENTIFIER; } +{MODULE_IDENTIFIER}?{SCOPED_IDENTIFIER}*{IDENTIFIER} { dbg_lval.string = lexeme_alloc(yytext); return tIDENTIFIER; } "$"{IDENTIFIER} { dbg_lval.string = lexeme_alloc(yytext+1); return tINTVAR; } {PATHNAME} { dbg_lval.string = lexeme_alloc(yytext); return tPATH; }