From owner-freebsd-standards@FreeBSD.ORG Sat Jul 12 03:40:11 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1585837B401 for ; Sat, 12 Jul 2003 03:40:11 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DDB1C43FE0 for ; Sat, 12 Jul 2003 03:40:09 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h6CAe9Up085264 for ; Sat, 12 Jul 2003 03:40:09 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h6CAe9kr085263; Sat, 12 Jul 2003 03:40:09 -0700 (PDT) Resent-Date: Sat, 12 Jul 2003 03:40:09 -0700 (PDT) Resent-Message-Id: <200307121040.h6CAe9kr085263@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jens Schweikhardt Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FA4637B405 for ; Sat, 12 Jul 2003 03:31:36 -0700 (PDT) Received: from bremen.shuttle.de (bremen.shuttle.de [194.95.249.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9771543FA3 for ; Sat, 12 Jul 2003 03:31:35 -0700 (PDT) (envelope-from schweikh@schweikhardt.net) Received: from bremen.shuttle.de (localhost [127.0.0.1]) by bremen.shuttle.de (Postfix) with ESMTP id 77D7D17D66 for ; Sat, 12 Jul 2003 12:31:34 +0200 (CEST) Received: (from uucp@localhost)h6CAVYaR024470 for FreeBSD-gnats-submit@freebsd.org; Sat, 12 Jul 2003 12:31:34 +0200 Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.12.9/8.12.9) id h6CAVnIi093652; Sat, 12 Jul 2003 12:31:49 +0200 (CEST) (envelope-from schweikh) Message-Id: <200307121031.h6CAVnIi093652@hal9000.schweikhardt.net> Date: Sat, 12 Jul 2003 12:31:49 +0200 (CEST) From: Jens Schweikhardt To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: standards/54410: one-true-awk not POSIX compliant (no extended REs) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jens Schweikhardt List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2003 10:40:11 -0000 >Number: 54410 >Category: standards >Synopsis: one-true-awk not POSIX compliant (no extended REs) >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 12 03:40:09 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Jens Schweikhardt >Release: FreeBSD 5.1-CURRENT i386 >Organization: Digital Details >Environment: System: FreeBSD hal9000.schweikhardt.net 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Wed Jul 9 21:22:46 CEST 2003 toor@hal9000.schweikhardt.net:/usr/obj/share/src/HEAD/sys/HAL9000 i386 any >Description: Our /usr/bin/awk understands only basic RE, not Extended RE, as required by IEEE Std 1003.1-2001: References: ... Regular Expressions The awk utility shall make use of the extended regular expression notation (see the Base Definitions volume of IEEE Std 1003.1-2001, Section 9.4, Extended Regular Expressions) EREs Matching Multiple Characters ... 5. When an ERE matching a single character or an ERE enclosed in parentheses is followed by an interval expression of the format "{m}" , "{m,}" , or "{m,n}" , together with that interval expression it shall match what repeated consecutive occurrences of the ERE would match. The values of m and n are decimal integers in the range 0 <= m<= n<= {RE_DUP_MAX}, where m specifies the exact or minimum number of occurrences and n specifies the maximum number of occurrences. The expression "{m}" matches exactly m occurrences of the preceding ERE, "{m,}" matches at least m occurrences, and "{m,n}" matches any number of occurrences between m and n, inclusive. >How-To-Repeat: echo e | /usr/bin/awk '/e{1}/' # should print e, but prints nothing >Fix: It's probaly POLA violation to change the default RE style from BRE to ERE, but we should add a POSIX mode that uses BRE (e.g. gawk needs --posix to be compliant). >Release-Note: >Audit-Trail: >Unformatted: