parse substitutions