For a YAML-editor project I need a way to spot elements of the parsed structure in the YAML-text and vice versa.
Imagine a YAML file which represents a list at top level. When moving the text cursor (inside the editor I want to create) I want the list element located by the cursor to be specially handled (e.g. displayed in a special way).
And the other way round, by navigating a somehow visualized structure (e.g. a list view) I want to have the cursor of the editor jump to the according position.
So what I think I need is just a normal YAML parser which - additionally to the parsed data structure - provides me with a tree-like positional mapping between the JSON text and the parsed data structure.
Since I'm aiming at an embedded project (using PyQt with pyqtdeploy) the most appreciated approach would be based on plain Python (or even using only standard libraries).