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)
This commit is contained in:
parent
983d8aea3e
commit
f661e7a924
|
@ -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; }
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue