Fixes the grammar parsing formal parameters incorrectly.
Adds some basic grammar tests.