Eric Pouech : winedbg: Fixes for identifiers.
Module: wine Branch: refs/heads/master Commit: f661e7a924293a574c894ac7706324b2e49c6ceb URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=f661e7a924293a574c894ac7... Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Sat Mar 25 10:12:45 2006 +0100 winedbg: Fixes for identifiers. - fixed lexical rules for a path name - fixed identifier rules so that we get the right precedence between ! and :: - modules (in mod!name forms) are now handled as tIDENTIFIER (tPATH was buggy anyhow) --- programs/winedbg/dbg.y | 12 ++++++++---- programs/winedbg/debug.l | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/programs/winedbg/dbg.y b/programs/winedbg/dbg.y index ecbb3fa..987a315 100644 --- a/programs/winedbg/dbg.y +++ b/programs/winedbg/dbg.y @@ -86,7 +86,7 @@ int yyerror(const char*); %type <expression> expr lvalue %type <lvalue> expr_lvalue lvalue_addr %type <integer> expr_rvalue -%type <string> pathname identifier +%type <string> pathname identifier cpp_identifier %type <listing> list_arg %type <type> type_expr @@ -162,14 +162,18 @@ pathname: | tPATH { $$ = $1; } ; -identifier: +cpp_identifier: tIDENTIFIER { $$ = $1; } - | tPATH '!' tIDENTIFIER { $$ = lexeme_alloc_size(strlen($1) + 1 + strlen($3) + 1); - sprintf($$, "%s!%s", $1, $3); } | identifier OP_SCOPE tIDENTIFIER { $$ = lexeme_alloc_size(strlen($1) + 2 + strlen($3) + 1); sprintf($$, "%s::%s", $1, $3); } ; +identifier: + cpp_identifier { $$ = $1; } + | tIDENTIFIER '!' cpp_identifier { $$ = lexeme_alloc_size(strlen($1) + 1 + strlen($3) + 1); + sprintf($$, "%s!%s", $1, $3); } + ; + list_arg: tNUM { $$.FileName = NULL; $$.LineNumber = $1; } | pathname ':' tNUM { $$.FileName = $1; $$.LineNumber = $3; } diff --git a/programs/winedbg/debug.l b/programs/winedbg/debug.l index dd18a89..0a14e9a 100644 --- a/programs/winedbg/debug.l +++ b/programs/winedbg/debug.l @@ -77,7 +77,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-Z0-9\.~@]+ STRING \"[^\n"]+\" %s FORMAT_EXPECTED
participants (1)
-
Alexandre Julliard