jeffreykegler / old_kollos

The Kollos project [ARCHIVED]
Other
30 stars 7 forks source link

g:rule_new() uses variable parameter list rather than array #57

Closed rns closed 9 years ago

rns commented 9 years ago

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.

jeffreykegler commented 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.

rns commented 9 years ago

Ok, point taken, thanks for explaining.

jeffreykegler commented 9 years ago

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.

rns commented 9 years ago

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.