Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
61a2e527
Commit
61a2e527
authored
Dec 08, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Move C++ identifier detection to the lexer.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
05c5a12f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
dbg.y
programs/winedbg/dbg.y
+4
-10
debug.l
programs/winedbg/debug.l
+2
-2
No files found.
programs/winedbg/dbg.y
View file @
61a2e527
...
@@ -77,13 +77,13 @@ static void parser(const char*);
...
@@ -77,13 +77,13 @@ static void parser(const char*);
%left '+' '-'
%left '+' '-'
%left '*' '/' '%'
%left '*' '/' '%'
%left OP_SIGN '!' '~' OP_DEREF /* OP_INC OP_DEC OP_ADDR */
%left OP_SIGN '!' '~' OP_DEREF /* OP_INC OP_DEC OP_ADDR */
%left '.' '[' OP_DRF
OP_SCOPE
%left '.' '[' OP_DRF
%nonassoc ':'
%nonassoc ':'
%type <expression> expr lvalue
%type <expression> expr lvalue
%type <lvalue> expr_lvalue lvalue_addr
%type <lvalue> expr_lvalue lvalue_addr
%type <integer> expr_rvalue
%type <integer> expr_rvalue
%type <string> pathname identifier
cpp_identifier
%type <string> pathname identifier
%type <listing> list_arg
%type <listing> list_arg
%type <type> type_expr
%type <type> type_expr
%type <strings> list_of_words
%type <strings> list_of_words
...
@@ -162,15 +162,9 @@ pathname:
...
@@ -162,15 +162,9 @@ pathname:
| tPATH { $$ = $1; }
| tPATH { $$ = $1; }
;
;
cpp_identifier:
tIDENTIFIER { $$ = $1; }
| identifier OP_SCOPE tIDENTIFIER { $$ = lexeme_alloc_size(strlen($1) + 2 + strlen($3) + 1);
sprintf($$, "%s::%s", $1, $3); }
;
identifier:
identifier:
cpp_identifier
{ $$ = $1; }
tIDENTIFIER
{ $$ = $1; }
| tIDENTIFIER '!'
cpp_identifier
{ $$ = lexeme_alloc_size(strlen($1) + 1 + strlen($3) + 1);
| tIDENTIFIER '!'
tIDENTIFIER
{ $$ = lexeme_alloc_size(strlen($1) + 1 + strlen($3) + 1);
sprintf($$, "%s!%s", $1, $3); }
sprintf($$, "%s!%s", $1, $3); }
;
;
...
...
programs/winedbg/debug.l
View file @
61a2e527
...
@@ -99,6 +99,7 @@ DIGIT [0-9]
...
@@ -99,6 +99,7 @@ DIGIT [0-9]
HEXDIGIT [0-9a-fA-F]
HEXDIGIT [0-9a-fA-F]
FORMAT [ubcdgiswxa]
FORMAT [ubcdgiswxa]
IDENTIFIER [_a-zA-Z~?][_a-zA-Z0-9~?@]*
IDENTIFIER [_a-zA-Z~?][_a-zA-Z0-9~?@]*
SCOPED_IDENTIFIER [_a-zA-Z~?][_a-zA-Z0-9~?@]*"::"
PATHNAME [\\/_a-zA-Z0-9\.~@][\\/\-_a-zA-Z0-9\.~@]*
PATHNAME [\\/_a-zA-Z0-9\.~@][\\/\-_a-zA-Z0-9\.~@]*
STRING \"(\\[^\n]|[^\\"\n])*\"
STRING \"(\\[^\n]|[^\\"\n])*\"
...
@@ -135,7 +136,6 @@ STRING \"(\\[^\n]|[^\\"\n])*\"
...
@@ -135,7 +136,6 @@ STRING \"(\\[^\n]|[^\\"\n])*\"
"<<" { return OP_SHL; }
"<<" { return OP_SHL; }
">>" { return OP_SHR; }
">>" { return OP_SHR; }
"->" { return OP_DRF; }
"->" { return OP_DRF; }
"::" { return OP_SCOPE; }
"[" { return *yytext; }
"[" { return *yytext; }
"]" { return *yytext; }
"]" { return *yytext; }
...
@@ -243,7 +243,7 @@ union { return tUNION; }
...
@@ -243,7 +243,7 @@ union { return tUNION; }
enum { return tENUM; }
enum { return tENUM; }
all { return tALL; }
all { return tALL; }
{
IDENTIFIER}
{ dbg_lval.string = lexeme_alloc(yytext); return tIDENTIFIER; }
{
SCOPED_IDENTIFIER}*{IDENTIFIER}
{ dbg_lval.string = lexeme_alloc(yytext); return tIDENTIFIER; }
"$"{IDENTIFIER} { dbg_lval.string = lexeme_alloc(yytext+1); return tINTVAR; }
"$"{IDENTIFIER} { dbg_lval.string = lexeme_alloc(yytext+1); return tINTVAR; }
<PATH_EXPECTED,PATH_ACCEPTED>{PATHNAME} { dbg_lval.string = lexeme_alloc(yytext); return tPATH; }
<PATH_EXPECTED,PATH_ACCEPTED>{PATHNAME} { dbg_lval.string = lexeme_alloc(yytext); return tPATH; }
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment