Ingo Ruhnke 4d8096c223 Remove obsolete .appveyor.yml | 5 hónapja | |
---|---|---|
benchmarks | 5 éve | |
external | 1 éve | |
include | 3 éve | |
mk | 1 éve | |
pkgconfig | 5 éve | |
src | 1 éve | |
tests | 1 éve | |
.clang-tidy | 4 éve | |
.gitattributes | 2 éve | |
.gitignore | 2 éve | |
.gitmodules | 2 éve | |
CMakeLists.txt | 1 éve | |
LICENSE.txt | 9 éve | |
README.md | 9 éve | |
VERSION | 2 éve | |
flake.lock | 5 hónapja | |
flake.nix | 5 hónapja | |
logo.png | 9 éve | |
logo.svg | 9 éve | |
sexp-config.cmake.in | 2 éve | |
sexpcpp.nix | 2 éve |
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").