bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ylwrap proposition


From: Ralf Wildenhues
Subject: Re: ylwrap proposition
Date: Sat, 23 Jun 2007 16:14:23 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

* Sergey Poznyakoff wrote on Sat, Jun 23, 2007 at 02:04:29PM CEST:
> Ralf Wildenhues <address@hidden> ha escrit:
> 
> > Can s/yy/.../ change anything unintended?  E.g., do we need to ensure it
> > only changes words beginning with yy?
> 
> In theory it could, for example if the programmer used identifiers
> beginning with, or containing `yy'. However, I can hardly imagine
> someone who does that. At least, all yacc manuals declare that `yy'
> prefix is reserved for yacc/lex identifiers and explicitly discourage
> its use in application identifiers.
> 
> It would be preferable, of course, to change only those `yy' that occur
> at the beginning of words. But I cannot figure out a portable way of
> doing so in sed.

Something like 
  s/^yy/REPL/
  s/\([^a-zA-Z0-9]\)yy/\1REPL/

but then sed should be executed as 'LC_ALL=C sed' to avoid locale
issues.  Another possibility is to just list all letters, as is done
elsewhere in the script (and could be factored in shell variables, like
Autoconf does.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]