I'm looking for a data format for text files with hierarchical information. These files will be created primarily by human input (rather than generated by programs), but will be read primarily by programs. The main requirements are:
Very simple and uncluttered syntax. (Example: levels of hierarchy defined by tabs would work fine.) So simple that the whole language description would fit into a page.
Clean and concise mental model. (Example: tree where leaves are values of types int, string, float, bool, and keys are non-leaf nodes. A slightly more complex model, say with dictionaries, is also ok).
A single way to represent any given semantics; i.e., no equivalent syntax with the same meaning.
Preferably easy to parse in a language like python; or stable libraries available for that purpose.
Can allow some kind of inheritance between files. That is, I would like to allow one file to partially override another. Ideally I'd like to even allow multiple inheritance, with the traditional conflicts of order of resolution handled simply by prohibiting any value to be derived from more than one parent.
Does not create any pitfalls for user-entered data (e.g., unquoted text can be a string in YAML, but if it is a reserved word, then it's not).
Is it something that is available off-the-shelf or do I need to build it from scratch?
YAML doesn't work because it doesn't allow inheritance between files, has pitfalls as described above, and has many alternative syntax constructs to do the same thing.
And YAML / XML doesn't work because the description of neither will fit onto anything like one page.
Thank you!