Searching a crate to parse yaml-like grammar

I would like to parse a grammar that uses indentation to mark blocks, but otherwise is a context-free grammar.

I like the approach of pest that allows me to write down a context-free grammar and generates the parser automatically. Does something similar exist for yaml-like grammars? Or is there a trick to achieve the same with pest?

I don't know about a crate, that parses what you want. Whether you search for an existing solution or craft one yourself, you need to state more requirements. What you described is quite ambiguous.

  • What encoding do you work with?
  • Which character(s) (sequence(s)) count as a line break?
  • Which characters count as indentation?
    • If there are multiple, what about mixing indentation characters on the same line or file?
  • Do you need to be able to write the aforementioned characters as part of text?
    • If so, how do you want to escape them?