diff --git a/README.md b/README.md index 7cdb83e24..9519b172a 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Subset of R7RS-small. cmake -B build -DCMAKE_BUILD_TYPE=Release cd build make package -sudo apt install build/meevax_0.4.810_amd64.deb +sudo apt install build/meevax_0.4.811_amd64.deb ``` or @@ -106,9 +106,9 @@ sudo rm -rf /usr/local/share/meevax | Target Name | Description |-------------|------------- -| `all` | Build shared-library `libmeevax.0.4.810.so` and executable `meevax` +| `all` | Build shared-library `libmeevax.0.4.811.so` and executable `meevax` | `test` | Test executable `meevax` -| `package` | Generate debian package `meevax_0.4.810_amd64.deb` +| `package` | Generate debian package `meevax_0.4.811_amd64.deb` | `install` | Copy files into `/usr/local` directly ## Usage diff --git a/VERSION b/VERSION index 34e024694..c058011d4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.4.810 +0.4.811 diff --git a/include/meevax/kernel/input_string_port.hpp b/include/meevax/kernel/input_string_port.hpp index 068187703..d44085d21 100644 --- a/include/meevax/kernel/input_string_port.hpp +++ b/include/meevax/kernel/input_string_port.hpp @@ -50,7 +50,7 @@ inline namespace kernel namespace literals { - auto operator ""_read(char const*, std::size_t) -> object; + auto operator ""_r(char const*, std::size_t) -> object; } // namespace literals } // namespace kernel } // namespace meevax diff --git a/script/unicode.sh b/script/unicode.sh index 47dbd9c33..88ab85ce6 100755 --- a/script/unicode.sh +++ b/script/unicode.sh @@ -23,8 +23,8 @@ input="$(git rev-parse --show-toplevel)/configure/UnicodeData.txt" for each in "$@" do case "$each" in - --property ) sed -E 's/^([^;]*);([^;]*;){01}([^;]*).*$/case 0x\1: return \3;/g' "$input" ;; - --digit-value ) sed -E 's/^([^;]*);([^;]*;){06}([^;]*).*$/case 0x\1: return \3;/g' "$input" | grep -e 'case 0x.\+: return .\+;' ;; + --property ) sed -E 's/^([^;]*);([^;]*;){01}([^;]*).*$/case 0x\1: return \3;/g' "$input" ;; + --digit-value ) sed -E 's/^([^;]*);([^;]*;){06}([^;]*).*$/case 0x\1: return \3;/g' "$input" | grep -e 'case 0x.\+: return .\+;' ;; --upcase ) sed -E 's/^([^;]*);([^;]*;){11}([^;]*).*$/case 0x\1: return 0x\3;/g' "$input" | grep -e 'case 0x.\+: return 0x.\+;' ;; --downcase ) sed -E 's/^([^;]*);([^;]*;){12}([^;]*).*$/case 0x\1: return 0x\3;/g' "$input" | grep -e 'case 0x.\+: return 0x.\+;' ;; esac diff --git a/src/kernel/input_string_port.cpp b/src/kernel/input_string_port.cpp index 6b6bad0cb..e4deb5860 100644 --- a/src/kernel/input_string_port.cpp +++ b/src/kernel/input_string_port.cpp @@ -46,7 +46,7 @@ inline namespace kernel namespace literals { - auto operator ""_read(char const* s, std::size_t) -> object + auto operator ""_r(char const* s, std::size_t) -> object { return input_string_port(s).read(); } diff --git a/src/main.cpp b/src/main.cpp index 3db9f8fff..a629f9cb6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,31 +25,31 @@ auto main(int const argc, char const* const* const argv) -> int return with_exception_handler([&]() { - auto interact = [&](auto & environment) + auto interact = [&](environment & e) { - if (environment.configure(argc, argv); environment.interactive) + if (e.configure(argc, argv); e.interactive) { - environment.import("(scheme base)"_read); - environment.import("(scheme case-lambda)"_read); - environment.import("(scheme char)"_read); - environment.import("(scheme complex)"_read); - environment.import("(scheme cxr)"_read); - environment.import("(scheme eval)"_read); - environment.import("(scheme file)"_read); - environment.import("(scheme inexact)"_read); - environment.import("(scheme lazy)"_read); - environment.import("(scheme load)"_read); - environment.import("(scheme process-context)"_read); - environment.import("(scheme read)"_read); - environment.import("(scheme repl)"_read); - environment.import("(scheme time)"_read); - environment.import("(scheme write)"_read); + e.import("(scheme base)"_r); + e.import("(scheme case-lambda)"_r); + e.import("(scheme char)"_r); + e.import("(scheme complex)"_r); + e.import("(scheme cxr)"_r); + e.import("(scheme eval)"_r); + e.import("(scheme file)"_r); + e.import("(scheme inexact)"_r); + e.import("(scheme lazy)"_r); + e.import("(scheme load)"_r); + e.import("(scheme process-context)"_r); + e.import("(scheme read)"_r); + e.import("(scheme repl)"_r); + e.import("(scheme time)"_r); + e.import("(scheme write)"_r); while (standard_input_port().good()) { try { - std::cout << u8"\u03bb> " << environment.evaluate(standard_input_port().read()) << std::endl; + std::cout << u8"\u03bb> " << e.evaluate(standard_input_port().read()) << std::endl; } catch (error const& error) {