From ab0d97147d8c19eabc41b11698dff13cd04d67ae Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 14 Sep 2024 19:00:01 +0200 Subject: imported Henry Spencer's regex implementation from Tcl Source: github.com/garyhouston/hsrex * This version should be a Thompson NFA, using backtracking only for backreferences, so it should be much safer than PCRE (GRegex). Search times should be linear and there should be no way to cause stack overflows (unless we would generate backreferences). * Importing the lib makes sure we don't add another compile-time dependency. Also, we could implement our own regcomp() which translates directly from TECO patterns. * This is still WIP and currently only works with the ASCII version. The widechar version does not define re_comp() and re_exec(). * Apparently we can't have an ASCII and widechar version at the same time, so we must build two libtool libraries and somehow mangle the names. * Ideally the widechar version will also work with UTF-8 strings. * An alternative might be to import the Gnulib regex module. How does it choose the encoding anyway? * Or we could just use Oniguruma - but this would have to be a new external library dependency. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 3375ce8..10e54d4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ ACLOCAL_AMFLAGS = -I m4 if REPLACE_MALLOC MAYBE_DLMALLOC = contrib/dlmalloc endif -SUBDIRS = lib $(MAYBE_DLMALLOC) contrib/rb3ptr src doc tests +SUBDIRS = lib $(MAYBE_DLMALLOC) contrib/rb3ptr contrib/hsrex src doc tests dist_scitecodata_DATA = sample.teco_ini -- cgit v1.2.3