Ingo Ruhnke 4d8096c223 Remove obsolete .appveyor.yml | 6 ماه پیش | |
---|---|---|
benchmarks | 5 سال پیش | |
external | 1 سال پیش | |
include | 3 سال پیش | |
mk | 1 سال پیش | |
pkgconfig | 5 سال پیش | |
src | 1 سال پیش | |
tests | 1 سال پیش | |
.clang-tidy | 4 سال پیش | |
.gitattributes | 2 سال پیش | |
.gitignore | 2 سال پیش | |
.gitmodules | 2 سال پیش | |
CMakeLists.txt | 1 سال پیش | |
LICENSE.txt | 9 سال پیش | |
README.md | 9 سال پیش | |
VERSION | 2 سال پیش | |
flake.lock | 6 ماه پیش | |
flake.nix | 6 ماه پیش | |
logo.png | 9 سال پیش | |
logo.svg | 9 سال پیش | |
sexp-config.cmake.in | 2 سال پیش | |
sexpcpp.nix | 2 سال پیش |
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").