Some of you may have seen my tutorials on SSTNPL in the past, but considering how much has been added since then, i figure id post about some of its latest features.
One of the first things you might notice if you scroll down past the comments, is the code indenting. similar to languages like C, it means nothing, but is there to help make code more readable.
The linked SSTNPL soruce code actually creates basic Command line shell. now, part of this involves the new module system, and a module called comprompt. but all the latter does is take user input and pass it into an SSTNPL table (2D array, note that SSTNPL has no normal 1D arrays).
The actual syntax checking is done via the tabstrc operations that start at line 57. all it does is checks if the given string is at the given location, in the given table. notice the table name starts with
tabstrc cp.buffer,@0,@0,help set cmdflg if cmdflg,@1 =validcom @1 if cmdflg,@1 gsub help
if you scroll to the end of the file, you will see a command that looks like such:
include comprompt as cp