try a fallback mapping parser for special keys

Keys of YAML mappings may contain # characters. These are not
recognized by the regular expressions which try to detect mappings.
Thus, before parsing scalar values, the parser first tries to
evaluate the current line as a mapping. If the lines couldn't be
parsed as a YAML mapping, it'll fall back to the usual scalar
parsing.