merge trig primitives from broken parser branch