less hacky way of producing syntax extensions