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