allocate parsed rules on the heap rather than on the stack