Sync grammar with the upstream

Fixes #44