1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
# C++ HOCON Parser


This is a port of the TypesafeConfig library to C++.
The library provides C++ support for the [HOCON configuration file format](https://github.com/typesafehub/config/blob/master/HOCON.md).
```
MMMMMMMMMMMMMMMMMMMM
.====================.
MMMMMMMMMMMMMMMMMMMMMM
.MMMMMMMMMMMMMMMMMMMMMM.
===.7MMMIN7NMMMMMMMMM7M=MMMM,===
MMM.7MM: DMMMMM7 :MMM=MMM
MMM.7MM, DMMMMM? ~MMM=MMM
MMM.7MMM~++~?MMMMMMM~++~MMMM=MMM
.MMMMMMMMMMMMMMMMMMMMMM.
MMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMM
MMM HOCON MMM
MMMMMMMMMMMMMMMMMMMMMM
.MMMMMMMMMMMMMMMMMM.
.MMMMMMMMMMMMMMMMMM.
.MMMMMMMMMMMMMMMMMMMMMMMM
. MMMMMMMMMMMMM88MMMMMMMMMM8MM .
7=MMMMMMMM++ A CONFIG FILE ++M8MMMMMM7=
M=MMMMMMMM+ FORMAT DESIGNED +M8MMMMMM7M
M=MMMMMMMM++ FOR HUMANS ++M8MMMMMM7M
=MMMMMMMMMMMMMMMMM88MMMMMMMMMM8MMMMMM7
7MM.88MMMMMMMMMMM88MMMMMMMMMMO88 MM8
7MM MMMMMMMMMMM88MMMMMMMMMM8 MM8
7MM MMMMMMMMMMM88MMMMMMMMMM8 MM8
7MM MMMDMMMM?MM88MM?MMMMOMM8 MM8
```
## Caveats
This is a mostly complete implementation of the HOCON format. It currently has some known limitations
* Include requires the location specifier, i.e. `include "foo"` won't work but `include file("foo")` will. URL is not yet implemented, and classpath won't be supported as it makes less sense outside of the JVM.
* Unicode testing is absent so support is unknown. There are likely things that won't work.
## Build Requirements
* OSX or Linux
* GCC >= 4.8 or Clang >= 3.4 (with libc++)
* CMake >= 3.2.2
* Boost Libraries >= 1.54
* [Leatherman](https://github.com/puppetlabs/leatherman)
## Pre-Build
Prepare the cmake release environment:
$ mkdir release
$ cd release
$ cmake ..
Optionally, also prepare the debug environment:
$ mkdir debug
$ cd debug
$ cmake -DCMAKE_BUILD_TYPE=Debug ..
## Building
1. Enter your build environment of choice, i.e. `cd release` or `cd debug`
2. `make`
3. (optional) install with `make install`
## Testing
Run tests with `make test`.
|