This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Change functions in cp-name-parser.y into methods
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Sat, 2 Jun 2018 10:57:03 +0100
- Subject: Re: [RFA] Change functions in cp-name-parser.y into methods
- References: <20180601175152.24165-1-tom@tromey.com>
On 06/01/2018 06:51 PM, Tom Tromey wrote:
> Pedro pointed out in an earlier patch that it would be possible to
> make some helper functions in cp-name-parser.y into methods on
> cpname_state, cleaning up the code a bit. This patch implements this
> idea.
>
> Doing this required moving the %union earlier in the .y file, so the
> patch is somewhat bigger than you might expect.
>
> Tested by building with both bison and byacc, and then running the
> gdb.cp tests.
>
> ChangeLog
> 2018-06-01 Tom Tromey <tom@tromey.com>
>
> * cp-name-parser.y (cpname_state): Add method declarations.
> (HANDLE_QUAL): Update.
> (cpname_state::d_grab, cpname_state::fill_comp)
> (cpname_state::make_operator, cpname_state::make_dtor)
> (cpname_state::make_builtin_type, cpname_state::make_name)
> (cpname_state::d_qualify, cpname_state::d_int_type)
> (cpname_state::d_unary, cpname_state::d_binary): Now methods.
> (%union): Move earlier.
Thanks, LGTM.
Pedro Alves