Sunday, December 9, 2018

Decisions on a default syntax for console loop

I look at the simple home brew syntax as a default tool to get around, and I worked the code a little.

I have a home brew that does while loops with brackets, nested; handles expressions, and nested brackets, and has a good enough symbol table.  More important it lets the undefined pass though and become sub system command.

It all comes in under 300 lines of code, and it will be loadable, the default syntax loadable if no other is available. It is slow, no doubt, but the default so it is OK. Forth and Python are still in the works.

How do I null terminate strings in the source?
The parser runs off a table of key words and their class, so key words are terminated. Variables are accessed through the symbol table which can produce null terminated strings versions on demand. So I have not added any nulls to the source, but I still have to pass through the undefined.  These are not in the symbol table. I dunno ye about those, I might just null terminate arguments in the source. Linux command format is all about all terminated strings arguments..

No comments: