From 8b83b4733d216103f81396ec7c81d4a4f93590be Mon Sep 17 00:00:00 2001 From: overflowerror Date: Thu, 2 May 2024 15:48:42 +0200 Subject: [PATCH] test: Add tests for in-place editing in map loop --- .../test/cases/021c-map-array-modify-ref.in | 7 +++++ .../test/cases/021c-map-array-modify-ref.out | 6 ++++ compiler/test/cases/021d-map-str-print.in | 9 ++++++ compiler/test/cases/021d-map-str-print.out | 31 +++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 compiler/test/cases/021c-map-array-modify-ref.in create mode 100644 compiler/test/cases/021c-map-array-modify-ref.out create mode 100644 compiler/test/cases/021d-map-str-print.in create mode 100644 compiler/test/cases/021d-map-str-print.out diff --git a/compiler/test/cases/021c-map-array-modify-ref.in b/compiler/test/cases/021c-map-array-modify-ref.in new file mode 100644 index 0000000..5fa1c58 --- /dev/null +++ b/compiler/test/cases/021c-map-array-modify-ref.in @@ -0,0 +1,7 @@ +var list = []{'e', 'n', 'n'}; + +map(_, value in list) { + value = (value + 1); +} + +print(list, '\n'); \ No newline at end of file diff --git a/compiler/test/cases/021c-map-array-modify-ref.out b/compiler/test/cases/021c-map-array-modify-ref.out new file mode 100644 index 0000000..df0eef7 --- /dev/null +++ b/compiler/test/cases/021c-map-array-modify-ref.out @@ -0,0 +1,6 @@ +>>>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]<[-<<<+>>>>+<]>[-<+>]<[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]<[-<<+>>>+<]>[-<+>]<[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]<[-<+>>+<]>[-<+>] +<[-]>[-]+>[-]>[-]<<<<<<[->>>>>+>+<<<<<<]>>>>>>[-<<<<<<+>>>>>>]<[-<+>]<<<<<[-]>>>>>[-]<[-<<<<+>>>>>+<]>[-<+>] +<<+>[-]+>[-]>[-]<<<<<[->>>>+>+<<<<<]>>>>>[-<<<<<+>>>>>]<[-<+>]<<<<[-]>>>>[-]<[-<<<+>>>>+<]>[-<+>] +<<+>[-]+>[-]>[-]<<<<[->>>+>+<<<<]>>>>[-<<<<+>>>>]<[-<+>]<<<[-]>>>[-]<[-<<+>>>+<]>[-<+>] +<<+ +[-]++++++++++<<<.>.>.>. diff --git a/compiler/test/cases/021d-map-str-print.in b/compiler/test/cases/021d-map-str-print.in new file mode 100644 index 0000000..7ba90f2 --- /dev/null +++ b/compiler/test/cases/021d-map-str-print.in @@ -0,0 +1,9 @@ +var s = "hello, world!\n"; + +map(_, c in s) { + if ((c >= 'a') && (c <= 'z')) { + c = ((c - 'a') + 'A'); + } +} + +print(s); \ No newline at end of file diff --git a/compiler/test/cases/021d-map-str-print.out b/compiler/test/cases/021d-map-str-print.out new file mode 100644 index 0000000..7840c27 --- /dev/null +++ b/compiler/test/cases/021d-map-str-print.out @@ -0,0 +1,31 @@ +[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]++++++++++++++++++++++++++++++++++++++++++++>[-]++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]+++++++++++++++++++++++++++++++++>[-]++++++++++ +>[-]>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<<<<<<<[->>>>>>>>>>>>>>>>+>+<<<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<<<<<<<<<<<<<<[->>>>>>>>>>>>>>>>+>>+<<<<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<<<<<<<<[->>>>>>>>>>>>>>>>>+>+<<<<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<<<<<<<<<<<<<<[-]>>>>>>>>>>>>>>>>[-]>[-<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>+>]<[->+<] +<[-]] +<+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<<<<<<[->>>>>>>>>>>>>>>+>+<<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<<<<<<<<<<<<<[->>>>>>>>>>>>>>>+>>+<<<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<<<<<<<[->>>>>>>>>>>>>>>>+>+<<<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<<<<<<<<<<<<<[-]>>>>>>>>>>>>>>>[-]>[-<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>+>]<[->+<] +<[-]] +<+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<<<<<[->>>>>>>>>>>>>>+>+<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<<<<<<<<<<<<[->>>>>>>>>>>>>>+>>+<<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<<<<<<[->>>>>>>>>>>>>>>+>+<<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<<<<<<<<<<<<[-]>>>>>>>>>>>>>>[-]>[-<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>+>]<[->+<] +<[-]] +<+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<<<<[->>>>>>>>>>>>>+>+<<<<<<<<<<<<<<]>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<+>>>>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<<<<<<<<<<<[->>>>>>>>>>>>>+>>+<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<<<<<[->>>>>>>>>>>>>>+>+<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<<<<<<<<<<<[-]>>>>>>>>>>>>>[-]>[-<<<<<<<<<<<<<<+>>>>>>>>>>>>>+>]<[->+<] +<[-]] +<+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<<<[->>>>>>>>>>>>+>+<<<<<<<<<<<<<]>>>>>>>>>>>>>[-<<<<<<<<<<<<<+>>>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<<<<<<<<<<[->>>>>>>>>>>>+>>+<<<<<<<<<<<<<<]>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<+>>>>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<<<<[->>>>>>>>>>>>>+>+<<<<<<<<<<<<<<]>>>>>>>>>>>>>>[-<<<<<<<<<<<<<<+>>>>>>>>>>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<<<<<<<<<<[-]>>>>>>>>>>>>[-]>[-<<<<<<<<<<<<<+>>>>>>>>>>>>+>]<[->+<] +<[-]] +<+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<<[->>>>>>>>>>>+>+<<<<<<<<<<<<]>>>>>>>>>>>>[-<<<<<<<<<<<<+>>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<<<<<<<<<[->>>>>>>>>>>+>>+<<<<<<<<<<<<<]>>>>>>>>>>>>>[-<<<<<<<<<<<<<+>>>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<<<[->>>>>>>>>>>>+>+<<<<<<<<<<<<<]>>>>>>>>>>>>>[-<<<<<<<<<<<<<+>>>>>>>>>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<<<<<<<<<[-]>>>>>>>>>>>[-]>[-<<<<<<<<<<<<+>>>>>>>>>>>+>]<[->+<] +<[-]] +<+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<[->>>>>>>>>>+>+<<<<<<<<<<<]>>>>>>>>>>>[-<<<<<<<<<<<+>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<<<<<<<<[->>>>>>>>>>+>>+<<<<<<<<<<<<]>>>>>>>>>>>>[-<<<<<<<<<<<<+>>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<<[->>>>>>>>>>>+>+<<<<<<<<<<<<]>>>>>>>>>>>>[-<<<<<<<<<<<<+>>>>>>>>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<<<<<<<<[-]>>>>>>>>>>[-]>[-<<<<<<<<<<<+>>>>>>>>>>+>]<[->+<] +<[-]] +<+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<[->>>>>>>>>+>+<<<<<<<<<<]>>>>>>>>>>[-<<<<<<<<<<+>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<<<<<<<[->>>>>>>>>+>>+<<<<<<<<<<<]>>>>>>>>>>>[-<<<<<<<<<<<+>>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<<[->>>>>>>>>>+>+<<<<<<<<<<<]>>>>>>>>>>>[-<<<<<<<<<<<+>>>>>>>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<<<<<<<[-]>>>>>>>>>[-]>[-<<<<<<<<<<+>>>>>>>>>+>]<[->+<] +<[-]] +<+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<[->>>>>>>>+>+<<<<<<<<<]>>>>>>>>>[-<<<<<<<<<+>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<<<<<<[->>>>>>>>+>>+<<<<<<<<<<]>>>>>>>>>>[-<<<<<<<<<<+>>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<<[->>>>>>>>>+>+<<<<<<<<<<]>>>>>>>>>>[-<<<<<<<<<<+>>>>>>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<<<<<<[-]>>>>>>>>[-]>[-<<<<<<<<<+>>>>>>>>+>]<[->+<] +<[-]] +<+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<[->>>>>>>+>+<<<<<<<<]>>>>>>>>[-<<<<<<<<+>>>>>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<<<<<[->>>>>>>+>>+<<<<<<<<<]>>>>>>>>>[-<<<<<<<<<+>>>>>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<<[->>>>>>>>+>+<<<<<<<<<]>>>>>>>>>[-<<<<<<<<<+>>>>>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<<<<<[-]>>>>>>>[-]>[-<<<<<<<<+>>>>>>>+>]<[->+<] +<[-]] +<+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<[->>>>>>+>+<<<<<<<]>>>>>>>[-<<<<<<<+>>>>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<<<<[->>>>>>+>>+<<<<<<<<]>>>>>>>>[-<<<<<<<<+>>>>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<<[->>>>>>>+>+<<<<<<<<]>>>>>>>>[-<<<<<<<<+>>>>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<<<<[-]>>>>>>[-]>[-<<<<<<<+>>>>>>+>]<[->+<] +<[-]] +<+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<[->>>>>+>+<<<<<<]>>>>>>[-<<<<<<+>>>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<<<[->>>>>+>>+<<<<<<<]>>>>>>>[-<<<<<<<+>>>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<<[->>>>>>+>+<<<<<<<]>>>>>>>[-<<<<<<<+>>>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<<<[-]>>>>>[-]>[-<<<<<<+>>>>>+>]<[->+<] +<[-]] +<+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<[->>>>+>+<<<<<]>>>>>[-<<<<<+>>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<<[->>>>+>>+<<<<<<]>>>>>>[-<<<<<<+>>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<<[->>>>>+>+<<<<<<]>>>>>>[-<<<<<<+>>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<<[-]>>>>[-]>[-<<<<<+>>>>+>]<[->+<] +<[-]] +<+>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<[->>>+>+<<<<]>>>>[-<<<<+>>>>][-]+<<[->>>>[-]+<[-]<<[>>+>[-]<<<-]>>[<<+>>-]<<->>>[<<[-]<<[-]>>>>-]<<<<][-]++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>>[-]<<<<<[->>>+>>+<<<<<]>>>>>[-<<<<<+>>>>>][-]+<<[->>>>[-]+<[-]<<<<[>>>>+>[-]<<<<<-]>>>>[<<<<+>>>>-]<<<<->>>>>[<<[-]<<[-]>>>>-]<<<<]<[-]>>[>[<<<+>>>[-]]<[-]]<<[>[-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>[-]>[-]<<<<<[->>>>+>+<<<<<]>>>>>[-<<<<<+>>>>>]<<[->-<][-]+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[->+<]<<<[-]>>>[-]>[-<<<<+>>>+>]<[->+<] +<[-]] +<+ +<<<<<<<<<<<<<<.>.>.>.>.>.>.>.>.>.>.>.>.>.