This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [testsuite] gdb.c++/templates.exp
On Wed, Jul 09, 2003 at 11:20:05AM -0400, Daniel Berlin wrote:
>
> On Wednesday, July 9, 2003, at 11:15 AM, Daniel Berlin wrote:
>
> >
> >On Wednesday, July 9, 2003, at 11:05 AM, Michael Elizabeth Chastain
> >wrote:
> >
> >>Hi Michal,
> >>
> >>This part is not quite correct:
> >>
> >> \\(unsigned ?(long|)\\);
> >>
> >>It would accept 'unsignedlong' which would be wrong.
> >
> >It shouldn't, unless the regex isn't whitespace sensitive
>
> Just to be clear, this regex should accept nothing, "long", "unsigned
> long", and "unsigned".
> This may be *wrong*, but it certainly shouldn't accept "unsignedlong".
> The ? should be applying to "unsigned ", not just the whitespace.
I have never encountered a regex engine which worked that way. Unless
you parenthesize the ? will only apply to the previous character. At
least perl, TCL, and egrep are (for once!) consistent here. So is
procmail :P
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer