diff options
Diffstat (limited to 'gdb/p-exp.y')
-rw-r--r-- | gdb/p-exp.y | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/p-exp.y b/gdb/p-exp.y index a1c78bf..c214cf1 100644 --- a/gdb/p-exp.y +++ b/gdb/p-exp.y @@ -1103,7 +1103,7 @@ pop_current_type (void) struct token { - char *operator; + char *oper; int token; enum exp_opcode opcode; }; @@ -1173,8 +1173,8 @@ yylex (void) /* See if it is a special token of length 3. */ if (explen > 2) for (i = 0; i < sizeof (tokentab3) / sizeof (tokentab3[0]); i++) - if (strncasecmp (tokstart, tokentab3[i].operator, 3) == 0 - && (!isalpha (tokentab3[i].operator[0]) || explen == 3 + if (strncasecmp (tokstart, tokentab3[i].oper, 3) == 0 + && (!isalpha (tokentab3[i].oper[0]) || explen == 3 || (!isalpha (tokstart[3]) && !isdigit (tokstart[3]) && tokstart[3] != '_'))) { @@ -1186,8 +1186,8 @@ yylex (void) /* See if it is a special token of length 2. */ if (explen > 1) for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++) - if (strncasecmp (tokstart, tokentab2[i].operator, 2) == 0 - && (!isalpha (tokentab2[i].operator[0]) || explen == 2 + if (strncasecmp (tokstart, tokentab2[i].oper, 2) == 0 + && (!isalpha (tokentab2[i].oper[0]) || explen == 2 || (!isalpha (tokstart[2]) && !isdigit (tokstart[2]) && tokstart[2] != '_'))) { |