Modified the function for creating syntax_error.