Hi all, I'm writing to ask Alex, Ian, or anybody else about a good way of extending OMeta or another grammar system to include optional streamed output.
I've been experimenting with Figure, a small runtime environment written in C that has some similar sensibilities as COLA, but with the following different features: * Preferred single inheritance, with fallbacks to prototype delegation with separate self/state values (like libid's split between stateful_self and self). * Prototype multiple dispatch (see Saltzman and Aldrich) for high-level functions dispatched via a symbolic name followed by tagged arguments. Low-level functions are calls made with an integer as the head of a list and any arbitrary arguments (which don't need to be well-formed objects). * "World" argument to every high-level function reifies stack information, current object model, fundamental data types, any thread-specific information, etc. * Lisp-like signalled conditions with restarts allows for implementing exceptions or other unusual control flow (one frame signals a condition, any number of intervening frames offer possible actions in response, and an outer frame decides what to do). * Optional early binding allows lexical scoping and bypasses multiple dispatch for optimization or compiling down to zero-runtime code. * Aside from external threading libraries used explicitly by other components (such as pthreads, pth, libcoro, etc), multiprocessing is implemented by arranging parsers as a pipeline and invoking them with a specific scheduler. This requires a small extension to OMeta or Ian's new grammars to allow a grammar's production to return a stream of values (which reduces to a list if the caller expects a single value instead of a stream). I'm currently working on the grammar and scheduling features. I intend to implement the garbage collector as another parser pipeline. I'm quite interested in working on this system until it bootstraps and then merging anything useful with John's Church-State and/or COLA. If you would like to play with the system as it exists so far, it's currently available at: http://michael.fig.org/figure.c It's short on documentation, but there's a few pithy comments in it. Have fun, -- Michael FIG <[email protected]> //\ http://michael.fig.org/ \// _______________________________________________ fonc mailing list [email protected] http://vpri.org/mailman/listinfo/fonc
