Sync grammar with the upstream

Fixes #44
Merge pull request #48 from vosen/master

Sync grammar with the upstream