Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Daniel Berlin <dberlin@dberlin.org>
Cc: Michael Elizabeth Chastain <mec@shout.net>,
	gdb-patches@sources.redhat.com, mludvig@suse.cz
Subject: Re: [testsuite] gdb.c++/templates.exp
Date: Wed, 09 Jul 2003 15:43:00 -0000	[thread overview]
Message-ID: <jevfubln99.fsf@sykes.suse.de> (raw)
In-Reply-To: <D1ACF259-B220-11D7-BADE-000A95A34564@dberlin.org> (Daniel Berlin's message of "Wed, 9 Jul 2003 11:20:05 -0400")

Daniel Berlin <dberlin@dberlin.org> 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."


  parent reply	other threads:[~2003-07-09 15:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-09 15:05 Michael Elizabeth Chastain
2003-07-09 15:16 ` Daniel Berlin
2003-07-09 15:20   ` Daniel Berlin
2003-07-09 15:38     ` Daniel Jacobowitz
2003-07-09 15:43     ` Andreas Schwab [this message]
2003-07-10  7:51 ` Michal Ludvig
  -- strict thread matches above, loose matches on Subject: below --
2003-07-10 14:38 Michael Elizabeth Chastain
2003-07-11  6:45 ` Michal Ludvig
2003-07-09 15:50 Michael Elizabeth Chastain
2003-07-09 16:19 ` Daniel Berlin
2003-07-09 15:35 Michael Elizabeth Chastain
2003-07-09 13:26 Michal Ludvig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jevfubln99.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=dberlin@dberlin.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mec@shout.net \
    --cc=mludvig@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox