Tuesday, January 1, 2019

case end_tag: // The semi colon
args[*argc]=";";  // Making sure
*argc +=1;
if(!DepthBase) {// This is the pass thru function
*argc=StartCommand;
ExecCommand(argc,args);
}
break;

This is the Default interpreter executing pass thru.  It is essentially in control of the command line.  Start command is the point one past where the previous command ended, but that variable isd managed in ExecCommand acting a program counter.

What does Default pass through? Everything, you commands that are not syntax, it also runs its own assembly code back through this interpreter, everything is a linux command whose function is discovered in ExecCommand.  If I include 'linux undefines' as valid Default syntax, which it is, then Default encapsulates all the linux command semantics, built in, especially since I added file expressions as first class objects.

But is all happens on args list. Many of the calls being a transformation of args list, tokenizer does this, shun does this.  Each intermediate form works because it is structured like a valid command and we just run it back through.

This simplifies symbol table, one table holds everything through its various transitions, so there is a single point of information at any stage in the process.  All of which leads to compact code, a single file which is still at 800 lines of code.

Is Default fast? Heck no, designed for compactness and reuse, never even considered speed a factor because the speed in in the snippets. Xcharsis fast, fast enough for personal gaming, much faster than anything a browser can do, but in th context of a cursor managing snippet, xchars can be just as flexible regarding text.

Software dependencies? None, we can run console loop and default on a bare processor, if it has a keyboard io.  That is what we want, a machine completely defined by the layered semantics above, keep the hardware metaphor. console loop is a dma controller for the bus.. Default is the default DMA device driver.

No comments: