aboutsummaryrefslogtreecommitdiffstats
path: root/calc-example
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-01-05 14:35:26 +0100
committerMattias Andrée <m@maandree.se>2026-02-23 07:53:08 +0100
commit208594ca9f95a87f60ff052490a4d5824dc23801 (patch)
tree915a17b51f62b289ba4115214a057610416d755e /calc-example
parentAdd committed-operator (diff)
downloadlibparser-208594ca9f95a87f60ff052490a4d5824dc23801.tar.gz
libparser-208594ca9f95a87f60ff052490a4d5824dc23801.tar.bz2
libparser-208594ca9f95a87f60ff052490a4d5824dc23801.tar.xz
Make deterministic the default
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'calc-example')
-rw-r--r--calc-example/calc.syntax8
1 files changed, 4 insertions, 4 deletions
diff --git a/calc-example/calc.syntax b/calc-example/calc.syntax
index d76b68b..fb5a871 100644
--- a/calc-example/calc.syntax
+++ b/calc-example/calc.syntax
@@ -15,16 +15,16 @@ DIV = _, ("/" | "∕" | "÷"), _;
sign = ADD | SUB;
_digit = DIGIT | _WHITESPACE | "_" | "'";
-unsigned = DIGIT, +({_digit}, !_digit);
+unsigned = DIGIT, {_digit}, !_digit;
_number = unsigned | "(", _expr, (")" | -);
-number = _number, +{_, _number}; (* optionally with implicit multiplication *)
+number = _number, {_, _number}; (* optionally with implicit multiplication *)
value = [sign], number;
_expr = hyper1;
-hyper1 = _, hyper2, {+(ADD | SUB), +(hyper2 | -)}, _;
-hyper2 = _, value, {+(MUL | DIV), +(value | -)}, _;
+hyper1 = _, hyper2, {(ADD | SUB), (hyper2 | -)}, _;
+hyper2 = _, value, {(MUL | DIV), (value | -)}, _;