This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: generalize AIX cabs fix regex


 > 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]