Parse and compile IMAP commands