1. A method for providing a parser by a network node that includes a table defining a plurality of rules and a plurality of match fields required for extraction from an incoming data packet header in order to apply each of the respective rules, the method comprising: determining at least one occurrence in the table of a first match field that requires extraction; and determining a parser for use in accordance with the at least one determined occurrence of the first match field, the first match field corresponding to a field in the incoming data packet header, wherein the parser, when in use, is configured to extract only match fields for which an occurrence is determined.
1. A method for providing a parser by a network node that includes a table defining a plurality of rules and a plurality of match fields required for extraction from an incoming data packet header in order to apply each of the respective rules, the method comprising: determining at least one occurrence in the table of a first match field that requires extraction; and determining a parser for use in accordance with the at least one determined occurrence of the first match field, the first match field corresponding to a field in the incoming data packet header, wherein the parser, when in use, is configured to extract only match fields for which an occurrence is determined. 2. The method of claim 1 , wherein determining at least one occurrence of a first match field comprises: initializing a counter associated with the first match field; and incrementing the counter for each of the plurality of rules that requires extraction of the first match field.