diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-06-13 22:29:43 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-06-13 22:29:43 +0300 |
commit | ccdaa3f17b9341e628acd64f68502c67141e8997 (patch) | |
tree | a451021544496bc65f5f3fab33f1118f8d273966 /re.c | |
parent | 6e7e7acd76d49c0d1f0cb60829e8b340df318b88 (diff) | |
download | egawk-ccdaa3f17b9341e628acd64f68502c67141e8997.tar.gz egawk-ccdaa3f17b9341e628acd64f68502c67141e8997.tar.bz2 egawk-ccdaa3f17b9341e628acd64f68502c67141e8997.zip |
Make ranges be character based all the time.
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -382,13 +382,26 @@ resetup() { if (do_posix) syn = RE_SYNTAX_POSIX_AWK; /* strict POSIX re's */ - else if (do_traditional) { + else if (do_traditional) syn = RE_SYNTAX_AWK; /* traditional Unix awk re's */ - syn |= RE_RANGES_IGNORE_LOCALES; - } else + else syn = RE_SYNTAX_GNU_AWK; /* POSIX re's + GNU ops */ /* + * As of POSIX 1003.1-2008 (see rule 7 of + * http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_05 + * and the rationale, at http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap09.html#tag_21_09_03_05) + * POSIX changed ranges outside the POSIX locale from requiring + * Collation Element Order to being "undefined". This gives an + * implementation, like gawk, the freedom to do ranges as it + * pleases. + * + * We very much please to always use numeric ordering, as + * the Good Lord intended. + */ + syn |= RE_RANGES_IGNORE_LOCALES; + + /* * Interval expressions are now on by default, as POSIX is * wide-spread enough that people want it. The do_intervals * variable remains for use with --traditional. |