Monday, December 10, 2018

Using args on the linux bus

The format, argc args, does not start with *argc=0. Part of the args stack is reserved at starting at zero, and I define a start of code higher up.  The bottom serves as a return stack, without bothering exiting linux subystems who do not use it.

The parsing engine emits a complete linux cmd sequence when it sees one, the args code portion is not disturbed,of course.  I use the ';'  terminator or I use the block structure to determine when to emit.  It is a bit tricky.

Any statement inside a loop or block defers execution until called by the outer loop to execute.  But it all gets assembled into the proper cmd sequence on args.  So we get the condition that single statements that stand on their own get execution immediately. And any closing block is guaranteed that its its internals are properly assembled into cmd format.

I am sure this is a standard issue with parser and the pros have names for this, it is not new.

No comments: