diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-10-13 13:08:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-04 08:29:23 +0200 |
commit | 5381b25c51475c0c7a2f39e9f6efa623f621ef3e (patch) | |
tree | 634110f6d81fea2d67f13564a26030f088c154bc /doc | |
parent | 18ce15f3aee71debe3f35356c6a739943815da8a (diff) |
Continue work on testscript parser
Diffstat (limited to 'doc')
-rw-r--r-- | doc/testscript.cli | 66 |
1 files changed, 38 insertions, 28 deletions
diff --git a/doc/testscript.cli b/doc/testscript.cli index 1aff571..a5aef9d 100644 --- a/doc/testscript.cli +++ b/doc/testscript.cli @@ -711,23 +711,33 @@ command-exit: ('=='|'!=') <exit-status> command: <path> (' '+ <arg>)* {stdin? stdout? stderr?} -stdin: '0'? ('<!'|\ - '<' <text>|\ - '<<' <here-end>) +stdin: '0'?('<!'|\ + '<' <text>|\ + '<<' <here-end>) -stdout: '1'? ('>!'|\ - '>' <text>|\ - '>>' <here-end>) +stdout: '1'?('>!'|\ + '>' <text>|\ + '>>' <here-end>) -stderr: '2' ('>!'|\ - '>' <text>|\ - '>>' <here-end>) +stderr: '2'('>!'|\ + '>' <text>|\ + '>>' <here-end>) here-document: <text>* <here-end> \ +Note that if specified, file descriptors must not be separated from the +redirect operator with whitespaces. In other words, the following command +has \c{2} as an argument and redirects \c{stdout}, not \c{stderr}. + +Here-line is like double-quoted string by recognizes newlines. + +\ +$* 2 >! +\ + \ script: (script-scope|script-line)* @@ -782,25 +792,25 @@ command-pipe: command ('|' command)* command: <path> (' '+ <arg>)* {stdin? stdout? stderr? cleanup*} -stdin: '0'? ('<!'|\ - '<?'|\ - '<' <text>|\ - '<<' <here-end>|\ - '<<<' <file>) - -stdout: '1'? ('>!'|\ - '>?'|\ - '>&' '2'|\ - '>' <text>|\ - '>>' <here-end>|\ - ('>>>'|'>>>&') <file>) - -stderr: '2' ('>!'|\ - '>?'|\ - '>&' '1' |\ - '>' <text>|\ - '>>' <here-end>|\ - ('>>>'|'>>>&') <file>) +stdin: ('<!'|\ + '<?'|\ + '<' <text>|\ + '<<' <here-end>|\ + '<<<' <file>) + +stdout: ('>!'|\ + '>?'|\ + '>&' '2'|\ + '>' <text>|\ + '>>' <here-end>|\ + ('>>>'|'>>>&') <file>) + +stderr: '2' ('>!'|\ + '>?'|\ + '>&' '1' |\ + '>' <text>|\ + '>>' <here-end>|\ + ('>>>'|'>>>&') <file>) cleanup: '&' (<file>|<dir>) |