lua-users home
lua-l archive

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


A different approach, using the rather unutilised lpeg User-Defined patterns:
https://gist.github.com/2958879

@Robert Ierusalimschy:
This is probably not a bad solution to
http://lua-users.org/lists/lua-l/2011-04/msg00025.html

Also, why is l_newpf exposed through the registry?
`lua_pushcfunction(L, (lua_CFunction)&l_newpf);  /* new-pattern function */`
I found this really odd: why not expose it directly (so I can link
against lpeg);
and why cast it (incorrectly) as a lua_CFunction? Why not a boxed userdata?

Daurn.