make parser more robust against invalid declarations