Fix compatibility issue with Bison 3.

Closes #570
Refactor bison files using new prologue syntax.