Add parser actions to simulate stack and buffer