7. A method according to claim 5 , further comprising: using a single path in the tree to detect the predetermined data in the sequence of tokens including the at least one optional token of the second predetermined token type.
5. A method according to claim 1 further comprising: providing the decision tree for detecting the predetermined data, wherein the predetermined data has a structure that comprises a predetermined sequence of token types, at least one token type being optional, wherein the tree comprises a plurality of states, each of said plurality of states being linked with at least one other state by a respective condition, and an arrangement of linked states forms a plurality of paths; and comparing 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 decision tree, wherein a path is provided in the decision tree for the predetermined sequence including the at least one optional token of second predetermined token type and a separate path is provided for the predetermined sequence without the at least one optional token of the second predetermined token type.