improve syntax error line numbers. closes #6179