Use only naked `{` and `}` for variable assignment v0.22.0
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 11 Oct 2023 16:39:07 +0000 (12:39 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 11 Oct 2023 16:46:39 +0000 (12:46 -0400)
commitee724c95ef52bbd11d3bc89bbd1e372b0c936bae
tree9c49c9fa050a85c683ae6d5530f28b90699a5cff
parentcd33dfe61ea9d6c08460d800bb995cdb774c3c48
Use only naked `{` and `}` for variable assignment

This patch:

* Makes a fixed-length number, an LEB128, or a string item use
  `[` and `]` instead of `{` and `}`.

* Changes `{be}` and `{le}` to `!be` and `!le`.

* Removes the `[` and `]` symbols from the insignificant symbol set
  (I knew this day would come).

This means anything between `{` and `}` is now a valid Python 3
expression. A side effect of this patch is to also simplify the parser
because when expecting an item, `{` already means a variable assignment.

`README.adoc` and tests are changed accordingly.

Change-Id: I071978b0eae9349b779be44843e5f8dd0a162461
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/normand/+/11036
Tested-by: jenkins <jenkins@lttng.org>
173 files changed:
README.adoc
normand/normand.py
pyproject.toml
tests/conftest.py
tests/fail-fl-float-inval-len.nt
tests/fail-fl-int-32b-out-of-range-neg.nt
tests/fail-fl-int-32b-out-of-range-pos.nt
tests/fail-fl-int-8b-out-of-range-neg.nt
tests/fail-fl-int-8b-out-of-range-pos.nt
tests/fail-fl-num-empty-expr.nt
tests/fail-fl-num-eval-type.nt
tests/fail-fl-num-eval.nt
tests/fail-fl-num-inval-len.nt
tests/fail-fl-num-inval-syntax.nt
tests/fail-fl-num-missing-bo.nt
tests/fail-fl-num-missing-len.nt
tests/fail-fl-num-unknown-name-1.nt
tests/fail-fl-num-unknown-name-2.nt
tests/fail-macro-exp-nested-1.nt
tests/fail-macro-exp-nested-2.nt
tests/fail-sleb128-empty-expr.nt
tests/fail-str-post-empty-expr.nt
tests/fail-str-post-inval-latin-enc.nt
tests/fail-str-post-inval-utf-spec.nt
tests/fail-str-post-missing-enc-colon.nt
tests/fail-str-post-missing-enc.nt
tests/fail-str-post-missing-gen-prefix.nt
tests/fail-str-post-missing-utf-spec.nt
tests/fail-str-pre-missing-enc.nt
tests/fail-trans-unknown-label.nt
tests/fail-uleb128-empty-expr.nt
tests/fail-uleb128-eval-type-1.nt
tests/fail-uleb128-eval-type-2.nt
tests/fail-uleb128-eval.nt
tests/fail-uleb128-inval-syntax.nt
tests/fail-uleb128-unknown-name-1.nt
tests/fail-uleb128-unknown-name-2.nt
tests/fail-uleb128-unreachable-label-1.nt
tests/fail-uleb128-unreachable-label-2.nt
tests/fail-var-label-bo-none.nt
tests/pass-bmp.nt
tests/pass-bo.nt
tests/pass-comment-all.nt
tests/pass-comment-sym-bin-const.nt
tests/pass-comment-sym-group.nt
tests/pass-comment-sym-hex-const.nt
tests/pass-const-int-bin.nt
tests/pass-const-int-dec.nt
tests/pass-const-int-hex.nt
tests/pass-const-int-oct.nt
tests/pass-fill-cur-offset.nt
tests/pass-fill-name.nt
tests/pass-fill-pad-val.nt
tests/pass-fill.nt
tests/pass-fl-float-32b-be.nt
tests/pass-fl-float-32b-le.nt
tests/pass-fl-float-64b-be.nt
tests/pass-fl-float-64b-le.nt
tests/pass-fl-int-16b-be.nt
tests/pass-fl-int-16b-le.nt
tests/pass-fl-int-24b-be.nt
tests/pass-fl-int-24b-le.nt
tests/pass-fl-int-32b-be.nt
tests/pass-fl-int-32b-le.nt
tests/pass-fl-int-40b-be.nt
tests/pass-fl-int-40b-le.nt
tests/pass-fl-int-48b-be.nt
tests/pass-fl-int-48b-le.nt
tests/pass-fl-int-56b-be.nt
tests/pass-fl-int-56b-le.nt
tests/pass-fl-int-64b-be.nt
tests/pass-fl-int-64b-le.nt
tests/pass-fl-int-8b.nt
tests/pass-fl-int-icitte.nt
tests/pass-group-blk-label-1.nt
tests/pass-group-blk-label-2.nt
tests/pass-group-blk-label-3.nt
tests/pass-group-paren-label-1.nt
tests/pass-group-paren-label-2.nt
tests/pass-group-paren-label-3.nt
tests/pass-label.nt
tests/pass-macro-exp-final-state-bo.nt
tests/pass-macro-exp-final-state-labels.nt
tests/pass-macro-exp-final-state-offset.nt
tests/pass-macro-exp-final-state-vars.nt
tests/pass-macro-exp-fl-num.nt
tests/pass-macro-exp-init-state-bo.nt
tests/pass-macro-exp-init-state-offset.nt
tests/pass-macro-exp-param-float.nt
tests/pass-macro-exp-param-str.nt
tests/pass-macro-exp-three-params.nt
tests/pass-macro-exp-var.nt
tests/pass-offset.nt
tests/pass-readme-intro-align.nt
tests/pass-readme-intro-fill.nt
tests/pass-readme-intro-fl-num.nt
tests/pass-readme-intro-leb128.nt
tests/pass-readme-learn-align-2.nt
tests/pass-readme-learn-const-1.nt
tests/pass-readme-learn-fill-2.nt
tests/pass-readme-learn-fl-num-1.nt
tests/pass-readme-learn-fl-num-2.nt
tests/pass-readme-learn-fl-num-3.nt
tests/pass-readme-learn-fl-num-4.nt
tests/pass-readme-learn-group-3.nt
tests/pass-readme-learn-leb128-1.nt
tests/pass-readme-learn-leb128-2.nt
tests/pass-readme-learn-macro-def-1.nt
tests/pass-readme-learn-macro-def-2.nt
tests/pass-readme-learn-macro-exp-1.nt
tests/pass-readme-learn-macro-exp-2.nt
tests/pass-readme-learn-macro-exp-3.nt
tests/pass-readme-learn-offset-1.nt
tests/pass-readme-learn-offset-2.nt
tests/pass-readme-learn-rep-blk-1.nt
tests/pass-readme-learn-rep-blk-3-cond-0.nt
tests/pass-readme-learn-rep-blk-3-cond-1.nt
tests/pass-readme-learn-rep-post-1.nt
tests/pass-readme-learn-str-1.nt
tests/pass-readme-learn-str-2.nt
tests/pass-readme-learn-trans.nt
tests/pass-readme-learn-var.nt
tests/pass-rep-blk-all-bytes.nt
tests/pass-rep-post-all-bytes.nt
tests/pass-sleb128-1-byte.nt
tests/pass-sleb128-10-bytes.nt
tests/pass-sleb128-2-bytes.nt
tests/pass-sleb128-3-bytes.nt
tests/pass-sleb128-4-bytes.nt
tests/pass-sleb128-5-bytes.nt
tests/pass-sleb128-6-bytes.nt
tests/pass-sleb128-7-bytes.nt
tests/pass-sleb128-8-bytes.nt
tests/pass-sleb128-9-bytes.nt
tests/pass-sleb128-limits.nt
tests/pass-sleb128-minus-one.nt
tests/pass-sleb128-zero.nt
tests/pass-str-post-bool.nt
tests/pass-str-post-expr-lower.nt
tests/pass-str-post-latin.nt
tests/pass-str-post-utf.nt
tests/pass-str-pre-float.nt
tests/pass-str-pre-int.nt
tests/pass-trans-a85.nt
tests/pass-trans-a85p.nt
tests/pass-trans-b16.nt
tests/pass-trans-b32.nt
tests/pass-trans-b64.nt
tests/pass-trans-b64u.nt
tests/pass-trans-b85.nt
tests/pass-trans-b85p.nt
tests/pass-trans-qp.nt
tests/pass-trans-qpt.nt
tests/pass-uleb128-1-byte.nt
tests/pass-uleb128-10-bytes.nt
tests/pass-uleb128-2-bytes.nt
tests/pass-uleb128-3-bytes.nt
tests/pass-uleb128-4-bytes.nt
tests/pass-uleb128-5-bytes.nt
tests/pass-uleb128-6-bytes.nt
tests/pass-uleb128-7-bytes.nt
tests/pass-uleb128-8-bytes.nt
tests/pass-uleb128-9-bytes.nt
tests/pass-uleb128-expr-label-inner.nt
tests/pass-uleb128-expr-label.nt
tests/pass-uleb128-expr-var.nt
tests/pass-uleb128-limits.nt
tests/pass-uleb128-zero.nt
tests/pass-var-float.nt
tests/pass-var-icitte.nt
tests/pass-var-label.nt
tests/pass-var.nt
tests/test_api.py
This page took 0.038993 seconds and 4 git commands to generate.