3 ms·
Should that grammar be: Expr = "A" | "(" Expr* ")" | "" so that (()) is s a valid match? Because then Expr can be an empty string also?
by panda_4 7y ago
Should that grammar be:
Expr = "A" | "(" Expr* ")" | ""
so that (()) is s a valid match? Because then Expr can be an empty string also?
- Technetium_Hat 7y ago`Expr*` means zero or more, so the empty string is implicit.
- aidenn0 7y agoTypically Star (*) means zero or more while Plus (+) means one or more.