#optional is a
parser that always succeeds. #star is an parser that
parsers 0 or more times eagerly. Thus #star loops forever.
Thanks, so "optional" is like the ? in other regex systems, meaning 0 or
1
times.
Yes, 'x?*' is illegal in most regex engines. I guess PetitParser could
also try to prevent it, at least in simple cases.
Lukas
--
Lukas Renggli