fix & bug of print function in parser.h