From 208594ca9f95a87f60ff052490a4d5824dc23801 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 5 Jan 2026 14:35:26 +0100 Subject: Make deterministic the default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- calc-example/calc.syntax | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'calc-example/calc.syntax') 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 | -)}, _; -- cgit v1.2.3-70-g09d2