Sorry, I was just pointing it out in case for anyone copying the code as they are both very common cases - especially dots as gap characters.
The Grammar system does look quite nice. Parsing is definitely a Perl forte - though I seriously hope bioinformatics in general will continue to abandon these crazy formats that can't be read easily by humans or machine.