fix error: string may end with "\n"
support space between fun name with "("