Parsing a string to extract the following elements: number, identifier, variable, term, expression and assignment