reducing abuse of pointers in parser internals