cowlark.com
|
MercatIntroductionBack in 1997 I decided, more or less for the hell of it, to design and implement a programming system. Mercat, nee Micron, is that language, and this is it.Mercat is not really useful for anything much. It is, on the other hand, an excellent example of how to implement a self-hosted recursive-descent-parsed language and virtual machine. The code is --- I hope --- reasonably easy to understand, and I think the overall design is quite elegant.
Features include:
Supported platforms:
Here's some code, taken from one of the example programs, a full-screen editor.
function void MenuInitialise
array Menu menubar;
{
int i;
int j;
int x := 1;
int w;
string label;
for(i:=0; i<sizeof(menubar); i:=i+1)
{
menubar[i].x := x;
w := sizeof(menubar[i].label);
x := x + 2 + w;
for(j:=0; j<sizeof(menubar[i].item); j:=j+1)
{
label := menubar[i].item[j].label;
if (sizeof(label) > w)
w := sizeof(label);
}
menubar[i].width := w;
}
}
So you want to give Mercat a tryBecause Mercat is portable, the bulk of the code is provided as platform-independent .mo files. All you need is an interpreter for your system. Therefore, you will need:
plus one of these, depending on your platform:
If you don't have any of those platforms, or want to rebuild the run-time from source, then you'll want this:
Example programs and documentation are provided in the core file. If you are of a historical bent, you might be interested in the prior Mercat version, 0.2.1.
|
All material © 2000-2002 David Given, unless where stated otherwise.
This page last updated on 2002-09-21 16:55:55.000000000 +0100 mercat.ns .