This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [testsuite] gdb.c++/templates.exp
- From: Michael Elizabeth Chastain <mec at shout dot net>
- To: dberlin at dberlin dot org
- Cc: gdb-patches at sources dot redhat dot com, mludvig at suse dot cz
- Date: Wed, 9 Jul 2003 11:50:00 -0400
- Subject: Re: [testsuite] gdb.c++/templates.exp
Hi Daniel,
>> \\(unsigned ?(long|)\\);
> 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.
The ? applies to one atom before it. An atom is just the single
character ' ', not the whole string 'unsigned '. So says "Tcl and the
Tk Toolkit", section 9.3.
It's been that way in Unix regular expressions since the days of 'ed'.
What with the fifty different regular expression implementations out
there, maybe one of them does behave that way. Not TCL or egrep or perl
or vim though.
Michael C