1. A method comprising: reading a classification policy that specifies a plurality of classes, each class associated with one or more matching rules; generating a super class that includes the matching rules associated with the plurality of classes; converting the matching rules in the super class into a hierarchical arrangement of lookup tables and associated equivalence sets, the hierarchical arrangement having a first level and a final level, the final level associated with a final equivalence set; associating each entry in the final equivalence set with one of the classes of the plurality of classes; applying a network packet to each level of the hierarchical arrangement of lookup tables to generate indexes into subsequent levels of the hierarchical arrangement of lookup tables, and ultimately to generate an index into the final equivalence set; and applying the index to the final equivalence set to yield a particular entry that indicates the network packet is associated with a particular class.