Ingo Ruhnke 4d8096c223 Remove obsolete .appveyor.yml | 5 mesiacov pred | |
---|---|---|
benchmarks | 5 rokov pred | |
external | 1 rok pred | |
include | 3 rokov pred | |
mk | 1 rok pred | |
pkgconfig | 5 rokov pred | |
src | 1 rok pred | |
tests | 1 rok pred | |
.clang-tidy | 4 rokov pred | |
.gitattributes | 2 rokov pred | |
.gitignore | 2 rokov pred | |
.gitmodules | 2 rokov pred | |
CMakeLists.txt | 1 rok pred | |
LICENSE.txt | 9 rokov pred | |
README.md | 9 rokov pred | |
VERSION | 2 rokov pred | |
flake.lock | 5 mesiacov pred | |
flake.nix | 5 mesiacov pred | |
logo.png | 9 rokov pred | |
logo.svg | 9 rokov pred | |
sexp-config.cmake.in | 2 rokov pred | |
sexpcpp.nix | 2 rokov pred |
SExp is an S-Expression parser for C++.
Example Code:
sexp::Value value = sexp::Parser::from_string("(1 2 3 4 5)")
sexpr::Value const& head = value.get_car();
sexpr::Value const& tail = value.get_cdr();
if (head.is_integer())
{
std::cout << head.as_int() << std::endl;
}
When dealing with large amounts of data the classic Scheme list comes with quite abit of a performance penentaly, for this reason SExp allows you to interpret all list as arrays:
sexp::Parser::from_stream(fin, sexp::Parser::USE_ARRAYS);
If C++ locales are used in your code, compile with:
cmake -DSEXP_USE_LOCALE=ON
Otherwise the input and output functions will produce incorrect results (i.e. "1,5" instead of "1.5").