yaml parser, rules parsing