lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Mr Janda,

> LPeg registers its metatable under the name "lpeg-pattern", so you can retrieve it in C++ (after `luaopen_lpeg` has been called) with `luaL_getmetatable(L, "lpeg-pattern");` and store it in a global variable.
Thank you, it helped.

> But what do you need the LPeg metatable for?
I don't, re.lua does (local mt = getmetatable(mm.P(0))).

Looks like I have managed to connect LPeg to a wiki, with your help.

Alexander Mashin