Merge processTag and tokenizeExpression. Also test that the tag expression is trimmed properly.