Quoting and the expr parser
Mark Kettenis
mark.kettenis@xs4all.nl
Tue Aug 5 19:46:00 GMT 2008
> Date: Tue, 05 Aug 2008 12:24:04 -0700
> From: Keith Seitz <keiths@redhat.com>
>
> Hi,
>
> I have a simple question:
>
> Why must one type "my_class::'operator+'" instead of simply
> "my_class::operator+"?
>
> *Should* gdb accept the latter; after all, it's not ambiguous (assuming
> it's not overloaded).
GDB probably should accept that if the selected language is C++. The
problem though is that it is actually pretty difficult to make GDB
accept that wiouout the additional quotes. Normally a '+' sign isn't
allowed in a function name, so you'd have to teach the lexer/parser
that it is allowed but only if there the "operator" keyword is used
right in front of it. This is a fundamental problem with C++. It is
so badly designed that it is almost impossible to write a proper
parser for it.
More information about the Gdb
mailing list