Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
panda_4
· 7y ago · 0 comments
Should that grammar be:
Expr = "A" | "(" Expr* ")" | ""
so that (()) is s a valid match? Because then Expr can be an empty string also?
Comments
[–]
aidenn0
7y ago
Typically Star (*) means zero or more while Plus (+) means one or more.
[–]
Technetium_Hat
7y ago
`Expr*` means zero or more, so the empty string is implicit.