This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Handle comments in the C expression parser
- To: Michael Elizabeth Chastain <chastain at cygnus dot com>
- Subject: Re: [PATCH] Handle comments in the C expression parser
- From: Daniel Berlin <dberlin at redhat dot com>
- Date: 14 Feb 2001 01:24:59 -0500
- Cc: gdb-patches at sources dot redhat dot com
- References: <200102140609.WAA27978@bosch.cygnus.com>
Michael Elizabeth Chastain <chastain@cygnus.com> writes:
> > It shouldn't give that error, you should get an error as soon as you
> > hit enter after line.
>
> Err, yeah.
>
> (gdb) print /* multi line
> error: unterminated comment
>
> ... that is what I am thinking.
>
> > Think of comments as ignored quoted strings with different start and
> > end chars.
>
> And different \ convention. I'm too tired to figure out how gdb
> handles \ in '...' and "..." strings.
>
It calls "parse_escape", and lets it handle it. If parse_escape
returns -1 or something, it gives you an escape error. Otherwise, it
continues eating about it's very way.
> > On to better things.
> > :)
>
> Oooh, oooh, can we get a new demangler with "unsigned int",
> "void", "char *", and "foo &" ?
>
> That would make 5 or 6 people happy.
>
I'm still waiting for approval, i'll ping again.
I've been busy abstracting the other differences that pop up, into a
C++ abi framework (IE struct cp_abi_ops).
--Dan
> Michael