diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-09-14 19:00:01 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-09-14 19:00:01 +0200 |
commit | ab0d97147d8c19eabc41b11698dff13cd04d67ae (patch) | |
tree | b9f7cb00405b41fce77c5df3ac9a7ea0e2ebfc1c /contrib/hsrex/Makefile.am | |
parent | 07d9cdfd3d1462f5f19cfa1422d9b5710c9e139d (diff) | |
download | sciteco-ab0d97147d8c19eabc41b11698dff13cd04d67ae.tar.gz |
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.
Diffstat (limited to 'contrib/hsrex/Makefile.am')
-rw-r--r-- | contrib/hsrex/Makefile.am | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/hsrex/Makefile.am b/contrib/hsrex/Makefile.am new file mode 100644 index 0000000..11b979a --- /dev/null +++ b/contrib/hsrex/Makefile.am @@ -0,0 +1,10 @@ +# FIXME: We probably need both ASCII and widechar versions +# as separate libraries. +AM_CPPFLAGS = -DREGEX_STANDALONE +# -DREGEX_WCHAR + +noinst_LTLIBRARIES = libhswrex.la +libhswrex_la_SOURCES = regcomp.c regexec.c regerror.c regfree.c regalone.c \ + regalone.h regcustom.h regerrs.h regex.h regguts.h +# included from regcomp.c and regexec.c +EXTRA_libhswrex_la_SOURCES = regc_color.c regc_cvec.c regc_lex.c regc_locale.c regc_nfa.c |