diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-12-05 15:09:04 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-12-05 15:09:04 +0200 |
commit | 54870fb76b5f59cc2e6d69a8c7a8ef17853a0029 (patch) | |
tree | 770b01aa56348ec75f17fb834a2a7123ba9c3f73 /doc | |
parent | ef7cb7ea3e6fcb21a4fcf38602b3f43f03232ace (diff) |
Add comma, ternary, logical operators support in eval context
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual.cli | 28 | ||||
-rw-r--r-- | doc/testscript.cli | 2 |
2 files changed, 23 insertions, 7 deletions
diff --git a/doc/manual.cli b/doc/manual.cli index de16aae..2d23688 100644 --- a/doc/manual.cli +++ b/doc/manual.cli @@ -15,11 +15,27 @@ \h0#preface|Preface| This is the preface. -" -/* -" -\h Installation +\h1#grammar|Grammar| + +\ +eval: '(' (eval-comma | eval-qual)? ')' +eval-comma: eval-ternary (',' eval-ternary)* +eval-ternary: eval-or ('?' eval-ternary ':' eval-ternary)? +eval-or: eval-and ('||' eval-and)* +eval-and: eval-comp ('&&' eval-comp)* +eval-comp: eval-value (('=='|'!='|'<'|'>'|'<='|'>=') eval-value)* +eval-value: value-attributes? (<value> | eval | '!' eval-value) +eval-qual: <name> ':' <name> + +value-attributes: '[' <key-value-pairs> ']' +\ + +Note that \c{?:} (ternary operator) and \c{!} (logical not) are +right-associative. Unlike C++, all the comparison operators have the same +precedence. A qualified name cannot be combined with any other operator +(including ternary) unless enclosed in parentheses. The \c{eval} option +in the \c{eval-value} production shall contain single value only (no +commas). + " -source "../INSTALL.cli"; -*/ diff --git a/doc/testscript.cli b/doc/testscript.cli index eaccd0a..1a02c12 100644 --- a/doc/testscript.cli +++ b/doc/testscript.cli @@ -653,7 +653,7 @@ foo? - zero or one multiplier foo bar - concatenation (foo then bar) foo | bar - alternation (foo or bar) (foo bar) - grouping -{foo bar} - concatenation in any order (foo then bar or bar then foo) +{foo bar} - grouping in any order (foo then bar or bar then foo) foo \ bar - line continuation # foo - comment |