From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>, Simon Marchi <simark@simark.ca>,
jimw@sifive.com, jhb@FreeBSD.org, palmer@sifive.com,
Andrew Burgess <andrew.burgess@embecosm.com>
Subject: [PATCHv2 2/4] gdb: Resolve 49 reduce/reduce conflicts in c-exp.y
Date: Tue, 18 Dec 2018 22:40:00 -0000 [thread overview]
Message-ID: <6ea141fbd952fef1a7228c08fb4eeb98f1fa5370.1545172667.git.andrew.burgess@embecosm.com> (raw)
In-Reply-To: <cover.1545172667.git.andrew.burgess@embecosm.com>
In-Reply-To: <cover.1545172667.git.andrew.burgess@embecosm.com>
This commit splits the ptr_operator rule in c-exp.y in two, resolving
49 reduce/reduce conflicts in the process. There should be no
user visible change after this commit.
There are still 42 shift/reduce and 4 reduce/reduce conflicts
remaining in c-exp.y (using GNU bison 3.0.4).
gdb/ChangeLog:
* c-exp.y (base_ptr_operator): New rule, with non-recursive
content taken from...
(ptr_operator): ...here, leaving just the recursion here.
---
gdb/ChangeLog | 6 ++++++
gdb/c-exp.y | 18 ++++++++----------
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index 447ac78eee1..d2198b1fdf7 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -1136,21 +1136,19 @@ const_or_volatile_or_space_identifier:
|
;
-ptr_operator:
- ptr_operator '*'
+base_ptr_operator
+ : '*'
{ insert_type (tp_pointer); }
- const_or_volatile_or_space_identifier
- | '*'
- { insert_type (tp_pointer); }
- const_or_volatile_or_space_identifier
+ const_or_volatile_or_space_identifier
| '&'
{ insert_type (tp_reference); }
- | '&' ptr_operator
- { insert_type (tp_reference); }
| ANDAND
{ insert_type (tp_rvalue_reference); }
- | ANDAND ptr_operator
- { insert_type (tp_rvalue_reference); }
+ ;
+
+ptr_operator
+ : base_ptr_operator
+ | base_ptr_operator base_ptr_operator
;
ptr_operator_ts: ptr_operator
--
2.14.5
next prev parent reply other threads:[~2018-12-18 22:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-15 23:25 [PATCH] gdb: Allow struct fields named double Andrew Burgess
2018-12-16 16:23 ` Simon Marchi
2018-12-16 16:42 ` Tom Tromey
2018-12-18 22:40 ` [PATCHv2 1/4] gdb: Extend the comments in c-exp.y Andrew Burgess
2018-12-21 15:44 ` Tom Tromey
2018-12-18 22:40 ` [PATCHv2 3/4] gdb: Add new parser rule for structure field names Andrew Burgess
2018-12-21 16:38 ` Tom Tromey
2018-12-18 22:40 ` [PATCHv2 0/4] gdb: Allow struct fields named double Andrew Burgess
2018-12-24 17:30 ` Andrew Burgess
2018-12-18 22:40 ` Andrew Burgess [this message]
2018-12-21 16:37 ` [PATCHv2 2/4] gdb: Resolve 49 reduce/reduce conflicts in c-exp.y Tom Tromey
2018-12-18 22:40 ` [PATCHv2 4/4] gdb: Allow struct fields named double Andrew Burgess
2018-12-21 17:19 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ea141fbd952fef1a7228c08fb4eeb98f1fa5370.1545172667.git.andrew.burgess@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=jhb@FreeBSD.org \
--cc=jimw@sifive.com \
--cc=palmer@sifive.com \
--cc=simark@simark.ca \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox