14. An apparatus for processing a sequence of tokens to detect predetermined data, the apparatus comprising: a network interface to receive the sequence of tokens, wherein each said token has a token type, and the predetermined data has a structure that comprises a predetermined sequence of token types, at least one said token type being optional; and a processor coupled to the network interface and configured to: compare, in a starting state of a decision tree, a token type of a first token in the sequence with one or more conditions provided for the starting state; if one of the starting state conditions is not met, determine the predetermined data cannot be detected; and if one of said starting state conditions is met, update the sequence by consuming the first token and proceeding to a next state of the decision tree corresponding to the met condition, if there is a token remaining in the updated sequence, compare the token type of the token in the updated sequence with one or more conditions provided for the now current state, if one of said next state conditions is met, update the sequence by consuming the token and proceeding to the next state corresponding to the met condition, iterate said comparing of the updated sequence and said updating of the sequence until there is no token remaining in the sequence matching a condition of the current state, determine whether a reduction is associated with the current state and, if so, using the reduction, and if no reduction is associated with the current state, determine that the predetermined data cannot be detected.
14. An apparatus for processing a sequence of tokens to detect predetermined data, the apparatus comprising: a network interface to receive the sequence of tokens, wherein each said token has a token type, and the predetermined data has a structure that comprises a predetermined sequence of token types, at least one said token type being optional; and a processor coupled to the network interface and configured to: compare, in a starting state of a decision tree, a token type of a first token in the sequence with one or more conditions provided for the starting state; if one of the starting state conditions is not met, determine the predetermined data cannot be detected; and if one of said starting state conditions is met, update the sequence by consuming the first token and proceeding to a next state of the decision tree corresponding to the met condition, if there is a token remaining in the updated sequence, compare the token type of the token in the updated sequence with one or more conditions provided for the now current state, if one of said next state conditions is met, update the sequence by consuming the token and proceeding to the next state corresponding to the met condition, iterate said comparing of the updated sequence and said updating of the sequence until there is no token remaining in the sequence matching a condition of the current state, determine whether a reduction is associated with the current state and, if so, using the reduction, and if no reduction is associated with the current state, determine that the predetermined data cannot be detected. 15. An apparatus according to claim 14 , wherein the processor is further configured to: provide the decision tree for detecting the predetermined data, the decision tree comprising a plurality of states, each said state being linked with at least one other state by a respective condition, the arrangement of linked states forming a plurality of paths; and compare the token types of the sequence of tokens to respective conditions in the decision tree to match the sequence of tokens to one or more paths in the tree, wherein the predetermined data can be detected without using an epsilon reduction to take account of at least one said optional token type.