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:

@Robert Ierusalimschy:
This is probably not a bad solution to

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?