Using LEPL you can define a grammar (that describes how some text is structured) and then generate Python data (lists, dicts, and even trees of objects) from a string formatted according to that grammar.
You can also generate helpful errors when the input does not match the structure expected.
LEPL is intended to be simple and easy to use, but also has some features that may interest advanced users, including multiple results (???parse forests??