Ingo Ruhnke 4d8096c223 Remove obsolete .appveyor.yml | 5 mēneši atpakaļ | |
---|---|---|
benchmarks | 5 gadi atpakaļ | |
external | 1 gadu atpakaļ | |
include | 3 gadi atpakaļ | |
mk | 1 gadu atpakaļ | |
pkgconfig | 5 gadi atpakaļ | |
src | 1 gadu atpakaļ | |
tests | 1 gadu atpakaļ | |
.clang-tidy | 4 gadi atpakaļ | |
.gitattributes | 2 gadi atpakaļ | |
.gitignore | 2 gadi atpakaļ | |
.gitmodules | 2 gadi atpakaļ | |
CMakeLists.txt | 1 gadu atpakaļ | |
LICENSE.txt | 9 gadi atpakaļ | |
README.md | 9 gadi atpakaļ | |
VERSION | 2 gadi atpakaļ | |
flake.lock | 5 mēneši atpakaļ | |
flake.nix | 5 mēneši atpakaļ | |
logo.png | 9 gadi atpakaļ | |
logo.svg | 9 gadi atpakaļ | |
sexp-config.cmake.in | 2 gadi atpakaļ | |
sexpcpp.nix | 2 gadi atpakaļ |
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").