This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: generalize AIX cabs fix regex
- To: dje at watson dot ibm dot com
- Subject: Re: generalize AIX cabs fix regex
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Fri, 29 Sep 2000 11:19:39 -0400 (EDT)
- Cc: bkorb at gnu dot org, gcc-patches at gcc dot gnu dot org
> From: David Edelsohn <dje@watson.ibm.com>
>
> >>>>> "Kaveh R Ghazi" writes:
>
> >> From: David Edelsohn <dje@watson.ibm.com>
> >>
> >> ! select = '^extern[ \t]*double[ \t]*cabs';
>
> Kaveh> nit: use +, not * in the regex'es.
>
> That's what I expected, but I was following the convention I saw
> in most of the file for these types of expression. If I should buck the
> trend and DTRT, that's fine with me.
> David
I do see uses of both + and *, sometimes its intentionally mixed.
E.g. here is the bad_struct_term select pattern:
> select = "^[ \t]*typedef[ \t]+struct[ \t]+term[ \t]*;";
In places where whitespace is optional, it uses *. When its required,
it uses +. We may not be using plus in all places we should across
the whole file, but IMHO there's no reason not to DTRT for new
cases. :-)
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions