|
Packit |
575503 |
# From hankedr@dms.auburn.edu Sun Jan 28 12:25:43 2001
|
|
Packit |
575503 |
# Received: from mail.actcom.co.il [192.114.47.13]
|
|
Packit |
575503 |
# by localhost with POP3 (fetchmail-5.5.0)
|
|
Packit |
575503 |
# for arnold@localhost (single-drop); Sun, 28 Jan 2001 12:25:43 +0200 (IST)
|
|
Packit |
575503 |
# Received: by actcom.co.il (mbox arobbins)
|
|
Packit |
575503 |
# (with Cubic Circle's cucipop (v1.31 1998/05/13) Sun Jan 28 12:27:08 2001)
|
|
Packit |
575503 |
# X-From_: hankedr@dms.auburn.edu Sat Jan 27 15:15:57 2001
|
|
Packit |
575503 |
# Received: from lmail.actcom.co.il by actcom.co.il with ESMTP
|
|
Packit |
575503 |
# (8.9.1a/actcom-0.2) id PAA23801 for <arobbins@actcom.co.il>;
|
|
Packit |
575503 |
# Sat, 27 Jan 2001 15:15:55 +0200 (EET)
|
|
Packit |
575503 |
# (rfc931-sender: lmail.actcom.co.il [192.114.47.13])
|
|
Packit |
575503 |
# Received: from billohost.com (www.billohost.com [209.196.35.10])
|
|
Packit |
575503 |
# by lmail.actcom.co.il (8.9.3/8.9.1) with ESMTP id PAA15998
|
|
Packit |
575503 |
# for <arobbins@actcom.co.il>; Sat, 27 Jan 2001 15:16:27 +0200
|
|
Packit |
575503 |
# Received: from yak.dms.auburn.edu (yak.dms.auburn.edu [131.204.53.2])
|
|
Packit |
575503 |
# by billohost.com (8.9.3/8.9.3) with ESMTP id IAA00467
|
|
Packit |
575503 |
# for <arnold@skeeve.com>; Sat, 27 Jan 2001 08:15:52 -0500
|
|
Packit |
575503 |
# Received: (from hankedr@localhost)
|
|
Packit |
575503 |
# by yak.dms.auburn.edu (8.9.3/8.9.3/Debian/GNU) id HAA24441;
|
|
Packit |
575503 |
# Sat, 27 Jan 2001 07:15:44 -0600
|
|
Packit |
575503 |
# Date: Sat, 27 Jan 2001 07:15:44 -0600
|
|
Packit |
575503 |
# Message-Id: <200101271315.HAA24441@yak.dms.auburn.edu>
|
|
Packit |
575503 |
# From: Darrel Hankerson <hankedr@dms.auburn.edu>
|
|
Packit |
575503 |
# To: arnold@skeeve.com
|
|
Packit |
575503 |
# Subject: [stolfi@ic.unicamp.br: Bug in [...]* matching with acute-u]
|
|
Packit |
575503 |
# Mime-Version: 1.0 (generated by tm-edit 7.106)
|
|
Packit |
575503 |
# Content-Type: message/rfc822
|
|
Packit |
575503 |
# Status: R
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# From: Jorge Stolfi <stolfi@ic.unicamp.br>
|
|
Packit |
575503 |
# To: bug-gnu-utils@gnu.org
|
|
Packit |
575503 |
# Subject: Bug in [...]* matching with acute-u
|
|
Packit |
575503 |
# MIME-Version: 1.0
|
|
Packit |
575503 |
# Reply-To: stolfi@ic.unicamp.br
|
|
Packit |
575503 |
# X-MIME-Autoconverted: from 8bit to quoted-printable by grande.dcc.unicamp.br id GAA10716
|
|
Packit |
575503 |
# Sender: bug-gnu-utils-admin@gnu.org
|
|
Packit |
575503 |
# Errors-To: bug-gnu-utils-admin@gnu.org
|
|
Packit |
575503 |
# X-BeenThere: bug-gnu-utils@gnu.org
|
|
Packit |
575503 |
# X-Mailman-Version: 2.0
|
|
Packit |
575503 |
# Precedence: bulk
|
|
Packit |
575503 |
# List-Help: <mailto:bug-gnu-utils-request@gnu.org?subject=help>
|
|
Packit |
575503 |
# List-Post: <mailto:bug-gnu-utils@gnu.org>
|
|
Packit |
575503 |
# List-Subscribe: <http://mail.gnu.org/mailman/listinfo/bug-gnu-utils>,
|
|
Packit |
575503 |
# <mailto:bug-gnu-utils-request@gnu.org?subject=subscribe>
|
|
Packit |
575503 |
# List-Id: Bug reports for the GNU utilities <bug-gnu-utils.gnu.org>
|
|
Packit |
575503 |
# List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/bug-gnu-utils>,
|
|
Packit |
575503 |
# <mailto:bug-gnu-utils-request@gnu.org?subject=unsubscribe>
|
|
Packit |
575503 |
# List-Archive: <http://mail.gnu.org/pipermail/bug-gnu-utils/>
|
|
Packit |
575503 |
# Date: Sat, 27 Jan 2001 06:46:11 -0200 (EDT)
|
|
Packit |
575503 |
# Content-Transfer-Encoding: 8bit
|
|
Packit |
575503 |
# X-MIME-Autoconverted: from quoted-printable to 8bit by manatee.dms.auburn.edu id CAA14936
|
|
Packit |
575503 |
# Content-Type: text/plain; charset=iso-8859-1
|
|
Packit |
575503 |
# <mailto:bug-gnu-utils-request@gnu.org?subject=subscribe>
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# Content-Length: 3137
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# Hi,
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# I think I have run into a bug in gawk's handling of REs of the
|
|
Packit |
575503 |
# form [...]* when the bracketed list includes certain 8-bit characters,
|
|
Packit |
575503 |
# specifically u-acute (octal \372).
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# The problem occurs in GNU Awk 3.0.4, both under
|
|
Packit |
575503 |
# Linux 2.2.14-5.0 (intel i686) and SunOS 5.5 (Sun sparc).
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# Here is a program that illustrates the bug, and its output.
|
|
Packit |
575503 |
# The first two lines of the output should be equal, shouldn't they?
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# ----------------------------------------------------------------------
|
|
Packit |
575503 |
#! /usr/bin/gawk -f
|
|
Packit |
575503 |
|
|
Packit |
575503 |
BEGIN {
|
|
Packit |
575503 |
s = "bananas and ananases in canaan";
|
|
Packit |
575503 |
t = s; gsub(/[an]*n/, "AN", t); printf "%-8s %s\n", "[an]*n", t;
|
|
Packit |
575503 |
t = s; gsub(/[anú]*n/, "AN", t); printf "%-8s %s\n", "[anú]*n", t;
|
|
Packit |
575503 |
print "";
|
|
Packit |
575503 |
t = s; gsub(/[aú]*n/, "AN", t); printf "%-8s %s\n", "[aú]*n", t;
|
|
Packit |
575503 |
print "";
|
|
Packit |
575503 |
t = s; gsub(/[an]n/, "AN", t); printf "%-8s %s\n", "[an]n", t;
|
|
Packit |
575503 |
t = s; gsub(/[aú]n/, "AN", t); printf "%-8s %s\n", "[aú]n", t;
|
|
Packit |
575503 |
t = s; gsub(/[anú]n/, "AN", t); printf "%-8s %s\n", "[anú]n", t;
|
|
Packit |
575503 |
print "";
|
|
Packit |
575503 |
t = s; gsub(/[an]?n/, "AN", t); printf "%-8s %s\n", "[an]?n", t;
|
|
Packit |
575503 |
t = s; gsub(/[aú]?n/, "AN", t); printf "%-8s %s\n", "[aú]?n", t;
|
|
Packit |
575503 |
t = s; gsub(/[anú]?n/, "AN", t); printf "%-8s %s\n", "[anú]?n", t;
|
|
Packit |
575503 |
print "";
|
|
Packit |
575503 |
t = s; gsub(/[an]+n/, "AN", t); printf "%-8s %s\n", "[an]+n", t;
|
|
Packit |
575503 |
t = s; gsub(/[aú]+n/, "AN", t); printf "%-8s %s\n", "[aú]+n", t;
|
|
Packit |
575503 |
t = s; gsub(/[anú]+n/, "AN", t); printf "%-8s %s\n", "[anú]+n", t;
|
|
Packit |
575503 |
}
|
|
Packit |
575503 |
# ----------------------------------------------------------------------
|
|
Packit |
575503 |
# [an]*n bANas ANd ANases iAN cAN
|
|
Packit |
575503 |
# [anú]*n bananas and ananases in canaan
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# [aú]*n bANANas ANd ANANases iAN cANAN
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# [an]n bANANas ANd ANANases in cANaAN
|
|
Packit |
575503 |
# [aú]n bANANas ANd ANANases in cANaAN
|
|
Packit |
575503 |
# [anú]n bANANas ANd ANANases in cANaAN
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# [an]?n bANANas ANd ANANases iAN cANaAN
|
|
Packit |
575503 |
# [aú]?n bANANas ANd ANANases iAN cANaAN
|
|
Packit |
575503 |
# [anú]?n bANANas ANd ANANases iAN cANaAN
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# [an]+n bANas ANd ANases in cAN
|
|
Packit |
575503 |
# [aú]+n bANANas ANd ANANases in cANAN
|
|
Packit |
575503 |
# [anú]+n bananas and ananases in canaan
|
|
Packit |
575503 |
# ----------------------------------------------------------------------
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# Apparently the problem is specific to u-acute; I've tried several
|
|
Packit |
575503 |
# other 8-bit characters and they seem to behave as expected.
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# By comparing the second and third output lines, it would seem that the
|
|
Packit |
575503 |
# problem involves backtracking out of a partial match of [...]* in
|
|
Packit |
575503 |
# order to match the next sub-expression, when the latter begins with
|
|
Packit |
575503 |
# one of the given characters.
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# All the best,
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# --stolfi
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# ------------------------------------------------------------------------
|
|
Packit |
575503 |
# Jorge Stolfi | http://www.dcc.unicamp.br/~stolfi | stolfi@dcc.unicamp.br
|
|
Packit |
575503 |
# Institute of Computing (formerly DCC-IMECC) | Wrk +55 (19)3788-5858
|
|
Packit |
575503 |
# Universidade Estadual de Campinas (UNICAMP) | +55 (19)3788-5840
|
|
Packit |
575503 |
# Av. Albert Einstein 1251 - Caixa Postal 6176 | Fax +55 (19)3788-5847
|
|
Packit |
575503 |
# 13083-970 Campinas, SP -- Brazil | Hom +55 (19)3287-4069
|
|
Packit |
575503 |
# ------------------------------------------------------------------------
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
# _______________________________________________
|
|
Packit |
575503 |
# Bug-gnu-utils mailing list
|
|
Packit |
575503 |
# Bug-gnu-utils@gnu.org
|
|
Packit |
575503 |
# http://mail.gnu.org/mailman/listinfo/bug-gnu-utils
|
|
Packit |
575503 |
#
|
|
Packit |
575503 |
#
|