Parser for automatically merging primitive operators into macros in PDDL