BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000914 [BusyBox] Documentation minor always 06-20-06 08:47 06-20-06 16:18
Reporter vda2 View Status public  
Assigned To BusyBox
Priority normal Resolution won't fix  
Status closed   Product Version
Summary 0000914: awk/gawk incompatibility: busybox includes POSIX interval expressions by default
Description bbox's awk -f <this file> says: "awk: xregcomp: Unmatched \{"
gawk-3.0.4 doesn't
Additional Information
Attached Files  addsym.awk [^] (2,249 bytes) 06-20-06 08:47

- Relationships

- Notes
(0001436)
vapier
06-20-06 16:18

this is because gawk's default regular expression support includes all POSIX expressions *except* interval expressions

busybox's regular expression support includes all POSIX expressions including internal expressions ... which means you need to escape the {

if you read the SUSv3 standards, busybox's behavior is compliant:
http://www.opengroup.org/onlinepubs/009695399/utilities/awk.html [^]
http://www.opengroup.org/onlinepubs/009695399/utilities/awk.html#tag_04_06_13_04 [^]
 * 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)

http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04 [^]
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04_03 [^]
   The asterisk, plus-sign, question-mark, and left-brace shall be special except when used in a bracket expression.

and in fact, the standard says that doing '\{' should always result in matching of a '{'
http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_03_02 [^]

so, since you arent using [{], and you arent using '\{', your code is not portable and busybox makes no promise that it will work
 

- Issue History
Date Modified Username Field Change
06-20-06 08:47 vda2 New Issue
06-20-06 08:47 vda2 Status new => assigned
06-20-06 08:47 vda2 Assigned To  => BusyBox
06-20-06 08:47 vda2 File Added: addsym.awk
06-20-06 09:15 vda Issue Monitored: vda
06-20-06 16:18 vapier Note Added: 0001436
06-20-06 16:18 vapier Status assigned => closed
06-20-06 16:18 vapier Resolution open => won't fix
06-20-06 16:18 vapier Summary awk/gawk incompatibility (testcase included) => awk/gawk incompatibility: busybox includes POSIX interval expressions by default


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker