Updated code. Now expressions like \sinhaqwe are incorrect, we expect a whitespace between operator and terms (if they are chars). So, expressions like \sinh a and \sinh1 are valid.