This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: add C++ alternate punctuators
- From: Daniel Jacobowitz <drow at false dot org>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 20 Dec 2008 12:15:26 -0500
- Subject: Re: RFA: add C++ alternate punctuators
- References: <m3ljuaet5j.fsf@fleche.redhat.com>
On Sat, Dec 20, 2008 at 08:57:28AM -0700, Tom Tromey wrote:
> C++ has alternate spellings for some operators. This patch adds
> support for them to the C lexer.
>
> Rather than add a bunch of new code to the switch, I followed the
> comment's advice and used a table.
Does anything performance sensitive use this lexer, or is that likely
in the future? I suspect this version will be quite a lot slower;
it has a string copy and a linear search.
I expect the copy in cp-name-parser.c will be performance sensitive
but I don't know about this one.
--
Daniel Jacobowitz
CodeSourcery