From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5282 invoked by alias); 27 Oct 2009 16:25:48 -0000 Received: (qmail 5264 invoked by uid 22791); 27 Oct 2009 16:25:46 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from g1t0027.austin.hp.com (HELO g1t0027.austin.hp.com) (15.216.28.34) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Oct 2009 16:25:29 +0000 Received: from smtp2.cup.hp.com (smtp.cup.hp.com [16.89.216.28]) by g1t0027.austin.hp.com (Postfix) with ESMTP id 8E6B038328; Tue, 27 Oct 2009 16:25:27 +0000 (UTC) Received: from [16.89.92.85] (hpsje.cup.hp.com [16.89.92.85]) by smtp2.cup.hp.com (Postfix) with ESMTP id 295C4395678; Tue, 27 Oct 2009 15:45:41 +0000 (UTC) Subject: Re: Testsuite regular expression question From: Steve Ellcey Reply-To: sje@cup.hp.com To: "Kaveh R. GHAZI" Cc: gcc@gcc.gnu.org, janis187@us.ibm.com In-Reply-To: References: <200910262306.n9QN6u113854@lucas.cup.hp.com> Content-Type: text/plain Date: Tue, 27 Oct 2009 17:00:00 -0000 Message-Id: <1256660729.23605.10.camel@hpsje.cup.hp.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg00564.txt.bz2 On Tue, 2009-10-27 at 02:09 -0400, Kaveh R. GHAZI wrote: > On Mon, 26 Oct 2009, Steve Ellcey wrote: > > > I have tried: > > /* { dg-final { scan-assembler-times "(byte|data1).*?0x3.*? DW_AT_inline" 3 } } */ > > /* { dg-final { scan-assembler-times "(byte\|data1).*?0x3.*? DW_AT_inline" 3 } } */ > > /* { dg-final { scan-assembler-times "\(byte\|data1\).*?0x3.*? DW_AT_inline" 3 } } */ > > > > And various other escapes, parenthesis, etc but cannot get any of them > > to work. Does anyone know what this RE should look like to allow 'byte' > > or 'data1' in the string? It seems to break as soon as I introduce > > parenthesis anywhere in the RE. > > I think you need two backslashes escaping the paren and maybe one before > the pipe. I'm not sure about the \| vs | though, give the double escape > paren a try both ways. You can see some examples via: > > find gcc/testsuite | xargs grep 'scan-assembler-times.*[(|]' > > --Kaveh I tried two backslashes in front of the parens and either one or no backslashes in front of the pipe. None of them work. I did a find looking for examples and that didn't help. The most common usage I found was no backslashes before the parens and one backslash before the pipe. But those examples didn't have any .*? expressions in them and I don't know if that is messing things up somehow because that doesn't work for me in this case. Steve Ellcey sje@cup.hp.com