normand.git
7 months agoAdd variable repetition count support v0.3.0
Philippe Proulx [Thu, 28 Sep 2023 20:34:38 +0000 (16:34 -0400)] 
Add variable repetition count support

This patch makes it possible to do this:

    {meow = 23}
    aa <lbl> bb (cc dd) * {9 * meow + lbl} ff

The repetition count expression cannot refer to a "future" label name,
to an inner label name, or to any variable of which the value was
computed using, directly or indirectly, one of those labels.

For example, this is invalid:

    aa
    {meow = mix}
    {zoom = meow}
    bb * {zoom}
    <mix>

However this is valid:

    aa
    {meow = mix}
    {zoom = meow}
    {meow = 23}
    bb * {meow}
    <mix>

An interesting side effect of this feature is to make Normand support
conditional sections by using zero vs. one repetition:

    (
      <beg>
      aa bb cc dd
      <end>
      {include = int(beg >= 4 * (end - beg))}
      (11 22 33 44) * {include}
    ) * 10

Result:

    aa bb cc dd aa bb cc dd  aa bb cc dd aa bb cc dd  ┆ ••••••••••••••••
    aa bb cc dd 11 22 33 44  aa bb cc dd 11 22 33 44  ┆ •••••"3D•••••"3D
    aa bb cc dd 11 22 33 44  aa bb cc dd 11 22 33 44  ┆ •••••"3D•••••"3D
    aa bb cc dd 11 22 33 44  aa bb cc dd 11 22 33 44  ┆ •••••"3D•••••"3D

This becomes interesting with externally-provided variables, for
example:

    aa bb cc dd
    (beef) * {has_beef}
    "salut"

You may include or exclude the `be ef` bytes with `--var=has_beef=1` and
`--var=has_beef=0` (or the equivalent API way).

Also update the `README.adoc` usage and examples.

Change-Id: I8cd8aa7078cbe48038b00c541aa40a067c9f79bf
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
7 months agoFix: _dict_from_arg(): actually fill the dictionary v0.2.1
Philippe Proulx [Fri, 29 Sep 2023 05:00:22 +0000 (01:00 -0400)] 
Fix: _dict_from_arg(): actually fill the dictionary

Change-Id: Ib86c8df44986eeec5b45908bce2d15c44d053d99
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
7 months agonormand.py: add comment about the portable module
Philippe Proulx [Thu, 28 Sep 2023 01:02:05 +0000 (21:02 -0400)] 
normand.py: add comment about the portable module

Change-Id: I8e7792f0864bdb0c7786eabcc0a46e00122734b7
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
7 months agoMake text locations of some items and errors more precise v0.2.0
Philippe Proulx [Wed, 27 Sep 2023 21:36:32 +0000 (17:36 -0400)] 
Make text locations of some items and errors more precise

Using the text location before parsing the item instead of after it
feels more natural.

Change-Id: I0390d3885bf388e1d3ac37e8520ca1894de8474b
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
7 months agoFix: parse a 0-item repetition v0.1.1
Philippe Proulx [Wed, 27 Sep 2023 17:59:58 +0000 (13:59 -0400)] 
Fix: parse a 0-item repetition

Change-Id: I89d3d01db51a78a0ff543650d95486208eb91d26
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
7 months agoAdd `.gitreview`
Philippe Proulx [Wed, 27 Sep 2023 16:53:15 +0000 (12:53 -0400)] 
Add `.gitreview`

Change-Id: I4e21512c102ab4d4f150fce2a789da330295f11e
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
7 months agoREADME.adoc: add logo
Philippe Proulx [Wed, 27 Sep 2023 16:45:38 +0000 (12:45 -0400)] 
README.adoc: add logo

Change-Id: I039e3a475101c79699891687c7843936f2c456ff
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
7 months agoREADME.adoc: remove redundant internal links
Philippe Proulx [Tue, 26 Sep 2023 22:38:10 +0000 (18:38 -0400)] 
README.adoc: remove redundant internal links

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
7 months agoREADME.adoc: make it work offline too
Philippe Proulx [Tue, 26 Sep 2023 22:37:54 +0000 (18:37 -0400)] 
README.adoc: make it work offline too

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
7 months agoThe earliest commit (also Normand 0.1.0) v0.1.0
Philippe Proulx [Mon, 25 Sep 2023 21:16:28 +0000 (17:16 -0400)] 
The earliest commit (also Normand 0.1.0)

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
This page took 0.024897 seconds and 4 git commands to generate.