From f1cbb7c9d5c750366fa1918a53d0682f0633b1d9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 9 Nov 2016 11:29:23 +0200 Subject: Various minor semantics changes in testscript language The .include directive and if-else no longer have to be separated from the following token. This allows to make the decision by looking at just one token. The test scope can no longer have a description inside the scope. It should always be leading the scope itself. --- doc/testscript.cli | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/testscript.cli b/doc/testscript.cli index 6022d6c..123846f 100644 --- a/doc/testscript.cli +++ b/doc/testscript.cli @@ -718,17 +718,31 @@ teardown: variable-line|teardown-line scope: - description? + ?description + scope-block|scope-if + +scope-block: '{' scope-body '}' +scope-if: ('if'|'if!') command-expr + scope-block + *scope-elif + ?scope-else + +scope-elif: ('elif'|'elif!') command-expr + scope-block + +scope-else: 'else' + scope-block + test: - description? + ?description *((variable-line|test-line) ';') test-line (':' )? -include: '.include'(' '+'--once')*(' '+)* +include: '.include' (' '+'--once')*(' '+)* description: +(':' ) @@ -741,15 +755,15 @@ teardown-line: '-' command-line test-line: command-line command-line: - command-if|command-expr + command-expr|command-if -command-if: ('if'|'if!')' '+command-expr +command-if: ('if'|'if!') command-expr command-if-body *command-elif ?command-else 'end' -command-elif: ('elif'|'elif!')' '+command-expr +command-elif: ('elif'|'elif!') command-expr command-if-body command-else: 'else' -- cgit v1.1