Successfully added the macro code. Parsing format error checking is present, but doesn't check yet whether all mentioned states are actually defined.