The jade lexer (converts a string into an array of tokens)