NetBSD-Bugs archive

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

Re: PR/39002 CVS commit: src/dist/nawk



The following reply was made to PR bin/39002; it has been noted by GNATS.

From: "Greg A. Woods; Planix, Inc." <woods%planix.ca@localhost>
To: David Holland <dholland-bugs%netbsd.org@localhost>
Cc: gnats-bugs%netbsd.org@localhost
Subject: Re: PR/39002 CVS commit: src/dist/nawk
Date: Sun, 13 Jul 2008 16:46:23 -0400

 On 13-Jul-08, at 3:59 PM, David Holland wrote:
 
 > On Sun, Jul 13, 2008 at 07:30:02PM +0000, Greg A. Woods; Planix,  
 > Inc. wrote:
 >>> Log Message:
 >>> PR/39002: cheusov at tut dot br: Warn for \x where x is not a valid
 >>> escaped
 >>> char.
 >>
 >> This makes AWK violate the definition of the language defined in the
 >> AWK book, to which this AWK implementation is supposed to conform to.
 >
 > Chapter and verse?
 
 Page 191:
 
 for REs:
 
        \c      matches the escape sequence or literal character c
 
 for strings and REs:
 
        \c      any other character 'c' literally, e.g., \" for " and \\ for \
 
 
 (also shown on p. 31-32 and discussed in some detail on p. 28-29)
 
 The implication is of course that all 'x' are valid in '\x' and thus  
 no warning should ever be given.  (except inside a character class in  
 an RE where only '\', '^' at the beginning, and '-' between two  
 characters have any special meaning)
 
 -- 
                                        Greg A. Woods; Planix, Inc.
                                        <woods%planix.ca@localhost>
 


Home | Main Index | Thread Index | Old Index