Configuration file parser

Kevin Ingwersen ingwie2000 at
Mon Jan 13 00:36:26 PST 2014


I know I asked about that a long time ago. Eversince, I took some google searching and the like, trying to find a non-boost configuration file parser, in a style similar to pkg-config’s pc files. As it looks like that I can not „cleanly“ reuse parser.c/h, as there is no clear documentation, I tried to find other parsers. In fact, I found quite some: config4cpp, yaml-cpp, libconfig and a few more. But none of them allowed me „templating“:

name = libd0
installation: {
	is: $name
	provides: ph7
description: $name is a random thing.

Especially the reusing of variables with $ is quite important.

Therefore, I have a few questions:
- Do you know of any C/C++ configuration parser with „variable support“?
- If not, which functions provide me information from a pc file - aka, how to use parser.c/h?
- If none of both, how hard is it to actually write an own parser?

Kind regards, Ingwie

More information about the pkg-config mailing list