tweak: allow top level expression (e.g., a number)
This commit is contained in:
parent
c3720d0951
commit
3cb4d4eb83
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user