1. A system comprising: a memory configured to store AFP print data; and a controller configured to perform a parsing process on the AFP print data to identify AFP objects, wherein during the parsing process the controller is configured to: (A) advance a parsing location within the AFP print data; (B) if the parsing location corresponds with a BEGIN field for an AFP object, then push an entry representing the AFP object onto a stack; (C) determine whether the stack matches a pattern of entries defined by a rule; (D) if the stack matches the pattern, then process the AFP object at the parsing location to perform an action defined in the rule; (E) repeat operations (A)-(D).