Attachment parsing

Implement the grammar for parsing attachments.