6 Feb 12:57
Re: Writing lexers in Lua
missdeer <missdeer <at> gmail.com>
2010-02-06 11:57:19 GMT
2010-02-06 11:57:19 GMT
Sounds good. Well, that's only a syntactic sugar which will push styler table itself as the first argument for the method, no more differences. You just need getting one more argument first from the Lua stack in those C closures. On Feb 6, 3:13 pm, Neil Hodgson <nyamaton...@gmail.com> wrote: > The implementation is not great due to my not understanding section > Chapter 28 of "Programming in Lua"http://www.lua.org/pil/28.html. > Rather than producing a new Lua type, I made the styler a table and > then had the 'methods' use closures to access a C struct containing > the state. This means that the call is styler.More() rather than > styler:More() which would be more expected. I hope someone understands > this aspect of Lua better than me and can fix the code. > > > Neil -- -- You received this message because you are subscribed to the Google Groups "scite-interest" group. To post to this group, send email to scite-interest <at> googlegroups.com. To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com. For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.
RSS Feed