OSSP cfg is a ISO-C library for parsing arbitrary C/C++-style configuration files. A configuration is sequence of directives, each directive consists of zero or more tokens, and each token can be either a string or again a complete sequence. This means the configuration syntax has a recursive structure and allows you to create configurations with arbitrarily-nested sections. The configuration syntax also provides complex single/double/balanced quoting of tokens, hexadecimal/octal/decimal character encodings, character escaping, C/C++ and shell-style comments, etc. The library API allows importing of a configuration text into an Abstract Syntax Tree (AST), traversing the AST, and optionally exporting the AST again as a configuration text.
| Tags | Software Development Libraries Operating Systems Text Processing |
|---|---|
| Licenses | MIT/X |
| Operating Systems | POSIX Unix |
| Implementation | C |
Recent releases


Release Notes: The build environment has been upgraded to GNU libtool 1.5.22, GNU shtool 2.0.6, and GNU autoconf 2.60.


Release Notes: The build environment has been upgraded to GNU libtool 1.5.20 and GNU shtool 2.0.3.


Release Notes: A fix was made for "va_list" variable passing in "cfg_fmt_xxx" functions. Autoconf support for va_copy() detection and usage was added. The new GNU Bison 2.0 parser generator is now also accepted in the build environment.


Release Notes: The cfg_node_get() function has been fixed after the recent introduction of LOAN/GIFT/COPY argument passing semantics. This unbreaks the Perl API's unpack() function.


Release Notes: Remaining memory leaks have been plugged by introducing the usual LOAN/GIFT/COPY argument passing semantics. Optional DMalloc build support has been fixed. The fixed-size token buffer in scanner has been replaced with a dynamic buffer to eliminate the old 1024 size limit on tokens. Non-printable characters in derived error messages are escaped.