commit 3cb4d4eb83706b6d5578cafbd96a87f0c2125a92
parent c3720d0951b756ccfab2b2dcedddcb61702196b1
Author: NunoSempere <nuno.sempere@protonmail.com>
Date: Sun, 30 Apr 2023 00:49:56 -0400
tweak: allow top level expression (e.g., a number)
Diffstat:
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/mumble b/mumble
Binary files differ.
diff --git a/src/mumble.c b/src/mumble.c
@@ -22,7 +22,7 @@ int main(int argc, char** argv)
number : /-?[0-9]+/ ; \
operator : '+' | '-' | '*' | '/' ; \
expr : <number> | '(' <operator> <expr>+ ')' ; \
- mumble : /^/ <operator> <expr>+ /$/ ; \
+ mumble : /^/ <operator> <expr>+ | <expr>/$/ ; \
",
Number, Operator, Expr, Mumble);