Shamelessly copy-pasted parser rules from the tutorial. To be retrofitted or deleted as necessary.