From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11573 invoked by alias); 9 Jul 2003 15:43:01 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 11562 invoked from network); 9 Jul 2003 15:43:00 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by sources.redhat.com with SMTP; 9 Jul 2003 15:43:00 -0000 Received: from Hermes.suse.de (Hermes.suse.de [213.95.15.136]) by Cantor.suse.de (Postfix) with ESMTP id F3B7114702; Wed, 9 Jul 2003 17:42:59 +0200 (MEST) To: Daniel Berlin Cc: Michael Elizabeth Chastain , gdb-patches@sources.redhat.com, mludvig@suse.cz Subject: Re: [testsuite] gdb.c++/templates.exp References: <200307091505.h69F5WkH023634@duracef.shout.net> <3E88AB72-B220-11D7-BADE-000A95A34564@dberlin.org> From: Andreas Schwab X-Yow: Where's the Coke machine? Tell me a joke!! Date: Wed, 09 Jul 2003 15:43:00 -0000 In-Reply-To: (Daniel Berlin's message of "Wed, 9 Jul 2003 11:20:05 -0400") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2003-07/txt/msg00180.txt.bz2 Daniel Berlin writes: |> 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. It surely doesn't. Repetition operators only apply to the smallest preceding group. The fixed prefix is "(unsigned", then comes an optional " ", then an optional "long", then the fixed postfix ");". All in all it matches exactly four strings: "(unsigned);" "(unsigned );" "(unsignedlong);" "(unsigned long);" Only the first and the fourth are desired. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."