execline
Software
skarnet.org

The execline language design and grammar

execline principles

Here are some basic Unix facts:

Knowing that, and wanting lightweight and efficient scripts, I wondered: "Why should the interpreter stay in memory while the script is executing ? Why not parse the script once and for all, put it all into one argv, and just execute into that argv, relying on external commands (which will be called from within the script) to control the execution flow ?"

execline was born.

Grammar of an execline script

An execline script can be parsed as follows:

 <instruction> = <> | external options <arglist> <instruction> | builtin options <arglist> <blocklist> <instruction>
 <arglist> = <> | arg <arglist>
 <blocklist> = <> | <block> <blocklist>
 <block> = { <arglist> } | { <instrlist> }
 <instrlist> = <> | <instruction> <instrlist>

(This grammar is ambivalent, but much simpler to understand than the non-ambivalent ones.)

execline features

execline commands can perform some transformations on their argv, to emulate some aspects of a shell. Here are descriptions of these features: