Add grammar ToStringByPrintFunc