stream: move parser specific functions out
1.15.2