changed printing/stack pushing in parser