Code Monkey home page Code Monkey logo

lrexlib's Introduction

Lrexlib

 by Reuben Thomas ([email protected])
 and Shmuel Zeigerman ([email protected])

Lrexlib provides bindings of five regular expression library APIs (POSIX, PCRE, GNU, TRE and Oniguruma) to Lua >= 5.1. The bindings for TRE and Oniguruma are not currently complete.

Lrexlib is copyright Reuben Thomas 2000-2020 and copyright Shmuel Zeigerman 2004-2020, and is released under the same license as Lua, the MIT license (otherwise known as the revised BSD license). There is no warranty.

Please report bugs and make suggestions on GitHub.

Thanks to Thatcher Ulrich for bug and warning fixes, and to Nick Gammon for adding support for PCRE named subpatterns.


Installation

Lrexlib is installed with LuaRocks, using the command:

luarocks install lrexlib-FLAVOUR

where FLAVOUR is one of PCRE2, POSIX, oniguruma, TRE, GNU

Note that the obsolete PCRE version 1 is also supported, as flavour PCRE.

lrexlib's People

Contributors

andrew-demb avatar jayvdb avatar jonringer avatar rrthomas avatar shmuz avatar tautschnig avatar totktonada avatar zhaozg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lrexlib's Issues

Cannot compile with luarocks under Windows

Hi,

I'm trying to install Lrexlib-PCRE with luarocks under Windows (with the help of vcpkg).

When running 'luarocks install Lrexlib-PCRE' I get the following message:

src/pcre/lpcre.c(451): error C2491: 'luaopen_rex_pcre': definition of dllimport function not allowed

The line 451 is:

REX_API int REX_OPENLIB (lua_State *L) {

REX_API is defined as a synonym for LUALIB_API (common.h)

#ifndef REX_API
#  define REX_API LUALIB_API
#endif

LUALIB_API is a synonym for LUA_API (luaconf.h):

#define LUALIB_API	LUA_API

The problem is that (under Windows) LUA_API is a conditional define (luaconf.h):

#if defined(LUA_CORE) || defined(LUA_LIB)       /* { */
#define LUA_API __declspec(dllexport)
#else                                           /* }{ */
#define LUA_API __declspec(dllimport)
#endif                                          /* } */

Lua compiled modules should define LUA_LIB before including any lua header file so that LUA_API is correctly defined (__declspec(dllexport) will export the entry point)

With a very small change in the rockspec I managed to compile
before:

      defines = {
        "VERSION=\"2.9.1\"",
        "PCRE2_CODE_UNIT_WIDTH=8",
      },

after:

      defines = {
	"LUA_LIB=",
        "VERSION=\"2.9.1\"",
        "PCRE2_CODE_UNIT_WIDTH=8",
      },

Can you update the rockspec ?

Lua 5.4

Building for Lua 5.4 leads to error undefined symbol: luaL_optint.

This has been fixed in commit 6b517b1.

Therefore I would appreciate a new release of lrexlib, or are there other things to be done before this could be released for Lua 5.4?

LuaJIT

Hi,

Is there any plan on making your amazing library compatible with LuaJIT 2.0? I'm well aware that's quite a big work, but I'd be interested in the porting of the PCRE flavor for LuaJIT. So if you're bored, this is an idea of improvement :) By the way I'm using your lib in my project castl, and it does a great job, thanks!

Best

Add a pcre2 binding

It would be nice to have a PCRE2 binding: https://lists.exim.org/lurker/message/20150105.162835.0666407a.en.html

PCRE2 is not API-compatible with PCRE, so it would be perfectly natural to add a new flavor for it; it would not make sense to replace the old PCRE binding, as presumably users will still want that for some time to come (even though the changes at the "user" end are smaller).

PCRE2 has some nice features, including "search-and-replace" (which we might want to add to the API), and the ability to have embedded NULs in patterns, subject strings and replacement strings.

Installation with luarocks

Under 64-bit Ubuntu 14.04, sudo luarocks install lrexlib-pcre fails with

Error: Could not find expected file libpcre.a, or libpcre.so, or libpcre.so.* for PCRE -- you may have to  install PCRE in your system and/or pass PCRE_DIR or PCRE_LIBDIR to the luarocks command.  Example: luarocks install lrexlib-pcre PCRE_DIR=/usr/local

sudo luarocks install lrexlib-pcre PCRE_LIBDIR=/lib/x86_64-linux-gnu works.

Arguments of conditional operator do not typecheck

Hi,
While building your package using our research compiler infrastructure we noticed that the condition operator resulting from expansion of ALG_PUSHSUB_OR_FALSE of src/oniguruma/lonig.c does not typecheck:

The return type of lua_pushlstring is const char*, but lua_pushboolean has return type void. Yet the C standard requires that the second and third argument of the conditional operator ?: are compatible pointer types (there are several other cases, see 6.5.15 of the C Standard). Failing this, the compiler may produce arbitrary code.

The best way to fix this is likely to use if() { } else { } instead of the conditional operator here.

Best,
Michael

Yet another binding, and some issues

Hi,
This is more of a courtesy message than anything else - I'm not sure if you're still updating lrexlib these days or not. (?)

I write code for an open source tool called Wireshark (wireshark.org), and used lrexlib to expose yet another regex engine type: the Glib regex library, which is basically PCRE under the hood but with a Glib-specific API. I doubt anyone else would want/need such a thing, when they could just use the lrexlib PCRE binding as is; but I needed it because Wireshark gets built with Glib already, but not with PCRE directly, and I didn't want to add more complication to the build process/steps. (Wireshark is quite large and is fairly complicated to build already) If you'd like the Glib binding anyway, let me know and I'll push the latest to my fork of lrexlib and send you a pull request.

But the reason I'm submitting this issue as an issue is we found several compilation errors and warnings when building lrexlib. Some of them are because we have to support Wireshark being built with various compilers on many platforms, and invariably one or another of those is stricter than others for certain C-standard rules. If you'd like to fix those in your lrexlib repository, let me know and I'll push just those changes to a fork and send you a pull request. (i.e., separately from the Glib regex binding if you don't want that)

INSTALL is missing.

According to ChangeLog you changed a build system and made it "easier".
However it is not documented anywhere (I'm talking about 2.7.1).
It would be nice to document in INSTALL file how to build your modules.

Problem in nginx lua module.

call rex_pre.new in init_by_lua phase then call rex_pre.match in access_by_lua phase got following error messages:

550 2015/11/10 11:21:34 [error] 28259#0: *154 lua entry thread aborted: runtime error:###########/siglib.lua:31: error PCRE_ERROR_BADMAGIC

But when I try it in bash with luajit, everything is OK. Is it a compatibility problem?

Lua 5.3 error in rex_pcre.so - Symbol not found: _lua_newuserdata

I'm trying to install lrexlib-pcre as a dependency of the LuaRocks jsonschema module. When I try to require the jsonschema package in my .lua file, an error results when trying to load rex_pcre.so:

error loading module 'rex_pcre' from file '/usr/local/lib/lua/5.3/rex_pcre.so':
	dlopen(/usr/local/lib/lua/5.3/rex_pcre.so, 6): Symbol not found: _lua_newuserdata
  Referenced from: /usr/local/lib/lua/5.3/rex_pcre.so
  Expected in: flat namespace
 in /usr/local/lib/lua/5.3/rex_pcre.so

Any help would be appreciated. I saw in prior issues that it is recommended to check the installation on it's own with lua -lrex_pcre - this results in the exact same error as above.

Lua 5.2+ attempt to call a nil value (upvalue 'loadstring')

Hey there.
The Bug is quite easy:

jsonschema.lua line 261:

local loader, err = loadstring(tab_concat(self._code_table, ""), 'jsonschema:' .. (name or 'anonymous'))

On my system with Lua 5.4 that line gives this error:
attempt to call a nil value (upvalue 'loadstring')

it works when I call it like this:

local loader, err = load(tab_concat(self._code_table, ""), 'jsonschema:' .. (name or 'anonymous'))

some solution would probably be:

local loadfkt = loadstring or load
local loader, err = loadfkt(tab_concat(self._code_table, ""), 'jsonschema:' .. (name or 'anonymous'))

Unable to match UTF-8 characters with PCRE

Hi!

I don't succeed to match UTF-8 characters with a pattern which yet works in other languages like Python. I'm using the last release 2.7.2 on a Debian-based system with Lua 5.15.
I'm trying to match any alphabetic characters including accented ones for example. Here is the code that I run in a Lua interpreter:

> rex = require "rex_pcre"
> re = rex.new([[^[^\W\d_]+$]], rex.flags().UTF8)
> = re:match("à")
nil

I tried many other variations - like using the bytes as decimal instead of the character - but it never matches the pattern.

It's probably more a mistake or a lack of understanding of the Lua language from myself than a real issue in your library... But if you can help me to make it works I would be most grateful!

Thanks in advance!

LuaJIT with lrexlib

I wanted to use lrexlib with LuaJIT 2.0.3 and could not get it to work. It segfaults. The same luascript works with lua 5.1.
#0 lj_alloc_malloc (msp=0x40000378, nsize=) at lj_alloc.c:1191
#1 0x00007ffff71a5baa in Lmalloc () from ./rex_pcre.so
#2 0x00007ffff71a6682 in compile_regex () from ./rex_pcre.so
#3 0x00007ffff71a8043 in generic_find_func () from ./rex_pcre.so
#4 0x000000000041b718 in lj_BC_FUNCC ()
#5 0x0000000000409b20 in lua_pcall (L=, nargs=, nresults=, errfunc=)

at lj_api.c:1052

error loading module rex_pcre - undefined symbol: lua_getmetatable

Hi,

I try to install the http streaming server loomiere (https://github.com/valeriupalos/loomiere) for our campus. The compiling of the modules run without any error. On starting the streaming server I got the following error message:

[root@mediakescher-01 loomiere]# ./run
Loomiere (HTTP streaming server) version 2.0.1-beta.
Copyright (C)2010 PaloÅ & Sons. All rights reserved.
PANIC: unprotected error in call to Lua API (error loading module 'rex_pcre' from file '/usr/local/lib/lua/5.1/rex_pcre.so': /usr/local/lib/lua/5.1/rex_pcre.so: undefined symbol: lua_getmetatable)
[root@mediakescher-01 loomiere]#

Is this error a issue of the software or is there a way of configuration to solve the problem?
Thanks.

Ben

Problem with installing lrexlib-2.8.0-1 PCRE on Windows 10

I can't get it to install via Luarocks, so I decided to clone the repository and run
luarocks make lrexlib-pcre-2.8.0-1.rockspec

I am getting this error!

 PCRE_INCDIR=C:\Users\Damilare\Development\Anubis\pcre-8.12\pcre-8.12-bin\include PCRE_LIBDIR=C:\Users\Damilare\Development\Anubis\pcre-8.12\pcre-8.12-bin\lib\x64
mingw32-gcc -O2 -c -o src/common.o -IC:/Lua/include/lua/5.1 src/common.c -DVERSION="2.8.0" -DLUA_COMPAT_5_1 -IC:\Users\Damilare\Development\Anubis\pcre-8.12\pcre-8.12-bin\include
mingw32-gcc -O2 -c -o src/pcre/lpcre.o -IC:/Lua/include/lua/5.1 src/pcre/lpcre.c -DVERSION="2.8.0" -DLUA_COMPAT_5_1 -IC:\Users\Damilare\Development\Anubis\pcre-8.12\pcre-8.12-bin\include
mingw32-gcc -O2 -c -o src/pcre/lpcre_f.o -IC:/Lua/include/lua/5.1 src/pcre/lpcre_f.c -DVERSION="2.8.0" -DLUA_COMPAT_5_1 -IC:\Users\Damilare\Development\Anubis\pcre-8.12\pcre-8.12-bin\include
mingw32-gcc -shared -o rex_pcre.dll src/common.o src/pcre/lpcre.o src/pcre/lpcre_f.o -LC:\Users\Damilare\Development\Anubis\pcre-8.12\pcre-8.12-bin\lib\x64 -lpcre C:/Lua/lib/lua5.1.lib -lMSVCR80
src/pcre/lpcre.o:lpcre.c:(.text+0x5): undefined reference to `_imp__pcre_version'
src/pcre/lpcre.o:lpcre.c:(.text+0xeb): undefined reference to `_imp__pcre_maketables'
src/pcre/lpcre.o:lpcre.c:(.text+0x129): undefined reference to `_imp__pcre_compile'
src/pcre/lpcre.o:lpcre.c:(.text+0x148): undefined reference to `_imp__pcre_study'
src/pcre/lpcre.o:lpcre.c:(.text+0x21a): undefined reference to `_imp__pcre_fullinfo'
src/pcre/lpcre.o:lpcre.c:(.text+0x2fe): undefined reference to `_imp__pcre_exec'
src/pcre/lpcre.o:lpcre.c:(.text+0x31b): undefined reference to `_imp__pcre_fullinfo'
src/pcre/lpcre.o:lpcre.c:(.text+0x5de): undefined reference to `_imp__pcre_free'
src/pcre/lpcre.o:lpcre.c:(.text+0x76a): undefined reference to `_imp__pcre_free'
src/pcre/lpcre.o:lpcre.c:(.text+0x77b): undefined reference to `_imp__pcre_free'
src/pcre/lpcre.o:lpcre.c:(.text+0x78c): undefined reference to `_imp__pcre_free'
src/pcre/lpcre.o:lpcre.c:(.text+0x801): undefined reference to `_imp__pcre_fullinfo'
src/pcre/lpcre.o:lpcre.c:(.text+0xe8c): undefined reference to `_imp__pcre_exec'
src/pcre/lpcre.o:lpcre.c:(.text+0x10eb): undefined reference to `_imp__pcre_exec'
src/pcre/lpcre.o:lpcre.c:(.text+0x15e4): undefined reference to `_imp__pcre_dfa_exec'
src/pcre/lpcre.o:lpcre.c:(.text+0x1d26): undefined reference to `_imp__pcre_exec'
src/pcre/lpcre.o:lpcre.c:(.text+0x285d): undefined reference to `_imp__pcre_maketables'
src/pcre/lpcre.o:lpcre.c:(.text+0x2979): undefined reference to `_imp__pcre_exec'
src/pcre/lpcre.o:lpcre.c:(.text+0x2a1a): undefined reference to `_imp__pcre_version'
src/pcre/lpcre_f.o:lpcre_f.c:(.text+0x4d): undefined reference to `_imp__pcre_config'
collect2.exe: error: ld returned 1 exit status

Error: Build error: Failed compiling module rex_pcre.dll

rex.gsub: pros and cons of allowing nil/false as the replacement argument

As far as I can see nil/false as the replacement argument serves the only purpose: to emphasize the caller's intention of doing no replacements in the case gsub is used for counting matches in the subject. This is a pro (though not a big one, as "%0" does the same thing and is no less expressive).

Cons:

  1. We further complicate the already very complicated API of rex.gsub
  2. We break the widely used Lua convention that a missing trailing argument can be treated as nil

I propose:

  1. (at least) Remove this feature.
  2. (optionally) Add a new function rex.count that will be implemented internally on the base of rex.gmatch and therefore (1) will be faster and (2) will show the caller's intention much more clear than gsub(s,p,nil). I'd be happy to implement this function.

C++11

When statically included within C++11 projects, the library isn't compiled.

The errors are:

.../luasandbox/include/lrexlib-2.6.0/src/pcre/../algo.h:125:27: warning:
invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wliteral-suffix]
luaL_typerror(L, pos, "string or "REX_TYPENAME);

and

.../luasandbox/include/lrexlib-2.6.0/src/pcre/lpcre.c:180:20: error:
invalid conversion from ‘void_’ to ‘const unsigned char_’ [-fpermissive]
argC->tables = *check_chartables (L, pos);

There may be other errors.

liblua5.1-rex_pcre.a on 64-bit

liblua5.1-rex_pcre.a wouldn't link on 64-bit Ubunu while building a .so library, whether installed by apt or luarocks.

Compiler says:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/liblua5.1-rex-pcre.a(lpcre.o): relocation R_X86_64_32 against «.rodata.str1.1» can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/liblua5.1-rex-pcre.a: error adding symbols: Bad value

Tried changing luarocks configuration (as per http://stackoverflow.com/questions/9136229/luarocks-fpic-error) and even rebuilding the package from sources, to no avail.

"bad JIT option" when calling jit_compile()

I'm trying to use jit_compile to optimize the performance, but i got bad JIT option.

local lrex = require "rex_pcre2"
local pattern = "^/abc$"
local compiled = lrex.new(pattern)
local ok,err = compiled:jit_compile()
print(ok, err) -- false   bad JIT option

"Userdata subject" feature does not work with Lua 5.1

Note 6 of the manual says:

All functions that take a string-type subject accept a table (in Lua >= 5.2) or userdata that has a topointer method and __len metamethod, and take the subject to be a block of memory starting at the address returned by subject:topointer() and of length #subject.

However that does not work with Lua 5.1.
See algo.h, line 138:
First, lua_objlen() does not invoke the __len metamethod.
Second, it does not push anything on the stack.

Compilation errors for PCRE2 binding

Hi. Here is the output I get:

In file included from src/pcre2/lpcre2.c:10:0:
/usr/include/pcre2.h:828:2: error: #error PCRE2_CODE_UNIT_WIDTH must be defined before including pcre2.h.
 #error PCRE2_CODE_UNIT_WIDTH must be defined before including pcre2.h.
  ^
/usr/include/pcre2.h:829:2: error: #error Use 8, 16, or 32; or 0 for a multi-width application.
 #error Use 8, 16, or 32; or 0 for a multi-width application.
  ^
src/pcre2/lpcre2.c:63:3: error: expected specifier-qualifier-list before ‘PCRE2_SUFFIX’
   pcre2_code *pr;
   ^
src/pcre2/../algo.h: In function ‘push_substrings’:
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:217:26: note: in expansion of macro ‘ALG_NSUB’
   if (lua_checkstack (L, ALG_NSUB(ud)) == 0) {
                          ^
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:220:49: note: in expansion of macro ‘ALG_NSUB’
     luaL_error (L, "cannot add %d stack slots", ALG_NSUB(ud));
                                                 ^
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:222:20: note: in expansion of macro ‘ALG_NSUB’
   for (i = 1; i <= ALG_NSUB(ud); i++) {
                    ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:45:34: error: ‘pcre2_substring_length_bynumber_’ undeclared (first use in this function)
 #define ALG_SUBVALID(ud,n) (0 == pcre2_substring_length_bynumber((ud)->match_data, (n), NULL))
                                  ^
src/pcre2/lpcre2.c:52:4: note: in expansion of macro ‘ALG_SUBVALID’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
    ^
src/pcre2/../algo.h:223:5: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
     ALG_PUSHSUB_OR_FALSE (L, ud, text, i);
     ^
src/pcre2/lpcre2.c:45:34: note: each undeclared identifier is reported only once for each function it appears in
 #define ALG_SUBVALID(ud,n) (0 == pcre2_substring_length_bynumber((ud)->match_data, (n), NULL))
                                  ^
src/pcre2/lpcre2.c:52:4: note: in expansion of macro ‘ALG_SUBVALID’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
    ^
src/pcre2/../algo.h:223:5: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
     ALG_PUSHSUB_OR_FALSE (L, ud, text, i);
     ^
src/pcre2/lpcre2.c:45:70: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
 #define ALG_SUBVALID(ud,n) (0 == pcre2_substring_length_bynumber((ud)->match_data, (n), NULL))
                                                                      ^
src/pcre2/lpcre2.c:52:4: note: in expansion of macro ‘ALG_SUBVALID’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
    ^
src/pcre2/../algo.h:223:5: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
     ALG_PUSHSUB_OR_FALSE (L, ud, text, i);
     ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:49:32: note: in expansion of macro ‘ALG_SUBBEG’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                ^
src/pcre2/lpcre2.c:52:32: note: in expansion of macro ‘ALG_PUSHSUB’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
                                ^
src/pcre2/../algo.h:223:5: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
     ALG_PUSHSUB_OR_FALSE (L, ud, text, i);
     ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:44:29: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                             ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/lpcre2.c:52:32: note: in expansion of macro ‘ALG_PUSHSUB’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
                                ^
src/pcre2/../algo.h:223:5: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
     ALG_PUSHSUB_OR_FALSE (L, ud, text, i);
     ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:44:52: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                                                    ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/lpcre2.c:52:32: note: in expansion of macro ‘ALG_PUSHSUB’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
                                ^
src/pcre2/../algo.h:223:5: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
     ALG_PUSHSUB_OR_FALSE (L, ud, text, i);
     ^
src/pcre2/../algo.h: In function ‘algf_gsub’:
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:245:50: note: in expansion of macro ‘ALG_NSUB’
     BUFFERZ_PUTREPSTRING (&BufRep, argE.funcpos, ALG_NSUB(ud));
                                                  ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/../algo.h:265:27: note: in expansion of macro ‘ALG_SUBBEG’
     from = ALG_BASE(st) + ALG_SUBBEG(ud,0);
                           ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/../algo.h:266:25: note: in expansion of macro ‘ALG_SUBEND’
     to = ALG_BASE(st) + ALG_SUBEND(ud,0);
                         ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:45:34: error: ‘pcre2_substring_length_bynumber_’ undeclared (first use in this function)
 #define ALG_SUBVALID(ud,n) (0 == pcre2_substring_length_bynumber((ud)->match_data, (n), NULL))
                                  ^
src/pcre2/../algo.h:290:30: note: in expansion of macro ‘ALG_SUBVALID’
         else if (num == 0 || ALG_SUBVALID (ud,num))
                              ^
src/pcre2/lpcre2.c:45:70: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
 #define ALG_SUBVALID(ud,n) (0 == pcre2_substring_length_bynumber((ud)->match_data, (n), NULL))
                                                                      ^
src/pcre2/../algo.h:290:30: note: in expansion of macro ‘ALG_SUBVALID’
         else if (num == 0 || ALG_SUBVALID (ud,num))
                              ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/../algo.h:291:63: note: in expansion of macro ‘ALG_SUBBEG’
           buffer_addlstring (pBuf, argE.text + ALG_BASE(st) + ALG_SUBBEG(ud,num), ALG_SUBLEN(ud,num));
                                                               ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:44:29: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                             ^
src/pcre2/../algo.h:291:83: note: in expansion of macro ‘ALG_SUBLEN’
           buffer_addlstring (pBuf, argE.text + ALG_BASE(st) + ALG_SUBBEG(ud,num), ALG_SUBLEN(ud,num));
                                                                                   ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:44:52: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                                                    ^
src/pcre2/../algo.h:291:83: note: in expansion of macro ‘ALG_SUBLEN’
           buffer_addlstring (pBuf, argE.text + ALG_BASE(st) + ALG_SUBBEG(ud,num), ALG_SUBLEN(ud,num));
                                                                                   ^
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:297:11: note: in expansion of macro ‘ALG_NSUB’
       if (ALG_NSUB(ud) > 0)
           ^
src/pcre2/lpcre2.c:45:70: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
 #define ALG_SUBVALID(ud,n) (0 == pcre2_substring_length_bynumber((ud)->match_data, (n), NULL))
                                                                      ^
src/pcre2/lpcre2.c:52:4: note: in expansion of macro ‘ALG_SUBVALID’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
    ^
src/pcre2/../algo.h:298:9: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
         ALG_PUSHSUB_OR_FALSE (L, ud, argE.text + ALG_BASE(st), 1);
         ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:49:32: note: in expansion of macro ‘ALG_SUBBEG’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                ^
src/pcre2/lpcre2.c:52:32: note: in expansion of macro ‘ALG_PUSHSUB’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
                                ^
src/pcre2/../algo.h:298:9: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
         ALG_PUSHSUB_OR_FALSE (L, ud, argE.text + ALG_BASE(st), 1);
         ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:44:29: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                             ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/lpcre2.c:52:32: note: in expansion of macro ‘ALG_PUSHSUB’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
                                ^
src/pcre2/../algo.h:298:9: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
         ALG_PUSHSUB_OR_FALSE (L, ud, argE.text + ALG_BASE(st), 1);
         ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:44:52: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                                                    ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/lpcre2.c:52:32: note: in expansion of macro ‘ALG_PUSHSUB’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
                                ^
src/pcre2/../algo.h:298:9: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
         ALG_PUSHSUB_OR_FALSE (L, ud, argE.text + ALG_BASE(st), 1);
         ^
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:307:11: note: in expansion of macro ‘ALG_NSUB’
       if (ALG_NSUB(ud) > 0) {
           ^
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:309:16: note: in expansion of macro ‘ALG_NSUB’
         narg = ALG_NSUB(ud);
                ^
src/pcre2/../algo.h: In function ‘algf_count’:
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/../algo.h:422:25: note: in expansion of macro ‘ALG_SUBEND’
     to = ALG_BASE(st) + ALG_SUBEND(ud,0);
                         ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/../algo.h:434:33: note: in expansion of macro ‘ALG_SUBBEG’
       int from = ALG_BASE(st) + ALG_SUBBEG(ud,0);
                                 ^
src/pcre2/../algo.h: In function ‘finish_generic_find’:
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:54:66: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_PUSHSTART(L,ud,offs,n)   lua_pushinteger(L, (offs) + ALG_SUBBEG(ud,n) + 1)
                                                                  ^
src/pcre2/lpcre2.c:57:4: note: in expansion of macro ‘ALG_PUSHSTART’
   (ALG_PUSHSTART(L,ud,offs,n), ALG_PUSHEND(L,ud,offs,n))
    ^
src/pcre2/../algo.h:460:7: note: in expansion of macro ‘ALG_PUSHOFFSETS’
       ALG_PUSHOFFSETS (L, ud, ALG_BASE(argE->startoffset), 0);
       ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:55:66: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_PUSHEND(L,ud,offs,n)     lua_pushinteger(L, (offs) + ALG_SUBEND(ud,n))
                                                                  ^
src/pcre2/lpcre2.c:57:32: note: in expansion of macro ‘ALG_PUSHEND’
   (ALG_PUSHSTART(L,ud,offs,n), ALG_PUSHEND(L,ud,offs,n))
                                ^
src/pcre2/../algo.h:460:7: note: in expansion of macro ‘ALG_PUSHOFFSETS’
       ALG_PUSHOFFSETS (L, ud, ALG_BASE(argE->startoffset), 0);
       ^
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:461:9: note: in expansion of macro ‘ALG_NSUB’
     if (ALG_NSUB(ud))    /* push captures */
         ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:49:32: note: in expansion of macro ‘ALG_SUBBEG’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                ^
src/pcre2/../algo.h:464:7: note: in expansion of macro ‘ALG_PUSHSUB’
       ALG_PUSHSUB (L, ud, argE->text, 0);
       ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:44:29: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                             ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/../algo.h:464:7: note: in expansion of macro ‘ALG_PUSHSUB’
       ALG_PUSHSUB (L, ud, argE->text, 0);
       ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:44:52: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                                                    ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/../algo.h:464:7: note: in expansion of macro ‘ALG_PUSHSUB’
       ALG_PUSHSUB (L, ud, argE->text, 0);
       ^
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:467:38: note: in expansion of macro ‘ALG_NSUB’
     return (method == METHOD_FIND) ? ALG_NSUB(ud) + 2 : ALG_NSUB(ud);
                                      ^
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:467:57: note: in expansion of macro ‘ALG_NSUB’
     return (method == METHOD_FIND) ? ALG_NSUB(ud) + 2 : ALG_NSUB(ud);
                                                         ^
src/pcre2/../algo.h: In function ‘gmatch_iter’:
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:44:29: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                             ^
src/pcre2/../algo.h:521:12: note: in expansion of macro ‘ALG_SUBLEN’
       if (!ALG_SUBLEN(ud,0)) { /* no progress: prevent endless loop */
            ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:44:52: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                                                    ^
src/pcre2/../algo.h:521:12: note: in expansion of macro ‘ALG_SUBLEN’
       if (!ALG_SUBLEN(ud,0)) { /* no progress: prevent endless loop */
            ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/../algo.h:522:54: note: in expansion of macro ‘ALG_SUBEND’
         if (last_end == ALG_BASE(argE.startoffset) + ALG_SUBEND(ud,0)) {
                                                      ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/../algo.h:528:47: note: in expansion of macro ‘ALG_SUBEND’
       last_end = ALG_BASE(argE.startoffset) + ALG_SUBEND(ud,0);
                                               ^
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:534:11: note: in expansion of macro ‘ALG_NSUB’
       if (ALG_NSUB(ud)) {
           ^
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:536:16: note: in expansion of macro ‘ALG_NSUB’
         return ALG_NSUB(ud);
                ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:49:32: note: in expansion of macro ‘ALG_SUBBEG’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                ^
src/pcre2/../algo.h:539:9: note: in expansion of macro ‘ALG_PUSHSUB’
         ALG_PUSHSUB (L, ud, argE.text, 0);
         ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:44:29: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                             ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/../algo.h:539:9: note: in expansion of macro ‘ALG_PUSHSUB’
         ALG_PUSHSUB (L, ud, argE.text, 0);
         ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:44:52: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                                                    ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/../algo.h:539:9: note: in expansion of macro ‘ALG_PUSHSUB’
         ALG_PUSHSUB (L, ud, argE.text, 0);
         ^
src/pcre2/../algo.h: In function ‘split_iter’:
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:44:29: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                             ^
src/pcre2/../algo.h:569:12: note: in expansion of macro ‘ALG_SUBLEN’
       if (!ALG_SUBLEN(ud,0)) { /* no progress: prevent endless loop */
            ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:44:52: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                                                    ^
src/pcre2/../algo.h:569:12: note: in expansion of macro ‘ALG_SUBLEN’
       if (!ALG_SUBLEN(ud,0)) { /* no progress: prevent endless loop */
            ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/../algo.h:570:54: note: in expansion of macro ‘ALG_SUBEND’
         if (last_end == ALG_BASE(argE.startoffset) + ALG_SUBEND(ud,0)) {
                                                      ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/../algo.h:575:48: note: in expansion of macro ‘ALG_SUBEND’
       lua_pushinteger(L, ALG_BASE(newoffset) + ALG_SUBEND(ud,0)); /* update start offset and last_end */
                                                ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:44:29: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                             ^
src/pcre2/../algo.h:579:27: note: in expansion of macro ‘ALG_SUBLEN’
       lua_pushinteger (L, ALG_SUBLEN(ud,0) ? 0 : ALG_CHARSIZE);    /* update incr */
                           ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:44:52: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                                                    ^
src/pcre2/../algo.h:579:27: note: in expansion of macro ‘ALG_SUBLEN’
       lua_pushinteger (L, ALG_SUBLEN(ud,0) ? 0 : ALG_CHARSIZE);    /* update incr */
                           ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/../algo.h:583:24: note: in expansion of macro ‘ALG_SUBBEG’
                        ALG_SUBBEG(ud,0) + ALG_BASE(newoffset) - argE.startoffset);
                        ^
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:585:11: note: in expansion of macro ‘ALG_NSUB’
       if (ALG_NSUB(ud)) {
           ^
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:587:20: note: in expansion of macro ‘ALG_NSUB’
         return 1 + ALG_NSUB(ud);
                    ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:49:32: note: in expansion of macro ‘ALG_SUBBEG’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                ^
src/pcre2/../algo.h:590:9: note: in expansion of macro ‘ALG_PUSHSUB’
         ALG_PUSHSUB (L, ud, argE.text + ALG_BASE(newoffset), 0);
         ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:44:29: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                             ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/../algo.h:590:9: note: in expansion of macro ‘ALG_PUSHSUB’
         ALG_PUSHSUB (L, ud, argE.text + ALG_BASE(newoffset), 0);
         ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:44:52: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                                                    ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/../algo.h:590:9: note: in expansion of macro ‘ALG_PUSHSUB’
         ALG_PUSHSUB (L, ud, argE.text + ALG_BASE(newoffset), 0);
         ^
src/pcre2/../algo.h: In function ‘push_substring_table’:
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:645:20: note: in expansion of macro ‘ALG_NSUB’
   for (i = 1; i <= ALG_NSUB(ud); i++) {
                    ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:45:34: error: ‘pcre2_substring_length_bynumber_’ undeclared (first use in this function)
 #define ALG_SUBVALID(ud,n) (0 == pcre2_substring_length_bynumber((ud)->match_data, (n), NULL))
                                  ^
src/pcre2/lpcre2.c:52:4: note: in expansion of macro ‘ALG_SUBVALID’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
    ^
src/pcre2/../algo.h:646:5: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
     ALG_PUSHSUB_OR_FALSE (L, ud, text, i);
     ^
src/pcre2/lpcre2.c:45:70: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
 #define ALG_SUBVALID(ud,n) (0 == pcre2_substring_length_bynumber((ud)->match_data, (n), NULL))
                                                                      ^
src/pcre2/lpcre2.c:52:4: note: in expansion of macro ‘ALG_SUBVALID’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
    ^
src/pcre2/../algo.h:646:5: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
     ALG_PUSHSUB_OR_FALSE (L, ud, text, i);
     ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:49:32: note: in expansion of macro ‘ALG_SUBBEG’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                ^
src/pcre2/lpcre2.c:52:32: note: in expansion of macro ‘ALG_PUSHSUB’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
                                ^
src/pcre2/../algo.h:646:5: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
     ALG_PUSHSUB_OR_FALSE (L, ud, text, i);
     ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:44:29: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                             ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/lpcre2.c:52:32: note: in expansion of macro ‘ALG_PUSHSUB’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
                                ^
src/pcre2/../algo.h:646:5: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
     ALG_PUSHSUB_OR_FALSE (L, ud, text, i);
     ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:44:52: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                                                    ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/lpcre2.c:52:32: note: in expansion of macro ‘ALG_PUSHSUB’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
                                ^
src/pcre2/../algo.h:646:5: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
     ALG_PUSHSUB_OR_FALSE (L, ud, text, i);
     ^
src/pcre2/../algo.h: In function ‘push_offset_table’:
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/../algo.h:655:23: note: in expansion of macro ‘ALG_NSUB’
   for (i=1, j=1; i <= ALG_NSUB(ud); i++) {
                       ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:45:34: error: ‘pcre2_substring_length_bynumber_’ undeclared (first use in this function)
 #define ALG_SUBVALID(ud,n) (0 == pcre2_substring_length_bynumber((ud)->match_data, (n), NULL))
                                  ^
src/pcre2/../algo.h:656:9: note: in expansion of macro ‘ALG_SUBVALID’
     if (ALG_SUBVALID (ud,i)) {
         ^
src/pcre2/lpcre2.c:45:70: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
 #define ALG_SUBVALID(ud,n) (0 == pcre2_substring_length_bynumber((ud)->match_data, (n), NULL))
                                                                      ^
src/pcre2/../algo.h:656:9: note: in expansion of macro ‘ALG_SUBVALID’
     if (ALG_SUBVALID (ud,i)) {
         ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:54:66: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_PUSHSTART(L,ud,offs,n)   lua_pushinteger(L, (offs) + ALG_SUBBEG(ud,n) + 1)
                                                                  ^
src/pcre2/../algo.h:657:7: note: in expansion of macro ‘ALG_PUSHSTART’
       ALG_PUSHSTART (L, ud, startoffset, i);
       ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:55:66: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_PUSHEND(L,ud,offs,n)     lua_pushinteger(L, (offs) + ALG_SUBEND(ud,n))
                                                                  ^
src/pcre2/../algo.h:659:7: note: in expansion of macro ‘ALG_PUSHEND’
       ALG_PUSHEND (L, ud, startoffset, i);
       ^
src/pcre2/../algo.h: In function ‘generic_find_method’:
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:54:66: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_PUSHSTART(L,ud,offs,n)   lua_pushinteger(L, (offs) + ALG_SUBBEG(ud,n) + 1)
                                                                  ^
src/pcre2/lpcre2.c:57:4: note: in expansion of macro ‘ALG_PUSHSTART’
   (ALG_PUSHSTART(L,ud,offs,n), ALG_PUSHEND(L,ud,offs,n))
    ^
src/pcre2/../algo.h:685:9: note: in expansion of macro ‘ALG_PUSHOFFSETS’
         ALG_PUSHOFFSETS (L, ud, ALG_BASE(argE.startoffset), 0);
         ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:55:66: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_PUSHEND(L,ud,offs,n)     lua_pushinteger(L, (offs) + ALG_SUBEND(ud,n))
                                                                  ^
src/pcre2/lpcre2.c:57:32: note: in expansion of macro ‘ALG_PUSHEND’
   (ALG_PUSHSTART(L,ud,offs,n), ALG_PUSHEND(L,ud,offs,n))
                                ^
src/pcre2/../algo.h:685:9: note: in expansion of macro ‘ALG_PUSHOFFSETS’
         ALG_PUSHOFFSETS (L, ud, ALG_BASE(argE.startoffset), 0);
         ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:54:66: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_PUSHSTART(L,ud,offs,n)   lua_pushinteger(L, (offs) + ALG_SUBBEG(ud,n) + 1)
                                                                  ^
src/pcre2/lpcre2.c:57:4: note: in expansion of macro ‘ALG_PUSHSTART’
   (ALG_PUSHSTART(L,ud,offs,n), ALG_PUSHEND(L,ud,offs,n))
    ^
src/pcre2/../algo.h:690:9: note: in expansion of macro ‘ALG_PUSHOFFSETS’
         ALG_PUSHOFFSETS (L, ud, ALG_BASE(argE.startoffset), 0);
         ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:55:66: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_PUSHEND(L,ud,offs,n)     lua_pushinteger(L, (offs) + ALG_SUBEND(ud,n))
                                                                  ^
src/pcre2/lpcre2.c:57:32: note: in expansion of macro ‘ALG_PUSHEND’
   (ALG_PUSHSTART(L,ud,offs,n), ALG_PUSHEND(L,ud,offs,n))
                                ^
src/pcre2/../algo.h:690:9: note: in expansion of macro ‘ALG_PUSHOFFSETS’
         ALG_PUSHOFFSETS (L, ud, ALG_BASE(argE.startoffset), 0);
         ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c: In function ‘push_error_message’:
src/pcre2/lpcre2.c:91:3: error: ‘PCRE2_UCHAR’ undeclared (first use in this function)
   PCRE2_UCHAR buf[256];
   ^
src/pcre2/lpcre2.c:91:15: error: expected ‘;’ before ‘buf’
   PCRE2_UCHAR buf[256];
               ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:92:7: error: ‘pcre2_get_error_message_’ undeclared (first use in this function)
   if (pcre2_get_error_message(errorcode, buf, 256) > 0)
       ^
src/pcre2/lpcre2.c:92:42: error: ‘buf’ undeclared (first use in this function)
   if (pcre2_get_error_message(errorcode, buf, 256) > 0)
                                          ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c: In function ‘Lpcre2_maketables’:
src/pcre2/lpcre2.c:150:55: error: ‘pcre2_maketables_’ undeclared (first use in this function)
   *(const void**)lua_newuserdata (L, sizeof(void*)) = pcre2_maketables(NULL); //### argument NULL
                                                       ^
src/pcre2/lpcre2.c: In function ‘compile_regex’:
src/pcre2/lpcre2.c:208:5: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ccontext’
   ud->ccontext = pcre2_compile_context_create(NULL);
     ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:208:18: error: ‘pcre2_compile_context_create_’ undeclared (first use in this function)
   ud->ccontext = pcre2_compile_context_create(NULL);
                  ^
src/pcre2/lpcre2.c:209:9: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ccontext’
   if (ud->ccontext == NULL)
         ^
src/pcre2/lpcre2.c:217:7: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘tables’
     ud->tables = pcre2_maketables (NULL); /* make tables with new locale */ //### argument NULL
       ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:217:18: error: ‘pcre2_maketables_’ undeclared (first use in this function)
     ud->tables = pcre2_maketables (NULL); /* make tables with new locale */ //### argument NULL
                  ^
src/pcre2/lpcre2.c:218:5: error: ‘pcre2_set_character_tables_’ undeclared (first use in this function)
     pcre2_set_character_tables(ud->ccontext, ud->tables);
     ^
src/pcre2/lpcre2.c:218:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ccontext’
     pcre2_set_character_tables(ud->ccontext, ud->tables);
                                  ^
src/pcre2/lpcre2.c:218:48: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘tables’
     pcre2_set_character_tables(ud->ccontext, ud->tables);
                                                ^
src/pcre2/lpcre2.c:222:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ccontext’
     pcre2_set_character_tables(ud->ccontext, argC->tables);
                                  ^
src/pcre2/lpcre2.c:231:5: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   ud->pr = pcre2_compile ((PCRE2_SPTR)argC->pattern, argC->patlen, argC->cflags, &errcode,
     ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:231:12: error: ‘pcre2_compile_’ undeclared (first use in this function)
   ud->pr = pcre2_compile ((PCRE2_SPTR)argC->pattern, argC->patlen, argC->cflags, &errcode,
            ^
src/pcre2/lpcre2.c:231:28: error: ‘PCRE2_SPTR’ undeclared (first use in this function)
   ud->pr = pcre2_compile ((PCRE2_SPTR)argC->pattern, argC->patlen, argC->cflags, &errcode,
                            ^
src/pcre2/lpcre2.c:231:39: error: expected ‘)’ before ‘argC’
   ud->pr = pcre2_compile ((PCRE2_SPTR)argC->pattern, argC->patlen, argC->cflags, &errcode,
                                       ^
src/pcre2/lpcre2.c:233:10: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (!ud->pr) {
          ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:240:12: error: ‘pcre2_pattern_info_’ undeclared (first use in this function)
   if (0 != pcre2_pattern_info (ud->pr, PCRE2_INFO_CAPTURECOUNT, &ud->ncapt)) //###
            ^
src/pcre2/lpcre2.c:240:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 != pcre2_pattern_info (ud->pr, PCRE2_INFO_CAPTURECOUNT, &ud->ncapt)) //###
                                  ^
src/pcre2/lpcre2.c:240:68: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
   if (0 != pcre2_pattern_info (ud->pr, PCRE2_INFO_CAPTURECOUNT, &ud->ncapt)) //###
                                                                    ^
src/pcre2/lpcre2.c:244:5: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
   ud->match_data = pcre2_match_data_create(ud->ncapt+1, NULL); //### CHECK ALL
     ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:244:20: error: ‘pcre2_match_data_create_’ undeclared (first use in this function)
   ud->match_data = pcre2_match_data_create(ud->ncapt+1, NULL); //### CHECK ALL
                    ^
src/pcre2/lpcre2.c:244:46: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
   ud->match_data = pcre2_match_data_create(ud->ncapt+1, NULL); //### CHECK ALL
                                              ^
src/pcre2/lpcre2.c:245:10: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
   if (!ud->match_data)
          ^
src/pcre2/lpcre2.c:248:5: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
   ud->ovector = pcre2_get_ovector_pointer(ud->match_data);
     ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:248:17: error: ‘pcre2_get_ovector_pointer_’ undeclared (first use in this function)
   ud->ovector = pcre2_get_ovector_pointer(ud->match_data);
                 ^
src/pcre2/lpcre2.c:248:45: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
   ud->ovector = pcre2_get_ovector_pointer(ud->match_data);
                                             ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c: In function ‘do_named_subpatterns’:
src/pcre2/lpcre2.c:258:3: error: ‘PCRE2_SPTR’ undeclared (first use in this function)
   PCRE2_SPTR tabptr;
   ^
src/pcre2/lpcre2.c:258:14: error: expected ‘;’ before ‘tabptr’
   PCRE2_SPTR tabptr;
              ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:261:3: error: ‘pcre2_pattern_info_’ undeclared (first use in this function)
   pcre2_pattern_info (ud->pr, PCRE2_INFO_NAMECOUNT, &namecount);
   ^
src/pcre2/lpcre2.c:261:25: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   pcre2_pattern_info (ud->pr, PCRE2_INFO_NAMECOUNT, &namecount);
                         ^
src/pcre2/lpcre2.c:264:25: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   pcre2_pattern_info (ud->pr, PCRE2_INFO_NAMETABLE, &name_table);
                         ^
src/pcre2/lpcre2.c:265:25: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   pcre2_pattern_info (ud->pr, PCRE2_INFO_NAMEENTRYSIZE, &name_entry_size);
                         ^
src/pcre2/lpcre2.c:266:3: error: ‘tabptr’ undeclared (first use in this function)
   tabptr = name_table;
   ^
src/pcre2/lpcre2.c:46:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ncapt’
 #define ALG_NSUB(ud)       ((int)(ud)->ncapt)
                                      ^
src/pcre2/lpcre2.c:269:23: note: in expansion of macro ‘ALG_NSUB’
     if (n > 0 && n <= ALG_NSUB(ud)) {   /* check range */
                       ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:45:34: error: ‘pcre2_substring_length_bynumber_’ undeclared (first use in this function)
 #define ALG_SUBVALID(ud,n) (0 == pcre2_substring_length_bynumber((ud)->match_data, (n), NULL))
                                  ^
src/pcre2/lpcre2.c:52:4: note: in expansion of macro ‘ALG_SUBVALID’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
    ^
src/pcre2/lpcre2.c:271:7: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
       ALG_PUSHSUB_OR_FALSE (L, ud, text, n);
       ^
src/pcre2/lpcre2.c:45:70: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
 #define ALG_SUBVALID(ud,n) (0 == pcre2_substring_length_bynumber((ud)->match_data, (n), NULL))
                                                                      ^
src/pcre2/lpcre2.c:52:4: note: in expansion of macro ‘ALG_SUBVALID’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
    ^
src/pcre2/lpcre2.c:271:7: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
       ALG_PUSHSUB_OR_FALSE (L, ud, text, n);
       ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:49:32: note: in expansion of macro ‘ALG_SUBBEG’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                ^
src/pcre2/lpcre2.c:52:32: note: in expansion of macro ‘ALG_PUSHSUB’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
                                ^
src/pcre2/lpcre2.c:271:7: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
       ALG_PUSHSUB_OR_FALSE (L, ud, text, n);
       ^
src/pcre2/lpcre2.c:43:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBEND(ud,n)   ((int)(ud)->ovector[(n)+(n)+1])
                                      ^
src/pcre2/lpcre2.c:44:29: note: in expansion of macro ‘ALG_SUBEND’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                             ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/lpcre2.c:52:32: note: in expansion of macro ‘ALG_PUSHSUB’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
                                ^
src/pcre2/lpcre2.c:271:7: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
       ALG_PUSHSUB_OR_FALSE (L, ud, text, n);
       ^
src/pcre2/lpcre2.c:42:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ovector’
 #define ALG_SUBBEG(ud,n)   ((int)(ud)->ovector[(n)+(n)])
                                      ^
src/pcre2/lpcre2.c:44:52: note: in expansion of macro ‘ALG_SUBBEG’
 #define ALG_SUBLEN(ud,n)   (ALG_SUBEND((ud),(n)) - ALG_SUBBEG((ud),(n)))
                                                    ^
src/pcre2/lpcre2.c:49:54: note: in expansion of macro ‘ALG_SUBLEN’
   lua_pushlstring (L, (text) + ALG_SUBBEG((ud),(n)), ALG_SUBLEN((ud),(n)))
                                                      ^
src/pcre2/lpcre2.c:52:32: note: in expansion of macro ‘ALG_PUSHSUB’
   (ALG_SUBVALID(ud,n) ? (void) ALG_PUSHSUB (L,ud,text,n) : lua_pushboolean (L,0))
                                ^
src/pcre2/lpcre2.c:271:7: note: in expansion of macro ‘ALG_PUSHSUB_OR_FALSE’
       ALG_PUSHSUB_OR_FALSE (L, ud, text, n);
       ^
src/pcre2/lpcre2.c: In function ‘Lpcre2_dfa_exec’:
src/pcre2/lpcre2.c:292:5: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
   ud->match_data = pcre2_match_data_create(argE.ovecsize/2, NULL); //### CHECK ALL
     ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:292:20: error: ‘pcre2_match_data_create_’ undeclared (first use in this function)
   ud->match_data = pcre2_match_data_create(argE.ovecsize/2, NULL); //### CHECK ALL
                    ^
src/pcre2/lpcre2.c:293:10: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
   if (!ud->match_data)
          ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:296:9: error: ‘pcre2_dfa_match_’ undeclared (first use in this function)
   res = pcre2_dfa_match (ud->pr, (PCRE2_SPTR)argE.text, argE.textlen, argE.startoffset,
         ^
src/pcre2/lpcre2.c:296:28: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   res = pcre2_dfa_match (ud->pr, (PCRE2_SPTR)argE.text, argE.textlen, argE.startoffset,
                            ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:296:35: error: ‘PCRE2_SPTR’ undeclared (first use in this function)
   res = pcre2_dfa_match (ud->pr, (PCRE2_SPTR)argE.text, argE.textlen, argE.startoffset,
                                   ^
src/pcre2/lpcre2.c:296:46: error: expected ‘)’ before ‘argE’
   res = pcre2_dfa_match (ud->pr, (PCRE2_SPTR)argE.text, argE.textlen, argE.startoffset,
                                              ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:302:27: error: ‘pcre2_get_ovector_pointer_’ undeclared (first use in this function)
     PCRE2_SIZE* ovector = pcre2_get_ovector_pointer(ud->match_data);
                           ^
src/pcre2/lpcre2.c:302:55: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
     PCRE2_SIZE* ovector = pcre2_get_ovector_pointer(ud->match_data);
                                                       ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c: In function ‘gmatch_exec’:
src/pcre2/lpcre2.c:324:10: error: ‘pcre2_match_’ undeclared (first use in this function)
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
          ^
src/pcre2/lpcre2.c:324:25: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
                         ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:324:32: error: ‘PCRE2_SPTR’ undeclared (first use in this function)
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
                                ^
src/pcre2/lpcre2.c:324:43: error: expected ‘)’ before ‘argE’
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
                                           ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c: In function ‘findmatch_exec’:
src/pcre2/lpcre2.c:333:10: error: ‘pcre2_match_’ undeclared (first use in this function)
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
          ^
src/pcre2/lpcre2.c:333:25: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
                         ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:333:32: error: ‘PCRE2_SPTR’ undeclared (first use in this function)
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
                                ^
src/pcre2/lpcre2.c:333:43: error: expected ‘)’ before ‘argE’
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
                                           ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c: In function ‘gsub_exec’:
src/pcre2/lpcre2.c:338:10: error: ‘pcre2_match_’ undeclared (first use in this function)
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
          ^
src/pcre2/lpcre2.c:338:25: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
                         ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:338:32: error: ‘PCRE2_SPTR’ undeclared (first use in this function)
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
                                ^
src/pcre2/lpcre2.c:338:43: error: expected ‘)’ before ‘argE’
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
                                           ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c: In function ‘split_exec’:
src/pcre2/lpcre2.c:343:10: error: ‘pcre2_match_’ undeclared (first use in this function)
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
          ^
src/pcre2/lpcre2.c:343:25: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
                         ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:343:32: error: ‘PCRE2_SPTR’ undeclared (first use in this function)
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
                                ^
src/pcre2/lpcre2.c:343:43: error: expected ‘)’ before ‘argE’
   return pcre2_match (ud->pr, (PCRE2_SPTR)argE->text, argE->textlen,
                                           ^
src/pcre2/lpcre2.c: In function ‘Lpcre2_gc’:
src/pcre2/lpcre2.c:349:9: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘freed’
   if (ud->freed == 0) {           /* precaution against "manual" __gc calling */
         ^
src/pcre2/lpcre2.c:350:7: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘freed’
     ud->freed = 1;
       ^
src/pcre2/lpcre2.c:351:11: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
     if (ud->pr) pcre2_code_free (ud->pr);
           ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:351:17: error: ‘pcre2_code_free_’ undeclared (first use in this function)
     if (ud->pr) pcre2_code_free (ud->pr);
                 ^
src/pcre2/lpcre2.c:351:36: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
     if (ud->pr) pcre2_code_free (ud->pr);
                                    ^
src/pcre2/lpcre2.c:353:11: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ccontext’
     if (ud->ccontext) pcre2_compile_context_free (ud->ccontext);
           ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:353:23: error: ‘pcre2_compile_context_free_’ undeclared (first use in this function)
     if (ud->ccontext) pcre2_compile_context_free (ud->ccontext);
                       ^
src/pcre2/lpcre2.c:353:53: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘ccontext’
     if (ud->ccontext) pcre2_compile_context_free (ud->ccontext);
                                                     ^
src/pcre2/lpcre2.c:354:11: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
     if (ud->match_data) pcre2_match_data_free (ud->match_data);
           ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c:354:25: error: ‘pcre2_match_data_free_’ undeclared (first use in this function)
     if (ud->match_data) pcre2_match_data_free (ud->match_data);
                         ^
src/pcre2/lpcre2.c:354:50: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘match_data’
     if (ud->match_data) pcre2_match_data_free (ud->match_data);
                                                  ^
src/pcre2/lpcre2.c: In function ‘Lpcre2_tostring’:
src/pcre2/lpcre2.c:361:9: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘freed’
   if (ud->freed == 0)
         ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c: In function ‘Lpcre2_version’:
src/pcre2/lpcre2.c:370:3: error: ‘pcre2_config_’ undeclared (first use in this function)
   pcre2_config(PCRE2_CONFIG_VERSION, buf);
   ^
src/pcre2/lpcre2.c: In function ‘Lpcre2_jit_compile’:
src/pcre2/lpcre2.c:380:17: error: ‘pcre2_jit_compile_’ undeclared (first use in this function)
   int errcode = pcre2_jit_compile (ud->pr, options);
                 ^
src/pcre2/lpcre2.c:380:38: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   int errcode = pcre2_jit_compile (ud->pr, options);
                                      ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c: In function ‘Lpcre2_pattern_info’:
src/pcre2/lpcre2.c:391:12: error: ‘pcre2_pattern_info_’ undeclared (first use in this function)
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
            ^
src/pcre2/lpcre2.c:401:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_ALLOPTIONS,          "ALLOPTIONS",          uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:401:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_ALLOPTIONS,          "ALLOPTIONS",          uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:402:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_ARGOPTIONS,          "ARGOPTIONS",          uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:403:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_BACKREFMAX,          "BACKREFMAX",          uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:404:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_BSR,                 "BSR",                 uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:405:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_CAPTURECOUNT,        "CAPTURECOUNT",        uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:407:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_FIRSTCODETYPE,       "FIRSTCODETYPE",       uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:408:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_FIRSTCODEUNIT,       "FIRSTCODEUNIT",       uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:409:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_HASBACKSLASHC,       "HASBACKSLASHC",       uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:410:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_HASCRORLF,           "HASCRORLF",           uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:411:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_JCHANGED,            "JCHANGED",            uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:412:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_JITSIZE,             "JITSIZE",             size_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:413:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_LASTCODETYPE,        "LASTCODETYPE",        uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:414:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_LASTCODEUNIT,        "LASTCODEUNIT",        uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:415:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_MATCHEMPTY,          "MATCHEMPTY",          uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:416:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_MATCHLIMIT,          "MATCHLIMIT",          uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:417:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_MAXLOOKBEHIND,       "MAXLOOKBEHIND",       uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:418:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_MINLENGTH,           "MINLENGTH",           uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:419:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_NAMECOUNT,           "NAMECOUNT",           uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:420:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_NAMEENTRYSIZE,       "NAMEENTRYSIZE",       uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:422:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_NEWLINE,             "NEWLINE",             uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:423:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_RECURSIONLIMIT,      "RECURSIONLIMIT",      uint32_t)
   ^
src/pcre2/lpcre2.c:391:34: error: ‘TPcre2 {aka struct <anonymous>}’ has no member named ‘pr’
   if (0 == pcre2_pattern_info (ud->pr, what, &val)) { \
                                  ^
src/pcre2/lpcre2.c:424:3: note: in expansion of macro ‘SET_INFO_FIELD’
   SET_INFO_FIELD (L, ud, PCRE2_INFO_SIZE,                "SIZE",                size_t)
   ^
In file included from src/pcre2/lpcre2.c:10:0:
src/pcre2/lpcre2.c: In function ‘luaopen_rex_pcre2’:
src/pcre2/lpcre2.c:467:3: error: ‘pcre2_config_’ undeclared (first use in this function)
   pcre2_config(PCRE2_CONFIG_VERSION, buf_ver);
   ^

Can you help please?

build fails using luarocks on centos 6

Hi
I'm trying to install this lib but....
[root@yazdpbx reLua]# luarocks install lrexlib-PCRE
Installing https://luarocks.org/lrexlib-pcre-2.8.0-1.src.rock
gcc -O2 -fPIC -I/usr/include -c src/common.c -o src/common.o -DVERSION="2.8.0" -DLUA_COMPAT_5_2 -I/usr/include
gcc -O2 -fPIC -I/usr/include -c src/pcre/lpcre.c -o src/pcre/lpcre.o -DVERSION="2.8.0" -DLUA_COMPAT_5_2 -I/usr/include
src/pcre/lpcre.c: In function ‘Lpcre_fullinfo’:
src/pcre/lpcre.c:372: error: ‘PCRE_INFO_JIT’ undeclared (first use in this function)
src/pcre/lpcre.c:372: error: (Each undeclared identifier is reported only once
src/pcre/lpcre.c:372: error: for each function it appears in.)
src/pcre/lpcre.c:373: error: ‘PCRE_INFO_JITSIZE’ undeclared (first use in this function)
src/pcre/lpcre.c:380: error: ‘PCRE_INFO_MAXLOOKBEHIND’ undeclared (first use in this function)
src/pcre/lpcre.c:381: error: ‘PCRE_INFO_MINLENGTH’ undeclared (first use in this function)

Error: Build error: Failed compiling object src/pcre/lpcre.o

luarocks install error

luarocks install --local lrexlib-PCRE

src/pcre/lpcre.c: 在函数‘Lpcre_fullinfo’中:
src/pcre/lpcre.c:372: 错误:‘PCRE_INFO_JIT’未声明(在此函数内第一次使用)
src/pcre/lpcre.c:372: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
src/pcre/lpcre.c:372: 错误:所在的函数内也只报告一次。)
src/pcre/lpcre.c:373: 错误:‘PCRE_INFO_JITSIZE’未声明(在此函数内第一次使用)
src/pcre/lpcre.c:380: 错误:‘PCRE_INFO_MAXLOOKBEHIND’未声明(在此函数内第一次使用)
src/pcre/lpcre.c:381: 错误:‘PCRE_INFO_MINLENGTH’未声明(在此函数内第一次使用)

lua version is 5.1.5

Lrexlib Hello World?

What do I do after installing this library (i.e. a particular flavor)? What exactly do I require to obtain the rex object mentioned extensively in the docs? Assuming I managed to obtain this object, do I need to initialize it somehow (e.g. tell it which of the installed flavors to use), or is it somehow ready out of the box (because, hypothetically, only one flavor can be installed at a time)?

These questions may appear silly at first sight, but there really is a gap in the available introductory knowledge. I can find the info on how to compile and install the library. I can find the info about its individual functions in the reference manual. What I can't find info about is how to get from the former to the latter: a simple example of a small self-contained Lua program that imports, configures and uses lrexlib.

Lua Stack is not clear,a bug report

REX_API int REX_OPENLIB (lua_State *L) will add lua stack two values, but return 1, miss matched.

Think this,

lua_newtable(L)
REX_OPENLIB(L);
lua_setfeild(L,-2, "rex")

This will not work,becuase alg_register add two tables, below, I think After create metatable, it should be pop from stack.

Crash on large string

WinXP Lua 5.1 PCRE 8.36 lrexlib (master)
I try implement basic utf8 validator and get AV on this code

local rex = require "rex_pcre"
local pat = rex.new("(?:"                             ..
  "(?:[\\0\1-\127])|"                                 ..
  "(?:[\194-\223][\123-\191])|"                       ..
         "(?:\224[\160-\191][\128-\191])|"            ..
  "(?:[\225-\236][\128-\191][\128-\191])|"            ..
         "(?:\237[\128-\159][\128-\191])|"            ..
  "(?:[\238-\239][\128-\191][\128-\191])|"            ..
         "(?:\240[\144-\191][\128-\191][\128-\191])|" ..
  "(?:[\241-\243][\128-\191][\128-\191][\128-\191])|" ..
         "(?:\244[\128-\143][\128-\191][\128-\191])|" ..
")*")
pat:find(("\000"):rep(1024*2))

2.8.0-1 returns a compilation error

I am having some trouble installing version 2.8.0-1, since I keep getting the following compilation error on Ubuntu 12.04.5:

gcc -O2 -fPIC -I/usr/local/include/luajit-2.0 -c src/api.c -o src/api.o -Isrc
gcc -O2 -fPIC -I/usr/local/include/luajit-2.0 -c src/b64.c -o src/b64.o -Isrc
gcc -O2 -fPIC -I/usr/local/include/luajit-2.0 -c src/dumper.c -o src/dumper.o -Isrc
gcc -O2 -fPIC -I/usr/local/include/luajit-2.0 -c src/emitter.c -o src/emitter.o -Isrc
gcc -O2 -fPIC -I/usr/local/include/luajit-2.0 -c src/loader.c -o src/loader.o -Isrc
gcc -O2 -fPIC -I/usr/local/include/luajit-2.0 -c src/lyaml.c -o src/lyaml.o -Isrc
gcc -O2 -fPIC -I/usr/local/include/luajit-2.0 -c src/parser.c -o src/parser.o -Isrc
gcc -O2 -fPIC -I/usr/local/include/luajit-2.0 -c src/reader.c -o src/reader.o -Isrc
gcc -O2 -fPIC -I/usr/local/include/luajit-2.0 -c src/scanner.c -o src/scanner.o -Isrc
gcc -O2 -fPIC -I/usr/local/include/luajit-2.0 -c src/strtod.c -o src/strtod.o -Isrc
gcc -O2 -fPIC -I/usr/local/include/luajit-2.0 -c src/writer.c -o src/writer.o -Isrc
gcc -shared -o yaml/core.so -L/usr/local/lib src/api.o src/b64.o src/dumper.o src/emitter.o src/loader.o src/lyaml.o src/parser.o src/reader.o src/scanner.o src/strtod.o src/writer.o
src/pcre/lpcre.c: In function 'Lpcre_fullinfo':
src/pcre/lpcre.c:372:3: error: 'PCRE_INFO_JIT' undeclared (first use in this function)
src/pcre/lpcre.c:372:3: note: each undeclared identifier is reported only once for each function it appears in
src/pcre/lpcre.c:373:3: error: 'PCRE_INFO_JITSIZE' undeclared (first use in this function)
src/pcre/lpcre.c:380:3: error: 'PCRE_INFO_MAXLOOKBEHIND' undeclared (first use in this function)

Error: Failed installing dependency: https://luarocks.org/lrexlib-pcre-2.8.0-1.src.rock - Build error: Failed compiling object src/pcre/lpcre.o

This problem was not happening with version 2.7.2-1.

undefined symbol: luaopen_rex_pcre

Hi. When I try to run my code I get this:

[ 0][t 0][1509558333.732101202][clilua.cpp:171][!CliClient]     lua: /root/torch/install/share/lua/5.2/threads/threads.lua:183: [thread 2 callback] error loading module 'rex_pcre' from file '/root/torch/install/lib/lua/5.2/rex_pcre.so':
        /root/torch/install/lib/lua/5.2/rex_pcre.so: undefined symbol: luaopen_rex_pcre
stack traceback:
        [C]: in ?
        [C]: in function 'require'
        ./utils.lua:2: in main chunk
        [C]: in function 'require'
        /home/sunova/PBDBase/bot.lua:39: in function </home/sunova/PBDBase/bot.lua:35>
        (...tail calls...)
        [C]: in function 'xpcall'
        /root/torch/install/share/lua/5.2/threads/threads.lua:234: in function 'callback'
        /root/torch/install/share/lua/5.2/threads/queue.lua:65: in function </root/torch/install/share/lua/5.2/threads/queue.lua:41>
        [C]: in function 'pcall'
        /root/torch/install/share/lua/5.2/threads/queue.lua:40: in function 'dojob'
        [string "  local Queue = require 'threads.queue'..."]:13: in main chunk

Can you please tell me what's wrong?

Two issues with LuaRocks-built DLLs

I'm on Windows XP x86, building rex_pcre.dll both with LuaRocks and with my make files. The build system is MinGW in both cases.

  1. Size of the DLL: 54 KiB (with LuaRocks) versus 26 KiB (with my make file).
  2. Number of exported symbols: 27 (with LuaRocks) versus 1 (with my make file).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.