Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

patch for mawk: character classes support

12 views
Skip to first unread message

Aleksey Cheusov

unread,
Jun 15, 2005, 2:08:43 PM6/15/05
to

Hi all.
As many of you know, mawk's internal regular expression engine
doesn't support character classes and therefore is not conformant
to POSIX regexp.

I've written patch which builds mawk with external regexp engine.
There are lots of different regexp engines world-wide.
You can use any of them
On most modern systems system-wide regexp engine also conforms to POSIX.
As a result mawk conforms to POSIX regexp, if you build
it with appropriate regexp engine like this.

# regexec/regcomp functions from libc will be used
./configure && make

# TRE implementation will be used
CFLAGS='-O3 -I/usr/include/tre' LDFLAGS='-ltre' ./configure && make

Whether UTF-8 support is provided or not
also depends on external regexp library.

If you find bugs in it, let me know.

The patch is here.

http://www.mova.org/~cheusov/pub/mawk_external_regexp.patch

--
Best regards, Aleksey Cheusov.

Aleksey Cheusov

unread,
Jun 16, 2005, 8:46:32 AM6/16/05
to

AC> Hi all.
AC> As many of you know, mawk's internal regular expression engine
AC> doesn't support character classes and therefore is not conformant
AC> to POSIX regexp.

AC> I've written patch which builds mawk with external regexp engine.
[skipped]
Do not forger to run autoconf before configuring mawk.
autoconf2.13 work fine.

0 new messages