Added parse_enum function that handles the '|' character.