Create Parser module

This will encapsulate all the logic for rescuing syntax errors and
dealing with empty files.
Remove useless elsif branch