1. A method for parsing structured data comprising the steps of: receiving input data in a first computer language; generating a plurality of tokens according to the input data; building a context by using a grammar syntax comprising a set of rules, the context comprising a plurality of context steps in the form of at least one or more chains of context steps, the step of building the context comprising the sub-steps of: detecting if according to the grammar syntax a token is allowable in the context; and if the token is allowable, creating a new context step corresponding to the token; characterised in that the method comprises the further steps for recovering an unallowable token: identifying a suitable context for the unallowable token in which context the token is allowable; and applying the token in the identified suitable context.