[RFA] Token cleanup in c-exp.y
Keith Seitz
keiths@redhat.com
Tue Aug 25 18:07:00 GMT 2009
On 08/25/2009 08:45 AM, Tom Tromey wrote:
>>>>>> "Keith" == Keith Seitz<keiths@redhat.com> writes:
>
> Keith> + {".*", DOT_STAR, BINOP_END, 0}
>
> After reading the follow-up comments I realized that this needs a couple
> little changes.
>
> The last field should be 1 here, and then the tokentab2 and tokentab3
> logic in yylex needs the same cxx_only treatment as ident_tokens.
Yes, indeed. I've fixed that
> I suppose that the "::" operator also needs to be C++-only.
I don't think we can do that. "::" is also used by gdb for non-language
constructs like filename::function and function::variable. There are
several scattered tests on this already.
New patch attached.
Keith
2009-08-25 Keith Seitz <keiths@redhat.com>
* c-exp.y (tokentab3): Add new token, ARROW_STAR. Changed all users.
(tokentab2): Add new token, DOT_STAR. Changed all users.
(yylex): Add cxx_only check for tokentab2 and tokentab3 searches.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: token-fix2.patch
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20090825/257d1a01/attachment.ksh>
More information about the Gdb-patches
mailing list