// Lean compiler output // Module: init.lean.parser.string_literal // Imports: init.lean.parser.parsec #include "runtime/object.h" #include "runtime/apply.h" typedef lean::object obj; typedef lean::usize usize; typedef lean::uint8 uint8; typedef lean::uint16 uint16; typedef lean::uint32 uint32; typedef lean::uint64 uint64; #if defined(__clang__) #pragma clang diagnostic ignored "-Wunused-parameter" #pragma clang diagnostic ignored "-Wunused-label" #elif defined(__GNUC__) && !defined(__CLANG__) #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif obj* l_lean_parser_parse__hex__digit___rarg___lambda__5___closed__1; obj* l_lean_parser_parse__hex__digit___rarg___lambda__3___closed__1; obj* l_lean_parser_parse__string__literal__aux___main___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__quoted__char___rarg___lambda__4(obj*, obj*, obj*, obj*); namespace lean { obj* nat_add(obj*, obj*); } obj* l_lean_parser_parse__quoted__char___rarg___lambda__7___closed__1; extern obj* l_mjoin___rarg___closed__1; obj* l_lean_parser_parse__hex__digit___rarg___lambda__1___boxed(obj*, obj*); obj* l_lean_parser_monad__parsec_digit___rarg(obj*, obj*); obj* l_lean_parser_parse__hex__digit___rarg___lambda__3(obj*, uint32); obj* l_lean_parser_parse__string__literal___boxed(obj*, obj*); obj* l_lean_parser_parse__hex__digit___rarg___closed__1; obj* l_lean_parser_parse__hex__digit___rarg(obj*, obj*, obj*); obj* l_lean_parser_parse__quoted__char___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__quoted__char___rarg___lambda__7(obj*, obj*, obj*, obj*, obj*, uint32); uint32 l_char_of__nat(obj*); extern obj* l_lean_parser_monad__parsec_eoi__error___rarg___closed__1; obj* l_lean_parser_parse__hex__digit___rarg___lambda__2(obj*, obj*, obj*); obj* l_lean_parser_parse__string__literal__aux(obj*, obj*); obj* l_lean_parser_parse__quoted__char___boxed(obj*, obj*); obj* l_lean_parser_parse__quoted__char___rarg___lambda__6(obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__quoted__char___rarg___lambda__7___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__hex__digit___rarg___lambda__3___boxed(obj*, obj*); obj* l_lean_parser_parse__hex__digit___rarg___lambda__1(obj*, uint32); namespace lean { obj* string_append(obj*, obj*); } obj* l_lean_parser_monad__parsec_error___rarg(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__string__literal(obj*, obj*); obj* l_lean_parser_parse__string__literal___rarg___lambda__1(obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__string__literal___rarg(obj*, obj*, obj*); obj* l_lean_parser_monad__parsec_any___rarg(obj*, obj*); obj* l_lean_parser_parse__hex__digit___rarg___lambda__5___boxed(obj*, obj*); obj* l_lean_parser_monad__parsec_unexpected__at___rarg(obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__hex__digit___rarg___lambda__5(obj*, uint32); obj* l_lean_parser_parse__string__literal__aux___main___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*, uint32); extern obj* l___private_init_data_string_basic_9__to__nat__core___main___closed__1; namespace lean { uint8 nat_dec_eq(obj*, obj*); } extern obj* l_char_has__repr___closed__1; obj* l_lean_parser_monad__parsec_labels___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__string__literal___rarg___lambda__2___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__hex__digit(obj*, obj*); extern obj* l_lean_parser_monad__parsec_left__over___rarg___closed__1; obj* l_lean_parser_parse__string__literal__aux___main___boxed(obj*, obj*); namespace lean { obj* uint32_to_nat(uint32); } obj* l_lean_parser_parse__hex__digit___rarg___lambda__4(obj*, obj*, obj*); obj* l_lean_parser_parse__quoted__char___rarg___lambda__5(obj*, obj*, obj*); obj* l_lean_parser_parse__string__literal__aux___main___rarg___lambda__2(obj*, obj*, obj*, obj*, obj*, obj*, uint32); obj* l_lean_parser_parse__string__literal__aux___main___rarg___boxed(obj*, obj*, obj*, obj*, obj*); extern obj* l_lean_parser_monad__parsec_remaining___rarg___closed__1; obj* l_lean_parser_parse__string__literal__aux___rarg___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_lean_parser_monad__parsec_satisfy___rarg___lambda__1___boxed(obj*, obj*, obj*); obj* l_lean_parser_parse__string__literal___rarg___lambda__2(obj*, obj*, obj*, obj*, uint32); obj* l_lean_parser_parse__quoted__char___rarg___lambda__2(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__quoted__char(obj*, obj*); obj* l_lean_parser_parse__hex__digit___boxed(obj*, obj*); obj* l_lean_parser_parse__string__literal__aux___main___rarg___lambda__2___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); uint32 l_string_iterator_curr___main(obj*); obj* l_lean_parser_parse__string__literal__aux___main(obj*, obj*); uint8 l_string_iterator_has__next___main(obj*); obj* l_lean_parser_monad__parsec_ch___rarg(obj*, obj*, uint32); namespace lean { uint32 uint32_of_nat(obj*); } namespace lean { obj* nat_mul(obj*, obj*); } obj* l_lean_parser_parse__quoted__char___rarg___lambda__3(obj*, obj*, obj*, obj*, obj*); namespace lean { obj* nat_sub(obj*, obj*); } obj* l_lean_parser_parse__quoted__char___rarg___lambda__8(obj*, obj*, obj*, obj*, obj*); namespace lean { obj* string_push(obj*, uint32); } obj* l_dlist_singleton___rarg(obj*, obj*); obj* l_lean_parser_parse__string__literal__aux___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__string__literal__aux___boxed(obj*, obj*); obj* l_lean_parser_parse__string__literal__aux___main___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__quoted__char___rarg(obj*, obj*, obj*); obj* l_lean_parser_parse__string__literal___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__quoted__char___rarg___lambda__5___boxed(obj*, obj*, obj*); obj* l_char_quote__core(uint32); obj* l_lean_parser_parse__quoted__char___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*); obj* l_lean_parser_parse__hex__digit___rarg___lambda__1(obj* x_0, uint32 x_1) { _start: { obj* x_2; obj* x_5; obj* x_8; obj* x_9; obj* x_10; obj* x_12; x_2 = lean::cnstr_get(x_0, 0); lean::inc(x_2); lean::dec(x_0); x_5 = lean::cnstr_get(x_2, 1); lean::inc(x_5); lean::dec(x_2); x_8 = lean::uint32_to_nat(x_1); x_9 = l___private_init_data_string_basic_9__to__nat__core___main___closed__1; x_10 = lean::nat_sub(x_8, x_9); lean::dec(x_8); x_12 = lean::apply_2(x_5, lean::box(0), x_10); return x_12; } } obj* l_lean_parser_parse__hex__digit___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2) { _start: { uint8 x_3; x_3 = l_string_iterator_has__next___main(x_2); if (x_3 == 0) { obj* x_6; obj* x_7; obj* x_8; obj* x_9; lean::dec(x_1); lean::dec(x_2); x_6 = lean::box(0); x_7 = l_lean_parser_monad__parsec_eoi__error___rarg___closed__1; x_8 = l_mjoin___rarg___closed__1; x_9 = l_lean_parser_monad__parsec_error___rarg(x_0, lean::box(0), x_7, x_8, x_6, x_6); return x_9; } else { uint32 x_10; uint32 x_11; uint8 x_12; x_10 = l_string_iterator_curr___main(x_2); x_11 = 97; x_12 = x_11 <= x_10; if (x_12 == 0) { obj* x_15; obj* x_16; obj* x_17; obj* x_19; obj* x_20; obj* x_21; obj* x_22; lean::dec(x_1); lean::dec(x_2); x_15 = l_char_quote__core(x_10); x_16 = l_char_has__repr___closed__1; x_17 = lean::string_append(x_16, x_15); lean::dec(x_15); x_19 = lean::string_append(x_17, x_16); x_20 = lean::box(0); x_21 = l_mjoin___rarg___closed__1; x_22 = l_lean_parser_monad__parsec_error___rarg(x_0, lean::box(0), x_19, x_21, x_20, x_20); return x_22; } else { uint32 x_23; uint8 x_24; x_23 = 102; x_24 = x_10 <= x_23; if (x_24 == 0) { obj* x_27; obj* x_28; obj* x_29; obj* x_31; obj* x_32; obj* x_33; obj* x_34; lean::dec(x_1); lean::dec(x_2); x_27 = l_char_quote__core(x_10); x_28 = l_char_has__repr___closed__1; x_29 = lean::string_append(x_28, x_27); lean::dec(x_27); x_31 = lean::string_append(x_29, x_28); x_32 = lean::box(0); x_33 = l_mjoin___rarg___closed__1; x_34 = l_lean_parser_monad__parsec_error___rarg(x_0, lean::box(0), x_31, x_33, x_32, x_32); return x_34; } else { obj* x_36; obj* x_37; obj* x_38; lean::dec(x_0); x_36 = lean::box_uint32(x_10); x_37 = lean::alloc_closure(reinterpret_cast(l_lean_parser_monad__parsec_satisfy___rarg___lambda__1___boxed), 3, 2); lean::closure_set(x_37, 0, x_2); lean::closure_set(x_37, 1, x_36); x_38 = lean::apply_2(x_1, lean::box(0), x_37); return x_38; } } } } } obj* _init_l_lean_parser_parse__hex__digit___rarg___lambda__3___closed__1() { _start: { uint32 x_0; obj* x_1; x_0 = 97; x_1 = lean::uint32_to_nat(x_0); return x_1; } } obj* l_lean_parser_parse__hex__digit___rarg___lambda__3(obj* x_0, uint32 x_1) { _start: { obj* x_2; obj* x_5; obj* x_8; obj* x_9; obj* x_10; obj* x_12; obj* x_13; obj* x_15; x_2 = lean::cnstr_get(x_0, 0); lean::inc(x_2); lean::dec(x_0); x_5 = lean::cnstr_get(x_2, 1); lean::inc(x_5); lean::dec(x_2); x_8 = lean::uint32_to_nat(x_1); x_9 = l_lean_parser_parse__hex__digit___rarg___lambda__3___closed__1; x_10 = lean::nat_sub(x_8, x_9); lean::dec(x_8); x_12 = lean::mk_nat_obj(10u); x_13 = lean::nat_add(x_12, x_10); lean::dec(x_10); x_15 = lean::apply_2(x_5, lean::box(0), x_13); return x_15; } } obj* l_lean_parser_parse__hex__digit___rarg___lambda__4(obj* x_0, obj* x_1, obj* x_2) { _start: { uint8 x_3; x_3 = l_string_iterator_has__next___main(x_2); if (x_3 == 0) { obj* x_6; obj* x_7; obj* x_8; obj* x_9; lean::dec(x_1); lean::dec(x_2); x_6 = lean::box(0); x_7 = l_lean_parser_monad__parsec_eoi__error___rarg___closed__1; x_8 = l_mjoin___rarg___closed__1; x_9 = l_lean_parser_monad__parsec_error___rarg(x_0, lean::box(0), x_7, x_8, x_6, x_6); return x_9; } else { uint32 x_10; uint32 x_11; uint8 x_12; x_10 = l_string_iterator_curr___main(x_2); x_11 = 65; x_12 = x_11 <= x_10; if (x_12 == 0) { obj* x_15; obj* x_16; obj* x_17; obj* x_19; obj* x_20; obj* x_21; obj* x_22; lean::dec(x_1); lean::dec(x_2); x_15 = l_char_quote__core(x_10); x_16 = l_char_has__repr___closed__1; x_17 = lean::string_append(x_16, x_15); lean::dec(x_15); x_19 = lean::string_append(x_17, x_16); x_20 = lean::box(0); x_21 = l_mjoin___rarg___closed__1; x_22 = l_lean_parser_monad__parsec_error___rarg(x_0, lean::box(0), x_19, x_21, x_20, x_20); return x_22; } else { uint32 x_23; uint8 x_24; x_23 = 70; x_24 = x_10 <= x_23; if (x_24 == 0) { obj* x_27; obj* x_28; obj* x_29; obj* x_31; obj* x_32; obj* x_33; obj* x_34; lean::dec(x_1); lean::dec(x_2); x_27 = l_char_quote__core(x_10); x_28 = l_char_has__repr___closed__1; x_29 = lean::string_append(x_28, x_27); lean::dec(x_27); x_31 = lean::string_append(x_29, x_28); x_32 = lean::box(0); x_33 = l_mjoin___rarg___closed__1; x_34 = l_lean_parser_monad__parsec_error___rarg(x_0, lean::box(0), x_31, x_33, x_32, x_32); return x_34; } else { obj* x_36; obj* x_37; obj* x_38; lean::dec(x_0); x_36 = lean::box_uint32(x_10); x_37 = lean::alloc_closure(reinterpret_cast(l_lean_parser_monad__parsec_satisfy___rarg___lambda__1___boxed), 3, 2); lean::closure_set(x_37, 0, x_2); lean::closure_set(x_37, 1, x_36); x_38 = lean::apply_2(x_1, lean::box(0), x_37); return x_38; } } } } } obj* _init_l_lean_parser_parse__hex__digit___rarg___lambda__5___closed__1() { _start: { uint32 x_0; obj* x_1; x_0 = 65; x_1 = lean::uint32_to_nat(x_0); return x_1; } } obj* l_lean_parser_parse__hex__digit___rarg___lambda__5(obj* x_0, uint32 x_1) { _start: { obj* x_2; obj* x_5; obj* x_8; obj* x_9; obj* x_10; obj* x_12; obj* x_13; obj* x_15; x_2 = lean::cnstr_get(x_0, 0); lean::inc(x_2); lean::dec(x_0); x_5 = lean::cnstr_get(x_2, 1); lean::inc(x_5); lean::dec(x_2); x_8 = lean::uint32_to_nat(x_1); x_9 = l_lean_parser_parse__hex__digit___rarg___lambda__5___closed__1; x_10 = lean::nat_sub(x_8, x_9); lean::dec(x_8); x_12 = lean::mk_nat_obj(10u); x_13 = lean::nat_add(x_12, x_10); lean::dec(x_10); x_15 = lean::apply_2(x_5, lean::box(0), x_13); return x_15; } } obj* _init_l_lean_parser_parse__hex__digit___rarg___closed__1() { _start: { obj* x_0; obj* x_1; obj* x_2; x_0 = lean::mk_string("hexadecimal"); x_1 = lean::alloc_closure(reinterpret_cast(l_dlist_singleton___rarg), 2, 1); lean::closure_set(x_1, 0, x_0); x_2 = lean::alloc_closure(reinterpret_cast(l_lean_parser_monad__parsec_labels___rarg___lambda__1___boxed), 6, 1); lean::closure_set(x_2, 0, x_1); return x_2; } } obj* l_lean_parser_parse__hex__digit___rarg(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; obj* x_5; obj* x_8; obj* x_10; obj* x_12; obj* x_13; obj* x_15; obj* x_17; obj* x_20; obj* x_23; obj* x_25; obj* x_27; obj* x_29; obj* x_31; obj* x_32; obj* x_33; obj* x_35; obj* x_36; obj* x_37; obj* x_40; obj* x_41; x_3 = lean::cnstr_get(x_2, 1); lean::inc(x_3); x_5 = lean::cnstr_get(x_0, 1); lean::inc(x_5); lean::inc(x_1); x_8 = l_lean_parser_monad__parsec_digit___rarg(x_0, x_1); lean::inc(x_2); x_10 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__hex__digit___rarg___lambda__1___boxed), 2, 1); lean::closure_set(x_10, 0, x_2); lean::inc(x_5); x_12 = lean::apply_4(x_5, lean::box(0), lean::box(0), x_8, x_10); x_13 = lean::cnstr_get(x_1, 0); lean::inc(x_13); x_15 = l_lean_parser_monad__parsec_left__over___rarg___closed__1; lean::inc(x_13); x_17 = lean::apply_2(x_13, lean::box(0), x_15); lean::inc(x_13); lean::inc(x_1); x_20 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__hex__digit___rarg___lambda__2), 3, 2); lean::closure_set(x_20, 0, x_1); lean::closure_set(x_20, 1, x_13); lean::inc(x_17); lean::inc(x_5); x_23 = lean::apply_4(x_5, lean::box(0), lean::box(0), x_17, x_20); lean::inc(x_2); x_25 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__hex__digit___rarg___lambda__3___boxed), 2, 1); lean::closure_set(x_25, 0, x_2); lean::inc(x_5); x_27 = lean::apply_4(x_5, lean::box(0), lean::box(0), x_23, x_25); lean::inc(x_1); x_29 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__hex__digit___rarg___lambda__4), 3, 2); lean::closure_set(x_29, 0, x_1); lean::closure_set(x_29, 1, x_13); lean::inc(x_5); x_31 = lean::apply_4(x_5, lean::box(0), lean::box(0), x_17, x_29); x_32 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__hex__digit___rarg___lambda__5___boxed), 2, 1); lean::closure_set(x_32, 0, x_2); x_33 = lean::apply_4(x_5, lean::box(0), lean::box(0), x_31, x_32); lean::inc(x_3); x_35 = lean::apply_3(x_3, lean::box(0), x_27, x_33); x_36 = lean::apply_3(x_3, lean::box(0), x_12, x_35); x_37 = lean::cnstr_get(x_1, 1); lean::inc(x_37); lean::dec(x_1); x_40 = l_lean_parser_parse__hex__digit___rarg___closed__1; x_41 = lean::apply_3(x_37, lean::box(0), x_40, x_36); return x_41; } } obj* l_lean_parser_parse__hex__digit(obj* x_0, obj* x_1) { _start: { obj* x_2; x_2 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__hex__digit___rarg), 3, 0); return x_2; } } obj* l_lean_parser_parse__hex__digit___rarg___lambda__1___boxed(obj* x_0, obj* x_1) { _start: { uint32 x_2; obj* x_3; x_2 = lean::unbox_uint32(x_1); x_3 = l_lean_parser_parse__hex__digit___rarg___lambda__1(x_0, x_2); return x_3; } } obj* l_lean_parser_parse__hex__digit___rarg___lambda__3___boxed(obj* x_0, obj* x_1) { _start: { uint32 x_2; obj* x_3; x_2 = lean::unbox_uint32(x_1); x_3 = l_lean_parser_parse__hex__digit___rarg___lambda__3(x_0, x_2); return x_3; } } obj* l_lean_parser_parse__hex__digit___rarg___lambda__5___boxed(obj* x_0, obj* x_1) { _start: { uint32 x_2; obj* x_3; x_2 = lean::unbox_uint32(x_1); x_3 = l_lean_parser_parse__hex__digit___rarg___lambda__5(x_0, x_2); return x_3; } } obj* l_lean_parser_parse__hex__digit___boxed(obj* x_0, obj* x_1) { _start: { obj* x_2; x_2 = l_lean_parser_parse__hex__digit(x_0, x_1); lean::dec(x_0); lean::dec(x_1); return x_2; } } obj* l_lean_parser_parse__quoted__char___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; obj* x_8; obj* x_11; obj* x_12; obj* x_13; obj* x_15; obj* x_17; obj* x_19; obj* x_21; uint32 x_23; obj* x_25; obj* x_26; x_5 = lean::cnstr_get(x_0, 0); lean::inc(x_5); lean::dec(x_0); x_8 = lean::cnstr_get(x_5, 1); lean::inc(x_8); lean::dec(x_5); x_11 = lean::mk_nat_obj(16u); x_12 = lean::nat_mul(x_11, x_1); x_13 = lean::nat_add(x_12, x_2); lean::dec(x_12); x_15 = lean::nat_mul(x_11, x_13); lean::dec(x_13); x_17 = lean::nat_add(x_15, x_3); lean::dec(x_15); x_19 = lean::nat_mul(x_11, x_17); lean::dec(x_17); x_21 = lean::nat_add(x_19, x_4); lean::dec(x_19); x_23 = l_char_of__nat(x_21); lean::dec(x_21); x_25 = lean::box_uint32(x_23); x_26 = lean::apply_2(x_8, lean::box(0), x_25); return x_26; } } obj* l_lean_parser_parse__quoted__char___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { obj* x_6; obj* x_7; x_6 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__quoted__char___rarg___lambda__1___boxed), 5, 4); lean::closure_set(x_6, 0, x_0); lean::closure_set(x_6, 1, x_1); lean::closure_set(x_6, 2, x_2); lean::closure_set(x_6, 3, x_5); x_7 = lean::apply_4(x_3, lean::box(0), lean::box(0), x_4, x_6); return x_7; } } obj* l_lean_parser_parse__quoted__char___rarg___lambda__3(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_7; obj* x_8; lean::inc(x_3); lean::inc(x_2); x_7 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__quoted__char___rarg___lambda__2), 6, 5); lean::closure_set(x_7, 0, x_0); lean::closure_set(x_7, 1, x_1); lean::closure_set(x_7, 2, x_4); lean::closure_set(x_7, 3, x_2); lean::closure_set(x_7, 4, x_3); x_8 = lean::apply_4(x_2, lean::box(0), lean::box(0), x_3, x_7); return x_8; } } obj* l_lean_parser_parse__quoted__char___rarg___lambda__4(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_6; obj* x_7; lean::inc(x_2); lean::inc(x_1); x_6 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__quoted__char___rarg___lambda__3), 5, 4); lean::closure_set(x_6, 0, x_0); lean::closure_set(x_6, 1, x_3); lean::closure_set(x_6, 2, x_1); lean::closure_set(x_6, 3, x_2); x_7 = lean::apply_4(x_1, lean::box(0), lean::box(0), x_2, x_6); return x_7; } } obj* l_lean_parser_parse__quoted__char___rarg___lambda__5(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; obj* x_6; obj* x_9; obj* x_10; obj* x_11; uint32 x_13; obj* x_15; obj* x_16; x_3 = lean::cnstr_get(x_0, 0); lean::inc(x_3); lean::dec(x_0); x_6 = lean::cnstr_get(x_3, 1); lean::inc(x_6); lean::dec(x_3); x_9 = lean::mk_nat_obj(16u); x_10 = lean::nat_mul(x_9, x_1); x_11 = lean::nat_add(x_10, x_2); lean::dec(x_10); x_13 = l_char_of__nat(x_11); lean::dec(x_11); x_15 = lean::box_uint32(x_13); x_16 = lean::apply_2(x_6, lean::box(0), x_15); return x_16; } } obj* l_lean_parser_parse__quoted__char___rarg___lambda__6(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; obj* x_5; x_4 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__quoted__char___rarg___lambda__5___boxed), 3, 2); lean::closure_set(x_4, 0, x_0); lean::closure_set(x_4, 1, x_3); x_5 = lean::apply_4(x_1, lean::box(0), lean::box(0), x_2, x_4); return x_5; } } obj* _init_l_lean_parser_parse__quoted__char___rarg___lambda__7___closed__1() { _start: { obj* x_0; x_0 = lean::mk_string("quoted character"); return x_0; } } obj* l_lean_parser_parse__quoted__char___rarg___lambda__7(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, uint32 x_5) { _start: { uint32 x_6; uint8 x_7; x_6 = 92; x_7 = x_5 == x_6; if (x_7 == 0) { uint32 x_8; uint8 x_9; x_8 = 34; x_9 = x_5 == x_8; if (x_9 == 0) { uint32 x_10; uint8 x_11; x_10 = 39; x_11 = x_5 == x_10; if (x_11 == 0) { uint32 x_12; uint8 x_13; x_12 = 110; x_13 = x_5 == x_12; if (x_13 == 0) { uint32 x_14; uint8 x_15; x_14 = 116; x_15 = x_5 == x_14; if (x_15 == 0) { uint32 x_16; uint8 x_17; x_16 = 120; x_17 = x_5 == x_16; if (x_17 == 0) { uint32 x_18; uint8 x_19; x_18 = 117; x_19 = x_5 == x_18; if (x_19 == 0) { obj* x_23; obj* x_24; lean::dec(x_4); lean::dec(x_3); lean::dec(x_2); x_23 = l_lean_parser_parse__quoted__char___rarg___lambda__7___closed__1; x_24 = l_lean_parser_monad__parsec_unexpected__at___rarg(x_0, lean::box(0), x_23, x_1); return x_24; } else { obj* x_27; obj* x_30; obj* x_31; lean::dec(x_1); lean::inc(x_3); x_27 = l_lean_parser_parse__hex__digit___rarg(x_2, x_0, x_3); lean::inc(x_27); lean::inc(x_4); x_30 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__quoted__char___rarg___lambda__4), 4, 3); lean::closure_set(x_30, 0, x_3); lean::closure_set(x_30, 1, x_4); lean::closure_set(x_30, 2, x_27); x_31 = lean::apply_4(x_4, lean::box(0), lean::box(0), x_27, x_30); return x_31; } } else { obj* x_34; obj* x_37; obj* x_38; lean::dec(x_1); lean::inc(x_3); x_34 = l_lean_parser_parse__hex__digit___rarg(x_2, x_0, x_3); lean::inc(x_34); lean::inc(x_4); x_37 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__quoted__char___rarg___lambda__6), 4, 3); lean::closure_set(x_37, 0, x_3); lean::closure_set(x_37, 1, x_4); lean::closure_set(x_37, 2, x_34); x_38 = lean::apply_4(x_4, lean::box(0), lean::box(0), x_34, x_37); return x_38; } } else { obj* x_43; obj* x_46; uint32 x_49; obj* x_50; obj* x_51; lean::dec(x_4); lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); x_43 = lean::cnstr_get(x_3, 0); lean::inc(x_43); lean::dec(x_3); x_46 = lean::cnstr_get(x_43, 1); lean::inc(x_46); lean::dec(x_43); x_49 = 9; x_50 = lean::box_uint32(x_49); x_51 = lean::apply_2(x_46, lean::box(0), x_50); return x_51; } } else { obj* x_56; obj* x_59; uint32 x_62; obj* x_63; obj* x_64; lean::dec(x_4); lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); x_56 = lean::cnstr_get(x_3, 0); lean::inc(x_56); lean::dec(x_3); x_59 = lean::cnstr_get(x_56, 1); lean::inc(x_59); lean::dec(x_56); x_62 = 10; x_63 = lean::box_uint32(x_62); x_64 = lean::apply_2(x_59, lean::box(0), x_63); return x_64; } } else { obj* x_69; obj* x_72; obj* x_75; obj* x_76; lean::dec(x_4); lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); x_69 = lean::cnstr_get(x_3, 0); lean::inc(x_69); lean::dec(x_3); x_72 = lean::cnstr_get(x_69, 1); lean::inc(x_72); lean::dec(x_69); x_75 = lean::box_uint32(x_10); x_76 = lean::apply_2(x_72, lean::box(0), x_75); return x_76; } } else { obj* x_81; obj* x_84; obj* x_87; obj* x_88; lean::dec(x_4); lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); x_81 = lean::cnstr_get(x_3, 0); lean::inc(x_81); lean::dec(x_3); x_84 = lean::cnstr_get(x_81, 1); lean::inc(x_84); lean::dec(x_81); x_87 = lean::box_uint32(x_8); x_88 = lean::apply_2(x_84, lean::box(0), x_87); return x_88; } } else { obj* x_93; obj* x_96; obj* x_99; obj* x_100; lean::dec(x_4); lean::dec(x_1); lean::dec(x_0); lean::dec(x_2); x_93 = lean::cnstr_get(x_3, 0); lean::inc(x_93); lean::dec(x_3); x_96 = lean::cnstr_get(x_93, 1); lean::inc(x_96); lean::dec(x_93); x_99 = lean::box_uint32(x_6); x_100 = lean::apply_2(x_96, lean::box(0), x_99); return x_100; } } } obj* l_lean_parser_parse__quoted__char___rarg___lambda__8(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_7; obj* x_9; obj* x_10; lean::inc(x_1); lean::inc(x_0); x_7 = l_lean_parser_monad__parsec_any___rarg(x_0, x_1); lean::inc(x_3); x_9 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__quoted__char___rarg___lambda__7___boxed), 6, 5); lean::closure_set(x_9, 0, x_1); lean::closure_set(x_9, 1, x_4); lean::closure_set(x_9, 2, x_0); lean::closure_set(x_9, 3, x_2); lean::closure_set(x_9, 4, x_3); x_10 = lean::apply_4(x_3, lean::box(0), lean::box(0), x_7, x_9); return x_10; } } obj* l_lean_parser_parse__quoted__char___rarg(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; obj* x_5; obj* x_7; obj* x_8; obj* x_10; obj* x_11; x_3 = lean::cnstr_get(x_0, 1); lean::inc(x_3); x_5 = lean::cnstr_get(x_1, 0); lean::inc(x_5); x_7 = l_lean_parser_monad__parsec_left__over___rarg___closed__1; x_8 = lean::apply_2(x_5, lean::box(0), x_7); lean::inc(x_3); x_10 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__quoted__char___rarg___lambda__8), 5, 4); lean::closure_set(x_10, 0, x_0); lean::closure_set(x_10, 1, x_1); lean::closure_set(x_10, 2, x_2); lean::closure_set(x_10, 3, x_3); x_11 = lean::apply_4(x_3, lean::box(0), lean::box(0), x_8, x_10); return x_11; } } obj* l_lean_parser_parse__quoted__char(obj* x_0, obj* x_1) { _start: { obj* x_2; x_2 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__quoted__char___rarg), 3, 0); return x_2; } } obj* l_lean_parser_parse__quoted__char___rarg___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; x_5 = l_lean_parser_parse__quoted__char___rarg___lambda__1(x_0, x_1, x_2, x_3, x_4); lean::dec(x_1); lean::dec(x_2); lean::dec(x_3); lean::dec(x_4); return x_5; } } obj* l_lean_parser_parse__quoted__char___rarg___lambda__5___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; x_3 = l_lean_parser_parse__quoted__char___rarg___lambda__5(x_0, x_1, x_2); lean::dec(x_1); lean::dec(x_2); return x_3; } } obj* l_lean_parser_parse__quoted__char___rarg___lambda__7___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { uint32 x_6; obj* x_7; x_6 = lean::unbox_uint32(x_5); x_7 = l_lean_parser_parse__quoted__char___rarg___lambda__7(x_0, x_1, x_2, x_3, x_4, x_6); return x_7; } } obj* l_lean_parser_parse__quoted__char___boxed(obj* x_0, obj* x_1) { _start: { obj* x_2; x_2 = l_lean_parser_parse__quoted__char(x_0, x_1); lean::dec(x_0); lean::dec(x_1); return x_2; } } obj* l_lean_parser_parse__string__literal__aux___main___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, uint32 x_5) { _start: { obj* x_6; obj* x_7; x_6 = lean::string_push(x_0, x_5); x_7 = l_lean_parser_parse__string__literal__aux___main___rarg(x_1, x_2, x_3, x_4, x_6); return x_7; } } obj* l_lean_parser_parse__string__literal__aux___main___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, uint32 x_6) { _start: { uint32 x_7; uint8 x_8; x_7 = 92; x_8 = x_6 == x_7; if (x_8 == 0) { uint32 x_10; uint8 x_11; lean::dec(x_5); x_10 = 34; x_11 = x_6 == x_10; if (x_11 == 0) { obj* x_12; obj* x_13; x_12 = lean::string_push(x_0, x_6); x_13 = l_lean_parser_parse__string__literal__aux___main___rarg(x_1, x_2, x_3, x_4, x_12); lean::dec(x_4); return x_13; } else { obj* x_18; obj* x_21; obj* x_24; lean::dec(x_4); lean::dec(x_1); lean::dec(x_2); x_18 = lean::cnstr_get(x_3, 0); lean::inc(x_18); lean::dec(x_3); x_21 = lean::cnstr_get(x_18, 1); lean::inc(x_21); lean::dec(x_18); x_24 = lean::apply_2(x_21, lean::box(0), x_0); return x_24; } } else { obj* x_28; obj* x_29; obj* x_30; lean::inc(x_3); lean::inc(x_2); lean::inc(x_1); x_28 = l_lean_parser_parse__quoted__char___rarg(x_1, x_2, x_3); x_29 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__string__literal__aux___main___rarg___lambda__1___boxed), 6, 5); lean::closure_set(x_29, 0, x_0); lean::closure_set(x_29, 1, x_1); lean::closure_set(x_29, 2, x_2); lean::closure_set(x_29, 3, x_3); lean::closure_set(x_29, 4, x_4); x_30 = lean::apply_4(x_5, lean::box(0), lean::box(0), x_28, x_29); return x_30; } } } obj* l_lean_parser_parse__string__literal__aux___main___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; x_5 = lean::mk_nat_obj(0u); x_6 = lean::nat_dec_eq(x_3, x_5); if (x_6 == 0) { obj* x_7; obj* x_8; obj* x_9; obj* x_13; obj* x_15; obj* x_16; x_7 = lean::mk_nat_obj(1u); x_8 = lean::nat_sub(x_3, x_7); x_9 = lean::cnstr_get(x_0, 1); lean::inc(x_9); lean::inc(x_1); lean::inc(x_0); x_13 = l_lean_parser_monad__parsec_any___rarg(x_0, x_1); lean::inc(x_9); x_15 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__string__literal__aux___main___rarg___lambda__2___boxed), 7, 6); lean::closure_set(x_15, 0, x_4); lean::closure_set(x_15, 1, x_0); lean::closure_set(x_15, 2, x_1); lean::closure_set(x_15, 3, x_2); lean::closure_set(x_15, 4, x_8); lean::closure_set(x_15, 5, x_9); x_16 = lean::apply_4(x_9, lean::box(0), lean::box(0), x_13, x_15); return x_16; } else { obj* x_17; obj* x_20; uint32 x_22; obj* x_23; obj* x_24; obj* x_27; obj* x_28; x_17 = lean::cnstr_get(x_2, 0); lean::inc(x_17); lean::dec(x_2); x_20 = lean::cnstr_get(x_17, 4); lean::inc(x_20); x_22 = 34; x_23 = l_lean_parser_monad__parsec_ch___rarg(x_0, x_1, x_22); x_24 = lean::cnstr_get(x_17, 1); lean::inc(x_24); lean::dec(x_17); x_27 = lean::apply_2(x_24, lean::box(0), x_4); x_28 = lean::apply_4(x_20, lean::box(0), lean::box(0), x_23, x_27); return x_28; } } } obj* l_lean_parser_parse__string__literal__aux___main(obj* x_0, obj* x_1) { _start: { obj* x_2; x_2 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__string__literal__aux___main___rarg___boxed), 5, 0); return x_2; } } obj* l_lean_parser_parse__string__literal__aux___main___rarg___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { uint32 x_6; obj* x_7; x_6 = lean::unbox_uint32(x_5); x_7 = l_lean_parser_parse__string__literal__aux___main___rarg___lambda__1(x_0, x_1, x_2, x_3, x_4, x_6); lean::dec(x_4); return x_7; } } obj* l_lean_parser_parse__string__literal__aux___main___rarg___lambda__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { _start: { uint32 x_7; obj* x_8; x_7 = lean::unbox_uint32(x_6); x_8 = l_lean_parser_parse__string__literal__aux___main___rarg___lambda__2(x_0, x_1, x_2, x_3, x_4, x_5, x_7); return x_8; } } obj* l_lean_parser_parse__string__literal__aux___main___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; x_5 = l_lean_parser_parse__string__literal__aux___main___rarg(x_0, x_1, x_2, x_3, x_4); lean::dec(x_3); return x_5; } } obj* l_lean_parser_parse__string__literal__aux___main___boxed(obj* x_0, obj* x_1) { _start: { obj* x_2; x_2 = l_lean_parser_parse__string__literal__aux___main(x_0, x_1); lean::dec(x_0); lean::dec(x_1); return x_2; } } obj* l_lean_parser_parse__string__literal__aux___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; x_5 = l_lean_parser_parse__string__literal__aux___main___rarg(x_0, x_1, x_2, x_3, x_4); return x_5; } } obj* l_lean_parser_parse__string__literal__aux(obj* x_0, obj* x_1) { _start: { obj* x_2; x_2 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__string__literal__aux___rarg___boxed), 5, 0); return x_2; } } obj* l_lean_parser_parse__string__literal__aux___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; x_5 = l_lean_parser_parse__string__literal__aux___rarg(x_0, x_1, x_2, x_3, x_4); lean::dec(x_3); return x_5; } } obj* l_lean_parser_parse__string__literal__aux___boxed(obj* x_0, obj* x_1) { _start: { obj* x_2; x_2 = l_lean_parser_parse__string__literal__aux(x_0, x_1); lean::dec(x_0); lean::dec(x_1); return x_2; } } obj* l_lean_parser_parse__string__literal___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; obj* x_5; x_4 = lean::mk_string(""); x_5 = l_lean_parser_parse__string__literal__aux___main___rarg(x_0, x_1, x_2, x_3, x_4); return x_5; } } obj* l_lean_parser_parse__string__literal___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, uint32 x_4) { _start: { obj* x_5; obj* x_7; obj* x_10; obj* x_13; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; x_5 = lean::cnstr_get(x_0, 0); lean::inc(x_5); x_7 = lean::cnstr_get(x_5, 0); lean::inc(x_7); lean::dec(x_5); x_10 = lean::cnstr_get(x_7, 0); lean::inc(x_10); lean::dec(x_7); x_13 = lean::cnstr_get(x_1, 0); lean::inc(x_13); x_15 = l_lean_parser_monad__parsec_left__over___rarg___closed__1; x_16 = lean::apply_2(x_13, lean::box(0), x_15); x_17 = l_lean_parser_monad__parsec_remaining___rarg___closed__1; x_18 = lean::apply_4(x_10, lean::box(0), lean::box(0), x_17, x_16); x_19 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__string__literal___rarg___lambda__1___boxed), 4, 3); lean::closure_set(x_19, 0, x_0); lean::closure_set(x_19, 1, x_1); lean::closure_set(x_19, 2, x_2); x_20 = lean::apply_4(x_3, lean::box(0), lean::box(0), x_18, x_19); return x_20; } } obj* l_lean_parser_parse__string__literal___rarg(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; uint32 x_5; obj* x_8; obj* x_10; obj* x_11; x_3 = lean::cnstr_get(x_0, 1); lean::inc(x_3); x_5 = 34; lean::inc(x_1); lean::inc(x_0); x_8 = l_lean_parser_monad__parsec_ch___rarg(x_0, x_1, x_5); lean::inc(x_3); x_10 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__string__literal___rarg___lambda__2___boxed), 5, 4); lean::closure_set(x_10, 0, x_0); lean::closure_set(x_10, 1, x_1); lean::closure_set(x_10, 2, x_2); lean::closure_set(x_10, 3, x_3); x_11 = lean::apply_4(x_3, lean::box(0), lean::box(0), x_8, x_10); return x_11; } } obj* l_lean_parser_parse__string__literal(obj* x_0, obj* x_1) { _start: { obj* x_2; x_2 = lean::alloc_closure(reinterpret_cast(l_lean_parser_parse__string__literal___rarg), 3, 0); return x_2; } } obj* l_lean_parser_parse__string__literal___rarg___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; x_4 = l_lean_parser_parse__string__literal___rarg___lambda__1(x_0, x_1, x_2, x_3); lean::dec(x_3); return x_4; } } obj* l_lean_parser_parse__string__literal___rarg___lambda__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { uint32 x_5; obj* x_6; x_5 = lean::unbox_uint32(x_4); x_6 = l_lean_parser_parse__string__literal___rarg___lambda__2(x_0, x_1, x_2, x_3, x_5); return x_6; } } obj* l_lean_parser_parse__string__literal___boxed(obj* x_0, obj* x_1) { _start: { obj* x_2; x_2 = l_lean_parser_parse__string__literal(x_0, x_1); lean::dec(x_0); lean::dec(x_1); return x_2; } } void initialize_init_lean_parser_parsec(); static bool _G_initialized = false; void initialize_init_lean_parser_string__literal() { if (_G_initialized) return; _G_initialized = true; initialize_init_lean_parser_parsec(); l_lean_parser_parse__hex__digit___rarg___lambda__3___closed__1 = _init_l_lean_parser_parse__hex__digit___rarg___lambda__3___closed__1(); lean::mark_persistent(l_lean_parser_parse__hex__digit___rarg___lambda__3___closed__1); l_lean_parser_parse__hex__digit___rarg___lambda__5___closed__1 = _init_l_lean_parser_parse__hex__digit___rarg___lambda__5___closed__1(); lean::mark_persistent(l_lean_parser_parse__hex__digit___rarg___lambda__5___closed__1); l_lean_parser_parse__hex__digit___rarg___closed__1 = _init_l_lean_parser_parse__hex__digit___rarg___closed__1(); lean::mark_persistent(l_lean_parser_parse__hex__digit___rarg___closed__1); l_lean_parser_parse__quoted__char___rarg___lambda__7___closed__1 = _init_l_lean_parser_parse__quoted__char___rarg___lambda__7___closed__1(); lean::mark_persistent(l_lean_parser_parse__quoted__char___rarg___lambda__7___closed__1); }