aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-02-22 12:56:09 -0700
committerTom Tromey <tromey@adacore.com>2022-04-04 12:46:09 -0600
commit02a8d05fc67915ada76b45f9f10b11baf57d5278 (patch)
treedf16372bb09613b4aee4d178517b1adadf6e7026 /gdb/ada-exp.y
parent67700be2867e6f03d7e0891a47429aab2b879551 (diff)
downloadgdb-02a8d05fc67915ada76b45f9f10b11baf57d5278.zip
gdb-02a8d05fc67915ada76b45f9f10b11baf57d5278.tar.gz
gdb-02a8d05fc67915ada76b45f9f10b11baf57d5278.tar.bz2
Remove the Ada DOT_ALL token
The Ada parser has a DOT_ALL token to represent ".all", and another token to represent other ".<identifier>" forms. However, for completion it is a bit more convenient to unify these cases, so this patch removes DOT_ALL.
Diffstat (limited to 'gdb/ada-exp.y')
-rw-r--r--gdb/ada-exp.y18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index 204e77a..d84cdce 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -448,8 +448,6 @@ make_tick_completer (struct stoken tok)
%type <bval> block
%type <lval> arglist tick_arglist
-%token DOT_ALL
-
/* Special type cases, put in to allow the parser to distinguish different
legal basetypes. */
%token <sval> DOLLAR_VARIABLE
@@ -477,7 +475,7 @@ make_tick_completer (struct stoken tok)
/* The following are right-associative only so that reductions at this
precedence have lower precedence than '.' and '('. The syntax still
forces a.b.c, e.g., to be LEFT-associated. */
-%right '.' '(' '[' DOT_ID DOT_ALL
+%right '.' '(' '[' DOT_ID
%token NEW OTHERS
@@ -506,15 +504,17 @@ exp1 : exp
;
/* Expressions, not including the sequencing operator. */
-primary : primary DOT_ALL
- { ada_wrap<ada_unop_ind_operation> (); }
- ;
primary : primary DOT_ID
{
- operation_up arg = ada_pop ();
- pstate->push_new<ada_structop_operation>
- (std::move (arg), copy_name ($2));
+ if (strcmp ($2.ptr, "all") == 0)
+ ada_wrap<ada_unop_ind_operation> ();
+ else
+ {
+ operation_up arg = ada_pop ();
+ pstate->push_new<ada_structop_operation>
+ (std::move (arg), copy_name ($2));
+ }
}
;