From f316a2ed52195135a35e32d7096e876357c48c69 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 18 Sep 2014 20:03:23 +0000 Subject: initial commit: rc for execline-2.0.0.0 --- doc/grammar.html | 160 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 doc/grammar.html (limited to 'doc/grammar.html') diff --git a/doc/grammar.html b/doc/grammar.html new file mode 100644 index 0000000..6c26dbd --- /dev/null +++ b/doc/grammar.html @@ -0,0 +1,160 @@ + + + + + execline: language design and grammar + + + + + + +

+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: +

+ + + + + -- cgit v1.3.1