We have a big mess in config file parsing.
The management API uses ./mgmt/api/GenericParser.* to parse mostly generic key=value syntax, but nothing calls those APIs. We should remove them.
Internally, other files are parsed by hand (each with a different set of bugs) or by using parseConfigLine, which was not really intended for generic parsing and has a kind of crappy interface.
What we need is to nuke all this code and have a single interface for parsing files sanely. The top level parser maps a file and emits a stream of lines. This should support comments, empty line elision and line continuations. Each line should come with a SourceLocation object for error messages. The stream of lines is consumed by a key=value tokenizer that each subsystem digests. This would be broadly similar to the GenericParser stuff.