Move region/locset S-expr evaluation from python lib to Arbor lib. (#1157)
* Move label and s-expr parsing code and unit tests from Python to arbor C++ library. * Update `locset` and `region` constructors that take string arguments to parse strings as s-expressions or "quoted" labels. * Modify the input stream modifier used to parse asc files to use a lookup table for substitutions, renamed it transmogrifier. * Replace `hopefully` type implemented in python headers with an `arb::util::expected`. * Add `ARBDEV_COLOR` CMake option that forces gcc and clang to always output color output. * Allow arbitrary strings in labels in region and locset expressions. * Add `parse_region_expression` and `parse_locset_expression` functions alongside the existing `parse_label_expression` function for use when a region or locset is expected. These calls will promote a quoted string `"label"` to `(region "label")` or `(locset "label")` respectively. * Ad...
Showing
- CMakeLists.txt 4 additions, 1 deletionCMakeLists.txt
- arbor/CMakeLists.txt 2 additions, 0 deletionsarbor/CMakeLists.txt
- arbor/include/arbor/morph/label_parse.hpp 23 additions, 0 deletionsarbor/include/arbor/morph/label_parse.hpp
- arbor/include/arbor/morph/locset.hpp 1 addition, 1 deletionarbor/include/arbor/morph/locset.hpp
- arbor/include/arbor/morph/region.hpp 1 addition, 1 deletionarbor/include/arbor/morph/region.hpp
- arbor/include/arbor/string_literals.hpp 12 additions, 0 deletionsarbor/include/arbor/string_literals.hpp
- arbor/morph/label_parse.cpp 105 additions, 52 deletionsarbor/morph/label_parse.cpp
- arbor/morph/locset.cpp 11 additions, 7 deletionsarbor/morph/locset.cpp
- arbor/morph/region.cpp 27 additions, 17 deletionsarbor/morph/region.cpp
- arbor/s_expr.cpp 188 additions, 103 deletionsarbor/s_expr.cpp
- arbor/s_expr.hpp 356 additions, 0 deletionsarbor/s_expr.hpp
- cmake/CompilerOptions.cmake 9 additions, 0 deletionscmake/CompilerOptions.cmake
- doc/cable_cell.rst 11 additions, 10 deletionsdoc/cable_cell.rst
- doc/labels.rst 29 additions, 29 deletionsdoc/labels.rst
- doc/mechanisms.rst 4 additions, 4 deletionsdoc/mechanisms.rst
- doc/scripts/gen-labels.py 12 additions, 12 deletionsdoc/scripts/gen-labels.py
- doc/scripts/inputs.py 7 additions, 7 deletionsdoc/scripts/inputs.py
- example/dryrun/branch_cell.hpp 5 additions, 2 deletionsexample/dryrun/branch_cell.hpp
- example/gap_junctions/gap_junctions.cpp 7 additions, 11 deletionsexample/gap_junctions/gap_junctions.cpp
- example/generators/generators.cpp 1 addition, 1 deletionexample/generators/generators.cpp
Please register or sign in to comment