aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2009-08-25 00:23:07 +0000
committerKeith Seitz <keiths@redhat.com>2009-08-25 00:23:07 +0000
commitc1af96a0c544a1dac4a4536ab371980282bb74b0 (patch)
tree45f94807dabd9c599060bb643dad08a2b57292ac
parent36271639f5a5f964d20cbb0c3cd1a5d6f697d056 (diff)
downloadgdb-c1af96a0c544a1dac4a4536ab371980282bb74b0.zip
gdb-c1af96a0c544a1dac4a4536ab371980282bb74b0.tar.gz
gdb-c1af96a0c544a1dac4a4536ab371980282bb74b0.tar.bz2
* c-exp.y (tokentab3): Add new token, ARROW_STAR. Changed all users.
(tokentab2): Add new token, DOT_STAR. Changed all users.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/c-exp.y12
2 files changed, 12 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5d6edfc..94b0431 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2009-08-24 Keith Seitz <keiths@redhat.com>
+ * c-exp.y (tokentab3): Add new token, ARROW_STAR. Changed all users.
+ (tokentab2): Add new token, DOT_STAR. Changed all users.
+
+2009-08-24 Keith Seitz <keiths@redhat.com>
+
* symtab.c (default_make_symbol_completion_list): Keep
':', too, so that we can limit searches in namespaces
and classes.
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index aacc112..fc41bfd 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -232,7 +232,7 @@ static int parse_number (char *, int, int, YYSTYPE *);
%left '+' '-'
%left '*' '/' '%'
%right UNARY INCREMENT DECREMENT
-%right ARROW '.' '[' '('
+%right ARROW ARROW_STAR '.' DOT_STAR '[' '('
%token <ssym> BLOCKNAME
%token <bval> FILENAME
%type <bval> block
@@ -333,7 +333,7 @@ exp : exp ARROW qualified_name
write_exp_elt_opcode (STRUCTOP_MPTR); }
;
-exp : exp ARROW '*' exp
+exp : exp ARROW_STAR exp
{ write_exp_elt_opcode (STRUCTOP_MPTR); }
;
@@ -368,7 +368,7 @@ exp : exp '.' qualified_name
write_exp_elt_opcode (STRUCTOP_MEMBER); }
;
-exp : exp '.' '*' exp
+exp : exp DOT_STAR exp
{ write_exp_elt_opcode (STRUCTOP_MEMBER); }
;
@@ -1664,7 +1664,8 @@ struct token
static const struct token tokentab3[] =
{
{">>=", ASSIGN_MODIFY, BINOP_RSH, 0},
- {"<<=", ASSIGN_MODIFY, BINOP_LSH, 0}
+ {"<<=", ASSIGN_MODIFY, BINOP_LSH, 0},
+ {"->*", ARROW_STAR, BINOP_END, 1}
};
static const struct token tokentab2[] =
@@ -1688,7 +1689,8 @@ static const struct token tokentab2[] =
{"==", EQUAL, BINOP_END, 0},
{"!=", NOTEQUAL, BINOP_END, 0},
{"<=", LEQ, BINOP_END, 0},
- {">=", GEQ, BINOP_END, 0}
+ {">=", GEQ, BINOP_END, 0},
+ {".*", DOT_STAR, BINOP_END, 0}
};
/* Identifier-like tokens. */