This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Change functions in cp-name-parser.y into methods


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]