Make our config parsing less kludgy
If our only configuration types were strings, numbers, booleans, and so forth, our existing configuration parsing mechanism would be nifty. But right now, we do entirely too much with STRING, LINELIST, and worst still LINELIST_V.
We've become decent at implementing some patterns to work around this, but it would be neat to get much better.
So as first steps, I suggest that we:
- Split the parts of the configuration file parsing that handle the abstract bits of config_format_t into their own file.
- Turn config_type_t into an OO thing, so that it's easier to add more.
- Teach the linelist types and the smartlist types to be a bit smarter about what they are lists of, so that every list type doesn't need special handling.
- Make our linelist_v types have an explicit syntax for sections.
- Implement an additional function to handle the common case of a line that has some positional arguments and some k{=v} arguments.