1. A computer implemented method for extracting and analyzing a structure from a data stream received in a processor, the method comprising: receiving the data stream in the processor, the data stream having a first part and a second part, wherein the data stream includes a plurality of tokens, each of the tokens having an end of character, and the data stream having an end of string; defining a first, second, third and fourth cache, coupled to the processor; for each of the plurality of tokens of the first part of the data stream, until the end of string is read: reading the token; determining if the token is part of the structure; in response to the token being part of the structure, writing the token to the second cache, writing the end of character to the first cache; while the token is not the end of character in the second part of the data stream: reading the token from the first cache; writing the token to the third and fourth caches; if the contents of the third cache is the structure, writing the structure to the forth cache; in response to the token not being part of the structure, writing the token to the first and second caches; while the token in the second cache is not the end of string; reading the token from the second cache; reading the token from the fourth cache; if neither the token from the forth cache is not equal to the token from the second cache or equal to the end of character, outputting the token from the fourth cache and reading the token from the fourth cache; and outputting the token from the second cache; and merging the tokens in the second and fourth caches to identify the structure, wherein the data stream is processed in at least one of a single threaded mode and a multi-threaded mode, wherein in the single threaded mode, each data stream is an object that responds to a READ request by immediately either returning a “data source empty” condition or removing from the object and returning to a requester a next token, wherein the next token can be at least one of a specified number of characters and a next specified fixed number of strings of characters terminated by a white space, wherein, in the single threaded mode, the read token performs at least one of returning immediately with a condition that a data source is empty, and removing one token from the data source and returning with the removed token; wherein in the multi-threaded mode, the data stream responds to the READ request by waiting until the data stream has a next token and then removing the next token from the data stream and returning the next token to the requester wherein the multiple operators in the multi-threaded mode make calls via signals and synchronize via special tokens independent of the data stream and via the READ request that waits indefinitely for the data stream, wherein, in the multithreaded mode, the end of string, not present in the data stream, is added to the end of a string in the data stream and tokens are read until a character in the string is the end of string, wherein, in the multithreaded mode, if the token is present in a dictionary, the end of character not present in the data stream is added at an end of each character in the string, and characters are read while each character in the string is not the end of character, and wherein the end of character is passed to a next character, and if the token is not present in the dictionary, the token is passed to a next operator without the end of character, wherein the end of character is continuously passed to a next token in response to the token being present in the dictionary.