1. A method of processing a sequence of tokens to detect predetermined data, comprising: receiving the sequence of tokens, wherein each token has at least one token type and the predetermined data has a structure that comprises at least one required token of first predetermined token type and further includes at least one other optional token of a second predetermined token type; and comparing, 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, wherein, if one of the starting state conditions is not met, the predetermined data cannot be detected.