Automatic semicolon insertion and parser tidy-up
Update grammar to edition 5.1 (mostly)