Closed rns closed 9 years ago
The KLOL will rewrite all rules into a kind of Chomsky form -- at most two RHS symbols. I am at work on that rewrite now. So the limitation is intentional.
With at most two symbols on a RHS, the C code implementing the parse engine in Libmarpa will be able to implement further optimizations.
Ok, point taken, thanks for explaining.
By the way, you may recall that I said I will not create a "thin" Lua interface to Libmarpa as part of my own work on Kollos? This, despite the fact that it would be a very useful thing to have, even perhaps for the Kollos project itself? And despite the fact that it would seem like an very easy by-product of the effort?
This is why. I will eventually fork the Libmarpa inside Kollos, and it will then be very hard to use directly -- no sequence rules, only 2 RHS symbols allowed, etc., etc. In the meantime I can save effort, inside Kollos, by not supporting these features of Libmarpa that I intend to remove.
Yes, I can remember that "no THIF despite its utility" discussion. And yes, you said several times that libmarpa can be halved by moving code to Lua. So, I do see the point.
Not much of an issue as it is at the moment, really, but
g:rule_new()
currently supports RHS parameters only as varlist rather than array/count, which can needed at times.