The main purpose of predicateWithRawExpression is to return a NSPredicate object. NSPredicate needs to be initialized with a string which should contain a $ for each valid variable, for example: 
"$a > 1 && $b == 2 || $c == $a"

Therefore, predicateWithRawExpression calls a method applyDollarSignForRawExpression to tokenize the string and apply $ to each of the variable as follows:
INPUT: "a > 1 && b == 2 || c == a"
OUTPUT: "$a > 1 && $b == 2 || $c == $a"