From 528b16615fc0bccfddd1c5836a991e2aa76ca420 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Thu, 9 Mar 2023 15:49:57 +0100 Subject: [PATCH 1/5] Update the compiler libs with those from the compiler. So we have a single copy around. Also, a prerequisite to update the vendored parser. --- analysis/dune | 15 + analysis/dune-project | 4 +- analysis/reanalyze/src/Paths.ml | 26 +- analysis/reanalyze/src/dune | 6 +- analysis/rescript-vscode.opam | 1 + analysis/src/DumpAst.ml | 4 +- analysis/src/dune | 7 +- .../vendor/compiler-libs-406/arg_helper.ml | 127 - .../vendor/compiler-libs-406/arg_helper.mli | 63 - .../vendor/compiler-libs-406/attr_helper.ml | 54 - .../vendor/compiler-libs-406/bsb_db_decode.ml | 165 - .../compiler-libs-406/camlinternalBigarray.ml | 54 - .../compiler-libs-406/camlinternalLazy.ml | 65 - .../compiler-libs-406/camlinternalMod.ml | 74 - .../compiler-libs-406/camlinternalMod.mli | 28 - .../compiler-libs-406/camlinternalOO.ml | 613 - .../compiler-libs-406/camlinternalOO.mli | 153 - analysis/vendor/compiler-libs-406/ccomp.ml | 204 - analysis/vendor/compiler-libs-406/char.ml | 76 - analysis/vendor/compiler-libs-406/char.mli | 72 - analysis/vendor/compiler-libs-406/clflags.ml | 405 - analysis/vendor/compiler-libs-406/clflags.mli | 233 - analysis/vendor/compiler-libs-406/compenv.ml | 640 - analysis/vendor/compiler-libs-406/compenv.mli | 78 - analysis/vendor/compiler-libs-406/complex.ml | 87 - analysis/vendor/compiler-libs-406/complex.mli | 86 - analysis/vendor/compiler-libs-406/compmisc.ml | 80 - analysis/vendor/compiler-libs-406/config.ml | 212 - analysis/vendor/compiler-libs-406/config.mli | 184 - analysis/vendor/compiler-libs-406/digest.ml | 76 - analysis/vendor/compiler-libs-406/digest.mli | 84 - analysis/vendor/compiler-libs-406/dune | 5 - .../vendor/compiler-libs-406/ext_array.ml | 241 - .../vendor/compiler-libs-406/ext_bytes.ml | 76 - .../compiler-libs-406/ext_pervasives.ml | 109 - analysis/vendor/compiler-libs-406/genlex.ml | 201 - analysis/vendor/compiler-libs-406/genlex.mli | 73 - analysis/vendor/compiler-libs-406/int32.ml | 68 - analysis/vendor/compiler-libs-406/int32.mli | 189 - analysis/vendor/compiler-libs-406/int64.ml | 75 - analysis/vendor/compiler-libs-406/int64.mli | 210 - analysis/vendor/compiler-libs-406/lazy.ml | 83 - analysis/vendor/compiler-libs-406/lazy.mli | 95 - analysis/vendor/compiler-libs-406/lexer.ml | 2887 ---- analysis/vendor/compiler-libs-406/lexing.ml | 231 - analysis/vendor/compiler-libs-406/lexing.mli | 176 - analysis/vendor/compiler-libs-406/map.ml | 480 - analysis/vendor/compiler-libs-406/map.mli | 315 - analysis/vendor/compiler-libs-406/map_gen.ml | 380 - .../vendor/compiler-libs-406/nativeint.ml | 65 - .../vendor/compiler-libs-406/nativeint.mli | 204 - analysis/vendor/compiler-libs-406/numbers.ml | 86 - analysis/vendor/compiler-libs-406/numbers.mli | 45 - analysis/vendor/compiler-libs-406/obj.ml | 114 - analysis/vendor/compiler-libs-406/obj.mli | 152 - analysis/vendor/compiler-libs-406/oo.mli | 38 - analysis/vendor/compiler-libs-406/parse.ml | 67 - analysis/vendor/compiler-libs-406/parser.ml | 13378 ---------------- analysis/vendor/compiler-libs-406/parsing.ml | 211 - analysis/vendor/compiler-libs-406/parsing.mli | 105 - .../vendor/compiler-libs-406/primitive.ml | 222 - analysis/vendor/compiler-libs-406/profile.ml | 334 - analysis/vendor/compiler-libs-406/profile.mli | 44 - analysis/vendor/compiler-libs-406/queue.ml | 132 - analysis/vendor/compiler-libs-406/queue.mli | 82 - analysis/vendor/compiler-libs-406/random.ml | 277 - analysis/vendor/compiler-libs-406/random.mli | 107 - analysis/vendor/compiler-libs-406/set.ml | 526 - analysis/vendor/compiler-libs-406/set.mli | 266 - analysis/vendor/compiler-libs-406/sort.ml | 99 - analysis/vendor/compiler-libs-406/sort.mli | 44 - .../vendor/compiler-libs-406/spacetime.ml | 91 - .../vendor/compiler-libs-406/spacetime.mli | 99 - analysis/vendor/compiler-libs-406/stack.mli | 63 - .../vendor/compiler-libs-406/stdLabels.mli | 29 - analysis/vendor/compiler-libs-406/stream.ml | 233 - analysis/vendor/compiler-libs-406/stream.mli | 110 - .../vendor/compiler-libs-406/string_map.ml | 157 - .../vendor/compiler-libs-406/typeclass.mli | 124 - analysis/vendor/compiler-libs-406/warnings.ml | 650 - .../vendor/compiler-libs-406/warnings.mli | 118 - analysis/vendor/compiler-libs-406/weak.ml | 336 - analysis/vendor/compiler-libs-406/weak.mli | 185 - analysis/vendor/dune | 2 +- analysis/vendor/ext/README.md | 1 + analysis/vendor/ext/bs_hash_stubs.ml | 40 + .../bsb_db_decode.mli => ext/bsb_db.ml} | 49 +- analysis/vendor/ext/bsb_db.mli | 67 + analysis/vendor/ext/bsc_args.ml | 131 + analysis/vendor/ext/bsc_args.mli | 54 + .../bsc_warnings.ml | 10 +- analysis/vendor/ext/config.ml | 45 + .../callback.mli => ext/config.mli} | 54 +- analysis/vendor/ext/dune | 121 +- analysis/vendor/ext/encoding.md | 42 + analysis/vendor/ext/ext_array.ml | 255 + .../{compiler-libs-406 => ext}/ext_array.mli | 58 +- analysis/vendor/ext/ext_basic_hash_stubs.c | 216 + analysis/vendor/ext/ext_buffer.ml | 204 + analysis/vendor/ext/ext_buffer.mli | 103 + analysis/vendor/ext/ext_bytes.ml | 27 + .../{compiler-libs-406 => ext}/ext_bytes.mli | 14 +- .../ext_json_types.ml => ext/ext_char.ml} | 32 +- analysis/vendor/ext/ext_char.mli | 29 + analysis/vendor/ext/ext_cmp.ml | 37 + analysis/vendor/ext/ext_cmp.mli | 24 + analysis/vendor/ext/ext_color.ml | 74 + analysis/vendor/ext/ext_color.mli | 32 + .../{compiler-libs-406 => ext}/ext_digest.ml | 7 +- analysis/vendor/ext/ext_digest.mli | 27 + analysis/vendor/ext/ext_file_extensions.ml | 27 + analysis/vendor/ext/ext_filename.ml | 141 + analysis/vendor/ext/ext_filename.mli | 52 + analysis/vendor/ext/ext_fmt.ml | 10 + analysis/vendor/ext/ext_format.ml | 103 + analysis/vendor/ext/ext_format.mli | 66 + analysis/vendor/ext/ext_ident.ml | 195 + analysis/vendor/ext/ext_ident.mli | 65 + analysis/vendor/ext/ext_int.ml | 36 + analysis/vendor/ext/ext_int.mli | 35 + .../{compiler-libs-406 => ext}/ext_io.ml | 50 +- .../{compiler-libs-406 => ext}/ext_io.mli | 0 analysis/vendor/ext/ext_js_file_kind.ml | 28 + .../ext_position.ml => ext/ext_js_regex.ml} | 61 +- analysis/vendor/ext/ext_js_regex.mli | 27 + analysis/vendor/ext/ext_js_suffix.ml | 28 + analysis/vendor/ext/ext_json.ml | 69 + analysis/vendor/ext/ext_json.mli | 50 + analysis/vendor/ext/ext_json_noloc.ml | 148 + analysis/vendor/ext/ext_json_noloc.mli | 54 + analysis/vendor/ext/ext_json_parse.ml | 314 - analysis/vendor/ext/ext_json_parse.mli | 35 + analysis/vendor/ext/ext_json_parse.mll | 351 + analysis/vendor/ext/ext_json_types.ml | 11 +- .../ext_json_write.ml | 74 +- .../ext_json_write.mli | 4 +- analysis/vendor/ext/ext_list.ml | 724 + analysis/vendor/ext/ext_list.mli | 233 + analysis/vendor/ext/ext_marshal.ml | 25 + analysis/vendor/ext/ext_marshal.mli | 28 + analysis/vendor/ext/ext_module_system.ml | 1 + analysis/vendor/ext/ext_modulename.ml | 84 + analysis/vendor/ext/ext_modulename.mli | 28 + analysis/vendor/ext/ext_namespace.ml | 88 + analysis/vendor/ext/ext_namespace.mli | 51 + analysis/vendor/ext/ext_namespace_encode.ml | 26 + analysis/vendor/ext/ext_namespace_encode.mli | 29 + analysis/vendor/ext/ext_obj.ml | 124 + analysis/vendor/ext/ext_obj.mli | 30 + analysis/vendor/ext/ext_option.ml | 29 + analysis/vendor/ext/ext_option.mli | 31 + analysis/vendor/ext/ext_path.ml | 274 + analysis/vendor/ext/ext_path.mli | 79 + analysis/vendor/ext/ext_pervasives.ml | 97 + .../ext_pervasives.mli | 33 +- analysis/vendor/ext/ext_position.ml | 17 +- .../ext_position.mli | 17 +- analysis/vendor/ext/ext_pp.ml | 171 + analysis/vendor/ext/ext_pp.mli | 79 + analysis/vendor/ext/ext_pp_scope.ml | 113 + analysis/vendor/ext/ext_pp_scope.mli | 44 + analysis/vendor/ext/ext_ref.ml | 77 + analysis/vendor/ext/ext_ref.mli | 40 + analysis/vendor/ext/ext_scc.ml | 101 + analysis/vendor/ext/ext_scc.mli | 42 + analysis/vendor/ext/ext_spec.ml | 36 + analysis/vendor/ext/ext_spec.mli | 3 + analysis/vendor/ext/ext_stack.ml | 41 + analysis/vendor/ext/ext_stack.mli | 35 + .../{compiler-libs-406 => ext}/ext_string.ml | 139 +- .../{compiler-libs-406 => ext}/ext_string.mli | 75 +- analysis/vendor/ext/ext_string_array.ml | 87 + analysis/vendor/ext/ext_string_array.mli | 29 + analysis/vendor/ext/ext_sys.ml | 36 + analysis/vendor/ext/ext_sys.mli | 27 + analysis/vendor/ext/ext_topsort.ml | 61 + analysis/vendor/ext/ext_topsort.mli | 33 + analysis/vendor/ext/ext_utf8.ml | 131 + analysis/vendor/ext/ext_utf8.mli | 40 + analysis/vendor/ext/ext_util.ml | 61 + analysis/vendor/ext/ext_util.mli | 30 + analysis/vendor/ext/hash.cppo.ml | 144 + analysis/vendor/ext/hash.mli | 1 + analysis/vendor/ext/hash_gen.ml | 241 + analysis/vendor/ext/hash_ident.mli | 5 + analysis/vendor/ext/hash_int.mli | 25 + analysis/vendor/ext/hash_set.cppo.ml | 124 + analysis/vendor/ext/hash_set.mli | 32 + analysis/vendor/ext/hash_set_gen.ml | 167 + analysis/vendor/ext/hash_set_ident.mli | 26 + analysis/vendor/ext/hash_set_ident_mask.ml | 163 + analysis/vendor/ext/hash_set_ident_mask.mli | 38 + analysis/vendor/ext/hash_set_int.mli | 25 + analysis/vendor/ext/hash_set_poly.mli | 47 + analysis/vendor/ext/hash_set_string.mli | 25 + analysis/vendor/ext/hash_string.mli | 25 + .../{compiler-libs-406 => ext}/ident.ml | 12 +- .../{compiler-libs-406 => ext}/ident.mli | 0 .../identifiable.ml | 4 +- .../identifiable.mli | 2 +- analysis/vendor/ext/int_vec_util.ml | 34 + analysis/vendor/ext/int_vec_util.mli | 25 + analysis/vendor/ext/int_vec_vec.ml | 29 + analysis/vendor/ext/int_vec_vec.mli | 25 + analysis/vendor/ext/js_reserved_map.ml | 731 + analysis/vendor/ext/js_reserved_map.mli | 25 + analysis/vendor/ext/js_runtime_modules.ml | 70 + analysis/vendor/ext/literals.ml | 181 + analysis/vendor/ext/map.cppo.ml | 217 + analysis/vendor/ext/map_gen.ml | 403 + analysis/vendor/ext/map_gen.mli | 118 + analysis/vendor/ext/map_ident.mli | 25 + analysis/vendor/ext/map_int.mli | 25 + .../string_map.mli => ext/map_string.mli} | 1 - .../vendor/{compiler-libs-406 => ext}/misc.ml | 15 + .../{compiler-libs-406 => ext}/misc.mli | 6 + analysis/vendor/ext/ordered_hash_map.cppo.ml | 111 + analysis/vendor/ext/ordered_hash_map_gen.ml | 158 + .../ext/ordered_hash_map_local_ident.mli | 30 + analysis/vendor/ext/set.cppo.ml | 249 + analysis/vendor/ext/set_gen.ml | 357 + analysis/vendor/ext/set_gen.mli | 92 + analysis/vendor/ext/set_ident.mli | 30 + analysis/vendor/ext/set_int.mli | 1 + analysis/vendor/ext/set_string.mli | 25 + analysis/vendor/ext/string_vec.ml | 29 + analysis/vendor/ext/string_vec.mli | 25 + analysis/vendor/ext/union_find.ml | 64 + analysis/vendor/ext/union_find.mli | 33 + analysis/vendor/ext/vec.cppo.ml | 512 + analysis/vendor/ext/vec.mli | 25 + analysis/vendor/ext/vec_gen.ml | 130 + analysis/vendor/ext/vec_int.mli | 25 + analysis/vendor/ext/warnings.ml | 642 + analysis/vendor/ext/warnings.mli | 124 + .../annot.mli => ml/annot.ml} | 0 .../{compiler-libs-406 => ml}/ast_helper.ml | 15 +- .../{compiler-libs-406 => ml}/ast_helper.mli | 4 - analysis/vendor/ml/ast_invariants.ml | 166 + .../ast_invariants.mli} | 19 +- .../{compiler-libs-406 => ml}/ast_iterator.ml | 14 +- .../ast_iterator.mli | 2 - .../{compiler-libs-406 => ml}/ast_mapper.ml | 46 +- .../{compiler-libs-406 => ml}/ast_mapper.mli | 2 - analysis/vendor/ml/ast_uncurried.ml | 108 + .../asttypes.mli => ml/asttypes.ml} | 17 +- .../vendor/{compiler-libs-406 => ml}/btype.ml | 16 +- .../{compiler-libs-406 => ml}/btype.mli | 9 +- .../builtin_attributes.ml | 4 +- .../builtin_attributes.mli | 0 analysis/vendor/ml/ccomp.ml | 9 + analysis/vendor/ml/ccomp.mli | 2 + analysis/vendor/ml/clflags.ml | 71 + analysis/vendor/ml/clflags.mli | 45 + .../{compiler-libs-406 => ml}/cmi_format.ml | 9 +- .../{compiler-libs-406 => ml}/cmi_format.mli | 5 +- .../{compiler-libs-406 => ml}/cmt_format.ml | 13 +- .../{compiler-libs-406 => ml}/cmt_format.mli | 2 +- .../{compiler-libs-406 => ml}/consistbl.ml | 0 .../{compiler-libs-406 => ml}/consistbl.mli | 0 .../vendor/{compiler-libs-406 => ml}/ctype.ml | 138 +- .../{compiler-libs-406 => ml}/ctype.mli | 5 +- .../{compiler-libs-406 => ml}/datarepr.ml | 44 +- .../{compiler-libs-406 => ml}/datarepr.mli | 3 + .../delayed_checks.ml | 0 .../delayed_checks.mli | 0 analysis/vendor/ml/depend.ml | 501 + analysis/vendor/ml/depend.mli | 41 + .../{compiler-libs-406 => ml}/docstrings.ml | 2 +- .../{compiler-libs-406 => ml}/docstrings.mli | 0 analysis/vendor/ml/dune | 11 + .../vendor/{compiler-libs-406 => ml}/env.ml | 152 +- .../vendor/{compiler-libs-406 => ml}/env.mli | 23 +- analysis/vendor/ml/envaux.ml | 94 + analysis/vendor/ml/envaux.mli | 36 + .../{compiler-libs-406 => ml}/includeclass.ml | 2 +- .../includeclass.mli | 0 .../{compiler-libs-406 => ml}/includecore.ml | 47 +- .../{compiler-libs-406 => ml}/includecore.mli | 10 +- .../{compiler-libs-406 => ml}/includemod.ml | 88 +- .../{compiler-libs-406 => ml}/includemod.mli | 3 - .../{compiler-libs-406 => ml}/lambda.ml | 354 +- .../{compiler-libs-406 => ml}/lambda.mli | 264 +- .../{compiler-libs-406 => ml}/lexer.mli | 8 +- analysis/vendor/ml/lexer.mll | 792 + .../{compiler-libs-406 => ml}/location.ml | 7 +- analysis/vendor/ml/location.mli | 149 + .../{compiler-libs-406 => ml}/longident.ml | 14 + .../{compiler-libs-406 => ml}/longident.mli | 1 + analysis/vendor/ml/matching.ml | 3235 ++++ analysis/vendor/ml/matching.mli | 73 + .../vendor/{compiler-libs-406 => ml}/mtype.ml | 6 +- .../{compiler-libs-406 => ml}/mtype.mli | 0 .../{compiler-libs-406 => ml}/oprint.ml | 0 .../{compiler-libs-406 => ml}/oprint.mli | 2 + .../outcometree.mli => ml/outcometree.ml} | 0 .../{compiler-libs-406 => ml}/parmatch.ml | 92 +- .../{compiler-libs-406 => ml}/parmatch.mli | 4 +- .../stack.ml => ml/parse.ml} | 50 +- .../{compiler-libs-406 => ml}/parse.mli | 2 - analysis/vendor/ml/parser.ml | 12169 ++++++++++++++ .../{compiler-libs-406 => ml}/parser.mli | 4 - analysis/vendor/ml/parser.mly | 2419 +++ .../parsetree.mli => ml/parsetree.ml} | 29 +- .../vendor/{compiler-libs-406 => ml}/path.ml | 2 +- .../vendor/{compiler-libs-406 => ml}/path.mli | 0 .../{compiler-libs-406 => ml}/pprintast.ml | 139 +- .../{compiler-libs-406 => ml}/pprintast.mli | 5 +- .../{compiler-libs-406 => ml}/predef.ml | 121 +- .../{compiler-libs-406 => ml}/predef.mli | 19 +- analysis/vendor/ml/primitive.ml | 100 + .../{compiler-libs-406 => ml}/primitive.mli | 10 +- .../{compiler-libs-406 => ml}/printast.ml | 99 +- .../{compiler-libs-406 => ml}/printast.mli | 2 +- analysis/vendor/ml/printlambda.ml | 465 + .../std_exit.ml => ml/printlambda.mli} | 11 +- .../{compiler-libs-406 => ml}/printtyp.ml | 112 +- .../{compiler-libs-406 => ml}/printtyp.mli | 8 + analysis/vendor/ml/printtyped.ml | 786 + .../stdLabels.ml => ml/printtyped.mli} | 17 +- analysis/vendor/ml/rec_check.ml | 474 + analysis/vendor/ml/rec_check.mli | 4 + analysis/vendor/ml/rescript_cpp.ml | 572 + analysis/vendor/ml/rescript_cpp.mli | 54 + .../{compiler-libs-406 => ml}/stypes.ml | 4 +- .../{compiler-libs-406 => ml}/stypes.mli | 2 +- .../vendor/{compiler-libs-406 => ml}/subst.ml | 29 +- .../{compiler-libs-406 => ml}/subst.mli | 2 +- analysis/vendor/ml/switch.ml | 868 + analysis/vendor/ml/switch.mli | 119 + .../{compiler-libs-406 => ml}/syntaxerr.ml | 0 .../{compiler-libs-406 => ml}/syntaxerr.mli | 0 .../tast_iterator.ml | 4 +- .../tast_iterator.mli | 0 .../{compiler-libs-406 => ml}/tast_mapper.ml | 112 +- .../{compiler-libs-406 => ml}/tast_mapper.mli | 4 - .../vendor/{compiler-libs-406 => ml}/tbl.ml | 0 .../vendor/{compiler-libs-406 => ml}/tbl.mli | 0 .../callback.ml => ml/terminfo.ml} | 21 +- .../ccomp.mli => ml/terminfo.mli} | 27 +- analysis/vendor/ml/transl_recmodule.ml | 274 + analysis/vendor/ml/transl_recmodule.mli | 29 + analysis/vendor/ml/translattribute.ml | 119 + .../translattribute.mli} | 28 +- analysis/vendor/ml/translcore.ml | 1278 ++ analysis/vendor/ml/translcore.mli | 44 + analysis/vendor/ml/translmod.ml | 534 + .../oo.ml => ml/translmod.mli} | 21 +- .../{compiler-libs-406 => ml}/typeclass.ml | 927 +- analysis/vendor/ml/typeclass.mli | 65 + .../{compiler-libs-406 => ml}/typecore.ml | 2128 +-- .../{compiler-libs-406 => ml}/typecore.mli | 44 +- .../{compiler-libs-406 => ml}/typedecl.ml | 316 +- .../{compiler-libs-406 => ml}/typedecl.mli | 36 +- .../{compiler-libs-406 => ml}/typedtree.ml | 70 +- .../{compiler-libs-406 => ml}/typedtree.mli | 76 +- .../typedtreeIter.ml | 118 +- .../typedtreeIter.mli | 11 +- analysis/vendor/ml/typedtreeMap.ml | 633 + analysis/vendor/ml/typedtreeMap.mli | 85 + .../{compiler-libs-406 => ml}/typemod.ml | 218 +- .../{compiler-libs-406 => ml}/typemod.mli | 27 +- .../{compiler-libs-406 => ml}/typeopt.ml | 124 +- .../{compiler-libs-406 => ml}/typeopt.mli | 16 +- .../vendor/{compiler-libs-406 => ml}/types.ml | 31 +- .../{compiler-libs-406 => ml}/types.mli | 15 +- .../{compiler-libs-406 => ml}/typetexp.ml | 46 +- .../{compiler-libs-406 => ml}/typetexp.mli | 7 + .../{compiler-libs-406 => ml}/untypeast.ml | 134 +- .../{compiler-libs-406 => ml}/untypeast.mli | 5 - analysis/vendor/res_outcome_printer/dune | 5 +- .../res_outcome_printer/react_jsx_common.ml | 65 + .../res_outcome_printer/reactjs_jsx_ppx.ml | 168 + .../res_outcome_printer/reactjs_jsx_ppx.mli | 23 + .../res_outcome_printer/reactjs_jsx_v3.ml | 1188 ++ .../res_outcome_printer/reactjs_jsx_v4.ml | 1409 ++ .../vendor/res_outcome_printer/res_cli.ml | 87 +- .../res_driver_reason_binary.ml | 119 - .../res_driver_reason_binary.mli | 3 - .../vendor/res_outcome_printer/res_printer.ml | 2 +- .../vendor/res_outcome_printer/res_scanner.ml | 69 +- .../res_outcome_printer/res_scanner.mli | 2 - .../vendor/res_outcome_printer/res_token.ml | 2 +- 383 files changed, 43626 insertions(+), 34348 deletions(-) delete mode 100644 analysis/vendor/compiler-libs-406/arg_helper.ml delete mode 100644 analysis/vendor/compiler-libs-406/arg_helper.mli delete mode 100644 analysis/vendor/compiler-libs-406/attr_helper.ml delete mode 100644 analysis/vendor/compiler-libs-406/bsb_db_decode.ml delete mode 100644 analysis/vendor/compiler-libs-406/camlinternalBigarray.ml delete mode 100644 analysis/vendor/compiler-libs-406/camlinternalLazy.ml delete mode 100644 analysis/vendor/compiler-libs-406/camlinternalMod.ml delete mode 100644 analysis/vendor/compiler-libs-406/camlinternalMod.mli delete mode 100644 analysis/vendor/compiler-libs-406/camlinternalOO.ml delete mode 100644 analysis/vendor/compiler-libs-406/camlinternalOO.mli delete mode 100644 analysis/vendor/compiler-libs-406/ccomp.ml delete mode 100644 analysis/vendor/compiler-libs-406/char.ml delete mode 100644 analysis/vendor/compiler-libs-406/char.mli delete mode 100644 analysis/vendor/compiler-libs-406/clflags.ml delete mode 100644 analysis/vendor/compiler-libs-406/clflags.mli delete mode 100644 analysis/vendor/compiler-libs-406/compenv.ml delete mode 100644 analysis/vendor/compiler-libs-406/compenv.mli delete mode 100644 analysis/vendor/compiler-libs-406/complex.ml delete mode 100644 analysis/vendor/compiler-libs-406/complex.mli delete mode 100644 analysis/vendor/compiler-libs-406/compmisc.ml delete mode 100644 analysis/vendor/compiler-libs-406/config.ml delete mode 100644 analysis/vendor/compiler-libs-406/config.mli delete mode 100644 analysis/vendor/compiler-libs-406/digest.ml delete mode 100644 analysis/vendor/compiler-libs-406/digest.mli delete mode 100644 analysis/vendor/compiler-libs-406/dune delete mode 100644 analysis/vendor/compiler-libs-406/ext_array.ml delete mode 100644 analysis/vendor/compiler-libs-406/ext_bytes.ml delete mode 100644 analysis/vendor/compiler-libs-406/ext_pervasives.ml delete mode 100644 analysis/vendor/compiler-libs-406/genlex.ml delete mode 100644 analysis/vendor/compiler-libs-406/genlex.mli delete mode 100644 analysis/vendor/compiler-libs-406/int32.ml delete mode 100644 analysis/vendor/compiler-libs-406/int32.mli delete mode 100644 analysis/vendor/compiler-libs-406/int64.ml delete mode 100644 analysis/vendor/compiler-libs-406/int64.mli delete mode 100644 analysis/vendor/compiler-libs-406/lazy.ml delete mode 100644 analysis/vendor/compiler-libs-406/lazy.mli delete mode 100644 analysis/vendor/compiler-libs-406/lexer.ml delete mode 100644 analysis/vendor/compiler-libs-406/lexing.ml delete mode 100644 analysis/vendor/compiler-libs-406/lexing.mli delete mode 100644 analysis/vendor/compiler-libs-406/map.ml delete mode 100644 analysis/vendor/compiler-libs-406/map.mli delete mode 100644 analysis/vendor/compiler-libs-406/map_gen.ml delete mode 100644 analysis/vendor/compiler-libs-406/nativeint.ml delete mode 100644 analysis/vendor/compiler-libs-406/nativeint.mli delete mode 100644 analysis/vendor/compiler-libs-406/numbers.ml delete mode 100644 analysis/vendor/compiler-libs-406/numbers.mli delete mode 100644 analysis/vendor/compiler-libs-406/obj.ml delete mode 100644 analysis/vendor/compiler-libs-406/obj.mli delete mode 100644 analysis/vendor/compiler-libs-406/oo.mli delete mode 100644 analysis/vendor/compiler-libs-406/parse.ml delete mode 100644 analysis/vendor/compiler-libs-406/parser.ml delete mode 100644 analysis/vendor/compiler-libs-406/parsing.ml delete mode 100644 analysis/vendor/compiler-libs-406/parsing.mli delete mode 100644 analysis/vendor/compiler-libs-406/primitive.ml delete mode 100644 analysis/vendor/compiler-libs-406/profile.ml delete mode 100644 analysis/vendor/compiler-libs-406/profile.mli delete mode 100644 analysis/vendor/compiler-libs-406/queue.ml delete mode 100644 analysis/vendor/compiler-libs-406/queue.mli delete mode 100644 analysis/vendor/compiler-libs-406/random.ml delete mode 100644 analysis/vendor/compiler-libs-406/random.mli delete mode 100644 analysis/vendor/compiler-libs-406/set.ml delete mode 100644 analysis/vendor/compiler-libs-406/set.mli delete mode 100644 analysis/vendor/compiler-libs-406/sort.ml delete mode 100644 analysis/vendor/compiler-libs-406/sort.mli delete mode 100644 analysis/vendor/compiler-libs-406/spacetime.ml delete mode 100644 analysis/vendor/compiler-libs-406/spacetime.mli delete mode 100644 analysis/vendor/compiler-libs-406/stack.mli delete mode 100644 analysis/vendor/compiler-libs-406/stdLabels.mli delete mode 100644 analysis/vendor/compiler-libs-406/stream.ml delete mode 100644 analysis/vendor/compiler-libs-406/stream.mli delete mode 100644 analysis/vendor/compiler-libs-406/string_map.ml delete mode 100644 analysis/vendor/compiler-libs-406/typeclass.mli delete mode 100644 analysis/vendor/compiler-libs-406/warnings.ml delete mode 100644 analysis/vendor/compiler-libs-406/warnings.mli delete mode 100644 analysis/vendor/compiler-libs-406/weak.ml delete mode 100644 analysis/vendor/compiler-libs-406/weak.mli create mode 100644 analysis/vendor/ext/README.md create mode 100644 analysis/vendor/ext/bs_hash_stubs.ml rename analysis/vendor/{compiler-libs-406/bsb_db_decode.mli => ext/bsb_db.ml} (70%) create mode 100644 analysis/vendor/ext/bsb_db.mli create mode 100644 analysis/vendor/ext/bsc_args.ml create mode 100644 analysis/vendor/ext/bsc_args.mli rename analysis/vendor/{compiler-libs-406 => ext}/bsc_warnings.ml (97%) create mode 100644 analysis/vendor/ext/config.ml rename analysis/vendor/{compiler-libs-406/callback.mli => ext/config.mli} (54%) create mode 100644 analysis/vendor/ext/encoding.md create mode 100644 analysis/vendor/ext/ext_array.ml rename analysis/vendor/{compiler-libs-406 => ext}/ext_array.mli (62%) create mode 100644 analysis/vendor/ext/ext_basic_hash_stubs.c create mode 100644 analysis/vendor/ext/ext_buffer.ml create mode 100644 analysis/vendor/ext/ext_buffer.mli create mode 100644 analysis/vendor/ext/ext_bytes.ml rename analysis/vendor/{compiler-libs-406 => ext}/ext_bytes.mli (88%) rename analysis/vendor/{compiler-libs-406/ext_json_types.ml => ext/ext_char.ml} (73%) create mode 100644 analysis/vendor/ext/ext_char.mli create mode 100644 analysis/vendor/ext/ext_cmp.ml create mode 100644 analysis/vendor/ext/ext_cmp.mli create mode 100644 analysis/vendor/ext/ext_color.ml create mode 100644 analysis/vendor/ext/ext_color.mli rename analysis/vendor/{compiler-libs-406 => ext}/ext_digest.ml (93%) create mode 100644 analysis/vendor/ext/ext_digest.mli create mode 100644 analysis/vendor/ext/ext_file_extensions.ml create mode 100644 analysis/vendor/ext/ext_filename.ml create mode 100644 analysis/vendor/ext/ext_filename.mli create mode 100644 analysis/vendor/ext/ext_fmt.ml create mode 100644 analysis/vendor/ext/ext_format.ml create mode 100644 analysis/vendor/ext/ext_format.mli create mode 100644 analysis/vendor/ext/ext_ident.ml create mode 100644 analysis/vendor/ext/ext_ident.mli create mode 100644 analysis/vendor/ext/ext_int.ml create mode 100644 analysis/vendor/ext/ext_int.mli rename analysis/vendor/{compiler-libs-406 => ext}/ext_io.ml (66%) rename analysis/vendor/{compiler-libs-406 => ext}/ext_io.mli (100%) create mode 100644 analysis/vendor/ext/ext_js_file_kind.ml rename analysis/vendor/{compiler-libs-406/ext_position.ml => ext/ext_js_regex.ml} (62%) create mode 100644 analysis/vendor/ext/ext_js_regex.mli create mode 100644 analysis/vendor/ext/ext_js_suffix.ml create mode 100644 analysis/vendor/ext/ext_json.ml create mode 100644 analysis/vendor/ext/ext_json.mli create mode 100644 analysis/vendor/ext/ext_json_noloc.ml create mode 100644 analysis/vendor/ext/ext_json_noloc.mli delete mode 100644 analysis/vendor/ext/ext_json_parse.ml create mode 100644 analysis/vendor/ext/ext_json_parse.mli create mode 100644 analysis/vendor/ext/ext_json_parse.mll rename analysis/vendor/{compiler-libs-406 => ext}/ext_json_write.ml (65%) rename analysis/vendor/{compiler-libs-406 => ext}/ext_json_write.mli (92%) create mode 100644 analysis/vendor/ext/ext_list.ml create mode 100644 analysis/vendor/ext/ext_list.mli create mode 100644 analysis/vendor/ext/ext_marshal.ml create mode 100644 analysis/vendor/ext/ext_marshal.mli create mode 100644 analysis/vendor/ext/ext_module_system.ml create mode 100644 analysis/vendor/ext/ext_modulename.ml create mode 100644 analysis/vendor/ext/ext_modulename.mli create mode 100644 analysis/vendor/ext/ext_namespace.ml create mode 100644 analysis/vendor/ext/ext_namespace.mli create mode 100644 analysis/vendor/ext/ext_namespace_encode.ml create mode 100644 analysis/vendor/ext/ext_namespace_encode.mli create mode 100644 analysis/vendor/ext/ext_obj.ml create mode 100644 analysis/vendor/ext/ext_obj.mli create mode 100644 analysis/vendor/ext/ext_option.ml create mode 100644 analysis/vendor/ext/ext_option.mli create mode 100644 analysis/vendor/ext/ext_path.ml create mode 100644 analysis/vendor/ext/ext_path.mli create mode 100644 analysis/vendor/ext/ext_pervasives.ml rename analysis/vendor/{compiler-libs-406 => ext}/ext_pervasives.mli (84%) rename analysis/vendor/{compiler-libs-406 => ext}/ext_position.mli (87%) create mode 100644 analysis/vendor/ext/ext_pp.ml create mode 100644 analysis/vendor/ext/ext_pp.mli create mode 100644 analysis/vendor/ext/ext_pp_scope.ml create mode 100644 analysis/vendor/ext/ext_pp_scope.mli create mode 100644 analysis/vendor/ext/ext_ref.ml create mode 100644 analysis/vendor/ext/ext_ref.mli create mode 100644 analysis/vendor/ext/ext_scc.ml create mode 100644 analysis/vendor/ext/ext_scc.mli create mode 100644 analysis/vendor/ext/ext_spec.ml create mode 100644 analysis/vendor/ext/ext_spec.mli create mode 100644 analysis/vendor/ext/ext_stack.ml create mode 100644 analysis/vendor/ext/ext_stack.mli rename analysis/vendor/{compiler-libs-406 => ext}/ext_string.ml (84%) rename analysis/vendor/{compiler-libs-406 => ext}/ext_string.mli (82%) create mode 100644 analysis/vendor/ext/ext_string_array.ml create mode 100644 analysis/vendor/ext/ext_string_array.mli create mode 100644 analysis/vendor/ext/ext_sys.ml create mode 100644 analysis/vendor/ext/ext_sys.mli create mode 100644 analysis/vendor/ext/ext_topsort.ml create mode 100644 analysis/vendor/ext/ext_topsort.mli create mode 100644 analysis/vendor/ext/ext_utf8.ml create mode 100644 analysis/vendor/ext/ext_utf8.mli create mode 100644 analysis/vendor/ext/ext_util.ml create mode 100644 analysis/vendor/ext/ext_util.mli create mode 100644 analysis/vendor/ext/hash.cppo.ml create mode 100644 analysis/vendor/ext/hash.mli create mode 100644 analysis/vendor/ext/hash_gen.ml create mode 100644 analysis/vendor/ext/hash_ident.mli create mode 100644 analysis/vendor/ext/hash_int.mli create mode 100644 analysis/vendor/ext/hash_set.cppo.ml create mode 100644 analysis/vendor/ext/hash_set.mli create mode 100644 analysis/vendor/ext/hash_set_gen.ml create mode 100644 analysis/vendor/ext/hash_set_ident.mli create mode 100644 analysis/vendor/ext/hash_set_ident_mask.ml create mode 100644 analysis/vendor/ext/hash_set_ident_mask.mli create mode 100644 analysis/vendor/ext/hash_set_int.mli create mode 100644 analysis/vendor/ext/hash_set_poly.mli create mode 100644 analysis/vendor/ext/hash_set_string.mli create mode 100644 analysis/vendor/ext/hash_string.mli rename analysis/vendor/{compiler-libs-406 => ext}/ident.ml (96%) rename analysis/vendor/{compiler-libs-406 => ext}/ident.mli (100%) rename analysis/vendor/{compiler-libs-406 => ext}/identifiable.ml (98%) rename analysis/vendor/{compiler-libs-406 => ext}/identifiable.mli (98%) create mode 100644 analysis/vendor/ext/int_vec_util.ml create mode 100644 analysis/vendor/ext/int_vec_util.mli create mode 100644 analysis/vendor/ext/int_vec_vec.ml create mode 100644 analysis/vendor/ext/int_vec_vec.mli create mode 100644 analysis/vendor/ext/js_reserved_map.ml create mode 100644 analysis/vendor/ext/js_reserved_map.mli create mode 100644 analysis/vendor/ext/js_runtime_modules.ml create mode 100644 analysis/vendor/ext/literals.ml create mode 100644 analysis/vendor/ext/map.cppo.ml create mode 100644 analysis/vendor/ext/map_gen.ml create mode 100644 analysis/vendor/ext/map_gen.mli create mode 100644 analysis/vendor/ext/map_ident.mli create mode 100644 analysis/vendor/ext/map_int.mli rename analysis/vendor/{compiler-libs-406/string_map.mli => ext/map_string.mli} (99%) rename analysis/vendor/{compiler-libs-406 => ext}/misc.ml (98%) rename analysis/vendor/{compiler-libs-406 => ext}/misc.mli (99%) create mode 100644 analysis/vendor/ext/ordered_hash_map.cppo.ml create mode 100644 analysis/vendor/ext/ordered_hash_map_gen.ml create mode 100644 analysis/vendor/ext/ordered_hash_map_local_ident.mli create mode 100644 analysis/vendor/ext/set.cppo.ml create mode 100644 analysis/vendor/ext/set_gen.ml create mode 100644 analysis/vendor/ext/set_gen.mli create mode 100644 analysis/vendor/ext/set_ident.mli create mode 100644 analysis/vendor/ext/set_int.mli create mode 100644 analysis/vendor/ext/set_string.mli create mode 100644 analysis/vendor/ext/string_vec.ml create mode 100644 analysis/vendor/ext/string_vec.mli create mode 100644 analysis/vendor/ext/union_find.ml create mode 100644 analysis/vendor/ext/union_find.mli create mode 100644 analysis/vendor/ext/vec.cppo.ml create mode 100644 analysis/vendor/ext/vec.mli create mode 100644 analysis/vendor/ext/vec_gen.ml create mode 100644 analysis/vendor/ext/vec_int.mli create mode 100644 analysis/vendor/ext/warnings.ml create mode 100644 analysis/vendor/ext/warnings.mli rename analysis/vendor/{compiler-libs-406/annot.mli => ml/annot.ml} (100%) rename analysis/vendor/{compiler-libs-406 => ml}/ast_helper.ml (97%) rename analysis/vendor/{compiler-libs-406 => ml}/ast_helper.mli (98%) create mode 100644 analysis/vendor/ml/ast_invariants.ml rename analysis/vendor/{compiler-libs-406/camlinternalLazy.mli => ml/ast_invariants.mli} (63%) rename analysis/vendor/{compiler-libs-406 => ml}/ast_iterator.ml (97%) rename analysis/vendor/{compiler-libs-406 => ml}/ast_iterator.mli (96%) rename analysis/vendor/{compiler-libs-406 => ml}/ast_mapper.ml (95%) rename analysis/vendor/{compiler-libs-406 => ml}/ast_mapper.mli (98%) create mode 100644 analysis/vendor/ml/ast_uncurried.ml rename analysis/vendor/{compiler-libs-406/asttypes.mli => ml/asttypes.ml} (86%) rename analysis/vendor/{compiler-libs-406 => ml}/btype.ml (98%) rename analysis/vendor/{compiler-libs-406 => ml}/btype.mli (97%) rename analysis/vendor/{compiler-libs-406 => ml}/builtin_attributes.ml (98%) rename analysis/vendor/{compiler-libs-406 => ml}/builtin_attributes.mli (100%) create mode 100644 analysis/vendor/ml/ccomp.ml create mode 100644 analysis/vendor/ml/ccomp.mli create mode 100644 analysis/vendor/ml/clflags.ml create mode 100644 analysis/vendor/ml/clflags.mli rename analysis/vendor/{compiler-libs-406 => ml}/cmi_format.ml (99%) rename analysis/vendor/{compiler-libs-406 => ml}/cmi_format.mli (97%) rename analysis/vendor/{compiler-libs-406 => ml}/cmt_format.ml (96%) rename analysis/vendor/{compiler-libs-406 => ml}/cmt_format.mli (99%) rename analysis/vendor/{compiler-libs-406 => ml}/consistbl.ml (100%) rename analysis/vendor/{compiler-libs-406 => ml}/consistbl.mli (100%) rename analysis/vendor/{compiler-libs-406 => ml}/ctype.ml (97%) rename analysis/vendor/{compiler-libs-406 => ml}/ctype.mli (99%) rename analysis/vendor/{compiler-libs-406 => ml}/datarepr.ml (83%) rename analysis/vendor/{compiler-libs-406 => ml}/datarepr.mli (96%) rename analysis/vendor/{compiler-libs-406 => ml}/delayed_checks.ml (100%) rename analysis/vendor/{compiler-libs-406 => ml}/delayed_checks.mli (100%) create mode 100644 analysis/vendor/ml/depend.ml create mode 100644 analysis/vendor/ml/depend.mli rename analysis/vendor/{compiler-libs-406 => ml}/docstrings.ml (99%) rename analysis/vendor/{compiler-libs-406 => ml}/docstrings.mli (100%) create mode 100644 analysis/vendor/ml/dune rename analysis/vendor/{compiler-libs-406 => ml}/env.ml (94%) rename analysis/vendor/{compiler-libs-406 => ml}/env.mli (95%) create mode 100644 analysis/vendor/ml/envaux.ml create mode 100644 analysis/vendor/ml/envaux.mli rename analysis/vendor/{compiler-libs-406 => ml}/includeclass.ml (98%) rename analysis/vendor/{compiler-libs-406 => ml}/includeclass.mli (100%) rename analysis/vendor/{compiler-libs-406 => ml}/includecore.ml (90%) rename analysis/vendor/{compiler-libs-406 => ml}/includecore.mli (89%) rename analysis/vendor/{compiler-libs-406 => ml}/includemod.ml (92%) rename analysis/vendor/{compiler-libs-406 => ml}/includemod.mli (95%) rename analysis/vendor/{compiler-libs-406 => ml}/lambda.ml (74%) rename analysis/vendor/{compiler-libs-406 => ml}/lambda.mli (65%) rename analysis/vendor/{compiler-libs-406 => ml}/lexer.mli (95%) create mode 100644 analysis/vendor/ml/lexer.mll rename analysis/vendor/{compiler-libs-406 => ml}/location.ml (97%) create mode 100644 analysis/vendor/ml/location.mli rename analysis/vendor/{compiler-libs-406 => ml}/longident.ml (83%) rename analysis/vendor/{compiler-libs-406 => ml}/longident.mli (97%) create mode 100644 analysis/vendor/ml/matching.ml create mode 100644 analysis/vendor/ml/matching.mli rename analysis/vendor/{compiler-libs-406 => ml}/mtype.ml (98%) rename analysis/vendor/{compiler-libs-406 => ml}/mtype.mli (100%) rename analysis/vendor/{compiler-libs-406 => ml}/oprint.ml (100%) rename analysis/vendor/{compiler-libs-406 => ml}/oprint.mli (99%) rename analysis/vendor/{compiler-libs-406/outcometree.mli => ml/outcometree.ml} (100%) rename analysis/vendor/{compiler-libs-406 => ml}/parmatch.ml (97%) rename analysis/vendor/{compiler-libs-406 => ml}/parmatch.mli (97%) rename analysis/vendor/{compiler-libs-406/stack.ml => ml/parse.ml} (64%) rename analysis/vendor/{compiler-libs-406 => ml}/parse.mli (91%) create mode 100644 analysis/vendor/ml/parser.ml rename analysis/vendor/{compiler-libs-406 => ml}/parser.mli (91%) create mode 100644 analysis/vendor/ml/parser.mly rename analysis/vendor/{compiler-libs-406/parsetree.mli => ml/parsetree.ml} (97%) rename analysis/vendor/{compiler-libs-406 => ml}/path.ml (97%) rename analysis/vendor/{compiler-libs-406 => ml}/path.mli (100%) rename analysis/vendor/{compiler-libs-406 => ml}/pprintast.ml (92%) rename analysis/vendor/{compiler-libs-406 => ml}/pprintast.mli (91%) rename analysis/vendor/{compiler-libs-406 => ml}/predef.ml (78%) rename analysis/vendor/{compiler-libs-406 => ml}/predef.mli (94%) create mode 100644 analysis/vendor/ml/primitive.ml rename analysis/vendor/{compiler-libs-406 => ml}/primitive.mli (89%) rename analysis/vendor/{compiler-libs-406 => ml}/printast.ml (89%) rename analysis/vendor/{compiler-libs-406 => ml}/printast.mli (96%) create mode 100644 analysis/vendor/ml/printlambda.ml rename analysis/vendor/{compiler-libs-406/std_exit.ml => ml/printlambda.mli} (80%) rename analysis/vendor/{compiler-libs-406 => ml}/printtyp.ml (95%) rename analysis/vendor/{compiler-libs-406 => ml}/printtyp.mli (96%) create mode 100644 analysis/vendor/ml/printtyped.ml rename analysis/vendor/{compiler-libs-406/stdLabels.ml => ml/printtyped.mli} (72%) create mode 100644 analysis/vendor/ml/rec_check.ml create mode 100644 analysis/vendor/ml/rec_check.mli create mode 100644 analysis/vendor/ml/rescript_cpp.ml create mode 100644 analysis/vendor/ml/rescript_cpp.mli rename analysis/vendor/{compiler-libs-406 => ml}/stypes.ml (99%) rename analysis/vendor/{compiler-libs-406 => ml}/stypes.mli (98%) rename analysis/vendor/{compiler-libs-406 => ml}/subst.ml (95%) rename analysis/vendor/{compiler-libs-406 => ml}/subst.mli (97%) create mode 100644 analysis/vendor/ml/switch.ml create mode 100644 analysis/vendor/ml/switch.mli rename analysis/vendor/{compiler-libs-406 => ml}/syntaxerr.ml (100%) rename analysis/vendor/{compiler-libs-406 => ml}/syntaxerr.mli (100%) rename analysis/vendor/{compiler-libs-406 => ml}/tast_iterator.ml (99%) rename analysis/vendor/{compiler-libs-406 => ml}/tast_iterator.mli (100%) rename analysis/vendor/{compiler-libs-406 => ml}/tast_mapper.ml (85%) rename analysis/vendor/{compiler-libs-406 => ml}/tast_mapper.mli (93%) rename analysis/vendor/{compiler-libs-406 => ml}/tbl.ml (100%) rename analysis/vendor/{compiler-libs-406 => ml}/tbl.mli (100%) rename analysis/vendor/{compiler-libs-406/callback.ml => ml/terminfo.ml} (71%) rename analysis/vendor/{compiler-libs-406/ccomp.mli => ml/terminfo.mli} (67%) create mode 100644 analysis/vendor/ml/transl_recmodule.ml create mode 100644 analysis/vendor/ml/transl_recmodule.mli create mode 100644 analysis/vendor/ml/translattribute.ml rename analysis/vendor/{compiler-libs-406/attr_helper.mli => ml/translattribute.mli} (61%) create mode 100644 analysis/vendor/ml/translcore.ml create mode 100644 analysis/vendor/ml/translcore.mli create mode 100644 analysis/vendor/ml/translmod.ml rename analysis/vendor/{compiler-libs-406/oo.ml => ml/translmod.mli} (72%) rename analysis/vendor/{compiler-libs-406 => ml}/typeclass.ml (50%) create mode 100644 analysis/vendor/ml/typeclass.mli rename analysis/vendor/{compiler-libs-406 => ml}/typecore.ml (65%) rename analysis/vendor/{compiler-libs-406 => ml}/typecore.mli (80%) rename analysis/vendor/{compiler-libs-406 => ml}/typedecl.ml (86%) rename analysis/vendor/{compiler-libs-406 => ml}/typedecl.mli (66%) rename analysis/vendor/{compiler-libs-406 => ml}/typedtree.ml (88%) rename analysis/vendor/{compiler-libs-406 => ml}/typedtree.mli (88%) rename analysis/vendor/{compiler-libs-406 => ml}/typedtreeIter.ml (84%) rename analysis/vendor/{compiler-libs-406 => ml}/typedtreeIter.mli (89%) create mode 100644 analysis/vendor/ml/typedtreeMap.ml create mode 100644 analysis/vendor/ml/typedtreeMap.mli rename analysis/vendor/{compiler-libs-406 => ml}/typemod.ml (90%) rename analysis/vendor/{compiler-libs-406 => ml}/typemod.mli (84%) rename analysis/vendor/{compiler-libs-406 => ml}/typeopt.ml (63%) rename analysis/vendor/{compiler-libs-406 => ml}/typeopt.mli (82%) rename analysis/vendor/{compiler-libs-406 => ml}/types.ml (93%) rename analysis/vendor/{compiler-libs-406 => ml}/types.mli (96%) rename analysis/vendor/{compiler-libs-406 => ml}/typetexp.ml (96%) rename analysis/vendor/{compiler-libs-406 => ml}/typetexp.mli (96%) rename analysis/vendor/{compiler-libs-406 => ml}/untypeast.ml (84%) rename analysis/vendor/{compiler-libs-406 => ml}/untypeast.mli (91%) create mode 100644 analysis/vendor/res_outcome_printer/react_jsx_common.ml create mode 100644 analysis/vendor/res_outcome_printer/reactjs_jsx_ppx.ml create mode 100644 analysis/vendor/res_outcome_printer/reactjs_jsx_ppx.mli create mode 100644 analysis/vendor/res_outcome_printer/reactjs_jsx_v3.ml create mode 100644 analysis/vendor/res_outcome_printer/reactjs_jsx_v4.ml delete mode 100644 analysis/vendor/res_outcome_printer/res_driver_reason_binary.ml delete mode 100644 analysis/vendor/res_outcome_printer/res_driver_reason_binary.mli diff --git a/analysis/dune b/analysis/dune index 83bb8861c..5ce956be5 100644 --- a/analysis/dune +++ b/analysis/dune @@ -1 +1,16 @@ (dirs src reanalyze vendor) + +(env + (dev + (env-vars + (CPPO_FLAGS -U=RELEASE))) + (release + (env-vars + (CPPO_FLAGS -D=RELEASE)) + (ocamlopt_flags + (:standard -O3 -unbox-closures))) + (static + (env-vars + (CPPO_FLAGS -D=RELEASE)) + (ocamlopt_flags + (:standard -O3 -unbox-closures)))) diff --git a/analysis/dune-project b/analysis/dune-project index 6d2e34ad0..47a122217 100644 --- a/analysis/dune-project +++ b/analysis/dune-project @@ -1,4 +1,4 @@ -(lang dune 2.0) +(lang dune 2.3) (generate_opam_files true) @@ -18,6 +18,8 @@ (>= 4.10)) (ocamlformat (= 0.22.4)) + (cppo + (= 1.6.9)) (reanalyze (= 2.23.0)) dune)) diff --git a/analysis/reanalyze/src/Paths.ml b/analysis/reanalyze/src/Paths.ml index eea3422c9..8ff08a4bc 100644 --- a/analysis/reanalyze/src/Paths.ml +++ b/analysis/reanalyze/src/Paths.ml @@ -1,5 +1,5 @@ open Common -module StringMap = Ext_json_types.StringMap +module StringMap = Map_string let bsconfig = "bsconfig.json" @@ -138,19 +138,19 @@ let readDirsFromConfig ~configSources = in let rec processSourceItem (sourceItem : Ext_json_types.t) = match sourceItem with - | Str str -> str |> processDir ~subdirs:false - | Obj map -> ( - match map |> StringMap.find_opt "dir" with - | Some (Str str) -> + | Str {str} -> str |> processDir ~subdirs:false + | Obj {map} -> ( + match StringMap.find_opt map "dir" with + | Some (Str {str}) -> let subdirs = - match map |> StringMap.find_opt "subdirs" with + match StringMap.find_opt map "subdirs" with | Some (True _) -> true | Some (False _) -> false | _ -> false in str |> processDir ~subdirs | _ -> ()) - | Arr arr -> arr |> Array.iter processSourceItem + | Arr {content = arr} -> arr |> Array.iter processSourceItem | _ -> () in (match configSources with @@ -166,13 +166,13 @@ let readSourceDirs ~configSources = let dirs = ref [] in let readDirs json = match json with - | Ext_json_types.Obj map -> ( - match map |> StringMap.find_opt "dirs" with - | Some (Arr arr) -> + | Ext_json_types.Obj {map} -> ( + match StringMap.find_opt map "dirs" with + | Some (Arr {content = arr}) -> arr |> Array.iter (fun x -> match x with - | Ext_json_types.Str str -> dirs := str :: !dirs + | Ext_json_types.Str {str} -> dirs := str :: !dirs | _ -> ()); () | _ -> ()) @@ -181,12 +181,12 @@ let readSourceDirs ~configSources = if sourceDirs |> Sys.file_exists then let jsonOpt = sourceDirs |> Ext_json_parse.parse_json_from_file in match jsonOpt with - | Some json -> + | exception _ -> () + | json -> if runConfig.bsbProjectRoot <> runConfig.projectRoot then ( readDirs json; dirs := readDirsFromConfig ~configSources) else readDirs json - | None -> () else ( if !Cli.debug then ( Log_.item "Warning: can't find source dirs: %s\n" sourceDirs; diff --git a/analysis/reanalyze/src/dune b/analysis/reanalyze/src/dune index a3a9ce2cd..eb0057f6f 100644 --- a/analysis/reanalyze/src/dune +++ b/analysis/reanalyze/src/dune @@ -2,7 +2,7 @@ (name reanalyze) (flags (-w "+6+26+27+32+33+39") - (-open Compilerlibs406) (-open Jsonlib) - (-open Ext)) - (libraries compilerlibs406 jsonlib ext str unix)) + (-open Ext) + (-open Ml)) + (libraries jsonlib ext ml str unix)) diff --git a/analysis/rescript-vscode.opam b/analysis/rescript-vscode.opam index 2e2d3f539..1645dea53 100644 --- a/analysis/rescript-vscode.opam +++ b/analysis/rescript-vscode.opam @@ -8,6 +8,7 @@ bug-reports: "https://github.com/rescript-lang/rescript-vscode/issues" depends: [ "ocaml" {>= "4.10"} "ocamlformat" {= "0.22.4"} + "cppo" {= "1.6.9"} "reanalyze" {= "2.23.0"} "dune" ] diff --git a/analysis/src/DumpAst.ml b/analysis/src/DumpAst.ml index dc841b41a..8f9a2a34b 100644 --- a/analysis/src/DumpAst.ml +++ b/analysis/src/DumpAst.ml @@ -42,7 +42,7 @@ let printAttributes attributes = let printConstant const = match const with | Parsetree.Pconst_integer (s, _) -> "Pconst_integer(" ^ s ^ ")" - | Pconst_char c -> "Pconst_char(" ^ String.make 1 c ^ ")" + | Pconst_char c -> "Pconst_char(" ^ String.make 1 (Char.chr c) ^ ")" | Pconst_string (s, delim) -> let delim = match delim with @@ -312,4 +312,4 @@ let dump ~currentFile ~pos = print_endline (structure |> List.map (fun structItem -> printStructItem structItem ~pos ~source) - |> String.concat "") \ No newline at end of file + |> String.concat "") diff --git a/analysis/src/dune b/analysis/src/dune index ce61e09de..072f1db77 100644 --- a/analysis/src/dune +++ b/analysis/src/dune @@ -5,8 +5,9 @@ (name Cli) (flags (-w "+6+26+27+32+33+39") - (-open Compilerlibs406) (-open Jsonlib) - (-open Outcomeprinter)) + (-open Outcomeprinter) + (-open Ext) + (-open Ml)) ; Depends on: - (libraries unix str compilerlibs406 jsonlib outcomeprinter reanalyze)) + (libraries unix str ext ml jsonlib outcomeprinter reanalyze)) diff --git a/analysis/vendor/compiler-libs-406/arg_helper.ml b/analysis/vendor/compiler-libs-406/arg_helper.ml deleted file mode 100644 index fa80007ad..000000000 --- a/analysis/vendor/compiler-libs-406/arg_helper.ml +++ /dev/null @@ -1,127 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Pierre Chambart, OCamlPro *) -(* Mark Shinwell and Leo White, Jane Street Europe *) -(* *) -(* Copyright 2015--2016 OCamlPro SAS *) -(* Copyright 2015--2016 Jane Street Group LLC *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -let fatal err = - prerr_endline err; - exit 2 - -module Make (S : sig - module Key : sig - type t - val of_string : string -> t - module Map : Map.S with type key = t - end - - module Value : sig - type t - val of_string : string -> t - end -end) = struct - type parsed = { - base_default : S.Value.t; - base_override : S.Value.t S.Key.Map.t; - user_default : S.Value.t option; - user_override : S.Value.t S.Key.Map.t; - } - - let default v = - { base_default = v; - base_override = S.Key.Map.empty; - user_default = None; - user_override = S.Key.Map.empty; } - - let set_base_default value t = - { t with base_default = value } - - let add_base_override key value t = - { t with base_override = S.Key.Map.add key value t.base_override } - - let reset_base_overrides t = - { t with base_override = S.Key.Map.empty } - - let set_user_default value t = - { t with user_default = Some value } - - let add_user_override key value t = - { t with user_override = S.Key.Map.add key value t.user_override } - - exception Parse_failure of exn - - let parse_exn str ~update = - (* Is the removal of empty chunks really relevant here? *) - (* (It has been added to mimic the old Misc.String.split.) *) - let values = String.split_on_char ',' str |> List.filter ((<>) "") in - let parsed = - List.fold_left (fun acc value -> - match String.index value '=' with - | exception Not_found -> - begin match S.Value.of_string value with - | value -> set_user_default value acc - | exception exn -> raise (Parse_failure exn) - end - | equals -> - let key_value_pair = value in - let length = String.length key_value_pair in - assert (equals >= 0 && equals < length); - if equals = 0 then begin - raise (Parse_failure ( - Failure "Missing key in argument specification")) - end; - let key = - let key = String.sub key_value_pair 0 equals in - try S.Key.of_string key - with exn -> raise (Parse_failure exn) - in - let value = - let value = - String.sub key_value_pair (equals + 1) (length - equals - 1) - in - try S.Value.of_string value - with exn -> raise (Parse_failure exn) - in - add_user_override key value acc) - !update - values - in - update := parsed - - let parse str help_text update = - match parse_exn str ~update with - | () -> () - | exception (Parse_failure exn) -> - fatal (Printf.sprintf "%s: %s" (Printexc.to_string exn) help_text) - - type parse_result = - | Ok - | Parse_failed of exn - - let parse_no_error str update = - match parse_exn str ~update with - | () -> Ok - | exception (Parse_failure exn) -> Parse_failed exn - - let get ~key parsed = - match S.Key.Map.find key parsed.user_override with - | value -> value - | exception Not_found -> - match parsed.user_default with - | Some value -> value - | None -> - match S.Key.Map.find key parsed.base_override with - | value -> value - | exception Not_found -> parsed.base_default - -end diff --git a/analysis/vendor/compiler-libs-406/arg_helper.mli b/analysis/vendor/compiler-libs-406/arg_helper.mli deleted file mode 100644 index fba7aa218..000000000 --- a/analysis/vendor/compiler-libs-406/arg_helper.mli +++ /dev/null @@ -1,63 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Pierre Chambart, OCamlPro *) -(* Mark Shinwell and Leo White, Jane Street Europe *) -(* *) -(* Copyright 2015--2016 OCamlPro SAS *) -(* Copyright 2015--2016 Jane Street Group LLC *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Decipher command line arguments of the form - | =[,...] - (as used for example for the specification of inlining parameters - varying by simplification round). -*) - -module Make (S : sig - module Key : sig - type t - - (** The textual representation of a key must not contain '=' or ','. *) - val of_string : string -> t - - module Map : Map.S with type key = t - end - - module Value : sig - type t - - (** The textual representation of a value must not contain ','. *) - val of_string : string -> t - end -end) : sig - type parsed - - val default : S.Value.t -> parsed - - val set_base_default : S.Value.t -> parsed -> parsed - - val add_base_override : S.Key.t -> S.Value.t -> parsed -> parsed - - val reset_base_overrides : parsed -> parsed - - val set_user_default : S.Value.t -> parsed -> parsed - - val add_user_override : S.Key.t -> S.Value.t -> parsed -> parsed - - val parse : string -> string -> parsed ref -> unit - - type parse_result = - | Ok - | Parse_failed of exn - - val parse_no_error : string -> parsed ref -> parse_result - - val get : key:S.Key.t -> parsed -> S.Value.t -end diff --git a/analysis/vendor/compiler-libs-406/attr_helper.ml b/analysis/vendor/compiler-libs-406/attr_helper.ml deleted file mode 100644 index ecf87787a..000000000 --- a/analysis/vendor/compiler-libs-406/attr_helper.ml +++ /dev/null @@ -1,54 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Jeremie Dimino, Jane Street Europe *) -(* *) -(* Copyright 2015 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -open Asttypes -open Parsetree - -type error = - | Multiple_attributes of string - | No_payload_expected of string - -exception Error of Location.t * error - -let get_no_payload_attribute alt_names attrs = - match List.filter (fun (n, _) -> List.mem n.txt alt_names) attrs with - | [] -> None - | [ (name, PStr []) ] -> Some name - | [ (name, _) ] -> - raise (Error (name.loc, No_payload_expected name.txt)) - | _ :: (name, _) :: _ -> - raise (Error (name.loc, Multiple_attributes name.txt)) - -let has_no_payload_attribute alt_names attrs = - match get_no_payload_attribute alt_names attrs with - | None -> false - | Some _ -> true - -open Format - -let report_error ppf = function - | Multiple_attributes name -> - fprintf ppf "Too many `%s' attributes" name - | No_payload_expected name -> - fprintf ppf "Attribute `%s' does not accept a payload" name - -let () = - Location.register_error_of_exn - (function - | Error (loc, err) -> - Some (Location.error_of_printer loc report_error err) - | _ -> - None - ) diff --git a/analysis/vendor/compiler-libs-406/bsb_db_decode.ml b/analysis/vendor/compiler-libs-406/bsb_db_decode.ml deleted file mode 100644 index de74fdb27..000000000 --- a/analysis/vendor/compiler-libs-406/bsb_db_decode.ml +++ /dev/null @@ -1,165 +0,0 @@ -(* Copyright (C) 2019 - Present Authors of BuckleScript - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * In addition to the permissions granted to you by the LGPL, you may combine - * or link a "work that uses the Library" with a publicly distributed version - * of this file to produce a combined library or application, then distribute - * that combined work under the terms of your choosing, with no requirement - * to comply with the obligations normally placed on you by section 4 of the - * LGPL version 3 (or the corresponding section of a later version of the LGPL - * should you choose to use a later version). - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - - - type group = { - modules : string array ; - dir_length : int; - dir_info_offset : int ; - module_info_offset : int; - } - -type t = group array * string (* string is whole content*) - - -type cursor = int ref - - -(*TODO: special case when module_count is zero *) -let rec decode_internal (x : string) (offset : cursor) = - let len = Ext_pervasives.parse_nat_of_string x offset in - incr offset; - let first = decode_single x offset in - if len = 1 then [|first|] - else - let result = Array.make len first in - for i = 1 to len - 1 do - Array.unsafe_set result i (decode_single x offset) - done ; - result - -and decode_single (x : string) (offset : cursor) : group = - let module_number = Ext_pervasives.parse_nat_of_string x offset in - incr offset; - let modules = decode_modules x offset module_number in - let dir_info_offset = !offset in - let module_info_offset = - String.index_from x dir_info_offset '\n' + 1 in - let dir_length = Char.code x.[module_info_offset] - 48 (* Char.code '0'*) in - offset := - module_info_offset + - 1 + - dir_length * module_number + - 1 - ; - { modules ; dir_info_offset; module_info_offset ; dir_length} -and decode_modules (x : string) (offset : cursor) module_number : string array = - let result = Array.make module_number "" in - let last = ref !offset in - let cur = ref !offset in - let tasks = ref 0 in - while !tasks <> module_number do - if String.unsafe_get x !cur = '\n' then - begin - let offs = !last in - let len = (!cur - !last) in - Array.unsafe_set result !tasks - (Ext_string.unsafe_sub x offs len); - incr tasks; - last := !cur + 1; - end; - incr cur - done ; - offset := !cur; - result - - -(* TODO: shall we check the consistency of digest *) -let read_build_file ~filename : group array = - let all_content = - Ext_io.load_file filename in - decode_internal all_content (ref (Ext_digest.length + 1)) - -(* Invariant: the same as encoding String_map.compare_key *) -let cmp = Ext_string.compare - - -let rec binarySearchAux (arr : string array) (lo : int) (hi : int) (key : string) : _ option = - let mid = (lo + hi)/2 in - let midVal = Array.unsafe_get arr mid in - let c = cmp key midVal in - if c = 0 then Some (mid) - else if c < 0 then (* a[lo] =< key < a[mid] <= a[hi] *) - if hi = mid then - let loVal = (Array.unsafe_get arr lo) in - if loVal = key then Some lo - else None - else binarySearchAux arr lo mid key - else (* a[lo] =< a[mid] < key <= a[hi] *) - if lo = mid then - let hiVal = (Array.unsafe_get arr hi) in - if hiVal = key then Some hi - else None - else binarySearchAux arr mid hi key - -let find_opt_aux sorted key : _ option = - let len = Array.length sorted in - if len = 0 then None - else - let lo = Array.unsafe_get sorted 0 in - let c = cmp key lo in - if c < 0 then None - else - let hi = Array.unsafe_get sorted (len - 1) in - let c2 = cmp key hi in - if c2 > 0 then None - else binarySearchAux sorted 0 (len - 1) key - - - -type module_info = { - case : bool ; (* which is Bsb_db.case*) - dir_name : string -} - - -let find_opt - ((sorteds,whole) : t ) i (key : string) - : module_info option = - let group = sorteds.(i) in - let i = find_opt_aux group.modules key in - match i with - | None -> None - | Some count -> - let encode_len = group.dir_length in - let index = - Ext_string.get_1_2_3_4 whole - ~off:(group.module_info_offset + 1 + count * encode_len) - encode_len - in - let case = not (index mod 2 = 0) in - let ith = index lsr 1 in - let dir_name_start = - if ith = 0 then group.dir_info_offset - else - Ext_string.index_count - whole group.dir_info_offset '\t' - ith + 1 - in - let dir_name_finish = - String.index_from - whole dir_name_start '\t' - in - Some {case ; dir_name = String.sub whole dir_name_start (dir_name_finish - dir_name_start)} - \ No newline at end of file diff --git a/analysis/vendor/compiler-libs-406/camlinternalBigarray.ml b/analysis/vendor/compiler-libs-406/camlinternalBigarray.ml deleted file mode 100644 index 04d908bea..000000000 --- a/analysis/vendor/compiler-libs-406/camlinternalBigarray.ml +++ /dev/null @@ -1,54 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Manuel Serrano and Xavier Leroy, INRIA Rocquencourt *) -(* *) -(* Copyright 2000 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Bigarray types. These must be kept in sync with the tables in - ../typing/typeopt.ml *) - -type float32_elt = Float32_elt -type float64_elt = Float64_elt -type int8_signed_elt = Int8_signed_elt -type int8_unsigned_elt = Int8_unsigned_elt -type int16_signed_elt = Int16_signed_elt -type int16_unsigned_elt = Int16_unsigned_elt -type int32_elt = Int32_elt -type int64_elt = Int64_elt -type int_elt = Int_elt -type nativeint_elt = Nativeint_elt -type complex32_elt = Complex32_elt -type complex64_elt = Complex64_elt - -type ('a, 'b) kind = - Float32 : (float, float32_elt) kind - | Float64 : (float, float64_elt) kind - | Int8_signed : (int, int8_signed_elt) kind - | Int8_unsigned : (int, int8_unsigned_elt) kind - | Int16_signed : (int, int16_signed_elt) kind - | Int16_unsigned : (int, int16_unsigned_elt) kind - | Int32 : (int32, int32_elt) kind - | Int64 : (int64, int64_elt) kind - | Int : (int, int_elt) kind - | Nativeint : (nativeint, nativeint_elt) kind - | Complex32 : (Complex.t, complex32_elt) kind - | Complex64 : (Complex.t, complex64_elt) kind - | Char : (char, int8_unsigned_elt) kind - -type c_layout = C_layout_typ -type fortran_layout = Fortran_layout_typ - -type 'a layout = - C_layout: c_layout layout - | Fortran_layout: fortran_layout layout - -type ('a, 'b, 'c) genarray diff --git a/analysis/vendor/compiler-libs-406/camlinternalLazy.ml b/analysis/vendor/compiler-libs-406/camlinternalLazy.ml deleted file mode 100644 index f64be62e3..000000000 --- a/analysis/vendor/compiler-libs-406/camlinternalLazy.ml +++ /dev/null @@ -1,65 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Damien Doligez, projet Para, INRIA Rocquencourt *) -(* *) -(* Copyright 1997 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Internals of forcing lazy values. *) - -exception Undefined - -let raise_undefined = Obj.repr (fun () -> raise Undefined) - -(* Assume [blk] is a block with tag lazy *) -let force_lazy_block (blk : 'arg lazy_t) = - let closure = (Obj.obj (Obj.field (Obj.repr blk) 0) : unit -> 'arg) in - Obj.set_field (Obj.repr blk) 0 raise_undefined; - try - let result = closure () in - (* do set_field BEFORE set_tag *) - Obj.set_field (Obj.repr blk) 0 (Obj.repr result); - Obj.set_tag (Obj.repr blk) Obj.forward_tag; - result - with e -> - Obj.set_field (Obj.repr blk) 0 (Obj.repr (fun () -> raise e)); - raise e - - -(* Assume [blk] is a block with tag lazy *) -let force_val_lazy_block (blk : 'arg lazy_t) = - let closure = (Obj.obj (Obj.field (Obj.repr blk) 0) : unit -> 'arg) in - Obj.set_field (Obj.repr blk) 0 raise_undefined; - let result = closure () in - (* do set_field BEFORE set_tag *) - Obj.set_field (Obj.repr blk) 0 (Obj.repr result); - Obj.set_tag (Obj.repr blk) (Obj.forward_tag); - result - - -(* [force] is not used, since [Lazy.force] is declared as a primitive - whose code inlines the tag tests of its argument. This function is - here for the sake of completeness, and for debugging purpose. *) - -let force (lzv : 'arg lazy_t) = - let x = Obj.repr lzv in - let t = Obj.tag x in - if t = Obj.forward_tag then (Obj.obj (Obj.field x 0) : 'arg) else - if t <> Obj.lazy_tag then (Obj.obj x : 'arg) - else force_lazy_block lzv - - -let force_val (lzv : 'arg lazy_t) = - let x = Obj.repr lzv in - let t = Obj.tag x in - if t = Obj.forward_tag then (Obj.obj (Obj.field x 0) : 'arg) else - if t <> Obj.lazy_tag then (Obj.obj x : 'arg) - else force_val_lazy_block lzv diff --git a/analysis/vendor/compiler-libs-406/camlinternalMod.ml b/analysis/vendor/compiler-libs-406/camlinternalMod.ml deleted file mode 100644 index 5ccf92893..000000000 --- a/analysis/vendor/compiler-libs-406/camlinternalMod.ml +++ /dev/null @@ -1,74 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 2004 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -type shape = - | Function - | Lazy - | Class - | Module of shape array - | Value of Obj.t - -let overwrite o n = - assert (Obj.size o >= Obj.size n); - for i = 0 to Obj.size n - 1 do - Obj.set_field o i (Obj.field n i) - done - -let rec init_mod loc shape = - match shape with - | Function -> - (* Two code pointer words (curried and full application), arity - and eight environment entries makes 11 words. *) - let closure = Obj.new_block Obj.closure_tag 11 in - let template = - Obj.repr (fun _ -> raise (Undefined_recursive_module loc)) - in - overwrite closure template; - closure - | Lazy -> - Obj.repr (lazy (raise (Undefined_recursive_module loc))) - | Class -> - Obj.repr (CamlinternalOO.dummy_class loc) - | Module comps -> - Obj.repr (Array.map (init_mod loc) comps) - | Value v -> - v - -let rec update_mod shape o n = - match shape with - | Function -> - if Obj.tag n = Obj.closure_tag && Obj.size n <= Obj.size o - then begin overwrite o n; Obj.truncate o (Obj.size n) (* PR#4008 *) end - else overwrite o (Obj.repr (fun x -> (Obj.obj n : _ -> _) x)) - | Lazy -> - if Obj.tag n = Obj.lazy_tag then - Obj.set_field o 0 (Obj.field n 0) - else if Obj.tag n = Obj.forward_tag then begin (* PR#4316 *) - Obj.set_tag o Obj.forward_tag; - Obj.set_field o 0 (Obj.field n 0) - end else begin - (* forwarding pointer was shortcut by GC *) - Obj.set_tag o Obj.forward_tag; - Obj.set_field o 0 n - end - | Class -> - assert (Obj.tag n = 0 && Obj.size n = 4); - overwrite o n - | Module comps -> - assert (Obj.tag n = 0 && Obj.size n >= Array.length comps); - for i = 0 to Array.length comps - 1 do - update_mod comps.(i) (Obj.field o i) (Obj.field n i) - done - | Value _ -> () (* the value is already there *) diff --git a/analysis/vendor/compiler-libs-406/camlinternalMod.mli b/analysis/vendor/compiler-libs-406/camlinternalMod.mli deleted file mode 100644 index cf7ffb09d..000000000 --- a/analysis/vendor/compiler-libs-406/camlinternalMod.mli +++ /dev/null @@ -1,28 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 2004 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Run-time support for recursive modules. - All functions in this module are for system use only, not for the - casual user. *) - -type shape = - | Function - | Lazy - | Class - | Module of shape array - | Value of Obj.t - -val init_mod: string * int * int -> shape -> Obj.t -val update_mod: shape -> Obj.t -> Obj.t -> unit diff --git a/analysis/vendor/compiler-libs-406/camlinternalOO.ml b/analysis/vendor/compiler-libs-406/camlinternalOO.ml deleted file mode 100644 index 0188c148c..000000000 --- a/analysis/vendor/compiler-libs-406/camlinternalOO.ml +++ /dev/null @@ -1,613 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 2002 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -open Obj - -(**** Object representation ****) - -external set_id: 'a -> 'a = "caml_set_oo_id" [@@noalloc] - -(**** Object copy ****) - -let copy o = - let o = (Obj.obj (Obj.dup (Obj.repr o))) in - set_id o - -(**** Compression options ****) -(* Parameters *) -type params = { - mutable compact_table : bool; - mutable copy_parent : bool; - mutable clean_when_copying : bool; - mutable retry_count : int; - mutable bucket_small_size : int - } - -let params = { - compact_table = true; - copy_parent = true; - clean_when_copying = true; - retry_count = 3; - bucket_small_size = 16 -} - -(**** Parameters ****) - -let initial_object_size = 2 - -(**** Items ****) - -type item = DummyA | DummyB | DummyC of int -let _ = [DummyA; DummyB; DummyC 0] (* to avoid warnings *) - -let dummy_item = (magic () : item) - -(**** Types ****) - -type tag -type label = int -type closure = item -type t = DummyA | DummyB | DummyC of int -let _ = [DummyA; DummyB; DummyC 0] (* to avoid warnings *) - -type obj = t array -external ret : (obj -> 'a) -> closure = "%identity" - -(**** Labels ****) - -let public_method_label s : tag = - let accu = ref 0 in - for i = 0 to String.length s - 1 do - accu := 223 * !accu + Char.code s.[i] - done; - (* reduce to 31 bits *) - accu := !accu land (1 lsl 31 - 1); - (* make it signed for 64 bits architectures *) - let tag = if !accu > 0x3FFFFFFF then !accu - (1 lsl 31) else !accu in - (* Printf.eprintf "%s = %d\n" s tag; flush stderr; *) - magic tag - -(**** Sparse array ****) - -module Vars = - Map.Make(struct type t = string let compare (x:t) y = compare x y end) -type vars = int Vars.t - -module Meths = - Map.Make(struct type t = string let compare (x:t) y = compare x y end) -type meths = label Meths.t -module Labs = - Map.Make(struct type t = label let compare (x:t) y = compare x y end) -type labs = bool Labs.t - -(* The compiler assumes that the first field of this structure is [size]. *) -type table = - { mutable size: int; - mutable methods: closure array; - mutable methods_by_name: meths; - mutable methods_by_label: labs; - mutable previous_states: - (meths * labs * (label * item) list * vars * - label list * string list) list; - mutable hidden_meths: (label * item) list; - mutable vars: vars; - mutable initializers: (obj -> unit) list } - -let dummy_table = - { methods = [| dummy_item |]; - methods_by_name = Meths.empty; - methods_by_label = Labs.empty; - previous_states = []; - hidden_meths = []; - vars = Vars.empty; - initializers = []; - size = 0 } - -let table_count = ref 0 - -(* dummy_met should be a pointer, so use an atom *) -let dummy_met : item = obj (Obj.new_block 0 0) -(* if debugging is needed, this could be a good idea: *) -(* let dummy_met () = failwith "Undefined method" *) - -let rec fit_size n = - if n <= 2 then n else - fit_size ((n+1)/2) * 2 - -let new_table pub_labels = - incr table_count; - let len = Array.length pub_labels in - let methods = Array.make (len*2+2) dummy_met in - methods.(0) <- magic len; - methods.(1) <- magic (fit_size len * Sys.word_size / 8 - 1); - for i = 0 to len - 1 do methods.(i*2+3) <- magic pub_labels.(i) done; - { methods = methods; - methods_by_name = Meths.empty; - methods_by_label = Labs.empty; - previous_states = []; - hidden_meths = []; - vars = Vars.empty; - initializers = []; - size = initial_object_size } - -let resize array new_size = - let old_size = Array.length array.methods in - if new_size > old_size then begin - let new_buck = Array.make new_size dummy_met in - Array.blit array.methods 0 new_buck 0 old_size; - array.methods <- new_buck - end - -let put array label element = - resize array (label + 1); - array.methods.(label) <- element - -(**** Classes ****) - -let method_count = ref 0 -let inst_var_count = ref 0 - -(* type t *) -type meth = item - -let new_method table = - let index = Array.length table.methods in - resize table (index + 1); - index - -let get_method_label table name = - try - Meths.find name table.methods_by_name - with Not_found -> - let label = new_method table in - table.methods_by_name <- Meths.add name label table.methods_by_name; - table.methods_by_label <- Labs.add label true table.methods_by_label; - label - -let get_method_labels table names = - Array.map (get_method_label table) names - -let set_method table label element = - incr method_count; - if Labs.find label table.methods_by_label then - put table label element - else - table.hidden_meths <- (label, element) :: table.hidden_meths - -let get_method table label = - try List.assoc label table.hidden_meths - with Not_found -> table.methods.(label) - -let to_list arr = - if arr == magic 0 then [] else Array.to_list arr - -let narrow table vars virt_meths concr_meths = - let vars = to_list vars - and virt_meths = to_list virt_meths - and concr_meths = to_list concr_meths in - let virt_meth_labs = List.map (get_method_label table) virt_meths in - let concr_meth_labs = List.map (get_method_label table) concr_meths in - table.previous_states <- - (table.methods_by_name, table.methods_by_label, table.hidden_meths, - table.vars, virt_meth_labs, vars) - :: table.previous_states; - table.vars <- - Vars.fold - (fun lab info tvars -> - if List.mem lab vars then Vars.add lab info tvars else tvars) - table.vars Vars.empty; - let by_name = ref Meths.empty in - let by_label = ref Labs.empty in - List.iter2 - (fun met label -> - by_name := Meths.add met label !by_name; - by_label := - Labs.add label - (try Labs.find label table.methods_by_label with Not_found -> true) - !by_label) - concr_meths concr_meth_labs; - List.iter2 - (fun met label -> - by_name := Meths.add met label !by_name; - by_label := Labs.add label false !by_label) - virt_meths virt_meth_labs; - table.methods_by_name <- !by_name; - table.methods_by_label <- !by_label; - table.hidden_meths <- - List.fold_right - (fun ((lab, _) as met) hm -> - if List.mem lab virt_meth_labs then hm else met::hm) - table.hidden_meths - [] - -let widen table = - let (by_name, by_label, saved_hidden_meths, saved_vars, virt_meths, vars) = - List.hd table.previous_states - in - table.previous_states <- List.tl table.previous_states; - table.vars <- - List.fold_left - (fun s v -> Vars.add v (Vars.find v table.vars) s) - saved_vars vars; - table.methods_by_name <- by_name; - table.methods_by_label <- by_label; - table.hidden_meths <- - List.fold_right - (fun ((lab, _) as met) hm -> - if List.mem lab virt_meths then hm else met::hm) - table.hidden_meths - saved_hidden_meths - -let new_slot table = - let index = table.size in - table.size <- index + 1; - index - -let new_variable table name = - try Vars.find name table.vars - with Not_found -> - let index = new_slot table in - if name <> "" then table.vars <- Vars.add name index table.vars; - index - -let to_array arr = - if arr = Obj.magic 0 then [||] else arr - -let new_methods_variables table meths vals = - let meths = to_array meths in - let nmeths = Array.length meths and nvals = Array.length vals in - let res = Array.make (nmeths + nvals) 0 in - for i = 0 to nmeths - 1 do - res.(i) <- get_method_label table meths.(i) - done; - for i = 0 to nvals - 1 do - res.(i+nmeths) <- new_variable table vals.(i) - done; - res - -let get_variable table name = - try Vars.find name table.vars with Not_found -> assert false - -let get_variables table names = - Array.map (get_variable table) names - -let add_initializer table f = - table.initializers <- f::table.initializers - -(* -module Keys = - Map.Make(struct type t = tag array let compare (x:t) y = compare x y end) -let key_map = ref Keys.empty -let get_key tags : item = - try magic (Keys.find tags !key_map : tag array) - with Not_found -> - key_map := Keys.add tags tags !key_map; - magic tags -*) - -let create_table public_methods = - if public_methods == magic 0 then new_table [||] else - (* [public_methods] must be in ascending order for bytecode *) - let tags = Array.map public_method_label public_methods in - let table = new_table tags in - Array.iteri - (fun i met -> - let lab = i*2+2 in - table.methods_by_name <- Meths.add met lab table.methods_by_name; - table.methods_by_label <- Labs.add lab true table.methods_by_label) - public_methods; - table - -let init_class table = - inst_var_count := !inst_var_count + table.size - 1; - table.initializers <- List.rev table.initializers; - resize table (3 + magic table.methods.(1) * 16 / Sys.word_size) - -let inherits cla vals virt_meths concr_meths (_, super, _, env) top = - narrow cla vals virt_meths concr_meths; - let init = - if top then super cla env else Obj.repr (super cla) in - widen cla; - Array.concat - [[| repr init |]; - magic (Array.map (get_variable cla) (to_array vals) : int array); - Array.map - (fun nm -> repr (get_method cla (get_method_label cla nm) : closure)) - (to_array concr_meths) ] - -let make_class pub_meths class_init = - let table = create_table pub_meths in - let env_init = class_init table in - init_class table; - (env_init (Obj.repr 0), class_init, env_init, Obj.repr 0) - -type init_table = { mutable env_init: t; mutable class_init: table -> t } - -let make_class_store pub_meths class_init init_table = - let table = create_table pub_meths in - let env_init = class_init table in - init_class table; - init_table.class_init <- class_init; - init_table.env_init <- env_init - -let dummy_class loc = - let undef = fun _ -> raise (Undefined_recursive_module loc) in - (Obj.magic undef, undef, undef, Obj.repr 0) - -(**** Objects ****) - -let create_object table = - (* XXX Appel de [obj_block] | Call to [obj_block] *) - let obj = Obj.new_block Obj.object_tag table.size in - (* XXX Appel de [caml_modify] | Call to [caml_modify] *) - Obj.set_field obj 0 (Obj.repr table.methods); - Obj.obj (set_id obj) - -let create_object_opt obj_0 table = - if (Obj.magic obj_0 : bool) then obj_0 else begin - (* XXX Appel de [obj_block] | Call to [obj_block] *) - let obj = Obj.new_block Obj.object_tag table.size in - (* XXX Appel de [caml_modify] | Call to [caml_modify] *) - Obj.set_field obj 0 (Obj.repr table.methods); - Obj.obj (set_id obj) - end - -let rec iter_f obj = - function - [] -> () - | f::l -> f obj; iter_f obj l - -let run_initializers obj table = - let inits = table.initializers in - if inits <> [] then - iter_f obj inits - -let run_initializers_opt obj_0 obj table = - if (Obj.magic obj_0 : bool) then obj else begin - let inits = table.initializers in - if inits <> [] then iter_f obj inits; - obj - end - -let create_object_and_run_initializers obj_0 table = - if (Obj.magic obj_0 : bool) then obj_0 else begin - let obj = create_object table in - run_initializers obj table; - obj - end - -(* Equivalent primitive below -let sendself obj lab = - (magic obj : (obj -> t) array array).(0).(lab) obj -*) -external send : obj -> tag -> 'a = "%send" -external sendcache : obj -> tag -> t -> int -> 'a = "%sendcache" -external sendself : obj -> label -> 'a = "%sendself" -external get_public_method : obj -> tag -> closure - = "caml_get_public_method" [@@noalloc] - -(**** table collection access ****) - -type tables = - | Empty - | Cons of {key : closure; mutable data: tables; mutable next: tables} - -let set_data tables v = match tables with - | Empty -> assert false - | Cons tables -> tables.data <- v -let set_next tables v = match tables with - | Empty -> assert false - | Cons tables -> tables.next <- v -let get_key = function - | Empty -> assert false - | Cons tables -> tables.key -let get_data = function - | Empty -> assert false - | Cons tables -> tables.data -let get_next = function - | Empty -> assert false - | Cons tables -> tables.next - -let build_path n keys tables = - let res = Cons {key = Obj.magic 0; data = Empty; next = Empty} in - let r = ref res in - for i = 0 to n do - r := Cons {key = keys.(i); data = !r; next = Empty} - done; - set_data tables !r; - res - -let rec lookup_keys i keys tables = - if i < 0 then tables else - let key = keys.(i) in - let rec lookup_key (tables:tables) = - if get_key tables == key then - match get_data tables with - | Empty -> assert false - | Cons _ as tables_data -> - lookup_keys (i-1) keys tables_data - else - match get_next tables with - | Cons _ as next -> lookup_key next - | Empty -> - let next : tables = Cons {key; data = Empty; next = Empty} in - set_next tables next; - build_path (i-1) keys next - in - lookup_key tables - -let lookup_tables root keys = - match get_data root with - | Cons _ as root_data -> - lookup_keys (Array.length keys - 1) keys root_data - | Empty -> - build_path (Array.length keys - 1) keys root - -(**** builtin methods ****) - -let get_const x = ret (fun _obj -> x) -let get_var n = ret (fun obj -> Array.unsafe_get obj n) -let get_env e n = - ret (fun obj -> - Array.unsafe_get (Obj.magic (Array.unsafe_get obj e) : obj) n) -let get_meth n = ret (fun obj -> sendself obj n) -let set_var n = ret (fun obj x -> Array.unsafe_set obj n x) -let app_const f x = ret (fun _obj -> f x) -let app_var f n = ret (fun obj -> f (Array.unsafe_get obj n)) -let app_env f e n = - ret (fun obj -> - f (Array.unsafe_get (Obj.magic (Array.unsafe_get obj e) : obj) n)) -let app_meth f n = ret (fun obj -> f (sendself obj n)) -let app_const_const f x y = ret (fun _obj -> f x y) -let app_const_var f x n = ret (fun obj -> f x (Array.unsafe_get obj n)) -let app_const_meth f x n = ret (fun obj -> f x (sendself obj n)) -let app_var_const f n x = ret (fun obj -> f (Array.unsafe_get obj n) x) -let app_meth_const f n x = ret (fun obj -> f (sendself obj n) x) -let app_const_env f x e n = - ret (fun obj -> - f x (Array.unsafe_get (Obj.magic (Array.unsafe_get obj e) : obj) n)) -let app_env_const f e n x = - ret (fun obj -> - f (Array.unsafe_get (Obj.magic (Array.unsafe_get obj e) : obj) n) x) -let meth_app_const n x = ret (fun obj -> (sendself obj n : _ -> _) x) -let meth_app_var n m = - ret (fun obj -> (sendself obj n : _ -> _) (Array.unsafe_get obj m)) -let meth_app_env n e m = - ret (fun obj -> (sendself obj n : _ -> _) - (Array.unsafe_get (Obj.magic (Array.unsafe_get obj e) : obj) m)) -let meth_app_meth n m = - ret (fun obj -> (sendself obj n : _ -> _) (sendself obj m)) -let send_const m x c = - ret (fun obj -> sendcache x m (Array.unsafe_get obj 0) c) -let send_var m n c = - ret (fun obj -> - sendcache (Obj.magic (Array.unsafe_get obj n) : obj) m - (Array.unsafe_get obj 0) c) -let send_env m e n c = - ret (fun obj -> - sendcache - (Obj.magic (Array.unsafe_get - (Obj.magic (Array.unsafe_get obj e) : obj) n) : obj) - m (Array.unsafe_get obj 0) c) -let send_meth m n c = - ret (fun obj -> - sendcache (sendself obj n) m (Array.unsafe_get obj 0) c) -let new_cache table = - let n = new_method table in - let n = - if n mod 2 = 0 || n > 2 + magic table.methods.(1) * 16 / Sys.word_size - then n else new_method table - in - table.methods.(n) <- Obj.magic 0; - n - -type impl = - GetConst - | GetVar - | GetEnv - | GetMeth - | SetVar - | AppConst - | AppVar - | AppEnv - | AppMeth - | AppConstConst - | AppConstVar - | AppConstEnv - | AppConstMeth - | AppVarConst - | AppEnvConst - | AppMethConst - | MethAppConst - | MethAppVar - | MethAppEnv - | MethAppMeth - | SendConst - | SendVar - | SendEnv - | SendMeth - | Closure of closure - -let method_impl table i arr = - let next () = incr i; magic arr.(!i) in - match next() with - GetConst -> let x : t = next() in get_const x - | GetVar -> let n = next() in get_var n - | GetEnv -> let e = next() in let n = next() in get_env e n - | GetMeth -> let n = next() in get_meth n - | SetVar -> let n = next() in set_var n - | AppConst -> let f = next() in let x = next() in app_const f x - | AppVar -> let f = next() in let n = next () in app_var f n - | AppEnv -> - let f = next() in let e = next() in let n = next() in - app_env f e n - | AppMeth -> let f = next() in let n = next () in app_meth f n - | AppConstConst -> - let f = next() in let x = next() in let y = next() in - app_const_const f x y - | AppConstVar -> - let f = next() in let x = next() in let n = next() in - app_const_var f x n - | AppConstEnv -> - let f = next() in let x = next() in let e = next () in let n = next() in - app_const_env f x e n - | AppConstMeth -> - let f = next() in let x = next() in let n = next() in - app_const_meth f x n - | AppVarConst -> - let f = next() in let n = next() in let x = next() in - app_var_const f n x - | AppEnvConst -> - let f = next() in let e = next () in let n = next() in let x = next() in - app_env_const f e n x - | AppMethConst -> - let f = next() in let n = next() in let x = next() in - app_meth_const f n x - | MethAppConst -> - let n = next() in let x = next() in meth_app_const n x - | MethAppVar -> - let n = next() in let m = next() in meth_app_var n m - | MethAppEnv -> - let n = next() in let e = next() in let m = next() in - meth_app_env n e m - | MethAppMeth -> - let n = next() in let m = next() in meth_app_meth n m - | SendConst -> - let m = next() in let x = next() in send_const m x (new_cache table) - | SendVar -> - let m = next() in let n = next () in send_var m n (new_cache table) - | SendEnv -> - let m = next() in let e = next() in let n = next() in - send_env m e n (new_cache table) - | SendMeth -> - let m = next() in let n = next () in send_meth m n (new_cache table) - | Closure _ as clo -> magic clo - -let set_methods table methods = - let len = Array.length methods in let i = ref 0 in - while !i < len do - let label = methods.(!i) in let clo = method_impl table i methods in - set_method table label clo; - incr i - done - -(**** Statistics ****) - -type stats = - { classes: int; methods: int; inst_vars: int; } - -let stats () = - { classes = !table_count; - methods = !method_count; inst_vars = !inst_var_count; } diff --git a/analysis/vendor/compiler-libs-406/camlinternalOO.mli b/analysis/vendor/compiler-libs-406/camlinternalOO.mli deleted file mode 100644 index b6ffc70d7..000000000 --- a/analysis/vendor/compiler-libs-406/camlinternalOO.mli +++ /dev/null @@ -1,153 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Run-time support for objects and classes. - All functions in this module are for system use only, not for the - casual user. *) - -(** {1 Classes} *) - -type tag -type label -type table -type meth -type t -type obj -type closure -val public_method_label : string -> tag -val new_method : table -> label -val new_variable : table -> string -> int -val new_methods_variables : - table -> string array -> string array -> label array -val get_variable : table -> string -> int -val get_variables : table -> string array -> int array -val get_method_label : table -> string -> label -val get_method_labels : table -> string array -> label array -val get_method : table -> label -> meth -val set_method : table -> label -> meth -> unit -val set_methods : table -> label array -> unit -val narrow : table -> string array -> string array -> string array -> unit -val widen : table -> unit -val add_initializer : table -> (obj -> unit) -> unit -val dummy_table : table -val create_table : string array -> table -val init_class : table -> unit -val inherits : - table -> string array -> string array -> string array -> - (t * (table -> obj -> Obj.t) * t * obj) -> bool -> Obj.t array -val make_class : - string array -> (table -> Obj.t -> t) -> - (t * (table -> Obj.t -> t) * (Obj.t -> t) * Obj.t) -type init_table -val make_class_store : - string array -> (table -> t) -> init_table -> unit -val dummy_class : - string * int * int -> - (t * (table -> Obj.t -> t) * (Obj.t -> t) * Obj.t) - -(** {1 Objects} *) - -val copy : (< .. > as 'a) -> 'a -val create_object : table -> obj -val create_object_opt : obj -> table -> obj -val run_initializers : obj -> table -> unit -val run_initializers_opt : obj -> obj -> table -> obj -val create_object_and_run_initializers : obj -> table -> obj -external send : obj -> tag -> t = "%send" -external sendcache : obj -> tag -> t -> int -> t = "%sendcache" -external sendself : obj -> label -> t = "%sendself" -external get_public_method : obj -> tag -> closure - = "caml_get_public_method" [@@noalloc] - -(** {1 Table cache} *) - -type tables -val lookup_tables : tables -> closure array -> tables - -(** {1 Builtins to reduce code size} *) - -(* -val get_const : t -> closure -val get_var : int -> closure -val get_env : int -> int -> closure -val get_meth : label -> closure -val set_var : int -> closure -val app_const : (t -> t) -> t -> closure -val app_var : (t -> t) -> int -> closure -val app_env : (t -> t) -> int -> int -> closure -val app_meth : (t -> t) -> label -> closure -val app_const_const : (t -> t -> t) -> t -> t -> closure -val app_const_var : (t -> t -> t) -> t -> int -> closure -val app_const_env : (t -> t -> t) -> t -> int -> int -> closure -val app_const_meth : (t -> t -> t) -> t -> label -> closure -val app_var_const : (t -> t -> t) -> int -> t -> closure -val app_env_const : (t -> t -> t) -> int -> int -> t -> closure -val app_meth_const : (t -> t -> t) -> label -> t -> closure -val meth_app_const : label -> t -> closure -val meth_app_var : label -> int -> closure -val meth_app_env : label -> int -> int -> closure -val meth_app_meth : label -> label -> closure -val send_const : tag -> obj -> int -> closure -val send_var : tag -> int -> int -> closure -val send_env : tag -> int -> int -> int -> closure -val send_meth : tag -> label -> int -> closure -*) - -type impl = - GetConst - | GetVar - | GetEnv - | GetMeth - | SetVar - | AppConst - | AppVar - | AppEnv - | AppMeth - | AppConstConst - | AppConstVar - | AppConstEnv - | AppConstMeth - | AppVarConst - | AppEnvConst - | AppMethConst - | MethAppConst - | MethAppVar - | MethAppEnv - | MethAppMeth - | SendConst - | SendVar - | SendEnv - | SendMeth - | Closure of closure - -(** {1 Parameters} *) - -(* currently disabled *) -type params = - { mutable compact_table : bool; - mutable copy_parent : bool; - mutable clean_when_copying : bool; - mutable retry_count : int; - mutable bucket_small_size : int } - -val params : params - -(** {1 Statistics} *) - -type stats = - { classes : int; - methods : int; - inst_vars : int } -val stats : unit -> stats diff --git a/analysis/vendor/compiler-libs-406/ccomp.ml b/analysis/vendor/compiler-libs-406/ccomp.ml deleted file mode 100644 index 3f186b3bb..000000000 --- a/analysis/vendor/compiler-libs-406/ccomp.ml +++ /dev/null @@ -1,204 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Compiling C files and building C libraries *) - -let command cmdline = - if !Clflags.verbose then begin - prerr_string "+ "; - prerr_string cmdline; - prerr_newline() - end; - Sys.command cmdline - -let run_command cmdline = ignore(command cmdline) - -(* Build @responsefile to work around Windows limitations on - command-line length *) -let build_diversion lst = - let (responsefile, oc) = Filename.open_temp_file "camlresp" "" in - List.iter (fun f -> Printf.fprintf oc "%s\n" f) lst; - close_out oc; - at_exit (fun () -> Misc.remove_file responsefile); - "@" ^ responsefile - -let quote_files lst = - let lst = List.filter (fun f -> f <> "") lst in - let quoted = List.map Filename.quote lst in - let s = String.concat " " quoted in - if String.length s >= 4096 && Sys.os_type = "Win32" - then build_diversion quoted - else s - -let quote_prefixed pr lst = - let lst = List.filter (fun f -> f <> "") lst in - let lst = List.map (fun f -> pr ^ f) lst in - quote_files lst - -let quote_optfile = function - | None -> "" - | Some f -> Filename.quote f - -let display_msvc_output file name = - let c = open_in file in - try - let first = input_line c in - if first <> Filename.basename name then - print_string first; - while true do - print_string (input_line c) - done - with _ -> - close_in c; - Sys.remove file - -let compile_file ?output ?(opt="") name = - let (pipe, file) = - if Config.ccomp_type = "msvc" && not !Clflags.verbose then - try - let (t, c) = Filename.open_temp_file "msvc" "stdout" in - close_out c; - (Printf.sprintf " > %s" (Filename.quote t), t) - with _ -> - ("", "") - else - ("", "") in - let exit = - command - (Printf.sprintf - "%s %s %s -c %s %s %s %s %s%s" - (match !Clflags.c_compiler with - | Some cc -> cc - | None -> - let (cflags, cppflags) = - if !Clflags.native_code - then (Config.ocamlopt_cflags, Config.ocamlopt_cppflags) - else (Config.ocamlc_cflags, Config.ocamlc_cppflags) in - (String.concat " " [Config.c_compiler; cflags; cppflags])) - (match output with - | None -> "" - | Some o -> Printf.sprintf "%s%s" Config.c_output_obj o) - opt - (if !Clflags.debug && Config.ccomp_type <> "msvc" then "-g" else "") - (String.concat " " (List.rev !Clflags.all_ccopts)) - (quote_prefixed "-I" (List.rev !Clflags.include_dirs)) - (Clflags.std_include_flag "-I") - (Filename.quote name) - (* cl tediously includes the name of the C file as the first thing it - outputs (in fairness, the tedious thing is that there's no switch to - disable this behaviour). In the absence of the Unix module, use - a temporary file to filter the output (cannot pipe the output to a - filter because this removes the exit status of cl, which is wanted. - *) - pipe) in - if pipe <> "" - then display_msvc_output file name; - exit - -let macos_create_empty_archive ~quoted_archive = - let result = - command (Printf.sprintf "%s rc %s /dev/null" Config.ar quoted_archive) - in - if result <> 0 then result - else - let result = - command (Printf.sprintf "%s %s 2> /dev/null" Config.ranlib quoted_archive) - in - if result <> 0 then result - else - command (Printf.sprintf "%s d %s /dev/null" Config.ar quoted_archive) - -let create_archive archive file_list = - Misc.remove_file archive; - let quoted_archive = Filename.quote archive in - match Config.ccomp_type with - "msvc" -> - command(Printf.sprintf "link /lib /nologo /out:%s %s" - quoted_archive (quote_files file_list)) - | _ -> - assert(String.length Config.ar > 0); - let is_macosx = - match Config.system with - | "macosx" -> true - | _ -> false - in - if is_macosx && file_list = [] then (* PR#6550 *) - macos_create_empty_archive ~quoted_archive - else - let r1 = - command(Printf.sprintf "%s rc %s %s" - Config.ar quoted_archive (quote_files file_list)) in - if r1 <> 0 || String.length Config.ranlib = 0 - then r1 - else command(Config.ranlib ^ " " ^ quoted_archive) - -let expand_libname name = - if String.length name < 2 || String.sub name 0 2 <> "-l" - then name - else begin - let libname = - "lib" ^ String.sub name 2 (String.length name - 2) ^ Config.ext_lib in - try - Misc.find_in_path !Config.load_path libname - with Not_found -> - libname - end - -type link_mode = - | Exe - | Dll - | MainDll - | Partial - -let remove_Wl cclibs = - cclibs |> List.map (fun cclib -> - (* -Wl,-foo,bar -> -foo bar *) - if String.length cclib >= 4 && "-Wl," = String.sub cclib 0 4 then - String.map (function ',' -> ' ' | c -> c) - (String.sub cclib 4 (String.length cclib - 4)) - else cclib) - -let call_linker mode output_name files extra = - let cmd = - if mode = Partial then - let l_prefix = - match Config.ccomp_type with - | "msvc" -> "/libpath:" - | _ -> "-L" - in - Printf.sprintf "%s%s %s %s %s" - Config.native_pack_linker - (Filename.quote output_name) - (quote_prefixed l_prefix !Config.load_path) - (quote_files (remove_Wl files)) - extra - else - Printf.sprintf "%s -o %s %s %s %s %s %s %s" - (match !Clflags.c_compiler, mode with - | Some cc, _ -> cc - | None, Exe -> Config.mkexe - | None, Dll -> Config.mkdll - | None, MainDll -> Config.mkmaindll - | None, Partial -> assert false - ) - (Filename.quote output_name) - (if !Clflags.gprofile then Config.cc_profile else "") - "" (*(Clflags.std_include_flag "-I")*) - (quote_prefixed "-L" !Config.load_path) - (String.concat " " (List.rev !Clflags.all_ccopts)) - (quote_files files) - extra - in - command cmd = 0 diff --git a/analysis/vendor/compiler-libs-406/char.ml b/analysis/vendor/compiler-libs-406/char.ml deleted file mode 100644 index fb7660d07..000000000 --- a/analysis/vendor/compiler-libs-406/char.ml +++ /dev/null @@ -1,76 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Character operations *) - -external code: char -> int = "%identity" -external unsafe_chr: int -> char = "%identity" - -let chr n = - if n < 0 || n > 255 then invalid_arg "Char.chr" else unsafe_chr n - -external bytes_create: int -> bytes = "caml_create_bytes" -external bytes_unsafe_set : bytes -> int -> char -> unit - = "%bytes_unsafe_set" -external unsafe_to_string : bytes -> string = "%bytes_to_string" - -let escaped = function - | '\'' -> "\\'" - | '\\' -> "\\\\" - | '\n' -> "\\n" - | '\t' -> "\\t" - | '\r' -> "\\r" - | '\b' -> "\\b" - | ' ' .. '~' as c -> - let s = bytes_create 1 in - bytes_unsafe_set s 0 c; - unsafe_to_string s - | c -> - let n = code c in - let s = bytes_create 4 in - bytes_unsafe_set s 0 '\\'; - bytes_unsafe_set s 1 (unsafe_chr (48 + n / 100)); - bytes_unsafe_set s 2 (unsafe_chr (48 + (n / 10) mod 10)); - bytes_unsafe_set s 3 (unsafe_chr (48 + n mod 10)); - unsafe_to_string s - -let lowercase c = - if (c >= 'A' && c <= 'Z') - || (c >= '\192' && c <= '\214') - || (c >= '\216' && c <= '\222') - then unsafe_chr(code c + 32) - else c - -let uppercase c = - if (c >= 'a' && c <= 'z') - || (c >= '\224' && c <= '\246') - || (c >= '\248' && c <= '\254') - then unsafe_chr(code c - 32) - else c - -let lowercase_ascii c = - if (c >= 'A' && c <= 'Z') - then unsafe_chr(code c + 32) - else c - -let uppercase_ascii c = - if (c >= 'a' && c <= 'z') - then unsafe_chr(code c - 32) - else c - -type t = char - -let compare c1 c2 = code c1 - code c2 -let equal (c1: t) (c2: t) = compare c1 c2 = 0 diff --git a/analysis/vendor/compiler-libs-406/char.mli b/analysis/vendor/compiler-libs-406/char.mli deleted file mode 100644 index aaa627e4e..000000000 --- a/analysis/vendor/compiler-libs-406/char.mli +++ /dev/null @@ -1,72 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Character operations. *) - -external code : char -> int = "%identity" -(** Return the ASCII code of the argument. *) - -val chr : int -> char -(** Return the character with the given ASCII code. - Raise [Invalid_argument "Char.chr"] if the argument is - outside the range 0--255. *) - -val escaped : char -> string -(** Return a string representing the given character, - with special characters escaped following the lexical conventions - of OCaml. - All characters outside the ASCII printable range (32..126) are - escaped, as well as backslash, double-quote, and single-quote. *) - -val lowercase : char -> char - [@@ocaml.deprecated "Use Char.lowercase_ascii instead."] -(** Convert the given character to its equivalent lowercase character, - using the ISO Latin-1 (8859-1) character set. - @deprecated Functions operating on Latin-1 character set are deprecated. *) - -val uppercase : char -> char - [@@ocaml.deprecated "Use Char.uppercase_ascii instead."] -(** Convert the given character to its equivalent uppercase character, - using the ISO Latin-1 (8859-1) character set. - @deprecated Functions operating on Latin-1 character set are deprecated. *) - -val lowercase_ascii : char -> char -(** Convert the given character to its equivalent lowercase character, - using the US-ASCII character set. - @since 4.03.0 *) - -val uppercase_ascii : char -> char -(** Convert the given character to its equivalent uppercase character, - using the US-ASCII character set. - @since 4.03.0 *) - -type t = char -(** An alias for the type of characters. *) - -val compare: t -> t -> int -(** The comparison function for characters, with the same specification as - {!Stdlib.compare}. Along with the type [t], this function [compare] - allows the module [Char] to be passed as argument to the functors - {!Set.Make} and {!Map.Make}. *) - -val equal: t -> t -> bool -(** The equal function for chars. - @since 4.03.0 *) - -(**/**) - -(* The following is for system use only. Do not call directly. *) - -external unsafe_chr : int -> char = "%identity" diff --git a/analysis/vendor/compiler-libs-406/clflags.ml b/analysis/vendor/compiler-libs-406/clflags.ml deleted file mode 100644 index c502c41cd..000000000 --- a/analysis/vendor/compiler-libs-406/clflags.ml +++ /dev/null @@ -1,405 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Command-line parameters *) - -module Int_arg_helper = Arg_helper.Make (struct - module Key = struct - include Numbers.Int - let of_string = int_of_string - end - - module Value = struct - include Numbers.Int - let of_string = int_of_string - end -end) -module Float_arg_helper = Arg_helper.Make (struct - module Key = struct - include Numbers.Int - let of_string = int_of_string - end - - module Value = struct - include Numbers.Float - let of_string = float_of_string - end -end) - -let objfiles = ref ([] : string list) (* .cmo and .cma files *) -and ccobjs = ref ([] : string list) (* .o, .a, .so and -cclib -lxxx *) -and dllibs = ref ([] : string list) (* .so and -dllib -lxxx *) - -let compile_only = ref false (* -c *) -and output_name = ref (None : string option) (* -o *) -and include_dirs = ref ([] : string list)(* -I *) -and no_std_include = ref false (* -nostdlib *) -and print_types = ref false (* -i *) -and make_archive = ref false (* -a *) -and debug = ref false (* -g *) -and fast = ref false (* -unsafe *) -and use_linscan = ref false (* -linscan *) -and link_everything = ref false (* -linkall *) -and custom_runtime = ref false (* -custom *) -and no_check_prims = ref false (* -no-check-prims *) -and bytecode_compatible_32 = ref false (* -compat-32 *) -and output_c_object = ref false (* -output-obj *) -and output_complete_object = ref false (* -output-complete-obj *) -and all_ccopts = ref ([] : string list) (* -ccopt *) -and classic = ref false (* -nolabels *) -and nopervasives = ref false (* -nopervasives *) -and preprocessor = ref(None : string option) (* -pp *) -and all_ppx = ref ([] : string list) (* -ppx *) -let annotations = ref false (* -annot *) -let binary_annotations = ref false (* -annot *) -and use_threads = ref false (* -thread *) -and use_vmthreads = ref false (* -vmthread *) -and noassert = ref false (* -noassert *) -and verbose = ref false (* -verbose *) -and noversion = ref false (* -no-version *) -and noprompt = ref false (* -noprompt *) -and nopromptcont = ref false (* -nopromptcont *) -and init_file = ref (None : string option) (* -init *) -and noinit = ref false (* -noinit *) -and open_modules = ref [] (* -open *) -and use_prims = ref "" (* -use-prims ... *) -and use_runtime = ref "" (* -use-runtime ... *) -and principal = ref false (* -principal *) -and real_paths = ref true (* -short-paths *) -and recursive_types = ref false (* -rectypes *) -and strict_sequence = ref false (* -strict-sequence *) -and strict_formats = ref false (* -strict-formats *) -and applicative_functors = ref true (* -no-app-funct *) -and make_runtime = ref false (* -make-runtime *) -and gprofile = ref false (* -p *) -and c_compiler = ref (None: string option) (* -cc *) -and no_auto_link = ref false (* -noautolink *) -and dllpaths = ref ([] : string list) (* -dllpath *) -and make_package = ref false (* -pack *) -and for_package = ref (None: string option) (* -for-pack *) -and error_size = ref 500 (* -error-size *) -and float_const_prop = ref true (* -no-float-const-prop *) -and transparent_modules = ref false (* -trans-mod *) -let dump_source = ref false (* -dsource *) -let dump_parsetree = ref false (* -dparsetree *) -and dump_typedtree = ref false (* -dtypedtree *) -and dump_rawlambda = ref false (* -drawlambda *) -and dump_lambda = ref false (* -dlambda *) -and dump_rawclambda = ref false (* -drawclambda *) -and dump_clambda = ref false (* -dclambda *) -and dump_rawflambda = ref false (* -drawflambda *) -and dump_flambda = ref false (* -dflambda *) -and dump_flambda_let = ref (None : int option) (* -dflambda-let=... *) -and dump_flambda_verbose = ref false (* -dflambda-verbose *) -and dump_instr = ref false (* -dinstr *) - -let keep_asm_file = ref false (* -S *) -let optimize_for_speed = ref true (* -compact *) -and opaque = ref false (* -opaque *) - -and dump_cmm = ref false (* -dcmm *) -let dump_selection = ref false (* -dsel *) -let dump_cse = ref false (* -dcse *) -let dump_live = ref false (* -dlive *) -let dump_avail = ref false (* -davail *) -let dump_spill = ref false (* -dspill *) -let dump_split = ref false (* -dsplit *) -let dump_interf = ref false (* -dinterf *) -let dump_prefer = ref false (* -dprefer *) -let dump_regalloc = ref false (* -dalloc *) -let dump_reload = ref false (* -dreload *) -let dump_scheduling = ref false (* -dscheduling *) -let dump_linear = ref false (* -dlinear *) -let dump_interval = ref false (* -dinterval *) -let keep_startup_file = ref false (* -dstartup *) -let dump_combine = ref false (* -dcombine *) -let profile_columns : Profile.column list ref = ref [] (* -dprofile/-dtimings *) - -let debug_runavail = ref false (* -drunavail *) - -let native_code = ref false (* set to true under ocamlopt *) - -let force_slash = ref false (* for ocamldep *) -let clambda_checks = ref false (* -clambda-checks *) - -let flambda_invariant_checks = ref true (* -flambda-invariants *) - -let dont_write_files = ref false (* set to true under ocamldoc *) - -let std_include_flag prefix = - if !no_std_include then "" - else (prefix ^ (Filename.quote Config.standard_library)) -;; - -let std_include_dir () = - if !no_std_include then [] else [Config.standard_library] -;; - -let shared = ref false (* -shared *) -let dlcode = ref true (* not -nodynlink *) - -let pic_code = ref (match Config.architecture with (* -fPIC *) - | "amd64" -> true - | _ -> false) - -let runtime_variant = ref "";; (* -runtime-variant *) - -let keep_docs = ref false (* -keep-docs *) -let keep_locs = ref true (* -keep-locs *) -let unsafe_string = - if Config.safe_string then ref false - else ref (not Config.default_safe_string) - (* -safe-string / -unsafe-string *) - -let classic_inlining = ref false (* -Oclassic *) -let inlining_report = ref false (* -inlining-report *) - -let afl_instrument = ref Config.afl_instrument (* -afl-instrument *) -let afl_inst_ratio = ref 100 (* -afl-inst-ratio *) - -let simplify_rounds = ref None (* -rounds *) -let default_simplify_rounds = ref 1 (* -rounds *) -let rounds () = - match !simplify_rounds with - | None -> !default_simplify_rounds - | Some r -> r - -let default_inline_threshold = if Config.flambda then 10. else 10. /. 8. -let inline_toplevel_multiplier = 16 -let default_inline_toplevel_threshold = - int_of_float ((float inline_toplevel_multiplier) *. default_inline_threshold) -let default_inline_call_cost = 5 -let default_inline_alloc_cost = 7 -let default_inline_prim_cost = 3 -let default_inline_branch_cost = 5 -let default_inline_indirect_cost = 4 -let default_inline_branch_factor = 0.1 -let default_inline_lifting_benefit = 1300 -let default_inline_max_unroll = 0 -let default_inline_max_depth = 1 - -let inline_threshold = ref (Float_arg_helper.default default_inline_threshold) -let inline_toplevel_threshold = - ref (Int_arg_helper.default default_inline_toplevel_threshold) -let inline_call_cost = ref (Int_arg_helper.default default_inline_call_cost) -let inline_alloc_cost = ref (Int_arg_helper.default default_inline_alloc_cost) -let inline_prim_cost = ref (Int_arg_helper.default default_inline_prim_cost) -let inline_branch_cost = - ref (Int_arg_helper.default default_inline_branch_cost) -let inline_indirect_cost = - ref (Int_arg_helper.default default_inline_indirect_cost) -let inline_branch_factor = - ref (Float_arg_helper.default default_inline_branch_factor) -let inline_lifting_benefit = - ref (Int_arg_helper.default default_inline_lifting_benefit) -let inline_max_unroll = - ref (Int_arg_helper.default default_inline_max_unroll) -let inline_max_depth = - ref (Int_arg_helper.default default_inline_max_depth) - - -let unbox_specialised_args = ref true (* -no-unbox-specialised-args *) -let unbox_free_vars_of_closures = ref true -let unbox_closures = ref false (* -unbox-closures *) -let default_unbox_closures_factor = 10 -let unbox_closures_factor = - ref default_unbox_closures_factor (* -unbox-closures-factor *) -let remove_unused_arguments = ref false (* -remove-unused-arguments *) - -type inlining_arguments = { - inline_call_cost : int option; - inline_alloc_cost : int option; - inline_prim_cost : int option; - inline_branch_cost : int option; - inline_indirect_cost : int option; - inline_lifting_benefit : int option; - inline_branch_factor : float option; - inline_max_depth : int option; - inline_max_unroll : int option; - inline_threshold : float option; - inline_toplevel_threshold : int option; -} - -let set_int_arg round (arg:Int_arg_helper.parsed ref) default value = - let value : int = - match value with - | None -> default - | Some value -> value - in - match round with - | None -> - arg := Int_arg_helper.set_base_default value - (Int_arg_helper.reset_base_overrides !arg) - | Some round -> - arg := Int_arg_helper.add_base_override round value !arg - -let set_float_arg round (arg:Float_arg_helper.parsed ref) default value = - let value = - match value with - | None -> default - | Some value -> value - in - match round with - | None -> - arg := Float_arg_helper.set_base_default value - (Float_arg_helper.reset_base_overrides !arg) - | Some round -> - arg := Float_arg_helper.add_base_override round value !arg - -let use_inlining_arguments_set ?round (arg:inlining_arguments) = - let set_int = set_int_arg round in - let set_float = set_float_arg round in - set_int inline_call_cost default_inline_call_cost arg.inline_call_cost; - set_int inline_alloc_cost default_inline_alloc_cost arg.inline_alloc_cost; - set_int inline_prim_cost default_inline_prim_cost arg.inline_prim_cost; - set_int inline_branch_cost - default_inline_branch_cost arg.inline_branch_cost; - set_int inline_indirect_cost - default_inline_indirect_cost arg.inline_indirect_cost; - set_int inline_lifting_benefit - default_inline_lifting_benefit arg.inline_lifting_benefit; - set_float inline_branch_factor - default_inline_branch_factor arg.inline_branch_factor; - set_int inline_max_depth - default_inline_max_depth arg.inline_max_depth; - set_int inline_max_unroll - default_inline_max_unroll arg.inline_max_unroll; - set_float inline_threshold - default_inline_threshold arg.inline_threshold; - set_int inline_toplevel_threshold - default_inline_toplevel_threshold arg.inline_toplevel_threshold - -(* o1 is the default *) -let o1_arguments = { - inline_call_cost = None; - inline_alloc_cost = None; - inline_prim_cost = None; - inline_branch_cost = None; - inline_indirect_cost = None; - inline_lifting_benefit = None; - inline_branch_factor = None; - inline_max_depth = None; - inline_max_unroll = None; - inline_threshold = None; - inline_toplevel_threshold = None; -} - -let classic_arguments = { - inline_call_cost = None; - inline_alloc_cost = None; - inline_prim_cost = None; - inline_branch_cost = None; - inline_indirect_cost = None; - inline_lifting_benefit = None; - inline_branch_factor = None; - inline_max_depth = None; - inline_max_unroll = None; - (* [inline_threshold] matches the current compiler's default. - Note that this particular fraction can be expressed exactly in - floating point. *) - inline_threshold = Some (10. /. 8.); - (* [inline_toplevel_threshold] is not used in classic mode. *) - inline_toplevel_threshold = Some 1; -} - -let o2_arguments = { - inline_call_cost = Some (2 * default_inline_call_cost); - inline_alloc_cost = Some (2 * default_inline_alloc_cost); - inline_prim_cost = Some (2 * default_inline_prim_cost); - inline_branch_cost = Some (2 * default_inline_branch_cost); - inline_indirect_cost = Some (2 * default_inline_indirect_cost); - inline_lifting_benefit = None; - inline_branch_factor = None; - inline_max_depth = Some 2; - inline_max_unroll = None; - inline_threshold = Some 25.; - inline_toplevel_threshold = Some (25 * inline_toplevel_multiplier); -} - -let o3_arguments = { - inline_call_cost = Some (3 * default_inline_call_cost); - inline_alloc_cost = Some (3 * default_inline_alloc_cost); - inline_prim_cost = Some (3 * default_inline_prim_cost); - inline_branch_cost = Some (3 * default_inline_branch_cost); - inline_indirect_cost = Some (3 * default_inline_indirect_cost); - inline_lifting_benefit = None; - inline_branch_factor = Some 0.; - inline_max_depth = Some 3; - inline_max_unroll = Some 1; - inline_threshold = Some 50.; - inline_toplevel_threshold = Some (50 * inline_toplevel_multiplier); -} - -let all_passes = ref [] -let dumped_passes_list = ref [] -let dumped_pass s = - assert(List.mem s !all_passes); - List.mem s !dumped_passes_list - -let set_dumped_pass s enabled = - if (List.mem s !all_passes) then begin - let passes_without_s = List.filter ((<>) s) !dumped_passes_list in - let dumped_passes = - if enabled then - s :: passes_without_s - else - passes_without_s - in - dumped_passes_list := dumped_passes - end - -let parse_color_setting = function - | "auto" -> Some Misc.Color.Auto - | "always" -> Some Misc.Color.Always - | "never" -> Some Misc.Color.Never - | _ -> None -let color = ref None ;; (* -color *) - -let unboxed_types = ref false - -let arg_spec = ref [] -let arg_names = ref Misc.StringMap.empty - -let reset_arguments () = - arg_spec := []; - arg_names := Misc.StringMap.empty - -let add_arguments loc args = - List.iter (function (arg_name, _, _) as arg -> - try - let loc2 = Misc.StringMap.find arg_name !arg_names in - Printf.eprintf - "Warning: plugin argument %s is already defined:\n" arg_name; - Printf.eprintf " First definition: %s\n" loc2; - Printf.eprintf " New definition: %s\n" loc; - with Not_found -> - arg_spec := !arg_spec @ [ arg ]; - arg_names := Misc.StringMap.add arg_name loc !arg_names - ) args - -let print_arguments usage = - Arg.usage !arg_spec usage - -(* This function is almost the same as [Arg.parse_expand], except - that [Arg.parse_expand] could not be used because it does not take a - reference for [arg_spec].*) -let parse_arguments f msg = - try - let argv = ref Sys.argv in - let current = ref (!Arg.current) in - Arg.parse_and_expand_argv_dynamic current argv arg_spec f msg - with - | Arg.Bad msg -> Printf.eprintf "%s" msg; exit 2 - | Arg.Help msg -> Printf.printf "%s" msg; exit 0 diff --git a/analysis/vendor/compiler-libs-406/clflags.mli b/analysis/vendor/compiler-libs-406/clflags.mli deleted file mode 100644 index 9a15649fe..000000000 --- a/analysis/vendor/compiler-libs-406/clflags.mli +++ /dev/null @@ -1,233 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 2005 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Command line flags *) - -(** Optimization parameters represented as ints indexed by round number. *) -module Int_arg_helper : sig - type parsed - - val parse : string -> string -> parsed ref -> unit - - type parse_result = - | Ok - | Parse_failed of exn - val parse_no_error : string -> parsed ref -> parse_result - - val get : key:int -> parsed -> int -end - -(** Optimization parameters represented as floats indexed by round number. *) -module Float_arg_helper : sig - type parsed - - val parse : string -> string -> parsed ref -> unit - - type parse_result = - | Ok - | Parse_failed of exn - val parse_no_error : string -> parsed ref -> parse_result - - val get : key:int -> parsed -> float -end - -type inlining_arguments = { - inline_call_cost : int option; - inline_alloc_cost : int option; - inline_prim_cost : int option; - inline_branch_cost : int option; - inline_indirect_cost : int option; - inline_lifting_benefit : int option; - inline_branch_factor : float option; - inline_max_depth : int option; - inline_max_unroll : int option; - inline_threshold : float option; - inline_toplevel_threshold : int option; -} - -val classic_arguments : inlining_arguments -val o1_arguments : inlining_arguments -val o2_arguments : inlining_arguments -val o3_arguments : inlining_arguments - -(** Set all the inlining arguments for a round. - The default is set if no round is provided. *) -val use_inlining_arguments_set : ?round:int -> inlining_arguments -> unit - -val objfiles : string list ref -val ccobjs : string list ref -val dllibs : string list ref -val compile_only : bool ref -val output_name : string option ref -val include_dirs : string list ref -val no_std_include : bool ref -val print_types : bool ref -val make_archive : bool ref -val debug : bool ref -val fast : bool ref -val use_linscan : bool ref -val link_everything : bool ref -val custom_runtime : bool ref -val no_check_prims : bool ref -val bytecode_compatible_32 : bool ref -val output_c_object : bool ref -val output_complete_object : bool ref -val all_ccopts : string list ref -val classic : bool ref -val nopervasives : bool ref -val open_modules : string list ref -val preprocessor : string option ref -val all_ppx : string list ref -val annotations : bool ref -val binary_annotations : bool ref -val use_threads : bool ref -val use_vmthreads : bool ref -val noassert : bool ref -val verbose : bool ref -val noprompt : bool ref -val nopromptcont : bool ref -val init_file : string option ref -val noinit : bool ref -val noversion : bool ref -val use_prims : string ref -val use_runtime : string ref -val principal : bool ref -val real_paths : bool ref -val recursive_types : bool ref -val strict_sequence : bool ref -val strict_formats : bool ref -val applicative_functors : bool ref -val make_runtime : bool ref -val gprofile : bool ref -val c_compiler : string option ref -val no_auto_link : bool ref -val dllpaths : string list ref -val make_package : bool ref -val for_package : string option ref -val error_size : int ref -val float_const_prop : bool ref -val transparent_modules : bool ref -val dump_source : bool ref -val dump_parsetree : bool ref -val dump_typedtree : bool ref -val dump_rawlambda : bool ref -val dump_lambda : bool ref -val dump_rawclambda : bool ref -val dump_clambda : bool ref -val dump_rawflambda : bool ref -val dump_flambda : bool ref -val dump_flambda_let : int option ref -val dump_instr : bool ref -val keep_asm_file : bool ref -val optimize_for_speed : bool ref -val dump_cmm : bool ref -val dump_selection : bool ref -val dump_cse : bool ref -val dump_live : bool ref -val dump_avail : bool ref -val debug_runavail : bool ref -val dump_spill : bool ref -val dump_split : bool ref -val dump_interf : bool ref -val dump_prefer : bool ref -val dump_regalloc : bool ref -val dump_reload : bool ref -val dump_scheduling : bool ref -val dump_linear : bool ref -val dump_interval : bool ref -val keep_startup_file : bool ref -val dump_combine : bool ref -val native_code : bool ref -val default_inline_threshold : float -val inline_threshold : Float_arg_helper.parsed ref -val inlining_report : bool ref -val simplify_rounds : int option ref -val default_simplify_rounds : int ref -val rounds : unit -> int -val default_inline_max_unroll : int -val inline_max_unroll : Int_arg_helper.parsed ref -val default_inline_toplevel_threshold : int -val inline_toplevel_threshold : Int_arg_helper.parsed ref -val default_inline_call_cost : int -val default_inline_alloc_cost : int -val default_inline_prim_cost : int -val default_inline_branch_cost : int -val default_inline_indirect_cost : int -val default_inline_lifting_benefit : int -val inline_call_cost : Int_arg_helper.parsed ref -val inline_alloc_cost : Int_arg_helper.parsed ref -val inline_prim_cost : Int_arg_helper.parsed ref -val inline_branch_cost : Int_arg_helper.parsed ref -val inline_indirect_cost : Int_arg_helper.parsed ref -val inline_lifting_benefit : Int_arg_helper.parsed ref -val default_inline_branch_factor : float -val inline_branch_factor : Float_arg_helper.parsed ref -val dont_write_files : bool ref -val std_include_flag : string -> string -val std_include_dir : unit -> string list -val shared : bool ref -val dlcode : bool ref -val pic_code : bool ref -val runtime_variant : string ref -val force_slash : bool ref -val keep_docs : bool ref -val keep_locs : bool ref -val unsafe_string : bool ref -val opaque : bool ref -val profile_columns : Profile.column list ref -val flambda_invariant_checks : bool ref -val unbox_closures : bool ref -val unbox_closures_factor : int ref -val default_unbox_closures_factor : int -val unbox_free_vars_of_closures : bool ref -val unbox_specialised_args : bool ref -val clambda_checks : bool ref -val default_inline_max_depth : int -val inline_max_depth : Int_arg_helper.parsed ref -val remove_unused_arguments : bool ref -val dump_flambda_verbose : bool ref -val classic_inlining : bool ref -val afl_instrument : bool ref -val afl_inst_ratio : int ref - -val all_passes : string list ref -val dumped_pass : string -> bool -val set_dumped_pass : string -> bool -> unit - -val parse_color_setting : string -> Misc.Color.setting option -val color : Misc.Color.setting option ref - -val unboxed_types : bool ref - -val arg_spec : (string * Arg.spec * string) list ref - -(* [add_arguments __LOC__ args] will add the arguments from [args] at - the end of [arg_spec], checking that they have not already been - added by [add_arguments] before. A warning is printed showing the - locations of the function from which the argument was previously - added. *) -val add_arguments : string -> (string * Arg.spec * string) list -> unit - -(* [parse_arguments anon_arg usage] will parse the arguments, using - the arguments provided in [Clflags.arg_spec]. It allows plugins to - provide their own arguments. -*) -val parse_arguments : Arg.anon_fun -> string -> unit - -(* [print_arguments usage] print the standard usage message *) -val print_arguments : string -> unit - -(* [reset_arguments ()] clear all declared arguments *) -val reset_arguments : unit -> unit diff --git a/analysis/vendor/compiler-libs-406/compenv.ml b/analysis/vendor/compiler-libs-406/compenv.ml deleted file mode 100644 index 194fa617c..000000000 --- a/analysis/vendor/compiler-libs-406/compenv.ml +++ /dev/null @@ -1,640 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Fabrice Le Fessant, EPI Gallium, INRIA Paris-Rocquencourt *) -(* *) -(* Copyright 2013 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -open Clflags - -let output_prefix name = - let oname = - match !output_name with - | None -> name - | Some n -> if !compile_only then (output_name := None; n) else name in - Filename.remove_extension oname - -let print_version_and_library compiler = - Printf.printf "The OCaml %s, version " compiler; - print_string Config.version; print_newline(); - print_string "Standard library directory: "; - print_string Config.standard_library; print_newline(); - exit 0 - -let print_version_string () = - print_string Config.version; print_newline(); exit 0 - -let print_standard_library () = - print_string Config.standard_library; print_newline(); exit 0 - -let fatal err = - prerr_endline err; - exit 2 - -let extract_output = function - | Some s -> s - | None -> - fatal "Please specify the name of the output file, using option -o" - -let default_output = function - | Some s -> s - | None -> Config.default_executable_name - -let implicit_modules = ref [] -let first_include_dirs = ref [] -let last_include_dirs = ref [] -let first_ccopts = ref [] -let last_ccopts = ref [] -let first_ppx = ref [] -let last_ppx = ref [] -let first_objfiles = ref [] -let last_objfiles = ref [] - -(* Check validity of module name *) -let is_unit_name name = - try - if name = "" then raise Exit; - begin match name.[0] with - | 'A'..'Z' -> () - | _ -> - raise Exit; - end; - for i = 1 to String.length name - 1 do - match name.[i] with - | 'A'..'Z' | 'a'..'z' | '0'..'9' | '_' | '\'' -> () - | _ -> - raise Exit; - done; - true - with Exit -> false -;; - -let check_unit_name ppf filename name = - if not (is_unit_name name) then - Location.print_warning (Location.in_file filename) ppf - (Warnings.Bad_module_name name);; - -(* Compute name of module from output file name *) -let module_of_filename ppf inputfile outputprefix = - let basename = Filename.basename outputprefix in - let name = - try - let pos = String.index basename '.' in - String.sub basename 0 pos - with Not_found -> basename - in - let name = String.capitalize_ascii name in - check_unit_name ppf inputfile name; - name -;; - -type filename = string - -type readenv_position = - Before_args | Before_compile of filename | Before_link - -(* Syntax of OCAMLPARAM: (name=VALUE,)* _ (,name=VALUE)* - where VALUE should not contain ',' *) -exception SyntaxError of string - -let parse_args s = - let args = String.split_on_char ',' s in - let rec iter is_after args before after = - match args with - [] -> - if not is_after then - raise (SyntaxError "no '_' separator found") - else - (List.rev before, List.rev after) - | "_" :: _ when is_after -> raise (SyntaxError "too many '_' separators") - | "_" :: tail -> iter true tail before after - | arg :: tail -> - let binding = try - Misc.cut_at arg '=' - with Not_found -> - raise (SyntaxError ("missing '=' in " ^ arg)) - in - if is_after then - iter is_after tail before (binding :: after) - else - iter is_after tail (binding :: before) after - in - iter false args [] [] - -let setter ppf f name options s = - try - let bool = match s with - | "0" -> false - | "1" -> true - | _ -> raise Not_found - in - List.iter (fun b -> b := f bool) options - with Not_found -> - Location.print_warning Location.none ppf - (Warnings.Bad_env_variable ("OCAMLPARAM", - Printf.sprintf "bad value for %s" name)) - -let int_setter ppf name option s = - try - option := int_of_string s - with _ -> - Location.print_warning Location.none ppf - (Warnings.Bad_env_variable - ("OCAMLPARAM", Printf.sprintf "non-integer parameter for \"%s\"" name)) - -let int_option_setter ppf name option s = - try - option := Some (int_of_string s) - with _ -> - Location.print_warning Location.none ppf - (Warnings.Bad_env_variable - ("OCAMLPARAM", Printf.sprintf "non-integer parameter for \"%s\"" name)) - -(* -let float_setter ppf name option s = - try - option := float_of_string s - with _ -> - Location.print_warning Location.none ppf - (Warnings.Bad_env_variable - ("OCAMLPARAM", Printf.sprintf "non-float parameter for \"%s\"" name)) -*) - -let load_plugin = ref (fun _ -> ()) - -let check_bool ppf name s = - match s with - | "0" -> false - | "1" -> true - | _ -> - Location.print_warning Location.none ppf - (Warnings.Bad_env_variable ("OCAMLPARAM", - Printf.sprintf "bad value for %s" name)); - false - -(* 'can-discard=' specifies which arguments can be discarded without warning - because they are not understood by some versions of OCaml. *) -let can_discard = ref [] - -let read_one_param ppf position name v = - let set name options s = setter ppf (fun b -> b) name options s in - let clear name options s = setter ppf (fun b -> not b) name options s in - match name with - | "g" -> set "g" [ Clflags.debug ] v - | "p" -> set "p" [ Clflags.gprofile ] v - | "bin-annot" -> set "bin-annot" [ Clflags.binary_annotations ] v - | "afl-instrument" -> set "afl-instrument" [ Clflags.afl_instrument ] v - | "afl-inst-ratio" -> - int_setter ppf "afl-inst-ratio" afl_inst_ratio v - | "annot" -> set "annot" [ Clflags.annotations ] v - | "absname" -> set "absname" [ Location.absname ] v - | "compat-32" -> set "compat-32" [ bytecode_compatible_32 ] v - | "noassert" -> set "noassert" [ noassert ] v - | "noautolink" -> set "noautolink" [ no_auto_link ] v - | "nostdlib" -> set "nostdlib" [ no_std_include ] v - | "linkall" -> set "linkall" [ link_everything ] v - | "nolabels" -> set "nolabels" [ classic ] v - | "principal" -> set "principal" [ principal ] v - | "rectypes" -> set "rectypes" [ recursive_types ] v - | "safe-string" -> clear "safe-string" [ unsafe_string ] v - | "strict-sequence" -> set "strict-sequence" [ strict_sequence ] v - | "strict-formats" -> set "strict-formats" [ strict_formats ] v - | "thread" -> set "thread" [ use_threads ] v - | "unboxed-types" -> set "unboxed-types" [ unboxed_types ] v - | "unsafe" -> set "unsafe" [ fast ] v - | "verbose" -> set "verbose" [ verbose ] v - | "nopervasives" -> set "nopervasives" [ nopervasives ] v - | "slash" -> set "slash" [ force_slash ] v (* for ocamldep *) - | "keep-docs" -> set "keep-docs" [ Clflags.keep_docs ] v - | "keep-locs" -> set "keep-locs" [ Clflags.keep_locs ] v - - | "compact" -> clear "compact" [ optimize_for_speed ] v - | "no-app-funct" -> clear "no-app-funct" [ applicative_functors ] v - | "nodynlink" -> clear "nodynlink" [ dlcode ] v - | "short-paths" -> clear "short-paths" [ real_paths ] v - | "trans-mod" -> set "trans-mod" [ transparent_modules ] v - | "opaque" -> set "opaque" [ opaque ] v - - | "pp" -> preprocessor := Some v - | "runtime-variant" -> runtime_variant := v - | "cc" -> c_compiler := Some v - - | "clambda-checks" -> set "clambda-checks" [ clambda_checks ] v - - (* assembly sources *) - | "s" -> - set "s" [ Clflags.keep_asm_file ; Clflags.keep_startup_file ] v - | "S" -> set "S" [ Clflags.keep_asm_file ] v - | "dstartup" -> set "dstartup" [ Clflags.keep_startup_file ] v - - (* warn-errors *) - | "we" | "warn-error" -> Warnings.parse_options true v - (* warnings *) - | "w" -> Warnings.parse_options false v - (* warn-errors *) - | "wwe" -> Warnings.parse_options false v - - (* inlining *) - | "inline" -> - let module F = Float_arg_helper in - begin match F.parse_no_error v inline_threshold with - | F.Ok -> () - | F.Parse_failed exn -> - let error = - Printf.sprintf "bad syntax for \"inline\": %s" - (Printexc.to_string exn) - in - Location.print_warning Location.none ppf - (Warnings.Bad_env_variable ("OCAMLPARAM", error)) - end - - | "inline-toplevel" -> - Int_arg_helper.parse v - "Bad syntax in OCAMLPARAM for 'inline-toplevel'" - inline_toplevel_threshold - - | "rounds" -> int_option_setter ppf "rounds" simplify_rounds v - | "inline-max-unroll" -> - Int_arg_helper.parse v "Bad syntax in OCAMLPARAM for 'inline-max-unroll'" - inline_max_unroll - | "inline-call-cost" -> - Int_arg_helper.parse v - "Bad syntax in OCAMLPARAM for 'inline-call-cost'" - inline_call_cost - | "inline-alloc-cost" -> - Int_arg_helper.parse v - "Bad syntax in OCAMLPARAM for 'inline-alloc-cost'" - inline_alloc_cost - | "inline-prim-cost" -> - Int_arg_helper.parse v - "Bad syntax in OCAMLPARAM for 'inline-prim-cost'" - inline_prim_cost - | "inline-branch-cost" -> - Int_arg_helper.parse v - "Bad syntax in OCAMLPARAM for 'inline-branch-cost'" - inline_branch_cost - | "inline-indirect-cost" -> - Int_arg_helper.parse v - "Bad syntax in OCAMLPARAM for 'inline-indirect-cost'" - inline_indirect_cost - | "inline-lifting-benefit" -> - Int_arg_helper.parse v - "Bad syntax in OCAMLPARAM for 'inline-lifting-benefit'" - inline_lifting_benefit - | "inline-branch-factor" -> - Float_arg_helper.parse v - "Bad syntax in OCAMLPARAM for 'inline-branch-factor'" - inline_branch_factor - | "inline-max-depth" -> - Int_arg_helper.parse v - "Bad syntax in OCAMLPARAM for 'inline-max-depth'" - inline_max_depth - - | "Oclassic" -> - set "Oclassic" [ classic_inlining ] v - | "O2" -> - if check_bool ppf "O2" v then begin - default_simplify_rounds := 2; - use_inlining_arguments_set o2_arguments; - use_inlining_arguments_set ~round:0 o1_arguments - end - - | "O3" -> - if check_bool ppf "O3" v then begin - default_simplify_rounds := 3; - use_inlining_arguments_set o3_arguments; - use_inlining_arguments_set ~round:1 o2_arguments; - use_inlining_arguments_set ~round:0 o1_arguments - end - | "unbox-closures" -> - set "unbox-closures" [ unbox_closures ] v - | "unbox-closures-factor" -> - int_setter ppf "unbox-closures-factor" unbox_closures_factor v - | "remove-unused-arguments" -> - set "remove-unused-arguments" [ remove_unused_arguments ] v - - | "inlining-report" -> - if !native_code then - set "inlining-report" [ inlining_report ] v - - | "flambda-verbose" -> - set "flambda-verbose" [ dump_flambda_verbose ] v - | "flambda-invariants" -> - set "flambda-invariants" [ flambda_invariant_checks ] v - - (* color output *) - | "color" -> - begin match parse_color_setting v with - | None -> - Location.print_warning Location.none ppf - (Warnings.Bad_env_variable ("OCAMLPARAM", - "bad value for \"color\", \ - (expected \"auto\", \"always\" or \"never\")")) - | Some setting -> color := Some setting - end - - | "intf-suffix" -> Config.interface_suffix := v - - | "I" -> begin - match position with - | Before_args -> first_include_dirs := v :: !first_include_dirs - | Before_link | Before_compile _ -> - last_include_dirs := v :: !last_include_dirs - end - - | "cclib" -> - begin - match position with - | Before_compile _ -> () - | Before_link | Before_args -> - ccobjs := Misc.rev_split_words v @ !ccobjs - end - - | "ccopts" -> - begin - match position with - | Before_link | Before_compile _ -> - last_ccopts := v :: !last_ccopts - | Before_args -> - first_ccopts := v :: !first_ccopts - end - - | "ppx" -> - begin - match position with - | Before_link | Before_compile _ -> - last_ppx := v :: !last_ppx - | Before_args -> - first_ppx := v :: !first_ppx - end - - - | "cmo" | "cma" -> - if not !native_code then - begin - match position with - | Before_link | Before_compile _ -> - last_objfiles := v ::! last_objfiles - | Before_args -> - first_objfiles := v :: !first_objfiles - end - - | "cmx" | "cmxa" -> - if !native_code then - begin - match position with - | Before_link | Before_compile _ -> - last_objfiles := v ::! last_objfiles - | Before_args -> - first_objfiles := v :: !first_objfiles - end - - | "pic" -> - if !native_code then - set "pic" [ pic_code ] v - - | "can-discard" -> - can_discard := v ::!can_discard - - | "timings" | "profile" -> - let if_on = if name = "timings" then [ `Time ] else Profile.all_columns in - profile_columns := if check_bool ppf name v then if_on else [] - - | "plugin" -> !load_plugin v - - | _ -> - if not (List.mem name !can_discard) then begin - can_discard := name :: !can_discard; - Printf.eprintf - "Warning: discarding value of variable %S in OCAMLPARAM\n%!" - name - end - -let read_OCAMLPARAM ppf position = - try - let s = Sys.getenv "OCAMLPARAM" in - let (before, after) = - try - parse_args s - with SyntaxError s -> - Location.print_warning Location.none ppf - (Warnings.Bad_env_variable ("OCAMLPARAM", s)); - [],[] - in - List.iter (fun (name, v) -> read_one_param ppf position name v) - (match position with - Before_args -> before - | Before_compile _ | Before_link -> after) - with Not_found -> () - -(* OCAMLPARAM passed as file *) - -type pattern = - | Filename of string - | Any - -type file_option = { - pattern : pattern; - name : string; - value : string; -} - -let scan_line ic = - Scanf.bscanf ic "%[0-9a-zA-Z_.*] : %[a-zA-Z_-] = %s " - (fun pattern name value -> - let pattern = - match pattern with - | "*" -> Any - | _ -> Filename pattern - in - { pattern; name; value }) - -let load_config ppf filename = - match open_in_bin filename with - | exception e -> - Location.print_error ppf (Location.in_file filename); - Format.fprintf ppf "Cannot open file %s@." (Printexc.to_string e); - raise Exit - | ic -> - let sic = Scanf.Scanning.from_channel ic in - let rec read line_number line_start acc = - match scan_line sic with - | exception End_of_file -> - close_in ic; - acc - | exception Scanf.Scan_failure error -> - let position = Lexing.{ - pos_fname = filename; - pos_lnum = line_number; - pos_bol = line_start; - pos_cnum = pos_in ic; - } - in - let loc = Location.{ - loc_start = position; - loc_end = position; - loc_ghost = false; - } - in - Location.print_error ppf loc; - Format.fprintf ppf "Configuration file error %s@." error; - close_in ic; - raise Exit - | line -> - read (line_number + 1) (pos_in ic) (line :: acc) - in - let lines = read 0 0 [] in - lines - -let matching_filename filename { pattern } = - match pattern with - | Any -> true - | Filename pattern -> - let filename = String.lowercase_ascii filename in - let pattern = String.lowercase_ascii pattern in - filename = pattern - -let apply_config_file ppf position = - let config_file = - Filename.concat Config.standard_library "ocaml_compiler_internal_params" - in - let config = - if Sys.file_exists config_file then - load_config ppf config_file - else - [] - in - let config = - match position with - | Before_compile filename -> - List.filter (matching_filename filename) config - | Before_args | Before_link -> - List.filter (fun { pattern } -> pattern = Any) config - in - List.iter (fun { name; value } -> read_one_param ppf position name value) - config - -let readenv ppf position = - last_include_dirs := []; - last_ccopts := []; - last_ppx := []; - last_objfiles := []; - apply_config_file ppf position; - read_OCAMLPARAM ppf position; - all_ccopts := !last_ccopts @ !first_ccopts; - all_ppx := !last_ppx @ !first_ppx - -let get_objfiles ~with_ocamlparam = - if with_ocamlparam then - List.rev (!last_objfiles @ !objfiles @ !first_objfiles) - else - List.rev !objfiles - - - - - - -type deferred_action = - | ProcessImplementation of string - | ProcessInterface of string - | ProcessCFile of string - | ProcessOtherFile of string - | ProcessObjects of string list - | ProcessDLLs of string list - -let c_object_of_filename name = - Filename.chop_suffix (Filename.basename name) ".c" ^ Config.ext_obj - -let process_action - (ppf, implementation, interface, ocaml_mod_ext, ocaml_lib_ext) action = - match action with - | ProcessImplementation name -> - readenv ppf (Before_compile name); - let opref = output_prefix name in - implementation ppf name opref; - objfiles := (opref ^ ocaml_mod_ext) :: !objfiles - | ProcessInterface name -> - readenv ppf (Before_compile name); - let opref = output_prefix name in - interface ppf name opref; - if !make_package then objfiles := (opref ^ ".cmi") :: !objfiles - | ProcessCFile name -> - readenv ppf (Before_compile name); - Location.input_name := name; - if Ccomp.compile_file name <> 0 then exit 2; - ccobjs := c_object_of_filename name :: !ccobjs - | ProcessObjects names -> - ccobjs := names @ !ccobjs - | ProcessDLLs names -> - dllibs := names @ !dllibs - | ProcessOtherFile name -> - if Filename.check_suffix name ocaml_mod_ext - || Filename.check_suffix name ocaml_lib_ext then - objfiles := name :: !objfiles - else if Filename.check_suffix name ".cmi" && !make_package then - objfiles := name :: !objfiles - else if Filename.check_suffix name Config.ext_obj - || Filename.check_suffix name Config.ext_lib then - ccobjs := name :: !ccobjs - else if not !native_code && Filename.check_suffix name Config.ext_dll then - dllibs := name :: !dllibs - else - raise(Arg.Bad("don't know what to do with " ^ name)) - - -let action_of_file name = - if Filename.check_suffix name ".ml" - || Filename.check_suffix name ".mlt" then - ProcessImplementation name - else if Filename.check_suffix name !Config.interface_suffix then - ProcessInterface name - else if Filename.check_suffix name ".c" then - ProcessCFile name - else - ProcessOtherFile name - -let deferred_actions = ref [] -let defer action = - deferred_actions := action :: !deferred_actions - -let anonymous filename = defer (action_of_file filename) -let impl filename = defer (ProcessImplementation filename) -let intf filename = defer (ProcessInterface filename) - -let process_deferred_actions env = - let final_output_name = !output_name in - (* Make sure the intermediate products don't clash with the final one - when we're invoked like: ocamlopt -o foo bar.c baz.ml. *) - if not !compile_only then output_name := None; - begin - match final_output_name with - | None -> () - | Some output_name -> - if !compile_only then begin - if List.filter (function - | ProcessCFile name -> c_object_of_filename name <> output_name - | _ -> false) !deferred_actions <> [] then - fatal "Options -c and -o are incompatible when compiling C files"; - - if List.length (List.filter (function - | ProcessImplementation _ - | ProcessInterface _ - | _ -> false) !deferred_actions) > 1 then - fatal "Options -c -o are incompatible with compiling multiple files" - end; - end; - if !make_archive && List.exists (function - | ProcessOtherFile name -> Filename.check_suffix name ".cmxa" - | _ -> false) !deferred_actions then - fatal "Option -a cannot be used with .cmxa input files."; - List.iter (process_action env) (List.rev !deferred_actions); - output_name := final_output_name; diff --git a/analysis/vendor/compiler-libs-406/compenv.mli b/analysis/vendor/compiler-libs-406/compenv.mli deleted file mode 100644 index 0ee9871a6..000000000 --- a/analysis/vendor/compiler-libs-406/compenv.mli +++ /dev/null @@ -1,78 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Fabrice Le Fessant, EPI Gallium, INRIA Paris-Rocquencourt *) -(* *) -(* Copyright 2013 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -val module_of_filename : Format.formatter -> string -> string -> string - -val output_prefix : string -> string -val extract_output : string option -> string -val default_output : string option -> string - -val print_version_and_library : string -> 'a -val print_version_string : unit -> 'a -val print_standard_library : unit -> 'a -val fatal : string -> 'a - -val first_ccopts : string list ref -val first_ppx : string list ref -val first_include_dirs : string list ref -val last_include_dirs : string list ref -val implicit_modules : string list ref - -(* function to call on plugin=XXX *) -val load_plugin : (string -> unit) ref - -(* return the list of objfiles, after OCAMLPARAM and List.rev *) -val get_objfiles : with_ocamlparam:bool -> string list -val last_objfiles : string list ref -val first_objfiles : string list ref - -type filename = string - -type readenv_position = - Before_args | Before_compile of filename | Before_link - -val readenv : Format.formatter -> readenv_position -> unit - -(* [is_unit_name name] returns true only if [name] can be used as a - correct module name *) -val is_unit_name : string -> bool -(* [check_unit_name ppf filename name] prints a warning in [filename] - on [ppf] if [name] should not be used as a module name. *) -val check_unit_name : Format.formatter -> string -> string -> unit - -(* Deferred actions of the compiler, while parsing arguments *) - -type deferred_action = - | ProcessImplementation of string - | ProcessInterface of string - | ProcessCFile of string - | ProcessOtherFile of string - | ProcessObjects of string list - | ProcessDLLs of string list - -val c_object_of_filename : string -> string - -val defer : deferred_action -> unit -val anonymous : string -> unit -val impl : string -> unit -val intf : string -> unit - -val process_deferred_actions : - Format.formatter * - (Format.formatter -> string -> string -> unit) * (* compile implementation *) - (Format.formatter -> string -> string -> unit) * (* compile interface *) - string * (* ocaml module extension *) - string -> (* ocaml library extension *) - unit diff --git a/analysis/vendor/compiler-libs-406/complex.ml b/analysis/vendor/compiler-libs-406/complex.ml deleted file mode 100644 index 4df53cbad..000000000 --- a/analysis/vendor/compiler-libs-406/complex.ml +++ /dev/null @@ -1,87 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 2002 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Complex numbers *) - -type t = { re: float; im: float } - -let zero = { re = 0.0; im = 0.0 } -let one = { re = 1.0; im = 0.0 } -let i = { re = 0.0; im = 1.0 } - -let add x y = { re = x.re +. y.re; im = x.im +. y.im } - -let sub x y = { re = x.re -. y.re; im = x.im -. y.im } - -let neg x = { re = -. x.re; im = -. x.im } - -let conj x = { re = x.re; im = -. x.im } - -let mul x y = { re = x.re *. y.re -. x.im *. y.im; - im = x.re *. y.im +. x.im *. y.re } - -let div x y = - if abs_float y.re >= abs_float y.im then - let r = y.im /. y.re in - let d = y.re +. r *. y.im in - { re = (x.re +. r *. x.im) /. d; - im = (x.im -. r *. x.re) /. d } - else - let r = y.re /. y.im in - let d = y.im +. r *. y.re in - { re = (r *. x.re +. x.im) /. d; - im = (r *. x.im -. x.re) /. d } - -let inv x = div one x - -let norm2 x = x.re *. x.re +. x.im *. x.im - -let norm x = - (* Watch out for overflow in computing re^2 + im^2 *) - let r = abs_float x.re and i = abs_float x.im in - if r = 0.0 then i - else if i = 0.0 then r - else if r >= i then - let q = i /. r in r *. sqrt(1.0 +. q *. q) - else - let q = r /. i in i *. sqrt(1.0 +. q *. q) - -let arg x = atan2 x.im x.re - -let polar n a = { re = cos a *. n; im = sin a *. n } - -let sqrt x = - if x.re = 0.0 && x.im = 0.0 then { re = 0.0; im = 0.0 } - else begin - let r = abs_float x.re and i = abs_float x.im in - let w = - if r >= i then begin - let q = i /. r in - sqrt(r) *. sqrt(0.5 *. (1.0 +. sqrt(1.0 +. q *. q))) - end else begin - let q = r /. i in - sqrt(i) *. sqrt(0.5 *. (q +. sqrt(1.0 +. q *. q))) - end in - if x.re >= 0.0 - then { re = w; im = 0.5 *. x.im /. w } - else { re = 0.5 *. i /. w; im = if x.im >= 0.0 then w else -. w } - end - -let exp x = - let e = exp x.re in { re = e *. cos x.im; im = e *. sin x.im } - -let log x = { re = log (norm x); im = atan2 x.im x.re } - -let pow x y = exp (mul y (log x)) diff --git a/analysis/vendor/compiler-libs-406/complex.mli b/analysis/vendor/compiler-libs-406/complex.mli deleted file mode 100644 index 2080eccc2..000000000 --- a/analysis/vendor/compiler-libs-406/complex.mli +++ /dev/null @@ -1,86 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 2002 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Complex numbers. - - This module provides arithmetic operations on complex numbers. - Complex numbers are represented by their real and imaginary parts - (cartesian representation). Each part is represented by a - double-precision floating-point number (type [float]). *) - -type t = { re: float; im: float } -(** The type of complex numbers. [re] is the real part and [im] the - imaginary part. *) - -val zero: t -(** The complex number [0]. *) - -val one: t -(** The complex number [1]. *) - -val i: t -(** The complex number [i]. *) - -val neg: t -> t -(** Unary negation. *) - -val conj: t -> t -(** Conjugate: given the complex [x + i.y], returns [x - i.y]. *) - -val add: t -> t -> t -(** Addition *) - -val sub: t -> t -> t -(** Subtraction *) - -val mul: t -> t -> t -(** Multiplication *) - -val inv: t -> t -(** Multiplicative inverse ([1/z]). *) - -val div: t -> t -> t -(** Division *) - -val sqrt: t -> t -(** Square root. The result [x + i.y] is such that [x > 0] or - [x = 0] and [y >= 0]. - This function has a discontinuity along the negative real axis. *) - -val norm2: t -> float -(** Norm squared: given [x + i.y], returns [x^2 + y^2]. *) - -val norm: t -> float -(** Norm: given [x + i.y], returns [sqrt(x^2 + y^2)]. *) - -val arg: t -> float -(** Argument. The argument of a complex number is the angle - in the complex plane between the positive real axis and a line - passing through zero and the number. This angle ranges from - [-pi] to [pi]. This function has a discontinuity along the - negative real axis. *) - -val polar: float -> float -> t -(** [polar norm arg] returns the complex having norm [norm] - and argument [arg]. *) - -val exp: t -> t -(** Exponentiation. [exp z] returns [e] to the [z] power. *) - -val log: t -> t -(** Natural logarithm (in base [e]). *) - -val pow: t -> t -> t -(** Power function. [pow z1 z2] returns [z1] to the [z2] power. *) diff --git a/analysis/vendor/compiler-libs-406/compmisc.ml b/analysis/vendor/compiler-libs-406/compmisc.ml deleted file mode 100644 index a0839f34c..000000000 --- a/analysis/vendor/compiler-libs-406/compmisc.ml +++ /dev/null @@ -1,80 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Fabrice Le Fessant, EPI Gallium, INRIA Paris-Rocquencourt *) -(* *) -(* Copyright 2013 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -open Compenv - -(* Initialize the search path. - [dir] is always searched first (default: the current directory), - then the directories specified with the -I option (in command-line order), - then the standard library directory (unless the -nostdlib option is given). - *) - -let init_path ?(dir="") native = - let dirs = - if !Clflags.use_threads then "+threads" :: !Clflags.include_dirs - else if !Clflags.use_vmthreads && not native then - "+vmthreads" :: !Clflags.include_dirs - else - !Clflags.include_dirs - in - let dirs = - !last_include_dirs @ dirs @ Config.flexdll_dirs @ !first_include_dirs - in - let exp_dirs = - List.map (Misc.expand_directory Config.standard_library) dirs in - Config.load_path := dir :: - List.rev_append exp_dirs (Clflags.std_include_dir ()); - Env.reset_cache () - -(* Return the initial environment in which compilation proceeds. *) - -(* Note: do not do init_path() in initial_env, this breaks - toplevel initialization (PR#1775) *) - -let open_implicit_module m env = - let open Asttypes in - let lid = {loc = Location.in_file "command line"; - txt = Longident.parse m } in - snd (Typemod.type_open_ Override env lid.loc lid) - -let initial_env () = - Ident.reinit(); - let initial = - if Config.safe_string then Env.initial_safe_string - else if !Clflags.unsafe_string then Env.initial_unsafe_string - else Env.initial_safe_string - in - let env = - if !Clflags.nopervasives then initial else - open_implicit_module "Pervasives" initial - in - List.fold_left (fun env m -> - open_implicit_module m env - ) env (!implicit_modules @ List.rev !Clflags.open_modules) - - -let read_color_env ppf = - try - match Clflags.parse_color_setting (Sys.getenv "OCAML_COLOR") with - | None -> - Location.print_warning Location.none ppf - (Warnings.Bad_env_variable - ("OCAML_COLOR", - "expected \"auto\", \"always\" or \"never\"")); - | Some x -> match !Clflags.color with - | None -> Clflags.color := Some x - | Some _ -> () - with - Not_found -> () diff --git a/analysis/vendor/compiler-libs-406/config.ml b/analysis/vendor/compiler-libs-406/config.ml deleted file mode 100644 index faa66e857..000000000 --- a/analysis/vendor/compiler-libs-406/config.ml +++ /dev/null @@ -1,212 +0,0 @@ -#2 "utils/config.mlp" -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* The main OCaml version string has moved to ../VERSION *) -let version = Sys.ocaml_version - -let standard_library_default = "/usr/local/lib/ocaml" - -let standard_library = - try - Sys.getenv "OCAMLLIB" - with Not_found -> - try - Sys.getenv "CAMLLIB" - with Not_found -> - standard_library_default - -let standard_runtime = "/usr/local/bin/ocamlrun" -let ccomp_type = "cc" -let c_compiler = "gcc" -let c_output_obj = "-o " -let ocamlc_cflags = "-O2 -fno-strict-aliasing -fwrapv " -let ocamlc_cppflags = "-D_FILE_OFFSET_BITS=64 -D_REENTRANT" -let ocamlopt_cflags = "-O2 -fno-strict-aliasing -fwrapv" -let ocamlopt_cppflags = "-D_FILE_OFFSET_BITS=64 -D_REENTRANT" -let bytecomp_c_libraries = "-lpthread " -(* bytecomp_c_compiler and native_c_compiler have been supported for a - long time and are retained for backwards compatibility. - For programs that don't need compatibility with older OCaml releases - the recommended approach is to use the constituent variables - c_compiler, ocamlc_cflags, ocamlc_cppflags etc., directly. -*) -let bytecomp_c_compiler = - c_compiler ^ " " ^ ocamlc_cflags ^ " " ^ ocamlc_cppflags -let native_c_compiler = - c_compiler ^ " " ^ ocamlopt_cflags ^ " " ^ ocamlopt_cppflags -let native_c_libraries = "" -let native_pack_linker = "ld -r -arch x86_64 -o\ " -let ranlib = "ranlib" -let ar = "ar" -let cc_profile = "-pg" -let mkdll, mkexe, mkmaindll = - (* @@DRA Cygwin - but only if shared libraries are enabled, which we - should be able to detect? *) - if Sys.os_type = "Win32" then - try - let flexlink = - let flexlink = Sys.getenv "OCAML_FLEXLINK" in - let f i = - let c = flexlink.[i] in - if c = '/' then '\\' else c in - (String.init (String.length flexlink) f) ^ " " in - flexlink, - flexlink ^ " -exe", - flexlink ^ " -maindll" - with Not_found -> - "gcc -shared -flat_namespace -undefined suppress -Wl,-no_compact_unwind", "gcc -O2 -fno-strict-aliasing -fwrapv -Wall -Werror -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE -Wl,-no_compact_unwind", "gcc -shared -flat_namespace -undefined suppress -Wl,-no_compact_unwind" - else - "gcc -shared -flat_namespace -undefined suppress -Wl,-no_compact_unwind", "gcc -O2 -fno-strict-aliasing -fwrapv -Wall -Werror -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DCAML_NAME_SPACE -Wl,-no_compact_unwind", "gcc -shared -flat_namespace -undefined suppress -Wl,-no_compact_unwind" - -let profiling = true -let flambda = false -let safe_string = false -let default_safe_string = true -let windows_unicode = 0 != 0 - -let flat_float_array = true - -let afl_instrument = false - -let exec_magic_number = "Caml1999X011" -and cmi_magic_number = "Caml1999I022" -and cmo_magic_number = "Caml1999O022" -and cma_magic_number = "Caml1999A022" -and cmx_magic_number = - if flambda then - "Caml1999y022" - else - "Caml1999Y022" -and cmxa_magic_number = - if flambda then - "Caml1999z022" - else - "Caml1999Z022" -and ast_impl_magic_number = "Caml1999M022" -and ast_intf_magic_number = "Caml1999N022" -and cmxs_magic_number = "Caml1999D022" - (* cmxs_magic_number is duplicated in otherlibs/dynlink/natdynlink.ml *) -and cmt_magic_number = "Caml1999T022" - -let load_path = ref ([] : string list) - -let interface_suffix = ref ".mli" - -let max_tag = 245 -(* This is normally the same as in obj.ml, but we have to define it - separately because it can differ when we're in the middle of a - bootstrapping phase. *) -let lazy_tag = 246 - -let max_young_wosize = 256 -let stack_threshold = 256 (* see byterun/config.h *) -let stack_safety_margin = 60 - -let architecture = "amd64" -let model = "default" -let system = "macosx" - -let asm = "clang -arch x86_64 -Wno-trigraphs -c" -let asm_cfi_supported = true -let with_frame_pointers = false -let spacetime = false -let enable_call_counts = true -let libunwind_available = false -let libunwind_link_flags = "" -let profinfo = false -let profinfo_width = 0 - -let ext_exe = "" -let ext_obj = ".o" -let ext_asm = ".s" -let ext_lib = ".a" -let ext_dll = ".so" - -let host = "x86_64-apple-darwin21.4.0" -let target = "x86_64-apple-darwin21.4.0" - -let default_executable_name = - match Sys.os_type with - "Unix" -> "a.out" - | "Win32" | "Cygwin" -> "camlprog.exe" - | _ -> "camlprog" - -let systhread_supported = true;; - -let flexdll_dirs = [];; - -let print_config oc = - let p name valu = Printf.fprintf oc "%s: %s\n" name valu in - let p_int name valu = Printf.fprintf oc "%s: %d\n" name valu in - let p_bool name valu = Printf.fprintf oc "%s: %B\n" name valu in - p "version" version; - p "standard_library_default" standard_library_default; - p "standard_library" standard_library; - p "standard_runtime" standard_runtime; - p "ccomp_type" ccomp_type; - p "c_compiler" c_compiler; - p "ocamlc_cflags" ocamlc_cflags; - p "ocamlc_cppflags" ocamlc_cppflags; - p "ocamlopt_cflags" ocamlopt_cflags; - p "ocamlopt_cppflags" ocamlopt_cppflags; - p "bytecomp_c_compiler" bytecomp_c_compiler; - p "native_c_compiler" native_c_compiler; - p "bytecomp_c_libraries" bytecomp_c_libraries; - p "native_c_libraries" native_c_libraries; - p "native_pack_linker" native_pack_linker; - p "ranlib" ranlib; - p "cc_profile" cc_profile; - p "architecture" architecture; - p "model" model; - p_int "int_size" Sys.int_size; - p_int "word_size" Sys.word_size; - p "system" system; - p "asm" asm; - p_bool "asm_cfi_supported" asm_cfi_supported; - p_bool "with_frame_pointers" with_frame_pointers; - p "ext_exe" ext_exe; - p "ext_obj" ext_obj; - p "ext_asm" ext_asm; - p "ext_lib" ext_lib; - p "ext_dll" ext_dll; - p "os_type" Sys.os_type; - p "default_executable_name" default_executable_name; - p_bool "systhread_supported" systhread_supported; - p "host" host; - p "target" target; - p_bool "profiling" profiling; - p_bool "flambda" flambda; - p_bool "spacetime" spacetime; - p_bool "safe_string" safe_string; - p_bool "default_safe_string" default_safe_string; - p_bool "flat_float_array" flat_float_array; - p_bool "afl_instrument" afl_instrument; - p_bool "windows_unicode" windows_unicode; - - (* print the magic number *) - p "exec_magic_number" exec_magic_number; - p "cmi_magic_number" cmi_magic_number; - p "cmo_magic_number" cmo_magic_number; - p "cma_magic_number" cma_magic_number; - p "cmx_magic_number" cmx_magic_number; - p "cmxa_magic_number" cmxa_magic_number; - p "ast_impl_magic_number" ast_impl_magic_number; - p "ast_intf_magic_number" ast_intf_magic_number; - p "cmxs_magic_number" cmxs_magic_number; - p "cmt_magic_number" cmt_magic_number; - - flush oc; -;; diff --git a/analysis/vendor/compiler-libs-406/config.mli b/analysis/vendor/compiler-libs-406/config.mli deleted file mode 100644 index 2e0bd8690..000000000 --- a/analysis/vendor/compiler-libs-406/config.mli +++ /dev/null @@ -1,184 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* System configuration *) - -val version: string - (* The current version number of the system *) - -val standard_library: string - (* The directory containing the standard libraries *) -val standard_runtime: string - (* The full path to the standard bytecode interpreter ocamlrun *) -val ccomp_type: string - (* The "kind" of the C compiler, assembler and linker used: one of - "cc" (for Unix-style C compilers) - "msvc" (for Microsoft Visual C++ and MASM) *) -val c_compiler: string - (* The compiler to use for compiling C files *) -val c_output_obj: string - (* Name of the option of the C compiler for specifying the output file *) -val ocamlc_cflags : string - (* The flags ocamlc should pass to the C compiler *) -val ocamlc_cppflags : string - (* The flags ocamlc should pass to the C preprocessor *) -val ocamlopt_cflags : string - (* The flags ocamlopt should pass to the C compiler *) -val ocamlopt_cppflags : string - (* The flags ocamlopt should pass to the C preprocessor *) -val bytecomp_c_libraries: string - (* The C libraries to link with custom runtimes *) -val native_c_libraries: string - (* The C libraries to link with native-code programs *) -val native_pack_linker: string - (* The linker to use for packaging (ocamlopt -pack) and for partial - links (ocamlopt -output-obj). *) -val mkdll: string - (* The linker command line to build dynamic libraries. *) -val mkexe: string - (* The linker command line to build executables. *) -val mkmaindll: string - (* The linker command line to build main programs as dlls. *) -val ranlib: string - (* Command to randomize a library, or "" if not needed *) -val ar: string - (* Name of the ar command, or "" if not needed (MSVC) *) -val cc_profile : string - (* The command line option to the C compiler to enable profiling. *) - -val load_path: string list ref - (* Directories in the search path for .cmi and .cmo files *) - -val interface_suffix: string ref - (* Suffix for interface file names *) - -val exec_magic_number: string - (* Magic number for bytecode executable files *) -val cmi_magic_number: string - (* Magic number for compiled interface files *) -val cmo_magic_number: string - (* Magic number for object bytecode files *) -val cma_magic_number: string - (* Magic number for archive files *) -val cmx_magic_number: string - (* Magic number for compilation unit descriptions *) -val cmxa_magic_number: string - (* Magic number for libraries of compilation unit descriptions *) -val ast_intf_magic_number: string - (* Magic number for file holding an interface syntax tree *) -val ast_impl_magic_number: string - (* Magic number for file holding an implementation syntax tree *) -val cmxs_magic_number: string - (* Magic number for dynamically-loadable plugins *) -val cmt_magic_number: string - (* Magic number for compiled interface files *) - -val max_tag: int - (* Biggest tag that can be stored in the header of a regular block. *) -val lazy_tag : int - (* Normally the same as Obj.lazy_tag. Separate definition because - of technical reasons for bootstrapping. *) -val max_young_wosize: int - (* Maximal size of arrays that are directly allocated in the - minor heap *) -val stack_threshold: int - (* Size in words of safe area at bottom of VM stack, - see byterun/config.h *) -val stack_safety_margin: int - (* Size in words of the safety margin between the bottom of - the stack and the stack pointer. This margin can be used by - intermediate computations of some instructions, or the event - handler. *) - -val architecture: string - (* Name of processor type for the native-code compiler *) -val model: string - (* Name of processor submodel for the native-code compiler *) -val system: string - (* Name of operating system for the native-code compiler *) - -val asm: string - (* The assembler (and flags) to use for assembling - ocamlopt-generated code. *) - -val asm_cfi_supported: bool - (* Whether assembler understands CFI directives *) -val with_frame_pointers : bool - (* Whether assembler should maintain frame pointers *) - -val ext_obj: string - (* Extension for object files, e.g. [.o] under Unix. *) -val ext_asm: string - (* Extension for assembler files, e.g. [.s] under Unix. *) -val ext_lib: string - (* Extension for library files, e.g. [.a] under Unix. *) -val ext_dll: string - (* Extension for dynamically-loaded libraries, e.g. [.so] under Unix.*) - -val default_executable_name: string - (* Name of executable produced by linking if none is given with -o, - e.g. [a.out] under Unix. *) - -val systhread_supported : bool - (* Whether the system thread library is implemented *) - -val flexdll_dirs : string list - (* Directories needed for the FlexDLL objects *) - -val host : string - (* Whether the compiler is a cross-compiler *) - -val target : string - (* Whether the compiler is a cross-compiler *) - -val print_config : out_channel -> unit;; - -val profiling : bool - (* Whether profiling with gprof is supported on this platform *) - -val flambda : bool - (* Whether the compiler was configured for flambda *) - -val spacetime : bool - (* Whether the compiler was configured for Spacetime profiling *) -val enable_call_counts : bool - (* Whether call counts are to be available when Spacetime profiling *) -val profinfo : bool - (* Whether the compiler was configured for profiling *) -val profinfo_width : int - (* How many bits are to be used in values' headers for profiling - information *) -val libunwind_available : bool - (* Whether the libunwind library is available on the target *) -val libunwind_link_flags : string - (* Linker flags to use libunwind *) - -val safe_string: bool - (* Whether the compiler was configured with -force-safe-string; - in that case, the -unsafe-string compile-time option is unavailable - - @since 4.05.0 *) -val default_safe_string: bool - (* Whether the compiler was configured to use the -safe-string - or -unsafe-string compile-time option by default. - - @since 4.06.0 *) -val flat_float_array : bool - (* Whether the compiler and runtime automagically flatten float - arrays *) -val windows_unicode: bool - (* Whether Windows Unicode runtime is enabled *) -val afl_instrument : bool - (* Whether afl-fuzz instrumentation is generated by default *) diff --git a/analysis/vendor/compiler-libs-406/digest.ml b/analysis/vendor/compiler-libs-406/digest.ml deleted file mode 100644 index 408194b50..000000000 --- a/analysis/vendor/compiler-libs-406/digest.ml +++ /dev/null @@ -1,76 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Message digest (MD5) *) - -type t = string - -let compare = String.compare -let equal = String.equal - -external unsafe_string: string -> int -> int -> t = "caml_md5_string" -external channel: in_channel -> int -> t = "caml_md5_chan" - -let string str = - unsafe_string str 0 (String.length str) - -let bytes b = string (Bytes.unsafe_to_string b) - -let substring str ofs len = - if ofs < 0 || len < 0 || ofs > String.length str - len - then invalid_arg "Digest.substring" - else unsafe_string str ofs len - -let subbytes b ofs len = substring (Bytes.unsafe_to_string b) ofs len - -let file filename = - let ic = open_in_bin filename in - match channel ic (-1) with - | d -> close_in ic; d - | exception e -> close_in ic; raise e - -let output chan digest = - output_string chan digest - -let input chan = really_input_string chan 16 - -let char_hex n = - Char.unsafe_chr (n + if n < 10 then Char.code '0' else (Char.code 'a' - 10)) - -let to_hex d = - if String.length d <> 16 then invalid_arg "Digest.to_hex"; - let result = Bytes.create 32 in - for i = 0 to 15 do - let x = Char.code d.[i] in - Bytes.unsafe_set result (i*2) (char_hex (x lsr 4)); - Bytes.unsafe_set result (i*2+1) (char_hex (x land 0x0f)); - done; - Bytes.unsafe_to_string result - -let from_hex s = - if String.length s <> 32 then invalid_arg "Digest.from_hex"; - let digit c = - match c with - | '0'..'9' -> Char.code c - Char.code '0' - | 'A'..'F' -> Char.code c - Char.code 'A' + 10 - | 'a'..'f' -> Char.code c - Char.code 'a' + 10 - | _ -> raise (Invalid_argument "Digest.from_hex") - in - let byte i = digit s.[i] lsl 4 + digit s.[i+1] in - let result = Bytes.create 16 in - for i = 0 to 15 do - Bytes.set result i (Char.chr (byte (2 * i))); - done; - Bytes.unsafe_to_string result diff --git a/analysis/vendor/compiler-libs-406/digest.mli b/analysis/vendor/compiler-libs-406/digest.mli deleted file mode 100644 index 9f9fd5342..000000000 --- a/analysis/vendor/compiler-libs-406/digest.mli +++ /dev/null @@ -1,84 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** MD5 message digest. - - This module provides functions to compute 128-bit 'digests' of - arbitrary-length strings or files. The digests are of cryptographic - quality: it is very hard, given a digest, to forge a string having - that digest. The algorithm used is MD5. This module should not be - used for secure and sensitive cryptographic applications. For these - kind of applications more recent and stronger cryptographic - primitives should be used instead. -*) - -type t = string -(** The type of digests: 16-character strings. *) - -val compare : t -> t -> int -(** The comparison function for 16-character digest, with the same - specification as {!Stdlib.compare} and the implementation - shared with {!String.compare}. Along with the type [t], this - function [compare] allows the module [Digest] to be passed as - argument to the functors {!Set.Make} and {!Map.Make}. - @since 4.00.0 *) - -val equal : t -> t -> bool -(** The equal function for 16-character digest. - @since 4.03.0 *) - -val string : string -> t -(** Return the digest of the given string. *) - -val bytes : bytes -> t -(** Return the digest of the given byte sequence. - @since 4.02.0 *) - -val substring : string -> int -> int -> t -(** [Digest.substring s ofs len] returns the digest of the substring - of [s] starting at index [ofs] and containing [len] characters. *) - -val subbytes : bytes -> int -> int -> t -(** [Digest.subbytes s ofs len] returns the digest of the subsequence - of [s] starting at index [ofs] and containing [len] bytes. - @since 4.02.0 *) - -external channel : in_channel -> int -> t = "caml_md5_chan" -(** If [len] is nonnegative, [Digest.channel ic len] reads [len] - characters from channel [ic] and returns their digest, or raises - [End_of_file] if end-of-file is reached before [len] characters - are read. If [len] is negative, [Digest.channel ic len] reads - all characters from [ic] until end-of-file is reached and return - their digest. *) - -val file : string -> t -(** Return the digest of the file whose name is given. *) - -val output : out_channel -> t -> unit -(** Write a digest on the given output channel. *) - -val input : in_channel -> t -(** Read a digest from the given input channel. *) - -val to_hex : t -> string -(** Return the printable hexadecimal representation of the given digest. - Raise [Invalid_argument] if the argument is not exactly 16 bytes. - *) - -val from_hex : string -> t -(** Convert a hexadecimal representation back into the corresponding digest. - Raise [Invalid_argument] if the argument is not exactly 32 hexadecimal - characters. - @since 4.00.0 *) diff --git a/analysis/vendor/compiler-libs-406/dune b/analysis/vendor/compiler-libs-406/dune deleted file mode 100644 index 1f4b37f2f..000000000 --- a/analysis/vendor/compiler-libs-406/dune +++ /dev/null @@ -1,5 +0,0 @@ -(library - (name compilerlibs406) - (libraries) - (flags -w "+26+27+32+33+39") - (modules_without_implementation annot asttypes outcometree parsetree)) diff --git a/analysis/vendor/compiler-libs-406/ext_array.ml b/analysis/vendor/compiler-libs-406/ext_array.ml deleted file mode 100644 index e33de2b9e..000000000 --- a/analysis/vendor/compiler-libs-406/ext_array.ml +++ /dev/null @@ -1,241 +0,0 @@ -(* Copyright (C) 2015-2016 Bloomberg Finance L.P. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * In addition to the permissions granted to you by the LGPL, you may combine - * or link a "work that uses the Library" with a publicly distributed version - * of this file to produce a combined library or application, then distribute - * that combined work under the terms of your choosing, with no requirement - * to comply with the obligations normally placed on you by section 4 of the - * LGPL version 3 (or the corresponding section of a later version of the LGPL - * should you choose to use a later version). - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - - - - - -let reverse_range a i len = - if len = 0 then () - else - for k = 0 to (len-1)/2 do - let t = Array.unsafe_get a (i+k) in - Array.unsafe_set a (i+k) ( Array.unsafe_get a (i+len-1-k)); - Array.unsafe_set a (i+len-1-k) t; - done - - -let reverse_in_place a = - reverse_range a 0 (Array.length a) - -let reverse a = - let b_len = Array.length a in - if b_len = 0 then [||] else - let b = Array.copy a in - for i = 0 to b_len - 1 do - Array.unsafe_set b i (Array.unsafe_get a (b_len - 1 -i )) - done; - b - -let reverse_of_list = function - | [] -> [||] - | hd::tl as l -> - let len = List.length l in - let a = Array.make len hd in - let rec fill i = function - | [] -> a - | hd::tl -> Array.unsafe_set a (len - i - 2) hd; fill (i+1) tl in - fill 0 tl - -let filter f a = - let arr_len = Array.length a in - let rec aux acc i = - if i = arr_len - then reverse_of_list acc - else - let v = Array.unsafe_get a i in - if f v then - aux (v::acc) (i+1) - else aux acc (i + 1) - in aux [] 0 - - -let filter_map (f : _ -> _ option) a = - let arr_len = Array.length a in - let rec aux acc i = - if i = arr_len - then reverse_of_list acc - else - let v = Array.unsafe_get a i in - match f v with - | Some v -> - aux (v::acc) (i+1) - | None -> - aux acc (i + 1) - in aux [] 0 - -let range from to_ = - if from > to_ then invalid_arg "Ext_array.range" - else Array.init (to_ - from + 1) (fun i -> i + from) - -let map2i f a b = - let len = Array.length a in - if len <> Array.length b then - invalid_arg "Ext_array.map2i" - else - Array.mapi (fun i a -> f i a ( Array.unsafe_get b i )) a - -let rec tolist_f_aux a f i res = - if i < 0 then res else - let v = Array.unsafe_get a i in - tolist_f_aux a f (i - 1) - (f v :: res) - -let to_list_f f a = tolist_f_aux a f (Array.length a - 1) [] - -let rec tolist_aux a f i res = - if i < 0 then res else - let v = Array.unsafe_get a i in - tolist_aux a f (i - 1) - (match f v with - | Some v -> v :: res - | None -> res) - -let to_list_map f a = - tolist_aux a f (Array.length a - 1) [] - -let to_list_map_acc f a acc = - tolist_aux a f (Array.length a - 1) acc - - -let of_list_map f a = - match a with - | [] -> [||] - | [a0] -> - let b0 = f a0 in - [|b0|] - | [a0;a1] -> - let b0 = f a0 in - let b1 = f a1 in - [|b0;b1|] - | [a0;a1;a2] -> - let b0 = f a0 in - let b1 = f a1 in - let b2 = f a2 in - [|b0;b1;b2|] - | [a0;a1;a2;a3] -> - let b0 = f a0 in - let b1 = f a1 in - let b2 = f a2 in - let b3 = f a3 in - [|b0;b1;b2;b3|] - | [a0;a1;a2;a3;a4] -> - let b0 = f a0 in - let b1 = f a1 in - let b2 = f a2 in - let b3 = f a3 in - let b4 = f a4 in - [|b0;b1;b2;b3;b4|] - - | a0::a1::a2::a3::a4::tl -> - let b0 = f a0 in - let b1 = f a1 in - let b2 = f a2 in - let b3 = f a3 in - let b4 = f a4 in - let len = List.length tl + 5 in - let arr = Array.make len b0 in - Array.unsafe_set arr 1 b1 ; - Array.unsafe_set arr 2 b2 ; - Array.unsafe_set arr 3 b3 ; - Array.unsafe_set arr 4 b4 ; - let rec fill i = function - | [] -> arr - | hd :: tl -> - Array.unsafe_set arr i (f hd); - fill (i + 1) tl in - fill 5 tl - -(** - {[ - # rfind_with_index [|1;2;3|] (=) 2;; - - : int = 1 - # rfind_with_index [|1;2;3|] (=) 1;; - - : int = 0 - # rfind_with_index [|1;2;3|] (=) 3;; - - : int = 2 - # rfind_with_index [|1;2;3|] (=) 4;; - - : int = -1 - ]} -*) -let rfind_with_index arr cmp v = - let len = Array.length arr in - let rec aux i = - if i < 0 then i - else if cmp (Array.unsafe_get arr i) v then i - else aux (i - 1) in - aux (len - 1) - -type 'a split = [ `No_split | `Split of 'a array * 'a array ] -let rfind_and_split arr cmp v : _ split = - let i = rfind_with_index arr cmp v in - if i < 0 then - `No_split - else - `Split (Array.sub arr 0 i , Array.sub arr (i + 1 ) (Array.length arr - i - 1 )) - - -let find_with_index arr cmp v = - let len = Array.length arr in - let rec aux i len = - if i >= len then -1 - else if cmp (Array.unsafe_get arr i ) v then i - else aux (i + 1) len in - aux 0 len - -let find_and_split arr cmp v : _ split = - let i = find_with_index arr cmp v in - if i < 0 then - `No_split - else - `Split (Array.sub arr 0 i, Array.sub arr (i + 1 ) (Array.length arr - i - 1)) - -(** TODO: available since 4.03, use {!Array.exists} *) - -let exists p a = - let n = Array.length a in - let rec loop i = - if i = n then false - else if p (Array.unsafe_get a i) then true - else loop (succ i) in - loop 0 - - -let is_empty arr = - Array.length arr = 0 - - -let rec unsafe_loop index len p xs ys = - if index >= len then true - else - p - (Array.unsafe_get xs index) - (Array.unsafe_get ys index) && - unsafe_loop (succ index) len p xs ys - -let for_all2_no_exn p xs ys = - let len_xs = Array.length xs in - let len_ys = Array.length ys in - len_xs = len_ys && - unsafe_loop 0 len_xs p xs ys \ No newline at end of file diff --git a/analysis/vendor/compiler-libs-406/ext_bytes.ml b/analysis/vendor/compiler-libs-406/ext_bytes.ml deleted file mode 100644 index fdd24211c..000000000 --- a/analysis/vendor/compiler-libs-406/ext_bytes.ml +++ /dev/null @@ -1,76 +0,0 @@ -(* Copyright (C) 2015-2016 Bloomberg Finance L.P. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * In addition to the permissions granted to you by the LGPL, you may combine - * or link a "work that uses the Library" with a publicly distributed version - * of this file to produce a combined library or application, then distribute - * that combined work under the terms of your choosing, with no requirement - * to comply with the obligations normally placed on you by section 4 of the - * LGPL version 3 (or the corresponding section of a later version of the LGPL - * should you choose to use a later version). - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - - - - - - - -external unsafe_blit_string : string -> int -> bytes -> int -> int -> unit - = "caml_blit_string" -[@@noalloc] - -external char_code: char -> int = "%identity" -external char_chr: int -> char = "%identity" - -let escaped s = - let n = Stdlib.ref 0 in - for i = 0 to Bytes.length s - 1 do - n := !n + - (match Bytes.unsafe_get s i with - | '"' | '\\' | '\n' | '\t' | '\r' | '\b' -> 2 - | ' ' .. '~' -> 1 - | _ -> 4) - done; - if !n = Bytes.length s then Bytes.copy s else begin - let s' = Bytes.create !n in - n := 0; - for i = 0 to Bytes.length s - 1 do - begin match Bytes.unsafe_get s i with - | ('"' | '\\') as c -> - Bytes.unsafe_set s' !n '\\'; incr n; Bytes.unsafe_set s' !n c - | '\n' -> - Bytes.unsafe_set s' !n '\\'; incr n; Bytes.unsafe_set s' !n 'n' - | '\t' -> - Bytes.unsafe_set s' !n '\\'; incr n; Bytes.unsafe_set s' !n 't' - | '\r' -> - Bytes.unsafe_set s' !n '\\'; incr n; Bytes.unsafe_set s' !n 'r' - | '\b' -> - Bytes.unsafe_set s' !n '\\'; incr n; Bytes.unsafe_set s' !n 'b' - | (' ' .. '~') as c -> Bytes.unsafe_set s' !n c - | c -> - let a = char_code c in - Bytes.unsafe_set s' !n '\\'; - incr n; - Bytes.unsafe_set s' !n (char_chr (48 + a / 100)); - incr n; - Bytes.unsafe_set s' !n (char_chr (48 + (a / 10) mod 10)); - incr n; - Bytes.unsafe_set s' !n (char_chr (48 + a mod 10)); - end; - incr n - done; - s' - end diff --git a/analysis/vendor/compiler-libs-406/ext_pervasives.ml b/analysis/vendor/compiler-libs-406/ext_pervasives.ml deleted file mode 100644 index 8682641af..000000000 --- a/analysis/vendor/compiler-libs-406/ext_pervasives.ml +++ /dev/null @@ -1,109 +0,0 @@ -(* Copyright (C) 2015-2016 Bloomberg Finance L.P. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * In addition to the permissions granted to you by the LGPL, you may combine - * or link a "work that uses the Library" with a publicly distributed version - * of this file to produce a combined library or application, then distribute - * that combined work under the terms of your choosing, with no requirement - * to comply with the obligations normally placed on you by section 4 of the - * LGPL version 3 (or the corresponding section of a later version of the LGPL - * should you choose to use a later version). - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - - - - - - -external reraise: exn -> 'a = "%reraise" - -let finally v ~clean:action f = - match f v with - | exception e -> - action v ; - reraise e - | e -> action v ; e - -(* let try_it f = - try ignore (f ()) with _ -> () *) - -let with_file_as_chan filename f = - finally (open_out_bin filename) ~clean:close_out f - - -let max_int (x : int) y = - if x >= y then x else y - -let min_int (x : int) y = - if x < y then x else y - -let max_int_option (x : int option) y = - match x, y with - | None, _ -> y - | Some _, None -> x - | Some x0 , Some y0 -> - if x0 >= y0 then x else y - - -(* external id : 'a -> 'a = "%identity" *) - -(* -let hash_variant s = - let accu = ref 0 in - for i = 0 to String.length s - 1 do - accu := 223 * !accu + Char.code s.[i] - done; - (* reduce to 31 bits *) - accu := !accu land (1 lsl 31 - 1); - (* make it signed for 64 bits architectures *) - if !accu > 0x3FFFFFFF then !accu - (1 lsl 31) else !accu *) - -(* let todo loc = - failwith (loc ^ " Not supported yet") -*) - - - -let rec int_of_string_aux s acc off len = - if off >= len then acc - else - let d = (Char.code (String.unsafe_get s off) - 48) in - if d >=0 && d <= 9 then - int_of_string_aux s (10*acc + d) (off + 1) len - else -1 (* error *) - -let nat_of_string_exn (s : string) = - let acc = int_of_string_aux s 0 0 (String.length s) in - if acc < 0 then invalid_arg s - else acc - - -(** return index *) -let parse_nat_of_string (s : string) (cursor : int ref) = - let current = !cursor in - assert (current >= 0); - let acc = ref 0 in - let s_len = String.length s in - let todo = ref true in - let cur = ref current in - while !todo && !cursor < s_len do - let d = Char.code (String.unsafe_get s !cur) - 48 in - if d >=0 && d <= 9 then begin - acc := 10* !acc + d; - incr cur - end else todo := false - done ; - cursor := !cur; - !acc \ No newline at end of file diff --git a/analysis/vendor/compiler-libs-406/genlex.ml b/analysis/vendor/compiler-libs-406/genlex.ml deleted file mode 100644 index b015bb95a..000000000 --- a/analysis/vendor/compiler-libs-406/genlex.ml +++ /dev/null @@ -1,201 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -type token = - Kwd of string - | Ident of string - | Int of int - | Float of float - | String of string - | Char of char - -(* The string buffering machinery *) - -let initial_buffer = Bytes.create 32 - -let buffer = ref initial_buffer -let bufpos = ref 0 - -let reset_buffer () = buffer := initial_buffer; bufpos := 0 - -let store c = - if !bufpos >= Bytes.length !buffer then begin - let newbuffer = Bytes.create (2 * !bufpos) in - Bytes.blit !buffer 0 newbuffer 0 !bufpos; - buffer := newbuffer - end; - Bytes.set !buffer !bufpos c; - incr bufpos - -let get_string () = - let s = Bytes.sub_string !buffer 0 !bufpos in buffer := initial_buffer; s - -(* The lexer *) - -let make_lexer keywords = - let kwd_table = Hashtbl.create 17 in - List.iter (fun s -> Hashtbl.add kwd_table s (Kwd s)) keywords; - let ident_or_keyword id = - try Hashtbl.find kwd_table id with - Not_found -> Ident id - and keyword_or_error c = - let s = String.make 1 c in - try Hashtbl.find kwd_table s with - Not_found -> raise (Stream.Error ("Illegal character " ^ s)) - in - let rec next_token (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some (' ' | '\010' | '\013' | '\009' | '\026' | '\012') -> - Stream.junk strm__; next_token strm__ - | Some ('A'..'Z' | 'a'..'z' | '_' | '\192'..'\255' as c) -> - Stream.junk strm__; - let s = strm__ in reset_buffer (); store c; ident s - | Some - ('!' | '%' | '&' | '$' | '#' | '+' | '/' | ':' | '<' | '=' | '>' | - '?' | '@' | '\\' | '~' | '^' | '|' | '*' as c) -> - Stream.junk strm__; - let s = strm__ in reset_buffer (); store c; ident2 s - | Some ('0'..'9' as c) -> - Stream.junk strm__; - let s = strm__ in reset_buffer (); store c; number s - | Some '\'' -> - Stream.junk strm__; - let c = - try char strm__ with - Stream.Failure -> raise (Stream.Error "") - in - begin match Stream.peek strm__ with - Some '\'' -> Stream.junk strm__; Some (Char c) - | _ -> raise (Stream.Error "") - end - | Some '\"' -> - Stream.junk strm__; - let s = strm__ in reset_buffer (); Some (String (string s)) - | Some '-' -> Stream.junk strm__; neg_number strm__ - | Some '(' -> Stream.junk strm__; maybe_comment strm__ - | Some c -> Stream.junk strm__; Some (keyword_or_error c) - | _ -> None - and ident (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some - ('A'..'Z' | 'a'..'z' | '\192'..'\255' | '0'..'9' | '_' | '\'' as c) -> - Stream.junk strm__; let s = strm__ in store c; ident s - | _ -> Some (ident_or_keyword (get_string ())) - and ident2 (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some - ('!' | '%' | '&' | '$' | '#' | '+' | '-' | '/' | ':' | '<' | '=' | - '>' | '?' | '@' | '\\' | '~' | '^' | '|' | '*' as c) -> - Stream.junk strm__; let s = strm__ in store c; ident2 s - | _ -> Some (ident_or_keyword (get_string ())) - and neg_number (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some ('0'..'9' as c) -> - Stream.junk strm__; - let s = strm__ in reset_buffer (); store '-'; store c; number s - | _ -> let s = strm__ in reset_buffer (); store '-'; ident2 s - and number (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some ('0'..'9' as c) -> - Stream.junk strm__; let s = strm__ in store c; number s - | Some '.' -> - Stream.junk strm__; let s = strm__ in store '.'; decimal_part s - | Some ('e' | 'E') -> - Stream.junk strm__; let s = strm__ in store 'E'; exponent_part s - | _ -> Some (Int (int_of_string (get_string ()))) - and decimal_part (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some ('0'..'9' as c) -> - Stream.junk strm__; let s = strm__ in store c; decimal_part s - | Some ('e' | 'E') -> - Stream.junk strm__; let s = strm__ in store 'E'; exponent_part s - | _ -> Some (Float (float_of_string (get_string ()))) - and exponent_part (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some ('+' | '-' as c) -> - Stream.junk strm__; let s = strm__ in store c; end_exponent_part s - | _ -> end_exponent_part strm__ - and end_exponent_part (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some ('0'..'9' as c) -> - Stream.junk strm__; let s = strm__ in store c; end_exponent_part s - | _ -> Some (Float (float_of_string (get_string ()))) - and string (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some '\"' -> Stream.junk strm__; get_string () - | Some '\\' -> - Stream.junk strm__; - let c = - try escape strm__ with - Stream.Failure -> raise (Stream.Error "") - in - let s = strm__ in store c; string s - | Some c -> Stream.junk strm__; let s = strm__ in store c; string s - | _ -> raise Stream.Failure - and char (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some '\\' -> - Stream.junk strm__; - begin try escape strm__ with - Stream.Failure -> raise (Stream.Error "") - end - | Some c -> Stream.junk strm__; c - | _ -> raise Stream.Failure - and escape (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some 'n' -> Stream.junk strm__; '\n' - | Some 'r' -> Stream.junk strm__; '\r' - | Some 't' -> Stream.junk strm__; '\t' - | Some ('0'..'9' as c1) -> - Stream.junk strm__; - begin match Stream.peek strm__ with - Some ('0'..'9' as c2) -> - Stream.junk strm__; - begin match Stream.peek strm__ with - Some ('0'..'9' as c3) -> - Stream.junk strm__; - Char.chr - ((Char.code c1 - 48) * 100 + (Char.code c2 - 48) * 10 + - (Char.code c3 - 48)) - | _ -> raise (Stream.Error "") - end - | _ -> raise (Stream.Error "") - end - | Some c -> Stream.junk strm__; c - | _ -> raise Stream.Failure - and maybe_comment (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some '*' -> - Stream.junk strm__; let s = strm__ in comment s; next_token s - | _ -> Some (keyword_or_error '(') - and comment (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some '(' -> Stream.junk strm__; maybe_nested_comment strm__ - | Some '*' -> Stream.junk strm__; maybe_end_comment strm__ - | Some _ -> Stream.junk strm__; comment strm__ - | _ -> raise Stream.Failure - and maybe_nested_comment (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some '*' -> Stream.junk strm__; let s = strm__ in comment s; comment s - | Some _ -> Stream.junk strm__; comment strm__ - | _ -> raise Stream.Failure - and maybe_end_comment (strm__ : _ Stream.t) = - match Stream.peek strm__ with - Some ')' -> Stream.junk strm__; () - | Some '*' -> Stream.junk strm__; maybe_end_comment strm__ - | Some _ -> Stream.junk strm__; comment strm__ - | _ -> raise Stream.Failure - in - fun input -> Stream.from (fun _count -> next_token input) diff --git a/analysis/vendor/compiler-libs-406/genlex.mli b/analysis/vendor/compiler-libs-406/genlex.mli deleted file mode 100644 index 473949269..000000000 --- a/analysis/vendor/compiler-libs-406/genlex.mli +++ /dev/null @@ -1,73 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** A generic lexical analyzer. - - - This module implements a simple 'standard' lexical analyzer, presented - as a function from character streams to token streams. It implements - roughly the lexical conventions of OCaml, but is parameterized by the - set of keywords of your language. - - - Example: a lexer suitable for a desk calculator is obtained by - {[ let lexer = make_lexer ["+";"-";"*";"/";"let";"="; "("; ")"] ]} - - The associated parser would be a function from [token stream] - to, for instance, [int], and would have rules such as: - - {[ - let rec parse_expr = parser - | [< n1 = parse_atom; n2 = parse_remainder n1 >] -> n2 - and parse_atom = parser - | [< 'Int n >] -> n - | [< 'Kwd "("; n = parse_expr; 'Kwd ")" >] -> n - and parse_remainder n1 = parser - | [< 'Kwd "+"; n2 = parse_expr >] -> n1+n2 - | [< >] -> n1 - ]} - - One should notice that the use of the [parser] keyword and associated - notation for streams are only available through camlp4 extensions. This - means that one has to preprocess its sources {i e. g.} by using the - ["-pp"] command-line switch of the compilers. -*) - -(** The type of tokens. The lexical classes are: [Int] and [Float] - for integer and floating-point numbers; [String] for - string literals, enclosed in double quotes; [Char] for - character literals, enclosed in single quotes; [Ident] for - identifiers (either sequences of letters, digits, underscores - and quotes, or sequences of 'operator characters' such as - [+], [*], etc); and [Kwd] for keywords (either identifiers or - single 'special characters' such as [(], [}], etc). *) -type token = - Kwd of string - | Ident of string - | Int of int - | Float of float - | String of string - | Char of char - -val make_lexer : string list -> char Stream.t -> token Stream.t -(** Construct the lexer function. The first argument is the list of - keywords. An identifier [s] is returned as [Kwd s] if [s] - belongs to this list, and as [Ident s] otherwise. - A special character [s] is returned as [Kwd s] if [s] - belongs to this list, and cause a lexical error (exception - {!Stream.Error} with the offending lexeme as its parameter) otherwise. - Blanks and newlines are skipped. Comments delimited by [(*] and [*)] - are skipped as well, and can be nested. A {!Stream.Failure} exception - is raised if end of stream is unexpectedly reached.*) diff --git a/analysis/vendor/compiler-libs-406/int32.ml b/analysis/vendor/compiler-libs-406/int32.ml deleted file mode 100644 index 9e1eabf5e..000000000 --- a/analysis/vendor/compiler-libs-406/int32.ml +++ /dev/null @@ -1,68 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Module [Int32]: 32-bit integers *) - -external neg : int32 -> int32 = "%int32_neg" -external add : int32 -> int32 -> int32 = "%int32_add" -external sub : int32 -> int32 -> int32 = "%int32_sub" -external mul : int32 -> int32 -> int32 = "%int32_mul" -external div : int32 -> int32 -> int32 = "%int32_div" -external rem : int32 -> int32 -> int32 = "%int32_mod" -external logand : int32 -> int32 -> int32 = "%int32_and" -external logor : int32 -> int32 -> int32 = "%int32_or" -external logxor : int32 -> int32 -> int32 = "%int32_xor" -external shift_left : int32 -> int -> int32 = "%int32_lsl" -external shift_right : int32 -> int -> int32 = "%int32_asr" -external shift_right_logical : int32 -> int -> int32 = "%int32_lsr" -external of_int : int -> int32 = "%int32_of_int" -external to_int : int32 -> int = "%int32_to_int" -external of_float : float -> int32 - = "caml_int32_of_float" "caml_int32_of_float_unboxed" - [@@unboxed] [@@noalloc] -external to_float : int32 -> float - = "caml_int32_to_float" "caml_int32_to_float_unboxed" - [@@unboxed] [@@noalloc] -external bits_of_float : float -> int32 - = "caml_int32_bits_of_float" "caml_int32_bits_of_float_unboxed" - [@@unboxed] [@@noalloc] -external float_of_bits : int32 -> float - = "caml_int32_float_of_bits" "caml_int32_float_of_bits_unboxed" - [@@unboxed] [@@noalloc] - -let zero = 0l -let one = 1l -let minus_one = -1l -let succ n = add n 1l -let pred n = sub n 1l -let abs n = if n >= 0l then n else neg n -let min_int = 0x80000000l -let max_int = 0x7FFFFFFFl -let lognot n = logxor n (-1l) - -external format : string -> int32 -> string = "caml_int32_format" -let to_string n = format "%d" n - -external of_string : string -> int32 = "caml_int32_of_string" - -let of_string_opt s = - (* TODO: expose a non-raising primitive directly. *) - try Some (of_string s) - with Failure _ -> None - -type t = int32 - -let compare (x: t) (y: t) = Stdlib.compare x y -let equal (x: t) (y: t) = compare x y = 0 diff --git a/analysis/vendor/compiler-libs-406/int32.mli b/analysis/vendor/compiler-libs-406/int32.mli deleted file mode 100644 index 3b2e7b055..000000000 --- a/analysis/vendor/compiler-libs-406/int32.mli +++ /dev/null @@ -1,189 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** 32-bit integers. - - This module provides operations on the type [int32] - of signed 32-bit integers. Unlike the built-in [int] type, - the type [int32] is guaranteed to be exactly 32-bit wide on all - platforms. All arithmetic operations over [int32] are taken - modulo 2{^32}. - - Performance notice: values of type [int32] occupy more memory - space than values of type [int], and arithmetic operations on - [int32] are generally slower than those on [int]. Use [int32] - only when the application requires exact 32-bit arithmetic. *) - -val zero : int32 -(** The 32-bit integer 0. *) - -val one : int32 -(** The 32-bit integer 1. *) - -val minus_one : int32 -(** The 32-bit integer -1. *) - -external neg : int32 -> int32 = "%int32_neg" -(** Unary negation. *) - -external add : int32 -> int32 -> int32 = "%int32_add" -(** Addition. *) - -external sub : int32 -> int32 -> int32 = "%int32_sub" -(** Subtraction. *) - -external mul : int32 -> int32 -> int32 = "%int32_mul" -(** Multiplication. *) - -external div : int32 -> int32 -> int32 = "%int32_div" -(** Integer division. Raise [Division_by_zero] if the second - argument is zero. This division rounds the real quotient of - its arguments towards zero, as specified for {!Pervasives.(/)}. *) - -external rem : int32 -> int32 -> int32 = "%int32_mod" -(** Integer remainder. If [y] is not zero, the result - of [Int32.rem x y] satisfies the following property: - [x = Int32.add (Int32.mul (Int32.div x y) y) (Int32.rem x y)]. - If [y = 0], [Int32.rem x y] raises [Division_by_zero]. *) - -val succ : int32 -> int32 -(** Successor. [Int32.succ x] is [Int32.add x Int32.one]. *) - -val pred : int32 -> int32 -(** Predecessor. [Int32.pred x] is [Int32.sub x Int32.one]. *) - -val abs : int32 -> int32 -(** Return the absolute value of its argument. *) - -val max_int : int32 -(** The greatest representable 32-bit integer, 2{^31} - 1. *) - -val min_int : int32 -(** The smallest representable 32-bit integer, -2{^31}. *) - - -external logand : int32 -> int32 -> int32 = "%int32_and" -(** Bitwise logical and. *) - -external logor : int32 -> int32 -> int32 = "%int32_or" -(** Bitwise logical or. *) - -external logxor : int32 -> int32 -> int32 = "%int32_xor" -(** Bitwise logical exclusive or. *) - -val lognot : int32 -> int32 -(** Bitwise logical negation. *) - -external shift_left : int32 -> int -> int32 = "%int32_lsl" -(** [Int32.shift_left x y] shifts [x] to the left by [y] bits. - The result is unspecified if [y < 0] or [y >= 32]. *) - -external shift_right : int32 -> int -> int32 = "%int32_asr" -(** [Int32.shift_right x y] shifts [x] to the right by [y] bits. - This is an arithmetic shift: the sign bit of [x] is replicated - and inserted in the vacated bits. - The result is unspecified if [y < 0] or [y >= 32]. *) - -external shift_right_logical : int32 -> int -> int32 = "%int32_lsr" -(** [Int32.shift_right_logical x y] shifts [x] to the right by [y] bits. - This is a logical shift: zeroes are inserted in the vacated bits - regardless of the sign of [x]. - The result is unspecified if [y < 0] or [y >= 32]. *) - -external of_int : int -> int32 = "%int32_of_int" -(** Convert the given integer (type [int]) to a 32-bit integer - (type [int32]). *) - -external to_int : int32 -> int = "%int32_to_int" -(** Convert the given 32-bit integer (type [int32]) to an - integer (type [int]). On 32-bit platforms, the 32-bit integer - is taken modulo 2{^31}, i.e. the high-order bit is lost - during the conversion. On 64-bit platforms, the conversion - is exact. *) - -external of_float : float -> int32 - = "caml_int32_of_float" "caml_int32_of_float_unboxed" - [@@unboxed] [@@noalloc] -(** Convert the given floating-point number to a 32-bit integer, - discarding the fractional part (truncate towards 0). - The result of the conversion is undefined if, after truncation, - the number is outside the range \[{!Int32.min_int}, {!Int32.max_int}\]. *) - -external to_float : int32 -> float - = "caml_int32_to_float" "caml_int32_to_float_unboxed" - [@@unboxed] [@@noalloc] -(** Convert the given 32-bit integer to a floating-point number. *) - -external of_string : string -> int32 = "caml_int32_of_string" -(** Convert the given string to a 32-bit integer. - The string is read in decimal (by default, or if the string - begins with [0u]) or in hexadecimal, octal or binary if the - string begins with [0x], [0o] or [0b] respectively. - - The [0u] prefix reads the input as an unsigned integer in the range - [[0, 2*Int32.max_int+1]]. If the input exceeds {!Int32.max_int} - it is converted to the signed integer - [Int32.min_int + input - Int32.max_int - 1]. - - The [_] (underscore) character can appear anywhere in the string - and is ignored. - Raise [Failure "Int32.of_string"] if the given string is not - a valid representation of an integer, or if the integer represented - exceeds the range of integers representable in type [int32]. *) - -val of_string_opt: string -> int32 option -(** Same as [of_string], but return [None] instead of raising. - @since 4.05 *) - - -val to_string : int32 -> string -(** Return the string representation of its argument, in signed decimal. *) - -external bits_of_float : float -> int32 - = "caml_int32_bits_of_float" "caml_int32_bits_of_float_unboxed" - [@@unboxed] [@@noalloc] -(** Return the internal representation of the given float according - to the IEEE 754 floating-point 'single format' bit layout. - Bit 31 of the result represents the sign of the float; - bits 30 to 23 represent the (biased) exponent; bits 22 to 0 - represent the mantissa. *) - -external float_of_bits : int32 -> float - = "caml_int32_float_of_bits" "caml_int32_float_of_bits_unboxed" - [@@unboxed] [@@noalloc] -(** Return the floating-point number whose internal representation, - according to the IEEE 754 floating-point 'single format' bit layout, - is the given [int32]. *) - -type t = int32 -(** An alias for the type of 32-bit integers. *) - -val compare: t -> t -> int -(** The comparison function for 32-bit integers, with the same specification as - {!Stdlib.compare}. Along with the type [t], this function [compare] - allows the module [Int32] to be passed as argument to the functors - {!Set.Make} and {!Map.Make}. *) - -val equal: t -> t -> bool -(** The equal function for int32s. - @since 4.03.0 *) - -(**/**) - -(** {1 Deprecated functions} *) - -external format : string -> int32 -> string = "caml_int32_format" -(** Do not use this deprecated function. Instead, - used {!Printf.sprintf} with a [%l...] format. *) diff --git a/analysis/vendor/compiler-libs-406/int64.ml b/analysis/vendor/compiler-libs-406/int64.ml deleted file mode 100644 index 59e616481..000000000 --- a/analysis/vendor/compiler-libs-406/int64.ml +++ /dev/null @@ -1,75 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Module [Int64]: 64-bit integers *) - -external neg : int64 -> int64 = "%int64_neg" -external add : int64 -> int64 -> int64 = "%int64_add" -external sub : int64 -> int64 -> int64 = "%int64_sub" -external mul : int64 -> int64 -> int64 = "%int64_mul" -external div : int64 -> int64 -> int64 = "%int64_div" -external rem : int64 -> int64 -> int64 = "%int64_mod" -external logand : int64 -> int64 -> int64 = "%int64_and" -external logor : int64 -> int64 -> int64 = "%int64_or" -external logxor : int64 -> int64 -> int64 = "%int64_xor" -external shift_left : int64 -> int -> int64 = "%int64_lsl" -external shift_right : int64 -> int -> int64 = "%int64_asr" -external shift_right_logical : int64 -> int -> int64 = "%int64_lsr" -external of_int : int -> int64 = "%int64_of_int" -external to_int : int64 -> int = "%int64_to_int" -external of_float : float -> int64 - = "caml_int64_of_float" "caml_int64_of_float_unboxed" - [@@unboxed] [@@noalloc] -external to_float : int64 -> float - = "caml_int64_to_float" "caml_int64_to_float_unboxed" - [@@unboxed] [@@noalloc] -external of_int32 : int32 -> int64 = "%int64_of_int32" -external to_int32 : int64 -> int32 = "%int64_to_int32" -external of_nativeint : nativeint -> int64 = "%int64_of_nativeint" -external to_nativeint : int64 -> nativeint = "%int64_to_nativeint" - -let zero = 0L -let one = 1L -let minus_one = -1L -let succ n = add n 1L -let pred n = sub n 1L -let abs n = if n >= 0L then n else neg n -let min_int = 0x8000000000000000L -let max_int = 0x7FFFFFFFFFFFFFFFL -let lognot n = logxor n (-1L) - -external format : string -> int64 -> string = "caml_int64_format" -let to_string n = format "%d" n - -external of_string : string -> int64 = "caml_int64_of_string" - -let of_string_opt s = - (* TODO: expose a non-raising primitive directly. *) - try Some (of_string s) - with Failure _ -> None - - - -external bits_of_float : float -> int64 - = "caml_int64_bits_of_float" "caml_int64_bits_of_float_unboxed" - [@@unboxed] [@@noalloc] -external float_of_bits : int64 -> float - = "caml_int64_float_of_bits" "caml_int64_float_of_bits_unboxed" - [@@unboxed] [@@noalloc] - -type t = int64 - -let compare (x: t) (y: t) = Stdlib.compare x y -let equal (x: t) (y: t) = compare x y = 0 diff --git a/analysis/vendor/compiler-libs-406/int64.mli b/analysis/vendor/compiler-libs-406/int64.mli deleted file mode 100644 index 3f970c262..000000000 --- a/analysis/vendor/compiler-libs-406/int64.mli +++ /dev/null @@ -1,210 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** 64-bit integers. - - This module provides operations on the type [int64] of - signed 64-bit integers. Unlike the built-in [int] type, - the type [int64] is guaranteed to be exactly 64-bit wide on all - platforms. All arithmetic operations over [int64] are taken - modulo 2{^64} - - Performance notice: values of type [int64] occupy more memory - space than values of type [int], and arithmetic operations on - [int64] are generally slower than those on [int]. Use [int64] - only when the application requires exact 64-bit arithmetic. -*) - -val zero : int64 -(** The 64-bit integer 0. *) - -val one : int64 -(** The 64-bit integer 1. *) - -val minus_one : int64 -(** The 64-bit integer -1. *) - -external neg : int64 -> int64 = "%int64_neg" -(** Unary negation. *) - -external add : int64 -> int64 -> int64 = "%int64_add" -(** Addition. *) - -external sub : int64 -> int64 -> int64 = "%int64_sub" -(** Subtraction. *) - -external mul : int64 -> int64 -> int64 = "%int64_mul" -(** Multiplication. *) - -external div : int64 -> int64 -> int64 = "%int64_div" -(** Integer division. Raise [Division_by_zero] if the second - argument is zero. This division rounds the real quotient of - its arguments towards zero, as specified for {!Pervasives.(/)}. *) - -external rem : int64 -> int64 -> int64 = "%int64_mod" -(** Integer remainder. If [y] is not zero, the result - of [Int64.rem x y] satisfies the following property: - [x = Int64.add (Int64.mul (Int64.div x y) y) (Int64.rem x y)]. - If [y = 0], [Int64.rem x y] raises [Division_by_zero]. *) - -val succ : int64 -> int64 -(** Successor. [Int64.succ x] is [Int64.add x Int64.one]. *) - -val pred : int64 -> int64 -(** Predecessor. [Int64.pred x] is [Int64.sub x Int64.one]. *) - -val abs : int64 -> int64 -(** Return the absolute value of its argument. *) - -val max_int : int64 -(** The greatest representable 64-bit integer, 2{^63} - 1. *) - -val min_int : int64 -(** The smallest representable 64-bit integer, -2{^63}. *) - -external logand : int64 -> int64 -> int64 = "%int64_and" -(** Bitwise logical and. *) - -external logor : int64 -> int64 -> int64 = "%int64_or" -(** Bitwise logical or. *) - -external logxor : int64 -> int64 -> int64 = "%int64_xor" -(** Bitwise logical exclusive or. *) - -val lognot : int64 -> int64 -(** Bitwise logical negation. *) - -external shift_left : int64 -> int -> int64 = "%int64_lsl" -(** [Int64.shift_left x y] shifts [x] to the left by [y] bits. - The result is unspecified if [y < 0] or [y >= 64]. *) - -external shift_right : int64 -> int -> int64 = "%int64_asr" -(** [Int64.shift_right x y] shifts [x] to the right by [y] bits. - This is an arithmetic shift: the sign bit of [x] is replicated - and inserted in the vacated bits. - The result is unspecified if [y < 0] or [y >= 64]. *) - -external shift_right_logical : int64 -> int -> int64 = "%int64_lsr" -(** [Int64.shift_right_logical x y] shifts [x] to the right by [y] bits. - This is a logical shift: zeroes are inserted in the vacated bits - regardless of the sign of [x]. - The result is unspecified if [y < 0] or [y >= 64]. *) - -external of_int : int -> int64 = "%int64_of_int" -(** Convert the given integer (type [int]) to a 64-bit integer - (type [int64]). *) - -external to_int : int64 -> int = "%int64_to_int" -(** Convert the given 64-bit integer (type [int64]) to an - integer (type [int]). On 64-bit platforms, the 64-bit integer - is taken modulo 2{^63}, i.e. the high-order bit is lost - during the conversion. On 32-bit platforms, the 64-bit integer - is taken modulo 2{^31}, i.e. the top 33 bits are lost - during the conversion. *) - -external of_float : float -> int64 - = "caml_int64_of_float" "caml_int64_of_float_unboxed" - [@@unboxed] [@@noalloc] -(** Convert the given floating-point number to a 64-bit integer, - discarding the fractional part (truncate towards 0). - The result of the conversion is undefined if, after truncation, - the number is outside the range \[{!Int64.min_int}, {!Int64.max_int}\]. *) - -external to_float : int64 -> float - = "caml_int64_to_float" "caml_int64_to_float_unboxed" - [@@unboxed] [@@noalloc] -(** Convert the given 64-bit integer to a floating-point number. *) - - -external of_int32 : int32 -> int64 = "%int64_of_int32" -(** Convert the given 32-bit integer (type [int32]) - to a 64-bit integer (type [int64]). *) - -external to_int32 : int64 -> int32 = "%int64_to_int32" -(** Convert the given 64-bit integer (type [int64]) to a - 32-bit integer (type [int32]). The 64-bit integer - is taken modulo 2{^32}, i.e. the top 32 bits are lost - during the conversion. *) - -external of_nativeint : nativeint -> int64 = "%int64_of_nativeint" -(** Convert the given native integer (type [nativeint]) - to a 64-bit integer (type [int64]). *) - -external to_nativeint : int64 -> nativeint = "%int64_to_nativeint" -(** Convert the given 64-bit integer (type [int64]) to a - native integer. On 32-bit platforms, the 64-bit integer - is taken modulo 2{^32}. On 64-bit platforms, - the conversion is exact. *) - -external of_string : string -> int64 = "caml_int64_of_string" -(** Convert the given string to a 64-bit integer. - The string is read in decimal (by default, or if the string - begins with [0u]) or in hexadecimal, octal or binary if the - string begins with [0x], [0o] or [0b] respectively. - - The [0u] prefix reads the input as an unsigned integer in the range - [[0, 2*Int64.max_int+1]]. If the input exceeds {!Int64.max_int} - it is converted to the signed integer - [Int64.min_int + input - Int64.max_int - 1]. - - The [_] (underscore) character can appear anywhere in the string - and is ignored. - Raise [Failure "Int64.of_string"] if the given string is not - a valid representation of an integer, or if the integer represented - exceeds the range of integers representable in type [int64]. *) - -val of_string_opt: string -> int64 option -(** Same as [of_string], but return [None] instead of raising. - @since 4.05 *) - -val to_string : int64 -> string -(** Return the string representation of its argument, in decimal. *) - -external bits_of_float : float -> int64 - = "caml_int64_bits_of_float" "caml_int64_bits_of_float_unboxed" - [@@unboxed] [@@noalloc] -(** Return the internal representation of the given float according - to the IEEE 754 floating-point 'double format' bit layout. - Bit 63 of the result represents the sign of the float; - bits 62 to 52 represent the (biased) exponent; bits 51 to 0 - represent the mantissa. *) - -external float_of_bits : int64 -> float - = "caml_int64_float_of_bits" "caml_int64_float_of_bits_unboxed" - [@@unboxed] [@@noalloc] -(** Return the floating-point number whose internal representation, - according to the IEEE 754 floating-point 'double format' bit layout, - is the given [int64]. *) - -type t = int64 -(** An alias for the type of 64-bit integers. *) - -val compare: t -> t -> int -(** The comparison function for 64-bit integers, with the same specification as - {!Stdlib.compare}. Along with the type [t], this function [compare] - allows the module [Int64] to be passed as argument to the functors - {!Set.Make} and {!Map.Make}. *) - -val equal: t -> t -> bool -(** The equal function for int64s. - @since 4.03.0 *) - -(**/**) - -(** {1 Deprecated functions} *) - -external format : string -> int64 -> string = "caml_int64_format" -(** Do not use this deprecated function. Instead, - used {!Printf.sprintf} with a [%L...] format. *) diff --git a/analysis/vendor/compiler-libs-406/lazy.ml b/analysis/vendor/compiler-libs-406/lazy.ml deleted file mode 100644 index 7dc1e9ddf..000000000 --- a/analysis/vendor/compiler-libs-406/lazy.ml +++ /dev/null @@ -1,83 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Damien Doligez, projet Para, INRIA Rocquencourt *) -(* *) -(* Copyright 1997 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Module [Lazy]: deferred computations *) - - -(* - WARNING: some purple magic is going on here. Do not take this file - as an example of how to program in OCaml. -*) - - -(* We make use of two special tags provided by the runtime: - [lazy_tag] and [forward_tag]. - - A value of type ['a Lazy.t] can be one of three things: - 1. A block of size 1 with tag [lazy_tag]. Its field is a closure of - type [unit -> 'a] that computes the value. - 2. A block of size 1 with tag [forward_tag]. Its field is the value - of type ['a] that was computed. - 3. Anything else except a float. This has type ['a] and is the value - that was computed. - Exceptions are stored in format (1). - The GC will magically change things from (2) to (3) according to its - fancy. - - If OCaml was configured with the -flat-float-array option (which is - currently the default), the following is also true: - We cannot use representation (3) for a [float Lazy.t] because - [caml_make_array] assumes that only a [float] value can have tag - [Double_tag]. - - We have to use the built-in type constructor [lazy_t] to - let the compiler implement the special typing and compilation - rules for the [lazy] keyword. -*) - -type 'a t = 'a lazy_t - -exception Undefined = CamlinternalLazy.Undefined - -external make_forward : 'a -> 'a lazy_t = "caml_lazy_make_forward" - -external force : 'a t -> 'a = "%lazy_force" - -(* let force = force *) - -let force_val = CamlinternalLazy.force_val - -let from_fun (f : unit -> 'arg) = - let x = Obj.new_block Obj.lazy_tag 1 in - Obj.set_field x 0 (Obj.repr f); - (Obj.obj x : 'arg t) - - -let from_val (v : 'arg) = - let t = Obj.tag (Obj.repr v) in - if t = Obj.forward_tag || t = Obj.lazy_tag || t = Obj.double_tag then begin - make_forward v - end else begin - (Obj.magic v : 'arg t) - end - - -let is_val (l : 'arg t) = Obj.tag (Obj.repr l) <> Obj.lazy_tag - -let lazy_from_fun = from_fun - -let lazy_from_val = from_val - -let lazy_is_val = is_val diff --git a/analysis/vendor/compiler-libs-406/lazy.mli b/analysis/vendor/compiler-libs-406/lazy.mli deleted file mode 100644 index ee10366ee..000000000 --- a/analysis/vendor/compiler-libs-406/lazy.mli +++ /dev/null @@ -1,95 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Damien Doligez, projet Para, INRIA Rocquencourt *) -(* *) -(* Copyright 1997 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Deferred computations. *) - -type 'a t = 'a lazy_t -(** A value of type ['a Lazy.t] is a deferred computation, called - a suspension, that has a result of type ['a]. The special - expression syntax [lazy (expr)] makes a suspension of the - computation of [expr], without computing [expr] itself yet. - "Forcing" the suspension will then compute [expr] and return its - result. - - Note: [lazy_t] is the built-in type constructor used by the compiler - for the [lazy] keyword. You should not use it directly. Always use - [Lazy.t] instead. - - Note: [Lazy.force] is not thread-safe. If you use this module in - a multi-threaded program, you will need to add some locks. - - Note: if the program is compiled with the [-rectypes] option, - ill-founded recursive definitions of the form [let rec x = lazy x] - or [let rec x = lazy(lazy(...(lazy x)))] are accepted by the type-checker - and lead, when forced, to ill-formed values that trigger infinite - loops in the garbage collector and other parts of the run-time system. - Without the [-rectypes] option, such ill-founded recursive definitions - are rejected by the type-checker. -*) - - -exception Undefined - -(* val force : 'a t -> 'a *) -external force : 'a t -> 'a = "%lazy_force" -(** [force x] forces the suspension [x] and returns its result. - If [x] has already been forced, [Lazy.force x] returns the - same value again without recomputing it. If it raised an exception, - the same exception is raised again. - Raise {!Undefined} if the forcing of [x] tries to force [x] itself - recursively. -*) - -val force_val : 'a t -> 'a -(** [force_val x] forces the suspension [x] and returns its - result. If [x] has already been forced, [force_val x] - returns the same value again without recomputing it. - Raise {!Undefined} if the forcing of [x] tries to force [x] itself - recursively. - If the computation of [x] raises an exception, it is unspecified - whether [force_val x] raises the same exception or {!Undefined}. -*) - -val from_fun : (unit -> 'a) -> 'a t -(** [from_fun f] is the same as [lazy (f ())] but slightly more efficient. - - [from_fun] should only be used if the function [f] is already defined. - In particular it is always less efficient to write - [from_fun (fun () -> expr)] than [lazy expr]. - - @since 4.00.0 *) - -val from_val : 'a -> 'a t -(** [from_val v] returns an already-forced suspension of [v]. - This is for special purposes only and should not be confused with - [lazy (v)]. - @since 4.00.0 *) - -val is_val : 'a t -> bool -(** [is_val x] returns [true] if [x] has already been forced and - did not raise an exception. - @since 4.00.0 *) - -val lazy_from_fun : (unit -> 'a) -> 'a t - [@@ocaml.deprecated "Use Lazy.from_fun instead."] -(** @deprecated synonym for [from_fun]. *) - -val lazy_from_val : 'a -> 'a t - [@@ocaml.deprecated "Use Lazy.from_val instead."] -(** @deprecated synonym for [from_val]. *) - -val lazy_is_val : 'a t -> bool - [@@ocaml.deprecated "Use Lazy.is_val instead."] -(** @deprecated synonym for [is_val]. *) diff --git a/analysis/vendor/compiler-libs-406/lexer.ml b/analysis/vendor/compiler-libs-406/lexer.ml deleted file mode 100644 index 299bda848..000000000 --- a/analysis/vendor/compiler-libs-406/lexer.ml +++ /dev/null @@ -1,2887 +0,0 @@ -# 18 "parsing/lexer.mll" - -open Lexing -open Misc -open Parser - -type error = - | Illegal_character of char - | Illegal_escape of string - | Unterminated_comment of Location.t - | Unterminated_string - | Unterminated_string_in_comment of Location.t * Location.t - | Keyword_as_label of string - | Invalid_literal of string - | Invalid_directive of string * string option -;; - -exception Error of error * Location.t;; - -(* The table of keywords *) - -let keyword_table = - create_hashtable 149 [ - "and", AND; - "as", AS; - "assert", ASSERT; - "begin", BEGIN; - "class", CLASS; - "constraint", CONSTRAINT; - "do", DO; - "done", DONE; - "downto", DOWNTO; - "else", ELSE; - "end", END; - "exception", EXCEPTION; - "external", EXTERNAL; - "false", FALSE; - "for", FOR; - "fun", FUN; - "function", FUNCTION; - "functor", FUNCTOR; - "if", IF; - "in", IN; - "include", INCLUDE; - "inherit", INHERIT; - "initializer", INITIALIZER; - "lazy", LAZY; - "let", LET; - "match", MATCH; - "method", METHOD; - "module", MODULE; - "mutable", MUTABLE; - "new", NEW; - "nonrec", NONREC; - "object", OBJECT; - "of", OF; - "open", OPEN; - "or", OR; -(* "parser", PARSER; *) - "private", PRIVATE; - "rec", REC; - "sig", SIG; - "struct", STRUCT; - "then", THEN; - "to", TO; - "true", TRUE; - "try", TRY; - "type", TYPE; - "val", VAL; - "virtual", VIRTUAL; - "when", WHEN; - "while", WHILE; - "with", WITH; - - "lor", INFIXOP3("lor"); (* Should be INFIXOP2 *) - "lxor", INFIXOP3("lxor"); (* Should be INFIXOP2 *) - "mod", INFIXOP3("mod"); - "land", INFIXOP3("land"); - "lsl", INFIXOP4("lsl"); - "lsr", INFIXOP4("lsr"); - "asr", INFIXOP4("asr") -] - -(* To buffer string literals *) - -let string_buffer = Buffer.create 256 -let reset_string_buffer () = Buffer.reset string_buffer -let get_stored_string () = Buffer.contents string_buffer - -let store_string_char c = Buffer.add_char string_buffer c -let store_string_utf_8_uchar u = Buffer.add_utf_8_uchar string_buffer u -let store_string s = Buffer.add_string string_buffer s -let store_lexeme lexbuf = store_string (Lexing.lexeme lexbuf) - -(* To store the position of the beginning of a string and comment *) -let string_start_loc = ref Location.none;; -let comment_start_loc = ref [];; -let in_comment () = !comment_start_loc <> [];; -let is_in_string = ref false -let in_string () = !is_in_string -let print_warnings = ref true - -(* Escaped chars are interpreted in strings unless they are in comments. *) -let store_escaped_char lexbuf c = - if in_comment () then store_lexeme lexbuf else store_string_char c - -let store_escaped_uchar lexbuf u = - if in_comment () then store_lexeme lexbuf else store_string_utf_8_uchar u - -let with_comment_buffer comment lexbuf = - let start_loc = Location.curr lexbuf in - comment_start_loc := [start_loc]; - reset_string_buffer (); - let end_loc = comment lexbuf in - let s = get_stored_string () in - reset_string_buffer (); - let loc = { start_loc with Location.loc_end = end_loc.Location.loc_end } in - s, loc - -(* To translate escape sequences *) - -let hex_digit_value d = (* assert (d in '0'..'9' 'a'..'f' 'A'..'F') *) - let d = Char.code d in - if d >= 97 then d - 87 else - if d >= 65 then d - 55 else - d - 48 - -let hex_num_value lexbuf ~first ~last = - let rec loop acc i = match i > last with - | true -> acc - | false -> - let value = hex_digit_value (Lexing.lexeme_char lexbuf i) in - loop (16 * acc + value) (i + 1) - in - loop 0 first - -let char_for_backslash = function - | 'n' -> '\010' - | 'r' -> '\013' - | 'b' -> '\008' - | 't' -> '\009' - | c -> c - -let char_for_decimal_code lexbuf i = - let c = 100 * (Char.code(Lexing.lexeme_char lexbuf i) - 48) + - 10 * (Char.code(Lexing.lexeme_char lexbuf (i+1)) - 48) + - (Char.code(Lexing.lexeme_char lexbuf (i+2)) - 48) in - if (c < 0 || c > 255) then - if in_comment () - then 'x' - else raise (Error(Illegal_escape (Lexing.lexeme lexbuf), - Location.curr lexbuf)) - else Char.chr c - -let char_for_octal_code lexbuf i = - let c = 64 * (Char.code(Lexing.lexeme_char lexbuf i) - 48) + - 8 * (Char.code(Lexing.lexeme_char lexbuf (i+1)) - 48) + - (Char.code(Lexing.lexeme_char lexbuf (i+2)) - 48) in - Char.chr c - -let char_for_hexadecimal_code lexbuf i = - let byte = hex_num_value lexbuf ~first:i ~last:(i+1) in - Char.chr byte - -let uchar_for_uchar_escape lexbuf = - let err e = - raise - (Error (Illegal_escape (Lexing.lexeme lexbuf ^ e), Location.curr lexbuf)) - in - let len = Lexing.lexeme_end lexbuf - Lexing.lexeme_start lexbuf in - let first = 3 (* skip opening \u{ *) in - let last = len - 2 (* skip closing } *) in - let digit_count = last - first + 1 in - match digit_count > 6 with - | true -> err ", too many digits, expected 1 to 6 hexadecimal digits" - | false -> - let cp = hex_num_value lexbuf ~first ~last in - if Uchar.is_valid cp then Uchar.unsafe_of_int cp else - err (", " ^ Printf.sprintf "%X" cp ^ " is not a Unicode scalar value") - -(* recover the name from a LABEL or OPTLABEL token *) - -let get_label_name lexbuf = - let s = Lexing.lexeme lexbuf in - let name = String.sub s 1 (String.length s - 2) in - if Hashtbl.mem keyword_table name then - raise (Error(Keyword_as_label name, Location.curr lexbuf)); - name -;; - -(* Update the current location with file name and line number. *) - -let update_loc lexbuf file line absolute chars = - let pos = lexbuf.lex_curr_p in - let new_file = match file with - | None -> pos.pos_fname - | Some s -> s - in - lexbuf.lex_curr_p <- { pos with - pos_fname = new_file; - pos_lnum = if absolute then line else pos.pos_lnum + line; - pos_bol = pos.pos_cnum - chars; - } -;; - -let preprocessor = ref None - -let escaped_newlines = ref false - -(* Warn about Latin-1 characters used in idents *) - -let warn_latin1 lexbuf = - Location.deprecated (Location.curr lexbuf)"ISO-Latin1 characters in identifiers" - -let handle_docstrings = ref true -let comment_list = ref [] - -let add_comment com = - comment_list := com :: !comment_list - -let add_docstring_comment ds = - let com = - ("*" ^ Docstrings.docstring_body ds, Docstrings.docstring_loc ds) - in - add_comment com - -let comments () = List.rev !comment_list - -(* Error report *) - -open Format - -let report_error ppf = function - | Illegal_character c -> - fprintf ppf "Illegal character (%s)" (Char.escaped c) - | Illegal_escape s -> - fprintf ppf "Illegal backslash escape in string or character (%s)" s - | Unterminated_comment _ -> - fprintf ppf "Comment not terminated" - | Unterminated_string -> - fprintf ppf "String literal not terminated" - | Unterminated_string_in_comment (_, loc) -> - fprintf ppf "This comment contains an unterminated string literal@.\ - %aString literal begins here" - Location.print_error loc - | Keyword_as_label kwd -> - fprintf ppf "`%s' is a keyword, it cannot be used as label name" kwd - | Invalid_literal s -> - fprintf ppf "Invalid literal %s" s - | Invalid_directive (dir, explanation) -> - fprintf ppf "Invalid lexer directive %S" dir; - begin match explanation with - | None -> () - | Some expl -> fprintf ppf ": %s" expl - end - -let () = - Location.register_error_of_exn - (function - | Error (err, loc) -> - Some (Location.error_of_printer loc report_error err) - | _ -> - None - ) - - -# 268 "parsing/lexer.ml" -let __ocaml_lex_tables = { - Lexing.lex_base = - "\000\000\162\255\163\255\224\000\003\001\038\001\073\001\108\001\ - \143\001\186\255\178\001\215\001\194\255\091\000\252\001\031\002\ - \068\000\071\000\065\002\100\002\212\255\214\255\217\255\135\002\ - \230\002\009\003\088\000\255\000\039\003\236\255\123\003\207\003\ - \035\004\243\004\195\005\147\006\114\007\206\007\158\008\122\000\ - \254\255\001\000\005\000\255\255\006\000\007\000\125\009\155\009\ - \107\010\250\255\249\255\059\011\011\012\247\255\246\255\219\012\ - \047\013\131\013\215\013\043\014\127\014\211\014\039\015\123\015\ - \207\015\035\016\087\000\119\016\203\016\031\017\115\017\199\017\ - \108\000\192\255\235\255\007\003\034\018\106\000\107\000\011\000\ - \234\255\233\255\228\255\152\002\099\000\118\000\113\000\232\255\ - \128\000\147\000\231\255\224\000\003\001\148\000\230\255\110\004\ - \149\000\229\255\148\000\224\255\217\000\223\255\222\000\034\018\ - \222\255\073\018\101\005\009\003\221\255\012\000\014\001\080\001\ - \115\001\024\001\221\255\013\000\119\018\158\018\193\018\231\018\ - \010\019\209\255\204\255\205\255\206\255\202\255\045\019\154\000\ - \183\000\195\255\196\255\197\255\217\000\182\255\180\255\189\255\ - \080\019\185\255\187\255\115\019\150\019\185\019\220\019\130\005\ - \243\255\244\255\017\000\245\255\174\001\223\005\253\255\248\000\ - \249\000\255\255\254\255\252\255\005\006\238\019\003\001\004\001\ - \018\000\251\255\250\255\249\255\222\006\026\003\005\001\248\255\ - \036\003\008\001\247\255\066\008\020\001\246\255\059\001\234\001\ - \245\255\246\255\247\255\060\001\055\020\255\255\248\255\193\000\ - \233\008\038\001\133\004\253\255\073\001\094\001\113\001\143\004\ - \252\255\192\002\027\004\251\255\230\009\250\255\182\010\089\020\ - \249\255\129\001\130\001\252\255\085\007\254\255\255\255\146\001\ - \147\001\253\255\177\007\033\001\044\001\148\001\151\001\045\001\ - \153\001\044\001\019\000\255\255"; - Lexing.lex_backtrk = - "\255\255\255\255\255\255\090\000\089\000\086\000\085\000\078\000\ - \076\000\255\255\067\000\064\000\255\255\057\000\056\000\054\000\ - \052\000\048\000\045\000\081\000\255\255\255\255\255\255\036\000\ - \035\000\042\000\040\000\039\000\062\000\255\255\014\000\014\000\ - \013\000\012\000\011\000\010\000\007\000\004\000\003\000\002\000\ - \255\255\093\000\093\000\255\255\255\255\255\255\084\000\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\018\000\ - \018\000\016\000\015\000\018\000\015\000\015\000\014\000\016\000\ - \015\000\016\000\255\255\017\000\017\000\014\000\014\000\016\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\027\000\027\000\027\000\027\000\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\028\000\255\255\029\000\255\255\030\000\088\000\ - \255\255\091\000\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\037\000\087\000\082\000\044\000\ - \047\000\255\255\255\255\255\255\255\255\255\255\055\000\074\000\ - \071\000\255\255\255\255\255\255\072\000\255\255\255\255\255\255\ - \065\000\255\255\255\255\083\000\077\000\080\000\079\000\255\255\ - \255\255\255\255\012\000\255\255\012\000\012\000\255\255\012\000\ - \012\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\010\000\010\000\255\255\255\255\007\000\ - \007\000\007\000\007\000\255\255\001\000\007\000\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\003\000\255\255\255\255\003\000\ - \255\255\255\255\255\255\002\000\255\255\255\255\001\000\255\255\ - \255\255\255\255\255\255\255\255"; - Lexing.lex_default = - "\001\000\000\000\000\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\000\000\255\255\255\255\000\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\000\000\000\000\000\000\255\255\ - \255\255\255\255\255\255\077\000\255\255\000\000\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \000\000\255\255\255\255\000\000\255\255\255\255\255\255\255\255\ - \255\255\000\000\000\000\255\255\255\255\000\000\000\000\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\000\000\000\000\255\255\082\000\255\255\255\255\255\255\ - \000\000\000\000\000\000\255\255\255\255\255\255\255\255\000\000\ - \255\255\255\255\000\000\255\255\255\255\255\255\000\000\255\255\ - \255\255\000\000\255\255\000\000\255\255\000\000\255\255\255\255\ - \000\000\255\255\110\000\255\255\000\000\255\255\110\000\111\000\ - \110\000\113\000\000\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\000\000\000\000\000\000\000\000\000\000\255\255\255\255\ - \255\255\000\000\000\000\000\000\255\255\000\000\000\000\000\000\ - \255\255\000\000\000\000\255\255\255\255\255\255\255\255\144\000\ - \000\000\000\000\255\255\000\000\158\000\255\255\000\000\255\255\ - \255\255\000\000\000\000\000\000\255\255\255\255\255\255\255\255\ - \255\255\000\000\000\000\000\000\255\255\255\255\255\255\000\000\ - \255\255\255\255\000\000\255\255\255\255\000\000\255\255\176\000\ - \000\000\000\000\000\000\255\255\182\000\000\000\000\000\255\255\ - \255\255\255\255\255\255\000\000\255\255\255\255\255\255\255\255\ - \000\000\255\255\255\255\000\000\255\255\000\000\255\255\255\255\ - \000\000\255\255\203\000\000\000\255\255\000\000\000\000\255\255\ - \255\255\000\000\255\255\255\255\255\255\213\000\216\000\255\255\ - \216\000\255\255\255\255\000\000"; - Lexing.lex_trans = - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\039\000\040\000\040\000\039\000\041\000\045\000\043\000\ - \043\000\040\000\044\000\044\000\045\000\078\000\108\000\114\000\ - \079\000\109\000\115\000\145\000\159\000\219\000\174\000\160\000\ - \039\000\008\000\029\000\024\000\006\000\004\000\023\000\027\000\ - \026\000\021\000\025\000\007\000\020\000\019\000\018\000\003\000\ - \031\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ - \030\000\030\000\017\000\016\000\015\000\014\000\010\000\036\000\ - \005\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\013\000\042\000\012\000\005\000\038\000\ - \022\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\028\000\011\000\009\000\037\000\125\000\ - \127\000\124\000\098\000\039\000\123\000\122\000\039\000\065\000\ - \065\000\065\000\065\000\065\000\065\000\065\000\065\000\065\000\ - \065\000\081\000\080\000\091\000\091\000\091\000\091\000\130\000\ - \087\000\129\000\039\000\128\000\071\000\071\000\071\000\071\000\ - \071\000\071\000\071\000\071\000\071\000\071\000\088\000\088\000\ - \088\000\088\000\088\000\088\000\088\000\088\000\088\000\088\000\ - \089\000\089\000\089\000\089\000\089\000\089\000\089\000\089\000\ - \089\000\089\000\090\000\094\000\097\000\099\000\100\000\134\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\131\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\132\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \002\000\003\000\101\000\102\000\003\000\003\000\003\000\101\000\ - \102\000\078\000\003\000\003\000\079\000\003\000\003\000\003\000\ - \092\000\092\000\092\000\092\000\092\000\092\000\092\000\092\000\ - \108\000\133\000\003\000\109\000\003\000\003\000\003\000\003\000\ - \003\000\154\000\114\000\153\000\003\000\115\000\255\255\003\000\ - \003\000\003\000\163\000\162\000\167\000\003\000\003\000\170\000\ - \003\000\003\000\003\000\093\000\093\000\093\000\093\000\093\000\ - \093\000\093\000\093\000\173\000\198\000\003\000\003\000\003\000\ - \003\000\003\000\003\000\003\000\212\000\145\000\178\000\005\000\ - \174\000\201\000\005\000\005\000\005\000\213\000\217\000\218\000\ - \005\000\005\000\188\000\005\000\005\000\005\000\193\000\193\000\ - \193\000\193\000\108\000\076\000\003\000\109\000\003\000\000\000\ - \005\000\003\000\005\000\005\000\005\000\005\000\005\000\000\000\ - \188\000\188\000\006\000\190\000\000\000\006\000\006\000\006\000\ - \000\000\000\000\113\000\006\000\006\000\000\000\006\000\006\000\ - \006\000\000\000\000\000\188\000\112\000\108\000\190\000\003\000\ - \109\000\003\000\000\000\006\000\005\000\006\000\006\000\006\000\ - \006\000\006\000\000\000\178\000\206\000\117\000\201\000\207\000\ - \117\000\117\000\117\000\112\000\000\000\111\000\117\000\117\000\ - \000\000\117\000\142\000\117\000\206\000\206\000\214\000\208\000\ - \208\000\215\000\005\000\215\000\005\000\000\000\117\000\006\000\ - \117\000\141\000\117\000\117\000\117\000\000\000\000\000\000\000\ - \139\000\000\000\000\000\139\000\139\000\139\000\000\000\000\000\ - \159\000\139\000\139\000\160\000\139\000\139\000\139\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\006\000\000\000\006\000\ - \000\000\139\000\117\000\139\000\140\000\139\000\139\000\139\000\ - \000\000\000\000\000\000\006\000\000\000\161\000\006\000\006\000\ - \006\000\000\000\000\000\000\000\006\000\006\000\000\000\006\000\ - \006\000\006\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \117\000\000\000\117\000\000\000\006\000\139\000\006\000\006\000\ - \006\000\006\000\006\000\000\000\178\000\000\000\000\000\179\000\ - \006\000\000\000\000\000\006\000\006\000\006\000\204\000\255\255\ - \000\000\006\000\006\000\000\000\006\000\006\000\006\000\000\000\ - \000\000\000\000\157\000\139\000\181\000\139\000\255\255\138\000\ - \006\000\006\000\000\000\006\000\006\000\006\000\006\000\006\000\ - \255\255\000\000\000\000\000\000\000\000\006\000\000\000\000\000\ - \006\000\006\000\006\000\000\000\000\000\000\000\006\000\006\000\ - \000\000\006\000\006\000\006\000\000\000\000\000\006\000\137\000\ - \006\000\000\000\000\000\000\000\135\000\006\000\006\000\000\000\ - \006\000\006\000\006\000\006\000\006\000\000\000\000\000\000\000\ - \006\000\000\000\000\000\006\000\006\000\006\000\180\000\000\000\ - \000\000\006\000\006\000\000\000\126\000\006\000\006\000\000\000\ - \255\255\000\000\000\000\136\000\000\000\006\000\000\000\000\000\ - \000\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\ - \000\000\000\000\120\000\000\000\000\000\120\000\120\000\120\000\ - \000\000\000\000\000\000\120\000\120\000\000\000\120\000\121\000\ - \120\000\000\000\000\000\255\255\000\000\000\000\000\000\000\000\ - \006\000\000\000\006\000\120\000\000\000\006\000\120\000\120\000\ - \120\000\120\000\205\000\000\000\000\000\117\000\000\000\000\000\ - \117\000\117\000\117\000\000\000\000\000\000\000\117\000\117\000\ - \000\000\117\000\118\000\117\000\255\255\000\000\000\000\255\255\ - \000\000\255\255\000\000\006\000\000\000\006\000\117\000\120\000\ - \117\000\117\000\119\000\117\000\117\000\000\000\000\000\000\000\ - \006\000\000\000\000\000\006\000\006\000\116\000\255\255\000\000\ - \000\000\006\000\006\000\000\000\006\000\006\000\006\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\120\000\000\000\120\000\ - \000\000\006\000\117\000\006\000\006\000\006\000\006\000\006\000\ - \095\000\095\000\095\000\095\000\095\000\095\000\095\000\095\000\ - \095\000\095\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\095\000\095\000\095\000\095\000\095\000\095\000\000\000\ - \117\000\000\000\117\000\000\000\000\000\006\000\000\000\000\000\ - \000\000\000\000\177\000\000\000\000\000\000\000\000\000\107\000\ - \194\000\194\000\194\000\194\000\194\000\194\000\194\000\194\000\ - \000\000\095\000\095\000\095\000\095\000\095\000\095\000\000\000\ - \000\000\000\000\000\000\006\000\000\000\006\000\107\000\105\000\ - \000\000\105\000\105\000\105\000\105\000\000\000\000\000\000\000\ - \105\000\105\000\107\000\105\000\105\000\105\000\106\000\106\000\ - \106\000\106\000\106\000\106\000\106\000\106\000\106\000\106\000\ - \105\000\000\000\105\000\105\000\105\000\105\000\105\000\000\000\ - \000\000\107\000\003\000\000\000\000\000\003\000\003\000\003\000\ - \000\000\000\000\104\000\103\000\003\000\000\000\003\000\003\000\ - \003\000\106\000\106\000\106\000\106\000\106\000\106\000\106\000\ - \106\000\106\000\106\000\003\000\105\000\003\000\003\000\003\000\ - \003\000\003\000\168\000\168\000\168\000\168\000\168\000\168\000\ - \168\000\168\000\168\000\168\000\169\000\169\000\169\000\169\000\ - \169\000\169\000\169\000\169\000\169\000\169\000\000\000\000\000\ - \000\000\000\000\105\000\073\000\105\000\000\000\075\000\003\000\ - \075\000\075\000\075\000\075\000\075\000\075\000\075\000\075\000\ - \075\000\075\000\075\000\075\000\075\000\075\000\075\000\075\000\ - \075\000\075\000\075\000\075\000\075\000\075\000\075\000\075\000\ - \075\000\075\000\000\000\074\000\000\000\003\000\075\000\003\000\ - \075\000\075\000\075\000\075\000\075\000\075\000\075\000\075\000\ - \075\000\075\000\075\000\075\000\075\000\075\000\075\000\075\000\ - \075\000\075\000\075\000\075\000\075\000\075\000\075\000\075\000\ - \075\000\075\000\055\000\074\000\000\000\000\000\000\000\000\000\ - \000\000\057\000\000\000\030\000\030\000\030\000\030\000\030\000\ - \030\000\030\000\030\000\030\000\030\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\055\000\055\000\055\000\055\000\ - \056\000\055\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\000\000\000\000\ - \000\000\000\000\030\000\000\000\055\000\055\000\055\000\055\000\ - \056\000\055\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\055\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\057\000\000\000\030\000\ - \030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ - \030\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \055\000\059\000\055\000\055\000\056\000\055\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\060\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\061\000\ - \058\000\058\000\000\000\000\000\000\000\000\000\030\000\000\000\ - \055\000\059\000\055\000\055\000\056\000\055\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\060\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\061\000\ - \058\000\058\000\032\000\195\000\195\000\195\000\195\000\195\000\ - \195\000\195\000\195\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\000\000\000\000\ - \000\000\000\000\032\000\000\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\096\000\096\000\ - \096\000\096\000\096\000\096\000\096\000\096\000\096\000\096\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\096\000\ - \096\000\096\000\096\000\096\000\096\000\191\000\191\000\191\000\ - \191\000\191\000\191\000\191\000\191\000\191\000\191\000\192\000\ - \192\000\192\000\192\000\192\000\192\000\192\000\192\000\192\000\ - \192\000\000\000\000\000\000\000\000\000\000\000\000\000\096\000\ - \096\000\096\000\096\000\096\000\096\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\000\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\033\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\000\000\000\000\ - \000\000\000\000\033\000\000\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\112\000\108\000\ - \000\000\000\000\109\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\112\000\000\000\111\000\ - \000\000\000\000\000\000\000\000\145\000\000\000\000\000\146\000\ - \000\000\000\000\000\000\000\000\000\000\106\000\106\000\106\000\ - \106\000\106\000\106\000\106\000\106\000\106\000\106\000\000\000\ - \000\000\000\000\000\000\000\000\150\000\000\000\000\000\000\000\ - \000\000\148\000\152\000\000\000\151\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\000\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\034\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\149\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\000\000\000\000\ - \000\000\000\000\034\000\000\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\156\000\000\000\ - \156\000\156\000\156\000\156\000\156\000\156\000\156\000\156\000\ - \156\000\156\000\156\000\156\000\156\000\156\000\156\000\156\000\ - \156\000\156\000\156\000\156\000\156\000\156\000\156\000\156\000\ - \156\000\156\000\000\000\155\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\156\000\255\255\156\000\156\000\ - \156\000\156\000\156\000\156\000\156\000\156\000\156\000\156\000\ - \156\000\156\000\156\000\156\000\156\000\156\000\156\000\156\000\ - \156\000\156\000\156\000\156\000\156\000\156\000\156\000\156\000\ - \000\000\155\000\147\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\000\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\035\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\000\000\000\000\ - \000\000\000\000\035\000\000\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\171\000\171\000\ - \171\000\171\000\171\000\171\000\171\000\171\000\171\000\171\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\171\000\ - \171\000\171\000\171\000\171\000\171\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\171\000\ - \171\000\171\000\171\000\171\000\171\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\000\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\000\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\046\000\000\000\000\000\046\000\046\000\ - \046\000\000\000\000\000\000\000\046\000\046\000\000\000\046\000\ - \046\000\046\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\046\000\000\000\046\000\046\000\ - \046\000\046\000\046\000\000\000\210\000\000\000\210\000\210\000\ - \210\000\210\000\210\000\210\000\210\000\210\000\210\000\210\000\ - \210\000\210\000\210\000\210\000\210\000\210\000\210\000\210\000\ - \210\000\210\000\210\000\210\000\210\000\210\000\210\000\210\000\ - \046\000\052\000\209\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\000\000\046\000\046\000\ - \046\000\000\000\046\000\046\000\046\000\000\000\000\000\000\000\ - \046\000\046\000\000\000\046\000\046\000\046\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \046\000\000\000\046\000\046\000\046\000\046\000\046\000\000\000\ - \210\000\000\000\210\000\210\000\210\000\210\000\210\000\210\000\ - \210\000\210\000\210\000\210\000\210\000\210\000\210\000\210\000\ - \210\000\210\000\210\000\210\000\210\000\210\000\210\000\210\000\ - \210\000\210\000\210\000\210\000\046\000\048\000\209\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\000\000\046\000\000\000\046\000\000\000\000\000\000\000\ - \000\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\000\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\172\000\172\000\172\000\172\000\172\000\172\000\ - \172\000\172\000\172\000\172\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\172\000\172\000\172\000\172\000\172\000\ - \172\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\172\000\172\000\172\000\172\000\172\000\ - \172\000\000\000\000\000\000\000\000\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\035\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\000\000\000\000\000\000\000\000\035\000\000\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\196\000\196\000\196\000\196\000\196\000\196\000\196\000\ - \196\000\196\000\196\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\196\000\196\000\196\000\196\000\196\000\196\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\196\000\196\000\196\000\196\000\196\000\196\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\000\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\000\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\046\000\000\000\ - \000\000\046\000\046\000\046\000\000\000\000\000\000\000\046\000\ - \046\000\000\000\046\000\046\000\046\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\046\000\ - \000\000\046\000\046\000\046\000\046\000\046\000\000\000\000\000\ - \000\000\000\000\047\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\050\000\000\000\000\000\ - \000\000\000\000\000\000\046\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\000\000\000\000\ - \000\000\046\000\047\000\046\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\197\000\197\000\ - \197\000\197\000\197\000\197\000\197\000\197\000\197\000\197\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\197\000\ - \197\000\197\000\197\000\197\000\197\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\197\000\ - \197\000\197\000\197\000\197\000\197\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\000\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\048\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\049\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\000\000\000\000\ - \000\000\000\000\048\000\000\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\199\000\199\000\ - \199\000\199\000\199\000\199\000\199\000\199\000\199\000\199\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\199\000\ - \199\000\199\000\199\000\199\000\199\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\199\000\ - \199\000\199\000\199\000\199\000\199\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\000\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\051\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\054\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\000\000\000\000\ - \000\000\000\000\051\000\000\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\000\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\052\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\053\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\000\000\000\000\ - \000\000\000\000\052\000\000\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\000\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\055\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\000\000\000\000\ - \000\000\000\000\055\000\000\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\000\000\ - \000\000\000\000\072\000\000\000\072\000\000\000\000\000\071\000\ - \071\000\071\000\071\000\071\000\071\000\071\000\071\000\071\000\ - \071\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\000\000\000\000\000\000\000\000\055\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\057\000\057\000\057\000\057\000\057\000\ - \057\000\057\000\057\000\057\000\057\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\055\000\055\000\055\000\055\000\ - \056\000\055\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\000\000\000\000\ - \000\000\000\000\057\000\000\000\055\000\055\000\055\000\055\000\ - \056\000\055\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\055\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\000\000\000\000\000\000\000\000\055\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\070\000\070\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\000\000\000\000\ - \000\000\000\000\055\000\000\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\069\000\ - \069\000\069\000\069\000\069\000\069\000\069\000\069\000\055\000\ - \055\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\000\000\000\000\000\000\000\000\055\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\062\000\062\000\062\000\062\000\062\000\ - \062\000\062\000\062\000\062\000\062\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\062\000\062\000\062\000\062\000\ - \062\000\062\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\000\000\000\000\ - \000\000\000\000\055\000\000\000\062\000\062\000\062\000\062\000\ - \062\000\062\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\063\000\000\000\062\000\ - \062\000\062\000\062\000\062\000\062\000\062\000\062\000\062\000\ - \062\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \062\000\062\000\062\000\062\000\062\000\062\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\064\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\000\000\000\000\000\000\000\000\062\000\000\000\ - \062\000\062\000\062\000\062\000\062\000\062\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\064\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\055\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\063\000\063\000\063\000\063\000\063\000\ - \063\000\063\000\063\000\063\000\063\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\063\000\063\000\063\000\063\000\ - \063\000\063\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\068\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\000\000\000\000\ - \000\000\000\000\063\000\000\000\063\000\063\000\063\000\063\000\ - \063\000\063\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\068\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\055\000\000\000\ - \000\000\000\000\066\000\000\000\066\000\000\000\000\000\065\000\ - \065\000\065\000\065\000\065\000\065\000\065\000\065\000\065\000\ - \065\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\000\000\000\000\000\000\000\000\055\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\065\000\065\000\065\000\065\000\065\000\ - \065\000\065\000\065\000\065\000\065\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\000\000\000\000\ - \000\000\000\000\065\000\000\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\055\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\000\000\000\000\000\000\000\000\055\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\000\000\000\000\000\000\066\000\000\000\ - \066\000\000\000\000\000\065\000\065\000\065\000\065\000\065\000\ - \065\000\065\000\065\000\065\000\065\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\000\000\000\000\ - \000\000\000\000\055\000\000\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\069\000\ - \069\000\069\000\069\000\069\000\069\000\069\000\069\000\055\000\ - \055\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\000\000\000\000\000\000\000\000\069\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\055\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\070\000\070\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\000\000\000\000\ - \000\000\000\000\070\000\000\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\055\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\071\000\ - \071\000\071\000\071\000\071\000\071\000\071\000\071\000\071\000\ - \071\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\000\000\000\000\000\000\000\000\071\000\000\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\086\000\103\000\086\000\000\000\103\000\103\000\ - \103\000\086\000\000\000\000\000\103\000\103\000\000\000\103\000\ - \103\000\103\000\085\000\085\000\085\000\085\000\085\000\085\000\ - \085\000\085\000\085\000\085\000\103\000\000\000\103\000\103\000\ - \103\000\103\000\103\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\105\000\000\000\105\000\105\000\105\000\105\000\ - \000\000\000\000\000\000\105\000\105\000\000\000\105\000\105\000\ - \105\000\000\000\000\000\000\000\000\000\000\000\086\000\000\000\ - \103\000\000\000\000\000\105\000\086\000\105\000\105\000\105\000\ - \105\000\105\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \086\000\084\000\000\000\000\000\086\000\000\000\086\000\000\000\ - \006\000\000\000\083\000\006\000\006\000\006\000\103\000\000\000\ - \103\000\006\000\006\000\000\000\006\000\006\000\006\000\105\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\006\000\000\000\006\000\006\000\006\000\006\000\006\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\117\000\ - \000\000\000\000\117\000\117\000\117\000\105\000\000\000\105\000\ - \117\000\117\000\000\000\117\000\117\000\117\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\006\000\000\000\000\000\ - \117\000\000\000\117\000\117\000\117\000\117\000\117\000\000\000\ - \000\000\000\000\117\000\000\000\000\000\117\000\117\000\117\000\ - \000\000\000\000\000\000\117\000\117\000\000\000\117\000\117\000\ - \117\000\000\000\000\000\006\000\000\000\006\000\000\000\000\000\ - \000\000\000\000\000\000\117\000\117\000\117\000\117\000\117\000\ - \117\000\117\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \117\000\000\000\000\000\117\000\117\000\117\000\000\000\000\000\ - \000\000\117\000\117\000\000\000\117\000\117\000\117\000\000\000\ - \000\000\000\000\117\000\000\000\117\000\000\000\000\000\117\000\ - \000\000\117\000\255\255\117\000\117\000\117\000\117\000\117\000\ - \000\000\000\000\000\000\120\000\000\000\000\000\120\000\120\000\ - \120\000\000\000\000\000\000\000\120\000\120\000\000\000\120\000\ - \120\000\120\000\000\000\000\000\000\000\117\000\000\000\117\000\ - \000\000\000\000\000\000\000\000\120\000\117\000\120\000\120\000\ - \120\000\120\000\120\000\000\000\000\000\000\000\006\000\000\000\ - \000\000\006\000\006\000\006\000\000\000\000\000\000\000\006\000\ - \006\000\000\000\006\000\006\000\006\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\117\000\000\000\117\000\000\000\006\000\ - \120\000\006\000\006\000\006\000\006\000\006\000\000\000\000\000\ - \000\000\006\000\000\000\000\000\006\000\006\000\006\000\000\000\ - \000\000\000\000\006\000\006\000\000\000\006\000\006\000\006\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\120\000\000\000\ - \120\000\000\000\006\000\006\000\006\000\006\000\006\000\006\000\ - \006\000\000\000\000\000\000\000\139\000\000\000\000\000\139\000\ - \139\000\139\000\000\000\000\000\000\000\139\000\139\000\000\000\ - \139\000\139\000\139\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\006\000\000\000\006\000\000\000\139\000\006\000\139\000\ - \139\000\139\000\139\000\139\000\000\000\000\000\000\000\139\000\ - \000\000\000\000\139\000\139\000\139\000\000\000\000\000\000\000\ - \139\000\139\000\000\000\139\000\139\000\139\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\006\000\000\000\006\000\000\000\ - \139\000\139\000\139\000\139\000\139\000\139\000\139\000\000\000\ - \000\000\000\000\117\000\000\000\000\000\117\000\117\000\117\000\ - \000\000\000\000\000\000\117\000\117\000\000\000\117\000\117\000\ - \117\000\000\000\000\000\000\000\000\000\000\000\000\000\139\000\ - \000\000\139\000\000\000\117\000\139\000\117\000\117\000\117\000\ - \117\000\117\000\000\000\000\000\000\000\117\000\000\000\000\000\ - \117\000\117\000\117\000\000\000\000\000\000\000\117\000\117\000\ - \000\000\117\000\117\000\117\000\000\000\000\000\166\000\000\000\ - \166\000\000\000\139\000\000\000\139\000\166\000\117\000\117\000\ - \117\000\117\000\117\000\117\000\117\000\000\000\165\000\165\000\ - \165\000\165\000\165\000\165\000\165\000\165\000\165\000\165\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\117\000\000\000\117\000\ - \000\000\000\000\117\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\188\000\000\000\000\000\189\000\000\000\000\000\000\000\ - \000\000\000\000\166\000\000\000\000\000\000\000\000\000\000\000\ - \166\000\000\000\000\000\000\000\000\000\000\000\000\000\187\000\ - \117\000\187\000\117\000\000\000\166\000\000\000\187\000\000\000\ - \166\000\000\000\166\000\000\000\000\000\000\000\164\000\186\000\ - \186\000\186\000\186\000\186\000\186\000\186\000\186\000\186\000\ - \186\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\199\000\199\000\199\000\199\000\199\000\199\000\199\000\ - \199\000\199\000\199\000\187\000\000\000\000\000\000\000\000\000\ - \000\000\187\000\199\000\199\000\199\000\199\000\199\000\199\000\ - \000\000\000\000\000\000\000\000\000\000\187\000\185\000\000\000\ - \000\000\187\000\000\000\187\000\183\000\000\000\000\000\184\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\199\000\199\000\199\000\199\000\199\000\199\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\200\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\255\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000"; - Lexing.lex_check = - "\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\000\000\000\000\041\000\000\000\000\000\041\000\042\000\ - \044\000\045\000\042\000\044\000\045\000\079\000\109\000\115\000\ - \079\000\109\000\115\000\146\000\160\000\218\000\146\000\160\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\ - \013\000\017\000\026\000\039\000\017\000\017\000\039\000\066\000\ - \066\000\066\000\066\000\066\000\066\000\066\000\066\000\066\000\ - \066\000\077\000\078\000\084\000\084\000\084\000\084\000\013\000\ - \086\000\013\000\039\000\013\000\072\000\072\000\072\000\072\000\ - \072\000\072\000\072\000\072\000\072\000\072\000\085\000\085\000\ - \085\000\085\000\085\000\085\000\085\000\085\000\085\000\085\000\ - \088\000\088\000\088\000\088\000\088\000\088\000\088\000\088\000\ - \088\000\088\000\089\000\093\000\096\000\098\000\098\000\127\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\013\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\128\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\003\000\100\000\100\000\003\000\003\000\003\000\102\000\ - \102\000\027\000\003\000\003\000\027\000\003\000\003\000\003\000\ - \091\000\091\000\091\000\091\000\091\000\091\000\091\000\091\000\ - \110\000\132\000\003\000\110\000\003\000\003\000\003\000\003\000\ - \003\000\151\000\113\000\152\000\004\000\113\000\027\000\004\000\ - \004\000\004\000\158\000\159\000\166\000\004\000\004\000\169\000\ - \004\000\004\000\004\000\092\000\092\000\092\000\092\000\092\000\ - \092\000\092\000\092\000\172\000\183\000\004\000\003\000\004\000\ - \004\000\004\000\004\000\004\000\211\000\174\000\179\000\005\000\ - \174\000\179\000\005\000\005\000\005\000\212\000\215\000\217\000\ - \005\000\005\000\188\000\005\000\005\000\005\000\185\000\185\000\ - \185\000\185\000\111\000\027\000\003\000\111\000\003\000\255\255\ - \005\000\004\000\005\000\005\000\005\000\005\000\005\000\255\255\ - \189\000\188\000\006\000\189\000\255\255\006\000\006\000\006\000\ - \255\255\255\255\111\000\006\000\006\000\255\255\006\000\006\000\ - \006\000\255\255\255\255\190\000\112\000\112\000\190\000\004\000\ - \112\000\004\000\255\255\006\000\005\000\006\000\006\000\006\000\ - \006\000\006\000\255\255\201\000\202\000\007\000\201\000\202\000\ - \007\000\007\000\007\000\112\000\255\255\112\000\007\000\007\000\ - \255\255\007\000\007\000\007\000\207\000\208\000\213\000\207\000\ - \208\000\214\000\005\000\216\000\005\000\255\255\007\000\006\000\ - \007\000\007\000\007\000\007\000\007\000\255\255\255\255\255\255\ - \008\000\255\255\255\255\008\000\008\000\008\000\255\255\255\255\ - \148\000\008\000\008\000\148\000\008\000\008\000\008\000\255\255\ - \255\255\255\255\255\255\255\255\255\255\006\000\255\255\006\000\ - \255\255\008\000\007\000\008\000\008\000\008\000\008\000\008\000\ - \255\255\255\255\255\255\010\000\255\255\148\000\010\000\010\000\ - \010\000\255\255\255\255\255\255\010\000\010\000\255\255\010\000\ - \010\000\010\000\255\255\255\255\255\255\255\255\255\255\255\255\ - \007\000\255\255\007\000\255\255\010\000\008\000\010\000\010\000\ - \010\000\010\000\010\000\255\255\175\000\255\255\255\255\175\000\ - \011\000\255\255\255\255\011\000\011\000\011\000\202\000\027\000\ - \255\255\011\000\011\000\255\255\011\000\011\000\011\000\255\255\ - \255\255\255\255\148\000\008\000\175\000\008\000\110\000\010\000\ - \010\000\011\000\255\255\011\000\011\000\011\000\011\000\011\000\ - \113\000\255\255\255\255\255\255\255\255\014\000\255\255\255\255\ - \014\000\014\000\014\000\255\255\255\255\255\255\014\000\014\000\ - \255\255\014\000\014\000\014\000\255\255\255\255\010\000\010\000\ - \010\000\255\255\255\255\255\255\011\000\011\000\014\000\255\255\ - \014\000\014\000\014\000\014\000\014\000\255\255\255\255\255\255\ - \015\000\255\255\255\255\015\000\015\000\015\000\175\000\255\255\ - \255\255\015\000\015\000\255\255\015\000\015\000\015\000\255\255\ - \111\000\255\255\255\255\011\000\255\255\011\000\255\255\255\255\ - \255\255\015\000\014\000\015\000\015\000\015\000\015\000\015\000\ - \255\255\255\255\018\000\255\255\255\255\018\000\018\000\018\000\ - \255\255\255\255\255\255\018\000\018\000\255\255\018\000\018\000\ - \018\000\255\255\255\255\112\000\255\255\255\255\255\255\255\255\ - \014\000\255\255\014\000\018\000\255\255\015\000\018\000\018\000\ - \018\000\018\000\202\000\255\255\255\255\019\000\255\255\255\255\ - \019\000\019\000\019\000\255\255\255\255\255\255\019\000\019\000\ - \255\255\019\000\019\000\019\000\213\000\255\255\255\255\214\000\ - \255\255\216\000\255\255\015\000\255\255\015\000\019\000\018\000\ - \019\000\019\000\019\000\019\000\019\000\255\255\255\255\255\255\ - \023\000\255\255\255\255\023\000\023\000\023\000\148\000\255\255\ - \255\255\023\000\023\000\255\255\023\000\023\000\023\000\255\255\ - \255\255\255\255\255\255\255\255\255\255\018\000\255\255\018\000\ - \255\255\023\000\019\000\023\000\023\000\023\000\023\000\023\000\ - \083\000\083\000\083\000\083\000\083\000\083\000\083\000\083\000\ - \083\000\083\000\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\083\000\083\000\083\000\083\000\083\000\083\000\255\255\ - \019\000\255\255\019\000\255\255\255\255\023\000\255\255\255\255\ - \255\255\255\255\175\000\255\255\255\255\255\255\255\255\024\000\ - \193\000\193\000\193\000\193\000\193\000\193\000\193\000\193\000\ - \255\255\083\000\083\000\083\000\083\000\083\000\083\000\255\255\ - \255\255\255\255\255\255\023\000\255\255\023\000\024\000\024\000\ - \255\255\024\000\024\000\024\000\024\000\255\255\255\255\255\255\ - \024\000\024\000\107\000\024\000\024\000\024\000\024\000\024\000\ - \024\000\024\000\024\000\024\000\024\000\024\000\024\000\024\000\ - \024\000\255\255\024\000\024\000\024\000\024\000\024\000\255\255\ - \255\255\107\000\025\000\255\255\255\255\025\000\025\000\025\000\ - \255\255\255\255\025\000\025\000\025\000\255\255\025\000\025\000\ - \025\000\107\000\107\000\107\000\107\000\107\000\107\000\107\000\ - \107\000\107\000\107\000\025\000\024\000\025\000\025\000\025\000\ - \025\000\025\000\165\000\165\000\165\000\165\000\165\000\165\000\ - \165\000\165\000\165\000\165\000\168\000\168\000\168\000\168\000\ - \168\000\168\000\168\000\168\000\168\000\168\000\255\255\255\255\ - \255\255\255\255\024\000\028\000\024\000\255\255\075\000\025\000\ - \075\000\075\000\075\000\075\000\075\000\075\000\075\000\075\000\ - \075\000\075\000\075\000\075\000\075\000\075\000\075\000\075\000\ - \075\000\075\000\075\000\075\000\075\000\075\000\075\000\075\000\ - \075\000\075\000\255\255\075\000\255\255\025\000\028\000\025\000\ - \028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\ - \028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\ - \028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\ - \028\000\028\000\030\000\028\000\255\255\255\255\255\255\255\255\ - \255\255\030\000\255\255\030\000\030\000\030\000\030\000\030\000\ - \030\000\030\000\030\000\030\000\030\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\030\000\030\000\030\000\030\000\ - \030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ - \030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ - \030\000\030\000\030\000\030\000\030\000\030\000\255\255\255\255\ - \255\255\255\255\030\000\255\255\030\000\030\000\030\000\030\000\ - \030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ - \030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ - \030\000\030\000\030\000\030\000\030\000\030\000\031\000\255\255\ - \255\255\255\255\255\255\255\255\255\255\031\000\255\255\031\000\ - \031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\ - \031\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\ - \031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\ - \031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\ - \031\000\031\000\255\255\255\255\255\255\255\255\031\000\255\255\ - \031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\ - \031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\ - \031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\ - \031\000\031\000\032\000\194\000\194\000\194\000\194\000\194\000\ - \194\000\194\000\194\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\255\255\255\255\ - \255\255\255\255\032\000\255\255\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\095\000\095\000\ - \095\000\095\000\095\000\095\000\095\000\095\000\095\000\095\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\095\000\ - \095\000\095\000\095\000\095\000\095\000\186\000\186\000\186\000\ - \186\000\186\000\186\000\186\000\186\000\186\000\186\000\191\000\ - \191\000\191\000\191\000\191\000\191\000\191\000\191\000\191\000\ - \191\000\255\255\255\255\255\255\255\255\255\255\255\255\095\000\ - \095\000\095\000\095\000\095\000\095\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\255\255\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\033\000\032\000\032\000\032\000\032\000\032\000\ - \032\000\032\000\032\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\255\255\255\255\ - \255\255\255\255\033\000\255\255\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\106\000\106\000\ - \255\255\255\255\106\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\106\000\255\255\106\000\ - \255\255\255\255\255\255\255\255\143\000\255\255\255\255\143\000\ - \255\255\255\255\255\255\255\255\255\255\106\000\106\000\106\000\ - \106\000\106\000\106\000\106\000\106\000\106\000\106\000\255\255\ - \255\255\255\255\255\255\255\255\143\000\255\255\255\255\255\255\ - \255\255\143\000\143\000\255\255\143\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\255\255\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\034\000\033\000\033\000\033\000\033\000\033\000\ - \033\000\033\000\033\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\143\000\255\255\255\255\ - \255\255\255\255\255\255\255\255\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\255\255\255\255\ - \255\255\255\255\034\000\255\255\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\149\000\255\255\ - \149\000\149\000\149\000\149\000\149\000\149\000\149\000\149\000\ - \149\000\149\000\149\000\149\000\149\000\149\000\149\000\149\000\ - \149\000\149\000\149\000\149\000\149\000\149\000\149\000\149\000\ - \149\000\149\000\255\255\149\000\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\156\000\106\000\156\000\156\000\ - \156\000\156\000\156\000\156\000\156\000\156\000\156\000\156\000\ - \156\000\156\000\156\000\156\000\156\000\156\000\156\000\156\000\ - \156\000\156\000\156\000\156\000\156\000\156\000\156\000\156\000\ - \255\255\156\000\143\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\255\255\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\035\000\034\000\034\000\034\000\034\000\034\000\ - \034\000\034\000\034\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\255\255\255\255\ - \255\255\255\255\035\000\255\255\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\164\000\164\000\ - \164\000\164\000\164\000\164\000\164\000\164\000\164\000\164\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\164\000\ - \164\000\164\000\164\000\164\000\164\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\164\000\ - \164\000\164\000\164\000\164\000\164\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\255\255\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\255\255\035\000\035\000\035\000\035\000\035\000\ - \035\000\035\000\035\000\036\000\255\255\255\255\036\000\036\000\ - \036\000\255\255\255\255\255\255\036\000\036\000\255\255\036\000\ - \036\000\036\000\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\036\000\255\255\036\000\036\000\ - \036\000\036\000\036\000\255\255\204\000\255\255\204\000\204\000\ - \204\000\204\000\204\000\204\000\204\000\204\000\204\000\204\000\ - \204\000\204\000\204\000\204\000\204\000\204\000\204\000\204\000\ - \204\000\204\000\204\000\204\000\204\000\204\000\204\000\204\000\ - \036\000\036\000\204\000\036\000\036\000\036\000\036\000\036\000\ - \036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\ - \036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\ - \036\000\036\000\036\000\036\000\036\000\255\255\036\000\037\000\ - \036\000\255\255\037\000\037\000\037\000\255\255\255\255\255\255\ - \037\000\037\000\255\255\037\000\037\000\037\000\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \037\000\255\255\037\000\037\000\037\000\037\000\037\000\255\255\ - \210\000\255\255\210\000\210\000\210\000\210\000\210\000\210\000\ - \210\000\210\000\210\000\210\000\210\000\210\000\210\000\210\000\ - \210\000\210\000\210\000\210\000\210\000\210\000\210\000\210\000\ - \210\000\210\000\210\000\210\000\037\000\037\000\210\000\037\000\ - \037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\ - \037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\ - \037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\ - \037\000\255\255\037\000\255\255\037\000\255\255\255\255\255\255\ - \255\255\036\000\036\000\036\000\036\000\036\000\036\000\036\000\ - \036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\ - \036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\ - \036\000\255\255\036\000\036\000\036\000\036\000\036\000\036\000\ - \036\000\036\000\171\000\171\000\171\000\171\000\171\000\171\000\ - \171\000\171\000\171\000\171\000\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\171\000\171\000\171\000\171\000\171\000\ - \171\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\171\000\171\000\171\000\171\000\171\000\ - \171\000\255\255\255\255\255\255\255\255\037\000\037\000\037\000\ - \037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\ - \037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\ - \037\000\037\000\037\000\037\000\037\000\038\000\037\000\037\000\ - \037\000\037\000\037\000\037\000\037\000\037\000\038\000\038\000\ - \038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\038\000\ - \038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\ - \038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\ - \038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\ - \038\000\255\255\255\255\255\255\255\255\038\000\255\255\038\000\ - \038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\ - \038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\ - \038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\ - \038\000\184\000\184\000\184\000\184\000\184\000\184\000\184\000\ - \184\000\184\000\184\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\184\000\184\000\184\000\184\000\184\000\184\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\184\000\184\000\184\000\184\000\184\000\184\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\038\000\038\000\ - \038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\ - \038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\ - \038\000\038\000\038\000\038\000\038\000\255\255\038\000\038\000\ - \038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\ - \038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\ - \038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\ - \038\000\038\000\038\000\038\000\038\000\255\255\038\000\038\000\ - \038\000\038\000\038\000\038\000\038\000\038\000\046\000\255\255\ - \255\255\046\000\046\000\046\000\255\255\255\255\255\255\046\000\ - \046\000\255\255\046\000\046\000\046\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\046\000\ - \255\255\046\000\046\000\046\000\046\000\046\000\255\255\255\255\ - \255\255\255\255\047\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\255\255\255\255\ - \255\255\255\255\255\255\046\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\255\255\255\255\ - \255\255\046\000\047\000\046\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\196\000\196\000\ - \196\000\196\000\196\000\196\000\196\000\196\000\196\000\196\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\196\000\ - \196\000\196\000\196\000\196\000\196\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\196\000\ - \196\000\196\000\196\000\196\000\196\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\255\255\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\048\000\047\000\047\000\047\000\047\000\047\000\ - \047\000\047\000\047\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\255\255\255\255\ - \255\255\255\255\255\255\255\255\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\255\255\255\255\ - \255\255\255\255\048\000\255\255\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\198\000\198\000\ - \198\000\198\000\198\000\198\000\198\000\198\000\198\000\198\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\198\000\ - \198\000\198\000\198\000\198\000\198\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\198\000\ - \198\000\198\000\198\000\198\000\198\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\255\255\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\051\000\048\000\048\000\048\000\048\000\048\000\ - \048\000\048\000\048\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\255\255\255\255\ - \255\255\255\255\255\255\255\255\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\255\255\255\255\ - \255\255\255\255\051\000\255\255\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\255\255\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\052\000\051\000\051\000\051\000\051\000\051\000\ - \051\000\051\000\051\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\255\255\255\255\ - \255\255\255\255\255\255\255\255\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\255\255\255\255\ - \255\255\255\255\052\000\255\255\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\255\255\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\055\000\052\000\052\000\052\000\052\000\052\000\ - \052\000\052\000\052\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\255\255\255\255\ - \255\255\255\255\055\000\255\255\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\055\000\055\000\ - \055\000\055\000\055\000\055\000\055\000\055\000\056\000\255\255\ - \255\255\255\255\056\000\255\255\056\000\255\255\255\255\056\000\ - \056\000\056\000\056\000\056\000\056\000\056\000\056\000\056\000\ - \056\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \056\000\056\000\056\000\056\000\056\000\056\000\056\000\056\000\ - \056\000\056\000\056\000\056\000\056\000\056\000\056\000\056\000\ - \056\000\056\000\056\000\056\000\056\000\056\000\056\000\056\000\ - \056\000\056\000\255\255\255\255\255\255\255\255\056\000\255\255\ - \056\000\056\000\056\000\056\000\056\000\056\000\056\000\056\000\ - \056\000\056\000\056\000\056\000\056\000\056\000\056\000\056\000\ - \056\000\056\000\056\000\056\000\056\000\056\000\056\000\056\000\ - \056\000\056\000\057\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\057\000\057\000\057\000\057\000\057\000\ - \057\000\057\000\057\000\057\000\057\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\057\000\057\000\057\000\057\000\ - \057\000\057\000\057\000\057\000\057\000\057\000\057\000\057\000\ - \057\000\057\000\057\000\057\000\057\000\057\000\057\000\057\000\ - \057\000\057\000\057\000\057\000\057\000\057\000\255\255\255\255\ - \255\255\255\255\057\000\255\255\057\000\057\000\057\000\057\000\ - \057\000\057\000\057\000\057\000\057\000\057\000\057\000\057\000\ - \057\000\057\000\057\000\057\000\057\000\057\000\057\000\057\000\ - \057\000\057\000\057\000\057\000\057\000\057\000\058\000\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\255\255\255\255\255\255\255\255\058\000\255\255\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\ - \058\000\058\000\059\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\059\000\059\000\059\000\059\000\059\000\ - \059\000\059\000\059\000\059\000\059\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\059\000\059\000\059\000\059\000\ - \059\000\059\000\059\000\059\000\059\000\059\000\059\000\059\000\ - \059\000\059\000\059\000\059\000\059\000\059\000\059\000\059\000\ - \059\000\059\000\059\000\059\000\059\000\059\000\255\255\255\255\ - \255\255\255\255\059\000\255\255\059\000\059\000\059\000\059\000\ - \059\000\059\000\059\000\059\000\059\000\059\000\059\000\059\000\ - \059\000\059\000\059\000\059\000\059\000\059\000\059\000\059\000\ - \059\000\059\000\059\000\059\000\059\000\059\000\060\000\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\060\000\ - \060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\ - \060\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\ - \060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\ - \060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\ - \060\000\060\000\255\255\255\255\255\255\255\255\060\000\255\255\ - \060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\ - \060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\ - \060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\ - \060\000\060\000\061\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\061\000\061\000\061\000\061\000\061\000\ - \061\000\061\000\061\000\061\000\061\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\061\000\061\000\061\000\061\000\ - \061\000\061\000\061\000\061\000\061\000\061\000\061\000\061\000\ - \061\000\061\000\061\000\061\000\061\000\061\000\061\000\061\000\ - \061\000\061\000\061\000\061\000\061\000\061\000\255\255\255\255\ - \255\255\255\255\061\000\255\255\061\000\061\000\061\000\061\000\ - \061\000\061\000\061\000\061\000\061\000\061\000\061\000\061\000\ - \061\000\061\000\061\000\061\000\061\000\061\000\061\000\061\000\ - \061\000\061\000\061\000\061\000\061\000\061\000\062\000\255\255\ - \255\255\255\255\255\255\255\255\255\255\062\000\255\255\062\000\ - \062\000\062\000\062\000\062\000\062\000\062\000\062\000\062\000\ - \062\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \062\000\062\000\062\000\062\000\062\000\062\000\062\000\062\000\ - \062\000\062\000\062\000\062\000\062\000\062\000\062\000\062\000\ - \062\000\062\000\062\000\062\000\062\000\062\000\062\000\062\000\ - \062\000\062\000\255\255\255\255\255\255\255\255\062\000\255\255\ - \062\000\062\000\062\000\062\000\062\000\062\000\062\000\062\000\ - \062\000\062\000\062\000\062\000\062\000\062\000\062\000\062\000\ - \062\000\062\000\062\000\062\000\062\000\062\000\062\000\062\000\ - \062\000\062\000\063\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\063\000\063\000\063\000\063\000\063\000\ - \063\000\063\000\063\000\063\000\063\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\063\000\063\000\063\000\063\000\ - \063\000\063\000\063\000\063\000\063\000\063\000\063\000\063\000\ - \063\000\063\000\063\000\063\000\063\000\063\000\063\000\063\000\ - \063\000\063\000\063\000\063\000\063\000\063\000\255\255\255\255\ - \255\255\255\255\063\000\255\255\063\000\063\000\063\000\063\000\ - \063\000\063\000\063\000\063\000\063\000\063\000\063\000\063\000\ - \063\000\063\000\063\000\063\000\063\000\063\000\063\000\063\000\ - \063\000\063\000\063\000\063\000\063\000\063\000\064\000\255\255\ - \255\255\255\255\064\000\255\255\064\000\255\255\255\255\064\000\ - \064\000\064\000\064\000\064\000\064\000\064\000\064\000\064\000\ - \064\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \064\000\064\000\064\000\064\000\064\000\064\000\064\000\064\000\ - \064\000\064\000\064\000\064\000\064\000\064\000\064\000\064\000\ - \064\000\064\000\064\000\064\000\064\000\064\000\064\000\064\000\ - \064\000\064\000\255\255\255\255\255\255\255\255\064\000\255\255\ - \064\000\064\000\064\000\064\000\064\000\064\000\064\000\064\000\ - \064\000\064\000\064\000\064\000\064\000\064\000\064\000\064\000\ - \064\000\064\000\064\000\064\000\064\000\064\000\064\000\064\000\ - \064\000\064\000\065\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\065\000\065\000\065\000\065\000\065\000\ - \065\000\065\000\065\000\065\000\065\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\065\000\065\000\065\000\065\000\ - \065\000\065\000\065\000\065\000\065\000\065\000\065\000\065\000\ - \065\000\065\000\065\000\065\000\065\000\065\000\065\000\065\000\ - \065\000\065\000\065\000\065\000\065\000\065\000\255\255\255\255\ - \255\255\255\255\065\000\255\255\065\000\065\000\065\000\065\000\ - \065\000\065\000\065\000\065\000\065\000\065\000\065\000\065\000\ - \065\000\065\000\065\000\065\000\065\000\065\000\065\000\065\000\ - \065\000\065\000\065\000\065\000\065\000\065\000\067\000\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\255\255\255\255\255\255\255\255\067\000\255\255\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\067\000\067\000\067\000\067\000\067\000\067\000\ - \067\000\067\000\068\000\255\255\255\255\255\255\068\000\255\255\ - \068\000\255\255\255\255\068\000\068\000\068\000\068\000\068\000\ - \068\000\068\000\068\000\068\000\068\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\068\000\068\000\068\000\068\000\ - \068\000\068\000\068\000\068\000\068\000\068\000\068\000\068\000\ - \068\000\068\000\068\000\068\000\068\000\068\000\068\000\068\000\ - \068\000\068\000\068\000\068\000\068\000\068\000\255\255\255\255\ - \255\255\255\255\068\000\255\255\068\000\068\000\068\000\068\000\ - \068\000\068\000\068\000\068\000\068\000\068\000\068\000\068\000\ - \068\000\068\000\068\000\068\000\068\000\068\000\068\000\068\000\ - \068\000\068\000\068\000\068\000\068\000\068\000\069\000\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\069\000\ - \069\000\069\000\069\000\069\000\069\000\069\000\069\000\069\000\ - \069\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \069\000\069\000\069\000\069\000\069\000\069\000\069\000\069\000\ - \069\000\069\000\069\000\069\000\069\000\069\000\069\000\069\000\ - \069\000\069\000\069\000\069\000\069\000\069\000\069\000\069\000\ - \069\000\069\000\255\255\255\255\255\255\255\255\069\000\255\255\ - \069\000\069\000\069\000\069\000\069\000\069\000\069\000\069\000\ - \069\000\069\000\069\000\069\000\069\000\069\000\069\000\069\000\ - \069\000\069\000\069\000\069\000\069\000\069\000\069\000\069\000\ - \069\000\069\000\070\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\070\000\070\000\070\000\070\000\070\000\ - \070\000\070\000\070\000\070\000\070\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\070\000\070\000\070\000\070\000\ - \070\000\070\000\070\000\070\000\070\000\070\000\070\000\070\000\ - \070\000\070\000\070\000\070\000\070\000\070\000\070\000\070\000\ - \070\000\070\000\070\000\070\000\070\000\070\000\255\255\255\255\ - \255\255\255\255\070\000\255\255\070\000\070\000\070\000\070\000\ - \070\000\070\000\070\000\070\000\070\000\070\000\070\000\070\000\ - \070\000\070\000\070\000\070\000\070\000\070\000\070\000\070\000\ - \070\000\070\000\070\000\070\000\070\000\070\000\071\000\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\071\000\ - \071\000\071\000\071\000\071\000\071\000\071\000\071\000\071\000\ - \071\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \071\000\071\000\071\000\071\000\071\000\071\000\071\000\071\000\ - \071\000\071\000\071\000\071\000\071\000\071\000\071\000\071\000\ - \071\000\071\000\071\000\071\000\071\000\071\000\071\000\071\000\ - \071\000\071\000\255\255\255\255\255\255\255\255\071\000\255\255\ - \071\000\071\000\071\000\071\000\071\000\071\000\071\000\071\000\ - \071\000\071\000\071\000\071\000\071\000\071\000\071\000\071\000\ - \071\000\071\000\071\000\071\000\071\000\071\000\071\000\071\000\ - \071\000\071\000\076\000\103\000\076\000\255\255\103\000\103\000\ - \103\000\076\000\255\255\255\255\103\000\103\000\255\255\103\000\ - \103\000\103\000\076\000\076\000\076\000\076\000\076\000\076\000\ - \076\000\076\000\076\000\076\000\103\000\255\255\103\000\103\000\ - \103\000\103\000\103\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\105\000\255\255\105\000\105\000\105\000\105\000\ - \255\255\255\255\255\255\105\000\105\000\255\255\105\000\105\000\ - \105\000\255\255\255\255\255\255\255\255\255\255\076\000\255\255\ - \103\000\255\255\255\255\105\000\076\000\105\000\105\000\105\000\ - \105\000\105\000\255\255\255\255\255\255\255\255\255\255\255\255\ - \076\000\076\000\255\255\255\255\076\000\255\255\076\000\255\255\ - \116\000\255\255\076\000\116\000\116\000\116\000\103\000\255\255\ - \103\000\116\000\116\000\255\255\116\000\116\000\116\000\105\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\116\000\255\255\116\000\116\000\116\000\116\000\116\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\117\000\ - \255\255\255\255\117\000\117\000\117\000\105\000\255\255\105\000\ - \117\000\117\000\255\255\117\000\117\000\117\000\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\116\000\255\255\255\255\ - \117\000\255\255\117\000\117\000\117\000\117\000\117\000\255\255\ - \255\255\255\255\118\000\255\255\255\255\118\000\118\000\118\000\ - \255\255\255\255\255\255\118\000\118\000\255\255\118\000\118\000\ - \118\000\255\255\255\255\116\000\255\255\116\000\255\255\255\255\ - \255\255\255\255\255\255\118\000\117\000\118\000\118\000\118\000\ - \118\000\118\000\255\255\255\255\255\255\255\255\255\255\255\255\ - \119\000\255\255\255\255\119\000\119\000\119\000\255\255\255\255\ - \255\255\119\000\119\000\255\255\119\000\119\000\119\000\255\255\ - \255\255\255\255\117\000\255\255\117\000\255\255\255\255\118\000\ - \255\255\119\000\076\000\119\000\119\000\119\000\119\000\119\000\ - \255\255\255\255\255\255\120\000\255\255\255\255\120\000\120\000\ - \120\000\255\255\255\255\255\255\120\000\120\000\255\255\120\000\ - \120\000\120\000\255\255\255\255\255\255\118\000\255\255\118\000\ - \255\255\255\255\255\255\255\255\120\000\119\000\120\000\120\000\ - \120\000\120\000\120\000\255\255\255\255\255\255\126\000\255\255\ - \255\255\126\000\126\000\126\000\255\255\255\255\255\255\126\000\ - \126\000\255\255\126\000\126\000\126\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\119\000\255\255\119\000\255\255\126\000\ - \120\000\126\000\126\000\126\000\126\000\126\000\255\255\255\255\ - \255\255\136\000\255\255\255\255\136\000\136\000\136\000\255\255\ - \255\255\255\255\136\000\136\000\255\255\136\000\136\000\136\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\120\000\255\255\ - \120\000\255\255\136\000\126\000\136\000\136\000\136\000\136\000\ - \136\000\255\255\255\255\255\255\139\000\255\255\255\255\139\000\ - \139\000\139\000\255\255\255\255\255\255\139\000\139\000\255\255\ - \139\000\139\000\139\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\126\000\255\255\126\000\255\255\139\000\136\000\139\000\ - \139\000\139\000\139\000\139\000\255\255\255\255\255\255\140\000\ - \255\255\255\255\140\000\140\000\140\000\255\255\255\255\255\255\ - \140\000\140\000\255\255\140\000\140\000\140\000\255\255\255\255\ - \255\255\255\255\255\255\255\255\136\000\255\255\136\000\255\255\ - \140\000\139\000\140\000\140\000\140\000\140\000\140\000\255\255\ - \255\255\255\255\141\000\255\255\255\255\141\000\141\000\141\000\ - \255\255\255\255\255\255\141\000\141\000\255\255\141\000\141\000\ - \141\000\255\255\255\255\255\255\255\255\255\255\255\255\139\000\ - \255\255\139\000\255\255\141\000\140\000\141\000\141\000\141\000\ - \141\000\141\000\255\255\255\255\255\255\142\000\255\255\255\255\ - \142\000\142\000\142\000\255\255\255\255\255\255\142\000\142\000\ - \255\255\142\000\142\000\142\000\255\255\255\255\157\000\255\255\ - \157\000\255\255\140\000\255\255\140\000\157\000\142\000\141\000\ - \142\000\142\000\142\000\142\000\142\000\255\255\157\000\157\000\ - \157\000\157\000\157\000\157\000\157\000\157\000\157\000\157\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\141\000\255\255\141\000\ - \255\255\255\255\142\000\255\255\255\255\255\255\255\255\255\255\ - \255\255\180\000\255\255\255\255\180\000\255\255\255\255\255\255\ - \255\255\255\255\157\000\255\255\255\255\255\255\255\255\255\255\ - \157\000\255\255\255\255\255\255\255\255\255\255\255\255\180\000\ - \142\000\180\000\142\000\255\255\157\000\255\255\180\000\255\255\ - \157\000\255\255\157\000\255\255\255\255\255\255\157\000\180\000\ - \180\000\180\000\180\000\180\000\180\000\180\000\180\000\180\000\ - \180\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\199\000\199\000\199\000\199\000\199\000\199\000\199\000\ - \199\000\199\000\199\000\180\000\255\255\255\255\255\255\255\255\ - \255\255\180\000\199\000\199\000\199\000\199\000\199\000\199\000\ - \255\255\255\255\255\255\255\255\255\255\180\000\180\000\255\255\ - \255\255\180\000\255\255\180\000\180\000\255\255\255\255\180\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\199\000\199\000\199\000\199\000\199\000\199\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\199\000\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\180\000\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255"; - Lexing.lex_base_code = - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\010\000\036\000\022\000\000\000\000\000\000\000\ - \005\000\000\000\039\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\002\000\005\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000"; - Lexing.lex_backtrk_code = - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\053\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000"; - Lexing.lex_default_code = - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000"; - Lexing.lex_trans_code = - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\001\000\000\000\050\000\050\000\000\000\009\000\050\000\ - \000\000\000\000\000\000\009\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \001\000\000\000\009\000\001\000\000\000\009\000\000\000\034\000\ - \000\000\000\000\009\000\000\000\012\000\001\000\000\000\000\000\ - \004\000\004\000\004\000\004\000\004\000\004\000\004\000\004\000\ - \004\000\004\000\017\000\017\000\017\000\017\000\017\000\017\000\ - \017\000\017\000\017\000\017\000\001\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\017\000\017\000\017\000\017\000\ - \017\000\017\000\017\000\017\000\017\000\017\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ - \000\000\000\000\000\000\000\000\000\000"; - Lexing.lex_check_code = - "\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\024\000\111\000\180\000\189\000\111\000\112\000\190\000\ - \255\255\255\255\255\255\106\000\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \024\000\255\255\111\000\000\000\255\255\112\000\255\255\112\000\ - \255\255\255\255\106\000\255\255\106\000\107\000\255\255\255\255\ - \024\000\024\000\024\000\024\000\024\000\024\000\024\000\024\000\ - \024\000\024\000\106\000\106\000\106\000\106\000\106\000\106\000\ - \106\000\106\000\106\000\106\000\107\000\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\107\000\107\000\107\000\107\000\ - \107\000\107\000\107\000\107\000\107\000\107\000\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \111\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ - \255\255\255\255\255\255\255\255\255\255"; - Lexing.lex_code = - "\255\005\255\255\007\255\006\255\255\007\255\255\009\255\008\255\ - \255\006\255\007\255\255\004\255\000\005\001\006\002\007\255\009\ - \255\255\008\255\009\255\255\000\005\001\006\004\008\003\009\002\ - \007\255\001\255\255\000\001\255"; -} - -let rec token lexbuf = - lexbuf.Lexing.lex_mem <- Array.make 10 (-1); __ocaml_lex_token_rec lexbuf 0 -and __ocaml_lex_token_rec lexbuf __ocaml_lex_state = - match Lexing.new_engine __ocaml_lex_tables __ocaml_lex_state lexbuf with - | 0 -> -# 321 "parsing/lexer.mll" - ( - if not !escaped_newlines then - raise (Error(Illegal_character (Lexing.lexeme_char lexbuf 0), - Location.curr lexbuf)); - update_loc lexbuf None 1 false 0; - token lexbuf ) -# 1909 "parsing/lexer.ml" - - | 1 -> -# 328 "parsing/lexer.mll" - ( update_loc lexbuf None 1 false 0; - EOL ) -# 1915 "parsing/lexer.ml" - - | 2 -> -# 331 "parsing/lexer.mll" - ( token lexbuf ) -# 1920 "parsing/lexer.ml" - - | 3 -> -# 333 "parsing/lexer.mll" - ( UNDERSCORE ) -# 1925 "parsing/lexer.ml" - - | 4 -> -# 335 "parsing/lexer.mll" - ( TILDE ) -# 1930 "parsing/lexer.ml" - - | 5 -> -# 337 "parsing/lexer.mll" - ( LABEL (get_label_name lexbuf) ) -# 1935 "parsing/lexer.ml" - - | 6 -> -# 339 "parsing/lexer.mll" - ( warn_latin1 lexbuf; LABEL (get_label_name lexbuf) ) -# 1940 "parsing/lexer.ml" - - | 7 -> -# 341 "parsing/lexer.mll" - ( QUESTION ) -# 1945 "parsing/lexer.ml" - - | 8 -> -# 343 "parsing/lexer.mll" - ( OPTLABEL (get_label_name lexbuf) ) -# 1950 "parsing/lexer.ml" - - | 9 -> -# 345 "parsing/lexer.mll" - ( warn_latin1 lexbuf; OPTLABEL (get_label_name lexbuf) ) -# 1955 "parsing/lexer.ml" - - | 10 -> -# 347 "parsing/lexer.mll" - ( let s = Lexing.lexeme lexbuf in - try Hashtbl.find keyword_table s - with Not_found -> LIDENT s ) -# 1962 "parsing/lexer.ml" - - | 11 -> -# 351 "parsing/lexer.mll" - ( warn_latin1 lexbuf; LIDENT (Lexing.lexeme lexbuf) ) -# 1967 "parsing/lexer.ml" - - | 12 -> -# 353 "parsing/lexer.mll" - ( UIDENT(Lexing.lexeme lexbuf) ) -# 1972 "parsing/lexer.ml" - - | 13 -> -# 355 "parsing/lexer.mll" - ( warn_latin1 lexbuf; UIDENT(Lexing.lexeme lexbuf) ) -# 1977 "parsing/lexer.ml" - - | 14 -> -# 356 "parsing/lexer.mll" - ( INT (Lexing.lexeme lexbuf, None) ) -# 1982 "parsing/lexer.ml" - - | 15 -> -let -# 357 "parsing/lexer.mll" - lit -# 1988 "parsing/lexer.ml" -= Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_start_pos (lexbuf.Lexing.lex_curr_pos + -1) -and -# 357 "parsing/lexer.mll" - modif -# 1993 "parsing/lexer.ml" -= Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_curr_pos + -1) in -# 358 "parsing/lexer.mll" - ( INT (lit, Some modif) ) -# 1997 "parsing/lexer.ml" - - | 16 -> -# 360 "parsing/lexer.mll" - ( FLOAT (Lexing.lexeme lexbuf, None) ) -# 2002 "parsing/lexer.ml" - - | 17 -> -let -# 361 "parsing/lexer.mll" - lit -# 2008 "parsing/lexer.ml" -= Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_start_pos (lexbuf.Lexing.lex_curr_pos + -1) -and -# 361 "parsing/lexer.mll" - modif -# 2013 "parsing/lexer.ml" -= Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_curr_pos + -1) in -# 362 "parsing/lexer.mll" - ( FLOAT (lit, Some modif) ) -# 2017 "parsing/lexer.ml" - - | 18 -> -# 364 "parsing/lexer.mll" - ( raise (Error(Invalid_literal (Lexing.lexeme lexbuf), - Location.curr lexbuf)) ) -# 2023 "parsing/lexer.ml" - - | 19 -> -# 367 "parsing/lexer.mll" - ( reset_string_buffer(); - is_in_string := true; - let string_start = lexbuf.lex_start_p in - string_start_loc := Location.curr lexbuf; - string lexbuf; - is_in_string := false; - lexbuf.lex_start_p <- string_start; - STRING (get_stored_string(), None) ) -# 2035 "parsing/lexer.ml" - - | 20 -> -# 376 "parsing/lexer.mll" - ( reset_string_buffer(); - let delim = Lexing.lexeme lexbuf in - let delim = String.sub delim 1 (String.length delim - 2) in - is_in_string := true; - let string_start = lexbuf.lex_start_p in - string_start_loc := Location.curr lexbuf; - quoted_string delim lexbuf; - is_in_string := false; - lexbuf.lex_start_p <- string_start; - STRING (get_stored_string(), Some delim) ) -# 2049 "parsing/lexer.ml" - - | 21 -> -# 387 "parsing/lexer.mll" - ( update_loc lexbuf None 1 false 1; - CHAR (Lexing.lexeme_char lexbuf 1) ) -# 2055 "parsing/lexer.ml" - - | 22 -> -# 390 "parsing/lexer.mll" - ( CHAR(Lexing.lexeme_char lexbuf 1) ) -# 2060 "parsing/lexer.ml" - - | 23 -> -# 392 "parsing/lexer.mll" - ( CHAR(char_for_backslash (Lexing.lexeme_char lexbuf 2)) ) -# 2065 "parsing/lexer.ml" - - | 24 -> -# 394 "parsing/lexer.mll" - ( CHAR(char_for_decimal_code lexbuf 2) ) -# 2070 "parsing/lexer.ml" - - | 25 -> -# 396 "parsing/lexer.mll" - ( CHAR(char_for_octal_code lexbuf 3) ) -# 2075 "parsing/lexer.ml" - - | 26 -> -# 398 "parsing/lexer.mll" - ( CHAR(char_for_hexadecimal_code lexbuf 3) ) -# 2080 "parsing/lexer.ml" - - | 27 -> -# 400 "parsing/lexer.mll" - ( let l = Lexing.lexeme lexbuf in - let esc = String.sub l 1 (String.length l - 1) in - raise (Error(Illegal_escape esc, Location.curr lexbuf)) - ) -# 2088 "parsing/lexer.ml" - - | 28 -> -# 405 "parsing/lexer.mll" - ( let s, loc = with_comment_buffer comment lexbuf in - COMMENT (s, loc) ) -# 2094 "parsing/lexer.ml" - - | 29 -> -# 408 "parsing/lexer.mll" - ( let s, loc = with_comment_buffer comment lexbuf in - if !handle_docstrings then - DOCSTRING (Docstrings.docstring s loc) - else - COMMENT ("*" ^ s, loc) - ) -# 2104 "parsing/lexer.ml" - - | 30 -> -let -# 414 "parsing/lexer.mll" - stars -# 2110 "parsing/lexer.ml" -= Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 3) lexbuf.Lexing.lex_curr_pos in -# 415 "parsing/lexer.mll" - ( let s, loc = - with_comment_buffer - (fun lexbuf -> - store_string ("*" ^ stars); - comment lexbuf) - lexbuf - in - COMMENT (s, loc) ) -# 2121 "parsing/lexer.ml" - - | 31 -> -# 424 "parsing/lexer.mll" - ( if !print_warnings then - Location.prerr_warning (Location.curr lexbuf) Warnings.Comment_start; - let s, loc = with_comment_buffer comment lexbuf in - COMMENT (s, loc) ) -# 2129 "parsing/lexer.ml" - - | 32 -> -let -# 428 "parsing/lexer.mll" - stars -# 2135 "parsing/lexer.ml" -= Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 2) (lexbuf.Lexing.lex_curr_pos + -2) in -# 429 "parsing/lexer.mll" - ( if !handle_docstrings && stars="" then - (* (**) is an empty docstring *) - DOCSTRING(Docstrings.docstring "" (Location.curr lexbuf)) - else - COMMENT (stars, Location.curr lexbuf) ) -# 2143 "parsing/lexer.ml" - - | 33 -> -# 435 "parsing/lexer.mll" - ( let loc = Location.curr lexbuf in - Location.prerr_warning loc Warnings.Comment_not_end; - lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_curr_pos - 1; - let curpos = lexbuf.lex_curr_p in - lexbuf.lex_curr_p <- { curpos with pos_cnum = curpos.pos_cnum - 1 }; - STAR - ) -# 2154 "parsing/lexer.ml" - - | 34 -> -let -# 442 "parsing/lexer.mll" - num -# 2160 "parsing/lexer.ml" -= Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_mem.(1) -and -# 443 "parsing/lexer.mll" - name -# 2165 "parsing/lexer.ml" -= Lexing.sub_lexeme_opt lexbuf lexbuf.Lexing.lex_mem.(4) lexbuf.Lexing.lex_mem.(3) -and -# 443 "parsing/lexer.mll" - directive -# 2170 "parsing/lexer.ml" -= Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_start_pos lexbuf.Lexing.lex_mem.(2) in -# 445 "parsing/lexer.mll" - ( - match int_of_string num with - | exception _ -> - (* PR#7165 *) - let loc = Location.curr lexbuf in - let explanation = "line number out of range" in - let error = Invalid_directive (directive, Some explanation) in - raise (Error (error, loc)) - | line_num -> - (* Documentation says that the line number should be - positive, but we have never guarded against this and it - might have useful hackish uses. *) - update_loc lexbuf name line_num true 0; - token lexbuf - ) -# 2188 "parsing/lexer.ml" - - | 35 -> -# 460 "parsing/lexer.mll" - ( HASH ) -# 2193 "parsing/lexer.ml" - - | 36 -> -# 461 "parsing/lexer.mll" - ( AMPERSAND ) -# 2198 "parsing/lexer.ml" - - | 37 -> -# 462 "parsing/lexer.mll" - ( AMPERAMPER ) -# 2203 "parsing/lexer.ml" - - | 38 -> -# 463 "parsing/lexer.mll" - ( BACKQUOTE ) -# 2208 "parsing/lexer.ml" - - | 39 -> -# 464 "parsing/lexer.mll" - ( QUOTE ) -# 2213 "parsing/lexer.ml" - - | 40 -> -# 465 "parsing/lexer.mll" - ( LPAREN ) -# 2218 "parsing/lexer.ml" - - | 41 -> -# 466 "parsing/lexer.mll" - ( RPAREN ) -# 2223 "parsing/lexer.ml" - - | 42 -> -# 467 "parsing/lexer.mll" - ( STAR ) -# 2228 "parsing/lexer.ml" - - | 43 -> -# 468 "parsing/lexer.mll" - ( COMMA ) -# 2233 "parsing/lexer.ml" - - | 44 -> -# 469 "parsing/lexer.mll" - ( MINUSGREATER ) -# 2238 "parsing/lexer.ml" - - | 45 -> -# 470 "parsing/lexer.mll" - ( DOT ) -# 2243 "parsing/lexer.ml" - - | 46 -> -# 471 "parsing/lexer.mll" - ( DOTDOT ) -# 2248 "parsing/lexer.ml" - - | 47 -> -let -# 472 "parsing/lexer.mll" - s -# 2254 "parsing/lexer.ml" -= Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 1) lexbuf.Lexing.lex_curr_pos in -# 472 "parsing/lexer.mll" - ( DOTOP s ) -# 2258 "parsing/lexer.ml" - - | 48 -> -# 473 "parsing/lexer.mll" - ( COLON ) -# 2263 "parsing/lexer.ml" - - | 49 -> -# 474 "parsing/lexer.mll" - ( COLONCOLON ) -# 2268 "parsing/lexer.ml" - - | 50 -> -# 475 "parsing/lexer.mll" - ( COLONEQUAL ) -# 2273 "parsing/lexer.ml" - - | 51 -> -# 476 "parsing/lexer.mll" - ( COLONGREATER ) -# 2278 "parsing/lexer.ml" - - | 52 -> -# 477 "parsing/lexer.mll" - ( SEMI ) -# 2283 "parsing/lexer.ml" - - | 53 -> -# 478 "parsing/lexer.mll" - ( SEMISEMI ) -# 2288 "parsing/lexer.ml" - - | 54 -> -# 479 "parsing/lexer.mll" - ( LESS ) -# 2293 "parsing/lexer.ml" - - | 55 -> -# 480 "parsing/lexer.mll" - ( LESSMINUS ) -# 2298 "parsing/lexer.ml" - - | 56 -> -# 481 "parsing/lexer.mll" - ( EQUAL ) -# 2303 "parsing/lexer.ml" - - | 57 -> -# 482 "parsing/lexer.mll" - ( LBRACKET ) -# 2308 "parsing/lexer.ml" - - | 58 -> -# 483 "parsing/lexer.mll" - ( LBRACKETBAR ) -# 2313 "parsing/lexer.ml" - - | 59 -> -# 484 "parsing/lexer.mll" - ( LBRACKETLESS ) -# 2318 "parsing/lexer.ml" - - | 60 -> -# 485 "parsing/lexer.mll" - ( LBRACKETGREATER ) -# 2323 "parsing/lexer.ml" - - | 61 -> -# 486 "parsing/lexer.mll" - ( RBRACKET ) -# 2328 "parsing/lexer.ml" - - | 62 -> -# 487 "parsing/lexer.mll" - ( LBRACE ) -# 2333 "parsing/lexer.ml" - - | 63 -> -# 488 "parsing/lexer.mll" - ( LBRACELESS ) -# 2338 "parsing/lexer.ml" - - | 64 -> -# 489 "parsing/lexer.mll" - ( BAR ) -# 2343 "parsing/lexer.ml" - - | 65 -> -# 490 "parsing/lexer.mll" - ( BARBAR ) -# 2348 "parsing/lexer.ml" - - | 66 -> -# 491 "parsing/lexer.mll" - ( BARRBRACKET ) -# 2353 "parsing/lexer.ml" - - | 67 -> -# 492 "parsing/lexer.mll" - ( GREATER ) -# 2358 "parsing/lexer.ml" - - | 68 -> -# 493 "parsing/lexer.mll" - ( GREATERRBRACKET ) -# 2363 "parsing/lexer.ml" - - | 69 -> -# 494 "parsing/lexer.mll" - ( RBRACE ) -# 2368 "parsing/lexer.ml" - - | 70 -> -# 495 "parsing/lexer.mll" - ( GREATERRBRACE ) -# 2373 "parsing/lexer.ml" - - | 71 -> -# 496 "parsing/lexer.mll" - ( LBRACKETAT ) -# 2378 "parsing/lexer.ml" - - | 72 -> -# 497 "parsing/lexer.mll" - ( LBRACKETATAT ) -# 2383 "parsing/lexer.ml" - - | 73 -> -# 498 "parsing/lexer.mll" - ( LBRACKETATATAT ) -# 2388 "parsing/lexer.ml" - - | 74 -> -# 499 "parsing/lexer.mll" - ( LBRACKETPERCENT ) -# 2393 "parsing/lexer.ml" - - | 75 -> -# 500 "parsing/lexer.mll" - ( LBRACKETPERCENTPERCENT ) -# 2398 "parsing/lexer.ml" - - | 76 -> -# 501 "parsing/lexer.mll" - ( BANG ) -# 2403 "parsing/lexer.ml" - - | 77 -> -# 502 "parsing/lexer.mll" - ( INFIXOP0 "!=" ) -# 2408 "parsing/lexer.ml" - - | 78 -> -# 503 "parsing/lexer.mll" - ( PLUS ) -# 2413 "parsing/lexer.ml" - - | 79 -> -# 504 "parsing/lexer.mll" - ( PLUSDOT ) -# 2418 "parsing/lexer.ml" - - | 80 -> -# 505 "parsing/lexer.mll" - ( PLUSEQ ) -# 2423 "parsing/lexer.ml" - - | 81 -> -# 506 "parsing/lexer.mll" - ( MINUS ) -# 2428 "parsing/lexer.ml" - - | 82 -> -# 507 "parsing/lexer.mll" - ( MINUSDOT ) -# 2433 "parsing/lexer.ml" - - | 83 -> -# 510 "parsing/lexer.mll" - ( PREFIXOP(Lexing.lexeme lexbuf) ) -# 2438 "parsing/lexer.ml" - - | 84 -> -# 512 "parsing/lexer.mll" - ( PREFIXOP(Lexing.lexeme lexbuf) ) -# 2443 "parsing/lexer.ml" - - | 85 -> -# 514 "parsing/lexer.mll" - ( INFIXOP0(Lexing.lexeme lexbuf) ) -# 2448 "parsing/lexer.ml" - - | 86 -> -# 516 "parsing/lexer.mll" - ( INFIXOP1(Lexing.lexeme lexbuf) ) -# 2453 "parsing/lexer.ml" - - | 87 -> -# 518 "parsing/lexer.mll" - ( INFIXOP2(Lexing.lexeme lexbuf) ) -# 2458 "parsing/lexer.ml" - - | 88 -> -# 520 "parsing/lexer.mll" - ( INFIXOP4(Lexing.lexeme lexbuf) ) -# 2463 "parsing/lexer.ml" - - | 89 -> -# 521 "parsing/lexer.mll" - ( PERCENT ) -# 2468 "parsing/lexer.ml" - - | 90 -> -# 523 "parsing/lexer.mll" - ( INFIXOP3(Lexing.lexeme lexbuf) ) -# 2473 "parsing/lexer.ml" - - | 91 -> -# 525 "parsing/lexer.mll" - ( HASHOP(Lexing.lexeme lexbuf) ) -# 2478 "parsing/lexer.ml" - - | 92 -> -# 526 "parsing/lexer.mll" - ( EOF ) -# 2483 "parsing/lexer.ml" - - | 93 -> -# 528 "parsing/lexer.mll" - ( raise (Error(Illegal_character (Lexing.lexeme_char lexbuf 0), - Location.curr lexbuf)) - ) -# 2490 "parsing/lexer.ml" - - | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; - __ocaml_lex_token_rec lexbuf __ocaml_lex_state - -and comment lexbuf = - __ocaml_lex_comment_rec lexbuf 143 -and __ocaml_lex_comment_rec lexbuf __ocaml_lex_state = - match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with - | 0 -> -# 534 "parsing/lexer.mll" - ( comment_start_loc := (Location.curr lexbuf) :: !comment_start_loc; - store_lexeme lexbuf; - comment lexbuf - ) -# 2505 "parsing/lexer.ml" - - | 1 -> -# 539 "parsing/lexer.mll" - ( match !comment_start_loc with - | [] -> assert false - | [_] -> comment_start_loc := []; Location.curr lexbuf - | _ :: l -> comment_start_loc := l; - store_lexeme lexbuf; - comment lexbuf - ) -# 2516 "parsing/lexer.ml" - - | 2 -> -# 547 "parsing/lexer.mll" - ( - string_start_loc := Location.curr lexbuf; - store_string_char '\"'; - is_in_string := true; - begin try string lexbuf - with Error (Unterminated_string, str_start) -> - match !comment_start_loc with - | [] -> assert false - | loc :: _ -> - let start = List.hd (List.rev !comment_start_loc) in - comment_start_loc := []; - raise (Error (Unterminated_string_in_comment (start, str_start), - loc)) - end; - is_in_string := false; - store_string_char '\"'; - comment lexbuf ) -# 2537 "parsing/lexer.ml" - - | 3 -> -# 565 "parsing/lexer.mll" - ( - let delim = Lexing.lexeme lexbuf in - let delim = String.sub delim 1 (String.length delim - 2) in - string_start_loc := Location.curr lexbuf; - store_lexeme lexbuf; - is_in_string := true; - begin try quoted_string delim lexbuf - with Error (Unterminated_string, str_start) -> - match !comment_start_loc with - | [] -> assert false - | loc :: _ -> - let start = List.hd (List.rev !comment_start_loc) in - comment_start_loc := []; - raise (Error (Unterminated_string_in_comment (start, str_start), - loc)) - end; - is_in_string := false; - store_string_char '|'; - store_string delim; - store_string_char '}'; - comment lexbuf ) -# 2562 "parsing/lexer.ml" - - | 4 -> -# 588 "parsing/lexer.mll" - ( store_lexeme lexbuf; comment lexbuf ) -# 2567 "parsing/lexer.ml" - - | 5 -> -# 590 "parsing/lexer.mll" - ( update_loc lexbuf None 1 false 1; - store_lexeme lexbuf; - comment lexbuf - ) -# 2575 "parsing/lexer.ml" - - | 6 -> -# 595 "parsing/lexer.mll" - ( store_lexeme lexbuf; comment lexbuf ) -# 2580 "parsing/lexer.ml" - - | 7 -> -# 597 "parsing/lexer.mll" - ( store_lexeme lexbuf; comment lexbuf ) -# 2585 "parsing/lexer.ml" - - | 8 -> -# 599 "parsing/lexer.mll" - ( store_lexeme lexbuf; comment lexbuf ) -# 2590 "parsing/lexer.ml" - - | 9 -> -# 601 "parsing/lexer.mll" - ( store_lexeme lexbuf; comment lexbuf ) -# 2595 "parsing/lexer.ml" - - | 10 -> -# 603 "parsing/lexer.mll" - ( match !comment_start_loc with - | [] -> assert false - | loc :: _ -> - let start = List.hd (List.rev !comment_start_loc) in - comment_start_loc := []; - raise (Error (Unterminated_comment start, loc)) - ) -# 2606 "parsing/lexer.ml" - - | 11 -> -# 611 "parsing/lexer.mll" - ( update_loc lexbuf None 1 false 0; - store_lexeme lexbuf; - comment lexbuf - ) -# 2614 "parsing/lexer.ml" - - | 12 -> -# 616 "parsing/lexer.mll" - ( store_lexeme lexbuf; comment lexbuf ) -# 2619 "parsing/lexer.ml" - - | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; - __ocaml_lex_comment_rec lexbuf __ocaml_lex_state - -and string lexbuf = - lexbuf.Lexing.lex_mem <- Array.make 2 (-1); __ocaml_lex_string_rec lexbuf 175 -and __ocaml_lex_string_rec lexbuf __ocaml_lex_state = - match Lexing.new_engine __ocaml_lex_tables __ocaml_lex_state lexbuf with - | 0 -> -# 620 "parsing/lexer.mll" - ( () ) -# 2631 "parsing/lexer.ml" - - | 1 -> -let -# 621 "parsing/lexer.mll" - space -# 2637 "parsing/lexer.ml" -= Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_curr_pos in -# 622 "parsing/lexer.mll" - ( update_loc lexbuf None 1 false (String.length space); - if in_comment () then store_lexeme lexbuf; - string lexbuf - ) -# 2644 "parsing/lexer.ml" - - | 2 -> -# 627 "parsing/lexer.mll" - ( store_escaped_char lexbuf - (char_for_backslash(Lexing.lexeme_char lexbuf 1)); - string lexbuf ) -# 2651 "parsing/lexer.ml" - - | 3 -> -# 631 "parsing/lexer.mll" - ( store_escaped_char lexbuf (char_for_decimal_code lexbuf 1); - string lexbuf ) -# 2657 "parsing/lexer.ml" - - | 4 -> -# 634 "parsing/lexer.mll" - ( store_escaped_char lexbuf (char_for_octal_code lexbuf 2); - string lexbuf ) -# 2663 "parsing/lexer.ml" - - | 5 -> -# 637 "parsing/lexer.mll" - ( store_escaped_char lexbuf (char_for_hexadecimal_code lexbuf 2); - string lexbuf ) -# 2669 "parsing/lexer.ml" - - | 6 -> -# 640 "parsing/lexer.mll" - ( store_escaped_uchar lexbuf (uchar_for_uchar_escape lexbuf); - string lexbuf ) -# 2675 "parsing/lexer.ml" - - | 7 -> -# 643 "parsing/lexer.mll" - ( if not (in_comment ()) then begin -(* Should be an error, but we are very lax. - raise (Error (Illegal_escape (Lexing.lexeme lexbuf), - Location.curr lexbuf)) -*) - let loc = Location.curr lexbuf in - Location.prerr_warning loc Warnings.Illegal_backslash; - end; - store_lexeme lexbuf; - string lexbuf - ) -# 2690 "parsing/lexer.ml" - - | 8 -> -# 655 "parsing/lexer.mll" - ( if not (in_comment ()) then - Location.prerr_warning (Location.curr lexbuf) Warnings.Eol_in_string; - update_loc lexbuf None 1 false 0; - store_lexeme lexbuf; - string lexbuf - ) -# 2700 "parsing/lexer.ml" - - | 9 -> -# 662 "parsing/lexer.mll" - ( is_in_string := false; - raise (Error (Unterminated_string, !string_start_loc)) ) -# 2706 "parsing/lexer.ml" - - | 10 -> -# 665 "parsing/lexer.mll" - ( store_string_char(Lexing.lexeme_char lexbuf 0); - string lexbuf ) -# 2712 "parsing/lexer.ml" - - | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; - __ocaml_lex_string_rec lexbuf __ocaml_lex_state - -and quoted_string delim lexbuf = - __ocaml_lex_quoted_string_rec delim lexbuf 202 -and __ocaml_lex_quoted_string_rec delim lexbuf __ocaml_lex_state = - match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with - | 0 -> -# 670 "parsing/lexer.mll" - ( update_loc lexbuf None 1 false 0; - store_lexeme lexbuf; - quoted_string delim lexbuf - ) -# 2727 "parsing/lexer.ml" - - | 1 -> -# 675 "parsing/lexer.mll" - ( is_in_string := false; - raise (Error (Unterminated_string, !string_start_loc)) ) -# 2733 "parsing/lexer.ml" - - | 2 -> -# 678 "parsing/lexer.mll" - ( - let edelim = Lexing.lexeme lexbuf in - let edelim = String.sub edelim 1 (String.length edelim - 2) in - if delim = edelim then () - else (store_lexeme lexbuf; quoted_string delim lexbuf) - ) -# 2743 "parsing/lexer.ml" - - | 3 -> -# 685 "parsing/lexer.mll" - ( store_string_char(Lexing.lexeme_char lexbuf 0); - quoted_string delim lexbuf ) -# 2749 "parsing/lexer.ml" - - | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; - __ocaml_lex_quoted_string_rec delim lexbuf __ocaml_lex_state - -and skip_hash_bang lexbuf = - __ocaml_lex_skip_hash_bang_rec lexbuf 211 -and __ocaml_lex_skip_hash_bang_rec lexbuf __ocaml_lex_state = - match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with - | 0 -> -# 690 "parsing/lexer.mll" - ( update_loc lexbuf None 3 false 0 ) -# 2761 "parsing/lexer.ml" - - | 1 -> -# 692 "parsing/lexer.mll" - ( update_loc lexbuf None 1 false 0 ) -# 2766 "parsing/lexer.ml" - - | 2 -> -# 693 "parsing/lexer.mll" - ( () ) -# 2771 "parsing/lexer.ml" - - | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; - __ocaml_lex_skip_hash_bang_rec lexbuf __ocaml_lex_state - -;; - -# 695 "parsing/lexer.mll" - - - let token_with_comments lexbuf = - match !preprocessor with - | None -> token lexbuf - | Some (_init, preprocess) -> preprocess token lexbuf - - type newline_state = - | NoLine (* There have been no blank lines yet. *) - | NewLine - (* There have been no blank lines, and the previous - token was a newline. *) - | BlankLine (* There have been blank lines. *) - - type doc_state = - | Initial (* There have been no docstrings yet *) - | After of docstring list - (* There have been docstrings, none of which were - preceded by a blank line *) - | Before of docstring list * docstring list * docstring list - (* There have been docstrings, some of which were - preceded by a blank line *) - - and docstring = Docstrings.docstring - - let token lexbuf = - let post_pos = lexeme_end_p lexbuf in - let attach lines docs pre_pos = - let open Docstrings in - match docs, lines with - | Initial, _ -> () - | After a, (NoLine | NewLine) -> - set_post_docstrings post_pos (List.rev a); - set_pre_docstrings pre_pos a; - | After a, BlankLine -> - set_post_docstrings post_pos (List.rev a); - set_pre_extra_docstrings pre_pos (List.rev a) - | Before(a, f, b), (NoLine | NewLine) -> - set_post_docstrings post_pos (List.rev a); - set_post_extra_docstrings post_pos - (List.rev_append f (List.rev b)); - set_floating_docstrings pre_pos (List.rev f); - set_pre_extra_docstrings pre_pos (List.rev a); - set_pre_docstrings pre_pos b - | Before(a, f, b), BlankLine -> - set_post_docstrings post_pos (List.rev a); - set_post_extra_docstrings post_pos - (List.rev_append f (List.rev b)); - set_floating_docstrings pre_pos - (List.rev_append f (List.rev b)); - set_pre_extra_docstrings pre_pos (List.rev a) - in - let rec loop lines docs lexbuf = - match token_with_comments lexbuf with - | COMMENT (s, loc) -> - add_comment (s, loc); - let lines' = - match lines with - | NoLine -> NoLine - | NewLine -> NoLine - | BlankLine -> BlankLine - in - loop lines' docs lexbuf - | EOL -> - let lines' = - match lines with - | NoLine -> NewLine - | NewLine -> BlankLine - | BlankLine -> BlankLine - in - loop lines' docs lexbuf - | DOCSTRING doc -> - Docstrings.register doc; - add_docstring_comment doc; - let docs' = - if Docstrings.docstring_body doc = "/*" then - match docs with - | Initial -> Before([], [doc], []) - | After a -> Before (a, [doc], []) - | Before(a, f, b) -> Before(a, doc :: b @ f, []) - else - match docs, lines with - | Initial, (NoLine | NewLine) -> After [doc] - | Initial, BlankLine -> Before([], [], [doc]) - | After a, (NoLine | NewLine) -> After (doc :: a) - | After a, BlankLine -> Before (a, [], [doc]) - | Before(a, f, b), (NoLine | NewLine) -> Before(a, f, doc :: b) - | Before(a, f, b), BlankLine -> Before(a, b @ f, [doc]) - in - loop NoLine docs' lexbuf - | tok -> - attach lines docs (lexeme_start_p lexbuf); - tok - in - loop NoLine Initial lexbuf - - let init () = - is_in_string := false; - comment_start_loc := []; - comment_list := []; - match !preprocessor with - | None -> () - | Some (init, _preprocess) -> init () - - let set_preprocessor init preprocess = - escaped_newlines := true; - preprocessor := Some (init, preprocess) - - -# 2888 "parsing/lexer.ml" diff --git a/analysis/vendor/compiler-libs-406/lexing.ml b/analysis/vendor/compiler-libs-406/lexing.ml deleted file mode 100644 index 2c2633d43..000000000 --- a/analysis/vendor/compiler-libs-406/lexing.ml +++ /dev/null @@ -1,231 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* The run-time library for lexers generated by camllex *) - -type position = { - pos_fname : string; - pos_lnum : int; - pos_bol : int; - pos_cnum : int; -} - -let dummy_pos = { - pos_fname = ""; - pos_lnum = 0; - pos_bol = 0; - pos_cnum = -1; -} - -type lexbuf = - { refill_buff : lexbuf -> unit; - mutable lex_buffer : bytes; - mutable lex_buffer_len : int; - mutable lex_abs_pos : int; - mutable lex_start_pos : int; - mutable lex_curr_pos : int; - mutable lex_last_pos : int; - mutable lex_last_action : int; - mutable lex_eof_reached : bool; - mutable lex_mem : int array; - mutable lex_start_p : position; - mutable lex_curr_p : position; - } - -type lex_tables = - { lex_base: string; - lex_backtrk: string; - lex_default: string; - lex_trans: string; - lex_check: string; - lex_base_code : string; - lex_backtrk_code : string; - lex_default_code : string; - lex_trans_code : string; - lex_check_code : string; - lex_code: string;} - -external c_engine : lex_tables -> int -> lexbuf -> int = "caml_lex_engine" -external c_new_engine : lex_tables -> int -> lexbuf -> int - = "caml_new_lex_engine" - -let engine tbl state buf = - let result = c_engine tbl state buf in - if result >= 0 then begin - buf.lex_start_p <- buf.lex_curr_p; - buf.lex_curr_p <- {buf.lex_curr_p - with pos_cnum = buf.lex_abs_pos + buf.lex_curr_pos}; - end; - result - - -let new_engine tbl state buf = - let result = c_new_engine tbl state buf in - if result >= 0 then begin - buf.lex_start_p <- buf.lex_curr_p; - buf.lex_curr_p <- {buf.lex_curr_p - with pos_cnum = buf.lex_abs_pos + buf.lex_curr_pos}; - end; - result - - -let lex_refill read_fun aux_buffer lexbuf = - let read = - read_fun aux_buffer (Bytes.length aux_buffer) in - let n = - if read > 0 - then read - else (lexbuf.lex_eof_reached <- true; 0) in - (* Current state of the buffer: - <-------|---------------------|-----------> - | junk | valid data | junk | - ^ ^ ^ ^ - 0 start_pos buffer_end Bytes.length buffer - *) - if lexbuf.lex_buffer_len + n > Bytes.length lexbuf.lex_buffer then begin - (* There is not enough space at the end of the buffer *) - if lexbuf.lex_buffer_len - lexbuf.lex_start_pos + n - <= Bytes.length lexbuf.lex_buffer - then begin - (* But there is enough space if we reclaim the junk at the beginning - of the buffer *) - Bytes.blit lexbuf.lex_buffer lexbuf.lex_start_pos - lexbuf.lex_buffer 0 - (lexbuf.lex_buffer_len - lexbuf.lex_start_pos) - end else begin - (* We must grow the buffer. Doubling its size will provide enough - space since n <= String.length aux_buffer <= String.length buffer. - Watch out for string length overflow, though. *) - let newlen = - min (2 * Bytes.length lexbuf.lex_buffer) Sys.max_string_length in - if lexbuf.lex_buffer_len - lexbuf.lex_start_pos + n > newlen - then failwith "Lexing.lex_refill: cannot grow buffer"; - let newbuf = Bytes.create newlen in - (* Copy the valid data to the beginning of the new buffer *) - Bytes.blit lexbuf.lex_buffer lexbuf.lex_start_pos - newbuf 0 - (lexbuf.lex_buffer_len - lexbuf.lex_start_pos); - lexbuf.lex_buffer <- newbuf - end; - (* Reallocation or not, we have shifted the data left by - start_pos characters; update the positions *) - let s = lexbuf.lex_start_pos in - lexbuf.lex_abs_pos <- lexbuf.lex_abs_pos + s; - lexbuf.lex_curr_pos <- lexbuf.lex_curr_pos - s; - lexbuf.lex_start_pos <- 0; - lexbuf.lex_last_pos <- lexbuf.lex_last_pos - s; - lexbuf.lex_buffer_len <- lexbuf.lex_buffer_len - s ; - let t = lexbuf.lex_mem in - for i = 0 to Array.length t-1 do - let v = t.(i) in - if v >= 0 then - t.(i) <- v-s - done - end; - (* There is now enough space at the end of the buffer *) - Bytes.blit aux_buffer 0 lexbuf.lex_buffer lexbuf.lex_buffer_len n; - lexbuf.lex_buffer_len <- lexbuf.lex_buffer_len + n - -let zero_pos = { - pos_fname = ""; - pos_lnum = 1; - pos_bol = 0; - pos_cnum = 0; -} - -let from_function f = - { refill_buff = lex_refill f (Bytes.create 512); - lex_buffer = Bytes.create 1024; - lex_buffer_len = 0; - lex_abs_pos = 0; - lex_start_pos = 0; - lex_curr_pos = 0; - lex_last_pos = 0; - lex_last_action = 0; - lex_mem = [||]; - lex_eof_reached = false; - lex_start_p = zero_pos; - lex_curr_p = zero_pos; - } - -let from_channel ic = - from_function (fun buf n -> input ic buf 0 n) - -let from_string s = - { refill_buff = (fun lexbuf -> lexbuf.lex_eof_reached <- true); - lex_buffer = Bytes.of_string s; (* have to make a copy for compatibility - with unsafe-string mode *) - lex_buffer_len = String.length s; - lex_abs_pos = 0; - lex_start_pos = 0; - lex_curr_pos = 0; - lex_last_pos = 0; - lex_last_action = 0; - lex_mem = [||]; - lex_eof_reached = true; - lex_start_p = zero_pos; - lex_curr_p = zero_pos; - } - -let lexeme lexbuf = - let len = lexbuf.lex_curr_pos - lexbuf.lex_start_pos in - Bytes.sub_string lexbuf.lex_buffer lexbuf.lex_start_pos len - -let sub_lexeme lexbuf i1 i2 = - let len = i2-i1 in - Bytes.sub_string lexbuf.lex_buffer i1 len - -let sub_lexeme_opt lexbuf i1 i2 = - if i1 >= 0 then begin - let len = i2-i1 in - Some (Bytes.sub_string lexbuf.lex_buffer i1 len) - end else begin - None - end - -let sub_lexeme_char lexbuf i = Bytes.get lexbuf.lex_buffer i - -let sub_lexeme_char_opt lexbuf i = - if i >= 0 then - Some (Bytes.get lexbuf.lex_buffer i) - else - None - - -let lexeme_char lexbuf i = - Bytes.get lexbuf.lex_buffer (lexbuf.lex_start_pos + i) - -let lexeme_start lexbuf = lexbuf.lex_start_p.pos_cnum -let lexeme_end lexbuf = lexbuf.lex_curr_p.pos_cnum - -let lexeme_start_p lexbuf = lexbuf.lex_start_p -let lexeme_end_p lexbuf = lexbuf.lex_curr_p - -let new_line lexbuf = - let lcp = lexbuf.lex_curr_p in - lexbuf.lex_curr_p <- { lcp with - pos_lnum = lcp.pos_lnum + 1; - pos_bol = lcp.pos_cnum; - } - - - -(* Discard data left in lexer buffer. *) - -let flush_input lb = - lb.lex_curr_pos <- 0; - lb.lex_abs_pos <- 0; - lb.lex_curr_p <- {lb.lex_curr_p with pos_cnum = 0}; - lb.lex_buffer_len <- 0; diff --git a/analysis/vendor/compiler-libs-406/lexing.mli b/analysis/vendor/compiler-libs-406/lexing.mli deleted file mode 100644 index 397d20cbb..000000000 --- a/analysis/vendor/compiler-libs-406/lexing.mli +++ /dev/null @@ -1,176 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** The run-time library for lexers generated by [ocamllex]. *) - -(** {1 Positions} *) - -type position = { - pos_fname : string; - pos_lnum : int; - pos_bol : int; - pos_cnum : int; -} -(** A value of type [position] describes a point in a source file. - [pos_fname] is the file name; [pos_lnum] is the line number; - [pos_bol] is the offset of the beginning of the line (number - of characters between the beginning of the lexbuf and the beginning - of the line); [pos_cnum] is the offset of the position (number of - characters between the beginning of the lexbuf and the position). - The difference between [pos_cnum] and [pos_bol] is the character - offset within the line (i.e. the column number, assuming each - character is one column wide). - - See the documentation of type [lexbuf] for information about - how the lexing engine will manage positions. - *) - -val dummy_pos : position -(** A value of type [position], guaranteed to be different from any - valid position. - *) - - -(** {1 Lexer buffers} *) - - -type lexbuf = - { refill_buff : lexbuf -> unit; - mutable lex_buffer : bytes; - mutable lex_buffer_len : int; - mutable lex_abs_pos : int; - mutable lex_start_pos : int; - mutable lex_curr_pos : int; - mutable lex_last_pos : int; - mutable lex_last_action : int; - mutable lex_eof_reached : bool; - mutable lex_mem : int array; - mutable lex_start_p : position; - mutable lex_curr_p : position; - } -(** The type of lexer buffers. A lexer buffer is the argument passed - to the scanning functions defined by the generated scanners. - The lexer buffer holds the current state of the scanner, plus - a function to refill the buffer from the input. - - At each token, the lexing engine will copy [lex_curr_p] to - [lex_start_p], then change the [pos_cnum] field - of [lex_curr_p] by updating it with the number of characters read - since the start of the [lexbuf]. The other fields are left - unchanged by the lexing engine. In order to keep them - accurate, they must be initialised before the first use of the - lexbuf, and updated by the relevant lexer actions (i.e. at each - end of line -- see also [new_line]). - *) - -val from_channel : in_channel -> lexbuf -(** Create a lexer buffer on the given input channel. - [Lexing.from_channel inchan] returns a lexer buffer which reads - from the input channel [inchan], at the current reading position. *) - -val from_string : string -> lexbuf -(** Create a lexer buffer which reads from - the given string. Reading starts from the first character in - the string. An end-of-input condition is generated when the - end of the string is reached. *) - -val from_function : (bytes -> int -> int) -> lexbuf -(** Create a lexer buffer with the given function as its reading method. - When the scanner needs more characters, it will call the given - function, giving it a byte sequence [s] and a byte - count [n]. The function should put [n] bytes or fewer in [s], - starting at index 0, and return the number of bytes - provided. A return value of 0 means end of input. *) - - -(** {1 Functions for lexer semantic actions} *) - - -(** The following functions can be called from the semantic actions - of lexer definitions (the ML code enclosed in braces that - computes the value returned by lexing functions). They give - access to the character string matched by the regular expression - associated with the semantic action. These functions must be - applied to the argument [lexbuf], which, in the code generated by - [ocamllex], is bound to the lexer buffer passed to the parsing - function. *) - -val lexeme : lexbuf -> string -(** [Lexing.lexeme lexbuf] returns the string matched by - the regular expression. *) - -val lexeme_char : lexbuf -> int -> char -(** [Lexing.lexeme_char lexbuf i] returns character number [i] in - the matched string. *) - -val lexeme_start : lexbuf -> int -(** [Lexing.lexeme_start lexbuf] returns the offset in the - input stream of the first character of the matched string. - The first character of the stream has offset 0. *) - -val lexeme_end : lexbuf -> int -(** [Lexing.lexeme_end lexbuf] returns the offset in the input stream - of the character following the last character of the matched - string. The first character of the stream has offset 0. *) - -val lexeme_start_p : lexbuf -> position -(** Like [lexeme_start], but return a complete [position] instead - of an offset. *) - -val lexeme_end_p : lexbuf -> position -(** Like [lexeme_end], but return a complete [position] instead - of an offset. *) - -val new_line : lexbuf -> unit -(** Update the [lex_curr_p] field of the lexbuf to reflect the start - of a new line. You can call this function in the semantic action - of the rule that matches the end-of-line character. - @since 3.11.0 -*) - -(** {1 Miscellaneous functions} *) - -val flush_input : lexbuf -> unit -(** Discard the contents of the buffer and reset the current - position to 0. The next use of the lexbuf will trigger a - refill. *) - -(**/**) - -(** {1 } *) - -(** The following definitions are used by the generated scanners only. - They are not intended to be used directly by user programs. *) - -val sub_lexeme : lexbuf -> int -> int -> string -val sub_lexeme_opt : lexbuf -> int -> int -> string option -val sub_lexeme_char : lexbuf -> int -> char -val sub_lexeme_char_opt : lexbuf -> int -> char option - -type lex_tables = - { lex_base : string; - lex_backtrk : string; - lex_default : string; - lex_trans : string; - lex_check : string; - lex_base_code : string; - lex_backtrk_code : string; - lex_default_code : string; - lex_trans_code : string; - lex_check_code : string; - lex_code: string;} - -val engine : lex_tables -> int -> lexbuf -> int -val new_engine : lex_tables -> int -> lexbuf -> int diff --git a/analysis/vendor/compiler-libs-406/map.ml b/analysis/vendor/compiler-libs-406/map.ml deleted file mode 100644 index 7d096dfb3..000000000 --- a/analysis/vendor/compiler-libs-406/map.ml +++ /dev/null @@ -1,480 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -module type OrderedType = - sig - type t - val compare: t -> t -> int - end - -module type S = - sig - type key - type +'a t - val empty: 'a t - val is_empty: 'a t -> bool - val mem: key -> 'a t -> bool - val add: key -> 'a -> 'a t -> 'a t - val update: key -> ('a option -> 'a option) -> 'a t -> 'a t - val singleton: key -> 'a -> 'a t - val remove: key -> 'a t -> 'a t - val merge: - (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t - val union: (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t - val compare: ('a -> 'a -> int) -> 'a t -> 'a t -> int - val equal: ('a -> 'a -> bool) -> 'a t -> 'a t -> bool - val iter: (key -> 'a -> unit) -> 'a t -> unit - val fold: (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b - val for_all: (key -> 'a -> bool) -> 'a t -> bool - val exists: (key -> 'a -> bool) -> 'a t -> bool - val filter: (key -> 'a -> bool) -> 'a t -> 'a t - val partition: (key -> 'a -> bool) -> 'a t -> 'a t * 'a t - val cardinal: 'a t -> int - val bindings: 'a t -> (key * 'a) list - val min_binding: 'a t -> (key * 'a) - val min_binding_opt: 'a t -> (key * 'a) option - val max_binding: 'a t -> (key * 'a) - val max_binding_opt: 'a t -> (key * 'a) option - val choose: 'a t -> (key * 'a) - val choose_opt: 'a t -> (key * 'a) option - val split: key -> 'a t -> 'a t * 'a option * 'a t - val find: key -> 'a t -> 'a - val find_opt: key -> 'a t -> 'a option - val find_first: (key -> bool) -> 'a t -> key * 'a - val find_first_opt: (key -> bool) -> 'a t -> (key * 'a) option - val find_last: (key -> bool) -> 'a t -> key * 'a - val find_last_opt: (key -> bool) -> 'a t -> (key * 'a) option - val map: ('a -> 'b) -> 'a t -> 'b t - val mapi: (key -> 'a -> 'b) -> 'a t -> 'b t - end - -module Make(Ord: OrderedType) = struct - - type key = Ord.t - - type 'a t = - Empty - | Node of {l:'a t; v:key; d:'a; r:'a t; h:int} - - let height = function - Empty -> 0 - | Node {h} -> h - - let create l x d r = - let hl = height l and hr = height r in - Node{l; v=x; d; r; h=(if hl >= hr then hl + 1 else hr + 1)} - - let singleton x d = Node{l=Empty; v=x; d; r=Empty; h=1} - - let bal l x d r = - let hl = match l with Empty -> 0 | Node {h} -> h in - let hr = match r with Empty -> 0 | Node {h} -> h in - if hl > hr + 2 then begin - match l with - Empty -> invalid_arg "Map.bal" - | Node{l=ll; v=lv; d=ld; r=lr} -> - if height ll >= height lr then - create ll lv ld (create lr x d r) - else begin - match lr with - Empty -> invalid_arg "Map.bal" - | Node{l=lrl; v=lrv; d=lrd; r=lrr}-> - create (create ll lv ld lrl) lrv lrd (create lrr x d r) - end - end else if hr > hl + 2 then begin - match r with - Empty -> invalid_arg "Map.bal" - | Node{l=rl; v=rv; d=rd; r=rr} -> - if height rr >= height rl then - create (create l x d rl) rv rd rr - else begin - match rl with - Empty -> invalid_arg "Map.bal" - | Node{l=rll; v=rlv; d=rld; r=rlr} -> - create (create l x d rll) rlv rld (create rlr rv rd rr) - end - end else - Node{l; v=x; d; r; h=(if hl >= hr then hl + 1 else hr + 1)} - - let empty = Empty - - let is_empty = function Empty -> true | _ -> false - - let rec add x data = function - Empty -> - Node{l=Empty; v=x; d=data; r=Empty; h=1} - | Node {l; v; d; r; h} as m -> - let c = Ord.compare x v in - if c = 0 then - if d == data then m else Node{l; v=x; d=data; r; h} - else if c < 0 then - let ll = add x data l in - if l == ll then m else bal ll v d r - else - let rr = add x data r in - if r == rr then m else bal l v d rr - - let rec find x = function - Empty -> - raise Not_found - | Node {l; v; d; r} -> - let c = Ord.compare x v in - if c = 0 then d - else find x (if c < 0 then l else r) - - let rec find_first_aux v0 d0 f = function - Empty -> - (v0, d0) - | Node {l; v; d; r} -> - if f v then - find_first_aux v d f l - else - find_first_aux v0 d0 f r - - let rec find_first f = function - Empty -> - raise Not_found - | Node {l; v; d; r} -> - if f v then - find_first_aux v d f l - else - find_first f r - - let rec find_first_opt_aux v0 d0 f = function - Empty -> - Some (v0, d0) - | Node {l; v; d; r} -> - if f v then - find_first_opt_aux v d f l - else - find_first_opt_aux v0 d0 f r - - let rec find_first_opt f = function - Empty -> - None - | Node {l; v; d; r} -> - if f v then - find_first_opt_aux v d f l - else - find_first_opt f r - - let rec find_last_aux v0 d0 f = function - Empty -> - (v0, d0) - | Node {l; v; d; r} -> - if f v then - find_last_aux v d f r - else - find_last_aux v0 d0 f l - - let rec find_last f = function - Empty -> - raise Not_found - | Node {l; v; d; r} -> - if f v then - find_last_aux v d f r - else - find_last f l - - let rec find_last_opt_aux v0 d0 f = function - Empty -> - Some (v0, d0) - | Node {l; v; d; r} -> - if f v then - find_last_opt_aux v d f r - else - find_last_opt_aux v0 d0 f l - - let rec find_last_opt f = function - Empty -> - None - | Node {l; v; d; r} -> - if f v then - find_last_opt_aux v d f r - else - find_last_opt f l - - let rec find_opt x = function - Empty -> - None - | Node {l; v; d; r} -> - let c = Ord.compare x v in - if c = 0 then Some d - else find_opt x (if c < 0 then l else r) - - let rec mem x = function - Empty -> - false - | Node {l; v; r} -> - let c = Ord.compare x v in - c = 0 || mem x (if c < 0 then l else r) - - let rec min_binding = function - Empty -> raise Not_found - | Node {l=Empty; v; d} -> (v, d) - | Node {l} -> min_binding l - - let rec min_binding_opt = function - Empty -> None - | Node {l=Empty; v; d} -> Some (v, d) - | Node {l}-> min_binding_opt l - - let rec max_binding = function - Empty -> raise Not_found - | Node {v; d; r=Empty} -> (v, d) - | Node {r} -> max_binding r - - let rec max_binding_opt = function - Empty -> None - | Node {v; d; r=Empty} -> Some (v, d) - | Node {r} -> max_binding_opt r - - let rec remove_min_binding = function - Empty -> invalid_arg "Map.remove_min_elt" - | Node {l=Empty; r} -> r - | Node {l; v; d; r} -> bal (remove_min_binding l) v d r - - let merge t1 t2 = - match (t1, t2) with - (Empty, t) -> t - | (t, Empty) -> t - | (_, _) -> - let (x, d) = min_binding t2 in - bal t1 x d (remove_min_binding t2) - - let rec remove x = function - Empty -> - Empty - | (Node {l; v; d; r} as m) -> - let c = Ord.compare x v in - if c = 0 then merge l r - else if c < 0 then - let ll = remove x l in if l == ll then m else bal ll v d r - else - let rr = remove x r in if r == rr then m else bal l v d rr - - let rec update x f = function - Empty -> - begin match f None with - | None -> Empty - | Some data -> Node{l=Empty; v=x; d=data; r=Empty; h=1} - end - | Node {l; v; d; r; h} as m -> - let c = Ord.compare x v in - if c = 0 then begin - match f (Some d) with - | None -> merge l r - | Some data -> - if d == data then m else Node{l; v=x; d=data; r; h} - end else if c < 0 then - let ll = update x f l in - if l == ll then m else bal ll v d r - else - let rr = update x f r in - if r == rr then m else bal l v d rr - - let rec iter f = function - Empty -> () - | Node {l; v; d; r} -> - iter f l; f v d; iter f r - - let rec map f = function - Empty -> - Empty - | Node {l; v; d; r; h} -> - let l' = map f l in - let d' = f d in - let r' = map f r in - Node{l=l'; v; d=d'; r=r'; h} - - let rec mapi f = function - Empty -> - Empty - | Node {l; v; d; r; h} -> - let l' = mapi f l in - let d' = f v d in - let r' = mapi f r in - Node{l=l'; v; d=d'; r=r'; h} - - let rec fold f m accu = - match m with - Empty -> accu - | Node {l; v; d; r} -> - fold f r (f v d (fold f l accu)) - - let rec for_all p = function - Empty -> true - | Node {l; v; d; r} -> p v d && for_all p l && for_all p r - - let rec exists p = function - Empty -> false - | Node {l; v; d; r} -> p v d || exists p l || exists p r - - (* Beware: those two functions assume that the added k is *strictly* - smaller (or bigger) than all the present keys in the tree; it - does not test for equality with the current min (or max) key. - - Indeed, they are only used during the "join" operation which - respects this precondition. - *) - - let rec add_min_binding k x = function - | Empty -> singleton k x - | Node {l; v; d; r} -> - bal (add_min_binding k x l) v d r - - let rec add_max_binding k x = function - | Empty -> singleton k x - | Node {l; v; d; r} -> - bal l v d (add_max_binding k x r) - - (* Same as create and bal, but no assumptions are made on the - relative heights of l and r. *) - - let rec join l v d r = - match (l, r) with - (Empty, _) -> add_min_binding v d r - | (_, Empty) -> add_max_binding v d l - | (Node{l=ll; v=lv; d=ld; r=lr; h=lh}, Node{l=rl; v=rv; d=rd; r=rr; h=rh}) -> - if lh > rh + 2 then bal ll lv ld (join lr v d r) else - if rh > lh + 2 then bal (join l v d rl) rv rd rr else - create l v d r - - (* Merge two trees l and r into one. - All elements of l must precede the elements of r. - No assumption on the heights of l and r. *) - - let concat t1 t2 = - match (t1, t2) with - (Empty, t) -> t - | (t, Empty) -> t - | (_, _) -> - let (x, d) = min_binding t2 in - join t1 x d (remove_min_binding t2) - - let concat_or_join t1 v d t2 = - match d with - | Some d -> join t1 v d t2 - | None -> concat t1 t2 - - let rec split x = function - Empty -> - (Empty, None, Empty) - | Node {l; v; d; r} -> - let c = Ord.compare x v in - if c = 0 then (l, Some d, r) - else if c < 0 then - let (ll, pres, rl) = split x l in (ll, pres, join rl v d r) - else - let (lr, pres, rr) = split x r in (join l v d lr, pres, rr) - - let rec merge f s1 s2 = - match (s1, s2) with - (Empty, Empty) -> Empty - | (Node {l=l1; v=v1; d=d1; r=r1; h=h1}, _) when h1 >= height s2 -> - let (l2, d2, r2) = split v1 s2 in - concat_or_join (merge f l1 l2) v1 (f v1 (Some d1) d2) (merge f r1 r2) - | (_, Node {l=l2; v=v2; d=d2; r=r2}) -> - let (l1, d1, r1) = split v2 s1 in - concat_or_join (merge f l1 l2) v2 (f v2 d1 (Some d2)) (merge f r1 r2) - | _ -> - assert false - - let rec union f s1 s2 = - match (s1, s2) with - | (Empty, s) | (s, Empty) -> s - | (Node {l=l1; v=v1; d=d1; r=r1; h=h1}, Node {l=l2; v=v2; d=d2; r=r2; h=h2}) -> - if h1 >= h2 then - let (l2, d2, r2) = split v1 s2 in - let l = union f l1 l2 and r = union f r1 r2 in - match d2 with - | None -> join l v1 d1 r - | Some d2 -> concat_or_join l v1 (f v1 d1 d2) r - else - let (l1, d1, r1) = split v2 s1 in - let l = union f l1 l2 and r = union f r1 r2 in - match d1 with - | None -> join l v2 d2 r - | Some d1 -> concat_or_join l v2 (f v2 d1 d2) r - - let rec filter p = function - Empty -> Empty - | Node {l; v; d; r} as m -> - (* call [p] in the expected left-to-right order *) - let l' = filter p l in - let pvd = p v d in - let r' = filter p r in - if pvd then if l==l' && r==r' then m else join l' v d r' - else concat l' r' - - let rec partition p = function - Empty -> (Empty, Empty) - | Node {l; v; d; r} -> - (* call [p] in the expected left-to-right order *) - let (lt, lf) = partition p l in - let pvd = p v d in - let (rt, rf) = partition p r in - if pvd - then (join lt v d rt, concat lf rf) - else (concat lt rt, join lf v d rf) - - type 'a enumeration = End | More of key * 'a * 'a t * 'a enumeration - - let rec cons_enum m e = - match m with - Empty -> e - | Node {l; v; d; r} -> cons_enum l (More(v, d, r, e)) - - let compare cmp m1 m2 = - let rec compare_aux e1 e2 = - match (e1, e2) with - (End, End) -> 0 - | (End, _) -> -1 - | (_, End) -> 1 - | (More(v1, d1, r1, e1), More(v2, d2, r2, e2)) -> - let c = Ord.compare v1 v2 in - if c <> 0 then c else - let c = cmp d1 d2 in - if c <> 0 then c else - compare_aux (cons_enum r1 e1) (cons_enum r2 e2) - in compare_aux (cons_enum m1 End) (cons_enum m2 End) - - let equal cmp m1 m2 = - let rec equal_aux e1 e2 = - match (e1, e2) with - (End, End) -> true - | (End, _) -> false - | (_, End) -> false - | (More(v1, d1, r1, e1), More(v2, d2, r2, e2)) -> - Ord.compare v1 v2 = 0 && cmp d1 d2 && - equal_aux (cons_enum r1 e1) (cons_enum r2 e2) - in equal_aux (cons_enum m1 End) (cons_enum m2 End) - - let rec cardinal = function - Empty -> 0 - | Node {l; r} -> cardinal l + 1 + cardinal r - - let rec bindings_aux accu = function - Empty -> accu - | Node {l; v; d; r} -> bindings_aux ((v, d) :: bindings_aux accu r) l - - let bindings s = - bindings_aux [] s - - let choose = min_binding - - let choose_opt = min_binding_opt - -end diff --git a/analysis/vendor/compiler-libs-406/map.mli b/analysis/vendor/compiler-libs-406/map.mli deleted file mode 100644 index 57432210b..000000000 --- a/analysis/vendor/compiler-libs-406/map.mli +++ /dev/null @@ -1,315 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Association tables over ordered types. - - This module implements applicative association tables, also known as - finite maps or dictionaries, given a total ordering function - over the keys. - All operations over maps are purely applicative (no side-effects). - The implementation uses balanced binary trees, and therefore searching - and insertion take time logarithmic in the size of the map. - - For instance: - {[ - module IntPairs = - struct - type t = int * int - let compare (x0,y0) (x1,y1) = - match Stdlib.compare x0 x1 with - 0 -> Stdlib.compare y0 y1 - | c -> c - end - - module PairsMap = Map.Make(IntPairs) - - let m = PairsMap.(empty |> add (0,1) "hello" |> add (1,0) "world") - ]} - - This creates a new module [PairsMap], with a new type ['a PairsMap.t] - of maps from [int * int] to ['a]. In this example, [m] contains [string] - values so its type is [string PairsMap.t]. -*) - -module type OrderedType = - sig - type t - (** The type of the map keys. *) - - val compare : t -> t -> int - (** A total ordering function over the keys. - This is a two-argument function [f] such that - [f e1 e2] is zero if the keys [e1] and [e2] are equal, - [f e1 e2] is strictly negative if [e1] is smaller than [e2], - and [f e1 e2] is strictly positive if [e1] is greater than [e2]. - Example: a suitable ordering function is the generic structural - comparison function {!Stdlib.compare}. *) - end -(** Input signature of the functor {!Map.Make}. *) - -module type S = - sig - type key - (** The type of the map keys. *) - - type (+'a) t - (** The type of maps from type [key] to type ['a]. *) - - val empty: 'a t - (** The empty map. *) - - val is_empty: 'a t -> bool - (** Test whether a map is empty or not. *) - - val mem: key -> 'a t -> bool - (** [mem x m] returns [true] if [m] contains a binding for [x], - and [false] otherwise. *) - - val add: key -> 'a -> 'a t -> 'a t - (** [add x y m] returns a map containing the same bindings as - [m], plus a binding of [x] to [y]. If [x] was already bound - in [m] to a value that is physically equal to [y], - [m] is returned unchanged (the result of the function is - then physically equal to [m]). Otherwise, the previous binding - of [x] in [m] disappears. - @before 4.03 Physical equality was not ensured. *) - - val update: key -> ('a option -> 'a option) -> 'a t -> 'a t - (** [update x f m] returns a map containing the same bindings as - [m], except for the binding of [x]. Depending on the value of - [y] where [y] is [f (find_opt x m)], the binding of [x] is - added, removed or updated. If [y] is [None], the binding is - removed if it exists; otherwise, if [y] is [Some z] then [x] - is associated to [z] in the resulting map. If [x] was already - bound in [m] to a value that is physically equal to [z], [m] - is returned unchanged (the result of the function is then - physically equal to [m]). - @since 4.06.0 - *) - - val singleton: key -> 'a -> 'a t - (** [singleton x y] returns the one-element map that contains a binding [y] - for [x]. - @since 3.12.0 - *) - - val remove: key -> 'a t -> 'a t - (** [remove x m] returns a map containing the same bindings as - [m], except for [x] which is unbound in the returned map. - If [x] was not in [m], [m] is returned unchanged - (the result of the function is then physically equal to [m]). - @before 4.03 Physical equality was not ensured. *) - - val merge: - (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t - (** [merge f m1 m2] computes a map whose keys is a subset of keys of [m1] - and of [m2]. The presence of each such binding, and the corresponding - value, is determined with the function [f]. - In terms of the [find_opt] operation, we have - [find_opt x (merge f m1 m2) = f (find_opt x m1) (find_opt x m2)] - for any key [x], provided that [f None None = None]. - @since 3.12.0 - *) - - val union: (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t - (** [union f m1 m2] computes a map whose keys is the union of keys - of [m1] and of [m2]. When the same binding is defined in both - arguments, the function [f] is used to combine them. - This is a special case of [merge]: [union f m1 m2] is equivalent - to [merge f' m1 m2], where - - [f' None None = None] - - [f' (Some v) None = Some v] - - [f' None (Some v) = Some v] - - [f' (Some v1) (Some v2) = f v1 v2] - - @since 4.03.0 - *) - - val compare: ('a -> 'a -> int) -> 'a t -> 'a t -> int - (** Total ordering between maps. The first argument is a total ordering - used to compare data associated with equal keys in the two maps. *) - - val equal: ('a -> 'a -> bool) -> 'a t -> 'a t -> bool - (** [equal cmp m1 m2] tests whether the maps [m1] and [m2] are - equal, that is, contain equal keys and associate them with - equal data. [cmp] is the equality predicate used to compare - the data associated with the keys. *) - - val iter: (key -> 'a -> unit) -> 'a t -> unit - (** [iter f m] applies [f] to all bindings in map [m]. - [f] receives the key as first argument, and the associated value - as second argument. The bindings are passed to [f] in increasing - order with respect to the ordering over the type of the keys. *) - - val fold: (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b - (** [fold f m a] computes [(f kN dN ... (f k1 d1 a)...)], - where [k1 ... kN] are the keys of all bindings in [m] - (in increasing order), and [d1 ... dN] are the associated data. *) - - val for_all: (key -> 'a -> bool) -> 'a t -> bool - (** [for_all p m] checks if all the bindings of the map - satisfy the predicate [p]. - @since 3.12.0 - *) - - val exists: (key -> 'a -> bool) -> 'a t -> bool - (** [exists p m] checks if at least one binding of the map - satisfies the predicate [p]. - @since 3.12.0 - *) - - val filter: (key -> 'a -> bool) -> 'a t -> 'a t - (** [filter p m] returns the map with all the bindings in [m] - that satisfy predicate [p]. If [p] satisfies every binding in [m], - [m] is returned unchanged (the result of the function is then - physically equal to [m]) - @since 3.12.0 - @before 4.03 Physical equality was not ensured. - *) - - val partition: (key -> 'a -> bool) -> 'a t -> 'a t * 'a t - (** [partition p m] returns a pair of maps [(m1, m2)], where - [m1] contains all the bindings of [s] that satisfy the - predicate [p], and [m2] is the map with all the bindings of - [s] that do not satisfy [p]. - @since 3.12.0 - *) - - val cardinal: 'a t -> int - (** Return the number of bindings of a map. - @since 3.12.0 - *) - - val bindings: 'a t -> (key * 'a) list - (** Return the list of all bindings of the given map. - The returned list is sorted in increasing order with respect - to the ordering [Ord.compare], where [Ord] is the argument - given to {!Map.Make}. - @since 3.12.0 - *) - - val min_binding: 'a t -> (key * 'a) - (** Return the smallest binding of the given map - (with respect to the [Ord.compare] ordering), or raise - [Not_found] if the map is empty. - @since 3.12.0 - *) - - val min_binding_opt: 'a t -> (key * 'a) option - (** Return the smallest binding of the given map - (with respect to the [Ord.compare] ordering), or [None] - if the map is empty. - @since 4.05 - *) - - val max_binding: 'a t -> (key * 'a) - (** Same as {!Map.S.min_binding}, but returns the largest binding - of the given map. - @since 3.12.0 - *) - - val max_binding_opt: 'a t -> (key * 'a) option - (** Same as {!Map.S.min_binding_opt}, but returns the largest binding - of the given map. - @since 4.05 - *) - - val choose: 'a t -> (key * 'a) - (** Return one binding of the given map, or raise [Not_found] if - the map is empty. Which binding is chosen is unspecified, - but equal bindings will be chosen for equal maps. - @since 3.12.0 - *) - - val choose_opt: 'a t -> (key * 'a) option - (** Return one binding of the given map, or [None] if - the map is empty. Which binding is chosen is unspecified, - but equal bindings will be chosen for equal maps. - @since 4.05 - *) - - val split: key -> 'a t -> 'a t * 'a option * 'a t - (** [split x m] returns a triple [(l, data, r)], where - [l] is the map with all the bindings of [m] whose key - is strictly less than [x]; - [r] is the map with all the bindings of [m] whose key - is strictly greater than [x]; - [data] is [None] if [m] contains no binding for [x], - or [Some v] if [m] binds [v] to [x]. - @since 3.12.0 - *) - - val find: key -> 'a t -> 'a - (** [find x m] returns the current binding of [x] in [m], - or raises [Not_found] if no such binding exists. *) - - val find_opt: key -> 'a t -> 'a option - (** [find_opt x m] returns [Some v] if the current binding of [x] - in [m] is [v], or [None] if no such binding exists. - @since 4.05 - *) - - val find_first: (key -> bool) -> 'a t -> key * 'a - (** [find_first f m], where [f] is a monotonically increasing function, - returns the binding of [m] with the lowest key [k] such that [f k], - or raises [Not_found] if no such key exists. - - For example, [find_first (fun k -> Ord.compare k x >= 0) m] will return - the first binding [k, v] of [m] where [Ord.compare k x >= 0] - (intuitively: [k >= x]), or raise [Not_found] if [x] is greater than any - element of [m]. - - @since 4.05 - *) - - val find_first_opt: (key -> bool) -> 'a t -> (key * 'a) option - (** [find_first_opt f m], where [f] is a monotonically increasing function, - returns an option containing the binding of [m] with the lowest key [k] - such that [f k], or [None] if no such key exists. - @since 4.05 - *) - - val find_last: (key -> bool) -> 'a t -> key * 'a - (** [find_last f m], where [f] is a monotonically decreasing function, - returns the binding of [m] with the highest key [k] such that [f k], - or raises [Not_found] if no such key exists. - @since 4.05 - *) - - val find_last_opt: (key -> bool) -> 'a t -> (key * 'a) option - (** [find_last_opt f m], where [f] is a monotonically decreasing function, - returns an option containing the binding of [m] with the highest key [k] - such that [f k], or [None] if no such key exists. - @since 4.05 - *) - - val map: ('a -> 'b) -> 'a t -> 'b t - (** [map f m] returns a map with same domain as [m], where the - associated value [a] of all bindings of [m] has been - replaced by the result of the application of [f] to [a]. - The bindings are passed to [f] in increasing order - with respect to the ordering over the type of the keys. *) - - val mapi: (key -> 'a -> 'b) -> 'a t -> 'b t - (** Same as {!Map.S.map}, but the function receives as arguments both the - key and the associated value for each binding of the map. *) - - - end -(** Output signature of the functor {!Map.Make}. *) - -module Make (Ord : OrderedType) : S with type key = Ord.t -(** Functor building an implementation of the map structure - given a totally ordered type. *) diff --git a/analysis/vendor/compiler-libs-406/map_gen.ml b/analysis/vendor/compiler-libs-406/map_gen.ml deleted file mode 100644 index bdc15ca7e..000000000 --- a/analysis/vendor/compiler-libs-406/map_gen.ml +++ /dev/null @@ -1,380 +0,0 @@ -(***********************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. All rights reserved. This file is distributed *) -(* under the terms of the GNU Library General Public License, with *) -(* the special exception on linking described in file ../LICENSE. *) -(* *) -(***********************************************************************) -(** adapted from stdlib *) - -type ('key,'a) t = - | Empty - | Node of ('key,'a) t * 'key * 'a * ('key,'a) t * int - -type ('key,'a) enumeration = - | End - | More of 'key * 'a * ('key,'a) t * ('key, 'a) enumeration - -let rec cardinal_aux acc = function - | Empty -> acc - | Node (l,_,_,r, _) -> - cardinal_aux (cardinal_aux (acc + 1) r ) l - -let cardinal s = cardinal_aux 0 s - -let rec bindings_aux accu = function - | Empty -> accu - | Node(l, v, d, r, _) -> bindings_aux ((v, d) :: bindings_aux accu r) l - -let bindings s = - bindings_aux [] s - -let rec keys_aux accu = function - Empty -> accu - | Node(l, v, _, r, _) -> keys_aux (v :: keys_aux accu r) l - -let keys s = keys_aux [] s - - - -let rec cons_enum m e = - match m with - Empty -> e - | Node(l, v, d, r, _) -> cons_enum l (More(v, d, r, e)) - - -let height = function - | Empty -> 0 - | Node(_,_,_,_,h) -> h - -let create l x d r = - let hl = height l and hr = height r in - Node(l, x, d, r, (if hl >= hr then hl + 1 else hr + 1)) - -let singleton x d = Node(Empty, x, d, Empty, 1) - -let bal l x d r = - let hl = match l with Empty -> 0 | Node(_,_,_,_,h) -> h in - let hr = match r with Empty -> 0 | Node(_,_,_,_,h) -> h in - if hl > hr + 2 then begin - match l with - Empty -> invalid_arg "Map.bal" - | Node(ll, lv, ld, lr, _) -> - if height ll >= height lr then - create ll lv ld (create lr x d r) - else begin - match lr with - Empty -> invalid_arg "Map.bal" - | Node(lrl, lrv, lrd, lrr, _)-> - create (create ll lv ld lrl) lrv lrd (create lrr x d r) - end - end else if hr > hl + 2 then begin - match r with - Empty -> invalid_arg "Map.bal" - | Node(rl, rv, rd, rr, _) -> - if height rr >= height rl then - create (create l x d rl) rv rd rr - else begin - match rl with - Empty -> invalid_arg "Map.bal" - | Node(rll, rlv, rld, rlr, _) -> - create (create l x d rll) rlv rld (create rlr rv rd rr) - end - end else - Node(l, x, d, r, (if hl >= hr then hl + 1 else hr + 1)) - -let empty = Empty - -let is_empty = function Empty -> true | _ -> false - -let rec min_binding_exn = function - Empty -> raise Not_found - | Node(Empty, x, d, _r, _) -> (x, d) - | Node(l, _x, _d, _r, _) -> min_binding_exn l - -let choose = min_binding_exn - -let rec max_binding_exn = function - Empty -> raise Not_found - | Node(_l, x, d, Empty, _) -> (x, d) - | Node(_l, _x, _d, r, _) -> max_binding_exn r - -let rec remove_min_binding = function - Empty -> invalid_arg "Map.remove_min_elt" - | Node(Empty, _x, _d, r, _) -> r - | Node(l, x, d, r, _) -> bal (remove_min_binding l) x d r - -let merge t1 t2 = - match (t1, t2) with - (Empty, t) -> t - | (t, Empty) -> t - | (_, _) -> - let (x, d) = min_binding_exn t2 in - bal t1 x d (remove_min_binding t2) - - -let rec iter f = function - Empty -> () - | Node(l, v, d, r, _) -> - iter f l; f v d; iter f r - -let rec map f = function - Empty -> - Empty - | Node(l, v, d, r, h) -> - let l' = map f l in - let d' = f d in - let r' = map f r in - Node(l', v, d', r', h) - -let rec mapi f = function - Empty -> - Empty - | Node(l, v, d, r, h) -> - let l' = mapi f l in - let d' = f v d in - let r' = mapi f r in - Node(l', v, d', r', h) - -let rec fold f m accu = - match m with - Empty -> accu - | Node(l, v, d, r, _) -> - fold f r (f v d (fold f l accu)) - -let rec for_all p = function - Empty -> true - | Node(l, v, d, r, _) -> p v d && for_all p l && for_all p r - -let rec exists p = function - Empty -> false - | Node(l, v, d, r, _) -> p v d || exists p l || exists p r - -(* Beware: those two functions assume that the added k is *strictly* - smaller (or bigger) than all the present keys in the tree; it - does not test for equality with the current min (or max) key. - - Indeed, they are only used during the "join" operation which - respects this precondition. -*) - -let rec add_min_binding k v = function - | Empty -> singleton k v - | Node (l, x, d, r, _h) -> - bal (add_min_binding k v l) x d r - -let rec add_max_binding k v = function - | Empty -> singleton k v - | Node (l, x, d, r, _h) -> - bal l x d (add_max_binding k v r) - -(* Same as create and bal, but no assumptions are made on the - relative heights of l and r. *) - -let rec join l v d r = - match (l, r) with - (Empty, _) -> add_min_binding v d r - | (_, Empty) -> add_max_binding v d l - | (Node(ll, lv, ld, lr, lh), Node(rl, rv, rd, rr, rh)) -> - if lh > rh + 2 then bal ll lv ld (join lr v d r) else - if rh > lh + 2 then bal (join l v d rl) rv rd rr else - create l v d r - -(* Merge two trees l and r into one. - All elements of l must precede the elements of r. - No assumption on the heights of l and r. *) - -let concat t1 t2 = - match (t1, t2) with - (Empty, t) -> t - | (t, Empty) -> t - | (_, _) -> - let (x, d) = min_binding_exn t2 in - join t1 x d (remove_min_binding t2) - -let concat_or_join t1 v d t2 = - match d with - | Some d -> join t1 v d t2 - | None -> concat t1 t2 - -let rec filter p = function - Empty -> Empty - | Node(l, v, d, r, _) -> - (* call [p] in the expected left-to-right order *) - let l' = filter p l in - let pvd = p v d in - let r' = filter p r in - if pvd then join l' v d r' else concat l' r' - -let rec partition p = function - Empty -> (Empty, Empty) - | Node(l, v, d, r, _) -> - (* call [p] in the expected left-to-right order *) - let (lt, lf) = partition p l in - let pvd = p v d in - let (rt, rf) = partition p r in - if pvd - then (join lt v d rt, concat lf rf) - else (concat lt rt, join lf v d rf) - -let compare compare_key cmp_val m1 m2 = - let rec compare_aux e1 e2 = - match (e1, e2) with - (End, End) -> 0 - | (End, _) -> -1 - | (_, End) -> 1 - | (More(v1, d1, r1, e1), More(v2, d2, r2, e2)) -> - let c = compare_key v1 v2 in - if c <> 0 then c else - let c = cmp_val d1 d2 in - if c <> 0 then c else - compare_aux (cons_enum r1 e1) (cons_enum r2 e2) - in compare_aux (cons_enum m1 End) (cons_enum m2 End) - -let equal compare_key cmp m1 m2 = - let rec equal_aux e1 e2 = - match (e1, e2) with - (End, End) -> true - | (End, _) -> false - | (_, End) -> false - | (More(v1, d1, r1, e1), More(v2, d2, r2, e2)) -> - compare_key v1 v2 = 0 && cmp d1 d2 && - equal_aux (cons_enum r1 e1) (cons_enum r2 e2) - in equal_aux (cons_enum m1 End) (cons_enum m2 End) - - - - -module type S = - sig - type key - type +'a t - val empty: 'a t - val is_empty: 'a t -> bool - val mem: key -> 'a t -> bool - - val add: key -> 'a -> 'a t -> 'a t - (** [add x y m] - If [x] was already bound in [m], its previous binding disappears. *) - - val adjust: key -> (unit -> 'a) -> ('a -> 'a) -> 'a t -> 'a t - (** [adjust k v f map] if not exist [add k v], otherwise - [add k v (f old)] - *) - - val singleton: key -> 'a -> 'a t - - val remove: key -> 'a t -> 'a t - (** [remove x m] returns a map containing the same bindings as - [m], except for [x] which is unbound in the returned map. *) - - val merge: - (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t - (** [merge f m1 m2] computes a map whose keys is a subset of keys of [m1] - and of [m2]. The presence of each such binding, and the corresponding - value, is determined with the function [f]. - @since 3.12.0 - *) - - val disjoint_merge : 'a t -> 'a t -> 'a t - (* merge two maps, will raise if they have the same key *) - val compare: ('a -> 'a -> int) -> 'a t -> 'a t -> int - (** Total ordering between maps. The first argument is a total ordering - used to compare data associated with equal keys in the two maps. *) - - val equal: ('a -> 'a -> bool) -> 'a t -> 'a t -> bool - - val iter: (key -> 'a -> unit) -> 'a t -> unit - (** [iter f m] applies [f] to all bindings in map [m]. - The bindings are passed to [f] in increasing order. *) - - val fold: (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b - (** [fold f m a] computes [(f kN dN ... (f k1 d1 a)...)], - where [k1 ... kN] are the keys of all bindings in [m] - (in increasing order) *) - - val for_all: (key -> 'a -> bool) -> 'a t -> bool - (** [for_all p m] checks if all the bindings of the map. - order unspecified - *) - - val exists: (key -> 'a -> bool) -> 'a t -> bool - (** [exists p m] checks if at least one binding of the map - satisfy the predicate [p]. - order unspecified - *) - - val filter: (key -> 'a -> bool) -> 'a t -> 'a t - (** [filter p m] returns the map with all the bindings in [m] - that satisfy predicate [p]. - order unspecified - *) - - val partition: (key -> 'a -> bool) -> 'a t -> 'a t * 'a t - (** [partition p m] returns a pair of maps [(m1, m2)], where - [m1] contains all the bindings of [s] that satisfy the - predicate [p], and [m2] is the map with all the bindings of - [s] that do not satisfy [p]. - *) - - val cardinal: 'a t -> int - (** Return the number of bindings of a map. *) - - val bindings: 'a t -> (key * 'a) list - (** Return the list of all bindings of the given map. - The returned list is sorted in increasing order with respect - to the ordering *) - - val keys : 'a t -> key list - (* Increasing order *) - - val min_binding_exn: 'a t -> (key * 'a) - (** raise [Not_found] if the map is empty. *) - - val max_binding_exn: 'a t -> (key * 'a) - (** Same as {!Map.S.min_binding} *) - - val choose: 'a t -> (key * 'a) - (** Return one binding of the given map, or raise [Not_found] if - the map is empty. Which binding is chosen is unspecified, - but equal bindings will be chosen for equal maps. - *) - - val split: key -> 'a t -> 'a t * 'a option * 'a t - (** [split x m] returns a triple [(l, data, r)], where - [l] is the map with all the bindings of [m] whose key - is strictly less than [x]; - [r] is the map with all the bindings of [m] whose key - is strictly greater than [x]; - [data] is [None] if [m] contains no binding for [x], - or [Some v] if [m] binds [v] to [x]. - @since 3.12.0 - *) - - val find_exn: key -> 'a t -> 'a - (** [find x m] returns the current binding of [x] in [m], - or raises [Not_found] if no such binding exists. *) - - val find_opt: key -> 'a t -> 'a option - val find_default: key -> 'a t -> 'a -> 'a - val map: ('a -> 'b) -> 'a t -> 'b t - (** [map f m] returns a map with same domain as [m], where the - associated value [a] of all bindings of [m] has been - replaced by the result of the application of [f] to [a]. - The bindings are passed to [f] in increasing order - with respect to the ordering over the type of the keys. *) - - val mapi: (key -> 'a -> 'b) -> 'a t -> 'b t - (** Same as {!Map.S.map}, but the function receives as arguments both the - key and the associated value for each binding of the map. *) - - val of_list : (key * 'a) list -> 'a t - val of_array : (key * 'a ) array -> 'a t - val add_list : (key * 'b) list -> 'b t -> 'b t - - end diff --git a/analysis/vendor/compiler-libs-406/nativeint.ml b/analysis/vendor/compiler-libs-406/nativeint.ml deleted file mode 100644 index 2a7bf4366..000000000 --- a/analysis/vendor/compiler-libs-406/nativeint.ml +++ /dev/null @@ -1,65 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Module [Nativeint]: processor-native integers *) - -external neg: nativeint -> nativeint = "%nativeint_neg" -external add: nativeint -> nativeint -> nativeint = "%nativeint_add" -external sub: nativeint -> nativeint -> nativeint = "%nativeint_sub" -external mul: nativeint -> nativeint -> nativeint = "%nativeint_mul" -external div: nativeint -> nativeint -> nativeint = "%nativeint_div" -external rem: nativeint -> nativeint -> nativeint = "%nativeint_mod" -external logand: nativeint -> nativeint -> nativeint = "%nativeint_and" -external logor: nativeint -> nativeint -> nativeint = "%nativeint_or" -external logxor: nativeint -> nativeint -> nativeint = "%nativeint_xor" -external shift_left: nativeint -> int -> nativeint = "%nativeint_lsl" -external shift_right: nativeint -> int -> nativeint = "%nativeint_asr" -external shift_right_logical: nativeint -> int -> nativeint = "%nativeint_lsr" -external of_int: int -> nativeint = "%nativeint_of_int" -external to_int: nativeint -> int = "%nativeint_to_int" -external of_float : float -> nativeint - = "caml_nativeint_of_float" "caml_nativeint_of_float_unboxed" - [@@unboxed] [@@noalloc] -external to_float : nativeint -> float - = "caml_nativeint_to_float" "caml_nativeint_to_float_unboxed" - [@@unboxed] [@@noalloc] -external of_int32: int32 -> nativeint = "%nativeint_of_int32" -external to_int32: nativeint -> int32 = "%nativeint_to_int32" - -let zero = 0n -let one = 1n -let minus_one = -1n -let succ n = add n 1n -let pred n = sub n 1n -let abs n = if n >= 0n then n else neg n -let size = Sys.word_size -let min_int = shift_left 1n (size - 1) -let max_int = sub min_int 1n -let lognot n = logxor n (-1n) - -external format : string -> nativeint -> string = "caml_nativeint_format" -let to_string n = format "%d" n - -external of_string: string -> nativeint = "caml_nativeint_of_string" - -let of_string_opt s = - (* TODO: expose a non-raising primitive directly. *) - try Some (of_string s) - with Failure _ -> None - -type t = nativeint - -let compare (x: t) (y: t) = Stdlib.compare x y -let equal (x: t) (y: t) = compare x y = 0 diff --git a/analysis/vendor/compiler-libs-406/nativeint.mli b/analysis/vendor/compiler-libs-406/nativeint.mli deleted file mode 100644 index 0f1eee285..000000000 --- a/analysis/vendor/compiler-libs-406/nativeint.mli +++ /dev/null @@ -1,204 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Processor-native integers. - - This module provides operations on the type [nativeint] of - signed 32-bit integers (on 32-bit platforms) or - signed 64-bit integers (on 64-bit platforms). - This integer type has exactly the same width as that of a - pointer type in the C compiler. All arithmetic operations over - [nativeint] are taken modulo 2{^32} or 2{^64} depending - on the word size of the architecture. - - Performance notice: values of type [nativeint] occupy more memory - space than values of type [int], and arithmetic operations on - [nativeint] are generally slower than those on [int]. Use [nativeint] - only when the application requires the extra bit of precision - over the [int] type. -*) - -val zero : nativeint -(** The native integer 0.*) - -val one : nativeint -(** The native integer 1.*) - -val minus_one : nativeint -(** The native integer -1.*) - -external neg : nativeint -> nativeint = "%nativeint_neg" -(** Unary negation. *) - -external add : nativeint -> nativeint -> nativeint = "%nativeint_add" -(** Addition. *) - -external sub : nativeint -> nativeint -> nativeint = "%nativeint_sub" -(** Subtraction. *) - -external mul : nativeint -> nativeint -> nativeint = "%nativeint_mul" -(** Multiplication. *) - -external div : nativeint -> nativeint -> nativeint = "%nativeint_div" -(** Integer division. Raise [Division_by_zero] if the second - argument is zero. This division rounds the real quotient of - its arguments towards zero, as specified for {!Pervasives.(/)}. *) - -external rem : nativeint -> nativeint -> nativeint = "%nativeint_mod" -(** Integer remainder. If [y] is not zero, the result - of [Nativeint.rem x y] satisfies the following properties: - [Nativeint.zero <= Nativeint.rem x y < Nativeint.abs y] and - [x = Nativeint.add (Nativeint.mul (Nativeint.div x y) y) - (Nativeint.rem x y)]. - If [y = 0], [Nativeint.rem x y] raises [Division_by_zero]. *) - -val succ : nativeint -> nativeint -(** Successor. - [Nativeint.succ x] is [Nativeint.add x Nativeint.one]. *) - -val pred : nativeint -> nativeint -(** Predecessor. - [Nativeint.pred x] is [Nativeint.sub x Nativeint.one]. *) - -val abs : nativeint -> nativeint -(** Return the absolute value of its argument. *) - -val size : int -(** The size in bits of a native integer. This is equal to [32] - on a 32-bit platform and to [64] on a 64-bit platform. *) - -val max_int : nativeint -(** The greatest representable native integer, - either 2{^31} - 1 on a 32-bit platform, - or 2{^63} - 1 on a 64-bit platform. *) - -val min_int : nativeint -(** The smallest representable native integer, - either -2{^31} on a 32-bit platform, - or -2{^63} on a 64-bit platform. *) - -external logand : nativeint -> nativeint -> nativeint = "%nativeint_and" -(** Bitwise logical and. *) - -external logor : nativeint -> nativeint -> nativeint = "%nativeint_or" -(** Bitwise logical or. *) - -external logxor : nativeint -> nativeint -> nativeint = "%nativeint_xor" -(** Bitwise logical exclusive or. *) - -val lognot : nativeint -> nativeint -(** Bitwise logical negation. *) - -external shift_left : nativeint -> int -> nativeint = "%nativeint_lsl" -(** [Nativeint.shift_left x y] shifts [x] to the left by [y] bits. - The result is unspecified if [y < 0] or [y >= bitsize], - where [bitsize] is [32] on a 32-bit platform and - [64] on a 64-bit platform. *) - -external shift_right : nativeint -> int -> nativeint = "%nativeint_asr" -(** [Nativeint.shift_right x y] shifts [x] to the right by [y] bits. - This is an arithmetic shift: the sign bit of [x] is replicated - and inserted in the vacated bits. - The result is unspecified if [y < 0] or [y >= bitsize]. *) - -external shift_right_logical : - nativeint -> int -> nativeint = "%nativeint_lsr" -(** [Nativeint.shift_right_logical x y] shifts [x] to the right - by [y] bits. - This is a logical shift: zeroes are inserted in the vacated bits - regardless of the sign of [x]. - The result is unspecified if [y < 0] or [y >= bitsize]. *) - - -external of_int : int -> nativeint = "%nativeint_of_int" -(** Convert the given integer (type [int]) to a native integer - (type [nativeint]). *) - -external to_int : nativeint -> int = "%nativeint_to_int" -(** Convert the given native integer (type [nativeint]) to an - integer (type [int]). The high-order bit is lost during - the conversion. *) - -external of_float : float -> nativeint - = "caml_nativeint_of_float" "caml_nativeint_of_float_unboxed" - [@@unboxed] [@@noalloc] -(** Convert the given floating-point number to a native integer, - discarding the fractional part (truncate towards 0). - The result of the conversion is undefined if, after truncation, - the number is outside the range - \[{!Nativeint.min_int}, {!Nativeint.max_int}\]. *) - -external to_float : nativeint -> float - = "caml_nativeint_to_float" "caml_nativeint_to_float_unboxed" - [@@unboxed] [@@noalloc] -(** Convert the given native integer to a floating-point number. *) - -external of_int32 : int32 -> nativeint = "%nativeint_of_int32" -(** Convert the given 32-bit integer (type [int32]) - to a native integer. *) - -external to_int32 : nativeint -> int32 = "%nativeint_to_int32" -(** Convert the given native integer to a - 32-bit integer (type [int32]). On 64-bit platforms, - the 64-bit native integer is taken modulo 2{^32}, - i.e. the top 32 bits are lost. On 32-bit platforms, - the conversion is exact. *) - -external of_string : string -> nativeint = "caml_nativeint_of_string" -(** Convert the given string to a native integer. - The string is read in decimal (by default, or if the string - begins with [0u]) or in hexadecimal, octal or binary if the - string begins with [0x], [0o] or [0b] respectively. - - The [0u] prefix reads the input as an unsigned integer in the range - [[0, 2*Nativeint.max_int+1]]. If the input exceeds {!Nativeint.max_int} - it is converted to the signed integer - [Int64.min_int + input - Nativeint.max_int - 1]. - - Raise [Failure "Nativeint.of_string"] if the given string is not - a valid representation of an integer, or if the integer represented - exceeds the range of integers representable in type [nativeint]. *) - -val of_string_opt: string -> nativeint option -(** Same as [of_string], but return [None] instead of raising. - @since 4.05 *) - -val to_string : nativeint -> string -(** Return the string representation of its argument, in decimal. *) - -type t = nativeint -(** An alias for the type of native integers. *) - -val compare: t -> t -> int -(** The comparison function for native integers, with the same specification as - {!Stdlib.compare}. Along with the type [t], this function [compare] - allows the module [Nativeint] to be passed as argument to the functors - {!Set.Make} and {!Map.Make}. *) - -val equal: t -> t -> bool -(** The equal function for native ints. - @since 4.03.0 *) - -(**/**) - -(** {1 Deprecated functions} *) - -external format : string -> nativeint -> string = "caml_nativeint_format" -(** [Nativeint.format fmt n] return the string representation of the - native integer [n] in the format specified by [fmt]. - [fmt] is a [Printf]-style format consisting of exactly - one [%d], [%i], [%u], [%x], [%X] or [%o] conversion specification. - This function is deprecated; use {!Printf.sprintf} with a [%nx] format - instead. *) diff --git a/analysis/vendor/compiler-libs-406/numbers.ml b/analysis/vendor/compiler-libs-406/numbers.ml deleted file mode 100644 index 18006a5b8..000000000 --- a/analysis/vendor/compiler-libs-406/numbers.ml +++ /dev/null @@ -1,86 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Pierre Chambart, OCamlPro *) -(* Mark Shinwell and Leo White, Jane Street Europe *) -(* *) -(* Copyright 2013--2016 OCamlPro SAS *) -(* Copyright 2014--2016 Jane Street Group LLC *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -module Int_base = Identifiable.Make (struct - type t = int - - let compare x y = x - y - let output oc x = Printf.fprintf oc "%i" x - let hash i = i - let equal (i : int) j = i = j - let print = Format.pp_print_int -end) - -module Int = struct - type t = int - - include Int_base - - let rec zero_to_n n = - if n < 0 then Set.empty else Set.add n (zero_to_n (n-1)) -end - -module Int8 = struct - type t = int - - let zero = 0 - let one = 1 - - let of_int_exn i = - if i < -(1 lsl 7) || i > ((1 lsl 7) - 1) then - Misc.fatal_errorf "Int8.of_int_exn: %d is out of range" i - else - i - - let to_int i = i -end - -module Int16 = struct - type t = int - - let of_int_exn i = - if i < -(1 lsl 15) || i > ((1 lsl 15) - 1) then - Misc.fatal_errorf "Int16.of_int_exn: %d is out of range" i - else - i - - let lower_int64 = Int64.neg (Int64.shift_left Int64.one 15) - let upper_int64 = Int64.sub (Int64.shift_left Int64.one 15) Int64.one - - let of_int64_exn i = - if Int64.compare i lower_int64 < 0 - || Int64.compare i upper_int64 > 0 - then - Misc.fatal_errorf "Int16.of_int64_exn: %Ld is out of range" i - else - Int64.to_int i - - let to_int t = t -end - -module Float = struct - type t = float - - include Identifiable.Make (struct - type t = float - - let compare x y = Stdlib.compare x y - let output oc x = Printf.fprintf oc "%f" x - let hash f = Hashtbl.hash f - let equal (i : float) j = i = j - let print = Format.pp_print_float - end) -end diff --git a/analysis/vendor/compiler-libs-406/numbers.mli b/analysis/vendor/compiler-libs-406/numbers.mli deleted file mode 100644 index 4d5e285fa..000000000 --- a/analysis/vendor/compiler-libs-406/numbers.mli +++ /dev/null @@ -1,45 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Pierre Chambart, OCamlPro *) -(* Mark Shinwell and Leo White, Jane Street Europe *) -(* *) -(* Copyright 2013--2016 OCamlPro SAS *) -(* Copyright 2014--2016 Jane Street Group LLC *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Modules about numbers, some of which satisfy {!Identifiable.S}. *) - -module Int : sig - include Identifiable.S with type t = int - - (** [zero_to_n n] is the set of numbers \{0, ..., n\} (inclusive). *) - val zero_to_n : int -> Set.t -end - -module Int8 : sig - type t - - val zero : t - val one : t - - val of_int_exn : int -> t - val to_int : t -> int -end - -module Int16 : sig - type t - - val of_int_exn : int -> t - val of_int64_exn : Int64.t -> t - - val to_int : t -> int -end - -module Float : Identifiable.S with type t = float diff --git a/analysis/vendor/compiler-libs-406/obj.ml b/analysis/vendor/compiler-libs-406/obj.ml deleted file mode 100644 index 6c5f4f9e0..000000000 --- a/analysis/vendor/compiler-libs-406/obj.ml +++ /dev/null @@ -1,114 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Operations on internal representations of values *) - -type t - -external repr : 'a -> t = "%identity" -external obj : t -> 'a = "%identity" -external magic : 'a -> 'b = "%identity" -external is_int : t -> bool = "%obj_is_int" -let [@inline always] is_block a = not (is_int a) -external tag : t -> int = "caml_obj_tag" -external set_tag : t -> int -> unit = "caml_obj_set_tag" -external size : t -> int = "%obj_size" -external reachable_words : t -> int = "caml_obj_reachable_words" -external field : t -> int -> t = "%obj_field" -external set_field : t -> int -> t -> unit = "%obj_set_field" -external floatarray_get : floatarray -> int -> float = "caml_floatarray_get" -external floatarray_set : - floatarray -> int -> float -> unit = "caml_floatarray_set" -let [@inline always] double_field x i = floatarray_get (obj x : floatarray) i -let [@inline always] set_double_field x i v = - floatarray_set (obj x : floatarray) i v -external new_block : int -> int -> t = "caml_obj_block" -external dup : t -> t = "caml_obj_dup" -external truncate : t -> int -> unit = "caml_obj_truncate" -external add_offset : t -> Int32.t -> t = "caml_obj_add_offset" - -let marshal (obj : t) = - Marshal.to_bytes obj [] -let unmarshal str pos = - (Marshal.from_bytes str pos, pos + Marshal.total_size str pos) - -let first_non_constant_constructor_tag = 0 -let last_non_constant_constructor_tag = 245 - -let lazy_tag = 246 -let closure_tag = 247 -let object_tag = 248 -let infix_tag = 249 -let forward_tag = 250 - -let no_scan_tag = 251 - -let abstract_tag = 251 -let string_tag = 252 -let double_tag = 253 -let double_array_tag = 254 -let custom_tag = 255 -let final_tag = custom_tag - - -let int_tag = 1000 -let out_of_heap_tag = 1001 -let unaligned_tag = 1002 - -let extension_constructor x = - let x = repr x in - let slot = - if (is_block x) && (tag x) <> object_tag && (size x) >= 1 then field x 0 - else x - in - let name = - if (is_block slot) && (tag slot) = object_tag then field slot 0 - else invalid_arg "Obj.extension_constructor" - in - if (tag name) = string_tag then (obj slot : extension_constructor) - else invalid_arg "Obj.extension_constructor" - -let [@inline always] extension_name (slot : extension_constructor) = - (obj (field (repr slot) 0) : string) - -let [@inline always] extension_id (slot : extension_constructor) = - (obj (field (repr slot) 1) : int) - -module Ephemeron = struct - type obj_t = t - - type t (** ephemeron *) - - external create: int -> t = "caml_ephe_create" - - let length x = size(repr x) - 2 - - external get_key: t -> int -> obj_t option = "caml_ephe_get_key" - external get_key_copy: t -> int -> obj_t option = "caml_ephe_get_key_copy" - external set_key: t -> int -> obj_t -> unit = "caml_ephe_set_key" - external unset_key: t -> int -> unit = "caml_ephe_unset_key" - external check_key: t -> int -> bool = "caml_ephe_check_key" - external blit_key : t -> int -> t -> int -> int -> unit - = "caml_ephe_blit_key" - - external get_data: t -> obj_t option = "caml_ephe_get_data" - external get_data_copy: t -> obj_t option = "caml_ephe_get_data_copy" - external set_data: t -> obj_t -> unit = "caml_ephe_set_data" - external unset_data: t -> unit = "caml_ephe_unset_data" - external check_data: t -> bool = "caml_ephe_check_data" - external blit_data : t -> t -> unit = "caml_ephe_blit_data" - - -end diff --git a/analysis/vendor/compiler-libs-406/obj.mli b/analysis/vendor/compiler-libs-406/obj.mli deleted file mode 100644 index e76c7df95..000000000 --- a/analysis/vendor/compiler-libs-406/obj.mli +++ /dev/null @@ -1,152 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Operations on internal representations of values. - - Not for the casual user. -*) - -type t - -external repr : 'a -> t = "%identity" -external obj : t -> 'a = "%identity" -external magic : 'a -> 'b = "%identity" -val [@inline always] is_block : t -> bool -external is_int : t -> bool = "%obj_is_int" -external tag : t -> int = "caml_obj_tag" -external size : t -> int = "%obj_size" -external reachable_words : t -> int = "caml_obj_reachable_words" - (** - Computes the total size (in words, including the headers) of all - heap blocks accessible from the argument. Statically - allocated blocks are excluded. - - @Since 4.04 - *) - -external field : t -> int -> t = "%obj_field" - -(** When using flambda: - - [set_field] MUST NOT be called on immutable blocks. (Blocks allocated - in C stubs, or with [new_block] below, are always considered mutable.) - - The same goes for [set_double_field] and [set_tag]. However, for - [set_tag], in the case of immutable blocks where the middle-end optimizers - never see code that discriminates on their tag (for example records), the - operation should be safe. Such uses are nonetheless discouraged. - - For experts only: - [set_field] et al can be made safe by first wrapping the block in - {!Sys.opaque_identity}, so any information about its contents will not - be propagated. -*) -external set_field : t -> int -> t -> unit = "%obj_set_field" -external set_tag : t -> int -> unit = "caml_obj_set_tag" - -val [@inline always] double_field : t -> int -> float (* @since 3.11.2 *) -val [@inline always] set_double_field : t -> int -> float -> unit - (* @since 3.11.2 *) -external new_block : int -> int -> t = "caml_obj_block" -external dup : t -> t = "caml_obj_dup" -external truncate : t -> int -> unit = "caml_obj_truncate" -external add_offset : t -> Int32.t -> t = "caml_obj_add_offset" - (* @since 3.12.0 *) - -val first_non_constant_constructor_tag : int -val last_non_constant_constructor_tag : int - -val lazy_tag : int -val closure_tag : int -val object_tag : int -val infix_tag : int -val forward_tag : int -val no_scan_tag : int -val abstract_tag : int -val string_tag : int (* both [string] and [bytes] *) -val double_tag : int -val double_array_tag : int -val custom_tag : int -val final_tag : int - [@@ocaml.deprecated "Replaced by custom_tag."] - -val int_tag : int -val out_of_heap_tag : int -val unaligned_tag : int (* should never happen @since 3.11.0 *) - -val extension_constructor : 'a -> extension_constructor -val [@inline always] extension_name : extension_constructor -> string -val [@inline always] extension_id : extension_constructor -> int - -(** The following two functions are deprecated. Use module {!Marshal} - instead. *) - -val marshal : t -> bytes - [@@ocaml.deprecated "Use Marshal.to_bytes instead."] -val unmarshal : bytes -> int -> t * int - [@@ocaml.deprecated "Use Marshal.from_bytes and Marshal.total_size instead."] - -module Ephemeron: sig - (** Ephemeron with arbitrary arity and untyped *) - - type obj_t = t - (** alias for {!Obj.t} *) - - type t - (** an ephemeron cf {!Ephemeron} *) - - val create: int -> t - (** [create n] returns an ephemeron with [n] keys. - All the keys and the data are initially empty *) - - val length: t -> int - (** return the number of keys *) - - val get_key: t -> int -> obj_t option - (** Same as {!Ephemeron.K1.get_key} *) - - val get_key_copy: t -> int -> obj_t option - (** Same as {!Ephemeron.K1.get_key_copy} *) - - val set_key: t -> int -> obj_t -> unit - (** Same as {!Ephemeron.K1.set_key} *) - - val unset_key: t -> int -> unit - (** Same as {!Ephemeron.K1.unset_key} *) - - val check_key: t -> int -> bool - (** Same as {!Ephemeron.K1.check_key} *) - - val blit_key : t -> int -> t -> int -> int -> unit - (** Same as {!Ephemeron.K1.blit_key} *) - - val get_data: t -> obj_t option - (** Same as {!Ephemeron.K1.get_data} *) - - val get_data_copy: t -> obj_t option - (** Same as {!Ephemeron.K1.get_data_copy} *) - - val set_data: t -> obj_t -> unit - (** Same as {!Ephemeron.K1.set_data} *) - - val unset_data: t -> unit - (** Same as {!Ephemeron.K1.unset_data} *) - - val check_data: t -> bool - (** Same as {!Ephemeron.K1.check_data} *) - - val blit_data : t -> t -> unit - (** Same as {!Ephemeron.K1.blit_data} *) -end diff --git a/analysis/vendor/compiler-libs-406/oo.mli b/analysis/vendor/compiler-libs-406/oo.mli deleted file mode 100644 index 9be20c14e..000000000 --- a/analysis/vendor/compiler-libs-406/oo.mli +++ /dev/null @@ -1,38 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Operations on objects *) - -val copy : (< .. > as 'a) -> 'a -(** [Oo.copy o] returns a copy of object [o], that is a fresh - object with the same methods and instance variables as [o]. *) - -external id : < .. > -> int = "%field1" -(** Return an integer identifying this object, unique for - the current execution of the program. The generic comparison - and hashing functions are based on this integer. When an object - is obtained by unmarshaling, the id is refreshed, and thus - different from the original object. As a consequence, the internal - invariants of data structures such as hash table or sets containing - objects are broken after unmarshaling the data structures. - *) - -(**/**) - -(* The following is for system use only. Do not call directly. *) - -(** For internal use (CamlIDL) *) -val new_method : string -> CamlinternalOO.tag -val public_method_label : string -> CamlinternalOO.tag diff --git a/analysis/vendor/compiler-libs-406/parse.ml b/analysis/vendor/compiler-libs-406/parse.ml deleted file mode 100644 index ba89f0e2e..000000000 --- a/analysis/vendor/compiler-libs-406/parse.ml +++ /dev/null @@ -1,67 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Entry points in the parser *) - -(* Skip tokens to the end of the phrase *) - -let rec skip_phrase lexbuf = - try - match Lexer.token lexbuf with - Parser.SEMISEMI | Parser.EOF -> () - | _ -> skip_phrase lexbuf - with - | Lexer.Error (Lexer.Unterminated_comment _, _) - | Lexer.Error (Lexer.Unterminated_string, _) - | Lexer.Error (Lexer.Unterminated_string_in_comment _, _) - | Lexer.Error (Lexer.Illegal_character _, _) -> skip_phrase lexbuf -;; - -let maybe_skip_phrase lexbuf = - if Parsing.is_current_lookahead Parser.SEMISEMI - || Parsing.is_current_lookahead Parser.EOF - then () - else skip_phrase lexbuf - -let wrap parsing_fun lexbuf = - try - Docstrings.init (); - Lexer.init (); - let ast = parsing_fun Lexer.token lexbuf in - Parsing.clear_parser(); - Docstrings.warn_bad_docstrings (); - ast - with - | Lexer.Error(Lexer.Illegal_character _, _) as err - when !Location.input_name = "//toplevel//"-> - skip_phrase lexbuf; - raise err - | Syntaxerr.Error _ as err - when !Location.input_name = "//toplevel//" -> - maybe_skip_phrase lexbuf; - raise err - | Parsing.Parse_error | Syntaxerr.Escape_error -> - let loc = Location.curr lexbuf in - if !Location.input_name = "//toplevel//" - then maybe_skip_phrase lexbuf; - raise(Syntaxerr.Error(Syntaxerr.Other loc)) - -let implementation = wrap Parser.implementation -and interface = wrap Parser.interface -and toplevel_phrase = wrap Parser.toplevel_phrase -and use_file = wrap Parser.use_file -and core_type = wrap Parser.parse_core_type -and expression = wrap Parser.parse_expression -and pattern = wrap Parser.parse_pattern diff --git a/analysis/vendor/compiler-libs-406/parser.ml b/analysis/vendor/compiler-libs-406/parser.ml deleted file mode 100644 index 64ec76cca..000000000 --- a/analysis/vendor/compiler-libs-406/parser.ml +++ /dev/null @@ -1,13378 +0,0 @@ -type token = - | AMPERAMPER - | AMPERSAND - | AND - | AS - | ASSERT - | BACKQUOTE - | BANG - | BAR - | BARBAR - | BARRBRACKET - | BEGIN - | CHAR of (char) - | CLASS - | COLON - | COLONCOLON - | COLONEQUAL - | COLONGREATER - | COMMA - | CONSTRAINT - | DO - | DONE - | DOT - | DOTDOT - | DOWNTO - | ELSE - | END - | EOF - | EQUAL - | EXCEPTION - | EXTERNAL - | FALSE - | FLOAT of (string * char option) - | FOR - | FUN - | FUNCTION - | FUNCTOR - | GREATER - | GREATERRBRACE - | GREATERRBRACKET - | IF - | IN - | INCLUDE - | INFIXOP0 of (string) - | INFIXOP1 of (string) - | INFIXOP2 of (string) - | INFIXOP3 of (string) - | INFIXOP4 of (string) - | DOTOP of (string) - | INHERIT - | INITIALIZER - | INT of (string * char option) - | LABEL of (string) - | LAZY - | LBRACE - | LBRACELESS - | LBRACKET - | LBRACKETBAR - | LBRACKETLESS - | LBRACKETGREATER - | LBRACKETPERCENT - | LBRACKETPERCENTPERCENT - | LESS - | LESSMINUS - | LET - | LIDENT of (string) - | LPAREN - | LBRACKETAT - | LBRACKETATAT - | LBRACKETATATAT - | MATCH - | METHOD - | MINUS - | MINUSDOT - | MINUSGREATER - | MODULE - | MUTABLE - | NEW - | NONREC - | OBJECT - | OF - | OPEN - | OPTLABEL of (string) - | OR - | PERCENT - | PLUS - | PLUSDOT - | PLUSEQ - | PREFIXOP of (string) - | PRIVATE - | QUESTION - | QUOTE - | RBRACE - | RBRACKET - | REC - | RPAREN - | SEMI - | SEMISEMI - | HASH - | HASHOP of (string) - | SIG - | STAR - | STRING of (string * string option) - | STRUCT - | THEN - | TILDE - | TO - | TRUE - | TRY - | TYPE - | UIDENT of (string) - | UNDERSCORE - | VAL - | VIRTUAL - | WHEN - | WHILE - | WITH - | COMMENT of (string * Location.t) - | DOCSTRING of (Docstrings.docstring) - | EOL - -open Parsing;; -let _ = parse_error;; -# 19 "parsing/parser.mly" -open Location -open Asttypes -open Longident -open Parsetree -open Ast_helper -open Docstrings - -let mktyp d = Typ.mk ~loc:(symbol_rloc()) d -let mkpat d = Pat.mk ~loc:(symbol_rloc()) d -let mkexp d = Exp.mk ~loc:(symbol_rloc()) d -let mkmty ?attrs d = Mty.mk ~loc:(symbol_rloc()) ?attrs d -let mksig d = Sig.mk ~loc:(symbol_rloc()) d -let mkmod ?attrs d = Mod.mk ~loc:(symbol_rloc()) ?attrs d -let mkstr d = Str.mk ~loc:(symbol_rloc()) d -let mkclass ?attrs d = Cl.mk ~loc:(symbol_rloc()) ?attrs d -let mkcty ?attrs d = Cty.mk ~loc:(symbol_rloc()) ?attrs d -let mkctf ?attrs ?docs d = - Ctf.mk ~loc:(symbol_rloc()) ?attrs ?docs d -let mkcf ?attrs ?docs d = - Cf.mk ~loc:(symbol_rloc()) ?attrs ?docs d - -let mkrhs rhs pos = mkloc rhs (rhs_loc pos) - -let reloc_pat x = { x with ppat_loc = symbol_rloc () };; -let reloc_exp x = { x with pexp_loc = symbol_rloc () };; - -let mkoperator name pos = - let loc = rhs_loc pos in - Exp.mk ~loc (Pexp_ident(mkloc (Lident name) loc)) - -let mkpatvar name pos = - Pat.mk ~loc:(rhs_loc pos) (Ppat_var (mkrhs name pos)) - -(* - Ghost expressions and patterns: - expressions and patterns that do not appear explicitly in the - source file they have the loc_ghost flag set to true. - Then the profiler will not try to instrument them and the - -annot option will not try to display their type. - - Every grammar rule that generates an element with a location must - make at most one non-ghost element, the topmost one. - - How to tell whether your location must be ghost: - A location corresponds to a range of characters in the source file. - If the location contains a piece of code that is syntactically - valid (according to the documentation), and corresponds to the - AST node, then the location must be real; in all other cases, - it must be ghost. -*) -let ghexp d = Exp.mk ~loc:(symbol_gloc ()) d -let ghpat d = Pat.mk ~loc:(symbol_gloc ()) d -let ghtyp d = Typ.mk ~loc:(symbol_gloc ()) d -let ghloc d = { txt = d; loc = symbol_gloc () } -let ghstr d = Str.mk ~loc:(symbol_gloc()) d -let ghsig d = Sig.mk ~loc:(symbol_gloc()) d - -let mkinfix arg1 name arg2 = - mkexp(Pexp_apply(mkoperator name 2, [Nolabel, arg1; Nolabel, arg2])) - -let neg_string f = - if String.length f > 0 && f.[0] = '-' - then String.sub f 1 (String.length f - 1) - else "-" ^ f - -let mkuminus name arg = - match name, arg.pexp_desc with - | "-", Pexp_constant(Pconst_integer (n,m)) -> - mkexp(Pexp_constant(Pconst_integer(neg_string n,m))) - | ("-" | "-."), Pexp_constant(Pconst_float (f, m)) -> - mkexp(Pexp_constant(Pconst_float(neg_string f, m))) - | _ -> - mkexp(Pexp_apply(mkoperator ("~" ^ name) 1, [Nolabel, arg])) - -let mkuplus name arg = - let desc = arg.pexp_desc in - match name, desc with - | "+", Pexp_constant(Pconst_integer _) - | ("+" | "+."), Pexp_constant(Pconst_float _) -> mkexp desc - | _ -> - mkexp(Pexp_apply(mkoperator ("~" ^ name) 1, [Nolabel, arg])) - -let mkexp_cons consloc args loc = - Exp.mk ~loc (Pexp_construct(mkloc (Lident "::") consloc, Some args)) - -let mkpat_cons consloc args loc = - Pat.mk ~loc (Ppat_construct(mkloc (Lident "::") consloc, Some args)) - -let rec mktailexp nilloc = function - [] -> - let loc = { nilloc with loc_ghost = true } in - let nil = { txt = Lident "[]"; loc = loc } in - Exp.mk ~loc (Pexp_construct (nil, None)) - | e1 :: el -> - let exp_el = mktailexp nilloc el in - let loc = {loc_start = e1.pexp_loc.loc_start; - loc_end = exp_el.pexp_loc.loc_end; - loc_ghost = true} - in - let arg = Exp.mk ~loc (Pexp_tuple [e1; exp_el]) in - mkexp_cons {loc with loc_ghost = true} arg loc - -let rec mktailpat nilloc = function - [] -> - let loc = { nilloc with loc_ghost = true } in - let nil = { txt = Lident "[]"; loc = loc } in - Pat.mk ~loc (Ppat_construct (nil, None)) - | p1 :: pl -> - let pat_pl = mktailpat nilloc pl in - let loc = {loc_start = p1.ppat_loc.loc_start; - loc_end = pat_pl.ppat_loc.loc_end; - loc_ghost = true} - in - let arg = Pat.mk ~loc (Ppat_tuple [p1; pat_pl]) in - mkpat_cons {loc with loc_ghost = true} arg loc - -let mkstrexp e attrs = - { pstr_desc = Pstr_eval (e, attrs); pstr_loc = e.pexp_loc } - -let mkexp_constraint e (t1, t2) = - match t1, t2 with - | Some t, None -> ghexp(Pexp_constraint(e, t)) - | _, Some t -> ghexp(Pexp_coerce(e, t1, t)) - | None, None -> assert false - -let mkexp_opt_constraint e = function - | None -> e - | Some constraint_ -> mkexp_constraint e constraint_ - -let mkpat_opt_constraint p = function - | None -> p - | Some typ -> mkpat (Ppat_constraint(p, typ)) - -let array_function str name = - ghloc (Ldot(Lident str, (if !Clflags.fast then "unsafe_" ^ name else name))) - -let syntax_error () = - raise Syntaxerr.Escape_error - -let unclosed opening_name opening_num closing_name closing_num = - raise(Syntaxerr.Error(Syntaxerr.Unclosed(rhs_loc opening_num, opening_name, - rhs_loc closing_num, closing_name))) - -let expecting pos nonterm = - raise Syntaxerr.(Error(Expecting(rhs_loc pos, nonterm))) - -let not_expecting pos nonterm = - raise Syntaxerr.(Error(Not_expecting(rhs_loc pos, nonterm))) - -let bigarray_function str name = - ghloc (Ldot(Ldot(Lident "Bigarray", str), name)) - -let bigarray_untuplify = function - { pexp_desc = Pexp_tuple explist; pexp_loc = _ } -> explist - | exp -> [exp] - -let bigarray_get arr arg = - let get = if !Clflags.fast then "unsafe_get" else "get" in - match bigarray_untuplify arg with - [c1] -> - mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Array1" get)), - [Nolabel, arr; Nolabel, c1])) - | [c1;c2] -> - mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Array2" get)), - [Nolabel, arr; Nolabel, c1; Nolabel, c2])) - | [c1;c2;c3] -> - mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Array3" get)), - [Nolabel, arr; Nolabel, c1; Nolabel, c2; Nolabel, c3])) - | coords -> - mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Genarray" "get")), - [Nolabel, arr; Nolabel, ghexp(Pexp_array coords)])) - -let bigarray_set arr arg newval = - let set = if !Clflags.fast then "unsafe_set" else "set" in - match bigarray_untuplify arg with - [c1] -> - mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Array1" set)), - [Nolabel, arr; Nolabel, c1; Nolabel, newval])) - | [c1;c2] -> - mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Array2" set)), - [Nolabel, arr; Nolabel, c1; - Nolabel, c2; Nolabel, newval])) - | [c1;c2;c3] -> - mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Array3" set)), - [Nolabel, arr; Nolabel, c1; - Nolabel, c2; Nolabel, c3; Nolabel, newval])) - | coords -> - mkexp(Pexp_apply(ghexp(Pexp_ident(bigarray_function "Genarray" "set")), - [Nolabel, arr; - Nolabel, ghexp(Pexp_array coords); - Nolabel, newval])) - -let lapply p1 p2 = - if !Clflags.applicative_functors - then Lapply(p1, p2) - else raise (Syntaxerr.Error(Syntaxerr.Applicative_path (symbol_rloc()))) - -let exp_of_label lbl pos = - mkexp (Pexp_ident(mkrhs (Lident(Longident.last lbl)) pos)) - -let pat_of_label lbl pos = - mkpat (Ppat_var (mkrhs (Longident.last lbl) pos)) - -let mk_newtypes newtypes exp = - List.fold_right (fun newtype exp -> mkexp (Pexp_newtype (newtype, exp))) - newtypes exp - -let wrap_type_annotation newtypes core_type body = - let exp = mkexp(Pexp_constraint(body,core_type)) in - let exp = mk_newtypes newtypes exp in - (exp, ghtyp(Ptyp_poly(newtypes, Typ.varify_constructors newtypes core_type))) - -let wrap_exp_attrs body (ext, attrs) = - (* todo: keep exact location for the entire attribute *) - let body = {body with pexp_attributes = attrs @ body.pexp_attributes} in - match ext with - | None -> body - | Some id -> ghexp(Pexp_extension (id, PStr [mkstrexp body []])) - -let mkexp_attrs d attrs = - wrap_exp_attrs (mkexp d) attrs - -let wrap_typ_attrs typ (ext, attrs) = - (* todo: keep exact location for the entire attribute *) - let typ = {typ with ptyp_attributes = attrs @ typ.ptyp_attributes} in - match ext with - | None -> typ - | Some id -> ghtyp(Ptyp_extension (id, PTyp typ)) - -let mktyp_attrs d attrs = - wrap_typ_attrs (mktyp d) attrs - -let wrap_pat_attrs pat (ext, attrs) = - (* todo: keep exact location for the entire attribute *) - let pat = {pat with ppat_attributes = attrs @ pat.ppat_attributes} in - match ext with - | None -> pat - | Some id -> ghpat(Ppat_extension (id, PPat (pat, None))) - -let mkpat_attrs d attrs = - wrap_pat_attrs (mkpat d) attrs - -let wrap_class_attrs body attrs = - {body with pcl_attributes = attrs @ body.pcl_attributes} -let wrap_class_type_attrs body attrs = - {body with pcty_attributes = attrs @ body.pcty_attributes} -let wrap_mod_attrs body attrs = - {body with pmod_attributes = attrs @ body.pmod_attributes} -let wrap_mty_attrs body attrs = - {body with pmty_attributes = attrs @ body.pmty_attributes} - -let wrap_str_ext body ext = - match ext with - | None -> body - | Some id -> ghstr(Pstr_extension ((id, PStr [body]), [])) - -let mkstr_ext d ext = - wrap_str_ext (mkstr d) ext - -let wrap_sig_ext body ext = - match ext with - | None -> body - | Some id -> ghsig(Psig_extension ((id, PSig [body]), [])) - -let mksig_ext d ext = - wrap_sig_ext (mksig d) ext - -let text_str pos = Str.text (rhs_text pos) -let text_sig pos = Sig.text (rhs_text pos) -let text_cstr pos = Cf.text (rhs_text pos) -let text_csig pos = Ctf.text (rhs_text pos) -let text_def pos = [Ptop_def (Str.text (rhs_text pos))] - -let extra_text text pos items = - let pre_extras = rhs_pre_extra_text pos in - let post_extras = rhs_post_extra_text pos in - text pre_extras @ items @ text post_extras - -let extra_str pos items = extra_text Str.text pos items -let extra_sig pos items = extra_text Sig.text pos items -let extra_cstr pos items = extra_text Cf.text pos items -let extra_csig pos items = extra_text Ctf.text pos items -let extra_def pos items = - extra_text (fun txt -> [Ptop_def (Str.text txt)]) pos items - -let extra_rhs_core_type ct ~pos = - let docs = rhs_info pos in - { ct with ptyp_attributes = add_info_attrs docs ct.ptyp_attributes } - -type let_binding = - { lb_pattern: pattern; - lb_expression: expression; - lb_attributes: attributes; - lb_docs: docs Lazy.t; - lb_text: text Lazy.t; - lb_loc: Location.t; } - -type let_bindings = - { lbs_bindings: let_binding list; - lbs_rec: rec_flag; - lbs_extension: string Asttypes.loc option; - lbs_loc: Location.t } - -let mklb first (p, e) attrs = - { lb_pattern = p; - lb_expression = e; - lb_attributes = attrs; - lb_docs = symbol_docs_lazy (); - lb_text = if first then empty_text_lazy - else symbol_text_lazy (); - lb_loc = symbol_rloc (); } - -let mklbs ext rf lb = - { lbs_bindings = [lb]; - lbs_rec = rf; - lbs_extension = ext ; - lbs_loc = symbol_rloc (); } - -let addlb lbs lb = - { lbs with lbs_bindings = lb :: lbs.lbs_bindings } - -let val_of_let_bindings lbs = - let bindings = - List.map - (fun lb -> - Vb.mk ~loc:lb.lb_loc ~attrs:lb.lb_attributes - ~docs:(Lazy.force lb.lb_docs) - ~text:(Lazy.force lb.lb_text) - lb.lb_pattern lb.lb_expression) - lbs.lbs_bindings - in - let str = mkstr(Pstr_value(lbs.lbs_rec, List.rev bindings)) in - match lbs.lbs_extension with - | None -> str - | Some id -> ghstr (Pstr_extension((id, PStr [str]), [])) - -let expr_of_let_bindings lbs body = - let bindings = - List.map - (fun lb -> - Vb.mk ~loc:lb.lb_loc ~attrs:lb.lb_attributes - lb.lb_pattern lb.lb_expression) - lbs.lbs_bindings - in - mkexp_attrs (Pexp_let(lbs.lbs_rec, List.rev bindings, body)) - (lbs.lbs_extension, []) - -let class_of_let_bindings lbs body = - let bindings = - List.map - (fun lb -> - Vb.mk ~loc:lb.lb_loc ~attrs:lb.lb_attributes - lb.lb_pattern lb.lb_expression) - lbs.lbs_bindings - in - if lbs.lbs_extension <> None then - raise Syntaxerr.(Error(Not_expecting(lbs.lbs_loc, "extension"))); - mkclass(Pcl_let (lbs.lbs_rec, List.rev bindings, body)) - - -(* Alternatively, we could keep the generic module type in the Parsetree - and extract the package type during type-checking. In that case, - the assertions below should be turned into explicit checks. *) -let package_type_of_module_type pmty = - let err loc s = - raise (Syntaxerr.Error (Syntaxerr.Invalid_package_type (loc, s))) - in - let map_cstr = function - | Pwith_type (lid, ptyp) -> - let loc = ptyp.ptype_loc in - if ptyp.ptype_params <> [] then - err loc "parametrized types are not supported"; - if ptyp.ptype_cstrs <> [] then - err loc "constrained types are not supported"; - if ptyp.ptype_private <> Public then - err loc "private types are not supported"; - - (* restrictions below are checked by the 'with_constraint' rule *) - assert (ptyp.ptype_kind = Ptype_abstract); - assert (ptyp.ptype_attributes = []); - let ty = - match ptyp.ptype_manifest with - | Some ty -> ty - | None -> assert false - in - (lid, ty) - | _ -> - err pmty.pmty_loc "only 'with type t =' constraints are supported" - in - match pmty with - | {pmty_desc = Pmty_ident lid} -> (lid, []) - | {pmty_desc = Pmty_with({pmty_desc = Pmty_ident lid}, cstrs)} -> - (lid, List.map map_cstr cstrs) - | _ -> - err pmty.pmty_loc - "only module type identifier and 'with type' constraints are supported" - - -# 524 "parsing/parser.ml" -let yytransl_const = [| - 257 (* AMPERAMPER *); - 258 (* AMPERSAND *); - 259 (* AND *); - 260 (* AS *); - 261 (* ASSERT *); - 262 (* BACKQUOTE *); - 263 (* BANG *); - 264 (* BAR *); - 265 (* BARBAR *); - 266 (* BARRBRACKET *); - 267 (* BEGIN *); - 269 (* CLASS *); - 270 (* COLON *); - 271 (* COLONCOLON *); - 272 (* COLONEQUAL *); - 273 (* COLONGREATER *); - 274 (* COMMA *); - 275 (* CONSTRAINT *); - 276 (* DO *); - 277 (* DONE *); - 278 (* DOT *); - 279 (* DOTDOT *); - 280 (* DOWNTO *); - 281 (* ELSE *); - 282 (* END *); - 0 (* EOF *); - 283 (* EQUAL *); - 284 (* EXCEPTION *); - 285 (* EXTERNAL *); - 286 (* FALSE *); - 288 (* FOR *); - 289 (* FUN *); - 290 (* FUNCTION *); - 291 (* FUNCTOR *); - 292 (* GREATER *); - 293 (* GREATERRBRACE *); - 294 (* GREATERRBRACKET *); - 295 (* IF *); - 296 (* IN *); - 297 (* INCLUDE *); - 304 (* INHERIT *); - 305 (* INITIALIZER *); - 308 (* LAZY *); - 309 (* LBRACE *); - 310 (* LBRACELESS *); - 311 (* LBRACKET *); - 312 (* LBRACKETBAR *); - 313 (* LBRACKETLESS *); - 314 (* LBRACKETGREATER *); - 315 (* LBRACKETPERCENT *); - 316 (* LBRACKETPERCENTPERCENT *); - 317 (* LESS *); - 318 (* LESSMINUS *); - 319 (* LET *); - 321 (* LPAREN *); - 322 (* LBRACKETAT *); - 323 (* LBRACKETATAT *); - 324 (* LBRACKETATATAT *); - 325 (* MATCH *); - 326 (* METHOD *); - 327 (* MINUS *); - 328 (* MINUSDOT *); - 329 (* MINUSGREATER *); - 330 (* MODULE *); - 331 (* MUTABLE *); - 332 (* NEW *); - 333 (* NONREC *); - 334 (* OBJECT *); - 335 (* OF *); - 336 (* OPEN *); - 338 (* OR *); - 339 (* PERCENT *); - 340 (* PLUS *); - 341 (* PLUSDOT *); - 342 (* PLUSEQ *); - 344 (* PRIVATE *); - 345 (* QUESTION *); - 346 (* QUOTE *); - 347 (* RBRACE *); - 348 (* RBRACKET *); - 349 (* REC *); - 350 (* RPAREN *); - 351 (* SEMI *); - 352 (* SEMISEMI *); - 353 (* HASH *); - 355 (* SIG *); - 356 (* STAR *); - 358 (* STRUCT *); - 359 (* THEN *); - 360 (* TILDE *); - 361 (* TO *); - 362 (* TRUE *); - 363 (* TRY *); - 364 (* TYPE *); - 366 (* UNDERSCORE *); - 367 (* VAL *); - 368 (* VIRTUAL *); - 369 (* WHEN *); - 370 (* WHILE *); - 371 (* WITH *); - 374 (* EOL *); - 0|] - -let yytransl_block = [| - 268 (* CHAR *); - 287 (* FLOAT *); - 298 (* INFIXOP0 *); - 299 (* INFIXOP1 *); - 300 (* INFIXOP2 *); - 301 (* INFIXOP3 *); - 302 (* INFIXOP4 *); - 303 (* DOTOP *); - 306 (* INT *); - 307 (* LABEL *); - 320 (* LIDENT *); - 337 (* OPTLABEL *); - 343 (* PREFIXOP *); - 354 (* HASHOP *); - 357 (* STRING *); - 365 (* UIDENT *); - 372 (* COMMENT *); - 373 (* DOCSTRING *); - 0|] - -let yylhs = "\255\255\ -\001\000\002\000\003\000\003\000\003\000\010\000\010\000\014\000\ -\014\000\004\000\016\000\016\000\017\000\017\000\017\000\017\000\ -\017\000\017\000\017\000\005\000\006\000\007\000\020\000\020\000\ -\021\000\021\000\023\000\023\000\024\000\024\000\024\000\024\000\ -\024\000\024\000\024\000\024\000\024\000\027\000\027\000\027\000\ -\027\000\027\000\027\000\027\000\027\000\027\000\027\000\027\000\ -\008\000\008\000\032\000\032\000\032\000\015\000\015\000\015\000\ -\015\000\015\000\015\000\015\000\015\000\015\000\015\000\015\000\ -\015\000\015\000\015\000\015\000\045\000\049\000\049\000\049\000\ -\039\000\040\000\040\000\050\000\051\000\022\000\022\000\022\000\ -\022\000\022\000\022\000\022\000\022\000\022\000\022\000\022\000\ -\009\000\009\000\009\000\054\000\054\000\054\000\054\000\054\000\ -\054\000\054\000\054\000\054\000\054\000\054\000\054\000\054\000\ -\054\000\054\000\042\000\060\000\063\000\063\000\063\000\057\000\ -\058\000\059\000\059\000\064\000\065\000\066\000\066\000\041\000\ -\043\000\043\000\068\000\069\000\072\000\072\000\072\000\071\000\ -\071\000\077\000\077\000\073\000\073\000\073\000\073\000\073\000\ -\073\000\073\000\078\000\078\000\078\000\078\000\078\000\078\000\ -\078\000\078\000\082\000\083\000\083\000\083\000\084\000\084\000\ -\085\000\085\000\085\000\085\000\085\000\085\000\085\000\086\000\ -\086\000\087\000\087\000\087\000\087\000\088\000\088\000\088\000\ -\088\000\088\000\074\000\074\000\074\000\074\000\074\000\097\000\ -\097\000\097\000\097\000\097\000\097\000\097\000\100\000\101\000\ -\101\000\102\000\102\000\103\000\103\000\103\000\103\000\103\000\ -\103\000\104\000\104\000\104\000\106\000\089\000\061\000\061\000\ -\107\000\108\000\044\000\044\000\109\000\110\000\012\000\012\000\ -\012\000\012\000\075\000\075\000\075\000\075\000\075\000\075\000\ -\075\000\075\000\116\000\116\000\113\000\113\000\112\000\112\000\ -\114\000\115\000\115\000\030\000\030\000\030\000\030\000\030\000\ -\030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ -\030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ -\030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ -\030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ -\030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ -\030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ -\030\000\030\000\030\000\030\000\030\000\030\000\118\000\118\000\ -\118\000\118\000\118\000\118\000\118\000\118\000\118\000\118\000\ -\118\000\118\000\118\000\118\000\118\000\118\000\118\000\118\000\ -\118\000\118\000\118\000\118\000\118\000\118\000\118\000\118\000\ -\118\000\118\000\118\000\118\000\118\000\118\000\118\000\118\000\ -\118\000\118\000\118\000\118\000\118\000\118\000\118\000\118\000\ -\118\000\118\000\118\000\118\000\118\000\118\000\118\000\118\000\ -\118\000\118\000\118\000\118\000\118\000\118\000\118\000\118\000\ -\118\000\118\000\118\000\118\000\118\000\118\000\079\000\079\000\ -\136\000\136\000\137\000\137\000\137\000\137\000\138\000\096\000\ -\096\000\139\000\139\000\139\000\139\000\139\000\139\000\033\000\ -\033\000\144\000\145\000\147\000\147\000\095\000\095\000\095\000\ -\121\000\121\000\148\000\148\000\148\000\122\000\122\000\122\000\ -\122\000\123\000\123\000\132\000\132\000\150\000\150\000\150\000\ -\151\000\151\000\135\000\135\000\153\000\153\000\133\000\133\000\ -\092\000\092\000\092\000\092\000\092\000\152\000\152\000\019\000\ -\019\000\019\000\019\000\019\000\019\000\019\000\019\000\019\000\ -\019\000\142\000\142\000\142\000\142\000\142\000\142\000\142\000\ -\142\000\142\000\155\000\155\000\155\000\155\000\117\000\117\000\ -\143\000\143\000\143\000\143\000\143\000\143\000\143\000\143\000\ -\143\000\143\000\143\000\143\000\143\000\143\000\143\000\143\000\ -\143\000\143\000\143\000\143\000\143\000\143\000\159\000\159\000\ -\159\000\159\000\159\000\159\000\159\000\154\000\154\000\154\000\ -\156\000\156\000\156\000\161\000\161\000\160\000\160\000\160\000\ -\160\000\162\000\162\000\163\000\163\000\035\000\164\000\164\000\ -\034\000\036\000\036\000\165\000\166\000\170\000\170\000\169\000\ -\169\000\169\000\169\000\169\000\169\000\169\000\169\000\169\000\ -\169\000\169\000\168\000\168\000\168\000\173\000\174\000\174\000\ -\176\000\176\000\177\000\175\000\175\000\175\000\178\000\076\000\ -\076\000\171\000\171\000\171\000\179\000\180\000\038\000\038\000\ -\056\000\119\000\182\000\182\000\182\000\182\000\183\000\183\000\ -\172\000\172\000\172\000\185\000\186\000\037\000\055\000\188\000\ -\188\000\188\000\188\000\188\000\188\000\189\000\189\000\189\000\ -\190\000\191\000\192\000\193\000\053\000\053\000\194\000\194\000\ -\194\000\194\000\195\000\195\000\141\000\141\000\093\000\093\000\ -\187\000\187\000\018\000\018\000\196\000\196\000\198\000\198\000\ -\198\000\198\000\198\000\149\000\149\000\199\000\199\000\199\000\ -\199\000\199\000\199\000\199\000\199\000\199\000\199\000\199\000\ -\199\000\199\000\199\000\199\000\199\000\199\000\199\000\199\000\ -\031\000\202\000\202\000\203\000\203\000\201\000\201\000\205\000\ -\205\000\206\000\206\000\204\000\204\000\098\000\098\000\080\000\ -\080\000\184\000\184\000\200\000\200\000\200\000\200\000\200\000\ -\200\000\200\000\209\000\207\000\208\000\090\000\131\000\131\000\ -\131\000\131\000\157\000\157\000\157\000\157\000\157\000\067\000\ -\067\000\140\000\140\000\140\000\140\000\140\000\210\000\210\000\ -\210\000\210\000\210\000\210\000\210\000\210\000\210\000\210\000\ -\210\000\210\000\210\000\210\000\210\000\210\000\210\000\210\000\ -\210\000\210\000\210\000\210\000\210\000\210\000\210\000\210\000\ -\210\000\210\000\210\000\181\000\181\000\181\000\181\000\181\000\ -\181\000\130\000\130\000\124\000\124\000\124\000\124\000\124\000\ -\124\000\124\000\129\000\129\000\158\000\158\000\025\000\025\000\ -\197\000\197\000\197\000\052\000\052\000\099\000\099\000\081\000\ -\081\000\011\000\011\000\011\000\011\000\011\000\011\000\011\000\ -\125\000\146\000\146\000\167\000\167\000\126\000\126\000\094\000\ -\094\000\091\000\091\000\070\000\070\000\105\000\105\000\105\000\ -\105\000\105\000\062\000\062\000\120\000\120\000\134\000\134\000\ -\127\000\127\000\128\000\128\000\211\000\211\000\211\000\211\000\ -\211\000\211\000\211\000\211\000\211\000\211\000\211\000\211\000\ -\211\000\211\000\211\000\211\000\211\000\211\000\211\000\211\000\ -\211\000\211\000\211\000\211\000\211\000\211\000\211\000\211\000\ -\211\000\211\000\211\000\211\000\211\000\211\000\211\000\211\000\ -\211\000\211\000\211\000\211\000\211\000\211\000\211\000\211\000\ -\211\000\211\000\211\000\211\000\211\000\211\000\211\000\111\000\ -\111\000\028\000\213\000\047\000\013\000\013\000\026\000\026\000\ -\048\000\048\000\048\000\029\000\046\000\212\000\212\000\212\000\ -\212\000\212\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000" - -let yylen = "\002\000\ -\002\000\002\000\002\000\002\000\001\000\002\000\001\000\000\000\ -\002\000\001\000\001\000\003\000\001\000\002\000\004\000\003\000\ -\003\000\002\000\002\000\002\000\002\000\002\000\002\000\005\000\ -\001\000\001\000\002\000\001\000\001\000\004\000\004\000\005\000\ -\002\000\003\000\001\000\002\000\001\000\005\000\005\000\003\000\ -\003\000\005\000\007\000\009\000\007\000\006\000\006\000\005\000\ -\003\000\001\000\000\000\002\000\002\000\001\000\001\000\001\000\ -\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ -\001\000\001\000\002\000\001\000\004\000\002\000\004\000\002\000\ -\005\000\001\000\002\000\006\000\005\000\001\000\004\000\004\000\ -\005\000\003\000\003\000\005\000\003\000\003\000\001\000\002\000\ -\000\000\002\000\002\000\001\000\001\000\001\000\001\000\001\000\ -\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ -\002\000\001\000\005\000\004\000\002\000\006\000\003\000\005\000\ -\006\000\001\000\002\000\007\000\006\000\000\000\002\000\006\000\ -\001\000\002\000\007\000\007\000\002\000\004\000\002\000\000\000\ -\003\000\003\000\002\000\001\000\003\000\002\000\003\000\007\000\ -\002\000\001\000\004\000\001\000\004\000\004\000\005\000\005\000\ -\003\000\003\000\002\000\003\000\005\000\000\000\000\000\002\000\ -\006\000\003\000\003\000\004\000\004\000\002\000\001\000\002\000\ -\000\000\007\000\007\000\006\000\007\000\007\000\007\000\005\000\ -\008\000\011\000\001\000\006\000\004\000\005\000\003\000\004\000\ -\001\000\004\000\004\000\002\000\001\000\007\000\002\000\003\000\ -\000\000\000\000\002\000\004\000\004\000\007\000\004\000\002\000\ -\001\000\005\000\005\000\003\000\003\000\003\000\001\000\002\000\ -\008\000\008\000\001\000\002\000\009\000\008\000\001\000\002\000\ -\003\000\005\000\005\000\002\000\005\000\002\000\004\000\002\000\ -\002\000\001\000\001\000\001\000\000\000\002\000\001\000\003\000\ -\001\000\001\000\003\000\001\000\002\000\003\000\007\000\006\000\ -\007\000\004\000\004\000\007\000\006\000\006\000\005\000\001\000\ -\002\000\002\000\007\000\005\000\006\000\010\000\003\000\003\000\ -\003\000\003\000\003\000\003\000\003\000\003\000\003\000\003\000\ -\003\000\003\000\003\000\003\000\003\000\003\000\003\000\003\000\ -\003\000\003\000\003\000\002\000\002\000\005\000\007\000\007\000\ -\007\000\007\000\007\000\007\000\009\000\009\000\009\000\003\000\ -\003\000\003\000\004\000\004\000\002\000\001\000\001\000\001\000\ -\001\000\001\000\003\000\003\000\004\000\003\000\004\000\004\000\ -\003\000\005\000\004\000\005\000\005\000\005\000\005\000\005\000\ -\005\000\005\000\005\000\005\000\005\000\005\000\007\000\007\000\ -\007\000\007\000\007\000\007\000\005\000\005\000\003\000\003\000\ -\005\000\005\000\004\000\004\000\002\000\006\000\004\000\006\000\ -\004\000\004\000\006\000\004\000\006\000\002\000\002\000\003\000\ -\003\000\003\000\002\000\005\000\004\000\005\000\003\000\003\000\ -\005\000\007\000\006\000\009\000\008\000\001\000\001\000\002\000\ -\001\000\001\000\002\000\002\000\002\000\002\000\001\000\001\000\ -\002\000\002\000\004\000\007\000\008\000\003\000\005\000\001\000\ -\002\000\005\000\004\000\001\000\003\000\002\000\002\000\005\000\ -\001\000\003\000\003\000\005\000\003\000\002\000\004\000\002\000\ -\005\000\003\000\003\000\003\000\001\000\001\000\003\000\002\000\ -\004\000\002\000\002\000\003\000\003\000\001\000\001\000\003\000\ -\002\000\004\000\002\000\002\000\002\000\001\000\000\000\003\000\ -\003\000\001\000\003\000\003\000\003\000\003\000\003\000\002\000\ -\001\000\003\000\003\000\001\000\003\000\003\000\003\000\003\000\ -\002\000\001\000\001\000\002\000\002\000\003\000\001\000\001\000\ -\001\000\001\000\003\000\001\000\001\000\002\000\001\000\003\000\ -\004\000\004\000\005\000\005\000\004\000\003\000\003\000\005\000\ -\005\000\004\000\005\000\007\000\007\000\001\000\003\000\003\000\ -\004\000\004\000\004\000\002\000\004\000\003\000\003\000\003\000\ -\003\000\003\000\003\000\001\000\003\000\001\000\002\000\004\000\ -\003\000\004\000\002\000\002\000\000\000\006\000\001\000\002\000\ -\008\000\001\000\002\000\008\000\007\000\003\000\000\000\000\000\ -\002\000\003\000\002\000\003\000\002\000\003\000\005\000\005\000\ -\005\000\007\000\000\000\001\000\003\000\002\000\001\000\003\000\ -\002\000\001\000\002\000\000\000\001\000\001\000\002\000\001\000\ -\003\000\001\000\001\000\002\000\003\000\004\000\001\000\007\000\ -\006\000\003\000\000\000\002\000\004\000\002\000\001\000\003\000\ -\001\000\001\000\002\000\005\000\007\000\009\000\009\000\001\000\ -\001\000\001\000\001\000\002\000\002\000\001\000\001\000\002\000\ -\003\000\004\000\004\000\005\000\001\000\003\000\006\000\005\000\ -\004\000\004\000\001\000\002\000\002\000\003\000\001\000\003\000\ -\001\000\003\000\001\000\002\000\001\000\004\000\001\000\006\000\ -\004\000\005\000\003\000\001\000\003\000\002\000\001\000\001\000\ -\002\000\004\000\003\000\002\000\002\000\003\000\005\000\003\000\ -\004\000\005\000\004\000\002\000\004\000\006\000\005\000\001\000\ -\001\000\001\000\003\000\001\000\001\000\005\000\002\000\001\000\ -\000\000\001\000\003\000\001\000\002\000\001\000\003\000\001\000\ -\003\000\001\000\003\000\002\000\002\000\001\000\001\000\001\000\ -\001\000\001\000\004\000\006\000\002\000\001\000\001\000\001\000\ -\001\000\001\000\001\000\002\000\002\000\002\000\002\000\001\000\ -\001\000\001\000\003\000\003\000\002\000\003\000\001\000\001\000\ -\001\000\001\000\001\000\001\000\003\000\004\000\003\000\004\000\ -\003\000\004\000\001\000\001\000\001\000\001\000\001\000\001\000\ -\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ -\001\000\001\000\001\000\001\000\002\000\002\000\003\000\001\000\ -\001\000\001\000\003\000\001\000\005\000\002\000\002\000\003\000\ -\001\000\001\000\001\000\003\000\001\000\003\000\001\000\003\000\ -\001\000\003\000\004\000\001\000\003\000\001\000\003\000\001\000\ -\003\000\002\000\003\000\003\000\003\000\003\000\003\000\003\000\ -\002\000\000\000\001\000\000\000\001\000\001\000\001\000\000\000\ -\001\000\000\000\001\000\000\000\001\000\000\000\001\000\001\000\ -\002\000\002\000\000\000\001\000\000\000\001\000\000\000\001\000\ -\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ -\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ -\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ -\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ -\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ -\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ -\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ -\003\000\004\000\004\000\004\000\000\000\002\000\000\000\002\000\ -\000\000\002\000\003\000\004\000\004\000\001\000\002\000\002\000\ -\002\000\004\000\002\000\002\000\002\000\002\000\002\000\002\000\ -\002\000" - -let yydefred = "\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\112\002\000\000\000\000\000\000\ -\169\002\114\002\000\000\000\000\000\000\000\000\000\000\111\002\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\217\002\218\002\000\000\000\000\ -\000\000\000\000\219\002\220\002\000\000\000\000\113\002\170\002\ -\000\000\000\000\175\002\030\001\000\000\000\000\035\003\000\000\ -\000\000\000\000\000\000\094\001\000\000\050\000\000\000\055\000\ -\056\000\000\000\058\000\059\000\060\000\000\000\062\000\063\000\ -\000\000\000\000\066\000\000\000\068\000\074\000\007\002\121\000\ -\000\000\203\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\031\001\032\001\162\002\112\001\226\001\000\000\000\000\000\000\ -\000\000\000\000\000\000\036\003\000\000\093\000\092\000\000\000\ -\100\000\101\000\000\000\000\000\106\000\000\000\095\000\096\000\ -\097\000\098\000\000\000\102\000\000\000\114\000\199\000\005\000\ -\000\000\037\003\000\000\000\000\000\000\007\000\000\000\013\000\ -\000\000\038\003\000\000\000\000\000\000\010\000\011\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\177\002\063\002\039\003\000\000\080\002\055\002\000\000\ -\064\002\051\002\000\000\000\000\000\000\040\003\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\122\002\000\000\000\000\ -\000\000\000\000\177\001\041\003\000\000\000\000\198\001\171\001\ -\000\000\000\000\115\002\175\001\176\001\000\000\161\001\000\000\ -\183\001\000\000\000\000\000\000\000\000\121\002\120\002\193\002\ -\079\001\033\001\034\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\133\001\000\000\083\001\110\002\000\000\ -\000\000\000\000\166\002\000\000\000\000\069\001\000\000\223\002\ -\224\002\225\002\226\002\227\002\228\002\229\002\230\002\231\002\ -\232\002\233\002\234\002\235\002\236\002\237\002\238\002\239\002\ -\240\002\241\002\242\002\243\002\244\002\245\002\246\002\247\002\ -\221\002\248\002\249\002\250\002\251\002\252\002\253\002\254\002\ -\255\002\000\003\001\003\002\003\003\003\004\003\005\003\006\003\ -\007\003\008\003\009\003\010\003\222\002\011\003\012\003\013\003\ -\014\003\015\003\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\125\002\152\002\151\002\000\000\150\002\000\000\153\002\ -\146\002\148\002\128\002\129\002\130\002\131\002\132\002\000\000\ -\147\002\000\000\000\000\000\000\149\002\155\002\000\000\000\000\ -\154\002\000\000\167\002\139\002\145\002\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\212\002\000\000\078\001\ -\052\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\ -\000\000\000\000\053\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\029\001\000\000\000\000\113\001\ -\000\000\227\001\000\000\075\000\000\000\122\000\000\000\204\000\ -\067\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\095\001\098\001\000\000\000\000\ -\000\000\012\001\013\001\000\000\000\000\000\000\000\000\090\000\ -\000\000\002\000\105\000\091\000\000\000\115\000\000\000\200\000\ -\000\000\003\000\004\000\006\000\009\000\014\000\000\000\000\000\ -\000\000\019\000\000\000\018\000\000\000\173\002\000\000\085\002\ -\000\000\000\000\214\002\000\000\076\002\000\000\106\002\068\002\ -\000\000\000\000\000\000\000\000\000\000\000\000\103\002\000\000\ -\000\000\000\000\000\000\000\000\000\000\062\002\184\002\000\000\ -\069\002\020\000\052\002\000\000\000\000\000\000\000\000\000\000\ -\000\000\065\002\021\000\000\000\000\000\171\002\000\000\000\000\ -\000\000\000\000\000\000\000\000\204\001\000\000\140\002\000\000\ -\144\002\000\000\000\000\142\002\127\002\000\000\117\002\116\002\ -\119\002\118\002\182\001\000\000\000\000\000\000\000\000\022\000\ -\160\001\000\000\172\001\173\001\000\000\000\000\000\000\000\000\ -\026\003\000\000\000\000\000\000\000\000\038\001\000\000\000\000\ -\205\002\000\000\160\002\000\000\000\000\161\002\156\002\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\218\000\180\001\181\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\035\000\037\000\000\000\000\000\000\000\ -\000\000\000\000\150\001\000\000\064\001\063\001\000\000\000\000\ -\082\001\081\001\000\000\139\001\000\000\000\000\000\000\000\000\ -\000\000\030\003\000\000\000\000\000\000\000\000\000\000\000\000\ -\195\002\000\000\168\002\000\000\000\000\000\000\126\002\000\000\ -\036\001\035\001\000\000\124\002\123\002\000\000\000\000\000\000\ -\000\000\000\000\080\001\000\000\000\000\151\000\000\000\000\000\ -\197\002\000\000\000\000\000\000\000\000\049\000\022\003\000\000\ -\000\000\000\000\000\000\000\000\176\002\163\002\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\209\000\000\000\000\000\230\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\103\001\ -\101\001\087\001\000\000\100\001\096\001\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\087\000\078\000\ -\180\002\000\000\000\000\000\000\000\000\000\000\000\000\191\002\ -\188\002\187\002\192\002\000\000\189\002\017\000\000\000\016\000\ -\012\000\084\002\000\000\082\002\000\000\087\002\072\002\000\000\ -\000\000\000\000\000\000\109\002\067\002\100\002\101\002\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\098\002\000\000\ -\174\002\178\002\000\000\000\000\000\000\070\002\159\001\174\001\ -\000\000\000\000\000\000\200\001\199\001\000\000\000\000\000\000\ -\000\000\000\000\191\001\000\000\190\001\153\001\152\001\158\001\ -\000\000\156\001\000\000\208\001\000\000\000\000\000\000\184\001\ -\000\000\179\001\000\000\027\003\024\003\000\000\000\000\000\000\ -\000\000\041\001\000\000\000\000\000\000\039\001\037\001\000\000\ -\000\000\000\000\157\002\000\000\158\002\000\000\000\000\000\000\ -\000\000\143\002\000\000\141\002\000\000\000\000\217\000\000\000\ -\219\000\000\000\220\000\214\000\225\000\000\000\212\000\000\000\ -\216\000\000\000\000\000\000\000\000\000\235\000\000\000\000\000\ -\121\001\000\000\000\000\000\000\000\000\000\000\000\000\069\000\ -\033\000\036\000\000\000\000\000\132\001\148\001\000\000\149\001\ -\000\000\000\000\135\001\000\000\140\001\000\000\074\001\073\001\ -\068\001\067\001\031\003\000\000\000\000\028\003\017\003\029\003\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\170\001\000\000\000\000\000\000\000\000\000\000\040\001\020\003\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\028\001\027\001\000\000\000\000\000\000\000\000\254\001\ -\253\001\000\000\244\001\000\000\000\000\000\000\000\000\000\000\ -\085\001\000\000\076\001\000\000\071\001\000\000\000\000\000\000\ -\043\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\108\000\088\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\015\000\000\000\073\002\088\002\ -\000\000\000\000\000\000\077\002\075\002\000\000\000\000\000\000\ -\049\002\000\000\000\000\000\000\000\000\000\000\066\002\000\000\ -\000\000\185\002\000\000\000\000\179\002\054\002\172\002\000\000\ -\000\000\000\000\217\001\000\000\202\001\201\001\205\001\203\001\ -\000\000\194\001\000\000\185\001\189\001\186\001\000\000\018\003\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\002\000\000\159\002\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\012\002\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\126\001\128\001\000\000\000\000\000\000\000\000\ -\028\000\000\000\000\000\041\000\000\000\040\000\000\000\034\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\114\001\ -\000\000\000\000\000\000\000\000\000\000\106\001\000\000\000\000\ -\000\000\000\000\000\000\169\001\000\000\000\000\138\002\136\002\ -\134\002\000\000\089\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\023\000\025\000\026\000\000\000\072\000\073\000\000\000\ -\148\000\000\000\000\000\000\000\000\000\000\000\000\000\159\000\ -\152\000\107\000\239\000\000\000\247\001\000\000\000\000\000\000\ -\000\000\250\001\246\001\000\000\000\000\019\003\066\001\065\001\ -\086\001\084\001\000\000\000\000\165\002\000\000\044\001\042\001\ -\210\000\115\001\000\000\000\000\000\000\000\000\000\000\062\001\ -\048\001\000\000\046\001\000\000\000\000\000\000\000\000\000\000\ -\054\001\000\000\050\001\000\000\052\001\000\000\000\000\000\000\ -\086\000\085\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\037\002\000\000\181\002\000\000\000\000\000\000\000\000\000\000\ -\112\000\000\000\000\000\000\000\083\002\090\002\000\000\074\002\ -\092\002\000\000\000\000\000\000\000\000\000\000\000\000\079\002\ -\071\002\000\000\099\002\000\000\216\002\216\001\000\000\195\001\ -\193\001\192\001\188\001\187\001\061\001\047\001\045\001\000\000\ -\000\000\000\000\053\001\049\001\051\001\000\000\000\000\129\000\ -\000\000\251\001\000\000\000\000\000\000\000\000\203\002\000\000\ -\000\000\017\002\000\000\000\000\000\000\000\000\009\002\000\000\ -\199\002\198\002\000\000\105\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\215\000\000\000\000\000\125\001\123\001\000\000\ -\122\001\000\000\000\000\027\000\000\000\000\000\031\000\030\000\ -\000\000\034\003\232\000\010\002\000\000\000\000\000\000\000\000\ -\118\001\000\000\000\000\116\001\119\001\000\000\163\001\162\001\ -\168\001\000\000\166\001\000\000\211\001\000\000\110\001\000\000\ -\000\000\091\001\000\000\000\000\000\000\120\000\076\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\158\000\000\000\000\000\245\001\000\000\231\001\000\000\ -\249\001\222\001\245\000\077\001\075\001\072\001\070\001\000\000\ -\231\001\077\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\080\000\079\000\000\000\000\000\000\000\000\000\113\000\111\000\ -\000\000\000\000\000\000\000\000\000\000\086\002\078\002\093\002\ -\050\002\046\002\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\001\002\255\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\177\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\138\000\000\000\000\000\000\000\ -\140\000\123\000\127\000\000\000\016\002\019\002\013\002\000\000\ -\008\002\000\000\000\000\000\000\236\000\000\000\222\000\213\000\ -\211\000\000\000\127\001\000\000\000\000\000\000\000\000\048\000\ -\000\000\000\000\042\000\039\000\038\000\231\000\233\000\000\000\ -\000\000\000\000\000\000\107\001\000\000\090\001\000\000\000\000\ -\149\000\000\000\000\000\000\000\000\000\000\000\155\000\000\000\ -\154\000\248\001\000\000\237\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\002\002\003\002\000\000\000\000\201\002\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\060\001\000\000\056\001\000\000\058\001\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\038\002\ -\116\000\000\000\000\000\117\000\000\000\091\002\108\002\197\001\ -\196\001\059\001\055\001\057\001\000\000\182\002\181\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\180\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\137\000\000\000\000\000\224\001\225\001\000\000\ -\129\001\124\001\046\000\000\000\047\000\000\000\000\000\000\000\ -\000\000\117\001\111\001\024\000\000\000\156\000\000\000\157\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\238\001\ -\000\000\000\000\000\000\000\000\004\002\000\000\000\000\228\001\ -\000\000\000\000\000\000\024\002\025\002\026\002\027\002\093\001\ -\000\000\229\001\124\000\000\000\000\000\000\000\000\000\201\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\030\002\031\002\000\000\205\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\186\000\000\000\000\000\000\000\175\000\ -\000\000\000\000\133\000\000\000\000\000\146\000\000\000\145\000\ -\000\000\000\000\000\000\000\000\000\000\043\000\045\000\000\000\ -\000\000\120\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\005\002\000\000\ -\230\001\000\000\000\000\000\000\022\002\028\002\029\002\092\001\ -\206\000\000\000\000\000\000\000\040\002\044\002\231\001\110\000\ -\000\000\023\002\032\002\202\000\183\002\176\000\000\000\000\000\ -\000\000\179\000\178\000\000\000\173\000\000\000\000\000\131\000\ -\139\000\000\000\000\000\142\000\141\000\000\000\246\000\000\000\ -\000\000\108\001\160\000\153\000\000\000\000\000\000\000\168\000\ -\000\000\000\000\000\000\000\000\006\002\241\001\000\000\000\000\ -\239\001\000\000\000\000\000\000\000\000\033\002\000\000\000\000\ -\174\000\184\000\000\000\000\000\000\000\000\000\000\000\193\000\ -\187\000\000\000\000\000\000\000\144\000\143\000\000\000\044\000\ -\109\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\164\000\000\000\000\000\000\000\000\000\034\002\035\002\ -\000\000\000\000\000\000\000\000\000\000\192\000\172\000\000\000\ -\021\002\166\000\167\000\000\000\000\000\000\000\000\000\000\000\ -\165\000\242\001\036\002\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\169\000\ -\000\000\191\000\188\000\209\002\210\002\000\000\000\000\000\000\ -\000\000\189\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\170\000\190\000\000\000\000\000" - -let yydgoto = "\008\000\ -\055\000\100\000\122\000\130\000\148\000\158\000\172\000\034\002\ -\101\000\123\000\131\000\057\000\072\001\126\000\058\000\134\000\ -\135\000\178\001\214\001\055\003\245\003\131\003\202\003\005\003\ -\059\000\233\001\012\002\101\001\060\000\061\000\132\003\062\000\ -\160\000\064\000\065\000\066\000\067\000\068\000\069\000\070\000\ -\071\000\072\000\073\000\074\000\075\000\076\000\077\000\025\001\ -\056\003\078\000\108\001\136\002\056\004\110\000\111\000\079\000\ -\113\000\114\000\115\000\116\000\117\000\063\001\112\003\118\000\ -\142\001\238\003\137\002\080\000\110\001\242\001\226\002\109\004\ -\007\005\251\004\253\002\169\003\211\005\008\005\123\001\179\001\ -\009\005\061\002\062\002\060\003\001\004\229\005\185\004\183\004\ -\051\005\081\000\112\004\155\004\070\006\066\005\156\004\187\003\ -\252\004\151\000\254\004\203\005\204\005\012\006\057\006\109\006\ -\105\006\241\005\119\000\144\001\082\000\112\001\019\001\190\003\ -\128\004\191\003\189\003\244\002\176\000\083\000\033\003\164\001\ -\000\003\254\002\084\000\085\000\086\000\123\004\087\000\088\000\ -\210\000\089\000\090\000\211\000\221\000\028\002\217\000\125\001\ -\126\001\121\002\037\003\091\000\071\006\039\003\181\000\092\000\ -\104\001\042\002\157\004\001\003\152\000\212\000\213\000\020\002\ -\218\000\182\000\183\000\042\003\184\000\153\000\185\000\201\001\ -\204\001\202\001\187\002\019\005\093\000\106\001\066\002\066\003\ -\191\004\071\005\067\005\113\004\067\003\006\004\068\003\011\004\ -\171\003\106\004\068\005\069\005\070\005\233\002\176\003\177\003\ -\114\004\115\004\128\003\171\005\193\005\172\005\173\005\174\005\ -\175\005\057\004\189\005\154\000\155\000\156\000\157\000\172\001\ -\154\002\155\002\156\002\074\004\121\003\071\004\173\001\174\001\ -\175\001\055\001\020\001\035\002\073\001" - -let yysindex = "\141\009\ -\228\067\075\007\170\051\083\051\204\051\233\070\196\074\000\000\ -\155\005\110\002\080\074\155\005\000\000\184\003\155\005\155\005\ -\000\000\000\000\155\005\155\005\155\005\155\005\155\005\000\000\ -\155\005\225\076\083\004\058\068\146\068\170\063\170\063\014\004\ -\000\000\024\061\170\063\155\005\000\000\000\000\087\005\155\005\ -\155\005\134\255\000\000\000\000\080\074\228\067\000\000\000\000\ -\155\005\155\005\000\000\000\000\155\005\155\005\000\000\160\000\ -\229\255\096\018\048\000\000\000\151\080\000\000\108\004\000\000\ -\000\000\195\000\000\000\000\000\000\000\075\001\000\000\000\000\ -\110\001\176\001\000\000\229\255\000\000\000\000\000\000\000\000\ -\171\000\000\000\105\076\218\001\080\074\080\074\233\070\233\070\ -\000\000\000\000\000\000\000\000\000\000\184\003\155\005\155\005\ -\087\005\075\007\155\005\000\000\049\003\000\000\000\000\195\000\ -\000\000\000\000\176\001\229\255\000\000\075\007\000\000\000\000\ -\000\000\000\000\128\002\000\000\177\002\000\000\000\000\000\000\ -\110\002\000\000\137\002\160\002\229\255\000\000\143\005\000\000\ -\035\052\000\000\171\007\229\255\171\007\000\000\000\000\151\044\ -\000\004\085\255\082\013\202\003\041\048\204\051\206\003\110\002\ -\058\003\000\000\000\000\000\000\070\000\000\000\000\000\222\003\ -\000\000\000\000\030\002\126\001\097\003\000\000\071\005\108\004\ -\155\005\155\005\208\003\199\073\006\074\000\000\136\065\090\003\ -\235\005\069\004\000\000\000\000\175\000\106\004\000\000\000\000\ -\196\074\196\074\000\000\000\000\000\000\162\004\000\000\154\004\ -\000\000\170\063\170\063\116\004\080\074\000\000\000\000\000\000\ -\000\000\000\000\000\000\231\068\155\005\147\004\023\002\116\003\ -\196\074\244\072\000\004\233\070\143\002\080\074\000\000\002\005\ -\070\001\197\003\149\255\000\000\241\004\000\000\000\000\092\005\ -\146\004\046\005\000\000\110\081\057\005\000\000\057\005\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\141\067\192\005\141\067\155\005\155\005\134\255\ -\162\005\000\000\000\000\000\000\080\074\000\000\154\005\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\203\006\ -\000\000\000\000\000\000\131\001\000\000\000\000\000\000\000\000\ -\000\000\080\074\000\000\000\000\000\000\156\000\166\255\141\067\ -\233\070\155\005\184\005\058\003\001\006\000\000\155\005\000\000\ -\000\000\233\070\211\005\116\003\233\070\000\000\170\063\096\018\ -\229\255\155\005\000\000\075\006\209\005\233\070\233\070\233\070\ -\233\070\233\070\233\070\233\070\233\070\233\070\233\070\233\070\ -\233\070\233\070\233\070\233\070\233\070\233\070\233\070\233\070\ -\233\070\233\070\060\069\233\070\000\000\116\004\233\070\000\000\ -\116\004\000\000\116\004\000\000\116\004\000\000\116\004\000\000\ -\000\000\233\070\169\004\225\006\080\074\080\074\027\006\068\006\ -\080\074\027\006\165\076\043\002\000\000\000\000\233\070\043\002\ -\043\002\000\000\000\000\147\004\023\002\075\004\236\005\000\000\ -\211\005\000\000\000\000\000\000\116\004\000\000\116\004\000\000\ -\195\003\000\000\000\000\000\000\000\000\000\000\171\007\229\255\ -\171\007\000\000\171\007\000\000\136\012\000\000\130\005\000\000\ -\042\006\138\006\000\000\136\012\000\000\136\012\000\000\000\000\ -\000\000\134\006\060\006\133\006\170\040\170\040\000\000\204\051\ -\155\005\116\004\009\001\104\006\167\006\000\000\000\000\164\006\ -\000\000\000\000\000\000\216\041\077\004\081\006\098\006\204\051\ -\058\003\000\000\000\000\196\074\009\076\000\000\173\006\179\006\ -\206\255\107\006\070\005\109\006\000\000\109\006\000\000\090\003\ -\000\000\131\001\235\005\000\000\000\000\102\002\000\000\000\000\ -\000\000\000\000\000\000\033\002\031\066\092\066\153\066\000\000\ -\000\000\176\003\000\000\000\000\196\074\242\001\141\067\116\004\ -\000\000\116\004\043\002\058\005\231\006\000\000\041\003\147\004\ -\000\000\153\006\000\000\119\006\140\000\000\000\000\000\078\002\ -\188\077\208\006\178\003\009\076\059\064\125\002\245\005\050\006\ -\048\072\000\000\000\000\000\000\196\074\110\006\116\004\254\003\ -\116\004\026\007\205\006\000\000\000\000\043\002\255\007\208\003\ -\202\009\124\017\000\000\202\006\000\000\000\000\208\003\233\070\ -\000\000\000\000\068\006\000\000\233\070\104\255\211\004\013\082\ -\196\074\000\000\149\006\170\063\155\006\023\002\142\006\155\005\ -\000\000\116\075\000\000\157\006\161\006\175\006\000\000\143\002\ -\000\000\000\000\182\006\000\000\000\000\163\006\166\006\110\002\ -\158\006\084\003\000\000\196\074\120\003\000\000\186\006\189\006\ -\000\000\092\006\252\006\006\007\141\067\000\000\000\000\225\076\ -\038\005\145\069\233\069\135\061\000\000\000\000\235\081\235\081\ -\203\081\110\013\110\081\203\081\184\012\184\012\184\012\184\012\ -\053\004\255\006\255\006\184\012\053\004\053\004\203\081\255\006\ -\053\004\053\004\053\004\170\063\000\000\255\006\116\075\000\000\ -\092\006\207\006\147\004\147\004\110\081\233\070\233\070\233\070\ -\252\001\249\006\233\070\233\070\233\070\043\002\043\002\000\000\ -\000\000\000\000\065\004\000\000\000\000\203\081\153\006\151\255\ -\116\004\075\004\213\006\116\004\000\000\163\002\000\000\000\000\ -\000\000\175\002\216\006\041\004\092\006\221\006\147\004\000\000\ -\000\000\000\000\000\000\055\007\000\000\000\000\171\007\000\000\ -\000\000\000\000\253\255\000\000\078\007\000\000\000\000\136\012\ -\127\001\112\000\120\054\000\000\000\000\000\000\000\000\008\007\ -\075\004\204\051\015\005\204\051\204\051\135\004\000\000\239\006\ -\000\000\000\000\220\001\110\002\022\007\000\000\000\000\000\000\ -\194\004\204\051\070\007\000\000\000\000\203\004\196\074\174\000\ -\024\006\247\006\000\000\254\046\000\000\000\000\000\000\000\000\ -\141\002\000\000\091\007\000\000\035\002\067\074\226\065\000\000\ -\035\002\000\000\015\007\000\000\000\000\233\070\233\070\233\070\ -\160\005\000\000\233\070\233\070\233\070\000\000\000\000\153\006\ -\237\005\044\007\000\000\018\007\000\000\013\041\179\002\013\041\ -\116\004\000\000\114\007\000\000\204\051\233\070\000\000\051\007\ -\000\000\196\074\000\000\000\000\000\000\053\007\000\000\053\007\ -\000\000\216\041\170\064\233\070\048\072\000\000\182\255\111\007\ -\000\000\233\070\056\007\116\004\033\001\228\067\247\002\000\000\ -\000\000\000\000\017\007\000\000\000\000\000\000\108\255\000\000\ -\116\004\233\070\000\000\110\081\000\000\110\081\000\000\000\000\ -\000\000\000\000\000\000\116\004\247\000\000\000\000\000\000\000\ -\087\007\151\255\084\003\186\006\229\255\216\071\239\004\115\007\ -\000\000\110\007\068\007\069\007\071\007\139\001\000\000\000\000\ -\000\004\109\007\084\003\075\004\143\002\150\005\084\003\229\255\ -\210\002\000\000\000\000\167\001\183\002\018\000\237\005\000\000\ -\000\000\209\004\000\000\136\002\204\051\233\070\047\007\242\255\ -\000\000\251\004\000\000\057\005\000\000\057\005\046\007\131\001\ -\000\000\184\255\233\070\229\255\077\007\084\003\153\006\153\006\ -\212\080\151\001\192\000\194\255\245\006\233\070\011\078\043\078\ -\121\078\080\007\056\007\119\255\063\007\075\007\075\004\060\255\ -\000\000\000\000\028\005\131\007\075\004\186\006\205\005\229\255\ -\209\004\134\007\153\006\017\003\000\000\136\012\000\000\000\000\ -\204\051\218\000\144\007\000\000\000\000\110\002\111\001\116\004\ -\000\000\204\051\255\002\058\007\116\004\058\003\000\000\022\007\ -\081\007\000\000\216\041\048\007\000\000\000\000\000\000\116\004\ -\196\074\065\007\000\000\070\005\000\000\000\000\000\000\000\000\ -\087\001\000\000\129\255\000\000\000\000\000\000\053\003\000\000\ -\017\081\048\001\246\255\020\007\153\078\231\078\007\079\102\007\ -\129\001\082\007\000\000\129\072\000\000\092\007\000\000\095\007\ -\239\006\083\007\144\001\151\007\116\004\000\000\229\255\245\001\ -\102\000\051\007\084\007\108\006\150\007\150\007\165\007\093\007\ -\108\007\051\007\000\000\000\000\063\070\233\070\196\074\049\081\ -\000\000\201\003\233\070\000\000\075\004\000\000\150\003\000\000\ -\204\051\110\081\233\070\233\070\116\004\142\007\228\004\000\000\ -\162\015\233\070\025\065\021\072\164\007\000\000\152\002\214\066\ -\019\067\080\067\233\070\000\000\204\051\196\074\000\000\000\000\ -\000\000\122\000\000\000\196\074\075\004\229\255\229\255\107\001\ -\053\006\000\000\000\000\000\000\180\007\000\000\000\000\204\051\ -\000\000\116\004\134\255\116\004\134\255\134\255\229\255\000\000\ -\000\000\000\000\000\000\196\074\000\000\207\001\168\007\112\007\ -\110\002\000\000\000\000\151\006\175\007\000\000\000\000\000\000\ -\000\000\000\000\060\001\168\006\000\000\143\002\000\000\000\000\ -\000\000\000\000\168\007\229\255\137\007\139\007\147\007\000\000\ -\000\000\148\007\000\000\154\007\233\070\233\070\233\070\110\081\ -\000\000\157\007\000\000\158\007\000\000\159\007\199\007\033\006\ -\000\000\000\000\116\004\159\004\255\002\186\006\092\006\219\007\ -\000\000\000\000\000\000\075\004\255\002\183\002\098\002\211\007\ -\000\000\140\007\075\004\163\007\000\000\000\000\072\001\000\000\ -\000\000\172\255\000\000\204\051\110\002\138\007\022\007\000\000\ -\000\000\204\051\000\000\070\005\000\000\000\000\075\004\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\233\070\ -\233\070\233\070\000\000\000\000\000\000\202\007\237\005\000\000\ -\110\002\000\000\136\050\096\005\229\255\129\072\000\000\068\006\ -\141\007\000\000\092\007\216\041\009\002\229\255\000\000\135\007\ -\000\000\000\000\233\070\000\000\048\072\204\051\233\070\146\007\ -\149\007\204\051\000\000\233\070\152\007\000\000\000\000\162\007\ -\000\000\233\070\143\002\000\000\100\077\137\255\000\000\000\000\ -\116\004\000\000\000\000\000\000\233\070\233\070\051\007\142\001\ -\000\000\051\007\214\007\000\000\000\000\233\070\000\000\000\000\ -\000\000\141\002\000\000\091\007\000\000\035\002\000\000\121\002\ -\035\002\000\000\156\007\111\007\255\002\000\000\000\000\143\002\ -\075\004\248\003\204\051\116\004\233\070\116\004\229\255\116\004\ -\229\255\000\000\111\007\237\005\000\000\031\077\000\000\160\007\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\209\002\ -\000\000\000\000\129\072\215\007\233\070\233\070\233\070\094\079\ -\126\079\204\079\233\070\233\070\233\070\136\050\075\004\143\002\ -\000\000\000\000\148\006\208\003\060\255\163\002\000\000\000\000\ -\075\004\160\007\163\002\224\007\204\051\000\000\000\000\000\000\ -\000\000\000\000\116\004\022\007\059\000\236\079\058\080\090\080\ -\163\005\000\000\000\000\054\012\173\007\230\007\116\004\216\041\ -\190\007\000\000\231\007\116\004\186\007\000\000\190\002\116\004\ -\204\051\217\005\096\005\116\004\000\000\249\004\116\004\165\076\ -\000\000\000\000\000\000\246\007\000\000\000\000\000\000\247\007\ -\000\000\135\007\229\255\241\007\000\000\116\004\000\000\000\000\ -\000\000\116\004\000\000\048\072\233\070\110\081\053\006\000\000\ -\243\000\237\002\000\000\000\000\000\000\000\000\000\000\242\007\ -\204\051\172\007\233\070\000\000\233\070\000\000\053\006\100\005\ -\000\000\250\002\229\255\096\005\229\255\195\001\000\000\234\004\ -\000\000\000\000\023\002\000\000\127\049\148\014\097\047\000\000\ -\096\003\217\007\007\008\000\000\000\000\151\255\063\002\000\000\ -\150\255\078\003\063\002\229\255\163\005\110\081\110\081\110\081\ -\000\000\216\007\000\000\218\007\000\000\221\007\110\081\110\081\ -\110\081\229\255\255\002\053\006\081\006\081\006\043\005\000\000\ -\000\000\079\006\174\255\000\000\136\050\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\204\051\000\000\000\000\151\006\ -\229\002\190\001\222\003\134\255\216\041\208\007\203\007\014\008\ -\096\005\000\000\136\050\045\005\049\073\202\001\134\255\166\000\ -\001\006\096\005\000\000\165\076\120\054\000\000\000\000\233\070\ -\000\000\000\000\000\000\249\255\000\000\193\007\204\051\215\003\ -\021\072\000\000\000\000\000\000\204\051\000\000\025\001\000\000\ -\177\007\160\007\068\006\181\007\092\007\068\006\151\255\000\000\ -\116\004\007\008\160\007\092\007\000\000\116\004\204\051\000\000\ -\023\002\082\002\194\001\000\000\000\000\000\000\000\000\000\000\ -\201\007\000\000\000\000\151\006\233\070\233\070\233\070\000\000\ -\168\003\168\003\204\051\228\007\204\051\098\002\023\002\151\255\ -\248\001\000\000\000\000\229\255\000\000\053\005\068\005\116\004\ -\223\007\204\051\200\004\000\000\136\050\216\041\116\004\000\000\ -\000\000\217\072\000\000\058\003\116\004\000\000\136\050\000\000\ -\026\005\116\004\116\004\022\008\075\004\000\000\000\000\008\004\ -\233\070\000\000\116\004\238\007\229\255\068\006\068\006\156\072\ -\068\006\068\006\103\006\116\004\101\003\212\007\000\000\052\004\ -\000\000\246\002\179\002\116\004\000\000\000\000\000\000\000\000\ -\000\000\110\081\110\081\110\081\000\000\000\000\000\000\000\000\ -\151\255\000\000\000\000\000\000\000\000\000\000\186\006\136\050\ -\103\004\000\000\000\000\158\001\000\000\234\007\096\005\000\000\ -\000\000\186\006\159\000\000\000\000\000\222\007\000\000\227\007\ -\233\070\000\000\000\000\000\000\048\008\052\008\140\048\000\000\ -\054\008\056\008\233\070\050\008\000\000\000\000\092\007\007\008\ -\000\000\204\051\179\002\116\004\116\004\000\000\060\008\036\005\ -\000\000\000\000\116\004\116\004\116\004\116\004\229\255\000\000\ -\000\000\136\050\116\004\088\005\000\000\000\000\116\004\000\000\ -\000\000\120\054\120\054\051\007\116\004\053\008\238\001\204\051\ -\204\051\000\000\233\070\240\007\116\004\116\004\000\000\000\000\ -\163\005\204\051\163\005\220\003\033\003\000\000\000\000\096\005\ -\000\000\000\000\000\000\062\008\233\070\204\051\116\004\116\004\ -\000\000\000\000\000\000\116\004\229\255\151\006\225\007\250\007\ -\068\006\147\004\092\007\073\008\229\255\116\004\204\051\000\000\ -\116\004\000\000\000\000\000\000\000\000\074\008\068\006\068\006\ -\204\051\000\000\057\004\120\054\077\008\079\008\116\004\233\070\ -\229\255\204\051\204\051\000\000\000\000\116\004\116\004" - -let yyrindex = "\000\000\ -\094\009\095\009\000\008\000\000\000\000\000\000\000\000\000\000\ -\232\076\000\000\000\000\148\070\000\000\022\003\029\003\171\006\ -\000\000\000\000\001\075\076\073\135\074\062\071\230\002\000\000\ -\232\076\000\000\000\000\000\000\000\000\000\000\000\000\028\075\ -\012\019\000\000\000\000\062\071\000\000\000\000\246\005\069\005\ -\015\002\042\004\000\000\000\000\000\000\099\000\000\000\000\000\ -\062\071\149\008\000\000\000\000\171\006\062\071\000\000\000\000\ -\176\040\099\000\128\019\000\000\016\046\000\000\149\013\000\000\ -\000\000\114\015\000\000\000\000\000\000\113\059\000\000\000\000\ -\122\059\171\059\000\000\215\059\000\000\000\000\000\000\000\000\ -\000\000\000\000\058\027\174\027\081\026\197\026\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\022\003\029\003\131\004\ -\246\005\116\000\149\008\000\000\000\000\000\000\000\000\222\041\ -\000\000\000\000\065\042\012\043\000\000\116\000\000\000\000\000\ -\000\000\000\000\111\043\000\000\058\044\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\002\008\000\000\000\008\000\000\ -\000\000\000\000\000\000\247\008\000\000\000\000\000\000\000\000\ -\134\014\134\014\000\000\079\010\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\247\010\ -\000\000\000\000\000\000\060\049\114\018\000\000\000\000\000\000\ -\001\075\036\076\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\150\052\000\000\000\000\ -\253\002\225\005\000\000\000\000\000\000\139\006\000\000\002\053\ -\000\000\000\000\000\000\165\060\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\022\003\239\255\000\000\000\000\ -\000\000\000\000\089\075\000\000\000\000\000\000\067\002\124\002\ -\000\000\227\255\000\000\000\000\037\000\000\000\000\000\170\255\ -\000\000\142\005\000\000\117\255\095\001\000\000\199\006\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\008\008\052\060\008\008\029\003\251\007\042\004\ -\177\075\000\000\000\000\000\000\167\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\076\062\162\062\230\002\000\000\000\000\248\062\078\063\ -\000\000\185\000\000\000\000\000\000\000\000\000\000\000\008\008\ -\000\000\069\005\000\000\000\000\002\004\000\000\251\007\000\000\ -\000\000\000\000\079\005\000\000\000\000\000\000\000\000\099\000\ -\222\055\028\075\000\000\149\013\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\220\035\000\000\000\000\204\075\000\000\000\000\ -\212\004\000\000\252\007\000\000\108\003\000\000\108\003\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\237\017\244\024\000\000\000\000\000\000\034\028\ -\151\028\000\000\000\000\239\255\000\000\000\000\000\000\000\000\ -\079\005\000\000\000\000\000\000\252\007\000\000\108\003\000\000\ -\059\014\000\000\000\000\000\000\000\000\000\000\000\000\247\008\ -\000\000\000\000\000\000\000\000\000\000\000\000\153\001\000\000\ -\095\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\207\255\000\000\076\008\000\000\078\008\084\008\000\000\000\000\ -\131\004\096\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\036\000\ -\000\000\146\000\068\000\095\001\000\000\199\006\000\000\235\000\ -\000\000\251\007\238\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\008\008\165\060\ -\000\000\229\050\011\029\000\000\000\000\000\000\000\000\239\255\ -\000\000\045\008\000\000\000\000\000\000\000\000\000\000\221\057\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\057\008\000\000\ -\246\061\215\059\064\004\000\000\000\000\127\029\000\000\000\000\ -\000\000\000\000\000\000\146\255\000\000\000\000\228\000\000\000\ -\000\000\000\000\148\005\000\000\090\001\000\000\000\000\018\008\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\251\007\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\175\004\000\000\000\000\008\008\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\138\038\242\038\ -\090\039\034\016\245\040\194\039\080\036\197\036\057\037\173\037\ -\034\033\244\029\104\030\034\038\150\033\011\034\042\040\220\030\ -\127\034\243\034\104\035\000\000\000\000\081\031\000\000\000\000\ -\085\001\000\000\239\255\239\255\088\041\000\000\000\000\000\000\ -\000\000\244\019\000\000\000\000\000\000\104\025\221\025\000\000\ -\000\000\000\000\128\024\000\000\000\000\146\040\045\008\117\011\ -\057\008\000\000\000\000\124\012\096\007\012\043\000\000\000\000\ -\000\000\000\000\000\000\000\000\175\004\000\000\239\255\000\000\ -\000\000\000\000\000\000\061\014\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\173\061\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\230\046\000\000\000\000\000\000\000\000\073\047\ -\000\000\000\000\000\000\000\000\172\047\000\000\000\000\000\000\ -\000\000\000\000\156\255\000\000\000\000\245\000\090\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\016\001\000\000\067\006\000\000\202\000\000\000\000\000\000\000\ -\118\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\045\008\ -\023\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\139\058\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\197\031\ -\000\000\000\000\000\000\147\071\000\000\204\005\000\000\000\000\ -\000\000\000\000\000\000\086\002\000\000\000\000\217\255\000\000\ -\067\000\000\000\000\000\006\000\000\000\144\000\000\000\000\000\ -\000\000\000\000\000\000\155\006\029\008\000\000\000\000\000\000\ -\000\000\170\005\000\000\000\000\230\057\028\007\000\000\188\006\ -\000\000\019\004\003\001\018\001\062\001\000\000\000\000\000\000\ -\089\075\204\058\000\000\000\000\000\000\000\000\000\000\215\059\ -\000\000\000\000\000\000\216\005\215\059\089\075\159\005\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\095\001\000\000\199\006\000\000\230\002\ -\000\000\000\000\000\000\230\057\000\000\000\000\045\008\045\008\ -\000\000\142\081\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\219\005\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\012\043\ -\000\000\000\000\045\008\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\230\001\ -\000\000\000\000\008\001\000\000\147\001\000\000\000\000\017\048\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\182\000\ -\000\000\002\001\000\000\217\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\069\008\187\054\000\000\ -\106\055\000\000\000\000\189\007\139\058\000\000\215\059\000\000\ -\000\000\009\000\000\000\250\255\040\008\040\008\254\255\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\120\046\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\172\000\000\000\000\000\083\008\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\215\059\253\058\000\000\ -\138\008\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\148\077\018\005\147\071\079\002\134\003\168\004\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\182\009\000\000\ -\000\000\000\000\000\000\215\059\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\082\056\253\058\000\000\000\000\105\020\000\000\ -\000\000\221\020\000\000\081\021\000\000\000\000\000\000\192\041\ -\000\000\198\021\000\000\058\022\000\000\174\022\000\000\000\000\ -\000\000\000\000\252\004\000\000\197\006\000\000\175\004\246\006\ -\000\000\089\008\000\000\000\000\252\052\012\043\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\153\001\000\000\ -\000\000\000\000\238\063\000\000\000\000\099\008\116\048\000\000\ -\000\000\000\000\000\000\230\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\023\008\000\000\ -\000\000\000\000\000\000\000\000\253\058\000\000\000\000\000\000\ -\000\000\000\000\085\005\000\000\000\000\215\059\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\197\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\152\006\000\000\170\003\000\000\032\006\000\000\000\000\ -\117\006\000\000\000\000\057\032\007\059\000\000\000\000\000\000\ -\000\000\000\000\000\000\248\005\000\000\038\004\168\004\117\004\ -\168\004\000\000\174\032\159\005\000\000\087\008\000\000\208\255\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\019\041\000\000\000\000\ -\000\000\208\255\019\041\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\144\016\215\048\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\037\015\059\008\000\000\ -\000\000\236\054\000\000\189\011\000\000\000\000\000\000\137\073\ -\000\000\028\075\000\000\047\003\000\000\000\000\027\058\110\053\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\069\059\215\059\000\000\000\000\058\000\000\000\000\000\ -\000\000\017\002\000\000\000\000\000\000\035\042\001\017\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\131\056\000\000\ -\000\000\000\000\168\004\000\000\168\004\072\008\000\000\069\008\ -\000\000\000\000\000\000\000\000\000\000\000\000\100\008\245\011\ -\184\056\000\000\237\056\000\000\000\000\147\016\253\058\000\000\ -\000\000\000\000\253\058\253\058\000\000\134\042\238\042\081\043\ -\000\000\035\023\000\000\151\023\000\000\011\024\180\043\028\044\ -\127\044\019\041\079\017\116\050\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\253\058\ -\000\000\000\000\119\002\146\003\000\000\194\002\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\146\003\000\000\ -\002\004\000\000\000\000\182\053\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\020\006\000\000\ -\094\008\072\008\000\000\101\008\069\008\000\000\147\016\000\000\ -\056\057\109\057\162\003\069\008\000\000\024\056\000\000\000\000\ -\000\000\234\012\215\059\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\253\058\000\000\000\000\000\000\000\000\ -\136\049\194\049\000\000\010\078\000\000\000\000\000\000\118\057\ -\012\043\000\000\000\000\019\041\000\000\000\000\000\000\252\007\ -\000\000\000\000\000\000\000\000\000\000\000\000\080\058\000\000\ -\030\055\000\000\000\000\000\000\252\007\000\000\000\000\000\000\ -\000\000\240\053\219\002\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\172\006\000\000\168\004\000\000\000\000\000\000\ -\000\000\000\000\000\000\024\056\000\000\000\000\000\000\000\000\ -\000\000\234\012\000\000\129\058\000\000\000\000\000\000\000\000\ -\000\000\226\044\074\045\173\045\000\000\000\000\000\000\000\000\ -\118\057\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\253\005\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\046\008\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\069\008\168\057\ -\000\000\000\000\000\000\129\058\129\058\000\000\252\049\000\000\ -\000\000\000\000\148\077\223\005\038\004\117\004\005\004\000\000\ -\000\000\000\000\042\054\000\000\000\000\000\000\111\005\000\000\ -\000\000\000\000\000\000\000\000\193\004\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\058\050\129\058\000\000\000\000\ -\000\000\000\000\000\000\104\008\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\077\009\186\010\ -\000\000\000\000\000\000\164\055\005\004\005\004\107\008\109\008\ -\000\000\110\008\069\008\000\000\005\004\100\054\000\000\000\000\ -\164\005\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\095\004\000\000\ -\005\004\000\000\000\000\000\000\000\000\050\009\222\010" - -let yygindex = "\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\033\000\ -\215\255\000\000\089\000\072\000\013\006\049\009\060\000\000\000\ -\214\255\126\000\233\001\099\253\000\000\217\254\078\006\071\255\ -\127\008\195\013\029\254\247\255\098\004\194\013\074\252\051\000\ -\093\000\023\000\026\000\034\000\000\000\000\000\000\000\000\000\ -\045\000\047\000\000\000\049\000\000\000\002\000\013\000\088\007\ -\093\001\000\000\000\000\000\000\000\000\000\000\000\000\052\000\ -\000\000\000\000\000\000\000\000\000\000\014\255\005\252\000\000\ -\000\000\000\000\027\000\000\000\000\000\142\254\251\253\032\252\ -\115\251\156\251\083\255\000\000\226\003\000\000\176\004\175\251\ -\113\255\059\004\000\000\000\000\000\000\000\000\000\000\000\000\ -\107\003\015\000\026\251\047\255\103\253\199\251\017\253\135\252\ -\095\251\043\254\247\003\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\046\000\200\006\ -\003\006\006\006\000\000\000\000\078\255\022\000\000\000\168\255\ -\184\001\059\253\000\254\108\010\156\012\000\000\000\000\000\000\ -\110\255\049\008\009\013\119\007\031\000\094\255\207\000\159\254\ -\000\000\080\008\100\007\216\011\115\253\000\000\078\254\000\000\ -\000\000\000\000\050\004\009\006\163\255\164\004\000\000\000\000\ -\000\000\000\000\073\000\000\000\235\007\157\255\254\007\021\007\ -\045\009\000\000\000\000\198\004\000\000\000\000\085\008\213\253\ -\190\005\138\251\021\251\213\251\011\253\000\000\097\253\000\000\ -\122\005\000\000\000\000\046\251\066\255\001\253\251\006\041\008\ -\000\000\000\000\099\004\000\000\000\000\137\004\078\252\000\000\ -\066\004\017\005\000\000\146\253\235\012\133\255\000\000\071\006\ -\128\255\220\254\141\255\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\082\255\000\000" - -let yytablesize = 21372 -let yytable = "\188\000\ -\019\002\185\001\188\000\108\000\188\000\188\000\188\000\161\001\ -\248\001\188\000\188\000\188\000\188\000\188\000\109\000\188\000\ -\200\001\127\002\180\001\010\002\162\001\127\003\188\000\002\002\ -\102\000\125\002\188\000\103\000\001\002\188\000\188\000\188\000\ -\193\000\056\000\213\003\104\000\192\000\040\002\009\003\188\000\ -\188\000\216\000\160\001\188\000\188\000\171\001\105\000\209\000\ -\106\000\166\001\107\000\171\004\129\003\112\000\222\003\196\003\ -\136\001\194\001\030\002\223\000\031\002\085\003\127\000\133\000\ -\124\004\170\003\064\001\224\004\140\001\186\001\219\001\014\005\ -\133\004\005\004\125\000\132\000\021\001\159\000\065\001\112\005\ -\056\001\158\005\075\005\162\005\188\000\188\000\188\000\188\000\ -\154\001\188\000\156\001\124\000\163\001\063\000\134\002\063\000\ -\063\000\113\003\051\000\108\000\051\002\201\003\037\002\023\003\ -\124\001\054\001\128\001\129\001\075\001\090\003\109\000\108\000\ -\165\005\090\005\005\002\089\000\143\001\128\005\049\004\040\003\ -\102\000\098\003\109\000\103\000\209\003\224\002\143\001\161\002\ -\089\004\162\002\149\000\104\000\102\000\054\004\073\005\103\000\ -\036\005\054\002\063\000\187\001\062\001\011\005\105\000\104\000\ -\106\000\138\001\107\000\145\001\021\002\112\000\076\001\188\000\ -\188\000\170\001\105\000\219\001\106\000\169\005\107\000\070\001\ -\237\004\112\000\114\005\225\001\230\002\052\002\151\005\055\004\ -\099\005\142\001\182\001\180\005\059\002\186\000\224\001\126\005\ -\165\001\010\000\234\001\243\001\040\003\191\005\234\005\023\004\ -\186\000\220\001\127\000\188\000\153\001\221\001\133\000\103\003\ -\133\000\035\004\186\000\024\003\222\001\201\003\128\002\223\001\ -\152\001\207\001\186\000\243\001\244\001\188\002\142\001\165\005\ -\143\001\103\003\235\001\143\001\050\004\090\003\245\001\200\002\ -\145\001\151\001\168\003\076\001\110\002\063\000\090\004\076\001\ -\114\002\076\001\151\001\014\002\244\001\232\002\037\005\231\001\ -\232\001\104\003\076\005\207\005\138\001\200\002\245\001\022\002\ -\138\001\015\004\173\002\145\001\218\005\035\004\219\001\186\000\ -\087\003\088\003\219\001\104\003\155\005\151\001\197\003\246\001\ -\196\005\040\006\247\001\053\002\118\003\141\001\200\002\231\004\ -\142\001\221\005\070\004\239\001\188\000\188\000\173\002\157\001\ -\200\002\003\004\184\002\006\002\226\000\024\004\208\005\246\001\ -\223\000\163\001\247\001\114\005\115\003\040\005\104\001\036\004\ -\042\005\009\003\188\000\221\001\134\001\204\002\198\003\071\001\ -\189\002\192\002\141\001\193\002\140\004\173\002\204\002\173\002\ -\188\000\182\002\193\000\145\001\168\002\188\000\145\001\145\001\ -\211\002\200\002\104\005\173\002\200\002\151\001\221\001\160\001\ -\188\000\151\001\147\001\212\001\181\002\077\001\160\001\064\001\ -\160\001\239\002\009\003\152\004\016\004\212\001\002\002\171\001\ -\171\001\029\004\030\004\095\004\227\000\165\005\222\005\226\000\ -\119\003\218\002\100\003\223\000\234\001\147\001\175\002\234\001\ -\231\005\234\001\051\000\234\001\141\001\234\001\104\001\034\003\ -\013\006\237\005\140\005\142\005\150\002\068\004\152\002\063\000\ -\153\002\063\000\019\006\089\000\069\002\206\001\046\003\118\003\ -\238\005\170\004\070\002\122\003\051\000\121\004\221\001\134\001\ -\055\002\059\006\221\001\234\001\120\006\234\001\122\002\186\000\ -\047\006\064\002\118\002\119\002\068\002\089\000\123\002\144\001\ -\124\001\214\001\140\004\177\005\063\000\234\001\071\003\227\000\ -\105\005\144\001\228\002\049\002\129\002\147\001\061\006\212\001\ -\147\001\147\001\212\001\049\006\076\001\214\005\140\002\188\000\ -\187\001\017\002\101\002\137\001\018\002\149\003\104\002\100\006\ -\195\005\102\006\220\001\215\005\030\000\220\001\221\001\021\005\ -\127\002\190\000\130\002\170\001\170\001\222\001\051\000\033\004\ -\223\001\225\001\000\006\131\002\146\001\105\001\058\005\170\003\ -\188\000\207\001\110\006\125\003\225\001\207\001\122\004\089\000\ -\220\001\207\001\133\000\207\001\133\000\087\006\133\000\207\001\ -\213\001\225\001\225\001\207\001\132\002\233\004\234\001\146\001\ -\234\001\118\003\213\001\136\001\207\001\218\001\133\002\186\000\ -\114\001\229\002\143\002\144\001\214\001\141\002\144\001\173\000\ -\186\000\225\001\139\005\076\001\215\001\076\001\027\003\076\001\ -\246\005\050\002\220\001\076\006\062\006\234\001\221\001\234\001\ -\010\003\215\002\137\002\216\005\140\002\222\001\137\001\081\002\ -\223\001\150\003\137\001\220\004\240\003\009\003\003\006\157\001\ -\220\001\135\002\207\001\157\001\220\001\129\002\127\002\157\001\ -\081\002\157\001\170\002\034\004\228\005\157\001\188\000\146\001\ -\204\003\108\000\146\001\146\001\207\001\207\001\024\006\207\001\ -\207\001\216\000\157\001\200\001\109\000\030\000\205\003\033\004\ -\136\003\137\003\190\000\130\002\213\001\072\004\102\000\213\001\ -\186\000\103\000\207\001\196\004\131\002\133\002\136\001\053\004\ -\218\001\104\000\160\001\063\000\218\001\061\004\166\005\135\003\ -\143\002\229\004\002\002\141\002\105\000\107\001\106\000\215\001\ -\107\000\031\003\050\003\112\000\221\003\132\002\137\005\216\000\ -\157\001\216\002\186\000\236\001\215\002\209\000\215\002\133\002\ -\137\002\007\003\186\000\216\002\087\004\081\002\171\002\211\003\ -\076\003\078\003\157\001\157\001\117\003\157\001\157\001\135\002\ -\109\001\096\002\041\003\002\002\237\001\206\001\102\005\234\001\ -\220\003\206\001\234\001\241\003\106\003\206\001\206\003\206\001\ -\157\001\191\001\047\002\206\001\076\004\176\004\118\003\206\001\ -\175\003\186\000\175\002\094\004\203\001\203\001\015\003\017\003\ -\206\001\083\003\103\004\082\003\243\001\253\004\032\004\197\004\ -\234\003\227\001\228\001\133\002\193\003\028\003\031\001\236\005\ -\023\003\063\000\123\003\041\005\097\002\142\004\120\001\121\001\ -\127\001\019\004\244\005\020\004\186\000\225\001\252\001\041\003\ -\051\006\251\001\111\001\103\003\088\004\216\002\091\003\092\003\ -\016\002\250\003\215\002\096\002\023\003\096\002\206\001\225\001\ -\244\005\225\001\252\001\225\001\186\000\173\004\192\001\225\001\ -\077\004\169\005\092\006\007\003\186\000\052\006\142\003\170\002\ -\206\001\206\001\133\000\206\001\206\001\187\000\251\003\252\003\ -\236\003\031\000\124\003\170\002\104\004\104\003\008\004\234\001\ -\188\004\035\000\031\000\053\006\009\003\004\004\206\001\077\004\ -\235\003\021\003\035\000\127\001\253\003\051\001\097\002\086\004\ -\097\002\140\003\044\006\076\001\023\003\225\001\081\004\127\003\ -\032\006\002\002\234\001\010\003\180\001\013\000\110\004\191\005\ -\253\004\044\006\069\004\094\006\071\001\187\001\079\004\187\001\ -\180\004\023\003\182\004\184\004\054\006\066\004\025\003\120\004\ -\018\000\185\002\187\001\225\001\222\004\254\003\129\003\074\003\ -\160\001\199\005\153\005\227\004\190\001\228\003\162\003\163\003\ -\198\002\025\003\119\005\024\000\010\003\212\005\207\003\133\003\ -\025\003\002\002\093\003\224\000\189\004\083\004\220\003\225\001\ -\138\001\222\001\154\005\189\001\243\001\185\003\186\000\144\003\ -\168\000\141\003\071\001\009\003\052\004\255\003\025\003\025\003\ -\236\001\155\003\171\002\195\003\023\003\169\000\188\000\077\004\ -\000\004\016\005\025\003\009\003\253\005\244\001\255\005\025\003\ -\171\002\167\005\025\003\171\002\025\003\172\002\047\000\245\001\ -\122\002\237\001\106\003\230\002\200\004\171\002\190\001\230\002\ -\166\000\249\001\063\000\172\002\186\000\195\002\172\002\108\000\ -\231\002\220\001\184\003\122\002\243\005\221\001\224\000\109\003\ -\172\002\122\002\109\000\196\002\222\001\077\002\234\001\223\001\ -\009\003\106\003\094\002\187\001\102\000\025\003\085\002\103\000\ -\246\001\071\001\141\001\247\001\122\002\059\004\187\001\104\000\ -\094\002\048\005\225\001\120\001\121\001\013\004\211\002\253\004\ -\211\002\187\001\105\000\045\005\106\000\225\001\107\000\159\004\ -\075\004\112\000\025\004\222\001\232\002\171\002\223\001\201\005\ -\232\002\171\002\111\003\122\002\122\002\253\004\211\002\186\000\ -\090\006\091\006\164\002\234\001\183\002\190\000\187\001\091\005\ -\172\002\007\002\225\001\143\001\172\002\122\002\122\002\122\002\ -\094\002\098\005\186\000\002\002\241\002\242\002\211\002\094\002\ -\110\004\185\000\012\004\197\002\107\003\201\002\203\002\205\002\ -\122\002\030\000\002\002\234\001\011\003\209\002\186\000\008\002\ -\017\000\031\005\094\002\124\005\185\000\220\001\236\004\166\000\ -\249\001\221\001\191\000\185\000\164\002\164\002\074\005\248\003\ -\222\001\009\004\129\006\223\001\186\000\071\001\106\003\010\003\ -\146\001\178\003\243\002\103\003\141\005\255\002\164\002\190\001\ -\234\001\185\000\234\001\179\003\009\002\010\004\047\005\253\004\ -\014\006\071\001\198\005\051\000\180\001\185\000\190\001\147\001\ -\180\001\253\004\187\001\230\002\180\001\185\000\180\001\185\000\ -\025\003\029\003\180\001\180\001\135\004\136\004\180\001\129\002\ -\043\006\007\003\186\000\186\000\149\005\104\003\015\005\180\001\ -\002\002\007\002\146\004\147\004\048\000\110\004\092\005\051\000\ -\025\003\153\004\125\002\193\004\057\003\190\001\025\003\030\000\ -\222\002\234\001\167\004\106\003\190\000\130\002\023\003\249\003\ -\185\000\030\000\253\004\106\003\091\004\023\003\131\002\008\002\ -\220\001\023\003\025\003\186\000\221\001\234\001\180\001\029\000\ -\186\000\023\003\223\002\222\001\232\002\180\001\223\001\103\003\ -\023\003\095\005\225\001\025\003\025\003\176\005\145\004\132\002\ -\166\000\249\001\025\003\025\003\208\003\025\003\015\003\180\001\ -\180\001\133\002\180\001\180\001\009\002\025\003\023\003\023\003\ -\215\000\052\003\168\004\051\000\253\004\004\003\150\000\234\004\ -\175\000\002\002\023\003\106\006\059\005\180\001\053\003\023\003\ -\129\002\104\003\023\003\161\001\023\003\178\004\186\000\058\003\ -\215\001\183\001\163\005\038\006\159\005\077\002\012\005\214\003\ -\162\001\200\005\243\001\243\004\106\003\025\003\025\003\187\001\ -\030\000\025\003\170\005\216\001\213\005\190\000\130\002\239\003\ -\107\006\059\003\092\004\246\003\054\003\143\004\115\005\131\002\ -\225\001\039\006\225\001\244\001\225\001\023\003\187\001\225\001\ -\158\001\186\000\023\003\106\003\192\005\245\001\051\000\148\003\ -\187\001\200\002\234\001\023\003\234\001\165\001\234\001\144\004\ -\132\002\165\001\028\004\166\000\249\001\220\001\203\001\159\003\ -\200\002\221\001\133\002\165\001\161\001\140\003\010\003\200\002\ -\222\001\193\001\020\005\223\001\165\001\211\002\023\005\211\002\ -\006\005\162\001\002\002\027\005\238\002\146\000\246\001\210\005\ -\211\002\247\001\017\002\211\002\106\003\018\002\200\002\176\001\ -\200\002\106\003\188\003\023\003\038\005\039\005\002\002\160\001\ -\144\002\234\001\200\002\220\003\163\000\044\005\206\002\165\000\ -\190\001\150\000\242\005\165\001\150\000\234\001\150\000\150\000\ -\207\002\225\005\122\005\186\000\145\002\211\002\234\001\119\006\ -\188\000\186\000\234\001\022\005\053\005\131\005\211\002\026\005\ -\001\006\150\000\166\000\249\001\021\003\175\000\175\000\163\001\ -\175\000\054\003\187\000\200\002\187\001\181\001\200\002\198\001\ -\187\001\139\004\175\000\175\000\150\000\010\003\164\001\021\003\ -\186\000\036\006\164\001\150\000\077\002\124\001\021\003\002\002\ -\007\002\164\001\025\006\197\000\210\005\010\003\106\003\146\002\ -\187\001\022\001\175\000\175\000\147\002\164\001\013\002\051\000\ -\050\005\150\000\150\000\103\006\021\003\002\002\109\003\187\001\ -\030\000\186\000\220\003\065\005\051\000\150\000\008\002\029\000\ -\021\003\188\001\029\000\110\003\017\006\150\000\195\001\150\000\ -\021\003\186\000\021\003\104\006\029\000\029\000\042\006\186\000\ -\029\000\106\003\010\003\128\006\164\001\049\005\236\001\023\001\ -\106\003\029\000\029\000\029\000\029\000\024\001\196\000\006\005\ -\187\000\089\001\090\001\009\002\138\005\023\003\122\005\029\000\ -\029\000\111\003\051\000\211\002\004\003\129\002\102\001\237\001\ -\150\000\196\000\146\005\021\003\147\005\186\000\131\005\214\000\ -\196\000\084\004\186\000\029\000\211\002\023\003\029\000\226\001\ -\029\000\029\000\029\000\029\000\158\001\030\000\187\001\095\001\ -\029\000\029\000\190\000\130\002\177\002\131\005\196\000\029\000\ -\006\005\025\002\215\000\103\001\131\002\023\003\211\002\187\001\ -\100\001\124\001\196\000\029\000\234\001\029\000\217\004\029\000\ -\029\000\196\000\196\000\172\004\196\000\025\003\144\005\021\003\ -\186\000\232\005\122\005\029\000\235\005\132\002\029\000\255\002\ -\230\001\146\000\029\000\229\001\023\003\186\000\026\002\133\002\ -\218\004\178\002\021\003\187\004\161\005\025\003\234\001\023\003\ -\047\002\021\003\025\003\025\003\050\006\131\005\138\003\010\006\ -\162\004\164\004\166\004\234\001\025\003\196\000\169\004\220\005\ -\131\005\234\001\025\003\047\002\255\002\006\005\187\001\021\003\ -\021\003\187\001\047\002\047\002\026\003\110\002\006\005\111\002\ -\181\001\011\006\234\001\021\003\023\003\025\003\187\001\135\002\ -\198\001\112\002\234\001\021\003\255\002\021\003\243\001\025\003\ -\047\002\047\002\223\003\077\002\029\006\030\006\224\003\033\006\ -\034\006\011\003\017\004\102\001\047\002\225\003\150\000\187\001\ -\226\003\143\003\241\001\047\002\047\002\150\000\047\002\150\000\ -\252\001\227\003\198\001\150\004\224\005\055\006\150\000\150\000\ -\007\004\150\000\227\005\023\003\023\003\051\000\021\003\015\002\ -\056\006\020\006\023\003\243\001\252\001\150\000\023\003\018\004\ -\130\005\150\000\234\001\234\001\240\005\175\000\175\000\023\003\ -\026\006\234\001\234\001\234\001\234\001\023\003\077\002\047\002\ -\186\000\131\005\211\002\021\006\156\005\234\001\023\003\051\000\ -\146\003\011\003\187\005\187\001\023\003\146\000\175\000\175\000\ -\175\000\023\003\155\001\187\001\234\001\188\005\175\000\009\006\ -\211\002\220\001\073\003\081\006\211\002\221\001\158\001\023\002\ -\211\002\211\002\211\002\211\002\222\001\187\001\187\001\223\001\ -\113\001\157\005\122\005\190\000\122\005\175\000\175\000\211\002\ -\065\006\023\003\175\000\108\006\131\005\215\000\175\000\187\001\ -\023\003\013\002\074\006\006\005\209\005\011\003\214\002\134\003\ -\215\002\187\001\150\000\150\000\005\006\187\001\024\002\118\006\ -\139\001\198\001\216\002\146\000\187\001\187\001\211\002\088\006\ -\000\005\150\000\175\000\110\005\025\003\125\006\126\006\186\000\ -\058\004\148\001\154\001\175\000\027\002\215\002\196\002\196\002\ -\155\001\013\002\097\006\216\002\202\002\196\002\001\005\029\002\ -\186\000\178\002\030\000\014\000\069\006\175\000\002\005\183\001\ -\003\005\178\002\196\002\048\002\112\006\186\000\051\000\077\006\ -\196\002\187\000\015\000\016\000\103\003\004\005\023\003\018\002\ -\146\000\025\003\215\002\013\003\006\005\185\002\048\002\023\000\ -\216\002\023\003\019\003\196\002\196\002\048\002\048\002\069\006\ -\069\006\148\005\058\001\186\000\082\000\095\006\096\006\132\006\ -\175\000\023\003\031\000\051\000\051\000\074\001\164\003\050\005\ -\157\002\011\002\035\000\048\002\048\002\036\002\104\003\147\000\ -\039\000\109\005\089\000\113\006\186\000\030\000\042\000\048\002\ -\181\001\245\004\110\005\135\002\181\001\051\000\048\002\048\002\ -\181\001\048\002\181\001\011\002\123\006\187\000\181\001\181\001\ -\247\004\147\000\181\001\242\003\089\000\083\000\127\006\043\002\ -\252\001\069\006\050\000\181\001\183\000\053\000\041\002\134\006\ -\135\006\150\000\243\003\244\003\150\000\072\002\073\002\074\002\ -\075\002\217\001\135\002\150\000\252\001\150\000\150\000\146\000\ -\166\000\076\002\048\002\161\000\057\002\023\003\183\000\151\003\ -\023\003\023\003\186\000\150\000\218\001\023\003\023\003\065\002\ -\175\000\152\003\181\001\210\001\058\002\150\000\161\000\210\001\ -\127\005\181\001\063\004\187\000\023\003\161\000\023\003\175\000\ -\175\000\210\001\023\003\064\003\245\002\246\002\023\003\023\003\ -\023\003\064\004\210\001\181\001\181\001\077\002\181\001\181\001\ -\065\003\060\002\155\001\161\000\161\000\023\003\155\001\150\000\ -\139\002\150\000\155\001\023\003\155\001\102\001\150\000\161\000\ -\155\001\181\001\025\003\175\000\155\001\071\002\161\000\161\000\ -\140\002\161\000\120\002\150\000\175\000\155\001\175\000\120\002\ -\189\000\054\003\025\003\196\000\023\003\198\000\199\000\200\000\ -\013\002\215\004\201\000\202\000\203\000\204\000\205\000\220\001\ -\206\000\245\002\248\002\221\001\017\002\007\003\186\000\018\002\ -\209\001\126\004\222\001\057\001\209\001\223\001\059\001\060\001\ -\061\001\035\006\161\000\215\000\155\001\159\002\209\001\175\000\ -\066\001\067\001\154\001\155\001\068\001\069\001\154\001\209\001\ -\186\000\160\002\154\001\163\002\154\001\135\002\013\002\103\003\ -\154\001\154\001\164\002\167\001\063\003\155\001\155\001\167\001\ -\155\001\155\001\064\003\093\005\151\002\154\001\150\000\198\004\ -\165\002\011\003\128\000\198\000\190\005\186\000\094\005\065\003\ -\172\002\199\004\167\001\155\001\173\002\132\001\133\001\134\001\ -\135\001\174\002\137\001\180\002\164\002\146\000\198\000\176\001\ -\186\002\104\003\185\002\176\001\082\000\198\000\215\002\082\000\ -\135\002\190\002\176\001\191\002\154\001\176\001\135\002\225\002\ -\215\002\082\000\227\002\154\001\002\003\082\000\176\001\150\000\ -\186\000\071\001\150\000\198\000\198\000\237\002\082\000\082\000\ -\082\000\082\000\011\003\150\000\018\003\154\001\154\001\198\000\ -\154\001\154\001\025\003\025\003\150\000\082\000\198\000\198\000\ -\030\003\198\000\175\000\166\002\167\002\083\000\032\003\043\003\ -\196\001\197\001\035\003\154\001\044\003\176\001\048\003\044\002\ -\082\000\045\002\083\000\082\000\247\002\249\002\083\000\082\000\ -\082\000\069\003\051\003\046\002\045\003\175\000\082\000\083\000\ -\083\000\083\000\083\000\047\003\082\000\115\002\008\003\116\002\ -\049\003\070\003\198\000\219\002\240\001\220\002\083\000\175\001\ -\082\000\117\002\082\000\175\001\082\000\082\000\051\000\221\002\ -\175\000\037\004\175\001\038\004\090\001\175\001\135\002\062\003\ -\082\000\083\000\150\000\082\000\083\000\039\004\094\003\083\000\ -\083\000\083\000\150\000\086\003\175\000\175\000\083\000\083\000\ -\101\003\175\000\175\000\175\000\108\003\083\000\150\000\175\000\ -\096\004\114\003\097\004\135\002\116\003\175\000\135\002\120\003\ -\130\003\083\000\139\003\083\000\098\004\083\000\083\000\094\000\ -\120\002\150\000\007\003\186\000\071\001\175\001\192\001\120\002\ -\145\003\083\000\120\002\153\003\083\000\175\000\095\000\016\000\ -\083\000\222\001\160\003\172\003\120\002\038\002\039\002\173\003\ -\120\002\047\002\186\003\096\000\245\002\177\002\199\003\013\002\ -\054\003\120\002\120\002\120\002\120\002\077\002\212\003\230\003\ -\229\003\231\003\232\003\048\002\233\003\174\000\031\000\237\003\ -\120\002\070\000\014\004\021\004\027\004\051\004\035\000\047\004\ -\060\004\056\002\105\003\067\004\097\000\010\000\063\002\080\004\ -\208\000\082\004\042\000\120\002\178\002\135\002\120\002\085\004\ -\177\002\120\002\120\002\120\002\135\002\102\004\111\004\116\004\ -\120\002\120\002\098\000\105\004\117\004\150\000\219\000\120\002\ -\127\004\125\004\130\004\150\000\132\004\149\004\099\000\014\000\ -\135\002\053\000\131\004\120\002\164\002\120\002\158\004\120\002\ -\120\002\177\004\190\004\195\004\164\002\192\004\015\000\016\000\ -\203\004\164\002\204\004\120\002\250\004\005\005\120\002\175\000\ -\205\004\206\004\120\002\023\000\214\004\150\000\164\002\207\004\ -\164\002\164\002\211\004\212\004\213\004\221\004\175\000\150\000\ -\225\004\226\004\228\004\150\000\241\004\164\002\031\000\013\005\ -\235\004\074\001\029\005\018\005\013\002\101\005\035\000\024\005\ -\043\005\077\005\025\005\117\005\039\000\028\005\021\003\072\005\ -\164\002\046\005\042\000\164\002\116\005\120\005\164\002\164\002\ -\164\002\121\005\123\005\133\005\136\005\079\003\164\002\143\005\ -\169\002\145\005\129\000\121\000\164\002\164\005\059\005\184\001\ -\202\005\013\002\135\002\205\005\150\000\181\005\050\000\182\005\ -\164\002\053\000\183\005\206\005\164\002\164\002\223\005\150\000\ -\230\005\199\001\174\000\174\000\233\005\174\000\248\005\008\006\ -\164\002\194\002\023\006\164\002\175\000\027\006\041\006\174\000\ -\174\000\216\003\058\006\072\002\073\002\074\002\075\002\250\004\ -\135\002\013\002\023\003\254\005\063\006\066\006\012\003\076\002\ -\064\006\067\006\135\002\072\006\247\003\073\006\150\000\174\000\ -\174\000\002\004\098\006\011\002\075\006\023\003\167\005\093\006\ -\116\006\117\006\111\005\111\006\023\003\150\000\121\006\124\006\ -\120\002\150\000\130\006\120\002\131\006\051\000\089\000\008\000\ -\026\004\021\003\150\000\051\000\005\005\120\002\084\002\025\003\ -\023\003\120\002\023\003\077\002\128\000\089\000\178\002\105\002\ -\252\001\102\002\120\002\120\002\120\002\120\002\023\003\104\002\ -\033\003\023\003\023\003\023\003\065\004\175\000\023\003\036\003\ -\023\003\120\002\135\002\135\002\202\002\221\000\107\002\200\002\ -\020\002\070\000\150\000\200\002\070\000\001\000\002\000\003\000\ -\004\000\005\000\006\000\007\000\120\002\005\005\070\000\120\002\ -\201\002\178\002\120\002\120\002\120\002\201\002\150\000\150\000\ -\150\000\120\002\120\002\070\000\203\002\070\000\070\000\206\002\ -\120\002\023\003\207\002\135\002\208\002\204\002\111\005\149\001\ -\048\004\070\000\070\000\016\006\120\002\232\001\120\002\132\005\ -\120\002\120\002\184\001\217\005\101\006\006\006\072\003\192\003\ -\129\004\149\002\226\005\119\004\120\002\070\000\250\004\120\002\ -\070\000\124\002\084\003\120\002\070\000\070\000\150\000\137\004\ -\210\002\206\001\147\003\070\000\025\003\025\003\150\000\134\005\ -\201\004\070\000\005\005\025\003\250\004\141\002\175\000\208\002\ -\242\004\025\003\182\003\005\005\176\002\070\000\150\000\219\005\ -\025\003\070\000\070\000\194\005\247\005\096\005\025\003\000\000\ -\150\000\113\002\175\000\000\000\000\000\070\000\150\000\000\000\ -\070\000\000\000\174\004\175\004\000\000\000\000\000\000\000\000\ -\000\000\025\003\025\003\021\003\000\000\000\000\000\000\000\000\ -\150\000\000\000\000\000\186\004\000\000\000\000\000\000\148\002\ -\000\000\000\000\021\003\021\003\000\000\000\000\000\000\000\000\ -\194\004\000\000\000\000\000\000\150\000\000\000\150\000\021\003\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\202\004\000\000\000\000\150\000\000\000\000\000\250\004\150\000\ -\000\000\195\000\021\003\175\000\000\000\021\003\000\000\000\000\ -\250\004\000\000\021\003\000\000\000\000\000\000\135\002\184\001\ -\021\003\000\000\174\000\174\000\195\000\000\000\021\003\000\000\ -\000\000\175\000\223\004\195\000\162\000\000\000\173\002\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\021\003\021\003\ -\000\000\000\000\000\000\174\000\174\000\174\000\000\000\162\000\ -\000\000\195\000\021\003\174\000\000\000\021\003\162\000\000\000\ -\000\000\250\004\217\002\000\000\000\000\195\000\000\000\000\000\ -\005\005\000\000\177\000\000\000\195\000\195\000\194\000\195\000\ -\000\000\010\005\174\000\174\000\162\000\162\000\000\000\174\000\ -\150\000\000\000\017\005\174\000\000\000\194\000\011\002\000\000\ -\162\000\000\000\000\000\150\000\000\000\000\000\199\001\162\000\ -\162\000\000\000\162\000\000\000\000\000\199\001\000\000\000\000\ -\194\000\000\000\000\000\250\004\000\000\000\000\000\000\174\000\ -\195\000\000\000\000\000\150\000\150\000\000\000\000\000\022\004\ -\174\000\150\000\150\000\000\000\000\000\000\000\011\002\000\000\ -\000\000\000\000\111\005\150\000\111\005\232\001\000\000\000\000\ -\232\001\005\005\174\000\162\000\000\000\061\003\194\000\150\000\ -\194\000\194\000\232\001\055\005\000\000\057\005\208\000\000\000\ -\232\001\014\003\000\000\000\000\000\000\000\000\000\000\232\001\ -\150\000\232\001\232\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\150\000\000\000\000\000\150\000\232\001\000\000\ -\000\000\000\000\000\000\150\000\150\000\174\000\000\000\000\000\ -\000\000\000\000\097\005\000\000\000\000\000\000\000\000\100\005\ -\000\000\232\001\000\000\000\000\232\001\000\000\094\002\000\000\ -\232\001\232\001\000\000\000\000\000\000\000\000\000\000\232\001\ -\136\000\000\000\137\000\138\000\030\000\232\001\139\000\000\000\ -\000\000\140\000\141\000\173\002\000\000\000\000\000\000\177\000\ -\177\000\232\001\177\000\000\000\000\000\232\001\232\001\000\000\ -\000\000\000\000\142\000\000\000\177\000\177\000\000\000\135\005\ -\000\000\232\001\143\000\144\000\232\001\000\000\000\000\000\000\ -\194\000\000\000\145\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\177\000\003\002\146\000\147\000\ -\000\000\194\000\000\000\000\000\199\001\174\000\000\000\150\005\ -\000\000\152\005\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\174\000\174\000\173\002\000\000\ -\173\002\173\002\173\002\168\005\000\000\000\000\173\002\178\005\ -\179\005\000\000\000\000\173\002\000\000\000\000\000\000\173\002\ -\173\002\173\002\000\000\000\000\000\000\180\003\184\005\000\000\ -\173\002\173\002\173\002\173\002\000\000\000\000\000\000\000\000\ -\174\000\000\000\173\002\000\000\011\002\000\000\000\000\173\002\ -\000\000\174\000\000\000\174\000\197\005\000\000\173\002\173\002\ -\000\000\000\000\000\000\000\000\000\000\011\002\000\000\000\000\ -\194\000\000\000\173\002\000\000\000\000\173\002\173\002\000\000\ -\173\002\173\002\173\002\000\000\173\002\000\000\000\000\173\002\ -\173\002\000\000\000\000\000\000\000\000\194\000\173\002\000\000\ -\000\000\000\000\215\003\000\000\174\000\000\000\000\000\000\000\ -\000\000\173\002\173\002\000\000\173\002\173\002\173\002\173\002\ -\000\000\000\000\173\002\011\002\000\000\000\000\000\000\245\005\ -\000\000\163\000\173\002\173\002\171\000\173\002\000\000\000\000\ -\249\005\173\002\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\163\000\002\006\000\000\000\000\ -\004\006\000\000\000\000\163\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\194\000\180\000\000\000\ -\194\000\194\000\000\000\000\000\194\000\000\000\194\000\000\000\ -\000\000\163\000\163\000\000\000\062\004\000\000\000\000\000\000\ -\194\000\028\006\000\000\000\000\156\002\163\000\094\002\194\000\ -\094\002\094\002\094\002\000\000\163\000\163\000\094\002\163\000\ -\000\000\000\000\000\000\094\002\184\001\000\000\000\000\094\002\ -\094\002\094\002\000\000\000\000\000\000\194\000\000\000\174\000\ -\094\002\094\002\094\002\094\002\000\000\000\000\000\000\000\000\ -\000\000\194\000\094\002\000\000\000\000\000\000\000\000\094\002\ -\194\000\194\000\000\000\194\000\000\000\000\000\094\002\094\002\ -\163\000\000\000\174\000\000\000\000\000\000\000\000\000\177\000\ -\003\002\000\000\094\002\000\000\000\000\094\002\000\000\000\000\ -\094\002\094\002\094\002\000\000\094\002\000\000\000\000\094\002\ -\094\002\000\000\000\000\086\006\000\000\174\000\094\002\000\000\ -\177\000\177\000\177\000\000\000\194\000\000\000\000\000\000\000\ -\177\000\094\002\094\002\000\000\094\002\094\002\094\002\094\002\ -\000\000\174\000\174\000\000\000\000\000\000\000\174\000\174\000\ -\174\000\000\000\094\002\000\000\174\000\094\002\000\000\003\002\ -\177\000\094\002\174\000\000\000\003\002\000\000\000\000\000\000\ -\177\000\114\006\115\006\000\000\011\002\000\000\000\000\000\000\ -\000\000\122\006\000\000\180\000\180\000\000\000\180\000\000\000\ -\000\000\011\002\174\000\000\000\000\000\000\000\000\000\000\000\ -\180\000\180\000\000\000\000\000\177\000\133\006\011\002\000\000\ -\011\002\011\002\000\000\000\000\011\002\177\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\011\002\000\000\250\001\ -\180\000\180\000\178\000\000\000\000\000\000\000\195\000\177\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\011\002\000\000\000\000\194\000\219\004\195\000\011\002\011\002\ -\011\002\000\000\000\000\000\000\171\000\000\000\011\002\171\000\ -\000\000\000\000\000\000\000\000\011\002\000\000\000\000\000\000\ -\195\000\171\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\011\002\000\000\177\000\000\000\011\002\000\000\171\000\171\000\ -\171\000\171\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\011\002\000\000\000\000\011\002\000\000\171\000\000\000\000\000\ -\000\000\011\002\184\001\000\000\174\000\000\000\195\000\000\000\ -\195\000\195\000\000\000\000\000\156\002\000\000\000\000\156\002\ -\171\000\000\000\000\000\174\000\156\002\000\000\000\000\171\000\ -\171\000\156\002\156\002\000\000\000\000\000\000\171\000\156\002\ -\000\000\011\002\177\002\000\000\171\000\000\000\156\002\179\000\ -\156\002\156\002\000\000\000\000\000\000\000\000\000\000\000\000\ -\171\000\000\000\171\000\067\002\171\000\156\002\000\000\000\000\ -\000\000\000\000\000\000\159\001\078\002\000\000\000\000\000\000\ -\171\000\000\000\177\000\171\000\000\000\000\000\011\002\000\000\ -\156\002\000\000\000\000\156\002\000\000\177\002\156\002\156\002\ -\156\002\177\000\177\000\010\000\000\000\157\001\156\002\178\000\ -\178\000\000\000\178\000\156\002\156\002\000\000\000\000\000\000\ -\000\000\174\000\000\000\000\000\178\000\178\000\000\000\000\000\ -\156\002\000\000\181\003\000\000\156\002\156\002\011\002\000\000\ -\195\000\000\000\199\001\000\000\000\000\177\000\000\000\000\000\ -\156\002\000\000\000\000\156\002\178\000\004\002\177\000\000\000\ -\003\002\195\000\000\000\000\000\136\000\000\000\137\000\138\000\ -\030\000\000\000\139\000\000\000\000\000\140\000\141\000\000\000\ -\000\000\000\000\000\000\023\003\000\000\000\000\000\000\000\000\ -\000\000\184\001\000\000\000\000\000\000\000\000\142\000\000\000\ -\023\003\000\000\000\000\000\000\000\000\010\000\143\000\144\000\ -\000\000\003\002\000\000\000\000\054\000\023\003\145\000\023\003\ -\023\003\000\000\174\000\180\000\180\000\000\000\000\000\000\000\ -\000\000\000\000\146\000\147\000\023\003\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\179\000\179\000\000\000\179\000\ -\000\000\000\000\184\001\199\002\180\000\180\000\180\000\023\003\ -\195\000\179\000\179\000\000\000\180\000\000\000\136\000\023\003\ -\137\000\138\000\030\000\000\000\139\000\023\003\081\001\158\001\ -\141\000\000\000\000\000\023\003\000\000\195\000\000\000\000\000\ -\000\000\179\000\179\000\180\000\180\000\000\000\000\000\000\000\ -\180\000\000\000\000\000\023\003\180\000\220\000\220\000\000\000\ -\000\000\144\000\087\001\088\001\089\001\090\001\078\002\023\003\ -\145\000\011\002\023\003\000\000\000\000\000\000\000\000\000\000\ -\000\000\011\002\000\000\000\000\146\000\147\000\011\002\184\001\ -\180\000\186\000\000\000\174\000\177\000\000\000\092\001\093\001\ -\184\001\038\003\000\000\011\002\000\000\011\002\011\002\000\000\ -\000\000\000\000\095\001\096\001\097\001\098\001\000\000\174\000\ -\195\000\195\000\011\002\180\000\195\000\000\000\195\000\003\002\ -\130\001\131\001\000\000\100\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\011\002\000\000\000\000\ -\011\002\000\000\000\000\011\002\011\002\011\002\000\000\000\000\ -\000\000\000\000\177\000\011\002\000\000\000\000\000\000\000\000\ -\159\001\011\002\186\002\000\000\190\002\000\000\038\003\159\001\ -\000\000\159\001\000\000\000\000\000\000\011\002\177\000\003\002\ -\000\000\011\002\011\002\177\000\177\000\177\000\000\000\000\000\ -\174\000\177\000\184\001\000\000\000\000\011\002\000\000\177\000\ -\011\002\000\000\000\000\000\000\000\000\000\000\000\000\178\000\ -\004\002\000\000\000\000\000\000\000\000\000\000\174\000\000\000\ -\167\001\000\000\000\000\000\000\000\000\000\000\000\000\177\000\ -\138\002\180\003\000\000\000\000\000\000\168\001\000\000\000\000\ -\178\000\178\000\178\000\000\000\081\001\000\000\000\000\000\000\ -\178\000\000\000\000\000\000\000\000\000\048\006\000\000\000\000\ -\136\000\000\000\137\000\138\000\030\000\184\001\139\000\000\000\ -\060\006\169\001\141\000\000\000\054\000\000\000\180\000\004\002\ -\178\000\088\001\089\001\090\001\004\002\000\000\000\000\000\000\ -\178\000\054\000\000\000\000\000\000\000\180\000\180\000\000\000\ -\179\002\180\003\000\000\144\000\000\000\000\000\054\000\000\000\ -\054\000\054\000\145\000\000\000\092\001\093\001\000\000\000\000\ -\000\000\000\000\000\000\000\000\178\000\054\000\146\000\147\000\ -\095\001\096\001\097\001\098\001\000\000\178\000\000\000\000\000\ -\000\000\180\000\000\000\000\000\179\000\179\000\000\000\000\000\ -\054\000\100\001\180\000\054\000\180\000\000\000\184\001\178\000\ -\054\000\003\002\000\000\000\000\000\000\000\000\054\000\000\000\ -\000\000\000\000\000\000\195\000\054\000\179\000\179\000\179\000\ -\003\002\000\000\000\000\000\000\000\000\179\000\179\000\000\000\ -\054\000\000\000\000\000\000\000\054\000\054\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\180\000\000\000\000\000\ -\054\000\000\000\178\000\054\000\179\000\179\000\000\000\000\000\ -\000\000\179\000\000\000\000\000\000\000\179\000\000\000\079\002\ -\080\002\081\002\082\002\083\002\084\002\085\002\086\002\087\002\ -\088\002\089\002\090\002\091\002\092\002\093\002\094\002\095\002\ -\096\002\097\002\098\002\099\002\182\002\102\002\000\000\000\000\ -\103\002\179\000\000\000\105\002\000\000\106\002\000\000\107\002\ -\000\000\108\002\179\000\109\002\000\000\000\000\003\002\000\000\ -\000\000\000\000\000\000\159\001\000\000\000\000\000\000\000\000\ -\126\002\000\000\000\000\000\000\179\000\000\000\000\000\186\002\ -\000\000\190\002\000\000\078\002\000\000\000\000\000\000\142\002\ -\000\000\143\002\000\000\000\000\000\000\000\000\186\002\186\002\ -\190\002\190\002\178\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\158\002\000\000\186\002\000\000\190\002\000\000\000\000\ -\180\000\178\000\178\000\000\000\138\002\000\000\000\000\179\000\ -\000\000\057\000\000\000\194\000\000\000\000\000\186\002\000\000\ -\190\002\186\002\000\000\190\002\000\000\000\000\186\002\000\000\ -\190\002\000\000\000\000\180\000\186\002\000\000\190\002\003\002\ -\000\000\000\000\186\002\213\002\190\002\178\000\000\000\000\000\ -\000\000\000\000\000\000\138\002\000\000\000\000\178\000\000\000\ -\004\002\000\000\186\002\186\002\190\002\190\002\180\000\000\000\ -\000\000\000\000\228\002\000\000\000\000\000\000\186\002\000\000\ -\190\002\186\002\212\002\190\002\213\002\000\000\000\000\000\000\ -\000\000\000\000\180\000\180\000\000\000\000\000\160\004\180\000\ -\180\000\180\000\000\000\000\000\213\002\180\000\213\002\213\002\ -\213\002\004\002\213\002\180\000\000\000\213\002\213\002\179\000\ -\000\000\003\003\136\000\006\003\137\000\138\000\030\000\000\000\ -\139\000\000\000\000\000\140\000\141\000\000\000\179\000\179\000\ -\000\000\020\003\000\000\180\000\000\000\177\001\022\003\213\002\ -\000\000\000\000\000\000\000\000\142\000\000\000\213\002\000\000\ -\003\002\000\000\000\000\000\000\143\000\144\000\000\000\194\000\ -\000\000\229\002\213\002\213\002\145\000\000\000\000\000\000\000\ -\000\000\000\000\179\000\000\000\003\002\000\000\000\000\000\000\ -\146\000\147\000\000\000\179\000\000\000\179\000\000\000\000\000\ -\000\000\000\000\000\000\220\000\220\000\000\000\000\000\000\000\ -\000\000\159\001\000\000\000\000\000\000\000\000\073\004\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\138\002\000\000\ -\000\000\247\000\000\000\000\000\182\002\000\000\000\000\182\002\ -\000\000\000\000\000\000\000\000\178\000\000\000\179\000\089\003\ -\000\000\182\002\000\000\000\000\095\003\096\003\097\003\000\000\ -\000\000\000\000\000\000\000\000\000\000\003\002\182\002\182\002\ -\182\002\182\002\000\000\099\003\000\000\180\000\102\003\004\002\ -\000\000\000\000\000\000\000\000\000\000\182\002\000\000\000\000\ -\000\000\138\002\000\000\003\002\180\000\000\000\000\000\138\002\ -\000\000\000\000\000\000\000\000\000\000\000\000\045\006\000\000\ -\182\002\000\000\178\000\000\000\173\002\000\000\182\002\182\002\ -\182\002\000\000\000\000\000\000\000\000\173\002\182\002\000\000\ -\000\000\057\000\000\000\000\000\182\002\000\000\178\000\004\002\ -\000\000\000\000\000\000\178\000\178\000\178\000\057\000\000\000\ -\182\002\178\000\182\002\000\000\182\002\173\002\000\000\178\000\ -\173\002\000\000\000\000\057\000\000\000\057\000\057\000\000\000\ -\182\002\173\002\011\002\182\002\000\000\000\000\078\006\161\003\ -\000\000\179\000\057\000\000\000\165\003\166\003\167\003\178\000\ -\000\000\014\003\180\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\183\003\000\000\057\000\000\000\000\000\ -\057\000\000\000\000\000\000\000\179\000\057\000\000\000\138\002\ -\000\000\000\000\000\000\057\000\000\000\000\000\000\000\000\000\ -\000\000\057\000\000\000\200\003\000\000\000\000\203\003\000\000\ -\000\000\000\000\000\000\000\000\000\000\057\000\000\000\179\000\ -\000\000\057\000\057\000\210\003\138\002\000\000\000\000\138\002\ -\136\000\000\000\137\000\138\000\030\000\057\000\139\000\000\000\ -\057\000\140\000\141\000\179\000\179\000\232\004\000\000\000\000\ -\179\000\179\000\179\000\000\000\000\000\000\000\179\000\000\000\ -\000\000\000\000\142\000\180\000\179\000\000\000\000\000\000\000\ -\000\000\000\000\143\000\126\003\000\000\000\000\000\000\000\000\ -\032\000\000\000\145\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\004\002\000\000\000\000\179\000\151\004\146\000\147\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\004\002\000\000\000\000\000\000\000\000\000\000\000\000\040\004\ -\000\000\247\000\247\000\247\000\247\000\000\000\138\002\000\000\ -\000\000\247\000\247\000\247\000\000\000\138\002\247\000\247\000\ -\000\000\247\000\247\000\247\000\247\000\247\000\247\000\000\000\ -\000\000\247\000\247\000\247\000\247\000\247\000\247\000\000\000\ -\000\000\138\002\078\004\000\000\000\000\247\000\247\000\000\000\ -\000\000\247\000\247\000\247\000\247\000\000\000\081\000\000\000\ -\000\000\247\000\247\000\000\000\180\000\255\004\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\247\000\247\000\000\000\ -\247\000\000\000\000\000\247\000\247\000\247\000\004\002\247\000\ -\180\000\000\000\247\000\247\000\000\000\000\000\000\000\000\000\ -\000\000\247\000\000\000\247\000\000\000\000\000\179\000\118\004\ -\000\000\000\000\000\000\000\000\247\000\247\000\000\000\247\000\ -\247\000\247\000\247\000\000\000\000\000\179\000\000\000\000\000\ -\247\000\000\000\247\000\000\000\141\004\247\000\000\000\159\001\ -\247\000\000\000\011\002\000\000\247\000\011\002\000\000\148\004\ -\000\000\000\000\011\002\138\002\000\000\000\000\000\000\011\002\ -\000\000\000\000\000\000\195\000\000\000\011\002\023\003\000\000\ -\000\000\180\000\000\000\000\000\011\002\000\000\011\002\011\002\ -\000\000\000\000\000\000\023\003\000\000\000\000\000\000\004\002\ -\000\000\000\000\000\000\011\002\179\004\000\000\181\004\180\000\ -\255\004\138\002\000\000\000\000\000\000\000\000\023\003\000\000\ -\023\003\023\003\023\003\138\002\023\003\000\000\011\002\023\003\ -\023\003\011\002\000\000\179\000\011\002\011\002\011\002\000\000\ -\159\001\000\000\000\000\113\005\011\002\000\000\000\000\000\000\ -\000\000\000\000\011\002\000\000\000\000\000\000\208\004\209\004\ -\210\004\023\003\000\000\000\000\229\000\000\000\011\002\000\000\ -\023\003\000\000\011\002\011\002\000\000\216\004\000\000\000\000\ -\000\000\000\000\000\000\000\000\023\003\023\003\011\002\000\000\ -\032\000\011\002\000\000\032\000\000\000\000\000\000\000\000\000\ -\000\000\230\004\000\000\138\002\138\002\032\000\032\000\000\000\ -\000\000\032\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\004\002\000\000\032\000\032\000\032\000\032\000\000\000\195\000\ -\000\000\238\004\239\004\240\004\179\000\000\000\000\000\000\000\ -\032\000\032\000\000\000\000\000\004\002\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\138\002\000\000\000\000\113\005\ -\000\000\000\000\000\000\000\000\032\000\000\000\000\000\032\000\ -\000\000\000\000\000\000\032\000\032\000\000\000\000\000\185\005\ -\186\005\032\000\032\000\030\005\000\000\000\000\081\000\255\004\ -\032\000\081\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\081\000\032\000\000\000\032\000\081\000\ -\032\000\032\000\000\000\000\000\000\000\255\004\000\000\000\000\ -\081\000\081\000\081\000\081\000\032\000\004\002\000\000\032\000\ -\000\000\060\002\000\000\032\000\000\000\000\000\052\005\081\000\ -\054\005\000\000\056\005\016\003\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\004\002\000\000\179\000\000\000\000\000\ -\000\000\000\000\081\000\000\000\000\000\081\000\078\005\079\005\ -\080\005\081\000\081\000\000\000\087\005\088\005\089\005\000\000\ -\081\000\179\000\000\000\000\000\000\000\000\000\081\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\081\000\000\000\081\000\103\005\081\000\081\000\ -\000\000\113\005\136\000\000\000\137\000\138\000\030\000\255\004\ -\139\000\118\005\081\000\140\000\141\000\081\000\000\000\000\000\ -\000\000\255\004\125\005\000\000\000\000\000\000\129\005\138\002\ -\000\000\000\000\000\000\000\000\142\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\143\000\144\000\000\000\000\000\ -\000\000\000\000\179\000\000\000\145\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\146\000\147\000\000\000\000\000\229\000\229\000\229\000\229\000\ -\179\000\000\000\255\004\000\000\229\000\229\000\229\000\000\000\ -\000\000\229\000\229\000\229\000\229\000\229\000\229\000\229\000\ -\229\000\229\000\000\000\000\000\229\000\229\000\229\000\229\000\ -\229\000\229\000\000\000\122\002\000\000\000\000\000\000\000\000\ -\229\000\229\000\000\000\000\000\229\000\229\000\229\000\229\000\ -\229\000\229\000\229\000\000\000\229\000\229\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\255\004\000\000\000\000\000\000\ -\229\000\229\000\000\000\229\000\000\000\000\000\229\000\229\000\ -\229\000\000\000\229\000\229\000\229\000\229\000\229\000\000\000\ -\000\000\000\000\000\000\113\005\229\000\113\005\229\000\229\000\ -\229\000\229\000\229\000\000\000\000\000\000\000\000\000\229\000\ -\229\000\000\000\229\000\229\000\229\000\229\000\000\000\000\000\ -\229\000\000\000\000\000\229\000\000\000\229\000\000\000\000\000\ -\229\000\000\000\000\000\229\000\000\000\000\000\000\000\229\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\239\005\000\000\000\000\000\000\014\000\000\000\000\000\000\000\ -\000\000\060\002\000\000\060\002\060\002\060\002\250\005\251\005\ -\252\005\060\002\000\000\015\000\016\000\000\000\060\002\164\002\ -\000\000\000\000\060\002\060\002\060\002\000\000\000\000\000\000\ -\023\000\000\000\007\006\060\002\060\002\060\002\060\002\000\000\ -\000\000\000\000\000\000\000\000\000\000\060\002\000\000\018\006\ -\000\000\060\002\060\002\031\000\000\000\022\006\074\001\000\000\ -\000\000\060\002\060\002\035\000\000\000\000\000\000\000\000\000\ -\000\000\039\000\000\000\000\000\000\000\060\002\037\006\042\000\ -\060\002\000\000\000\000\060\002\060\002\060\002\046\006\060\002\ -\000\000\000\000\060\002\060\002\000\000\000\000\000\000\046\000\ -\000\000\060\002\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\050\000\060\002\060\002\053\000\060\002\ -\060\002\060\002\000\000\000\000\000\000\060\002\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\060\002\000\000\000\000\ -\060\002\000\000\000\000\000\000\060\002\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\079\006\080\006\ -\000\000\000\000\000\000\041\001\000\000\082\006\083\006\084\006\ -\085\006\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\089\006\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\122\002\122\002\122\002\122\002\000\000\ -\099\006\122\002\122\002\122\002\122\002\122\002\122\002\122\002\ -\122\002\122\002\122\002\122\002\122\002\122\002\122\002\122\002\ -\122\002\122\002\000\000\122\002\122\002\122\002\122\002\122\002\ -\122\002\122\002\122\002\000\000\000\000\000\000\000\000\122\002\ -\122\002\000\000\000\000\122\002\122\002\122\002\122\002\122\002\ -\122\002\122\002\122\002\122\002\122\002\122\002\122\002\000\000\ -\122\002\122\002\122\002\122\002\000\000\000\000\122\002\122\002\ -\122\002\110\002\122\002\122\002\122\002\122\002\122\002\122\002\ -\000\000\122\002\122\002\122\002\122\002\122\002\000\000\122\002\ -\000\000\000\000\000\000\122\002\122\002\122\002\122\002\122\002\ -\122\002\122\002\122\002\000\000\122\002\000\000\122\002\122\002\ -\061\001\122\002\122\002\122\002\122\002\122\002\000\000\122\002\ -\122\002\000\000\122\002\122\002\122\002\122\002\000\000\122\002\ -\122\002\000\000\122\002\000\000\000\000\000\000\122\002\164\002\ -\164\002\164\002\164\002\164\002\000\000\164\002\164\002\164\002\ -\164\002\164\002\164\002\164\002\164\002\164\002\164\002\164\002\ -\164\002\164\002\164\002\164\002\164\002\000\000\000\000\164\002\ -\164\002\164\002\164\002\164\002\164\002\164\002\164\002\000\000\ -\000\000\000\000\000\000\164\002\164\002\000\000\000\000\164\002\ -\164\002\164\002\164\002\164\002\164\002\164\002\164\002\164\002\ -\164\002\164\002\164\002\000\000\164\002\164\002\164\002\164\002\ -\000\000\000\000\164\002\164\002\164\002\000\000\164\002\164\002\ -\164\002\164\002\164\002\164\002\000\000\164\002\164\002\164\002\ -\164\002\164\002\000\000\164\002\000\000\000\000\000\000\164\002\ -\164\002\164\002\164\002\164\002\164\002\164\002\164\002\000\000\ -\164\002\000\000\164\002\164\002\047\001\164\002\164\002\164\002\ -\164\002\164\002\000\000\164\002\164\002\000\000\164\002\164\002\ -\164\002\164\002\000\000\164\002\164\002\000\000\164\002\000\000\ -\000\000\000\000\164\002\041\001\041\001\041\001\041\001\000\000\ -\000\000\041\001\041\001\041\001\041\001\041\001\041\001\041\001\ -\041\001\041\001\041\001\041\001\041\001\041\001\041\001\041\001\ -\041\001\041\001\000\000\041\001\041\001\041\001\041\001\041\001\ -\041\001\041\001\041\001\000\000\000\000\000\000\000\000\041\001\ -\041\001\000\000\000\000\041\001\041\001\041\001\041\001\041\001\ -\041\001\041\001\041\001\041\001\041\001\041\001\041\001\000\000\ -\041\001\041\001\041\001\041\001\000\000\000\000\041\001\041\001\ -\041\001\000\000\041\001\041\001\041\001\041\001\041\001\041\001\ -\000\000\041\001\041\001\041\001\041\001\041\001\000\000\041\001\ -\000\000\000\000\000\000\041\001\041\001\041\001\041\001\041\001\ -\041\001\041\001\041\001\000\000\041\001\000\000\041\001\041\001\ -\045\001\041\001\041\001\041\001\041\001\041\001\000\000\041\001\ -\041\001\000\000\041\001\041\001\041\001\041\001\000\000\041\001\ -\041\001\000\000\041\001\000\000\000\000\000\000\041\001\000\000\ -\061\001\061\001\061\001\061\001\000\000\000\000\061\001\061\001\ -\061\001\061\001\061\001\061\001\061\001\061\001\061\001\061\001\ -\061\001\061\001\061\001\061\001\061\001\061\001\061\001\000\000\ -\061\001\061\001\061\001\061\001\061\001\061\001\061\001\061\001\ -\000\000\000\000\000\000\000\000\061\001\061\001\000\000\000\000\ -\061\001\061\001\061\001\061\001\061\001\061\001\061\001\061\001\ -\061\001\061\001\061\001\061\001\000\000\061\001\061\001\061\001\ -\061\001\000\000\000\000\061\001\061\001\061\001\000\000\061\001\ -\061\001\061\001\061\001\061\001\061\001\000\000\061\001\061\001\ -\061\001\061\001\061\001\000\000\061\001\000\000\000\000\000\000\ -\061\001\061\001\061\001\061\001\061\001\061\001\061\001\061\001\ -\000\000\061\001\000\000\061\001\061\001\053\001\061\001\061\001\ -\061\001\061\001\061\001\000\000\061\001\061\001\000\000\061\001\ -\061\001\061\001\061\001\000\000\061\001\061\001\000\000\061\001\ -\000\000\000\000\000\000\061\001\047\001\047\001\047\001\047\001\ -\000\000\000\000\047\001\047\001\047\001\047\001\047\001\047\001\ -\047\001\047\001\047\001\047\001\047\001\047\001\047\001\047\001\ -\047\001\047\001\047\001\000\000\047\001\047\001\047\001\047\001\ -\047\001\047\001\047\001\047\001\000\000\000\000\000\000\000\000\ -\047\001\047\001\000\000\000\000\047\001\047\001\047\001\047\001\ -\047\001\047\001\047\001\047\001\047\001\047\001\047\001\047\001\ -\000\000\047\001\047\001\047\001\047\001\000\000\000\000\047\001\ -\047\001\047\001\000\000\047\001\047\001\047\001\047\001\047\001\ -\047\001\000\000\047\001\047\001\047\001\047\001\047\001\000\000\ -\047\001\000\000\000\000\000\000\047\001\047\001\047\001\047\001\ -\047\001\047\001\047\001\047\001\000\000\047\001\000\000\047\001\ -\047\001\049\001\047\001\047\001\047\001\047\001\047\001\000\000\ -\047\001\047\001\000\000\047\001\047\001\047\001\047\001\000\000\ -\047\001\047\001\000\000\047\001\000\000\000\000\000\000\047\001\ -\045\001\045\001\045\001\045\001\000\000\000\000\045\001\045\001\ -\045\001\045\001\045\001\045\001\045\001\045\001\045\001\045\001\ -\045\001\045\001\045\001\045\001\045\001\045\001\045\001\000\000\ -\045\001\045\001\045\001\045\001\045\001\045\001\045\001\045\001\ -\000\000\000\000\000\000\000\000\045\001\045\001\000\000\000\000\ -\045\001\045\001\045\001\045\001\045\001\045\001\045\001\045\001\ -\045\001\045\001\045\001\045\001\000\000\045\001\045\001\045\001\ -\045\001\000\000\000\000\045\001\045\001\045\001\000\000\045\001\ -\045\001\045\001\045\001\045\001\045\001\000\000\045\001\045\001\ -\045\001\045\001\045\001\000\000\045\001\000\000\000\000\000\000\ -\045\001\045\001\045\001\045\001\045\001\045\001\045\001\045\001\ -\000\000\045\001\000\000\045\001\045\001\051\001\045\001\045\001\ -\045\001\045\001\045\001\000\000\045\001\045\001\000\000\045\001\ -\045\001\045\001\045\001\000\000\045\001\045\001\000\000\045\001\ -\000\000\000\000\000\000\045\001\000\000\053\001\053\001\053\001\ -\053\001\000\000\000\000\053\001\053\001\053\001\053\001\053\001\ -\053\001\053\001\053\001\053\001\053\001\053\001\053\001\053\001\ -\053\001\053\001\053\001\053\001\000\000\053\001\053\001\053\001\ -\053\001\053\001\053\001\053\001\053\001\000\000\000\000\000\000\ -\000\000\053\001\053\001\000\000\000\000\053\001\053\001\053\001\ -\053\001\053\001\053\001\053\001\053\001\053\001\053\001\053\001\ -\053\001\000\000\053\001\053\001\053\001\053\001\000\000\000\000\ -\053\001\053\001\053\001\000\000\053\001\053\001\053\001\053\001\ -\053\001\053\001\000\000\053\001\053\001\053\001\053\001\053\001\ -\000\000\053\001\000\000\000\000\000\000\053\001\053\001\053\001\ -\053\001\053\001\053\001\053\001\053\001\000\000\053\001\000\000\ -\053\001\053\001\059\001\053\001\053\001\053\001\053\001\053\001\ -\000\000\053\001\053\001\000\000\053\001\053\001\053\001\053\001\ -\000\000\053\001\053\001\000\000\053\001\000\000\000\000\000\000\ -\053\001\049\001\049\001\049\001\049\001\000\000\000\000\049\001\ -\049\001\049\001\049\001\049\001\049\001\049\001\049\001\049\001\ -\049\001\049\001\049\001\049\001\049\001\049\001\049\001\049\001\ -\000\000\049\001\049\001\049\001\049\001\049\001\049\001\049\001\ -\049\001\000\000\000\000\000\000\000\000\049\001\049\001\000\000\ -\000\000\049\001\049\001\049\001\049\001\049\001\049\001\049\001\ -\049\001\049\001\049\001\049\001\049\001\000\000\049\001\049\001\ -\049\001\049\001\000\000\000\000\049\001\049\001\049\001\000\000\ -\049\001\049\001\049\001\049\001\049\001\049\001\000\000\049\001\ -\049\001\049\001\049\001\049\001\000\000\049\001\000\000\000\000\ -\000\000\049\001\049\001\049\001\049\001\049\001\049\001\049\001\ -\049\001\000\000\049\001\000\000\049\001\049\001\055\001\049\001\ -\049\001\049\001\049\001\049\001\000\000\049\001\049\001\000\000\ -\049\001\049\001\049\001\049\001\000\000\049\001\049\001\000\000\ -\049\001\000\000\000\000\000\000\049\001\051\001\051\001\051\001\ -\051\001\000\000\000\000\051\001\051\001\051\001\051\001\051\001\ -\051\001\051\001\051\001\051\001\051\001\051\001\051\001\051\001\ -\051\001\051\001\051\001\051\001\000\000\051\001\051\001\051\001\ -\051\001\051\001\051\001\051\001\051\001\000\000\000\000\000\000\ -\000\000\051\001\051\001\000\000\000\000\051\001\051\001\051\001\ -\051\001\051\001\051\001\051\001\051\001\051\001\051\001\051\001\ -\051\001\000\000\051\001\051\001\051\001\051\001\000\000\000\000\ -\051\001\051\001\051\001\000\000\051\001\051\001\051\001\051\001\ -\051\001\051\001\000\000\051\001\051\001\051\001\051\001\051\001\ -\000\000\051\001\000\000\000\000\000\000\051\001\051\001\051\001\ -\051\001\051\001\051\001\051\001\051\001\000\000\051\001\000\000\ -\051\001\051\001\057\001\051\001\051\001\051\001\051\001\051\001\ -\000\000\051\001\051\001\000\000\051\001\051\001\051\001\051\001\ -\000\000\051\001\051\001\000\000\051\001\000\000\000\000\000\000\ -\051\001\000\000\059\001\059\001\059\001\059\001\000\000\000\000\ -\059\001\059\001\059\001\059\001\059\001\059\001\059\001\059\001\ -\059\001\059\001\059\001\059\001\059\001\059\001\059\001\059\001\ -\059\001\000\000\059\001\059\001\059\001\059\001\059\001\059\001\ -\059\001\059\001\000\000\000\000\000\000\000\000\059\001\059\001\ -\000\000\000\000\059\001\059\001\059\001\059\001\059\001\059\001\ -\059\001\059\001\059\001\059\001\059\001\059\001\000\000\059\001\ -\059\001\059\001\059\001\000\000\000\000\059\001\059\001\059\001\ -\000\000\059\001\059\001\059\001\059\001\059\001\059\001\000\000\ -\059\001\059\001\059\001\059\001\059\001\000\000\059\001\000\000\ -\000\000\000\000\059\001\059\001\059\001\059\001\059\001\059\001\ -\059\001\059\001\000\000\059\001\000\000\059\001\059\001\088\001\ -\059\001\059\001\059\001\059\001\059\001\000\000\059\001\059\001\ -\000\000\059\001\059\001\059\001\059\001\000\000\059\001\059\001\ -\000\000\059\001\000\000\000\000\000\000\059\001\055\001\055\001\ -\055\001\055\001\000\000\000\000\055\001\055\001\055\001\055\001\ -\055\001\055\001\055\001\055\001\055\001\055\001\055\001\055\001\ -\055\001\055\001\055\001\055\001\055\001\000\000\055\001\055\001\ -\055\001\055\001\055\001\055\001\055\001\055\001\000\000\000\000\ -\000\000\000\000\055\001\055\001\000\000\000\000\055\001\055\001\ -\055\001\055\001\055\001\055\001\055\001\055\001\055\001\055\001\ -\055\001\055\001\000\000\055\001\055\001\055\001\055\001\000\000\ -\000\000\055\001\055\001\055\001\000\000\055\001\055\001\055\001\ -\055\001\055\001\055\001\000\000\055\001\055\001\055\001\055\001\ -\055\001\000\000\055\001\000\000\000\000\000\000\055\001\055\001\ -\055\001\055\001\055\001\055\001\055\001\055\001\000\000\055\001\ -\000\000\055\001\055\001\097\001\055\001\055\001\055\001\055\001\ -\055\001\000\000\055\001\055\001\000\000\055\001\055\001\055\001\ -\055\001\000\000\055\001\055\001\000\000\055\001\000\000\000\000\ -\000\000\055\001\057\001\057\001\057\001\057\001\000\000\000\000\ -\057\001\057\001\057\001\057\001\057\001\057\001\057\001\057\001\ -\057\001\057\001\057\001\057\001\057\001\057\001\057\001\057\001\ -\057\001\000\000\057\001\057\001\057\001\057\001\057\001\057\001\ -\057\001\057\001\000\000\000\000\000\000\000\000\057\001\057\001\ -\000\000\000\000\057\001\057\001\057\001\057\001\057\001\057\001\ -\057\001\057\001\057\001\057\001\057\001\057\001\000\000\057\001\ -\057\001\057\001\057\001\000\000\000\000\057\001\057\001\057\001\ -\000\000\057\001\057\001\057\001\057\001\057\001\057\001\000\000\ -\057\001\057\001\057\001\057\001\057\001\000\000\057\001\000\000\ -\000\000\000\000\057\001\057\001\057\001\057\001\057\001\057\001\ -\057\001\057\001\000\000\057\001\000\000\057\001\057\001\099\001\ -\057\001\057\001\057\001\057\001\057\001\000\000\057\001\057\001\ -\000\000\057\001\057\001\057\001\057\001\000\000\057\001\057\001\ -\000\000\057\001\000\000\000\000\000\000\057\001\000\000\088\001\ -\088\001\088\001\088\001\088\001\000\000\088\001\088\001\088\001\ -\088\001\088\001\088\001\088\001\088\001\088\001\088\001\088\001\ -\088\001\088\001\088\001\088\001\088\001\000\000\000\000\088\001\ -\088\001\088\001\088\001\088\001\088\001\088\001\088\001\000\000\ -\000\000\000\000\000\000\088\001\088\001\000\000\000\000\088\001\ -\088\001\088\001\088\001\088\001\088\001\088\001\000\000\088\001\ -\088\001\088\001\088\001\000\000\088\001\088\001\088\001\088\001\ -\000\000\000\000\088\001\088\001\088\001\000\000\088\001\088\001\ -\088\001\088\001\088\001\088\001\000\000\088\001\088\001\088\001\ -\088\001\088\001\000\000\088\001\000\000\000\000\000\000\088\001\ -\088\001\088\001\088\001\088\001\088\001\088\001\088\001\000\000\ -\088\001\000\000\088\001\088\001\102\001\088\001\088\001\088\001\ -\088\001\088\001\000\000\088\001\088\001\000\000\088\001\088\001\ -\088\001\088\001\000\000\088\001\088\001\000\000\088\001\000\000\ -\000\000\000\000\088\001\097\001\097\001\097\001\097\001\097\001\ -\000\000\097\001\097\001\097\001\097\001\097\001\097\001\097\001\ -\097\001\097\001\097\001\097\001\097\001\097\001\097\001\097\001\ -\097\001\000\000\000\000\097\001\097\001\097\001\097\001\097\001\ -\097\001\097\001\097\001\000\000\000\000\000\000\000\000\097\001\ -\097\001\000\000\000\000\097\001\097\001\097\001\097\001\097\001\ -\097\001\097\001\000\000\097\001\097\001\097\001\097\001\000\000\ -\097\001\097\001\097\001\097\001\000\000\000\000\097\001\097\001\ -\097\001\000\000\097\001\097\001\097\001\097\001\097\001\097\001\ -\000\000\097\001\097\001\097\001\097\001\097\001\000\000\097\001\ -\000\000\000\000\000\000\097\001\097\001\097\001\097\001\097\001\ -\097\001\097\001\097\001\000\000\097\001\000\000\097\001\097\001\ -\033\001\097\001\097\001\097\001\000\000\000\000\000\000\097\001\ -\097\001\000\000\097\001\097\001\097\001\097\001\000\000\097\001\ -\097\001\000\000\097\001\000\000\000\000\000\000\097\001\099\001\ -\099\001\099\001\099\001\099\001\000\000\099\001\099\001\099\001\ -\099\001\099\001\099\001\099\001\099\001\099\001\099\001\099\001\ -\099\001\099\001\099\001\099\001\099\001\000\000\000\000\099\001\ -\099\001\099\001\099\001\099\001\099\001\099\001\099\001\000\000\ -\000\000\000\000\000\000\099\001\099\001\000\000\000\000\099\001\ -\099\001\099\001\099\001\099\001\099\001\099\001\000\000\099\001\ -\099\001\099\001\099\001\000\000\099\001\099\001\099\001\099\001\ -\000\000\000\000\099\001\099\001\099\001\000\000\099\001\099\001\ -\099\001\099\001\099\001\099\001\000\000\099\001\099\001\099\001\ -\099\001\099\001\000\000\099\001\000\000\000\000\000\000\099\001\ -\099\001\099\001\099\001\099\001\099\001\099\001\099\001\000\000\ -\099\001\000\000\099\001\099\001\034\001\099\001\099\001\099\001\ -\000\000\000\000\000\000\099\001\099\001\000\000\099\001\099\001\ -\099\001\099\001\000\000\099\001\099\001\000\000\099\001\000\000\ -\000\000\000\000\099\001\000\000\102\001\102\001\102\001\102\001\ -\102\001\000\000\102\001\102\001\102\001\102\001\102\001\102\001\ -\102\001\102\001\102\001\102\001\102\001\102\001\102\001\102\001\ -\102\001\102\001\000\000\000\000\102\001\102\001\102\001\102\001\ -\102\001\102\001\102\001\102\001\000\000\000\000\000\000\000\000\ -\102\001\102\001\000\000\000\000\102\001\102\001\102\001\102\001\ -\102\001\102\001\102\001\000\000\102\001\102\001\102\001\102\001\ -\000\000\102\001\102\001\102\001\102\001\000\000\000\000\102\001\ -\102\001\102\001\000\000\102\001\102\001\102\001\102\001\102\001\ -\102\001\000\000\102\001\102\001\102\001\102\001\102\001\000\000\ -\102\001\000\000\000\000\000\000\102\001\102\001\102\001\102\001\ -\102\001\102\001\102\001\102\001\000\000\102\001\000\000\102\001\ -\102\001\228\000\102\001\102\001\102\001\000\000\000\000\000\000\ -\102\001\102\001\000\000\102\001\102\001\102\001\102\001\000\000\ -\102\001\102\001\000\000\102\001\000\000\000\000\000\000\102\001\ -\033\001\033\001\033\001\033\001\000\000\000\000\000\000\000\000\ -\033\001\033\001\033\001\000\000\000\000\033\001\033\001\033\001\ -\033\001\033\001\033\001\033\001\033\001\033\001\033\001\000\000\ -\033\001\033\001\033\001\033\001\033\001\033\001\000\000\000\000\ -\000\000\000\000\000\000\000\000\033\001\033\001\000\000\000\000\ -\033\001\033\001\033\001\033\001\033\001\033\001\033\001\033\001\ -\033\001\033\001\000\000\033\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\033\001\033\001\000\000\033\001\ -\000\000\000\000\033\001\033\001\033\001\000\000\033\001\033\001\ -\033\001\033\001\033\001\000\000\000\000\000\000\000\000\000\000\ -\033\001\033\001\033\001\033\001\033\001\033\001\033\001\000\000\ -\000\000\033\001\000\000\033\001\033\001\240\000\033\001\033\001\ -\033\001\033\001\033\001\000\000\033\001\000\000\000\000\033\001\ -\033\001\033\001\000\000\000\000\033\001\000\000\000\000\033\001\ -\000\000\000\000\000\000\033\001\034\001\034\001\034\001\034\001\ -\000\000\000\000\000\000\000\000\034\001\034\001\034\001\000\000\ -\000\000\034\001\034\001\034\001\034\001\034\001\034\001\034\001\ -\034\001\034\001\034\001\000\000\034\001\034\001\034\001\034\001\ -\034\001\034\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\034\001\034\001\000\000\000\000\034\001\034\001\034\001\034\001\ -\034\001\034\001\034\001\034\001\034\001\034\001\000\000\034\001\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\034\001\034\001\000\000\034\001\000\000\000\000\034\001\034\001\ -\034\001\000\000\034\001\034\001\034\001\034\001\034\001\000\000\ -\000\000\000\000\000\000\000\000\034\001\034\001\034\001\034\001\ -\034\001\034\001\034\001\000\000\000\000\034\001\000\000\034\001\ -\034\001\241\000\034\001\034\001\034\001\034\001\034\001\000\000\ -\034\001\000\000\000\000\034\001\034\001\034\001\000\000\000\000\ -\034\001\000\000\000\000\034\001\000\000\000\000\000\000\034\001\ -\000\000\228\000\228\000\228\000\228\000\000\000\000\000\000\000\ -\000\000\228\000\228\000\228\000\000\000\000\000\228\000\228\000\ -\228\000\228\000\228\000\228\000\228\000\228\000\228\000\000\000\ -\000\000\228\000\228\000\228\000\228\000\228\000\228\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\228\000\228\000\000\000\ -\000\000\228\000\228\000\228\000\228\000\228\000\228\000\228\000\ -\000\000\228\000\228\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\228\000\228\000\000\000\ -\228\000\000\000\000\000\228\000\228\000\228\000\000\000\228\000\ -\228\000\228\000\228\000\228\000\000\000\000\000\000\000\000\000\ -\000\000\228\000\000\000\228\000\228\000\228\000\228\000\228\000\ -\000\000\000\000\000\000\000\000\228\000\228\000\242\000\228\000\ -\228\000\228\000\000\000\000\000\000\000\228\000\000\000\000\000\ -\228\000\000\000\228\000\000\000\000\000\228\000\000\000\000\000\ -\228\000\000\000\000\000\000\000\228\000\240\000\240\000\240\000\ -\240\000\000\000\000\000\000\000\000\000\240\000\240\000\240\000\ -\000\000\000\000\240\000\240\000\240\000\240\000\240\000\000\000\ -\240\000\240\000\240\000\000\000\000\000\240\000\240\000\240\000\ -\240\000\240\000\240\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\240\000\240\000\000\000\000\000\240\000\240\000\240\000\ -\240\000\240\000\240\000\240\000\000\000\240\000\240\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\240\000\240\000\000\000\240\000\000\000\000\000\240\000\ -\240\000\240\000\000\000\240\000\240\000\240\000\240\000\240\000\ -\000\000\000\000\000\000\000\000\000\000\240\000\000\000\240\000\ -\240\000\240\000\240\000\240\000\000\000\000\000\000\000\000\000\ -\240\000\240\000\025\001\240\000\240\000\240\000\240\000\000\000\ -\000\000\240\000\000\000\000\000\240\000\000\000\240\000\000\000\ -\000\000\240\000\000\000\000\000\240\000\000\000\000\000\000\000\ -\240\000\241\000\241\000\241\000\241\000\000\000\000\000\000\000\ -\000\000\241\000\241\000\241\000\000\000\000\000\241\000\241\000\ -\241\000\241\000\241\000\241\000\241\000\241\000\241\000\000\000\ -\000\000\241\000\241\000\241\000\241\000\241\000\241\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\241\000\241\000\000\000\ -\000\000\241\000\241\000\241\000\241\000\241\000\241\000\241\000\ -\000\000\241\000\241\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\241\000\241\000\000\000\ -\241\000\000\000\000\000\241\000\241\000\241\000\000\000\241\000\ -\241\000\241\000\241\000\241\000\000\000\000\000\000\000\000\000\ -\000\000\241\000\000\000\241\000\241\000\241\000\241\000\241\000\ -\000\000\000\000\000\000\000\000\241\000\241\000\026\001\241\000\ -\241\000\241\000\000\000\000\000\000\000\241\000\000\000\000\000\ -\241\000\000\000\241\000\000\000\000\000\241\000\000\000\000\000\ -\241\000\000\000\000\000\000\000\241\000\000\000\242\000\242\000\ -\242\000\242\000\000\000\000\000\000\000\000\000\242\000\242\000\ -\242\000\000\000\000\000\242\000\242\000\242\000\242\000\242\000\ -\242\000\242\000\242\000\242\000\000\000\000\000\242\000\242\000\ -\242\000\242\000\242\000\242\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\242\000\242\000\000\000\000\000\242\000\242\000\ -\242\000\242\000\242\000\242\000\242\000\000\000\242\000\242\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\242\000\242\000\000\000\242\000\000\000\000\000\ -\242\000\242\000\242\000\000\000\242\000\242\000\242\000\242\000\ -\242\000\000\000\000\000\000\000\000\000\000\000\242\000\000\000\ -\242\000\242\000\242\000\242\000\242\000\000\000\000\000\000\000\ -\000\000\242\000\242\000\251\000\242\000\242\000\242\000\000\000\ -\000\000\000\000\242\000\000\000\000\000\242\000\000\000\242\000\ -\000\000\000\000\242\000\000\000\000\000\242\000\000\000\000\000\ -\000\000\242\000\025\001\025\001\025\001\025\001\000\000\000\000\ -\000\000\000\000\025\001\025\001\025\001\000\000\000\000\025\001\ -\025\001\025\001\025\001\025\001\025\001\025\001\025\001\025\001\ -\000\000\000\000\025\001\025\001\025\001\025\001\025\001\025\001\ -\000\000\000\000\000\000\000\000\000\000\000\000\025\001\025\001\ -\000\000\000\000\025\001\025\001\025\001\025\001\025\001\025\001\ -\025\001\000\000\025\001\025\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\025\001\025\001\ -\000\000\025\001\000\000\000\000\025\001\025\001\025\001\000\000\ -\025\001\025\001\025\001\025\001\025\001\000\000\000\000\000\000\ -\000\000\000\000\025\001\000\000\025\001\025\001\025\001\025\001\ -\025\001\000\000\000\000\000\000\000\000\025\001\025\001\252\000\ -\025\001\025\001\025\001\000\000\000\000\000\000\025\001\000\000\ -\000\000\025\001\000\000\025\001\000\000\000\000\025\001\000\000\ -\000\000\025\001\000\000\000\000\000\000\025\001\026\001\026\001\ -\026\001\026\001\000\000\000\000\000\000\000\000\026\001\026\001\ -\026\001\000\000\000\000\026\001\026\001\026\001\026\001\026\001\ -\026\001\026\001\026\001\026\001\000\000\000\000\026\001\026\001\ -\026\001\026\001\026\001\026\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\026\001\026\001\000\000\000\000\026\001\026\001\ -\026\001\026\001\026\001\026\001\026\001\000\000\026\001\026\001\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\026\001\026\001\000\000\026\001\000\000\000\000\ -\026\001\026\001\026\001\000\000\026\001\026\001\026\001\026\001\ -\026\001\000\000\000\000\000\000\000\000\000\000\026\001\000\000\ -\026\001\026\001\026\001\026\001\026\001\000\000\000\000\000\000\ -\000\000\026\001\026\001\003\001\026\001\026\001\026\001\000\000\ -\000\000\000\000\026\001\000\000\000\000\026\001\000\000\026\001\ -\000\000\000\000\026\001\000\000\000\000\026\001\000\000\000\000\ -\000\000\026\001\000\000\251\000\251\000\251\000\251\000\000\000\ -\000\000\000\000\000\000\251\000\251\000\251\000\000\000\000\000\ -\251\000\251\000\251\000\251\000\251\000\251\000\251\000\251\000\ -\251\000\000\000\000\000\251\000\251\000\251\000\251\000\251\000\ -\251\000\000\000\000\000\000\000\000\000\000\000\000\000\251\000\ -\251\000\000\000\000\000\251\000\251\000\251\000\251\000\251\000\ -\251\000\000\000\000\000\251\000\251\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\251\000\ -\251\000\000\000\251\000\000\000\000\000\251\000\251\000\251\000\ -\000\000\251\000\251\000\251\000\251\000\251\000\000\000\000\000\ -\000\000\000\000\000\000\251\000\000\000\251\000\251\000\251\000\ -\251\000\251\000\000\000\000\000\000\000\000\000\251\000\251\000\ -\002\001\251\000\251\000\251\000\251\000\000\000\000\000\251\000\ -\000\000\000\000\251\000\000\000\251\000\000\000\000\000\251\000\ -\000\000\000\000\251\000\000\000\000\000\000\000\251\000\252\000\ -\252\000\252\000\252\000\000\000\000\000\000\000\000\000\252\000\ -\252\000\252\000\000\000\000\000\252\000\252\000\252\000\252\000\ -\252\000\252\000\252\000\252\000\252\000\000\000\000\000\252\000\ -\252\000\252\000\252\000\252\000\252\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\252\000\252\000\000\000\000\000\252\000\ -\252\000\252\000\252\000\252\000\252\000\000\000\000\000\252\000\ -\252\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\252\000\252\000\000\000\252\000\000\000\ -\000\000\252\000\252\000\252\000\000\000\252\000\252\000\252\000\ -\252\000\252\000\000\000\000\000\000\000\000\000\000\000\252\000\ -\000\000\252\000\252\000\252\000\252\000\252\000\000\000\000\000\ -\000\000\000\000\252\000\252\000\234\000\252\000\252\000\252\000\ -\252\000\000\000\000\000\252\000\000\000\000\000\252\000\000\000\ -\252\000\000\000\000\000\252\000\000\000\000\000\252\000\000\000\ -\000\000\000\000\252\000\003\001\003\001\003\001\003\001\000\000\ -\000\000\000\000\000\000\003\001\003\001\003\001\000\000\000\000\ -\003\001\003\001\003\001\003\001\003\001\003\001\003\001\003\001\ -\003\001\000\000\000\000\003\001\003\001\003\001\003\001\003\001\ -\003\001\000\000\000\000\000\000\000\000\000\000\000\000\003\001\ -\003\001\000\000\000\000\003\001\003\001\003\001\003\001\003\001\ -\003\001\000\000\000\000\003\001\003\001\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\001\ -\003\001\000\000\003\001\000\000\000\000\003\001\003\001\003\001\ -\000\000\003\001\003\001\003\001\003\001\003\001\000\000\000\000\ -\000\000\000\000\000\000\003\001\000\000\003\001\003\001\003\001\ -\003\001\003\001\000\000\000\000\000\000\000\000\003\001\003\001\ -\237\000\003\001\003\001\003\001\003\001\000\000\000\000\003\001\ -\000\000\000\000\003\001\000\000\003\001\000\000\000\000\003\001\ -\000\000\000\000\003\001\000\000\000\000\000\000\003\001\000\000\ -\002\001\002\001\002\001\002\001\000\000\000\000\000\000\000\000\ -\002\001\002\001\002\001\000\000\000\000\002\001\002\001\002\001\ -\002\001\002\001\002\001\002\001\002\001\002\001\000\000\000\000\ -\002\001\002\001\002\001\002\001\002\001\002\001\000\000\000\000\ -\000\000\000\000\000\000\000\000\002\001\002\001\000\000\000\000\ -\002\001\002\001\002\001\002\001\002\001\002\001\000\000\000\000\ -\002\001\002\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\002\001\002\001\000\000\002\001\ -\000\000\000\000\002\001\002\001\002\001\000\000\002\001\002\001\ -\002\001\002\001\002\001\000\000\000\000\000\000\000\000\000\000\ -\002\001\000\000\002\001\002\001\002\001\002\001\002\001\000\000\ -\000\000\000\000\000\000\002\001\002\001\238\000\002\001\002\001\ -\002\001\002\001\000\000\000\000\002\001\000\000\000\000\002\001\ -\000\000\002\001\000\000\000\000\002\001\000\000\000\000\002\001\ -\000\000\000\000\000\000\002\001\234\000\234\000\234\000\234\000\ -\000\000\000\000\000\000\000\000\000\000\234\000\234\000\000\000\ -\000\000\234\000\234\000\234\000\234\000\234\000\234\000\234\000\ -\234\000\234\000\000\000\000\000\234\000\234\000\234\000\234\000\ -\234\000\234\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\234\000\234\000\000\000\000\000\234\000\234\000\234\000\234\000\ -\234\000\234\000\234\000\000\000\234\000\234\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\234\000\234\000\000\000\234\000\000\000\000\000\234\000\234\000\ -\234\000\000\000\234\000\234\000\234\000\234\000\234\000\000\000\ -\000\000\000\000\000\000\000\000\234\000\000\000\234\000\234\000\ -\234\000\234\000\234\000\000\000\000\000\000\000\000\000\234\000\ -\234\000\250\000\234\000\234\000\234\000\234\000\000\000\000\000\ -\234\000\000\000\000\000\234\000\000\000\234\000\000\000\000\000\ -\234\000\000\000\000\000\234\000\000\000\000\000\000\000\234\000\ -\237\000\237\000\237\000\237\000\000\000\000\000\000\000\000\000\ -\000\000\237\000\237\000\000\000\000\000\237\000\237\000\237\000\ -\237\000\237\000\237\000\237\000\237\000\237\000\000\000\000\000\ -\237\000\237\000\237\000\237\000\237\000\237\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\237\000\237\000\000\000\000\000\ -\237\000\237\000\237\000\237\000\237\000\237\000\237\000\000\000\ -\237\000\237\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\237\000\237\000\000\000\237\000\ -\000\000\000\000\237\000\237\000\237\000\000\000\237\000\237\000\ -\237\000\237\000\237\000\000\000\000\000\000\000\000\000\000\000\ -\237\000\000\000\237\000\237\000\237\000\237\000\237\000\000\000\ -\000\000\000\000\000\000\237\000\237\000\000\001\237\000\237\000\ -\237\000\237\000\000\000\000\000\237\000\000\000\000\000\237\000\ -\000\000\237\000\000\000\000\000\237\000\000\000\000\000\237\000\ -\000\000\000\000\000\000\237\000\000\000\238\000\238\000\238\000\ -\238\000\000\000\000\000\000\000\000\000\000\000\238\000\238\000\ -\000\000\000\000\238\000\238\000\238\000\238\000\238\000\238\000\ -\238\000\238\000\238\000\000\000\000\000\238\000\238\000\238\000\ -\238\000\238\000\238\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\238\000\238\000\000\000\000\000\238\000\238\000\238\000\ -\238\000\238\000\238\000\238\000\000\000\238\000\238\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\238\000\238\000\000\000\238\000\000\000\000\000\238\000\ -\238\000\238\000\000\000\238\000\238\000\238\000\238\000\238\000\ -\000\000\000\000\000\000\000\000\000\000\238\000\000\000\238\000\ -\238\000\238\000\238\000\238\000\000\000\000\000\000\000\000\000\ -\238\000\238\000\001\001\238\000\238\000\238\000\238\000\000\000\ -\000\000\238\000\000\000\000\000\238\000\000\000\238\000\000\000\ -\000\000\238\000\000\000\000\000\238\000\000\000\000\000\000\000\ -\238\000\250\000\250\000\250\000\250\000\000\000\000\000\000\000\ -\000\000\250\000\250\000\250\000\000\000\000\000\250\000\250\000\ -\250\000\250\000\250\000\250\000\250\000\250\000\250\000\000\000\ -\000\000\250\000\250\000\250\000\250\000\250\000\250\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\250\000\250\000\000\000\ -\000\000\250\000\250\000\250\000\250\000\250\000\000\000\000\000\ -\000\000\250\000\250\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\250\000\250\000\000\000\ -\250\000\000\000\000\000\250\000\250\000\250\000\000\000\250\000\ -\250\000\250\000\250\000\250\000\000\000\000\000\000\000\000\000\ -\000\000\250\000\000\000\250\000\000\000\250\000\250\000\250\000\ -\000\000\000\000\000\000\000\000\250\000\250\000\253\000\250\000\ -\250\000\250\000\250\000\000\000\000\000\000\000\000\000\000\000\ -\250\000\000\000\250\000\000\000\000\000\250\000\000\000\000\000\ -\250\000\000\000\000\000\000\000\250\000\000\001\000\001\000\001\ -\000\001\000\000\000\000\000\000\000\000\000\001\000\001\000\001\ -\000\000\000\000\000\001\000\001\000\001\000\001\000\001\000\001\ -\000\001\000\001\000\001\000\000\000\000\000\001\000\001\000\001\ -\000\001\000\001\000\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\001\000\001\000\000\000\000\000\001\000\001\000\001\ -\000\001\000\001\000\000\000\000\000\000\000\001\000\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\001\000\001\000\000\000\001\000\000\000\000\000\001\ -\000\001\000\001\000\000\000\001\000\001\000\001\000\001\000\001\ -\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\001\ -\000\000\000\001\000\001\000\001\000\000\000\000\000\000\000\000\ -\000\001\000\001\254\000\000\001\000\001\000\001\000\001\000\000\ -\000\000\000\000\000\000\000\000\000\001\000\000\000\001\000\000\ -\000\000\000\001\000\000\000\000\000\001\000\000\000\000\000\000\ -\000\001\000\000\001\001\001\001\001\001\001\001\000\000\000\000\ -\000\000\000\000\001\001\001\001\001\001\000\000\000\000\001\001\ -\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\ -\000\000\000\000\001\001\001\001\001\001\001\001\001\001\001\001\ -\000\000\000\000\000\000\000\000\000\000\000\000\001\001\001\001\ -\000\000\000\000\001\001\001\001\001\001\001\001\001\001\000\000\ -\000\000\000\000\001\001\001\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\001\001\001\001\ -\000\000\001\001\000\000\000\000\001\001\001\001\001\001\000\000\ -\001\001\001\001\001\001\001\001\001\001\000\000\000\000\000\000\ -\000\000\000\000\001\001\000\000\001\001\000\000\001\001\001\001\ -\001\001\000\000\000\000\000\000\000\000\001\001\001\001\255\000\ -\001\001\001\001\001\001\001\001\000\000\000\000\000\000\000\000\ -\000\000\001\001\000\000\001\001\000\000\000\000\001\001\000\000\ -\000\000\001\001\000\000\000\000\000\000\001\001\253\000\253\000\ -\253\000\253\000\000\000\000\000\000\000\000\000\253\000\253\000\ -\253\000\000\000\000\000\253\000\253\000\253\000\253\000\253\000\ -\253\000\253\000\253\000\253\000\000\000\000\000\253\000\253\000\ -\253\000\253\000\253\000\253\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\253\000\253\000\000\000\000\000\253\000\253\000\ -\253\000\253\000\253\000\000\000\000\000\000\000\253\000\253\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\253\000\253\000\000\000\253\000\000\000\000\000\ -\253\000\253\000\253\000\000\000\253\000\253\000\253\000\253\000\ -\253\000\000\000\000\000\000\000\000\000\000\000\253\000\000\000\ -\253\000\000\000\253\000\253\000\253\000\000\000\000\000\000\000\ -\000\000\253\000\253\000\208\000\253\000\253\000\253\000\253\000\ -\000\000\000\000\000\000\000\000\000\000\253\000\000\000\253\000\ -\000\000\000\000\253\000\000\000\000\000\253\000\000\000\000\000\ -\000\000\253\000\254\000\254\000\254\000\254\000\000\000\000\000\ -\000\000\000\000\254\000\254\000\254\000\000\000\000\000\254\000\ -\254\000\254\000\254\000\254\000\254\000\254\000\254\000\254\000\ -\000\000\000\000\254\000\254\000\254\000\254\000\254\000\254\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\254\000\254\000\ -\000\000\000\000\254\000\254\000\254\000\254\000\254\000\000\000\ -\000\000\000\000\254\000\254\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\254\000\254\000\ -\000\000\254\000\000\000\000\000\254\000\254\000\254\000\000\000\ -\254\000\254\000\254\000\254\000\254\000\000\000\000\000\000\000\ -\000\000\000\000\254\000\000\000\254\000\000\000\254\000\254\000\ -\254\000\000\000\000\000\000\000\000\000\254\000\254\000\004\001\ -\254\000\254\000\254\000\254\000\000\000\000\000\000\000\000\000\ -\000\000\254\000\000\000\254\000\000\000\000\000\254\000\000\000\ -\000\000\254\000\000\000\000\000\000\000\254\000\000\000\255\000\ -\255\000\255\000\255\000\000\000\000\000\000\000\000\000\255\000\ -\255\000\255\000\000\000\000\000\255\000\255\000\255\000\255\000\ -\255\000\255\000\255\000\255\000\255\000\000\000\000\000\255\000\ -\255\000\255\000\255\000\255\000\255\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\255\000\255\000\000\000\000\000\255\000\ -\255\000\255\000\255\000\255\000\000\000\000\000\000\000\255\000\ -\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\255\000\255\000\000\000\255\000\000\000\ -\000\000\255\000\255\000\255\000\000\000\255\000\255\000\255\000\ -\255\000\255\000\000\000\000\000\000\000\000\000\000\000\255\000\ -\000\000\255\000\000\000\255\000\255\000\255\000\000\000\000\000\ -\000\000\000\000\255\000\255\000\006\001\255\000\255\000\255\000\ -\255\000\000\000\000\000\000\000\000\000\000\000\255\000\000\000\ -\255\000\000\000\000\000\255\000\000\000\000\000\255\000\000\000\ -\000\000\000\000\255\000\208\000\208\000\208\000\208\000\000\000\ -\000\000\000\000\000\000\208\000\208\000\208\000\000\000\000\000\ -\208\000\208\000\208\000\208\000\208\000\208\000\208\000\208\000\ -\208\000\000\000\000\000\208\000\208\000\208\000\208\000\208\000\ -\208\000\000\000\000\000\000\000\000\000\000\000\000\000\208\000\ -\208\000\000\000\000\000\208\000\208\000\208\000\208\000\208\000\ -\208\000\208\000\000\000\208\000\208\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\208\000\ -\208\000\000\000\000\000\000\000\000\000\208\000\208\000\208\000\ -\000\000\208\000\000\000\000\000\208\000\208\000\000\000\000\000\ -\000\000\000\000\000\000\208\000\000\000\208\000\000\000\000\000\ -\000\000\208\000\000\000\000\000\000\000\000\000\208\000\208\000\ -\248\000\208\000\208\000\208\000\208\000\000\000\000\000\208\000\ -\000\000\000\000\208\000\000\000\208\000\000\000\000\000\208\000\ -\000\000\000\000\208\000\000\000\000\000\000\000\208\000\004\001\ -\004\001\004\001\004\001\000\000\000\000\000\000\000\000\004\001\ -\004\001\004\001\000\000\000\000\004\001\004\001\000\000\004\001\ -\004\001\004\001\004\001\004\001\004\001\000\000\000\000\004\001\ -\004\001\004\001\004\001\004\001\004\001\000\000\000\000\000\000\ -\000\000\000\000\000\000\004\001\004\001\000\000\000\000\004\001\ -\004\001\004\001\000\000\000\000\000\000\000\000\000\000\004\001\ -\004\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\004\001\004\001\000\000\004\001\000\000\ -\000\000\000\000\004\001\004\001\000\000\004\001\000\000\000\000\ -\004\001\004\001\000\000\000\000\000\000\000\000\000\000\004\001\ -\000\000\004\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\004\001\004\001\249\000\004\001\004\001\004\001\ -\004\001\000\000\000\000\000\000\000\000\000\000\004\001\000\000\ -\004\001\000\000\000\000\004\001\000\000\000\000\004\001\000\000\ -\000\000\000\000\004\001\000\000\006\001\006\001\006\001\006\001\ -\000\000\000\000\000\000\000\000\006\001\006\001\006\001\000\000\ -\000\000\006\001\006\001\000\000\006\001\006\001\006\001\006\001\ -\006\001\006\001\000\000\000\000\006\001\006\001\006\001\006\001\ -\006\001\006\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\006\001\006\001\000\000\000\000\006\001\006\001\006\001\000\000\ -\000\000\000\000\000\000\000\000\006\001\006\001\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\006\001\006\001\000\000\006\001\000\000\000\000\000\000\006\001\ -\006\001\000\000\006\001\000\000\000\000\006\001\006\001\000\000\ -\000\000\000\000\000\000\000\000\006\001\000\000\006\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\001\ -\006\001\005\001\006\001\006\001\006\001\006\001\000\000\000\000\ -\000\000\000\000\000\000\006\001\000\000\006\001\000\000\000\000\ -\006\001\000\000\000\000\006\001\000\000\000\000\000\000\006\001\ -\248\000\248\000\248\000\248\000\000\000\000\000\000\000\000\000\ -\248\000\248\000\248\000\000\000\000\000\248\000\248\000\000\000\ -\248\000\248\000\248\000\248\000\248\000\248\000\000\000\000\000\ -\248\000\248\000\248\000\248\000\248\000\248\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\248\000\248\000\000\000\000\000\ -\248\000\248\000\248\000\000\000\000\000\000\000\000\000\000\000\ -\248\000\248\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\248\000\248\000\000\000\248\000\ -\000\000\000\000\000\000\248\000\248\000\000\000\248\000\000\000\ -\000\000\248\000\248\000\000\000\000\000\000\000\000\000\000\000\ -\248\000\010\001\248\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\248\000\248\000\000\000\248\000\248\000\ -\248\000\248\000\000\000\000\000\000\000\000\000\000\000\248\000\ -\000\000\248\000\000\000\000\000\248\000\000\000\000\000\248\000\ -\000\000\000\000\000\000\248\000\249\000\249\000\249\000\249\000\ -\000\000\000\000\000\000\000\000\249\000\249\000\249\000\000\000\ -\000\000\249\000\249\000\000\000\249\000\249\000\249\000\249\000\ -\249\000\249\000\000\000\000\000\249\000\249\000\249\000\249\000\ -\249\000\249\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\249\000\249\000\000\000\000\000\249\000\249\000\249\000\000\000\ -\000\000\000\000\000\000\000\000\249\000\249\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\249\000\249\000\000\000\249\000\000\000\000\000\000\000\249\000\ -\249\000\009\001\249\000\000\000\000\000\249\000\249\000\000\000\ -\000\000\000\000\000\000\000\000\249\000\000\000\249\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\249\000\ -\249\000\000\000\249\000\249\000\249\000\249\000\000\000\000\000\ -\000\000\000\000\000\000\249\000\000\000\249\000\000\000\000\000\ -\249\000\000\000\000\000\249\000\000\000\000\000\000\000\249\000\ -\000\000\005\001\005\001\005\001\005\001\000\000\000\000\000\000\ -\000\000\005\001\005\001\005\001\000\000\000\000\005\001\005\001\ -\000\000\005\001\005\001\005\001\005\001\005\001\005\001\000\000\ -\000\000\005\001\005\001\005\001\005\001\005\001\005\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\005\001\005\001\000\000\ -\000\000\005\001\005\001\005\001\000\000\000\000\000\000\000\000\ -\000\000\005\001\005\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\008\001\000\000\000\000\000\000\005\001\005\001\000\000\ -\005\001\000\000\000\000\000\000\005\001\005\001\000\000\005\001\ -\000\000\000\000\005\001\005\001\000\000\000\000\000\000\000\000\ -\000\000\005\001\000\000\005\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\005\001\005\001\000\000\005\001\ -\005\001\005\001\005\001\000\000\000\000\000\000\000\000\000\000\ -\005\001\010\001\005\001\000\000\010\001\005\001\000\000\000\000\ -\005\001\010\001\010\001\010\001\005\001\000\000\010\001\010\001\ -\000\000\010\001\010\001\010\001\010\001\010\001\010\001\000\000\ -\000\000\010\001\010\001\010\001\000\000\010\001\010\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\010\001\000\000\ -\000\000\010\001\010\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\010\001\010\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\131\001\000\000\000\000\000\000\010\001\000\000\000\000\ -\010\001\000\000\000\000\000\000\010\001\010\001\000\000\010\001\ -\000\000\000\000\010\001\010\001\000\000\000\000\000\000\000\000\ -\000\000\010\001\000\000\010\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\010\001\010\001\000\000\010\001\ -\010\001\010\001\010\001\000\000\000\000\000\000\000\000\000\000\ -\010\001\009\001\010\001\000\000\009\001\010\001\000\000\000\000\ -\010\001\009\001\009\001\009\001\010\001\000\000\009\001\009\001\ -\000\000\009\001\009\001\009\001\009\001\009\001\009\001\000\000\ -\000\000\009\001\009\001\009\001\000\000\009\001\009\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\009\001\000\000\ -\000\000\009\001\009\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\009\001\009\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\007\001\000\000\000\000\000\000\009\001\000\000\000\000\ -\009\001\000\000\000\000\000\000\009\001\009\001\000\000\009\001\ -\000\000\000\000\009\001\009\001\000\000\000\000\000\000\000\000\ -\000\000\009\001\000\000\009\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\009\001\009\001\000\000\009\001\ -\009\001\009\001\009\001\000\000\000\000\000\000\000\000\000\000\ -\009\001\008\001\009\001\000\000\008\001\009\001\000\000\000\000\ -\009\001\008\001\000\000\008\001\009\001\000\000\008\001\008\001\ -\000\000\008\001\008\001\008\001\008\001\008\001\008\001\000\000\ -\000\000\008\001\008\001\008\001\000\000\008\001\008\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\008\001\000\000\ -\000\000\008\001\008\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\008\001\008\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\130\001\000\000\000\000\000\000\008\001\000\000\000\000\ -\008\001\000\000\000\000\000\000\008\001\008\001\000\000\008\001\ -\000\000\000\000\008\001\008\001\000\000\000\000\000\000\000\000\ -\000\000\008\001\000\000\000\000\000\000\000\000\000\000\021\003\ -\000\000\000\000\000\000\000\000\008\001\008\001\000\000\008\001\ -\008\001\008\001\008\001\000\000\000\000\000\000\000\000\000\000\ -\008\001\131\001\008\001\000\000\131\001\008\001\000\000\000\000\ -\008\001\131\001\000\000\131\001\008\001\000\000\131\001\131\001\ -\000\000\131\001\131\001\131\001\131\001\131\001\131\001\000\000\ -\000\000\131\001\131\001\131\001\000\000\131\001\131\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\131\001\000\000\ -\000\000\131\001\131\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\131\001\131\001\000\000\011\001\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\131\001\000\000\000\000\ -\131\001\000\000\000\000\000\000\131\001\131\001\000\000\131\001\ -\000\000\000\000\131\001\131\001\000\000\000\000\000\000\000\000\ -\000\000\131\001\021\003\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\131\001\131\001\000\000\131\001\ -\131\001\131\001\131\001\000\000\000\000\000\000\000\000\000\000\ -\131\001\007\001\131\001\000\000\007\001\131\001\000\000\000\000\ -\131\001\007\001\000\000\007\001\131\001\000\000\007\001\007\001\ -\000\000\007\001\007\001\007\001\007\001\007\001\007\001\000\000\ -\000\000\007\001\007\001\007\001\000\000\007\001\007\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\007\001\000\000\ -\000\000\007\001\007\001\000\000\000\000\000\000\000\000\024\001\ -\000\000\007\001\007\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\007\001\000\000\000\000\ -\007\001\000\000\000\000\000\000\007\001\007\001\000\000\007\001\ -\000\000\000\000\007\001\007\001\000\000\000\000\000\000\000\000\ -\000\000\007\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\007\001\007\001\000\000\007\001\ -\007\001\007\001\007\001\000\000\000\000\000\000\000\000\000\000\ -\007\001\130\001\007\001\000\000\130\001\007\001\000\000\000\000\ -\007\001\130\001\000\000\130\001\007\001\000\000\130\001\130\001\ -\000\000\130\001\130\001\130\001\130\001\130\001\130\001\000\000\ -\000\000\130\001\130\001\130\001\000\000\130\001\130\001\021\003\ -\000\000\000\000\000\000\000\000\000\000\000\000\130\001\000\000\ -\000\000\130\001\130\001\000\000\021\003\000\000\000\000\014\001\ -\167\001\130\001\130\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\021\003\000\000\021\003\021\003\130\001\000\000\000\000\ -\130\001\000\000\000\000\000\000\130\001\130\001\000\000\130\001\ -\021\003\000\000\130\001\130\001\000\000\094\000\000\000\000\000\ -\136\000\130\001\137\000\138\000\030\000\000\000\139\000\000\000\ -\000\000\169\001\141\000\021\003\130\001\130\001\021\003\130\001\ -\130\001\130\001\130\001\021\003\011\001\000\000\000\000\011\001\ -\130\001\021\003\130\001\000\000\011\001\130\001\011\001\021\003\ -\130\001\011\001\011\001\144\000\130\001\011\001\000\000\011\001\ -\011\001\011\001\145\000\021\003\011\001\011\001\011\001\021\003\ -\011\001\011\001\021\003\000\000\000\000\021\003\146\000\147\000\ -\000\000\011\001\000\000\021\003\011\001\011\001\021\003\021\003\ -\000\000\000\000\243\000\000\000\011\001\011\001\000\000\000\000\ -\000\000\000\000\000\000\000\000\021\003\000\000\021\003\021\003\ -\011\001\000\000\000\000\011\001\000\000\000\000\000\000\011\001\ -\011\001\000\000\011\001\021\003\000\000\011\001\011\001\000\000\ -\104\000\174\003\000\000\136\000\011\001\137\000\138\000\030\000\ -\000\000\139\000\000\000\000\000\158\001\141\000\021\003\011\001\ -\011\001\000\000\011\001\011\001\011\001\011\001\021\003\024\001\ -\000\000\000\000\024\001\011\001\021\003\011\001\000\000\024\001\ -\011\001\024\001\021\003\011\001\024\001\024\001\144\000\011\001\ -\024\001\000\000\024\001\024\001\024\001\145\000\021\003\024\001\ -\024\001\024\001\021\003\024\001\024\001\000\000\000\000\000\000\ -\000\000\146\000\147\000\000\000\024\001\000\000\021\003\024\001\ -\024\001\021\003\000\000\000\000\000\000\017\001\000\000\024\001\ -\024\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\024\001\000\000\000\000\024\001\000\000\ -\000\000\000\000\024\001\024\001\000\000\024\001\000\000\000\000\ -\024\001\024\001\000\000\000\000\000\000\000\000\000\000\024\001\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\024\001\024\001\000\000\024\001\024\001\024\001\ -\024\001\000\000\000\000\000\000\000\000\000\000\024\001\014\001\ -\024\001\000\000\014\001\024\001\000\000\000\000\024\001\014\001\ -\000\000\014\001\024\001\000\000\014\001\014\001\000\000\000\000\ -\014\001\000\000\014\001\014\001\014\001\000\000\000\000\014\001\ -\014\001\014\001\000\000\014\001\014\001\094\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\014\001\000\000\000\000\014\001\ -\014\001\000\000\094\000\000\000\000\000\016\001\000\000\014\001\ -\014\001\000\000\000\000\000\000\000\000\000\000\000\000\094\000\ -\000\000\094\000\094\000\014\001\000\000\000\000\014\001\000\000\ -\000\000\000\000\014\001\014\001\000\000\014\001\094\000\000\000\ -\014\001\014\001\000\000\021\003\000\000\000\000\136\000\014\001\ -\137\000\138\000\030\000\000\000\139\000\000\000\000\000\158\001\ -\141\000\094\000\014\001\014\001\000\000\014\001\014\001\014\001\ -\014\001\094\000\243\000\000\000\000\000\243\000\014\001\094\000\ -\014\001\000\000\243\000\014\001\243\000\094\000\014\001\243\000\ -\243\000\144\000\014\001\243\000\000\000\243\000\243\000\243\000\ -\145\000\094\000\243\000\243\000\243\000\094\000\243\000\243\000\ -\104\000\000\000\000\000\000\000\146\000\147\000\000\000\243\000\ -\000\000\094\000\243\000\243\000\094\000\104\000\000\000\000\000\ -\015\001\000\000\243\000\243\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\104\000\000\000\104\000\104\000\243\000\000\000\ -\000\000\243\000\000\000\000\000\000\000\243\000\243\000\000\000\ -\243\000\104\000\000\000\243\000\243\000\000\000\099\000\000\000\ -\000\000\000\000\243\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\104\000\243\000\243\000\000\000\ -\243\000\243\000\243\000\243\000\104\000\017\001\000\000\000\000\ -\017\001\243\000\104\000\243\000\000\000\017\001\243\000\017\001\ -\104\000\243\000\017\001\017\001\000\000\243\000\017\001\000\000\ -\017\001\017\001\017\001\000\000\104\000\017\001\017\001\017\001\ -\104\000\017\001\017\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\017\001\000\000\104\000\017\001\017\001\104\000\ -\000\000\000\000\000\000\020\001\000\000\017\001\017\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\017\001\000\000\000\000\017\001\000\000\000\000\000\000\ -\017\001\017\001\000\000\017\001\000\000\000\000\017\001\017\001\ -\000\000\000\000\000\000\000\000\000\000\017\001\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\017\001\017\001\000\000\017\001\017\001\017\001\017\001\000\000\ -\000\000\000\000\000\000\000\000\017\001\016\001\017\001\000\000\ -\016\001\017\001\000\000\000\000\017\001\016\001\000\000\016\001\ -\017\001\000\000\016\001\016\001\000\000\000\000\016\001\000\000\ -\016\001\016\001\016\001\000\000\000\000\016\001\016\001\016\001\ -\000\000\016\001\016\001\021\003\000\000\000\000\000\000\000\000\ -\000\000\000\000\016\001\000\000\000\000\016\001\016\001\000\000\ -\021\003\000\000\000\000\018\001\000\000\016\001\016\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\021\003\000\000\021\003\ -\021\003\016\001\000\000\000\000\016\001\000\000\000\000\000\000\ -\016\001\016\001\000\000\016\001\021\003\000\000\016\001\016\001\ -\000\000\103\000\000\000\000\000\000\000\016\001\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\021\003\ -\016\001\016\001\000\000\016\001\016\001\016\001\016\001\021\003\ -\015\001\000\000\000\000\015\001\016\001\021\003\016\001\000\000\ -\015\001\016\001\015\001\021\003\016\001\015\001\015\001\000\000\ -\016\001\015\001\000\000\015\001\015\001\015\001\000\000\021\003\ -\015\001\015\001\015\001\021\003\015\001\015\001\099\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\015\001\000\000\021\003\ -\015\001\015\001\021\003\099\000\000\000\000\000\019\001\000\000\ -\015\001\015\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\099\000\000\000\099\000\099\000\015\001\000\000\000\000\015\001\ -\000\000\000\000\000\000\015\001\015\001\000\000\015\001\099\000\ -\000\000\015\001\015\001\000\000\000\000\000\000\000\000\000\000\ -\015\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\099\000\015\001\015\001\000\000\015\001\015\001\ -\015\001\015\001\099\000\020\001\000\000\000\000\020\001\015\001\ -\099\000\015\001\000\000\020\001\015\001\020\001\099\000\015\001\ -\020\001\020\001\000\000\015\001\020\001\000\000\020\001\020\001\ -\020\001\000\000\099\000\020\001\020\001\020\001\099\000\020\001\ -\020\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\020\001\000\000\099\000\020\001\020\001\099\000\000\000\000\000\ -\000\000\023\001\000\000\020\001\020\001\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\020\001\ -\000\000\000\000\020\001\000\000\000\000\000\000\020\001\020\001\ -\000\000\020\001\000\000\000\000\020\001\020\001\000\000\000\000\ -\000\000\000\000\000\000\020\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\020\001\020\001\ -\000\000\020\001\020\001\020\001\020\001\000\000\000\000\000\000\ -\000\000\000\000\020\001\018\001\020\001\000\000\018\001\020\001\ -\000\000\000\000\020\001\018\001\000\000\018\001\020\001\000\000\ -\018\001\018\001\000\000\000\000\018\001\000\000\018\001\018\001\ -\018\001\000\000\000\000\018\001\018\001\018\001\000\000\018\001\ -\018\001\103\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\018\001\000\000\000\000\018\001\018\001\000\000\103\000\000\000\ -\000\000\021\001\000\000\018\001\018\001\000\000\000\000\000\000\ -\000\000\000\000\000\000\103\000\000\000\103\000\103\000\018\001\ -\000\000\000\000\018\001\000\000\000\000\000\000\018\001\018\001\ -\000\000\018\001\103\000\000\000\018\001\018\001\000\000\000\000\ -\000\000\000\000\000\000\018\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\103\000\018\001\018\001\ -\000\000\018\001\018\001\018\001\018\001\103\000\019\001\000\000\ -\000\000\019\001\018\001\103\000\018\001\000\000\019\001\018\001\ -\019\001\103\000\018\001\019\001\019\001\000\000\018\001\019\001\ -\000\000\019\001\019\001\019\001\000\000\103\000\019\001\019\001\ -\019\001\103\000\019\001\019\001\010\000\000\000\157\001\000\000\ -\000\000\000\000\000\000\019\001\000\000\103\000\019\001\019\001\ -\103\000\000\000\000\000\000\000\022\001\000\000\019\001\019\001\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\019\001\000\000\000\000\019\001\000\000\000\000\ -\000\000\019\001\019\001\000\000\019\001\000\000\000\000\019\001\ -\019\001\000\000\000\000\000\000\000\000\136\000\019\001\137\000\ -\138\000\030\000\000\000\139\000\000\000\000\000\158\001\141\000\ -\000\000\019\001\019\001\000\000\019\001\019\001\019\001\019\001\ -\000\000\023\001\000\000\000\000\023\001\019\001\000\000\019\001\ -\000\000\023\001\019\001\023\001\000\000\019\001\023\001\023\001\ -\144\000\019\001\023\001\000\000\023\001\023\001\023\001\145\000\ -\000\000\023\001\023\001\023\001\000\000\023\001\023\001\000\000\ -\000\000\000\000\000\000\146\000\147\000\000\000\023\001\000\000\ -\000\000\023\001\023\001\000\000\000\000\000\000\000\000\207\000\ -\000\000\023\001\023\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\023\001\000\000\000\000\ -\023\001\000\000\000\000\000\000\023\001\023\001\000\000\023\001\ -\000\000\000\000\023\001\023\001\000\000\000\000\000\000\000\000\ -\000\000\023\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\023\001\023\001\000\000\023\001\ -\023\001\023\001\023\001\000\000\000\000\000\000\000\000\000\000\ -\023\001\021\001\023\001\000\000\021\001\023\001\000\000\000\000\ -\023\001\021\001\000\000\021\001\023\001\000\000\021\001\021\001\ -\000\000\000\000\021\001\000\000\021\001\021\001\021\001\000\000\ -\000\000\021\001\021\001\021\001\000\000\021\001\021\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\021\001\000\000\ -\000\000\021\001\021\001\000\000\000\000\000\000\000\000\244\000\ -\000\000\021\001\021\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\021\001\000\000\000\000\ -\021\001\000\000\000\000\000\000\021\001\021\001\000\000\021\001\ -\000\000\000\000\021\001\021\001\000\000\000\000\000\000\000\000\ -\000\000\021\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\021\001\021\001\000\000\021\001\ -\021\001\021\001\021\001\000\000\022\001\000\000\000\000\022\001\ -\021\001\000\000\021\001\000\000\022\001\021\001\022\001\000\000\ -\021\001\022\001\022\001\000\000\021\001\022\001\000\000\022\001\ -\022\001\022\001\000\000\000\000\022\001\022\001\022\001\000\000\ -\022\001\022\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\022\001\000\000\000\000\022\001\022\001\000\000\000\000\ -\000\000\000\000\000\000\000\000\022\001\022\001\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\061\002\000\000\000\000\ -\022\001\000\000\000\000\022\001\000\000\000\000\000\000\022\001\ -\022\001\000\000\022\001\000\000\000\000\022\001\022\001\000\000\ -\000\000\000\000\000\000\000\000\022\001\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\022\001\ -\022\001\000\000\022\001\022\001\022\001\022\001\000\000\207\000\ -\000\000\000\000\207\000\022\001\000\000\022\001\000\000\207\000\ -\022\001\207\000\000\000\022\001\207\000\207\000\000\000\022\001\ -\207\000\000\000\207\000\207\000\207\000\000\000\000\000\207\000\ -\207\000\207\000\000\000\207\000\207\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\207\000\000\000\000\000\207\000\ -\207\000\000\000\000\000\000\000\000\000\000\000\000\000\207\000\ -\207\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\095\002\000\000\000\000\207\000\000\000\000\000\207\000\000\000\ -\000\000\000\000\207\000\207\000\000\000\207\000\000\000\000\000\ -\207\000\207\000\000\000\000\000\000\000\000\000\000\000\207\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\207\000\207\000\000\000\207\000\000\000\207\000\ -\207\000\000\000\000\000\000\000\000\000\000\000\207\000\244\000\ -\207\000\000\000\244\000\207\000\000\000\000\000\207\000\244\000\ -\000\000\244\000\207\000\000\000\244\000\244\000\000\000\000\000\ -\244\000\000\000\244\000\244\000\244\000\000\000\000\000\244\000\ -\000\000\244\000\000\000\244\000\244\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\244\000\000\000\000\000\244\000\ -\244\000\000\000\000\000\000\000\000\000\000\000\000\000\244\000\ -\244\000\000\000\000\000\059\002\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\244\000\000\000\000\000\244\000\000\000\ -\000\000\000\000\244\000\244\000\000\000\244\000\000\000\000\000\ -\244\000\244\000\000\000\000\000\000\000\000\000\000\000\244\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\244\000\244\000\000\000\244\000\244\000\244\000\ -\244\000\000\000\000\000\000\000\000\000\000\000\244\000\000\000\ -\244\000\000\000\000\000\244\000\000\000\061\002\244\000\061\002\ -\061\002\061\002\244\000\000\000\000\000\061\002\000\000\000\000\ -\000\000\000\000\061\002\000\000\000\000\000\000\061\002\061\002\ -\061\002\000\000\000\000\000\000\000\000\154\003\000\000\061\002\ -\061\002\061\002\061\002\000\000\000\000\000\000\000\000\000\000\ -\000\000\061\002\000\000\000\000\000\000\061\002\061\002\000\000\ -\057\002\000\000\000\000\000\000\000\000\061\002\061\002\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\061\002\000\000\000\000\061\002\000\000\000\000\061\002\ -\061\002\061\002\000\000\061\002\000\000\000\000\061\002\061\002\ -\000\000\000\000\000\000\000\000\136\000\061\002\137\000\138\000\ -\030\000\000\000\139\000\000\000\000\000\140\000\141\000\000\000\ -\061\002\061\002\000\000\061\002\061\002\061\002\000\000\000\000\ -\095\002\061\002\095\002\095\002\095\002\000\000\142\000\000\000\ -\095\002\061\002\000\000\000\000\061\002\095\002\143\000\144\000\ -\061\002\095\002\095\002\095\002\000\000\000\000\145\000\000\000\ -\000\000\000\000\095\002\095\002\095\002\095\002\000\000\000\000\ -\059\005\000\000\146\000\147\000\095\002\000\000\000\000\000\000\ -\000\000\095\002\000\000\058\002\000\000\000\000\000\000\160\005\ -\095\002\095\002\000\000\000\000\000\000\000\000\243\001\000\000\ -\000\000\000\000\000\000\000\000\095\002\000\000\000\000\095\002\ -\000\000\000\000\095\002\095\002\095\002\000\000\095\002\000\000\ -\000\000\095\002\095\002\000\000\000\000\000\000\000\000\061\005\ -\095\002\137\000\138\000\030\000\000\000\139\000\000\000\000\000\ -\140\000\062\005\000\000\095\002\095\002\000\000\095\002\095\002\ -\095\002\095\002\000\000\059\002\000\000\059\002\059\002\059\002\ -\000\000\142\000\000\000\059\002\095\002\000\000\000\000\095\002\ -\059\002\143\000\144\000\095\002\059\002\059\002\059\002\000\000\ -\000\000\145\000\000\000\000\000\000\000\059\002\059\002\059\002\ -\059\002\000\000\246\001\000\000\000\000\064\005\147\000\059\002\ -\000\000\000\000\000\000\000\000\059\002\000\000\056\002\000\000\ -\000\000\000\000\000\000\059\002\059\002\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\059\002\ -\000\000\000\000\059\002\000\000\000\000\059\002\059\002\059\002\ -\000\000\059\002\000\000\000\000\000\000\059\002\000\000\000\000\ -\000\000\000\000\000\000\059\002\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\059\002\059\002\ -\000\000\059\002\059\002\059\002\059\002\000\000\000\000\000\000\ -\057\002\000\000\057\002\057\002\057\002\000\000\000\000\059\002\ -\057\002\000\000\059\002\000\000\000\000\057\002\059\002\000\000\ -\000\000\057\002\057\002\057\002\000\000\000\000\000\000\000\000\ -\000\000\000\000\057\002\057\002\057\002\057\002\000\000\000\000\ -\000\000\000\000\000\000\000\000\057\002\000\000\000\000\000\000\ -\000\000\057\002\000\000\053\002\000\000\000\000\000\000\000\000\ -\057\002\057\002\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\057\002\000\000\000\000\057\002\ -\000\000\000\000\057\002\057\002\057\002\000\000\057\002\000\000\ -\000\000\000\000\057\002\000\000\000\000\000\000\000\000\136\000\ -\057\002\137\000\138\000\030\000\000\000\139\000\000\000\000\000\ -\140\000\141\000\000\000\057\002\057\002\000\000\057\002\057\002\ -\057\002\057\002\177\001\058\002\000\000\058\002\058\002\058\002\ -\000\000\142\000\000\000\058\002\057\002\000\000\000\000\057\002\ -\058\002\143\000\144\000\057\002\058\002\058\002\058\002\042\002\ -\000\000\145\000\000\000\000\000\000\000\058\002\058\002\058\002\ -\058\002\000\000\000\000\000\000\000\000\146\000\147\000\058\002\ -\000\000\000\000\000\000\000\000\058\002\000\000\000\000\000\000\ -\000\000\000\000\000\000\058\002\058\002\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\058\002\ -\000\000\000\000\058\002\000\000\000\000\058\002\058\002\058\002\ -\000\000\058\002\000\000\000\000\000\000\058\002\000\000\000\000\ -\000\000\041\002\136\000\058\002\137\000\138\000\030\000\000\000\ -\139\000\000\000\000\000\140\000\141\000\000\000\058\002\058\002\ -\000\000\058\002\058\002\058\002\058\002\000\000\056\002\000\000\ -\056\002\056\002\056\002\000\000\142\000\000\000\056\002\058\002\ -\000\000\000\000\058\002\056\002\143\000\126\003\058\002\056\002\ -\056\002\056\002\000\000\000\000\145\000\000\000\000\000\000\000\ -\056\002\056\002\056\002\056\002\000\000\000\000\000\000\068\006\ -\146\000\147\000\056\002\039\002\000\000\000\000\000\000\056\002\ -\000\000\000\000\000\000\000\000\000\000\000\000\056\002\056\002\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\056\002\000\000\000\000\056\002\000\000\000\000\ -\056\002\056\002\056\002\000\000\056\002\000\000\000\000\000\000\ -\056\002\000\000\000\000\000\000\000\000\000\000\056\002\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\056\002\056\002\000\000\056\002\056\002\056\002\056\002\ -\000\000\197\000\000\000\053\002\000\000\053\002\053\002\000\000\ -\000\000\000\000\056\002\053\002\000\000\056\002\000\000\000\000\ -\053\002\056\002\000\000\000\000\053\002\053\002\053\002\000\000\ -\000\000\000\000\000\000\000\000\000\000\053\002\053\002\053\002\ -\053\002\000\000\000\000\000\000\000\000\000\000\000\000\053\002\ -\000\000\000\000\000\000\000\000\053\002\000\000\000\000\000\000\ -\000\000\000\000\000\000\053\002\053\002\000\000\000\000\000\000\ -\000\000\000\000\000\000\084\000\000\000\000\000\000\000\053\002\ -\000\000\000\000\053\002\000\000\000\000\053\002\053\002\053\002\ -\000\000\053\002\000\000\000\000\010\000\053\002\157\001\042\002\ -\000\000\000\000\042\002\053\002\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\042\002\000\000\053\002\053\002\ -\042\002\053\002\053\002\053\002\053\002\000\000\000\000\000\000\ -\000\000\042\002\042\002\042\002\042\002\000\000\000\000\053\002\ -\000\000\000\000\053\002\000\000\000\000\000\000\053\002\000\000\ -\042\002\000\000\000\000\000\000\000\000\136\000\000\000\137\000\ -\138\000\030\000\000\000\139\000\000\000\000\000\158\001\141\000\ -\000\000\041\002\000\000\042\002\041\002\000\000\042\002\000\000\ -\000\000\042\002\042\002\042\002\000\000\000\000\041\002\000\000\ -\042\002\042\002\041\002\000\000\000\000\000\000\000\000\042\002\ -\144\000\000\000\227\002\041\002\041\002\041\002\041\002\145\000\ -\000\000\000\000\000\000\042\002\023\003\042\002\000\000\042\002\ -\042\002\000\000\041\002\146\000\147\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\042\002\000\000\000\000\042\002\000\000\ -\000\000\000\000\042\002\039\002\000\000\041\002\039\002\000\000\ -\041\002\000\000\000\000\041\002\041\002\041\002\000\000\000\000\ -\039\002\000\000\041\002\041\002\039\002\000\000\000\000\000\000\ -\000\000\041\002\000\000\000\000\000\000\039\002\039\002\039\002\ -\039\002\000\000\000\000\000\000\000\000\041\002\000\000\041\002\ -\000\000\041\002\041\002\000\000\039\002\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\041\002\000\000\000\000\ -\041\002\000\000\000\000\000\000\041\002\000\000\000\000\039\002\ -\000\000\197\000\039\002\000\000\197\000\039\002\039\002\039\002\ -\000\000\000\000\000\000\000\000\039\002\039\002\197\000\000\000\ -\000\000\000\000\197\000\039\002\197\000\000\000\000\000\000\000\ -\000\000\000\000\128\000\197\000\197\000\197\000\197\000\039\002\ -\000\000\039\002\000\000\039\002\039\002\000\000\000\000\000\000\ -\000\000\000\000\197\000\000\000\000\000\000\000\000\000\039\002\ -\000\000\000\000\039\002\000\000\000\000\000\000\039\002\000\000\ -\000\000\000\000\000\000\084\000\000\000\197\000\084\000\000\000\ -\197\000\000\000\000\000\000\000\197\000\197\000\000\000\000\000\ -\084\000\000\000\197\000\197\000\084\000\000\000\000\000\000\000\ -\000\000\197\000\000\000\000\000\000\000\084\000\084\000\084\000\ -\084\000\000\000\000\000\000\000\000\000\197\000\000\000\197\000\ -\000\000\197\000\197\000\000\000\084\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\197\000\000\000\000\000\ -\197\000\120\000\000\000\000\000\197\000\000\000\000\000\084\000\ -\000\000\000\000\084\000\000\000\000\000\000\000\084\000\084\000\ -\000\000\000\000\000\000\000\000\084\000\084\000\244\004\000\000\ -\137\000\138\000\030\000\084\000\139\000\000\000\245\004\246\004\ -\141\000\000\000\000\000\000\000\000\000\000\000\000\000\084\000\ -\000\000\084\000\000\000\084\000\084\000\247\004\000\000\000\000\ -\248\004\000\000\000\000\000\000\000\000\000\000\000\000\084\000\ -\249\004\144\000\084\000\000\000\023\003\000\000\084\000\023\003\ -\145\000\023\003\023\003\023\003\023\003\000\000\000\000\023\003\ -\023\003\023\003\000\000\000\000\146\000\147\000\000\000\023\003\ -\000\000\000\000\000\000\023\003\000\000\000\000\023\003\000\000\ -\023\003\023\003\023\003\023\003\023\003\023\003\023\003\023\003\ -\023\003\000\000\000\000\023\003\023\003\023\003\000\000\000\000\ -\000\000\000\000\000\000\000\000\023\003\023\003\023\003\023\003\ -\023\003\023\003\023\003\023\003\023\003\023\003\023\003\023\003\ -\023\003\023\003\150\001\023\003\023\003\023\003\000\000\023\003\ -\023\003\023\003\023\003\023\003\023\003\000\000\023\003\023\003\ -\023\003\023\003\023\003\000\000\023\003\023\003\000\000\000\000\ -\023\003\023\003\000\000\023\003\023\003\023\003\023\003\023\003\ -\023\003\023\003\000\000\023\003\023\003\023\003\000\000\023\003\ -\000\000\023\003\023\003\000\000\023\003\000\000\023\003\023\003\ -\023\003\023\003\023\003\023\003\023\003\000\000\023\003\009\000\ -\010\000\011\000\000\000\000\000\000\000\012\000\013\000\014\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\015\000\016\000\ -\017\000\018\000\019\000\020\000\021\000\000\000\000\000\000\000\ -\000\000\022\000\000\000\023\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\024\000\000\000\025\000\026\000\ -\027\000\028\000\029\000\000\000\000\000\030\000\031\000\000\000\ -\000\000\032\000\033\000\034\000\000\000\164\002\035\000\036\000\ -\000\000\037\000\038\000\000\000\039\000\000\000\040\000\000\000\ -\041\000\000\000\042\000\000\000\000\000\000\000\043\000\044\000\ -\000\000\045\000\000\000\000\000\000\000\000\000\009\000\010\000\ -\011\000\000\000\129\000\121\000\012\000\013\000\014\000\047\000\ -\000\000\000\000\000\000\000\000\048\000\049\000\050\000\051\000\ -\052\000\053\000\000\000\000\000\054\000\015\000\016\000\017\000\ -\018\000\019\000\020\000\021\000\000\000\000\000\000\000\000\000\ -\022\000\000\000\023\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\024\000\000\000\025\000\026\000\027\000\ -\028\000\029\000\000\000\000\000\030\000\031\000\000\000\000\000\ -\032\000\033\000\034\000\000\000\000\000\035\000\036\000\000\000\ -\037\000\038\000\000\000\039\000\000\000\040\000\000\000\041\000\ -\000\000\042\000\000\000\109\000\000\000\043\000\044\000\000\000\ -\045\000\178\001\136\000\000\000\137\000\138\000\030\000\000\000\ -\139\000\000\000\121\000\140\000\141\000\000\000\047\000\000\000\ -\000\000\000\000\000\000\048\000\049\000\050\000\051\000\052\000\ -\053\000\000\000\000\000\054\000\142\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\143\000\144\000\000\000\009\000\ -\010\000\011\000\000\000\000\000\145\000\012\000\013\000\014\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\146\000\147\000\000\000\000\000\000\000\000\000\015\000\016\000\ -\017\000\018\000\019\000\020\000\021\000\000\000\000\000\000\000\ -\000\000\022\000\000\000\023\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\024\000\000\000\025\000\026\000\ -\027\000\028\000\029\000\000\000\000\000\030\000\031\000\000\000\ -\000\000\032\000\033\000\034\000\000\000\000\000\035\000\036\000\ -\000\000\037\000\038\000\000\000\039\000\132\000\040\000\000\000\ -\041\000\000\000\042\000\000\000\000\000\000\000\043\000\044\000\ -\000\000\045\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\121\000\000\000\000\000\000\000\047\000\ -\000\000\000\000\000\000\000\000\048\000\049\000\050\000\051\000\ -\052\000\053\000\000\000\000\000\054\000\164\002\000\000\000\000\ -\000\000\164\002\000\000\164\002\000\000\164\002\000\000\164\002\ -\000\000\164\002\000\000\164\002\164\002\000\000\164\002\164\002\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\164\002\164\002\000\000\164\002\164\002\134\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\164\002\ -\164\002\164\002\164\002\000\000\164\002\164\002\000\000\000\000\ -\164\002\000\000\000\000\000\000\000\000\164\002\164\002\164\002\ -\000\000\000\000\000\000\000\000\164\002\000\000\164\002\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\164\002\000\000\ -\000\000\164\002\000\000\000\000\000\000\000\000\164\002\135\000\ -\164\002\164\002\000\000\164\002\164\002\000\000\164\002\000\000\ -\000\000\000\000\164\002\109\000\000\000\164\002\000\000\164\002\ -\000\000\178\001\164\002\164\002\000\000\178\001\164\002\178\001\ -\109\000\178\001\000\000\178\001\000\000\178\001\000\000\178\001\ -\178\001\000\000\178\001\178\001\000\000\109\000\000\000\109\000\ -\109\000\000\000\000\000\000\000\178\001\000\000\000\000\178\001\ -\178\001\000\000\000\000\000\000\109\000\000\000\000\000\000\000\ -\000\000\130\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\178\001\178\001\000\000\178\001\109\000\ -\178\001\178\001\000\000\000\000\178\001\000\000\109\000\109\000\ -\000\000\178\001\178\001\178\001\000\000\109\000\000\000\000\000\ -\178\001\000\000\178\001\109\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\178\001\000\000\000\000\178\001\000\000\109\000\ -\000\000\000\000\178\001\109\000\178\001\178\001\000\000\178\001\ -\178\001\000\000\178\001\136\000\000\000\000\000\178\001\109\000\ -\000\000\178\001\109\000\178\001\000\000\132\000\178\001\178\001\ -\132\000\132\000\178\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\132\000\132\000\000\000\000\000\000\000\000\000\ -\132\000\000\000\000\000\000\000\000\000\000\000\000\000\132\000\ -\000\000\132\000\132\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\132\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\132\000\132\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\132\000\000\000\000\000\132\000\000\000\000\000\132\000\ -\132\000\132\000\000\000\132\000\000\000\134\000\000\000\132\000\ -\134\000\134\000\014\002\000\000\000\000\132\000\000\000\000\000\ -\000\000\000\000\134\000\134\000\000\000\000\000\000\000\000\000\ -\134\000\132\000\000\000\132\000\000\000\132\000\132\000\134\000\ -\000\000\134\000\134\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\132\000\000\000\000\000\132\000\000\000\134\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\134\000\134\000\000\000\ -\000\000\000\000\000\000\181\000\000\000\000\000\000\000\135\000\ -\000\000\134\000\135\000\135\000\134\000\000\000\000\000\134\000\ -\134\000\134\000\000\000\134\000\135\000\135\000\000\000\134\000\ -\000\000\000\000\135\000\000\000\000\000\134\000\000\000\000\000\ -\000\000\135\000\000\000\135\000\135\000\000\000\000\000\000\000\ -\000\000\134\000\000\000\134\000\000\000\134\000\134\000\000\000\ -\135\000\000\000\000\000\000\000\000\000\183\002\000\000\135\000\ -\135\000\134\000\000\000\000\000\134\000\000\000\000\000\000\000\ -\000\000\130\000\000\000\135\000\130\000\130\000\135\000\000\000\ -\000\000\000\000\135\000\135\000\000\000\135\000\130\000\130\000\ -\000\000\135\000\000\000\000\000\130\000\000\000\000\000\135\000\ -\000\000\000\000\000\000\130\000\000\000\130\000\130\000\000\000\ -\000\000\000\000\000\000\135\000\000\000\135\000\000\000\135\000\ -\135\000\000\000\130\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\130\000\130\000\135\000\000\000\000\000\135\000\000\000\ -\000\000\000\000\000\000\136\000\000\000\130\000\136\000\136\000\ -\130\000\015\002\000\000\000\000\130\000\130\000\000\000\130\000\ -\136\000\136\000\000\000\130\000\000\000\000\000\136\000\000\000\ -\000\000\130\000\000\000\000\000\000\000\136\000\000\000\136\000\ -\136\000\000\000\000\000\000\000\000\000\130\000\000\000\130\000\ -\000\000\130\000\130\000\000\000\136\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\136\000\136\000\130\000\000\000\000\000\ -\130\000\000\000\000\000\000\000\000\000\000\000\000\000\136\000\ -\000\000\000\000\136\000\182\000\000\000\000\000\136\000\136\000\ -\000\000\136\000\000\000\000\000\000\000\136\000\136\000\000\000\ -\137\000\138\000\030\000\136\000\139\000\000\000\000\000\140\000\ -\141\000\000\000\014\002\000\000\000\000\014\002\000\000\136\000\ -\000\000\136\000\014\002\136\000\136\000\000\000\000\000\014\002\ -\142\000\000\000\000\000\000\000\000\000\014\002\000\000\136\000\ -\143\000\126\003\136\000\000\000\014\002\000\000\014\002\014\002\ -\145\000\000\000\000\000\000\000\000\000\021\003\000\000\000\000\ -\000\000\000\000\014\002\014\002\146\000\147\000\000\000\000\000\ -\000\000\000\000\000\000\181\000\000\000\000\000\181\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\014\002\000\000\ -\181\000\014\002\000\000\000\000\014\002\014\002\014\002\000\000\ -\000\000\000\000\000\000\098\002\014\002\181\000\181\000\181\000\ -\181\000\000\000\014\002\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\181\000\000\000\014\002\023\003\ -\000\000\000\000\014\002\014\002\000\000\183\002\098\002\000\000\ -\183\002\000\000\000\000\000\000\000\000\000\000\014\002\181\000\ -\000\000\014\002\183\002\080\002\000\000\181\000\181\000\181\000\ -\000\000\000\000\000\000\000\000\080\002\181\000\000\000\183\002\ -\183\002\183\002\183\002\181\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\183\002\181\000\ -\000\000\181\000\000\000\181\000\080\002\000\000\000\000\080\002\ -\000\000\232\001\000\000\000\000\000\000\000\000\000\000\181\000\ -\080\002\183\002\181\000\000\000\000\000\174\002\000\000\183\002\ -\183\002\183\002\000\000\000\000\000\000\000\000\174\002\183\002\ -\000\000\015\002\000\000\000\000\015\002\183\002\000\000\000\000\ -\000\000\015\002\000\000\000\000\000\000\000\000\015\002\000\000\ -\000\000\183\002\000\000\183\002\015\002\183\002\174\002\000\000\ -\000\000\174\002\071\000\015\002\000\000\015\002\015\002\000\000\ -\000\000\183\002\174\002\000\000\183\002\000\000\000\000\000\000\ -\000\000\015\002\015\002\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\182\000\000\000\015\002\182\000\000\000\ -\015\002\000\000\000\000\015\002\015\002\015\002\000\000\000\000\ -\182\000\000\000\015\002\015\002\000\000\000\000\182\000\233\001\ -\000\000\015\002\000\000\000\000\000\000\182\000\182\000\182\000\ -\182\000\000\000\000\000\000\000\000\000\015\002\000\000\000\000\ -\000\000\015\002\015\002\000\000\182\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\182\000\000\000\015\002\000\000\000\000\ -\015\002\000\000\000\000\000\000\000\000\021\003\000\000\182\000\ -\021\003\000\000\182\000\000\000\000\000\000\000\182\000\182\000\ -\000\000\182\000\021\003\000\000\235\001\182\000\000\000\000\000\ -\021\003\000\000\000\000\182\000\000\000\000\000\000\000\021\003\ -\000\000\021\003\021\003\000\000\000\000\000\000\000\000\182\000\ -\000\000\182\000\000\000\182\000\182\000\021\003\021\003\000\000\ -\000\000\000\000\000\000\000\000\000\000\021\003\021\003\182\000\ -\000\000\000\000\182\000\000\000\000\000\000\000\000\000\023\003\ -\000\000\021\003\023\003\000\000\021\003\000\000\000\000\023\003\ -\000\000\021\003\000\000\021\003\023\003\000\000\000\000\021\003\ -\000\000\000\000\023\003\000\000\000\000\021\003\000\000\000\000\ -\000\000\023\003\000\000\023\003\023\003\000\000\000\000\234\001\ -\000\000\021\003\000\000\000\000\000\000\021\003\021\003\000\000\ -\023\003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\021\003\000\000\000\000\021\003\000\000\000\000\000\000\ -\000\000\232\001\000\000\023\003\232\001\000\000\023\003\000\000\ -\000\000\000\000\023\003\023\003\000\000\000\000\232\001\000\000\ -\000\000\023\003\000\000\000\000\232\001\000\000\000\000\023\003\ -\000\000\000\000\000\000\232\001\236\001\232\001\232\001\000\000\ -\000\000\000\000\000\000\023\003\000\000\011\002\000\000\023\003\ -\023\003\000\000\232\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\071\000\023\003\000\000\071\000\023\003\000\000\ -\000\000\000\000\000\000\000\000\000\000\232\001\000\000\071\000\ -\232\001\000\000\000\000\000\000\232\001\232\001\000\000\000\000\ -\000\000\000\000\000\000\232\001\071\000\000\000\071\000\071\000\ -\000\000\232\001\000\000\000\000\000\000\000\000\000\000\240\001\ -\000\000\000\000\071\000\071\000\000\000\232\001\000\000\000\000\ -\000\000\232\001\232\001\000\000\000\000\000\000\000\000\233\001\ -\000\000\000\000\233\001\000\000\000\000\232\001\071\000\000\000\ -\232\001\071\000\000\000\000\000\233\001\071\000\071\000\000\000\ -\000\000\000\000\233\001\000\000\071\000\000\000\000\000\000\000\ -\000\000\233\001\071\000\233\001\233\001\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\011\002\000\000\071\000\000\000\ -\233\001\000\000\071\000\071\000\000\000\021\003\000\000\000\000\ -\000\000\000\000\000\000\000\000\235\001\000\000\071\000\235\001\ -\000\000\071\000\000\000\233\001\000\000\000\000\233\001\000\000\ -\000\000\235\001\233\001\233\001\000\000\000\000\000\000\235\001\ -\000\000\233\001\000\000\000\000\000\000\000\000\235\001\233\001\ -\235\001\235\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\233\001\000\000\235\001\000\000\233\001\ -\233\001\000\000\125\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\233\001\000\000\000\000\233\001\000\000\ -\235\001\000\000\000\000\235\001\000\000\000\000\000\000\235\001\ -\235\001\000\000\000\000\000\000\000\000\000\000\235\001\234\001\ -\000\000\000\000\234\001\000\000\235\001\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\234\001\000\000\000\000\000\000\ -\235\001\000\000\234\001\000\000\235\001\235\001\000\000\126\000\ -\000\000\234\001\000\000\234\001\234\001\000\000\000\000\000\000\ -\235\001\000\000\000\000\235\001\000\000\000\000\000\000\000\000\ -\234\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\236\001\000\000\000\000\236\001\ -\000\000\000\000\000\000\234\001\000\000\011\002\234\001\000\000\ -\000\000\236\001\234\001\234\001\000\000\011\002\000\000\236\001\ -\023\003\234\001\011\002\000\000\000\000\000\000\236\001\234\001\ -\236\001\236\001\023\003\000\000\000\000\000\000\000\000\011\002\ -\000\000\011\002\011\002\234\001\000\000\236\001\000\000\234\001\ -\234\001\000\000\000\000\000\000\000\000\000\000\011\002\000\000\ -\000\000\000\000\000\000\234\001\000\000\000\000\234\001\240\001\ -\236\001\000\000\240\001\236\001\000\000\000\000\000\000\236\001\ -\236\001\011\002\000\000\000\000\240\001\000\000\236\001\011\002\ -\011\002\011\002\240\001\000\000\236\001\000\000\000\000\011\002\ -\000\000\240\001\000\000\240\001\240\001\011\002\000\000\000\000\ -\236\001\000\000\000\000\118\000\236\001\236\001\000\000\000\000\ -\240\001\011\002\000\000\000\000\000\000\011\002\000\000\000\000\ -\236\001\000\000\000\000\236\001\011\002\000\000\000\000\000\000\ -\000\000\011\002\000\000\240\001\011\002\021\003\240\001\000\000\ -\021\003\011\002\240\001\240\001\000\000\000\000\000\000\000\000\ -\000\000\240\001\021\003\000\000\000\000\000\000\011\002\240\001\ -\011\002\011\002\000\000\000\000\021\003\000\000\000\000\021\003\ -\000\000\021\003\021\003\240\001\000\000\011\002\119\000\240\001\ -\240\001\000\000\000\000\000\000\000\000\021\003\021\003\000\000\ -\000\000\000\000\000\000\240\001\000\000\000\000\240\001\000\000\ -\011\002\000\000\125\000\011\002\000\000\125\000\011\002\011\002\ -\011\002\021\003\000\000\000\000\021\003\000\000\011\002\125\000\ -\000\000\021\003\000\000\000\000\011\002\000\000\000\000\021\003\ -\000\000\000\000\000\000\000\000\125\000\021\003\125\000\125\000\ -\011\002\000\000\000\000\000\000\011\002\011\002\000\000\000\000\ -\000\000\021\003\000\000\125\000\223\001\021\003\021\003\000\000\ -\011\002\000\000\000\000\011\002\000\000\000\000\000\000\126\000\ -\000\000\021\003\126\000\000\000\021\003\000\000\125\000\000\000\ -\000\000\125\000\000\000\000\000\126\000\125\000\125\000\000\000\ -\000\000\000\000\000\000\000\000\125\000\000\000\000\000\000\000\ -\000\000\126\000\125\000\126\000\126\000\000\000\000\000\000\000\ -\061\000\000\000\000\000\000\000\000\000\000\000\125\000\000\000\ -\126\000\064\000\125\000\125\000\000\000\000\000\000\000\000\000\ -\023\003\000\000\000\000\000\000\000\000\000\000\125\000\000\000\ -\023\003\125\000\023\003\126\000\000\000\023\003\126\000\000\000\ -\000\000\000\000\126\000\126\000\000\000\000\000\000\000\023\003\ -\000\000\126\000\023\003\000\000\023\003\023\003\000\000\126\000\ -\000\000\000\000\000\000\000\000\023\003\000\000\023\003\023\003\ -\000\000\023\003\065\000\126\000\000\000\000\000\000\000\126\000\ -\126\000\000\000\000\000\023\003\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\126\000\023\003\000\000\126\000\023\003\ -\000\000\000\000\000\000\023\003\023\003\000\000\023\003\000\000\ -\000\000\023\003\023\003\118\000\000\000\023\003\023\003\000\000\ -\023\003\000\000\000\000\000\000\023\003\000\000\021\003\000\000\ -\118\000\000\000\023\003\000\000\023\003\000\000\000\000\000\000\ -\023\003\023\003\000\000\000\000\000\000\118\000\023\003\118\000\ -\118\000\000\000\023\003\023\003\023\003\000\000\000\000\023\003\ -\000\000\000\000\000\000\000\000\118\000\000\000\023\003\000\000\ -\000\000\023\003\000\000\000\000\021\003\000\000\000\000\021\003\ -\000\000\000\000\000\000\000\000\000\000\000\000\119\000\118\000\ -\000\000\021\003\118\000\000\000\000\000\000\000\118\000\118\000\ -\000\000\000\000\000\000\119\000\000\000\118\000\021\003\000\000\ -\021\003\021\003\000\000\118\000\000\000\000\000\000\000\000\000\ -\119\000\000\000\119\000\119\000\000\000\021\003\000\000\118\000\ -\000\000\000\000\000\000\118\000\118\000\000\000\000\000\119\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\118\000\ -\021\003\000\000\118\000\021\003\000\000\000\000\000\000\000\000\ -\021\003\000\000\119\000\000\000\223\001\119\000\021\003\000\000\ -\000\000\119\000\119\000\000\000\021\003\000\000\000\000\000\000\ -\119\000\223\001\000\000\000\000\000\000\000\000\119\000\000\000\ -\021\003\000\000\000\000\000\000\021\003\021\003\223\001\000\000\ -\223\001\223\001\119\000\000\000\000\000\000\000\119\000\119\000\ -\021\003\000\000\000\000\021\003\000\000\223\001\000\000\000\000\ -\061\000\000\000\119\000\000\000\000\000\119\000\000\000\000\000\ -\000\000\064\000\000\000\000\000\000\000\061\000\000\000\000\000\ -\223\001\000\000\000\000\223\001\000\000\000\000\064\000\223\001\ -\223\001\000\000\061\000\000\000\061\000\061\000\223\001\000\000\ -\000\000\000\000\000\000\064\000\223\001\064\000\064\000\000\000\ -\000\000\061\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\223\001\000\000\064\000\000\000\223\001\223\001\000\000\000\000\ -\000\000\000\000\065\000\000\000\061\000\000\000\000\000\061\000\ -\223\001\000\000\000\000\223\001\061\000\064\000\000\000\065\000\ -\064\000\000\000\061\000\000\000\000\000\064\000\000\000\000\000\ -\061\000\000\000\000\000\064\000\065\000\000\000\065\000\065\000\ -\000\000\064\000\000\000\000\000\061\000\000\000\000\000\000\000\ -\061\000\061\000\000\000\065\000\000\000\064\000\021\003\000\000\ -\000\000\064\000\064\000\000\000\061\000\000\000\000\000\061\000\ -\000\000\000\000\000\000\021\003\000\000\064\000\065\000\000\000\ -\064\000\065\000\000\000\000\000\000\000\000\000\065\000\000\000\ -\021\003\000\000\021\003\021\003\065\000\000\000\000\000\000\000\ -\000\000\000\000\065\000\000\000\000\000\000\000\000\000\021\003\ -\000\000\000\000\000\000\000\000\000\000\000\000\065\000\000\000\ -\000\000\000\000\065\000\065\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\021\003\000\000\000\000\021\003\065\000\000\000\ -\000\000\065\000\021\003\000\000\000\000\000\000\000\000\000\000\ -\021\003\000\000\000\000\000\000\000\000\000\000\021\003\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\021\003\016\003\000\000\000\000\021\003\021\003\ -\016\003\016\003\016\003\016\003\000\000\000\000\016\003\016\003\ -\016\003\016\003\021\003\000\000\000\000\021\003\016\003\000\000\ -\000\000\000\000\000\000\000\000\000\000\016\003\000\000\016\003\ -\016\003\016\003\016\003\016\003\016\003\016\003\016\003\000\000\ -\000\000\000\000\016\003\000\000\016\003\000\000\000\000\000\000\ -\000\000\000\000\000\000\016\003\016\003\016\003\016\003\016\003\ -\016\003\016\003\016\003\016\003\000\000\000\000\016\003\016\003\ -\000\000\000\000\016\003\016\003\016\003\016\003\000\000\016\003\ -\016\003\016\003\016\003\016\003\000\000\016\003\000\000\016\003\ -\016\003\016\003\000\000\016\003\016\003\000\000\000\000\016\003\ -\016\003\000\000\016\003\000\000\016\003\016\003\000\000\016\003\ -\016\003\000\000\000\000\016\003\016\003\000\000\016\003\000\000\ -\016\003\016\003\000\000\016\003\000\000\016\003\016\003\016\003\ -\016\003\016\003\016\003\016\003\023\003\016\003\000\000\000\000\ -\000\000\023\003\023\003\023\003\023\003\000\000\000\000\023\003\ -\023\003\000\000\000\000\000\000\000\000\000\000\000\000\023\003\ -\000\000\000\000\000\000\000\000\000\000\000\000\023\003\000\000\ -\023\003\000\000\023\003\023\003\023\003\023\003\023\003\023\003\ -\000\000\000\000\000\000\023\003\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\023\003\023\003\023\003\023\003\ -\023\003\023\003\023\003\023\003\023\003\000\000\000\000\023\003\ -\023\003\000\000\000\000\023\003\023\003\023\003\000\000\000\000\ -\023\003\023\003\023\003\023\003\023\003\000\000\023\003\000\000\ -\023\003\023\003\023\003\000\000\000\000\023\003\000\000\000\000\ -\023\003\023\003\000\000\023\003\000\000\023\003\023\003\000\000\ -\000\000\023\003\000\000\000\000\000\000\023\003\000\000\023\003\ -\000\000\023\003\023\003\000\000\023\003\000\000\023\003\023\003\ -\000\000\023\003\023\003\023\003\023\003\000\000\023\003\026\001\ -\027\001\028\001\000\000\000\000\009\000\010\000\029\001\000\000\ -\030\001\000\000\012\000\013\000\000\000\000\000\031\001\032\001\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\033\001\000\000\000\000\017\000\018\000\019\000\ -\020\000\021\000\000\000\034\001\000\000\000\000\022\000\000\000\ -\000\000\035\001\036\001\037\001\038\001\039\001\040\001\000\000\ -\000\000\024\000\000\000\025\000\026\000\027\000\028\000\029\000\ -\000\000\000\000\030\000\000\000\041\001\000\000\032\000\033\000\ -\034\000\000\000\000\000\000\000\036\000\000\000\042\001\043\001\ -\000\000\044\001\000\000\040\000\000\000\041\000\000\000\000\000\ -\000\000\045\001\046\001\047\001\048\001\049\001\050\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\051\001\000\000\000\000\ -\000\000\052\001\000\000\053\001\047\000\000\000\000\000\000\000\ -\000\000\048\000\049\000\000\000\051\000\052\000\026\001\027\001\ -\028\001\054\000\000\000\009\000\010\000\029\001\000\000\030\001\ -\000\000\012\000\013\000\000\000\000\000\079\003\032\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\033\001\000\000\000\000\017\000\018\000\019\000\020\000\ -\021\000\000\000\034\001\000\000\000\000\022\000\000\000\000\000\ -\035\001\036\001\037\001\038\001\039\001\040\001\000\000\000\000\ -\024\000\000\000\025\000\026\000\027\000\028\000\029\000\000\000\ -\000\000\030\000\000\000\041\001\000\000\032\000\033\000\034\000\ -\000\000\000\000\000\000\036\000\000\000\042\001\043\001\000\000\ -\080\003\000\000\040\000\000\000\041\000\000\000\000\000\000\000\ -\045\001\046\001\047\001\048\001\049\001\050\001\000\000\000\000\ -\000\000\000\000\000\000\089\002\081\003\089\002\089\002\089\002\ -\052\001\089\002\053\001\047\000\089\002\089\002\000\000\000\000\ -\048\000\049\000\000\000\051\000\052\000\023\003\000\000\000\000\ -\054\000\000\000\023\003\023\003\023\003\089\002\000\000\000\000\ -\023\003\023\003\023\003\000\000\000\000\089\002\089\002\000\000\ -\000\000\000\000\000\000\000\000\000\000\089\002\000\000\023\003\ -\000\000\023\003\023\003\023\003\023\003\023\003\023\003\023\003\ -\000\000\089\002\089\002\000\000\023\003\000\000\023\003\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\023\003\ -\000\000\023\003\023\003\023\003\023\003\023\003\000\000\000\000\ -\023\003\023\003\000\000\000\000\023\003\023\003\023\003\000\000\ -\000\000\023\003\023\003\000\000\023\003\023\003\000\000\023\003\ -\000\000\023\003\000\000\023\003\000\000\023\003\000\000\000\000\ -\000\000\023\003\023\003\143\002\023\003\000\000\000\000\000\000\ -\217\002\217\002\217\002\000\000\000\000\023\003\217\002\217\002\ -\000\000\000\000\023\003\000\000\000\000\000\000\000\000\023\003\ -\023\003\023\003\023\003\023\003\023\003\000\000\000\000\023\003\ -\000\000\217\002\217\002\217\002\217\002\217\002\000\000\000\000\ -\000\000\000\000\217\002\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\217\002\000\000\217\002\ -\217\002\217\002\217\002\217\002\000\000\000\000\217\002\000\000\ -\000\000\000\000\217\002\217\002\217\002\000\000\000\000\000\000\ -\217\002\000\000\217\002\217\002\000\000\000\000\000\000\217\002\ -\000\000\217\002\000\000\000\000\000\000\000\000\000\000\217\002\ -\217\002\144\002\217\002\000\000\000\000\000\000\218\002\218\002\ -\218\002\143\002\000\000\000\000\218\002\218\002\000\000\000\000\ -\217\002\000\000\000\000\000\000\000\000\217\002\217\002\000\000\ -\217\002\217\002\000\000\000\000\000\000\217\002\000\000\218\002\ -\218\002\218\002\218\002\218\002\000\000\000\000\000\000\000\000\ -\218\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\218\002\000\000\218\002\218\002\218\002\ -\218\002\218\002\000\000\000\000\218\002\000\000\000\000\000\000\ -\218\002\218\002\218\002\000\000\000\000\000\000\218\002\000\000\ -\218\002\218\002\000\000\000\000\000\000\218\002\000\000\218\002\ -\000\000\000\000\000\000\000\000\000\000\218\002\218\002\141\002\ -\218\002\000\000\000\000\000\000\219\002\219\002\219\002\144\002\ -\000\000\000\000\219\002\219\002\000\000\000\000\218\002\000\000\ -\000\000\000\000\000\000\218\002\218\002\000\000\218\002\218\002\ -\000\000\000\000\000\000\218\002\000\000\219\002\219\002\219\002\ -\219\002\219\002\000\000\000\000\000\000\000\000\219\002\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\219\002\000\000\219\002\219\002\219\002\219\002\219\002\ -\000\000\000\000\219\002\000\000\000\000\000\000\219\002\219\002\ -\219\002\000\000\000\000\000\000\219\002\000\000\219\002\219\002\ -\000\000\000\000\000\000\219\002\000\000\219\002\000\000\000\000\ -\000\000\000\000\000\000\219\002\219\002\142\002\219\002\000\000\ -\000\000\000\000\220\002\220\002\220\002\141\002\000\000\000\000\ -\220\002\220\002\000\000\000\000\219\002\000\000\000\000\000\000\ -\000\000\219\002\219\002\000\000\219\002\219\002\000\000\000\000\ -\000\000\219\002\000\000\220\002\220\002\220\002\220\002\220\002\ -\000\000\000\000\000\000\000\000\220\002\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\220\002\ -\000\000\220\002\220\002\220\002\220\002\220\002\000\000\000\000\ -\220\002\000\000\000\000\000\000\220\002\220\002\220\002\000\000\ -\000\000\000\000\220\002\000\000\220\002\220\002\000\000\000\000\ -\000\000\220\002\000\000\220\002\000\000\000\000\000\000\000\000\ -\000\000\220\002\220\002\000\000\220\002\000\000\000\000\000\000\ -\000\000\000\000\000\000\142\002\224\000\225\000\226\000\000\000\ -\000\000\000\000\220\002\000\000\227\000\000\000\228\000\220\002\ -\220\002\000\000\220\002\220\002\229\000\230\000\231\000\220\002\ -\000\000\232\000\233\000\234\000\000\000\235\000\236\000\237\000\ -\000\000\238\000\239\000\240\000\241\000\000\000\000\000\000\000\ -\242\000\243\000\244\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\245\000\246\000\000\000\000\000\247\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\248\000\249\000\000\000\000\000\000\000\062\002\250\000\251\000\ -\000\000\062\002\000\000\252\000\253\000\254\000\255\000\000\001\ -\001\001\002\001\000\000\003\001\000\000\000\000\062\002\000\000\ -\062\002\004\001\000\000\045\002\000\000\000\000\005\001\062\002\ -\062\002\000\000\000\000\000\000\006\001\000\000\000\000\007\001\ -\008\001\062\002\009\001\010\001\011\001\012\001\013\001\000\000\ -\014\001\015\001\016\001\017\001\018\001\062\002\062\002\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\062\002\000\000\000\000\000\000\062\002\000\000\062\002\ -\062\002\062\002\000\000\062\002\000\000\000\000\062\002\000\000\ -\000\000\000\000\026\001\027\001\028\001\000\000\000\000\000\000\ -\010\000\207\001\000\000\030\001\000\000\000\000\013\000\045\002\ -\062\002\031\001\032\001\000\000\062\002\000\000\062\002\000\000\ -\000\000\062\002\000\000\000\000\000\000\033\001\161\000\000\000\ -\017\000\018\000\062\002\000\000\062\002\000\000\034\001\000\000\ -\000\000\000\000\000\000\000\000\035\001\036\001\037\001\038\001\ -\039\001\040\001\000\000\000\000\024\000\000\000\162\000\163\000\ -\000\000\164\000\165\000\000\000\000\000\030\000\000\000\041\001\ -\000\000\000\000\166\000\167\000\000\000\000\000\000\000\000\000\ -\000\000\208\001\209\001\000\000\210\001\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\045\001\046\001\211\001\212\001\ -\049\001\213\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\051\001\000\000\000\000\170\000\052\001\000\000\053\001\047\000\ -\000\000\000\000\000\000\000\000\048\000\000\000\240\002\051\000\ -\171\000\026\001\027\001\028\001\000\000\000\000\000\000\010\000\ -\207\001\000\000\030\001\000\000\000\000\013\000\000\000\000\000\ -\031\001\032\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\033\001\161\000\000\000\017\000\ -\018\000\000\000\000\000\000\000\000\000\034\001\000\000\000\000\ -\000\000\000\000\000\000\035\001\036\001\037\001\038\001\039\001\ -\040\001\000\000\000\000\024\000\000\000\162\000\163\000\000\000\ -\164\000\165\000\000\000\000\000\030\000\000\000\041\001\000\000\ -\000\000\166\000\167\000\000\000\000\000\000\000\000\000\000\000\ -\208\001\209\001\000\000\210\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\045\001\046\001\211\001\212\001\049\001\ -\213\001\000\000\000\000\000\000\000\000\000\000\000\000\051\001\ -\000\000\000\000\170\000\052\001\000\000\053\001\047\000\000\000\ -\000\000\000\000\000\000\048\000\000\000\194\003\051\000\171\000\ -\026\001\027\001\028\001\000\000\000\000\000\000\010\000\207\001\ -\000\000\030\001\000\000\000\000\013\000\000\000\000\000\031\001\ -\032\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\033\001\161\000\000\000\017\000\018\000\ -\000\000\000\000\000\000\000\000\034\001\000\000\000\000\000\000\ -\000\000\000\000\035\001\036\001\037\001\038\001\039\001\040\001\ -\000\000\000\000\024\000\000\000\162\000\163\000\000\000\164\000\ -\165\000\000\000\000\000\030\000\000\000\041\001\000\000\000\000\ -\166\000\167\000\000\000\000\000\000\000\000\000\000\000\208\001\ -\209\001\000\000\210\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\045\001\046\001\211\001\212\001\049\001\213\001\ -\000\000\000\000\000\000\000\000\000\000\000\000\051\001\000\000\ -\000\000\170\000\052\001\000\000\053\001\047\000\000\000\000\000\ -\000\000\000\000\048\000\000\000\154\004\051\000\171\000\026\001\ -\027\001\028\001\000\000\000\000\000\000\010\000\207\001\000\000\ -\030\001\000\000\000\000\013\000\000\000\000\000\031\001\032\001\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\033\001\161\000\000\000\017\000\018\000\000\000\ -\000\000\000\000\000\000\034\001\000\000\000\000\000\000\000\000\ -\000\000\035\001\036\001\037\001\038\001\039\001\040\001\000\000\ -\000\000\024\000\000\000\162\000\163\000\000\000\164\000\165\000\ -\000\000\000\000\030\000\000\000\041\001\000\000\000\000\166\000\ -\167\000\000\000\000\000\000\000\000\000\000\000\208\001\209\001\ -\000\000\210\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\045\001\046\001\211\001\212\001\049\001\213\001\000\000\ -\000\000\157\003\000\000\000\000\000\000\051\001\000\000\010\000\ -\170\000\052\001\000\000\053\001\047\000\013\000\000\000\000\000\ -\079\003\048\000\000\000\000\000\051\000\171\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\161\000\000\000\017\000\ -\018\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\024\000\000\000\162\000\163\000\000\000\ -\164\000\165\000\000\000\000\000\030\000\000\000\200\002\000\000\ -\000\000\166\000\167\000\000\000\010\000\000\000\000\000\000\000\ -\168\000\000\000\013\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\169\000\000\000\000\000\ -\000\000\000\000\161\000\000\000\017\000\018\000\000\000\158\003\ -\000\000\000\000\170\000\000\000\000\000\000\000\047\000\000\000\ -\000\000\000\000\000\000\048\000\000\000\000\000\051\000\171\000\ -\024\000\000\000\162\000\163\000\000\000\164\000\165\000\000\000\ -\000\000\030\000\000\000\202\002\000\000\000\000\166\000\167\000\ -\000\000\010\000\000\000\000\000\000\000\168\000\000\000\013\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\169\000\000\000\000\000\000\000\000\000\161\000\ -\000\000\017\000\018\000\000\000\000\000\000\000\000\000\170\000\ -\000\000\000\000\000\000\047\000\000\000\000\000\000\000\000\000\ -\048\000\000\000\000\000\051\000\171\000\024\000\000\000\162\000\ -\163\000\000\000\164\000\165\000\000\000\000\000\030\000\000\000\ -\204\002\000\000\000\000\166\000\167\000\000\000\010\000\000\000\ -\000\000\000\000\168\000\000\000\013\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\169\000\ -\000\000\000\000\000\000\000\000\161\000\000\000\017\000\018\000\ -\000\000\000\000\000\000\000\000\170\000\000\000\000\000\000\000\ -\047\000\000\000\000\000\000\000\000\000\048\000\000\000\000\000\ -\051\000\171\000\024\000\000\000\162\000\163\000\000\000\164\000\ -\165\000\000\000\000\000\030\000\000\000\161\004\000\000\000\000\ -\166\000\167\000\000\000\010\000\000\000\000\000\000\000\168\000\ -\000\000\013\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\169\000\000\000\000\000\000\000\ -\000\000\161\000\000\000\017\000\018\000\000\000\000\000\000\000\ -\000\000\170\000\000\000\000\000\000\000\047\000\000\000\000\000\ -\000\000\000\000\048\000\000\000\000\000\051\000\171\000\024\000\ -\000\000\162\000\163\000\000\000\164\000\165\000\000\000\000\000\ -\030\000\000\000\163\004\000\000\000\000\166\000\167\000\000\000\ -\010\000\000\000\000\000\000\000\168\000\000\000\013\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\169\000\000\000\000\000\000\000\000\000\161\000\000\000\ -\017\000\018\000\000\000\000\000\000\000\000\000\170\000\000\000\ -\000\000\000\000\047\000\000\000\000\000\000\000\000\000\048\000\ -\000\000\000\000\051\000\171\000\024\000\000\000\162\000\163\000\ -\000\000\164\000\165\000\000\000\000\000\030\000\000\000\165\004\ -\000\000\000\000\166\000\167\000\000\000\010\000\000\000\000\000\ -\000\000\168\000\000\000\013\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\169\000\000\000\ -\000\000\000\000\000\000\161\000\000\000\017\000\018\000\000\000\ -\000\000\000\000\000\000\170\000\000\000\000\000\000\000\047\000\ -\000\000\000\000\000\000\000\000\048\000\000\000\000\000\051\000\ -\171\000\024\000\000\000\162\000\163\000\000\000\164\000\165\000\ -\000\000\000\000\030\000\000\000\000\000\000\000\000\000\166\000\ -\167\000\009\000\010\000\011\000\000\000\000\000\168\000\012\000\ -\013\000\014\000\032\002\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\169\000\000\000\000\000\000\000\000\000\ -\015\000\016\000\017\000\018\000\019\000\020\000\021\000\000\000\ -\170\000\000\000\000\000\022\000\047\000\023\000\000\000\000\000\ -\000\000\048\000\000\000\000\000\051\000\171\000\024\000\000\000\ -\025\000\026\000\027\000\028\000\029\000\000\000\000\000\030\000\ -\031\000\000\000\000\000\032\000\033\000\034\000\000\000\000\000\ -\035\000\036\000\000\000\037\000\038\000\000\000\039\000\000\000\ -\040\000\000\000\041\000\000\000\042\000\000\000\000\000\000\000\ -\043\000\044\000\000\000\045\000\000\000\033\002\000\000\000\000\ -\009\000\010\000\011\000\000\000\046\000\000\000\012\000\013\000\ -\014\000\047\000\000\000\000\000\000\000\000\000\048\000\049\000\ -\050\000\051\000\052\000\053\000\000\000\000\000\054\000\015\000\ -\016\000\017\000\018\000\019\000\020\000\021\000\000\000\000\000\ -\000\000\000\000\022\000\000\000\023\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\024\000\000\000\025\000\ -\026\000\027\000\028\000\029\000\000\000\000\000\030\000\031\000\ -\000\000\000\000\032\000\033\000\034\000\000\000\000\000\035\000\ -\036\000\000\000\037\000\038\000\000\000\039\000\000\000\040\000\ -\000\000\041\000\000\000\042\000\000\000\000\000\000\000\043\000\ -\044\000\000\000\045\000\000\000\000\000\000\000\009\000\010\000\ -\011\000\000\000\000\000\046\000\012\000\013\000\000\000\000\000\ -\047\000\000\000\000\000\000\000\000\000\048\000\049\000\050\000\ -\051\000\052\000\053\000\000\000\000\000\054\000\000\000\017\000\ -\018\000\019\000\020\000\021\000\000\000\000\000\000\000\000\000\ -\022\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\024\000\000\000\025\000\026\000\027\000\ -\028\000\029\000\000\000\000\000\030\000\000\000\000\000\000\000\ -\032\000\033\000\034\000\000\000\000\000\000\000\036\000\000\000\ -\037\000\038\000\000\000\000\000\000\000\040\000\000\000\041\000\ -\000\000\000\000\000\000\000\000\000\000\043\000\044\000\000\000\ -\045\000\000\000\000\000\000\000\000\000\219\000\009\000\010\000\ -\011\000\000\000\000\000\222\000\012\000\013\000\047\000\000\000\ -\000\000\000\000\000\000\048\000\049\000\000\000\051\000\052\000\ -\000\000\000\000\000\000\054\000\000\000\000\000\000\000\017\000\ -\018\000\019\000\020\000\021\000\000\000\000\000\000\000\000\000\ -\022\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\024\000\000\000\025\000\026\000\027\000\ -\028\000\029\000\000\000\000\000\030\000\000\000\000\000\000\000\ -\032\000\033\000\034\000\000\000\000\000\000\000\036\000\000\000\ -\037\000\038\000\000\000\000\000\000\000\040\000\000\000\041\000\ -\000\000\000\000\000\000\000\000\000\000\043\000\044\000\000\000\ -\045\000\000\000\000\000\009\000\010\000\011\000\000\000\000\000\ -\000\000\012\000\013\000\000\000\000\000\000\000\047\000\000\000\ -\000\000\000\000\000\000\048\000\049\000\000\000\051\000\052\000\ -\238\001\000\000\000\000\054\000\017\000\018\000\019\000\020\000\ -\021\000\000\000\000\000\000\000\000\000\022\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\024\000\000\000\025\000\026\000\027\000\028\000\029\000\000\000\ -\000\000\030\000\000\000\000\000\000\000\032\000\033\000\034\000\ -\000\000\000\000\000\000\036\000\000\000\037\000\038\000\000\000\ -\000\000\000\000\040\000\000\000\041\000\000\000\000\000\000\000\ -\000\000\000\000\043\000\044\000\000\000\045\000\000\000\000\000\ -\009\000\010\000\011\000\000\000\000\000\000\000\012\000\013\000\ -\000\000\000\000\000\000\047\000\000\000\000\000\000\000\000\000\ -\048\000\049\000\000\000\051\000\052\000\000\000\000\000\000\000\ -\054\000\017\000\018\000\019\000\020\000\021\000\000\000\000\000\ -\000\000\000\000\022\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\024\000\000\000\025\000\ -\026\000\027\000\028\000\029\000\000\000\000\000\030\000\000\000\ -\000\000\000\000\032\000\033\000\034\000\000\000\000\000\000\000\ -\036\000\000\000\037\000\038\000\000\000\000\000\000\000\040\000\ -\000\000\041\000\000\000\000\000\000\000\000\000\100\002\043\000\ -\044\000\000\000\045\000\000\000\000\000\009\000\010\000\011\000\ -\000\000\000\000\000\000\012\000\013\000\000\000\000\000\000\000\ -\047\000\000\000\000\000\000\000\000\000\048\000\049\000\000\000\ -\051\000\052\000\000\000\000\000\000\000\054\000\017\000\018\000\ -\019\000\020\000\021\000\000\000\000\000\000\000\000\000\022\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\024\000\000\000\025\000\026\000\027\000\028\000\ -\029\000\000\000\000\000\030\000\000\000\000\000\000\000\032\000\ -\033\000\034\000\000\000\000\000\000\000\036\000\000\000\037\000\ -\038\000\000\000\000\000\000\000\040\000\000\000\041\000\000\000\ -\000\000\000\000\000\000\000\000\043\000\044\000\000\000\045\000\ -\000\000\000\000\000\000\000\000\075\003\009\000\010\000\011\000\ -\000\000\000\000\077\003\012\000\013\000\047\000\000\000\000\000\ -\000\000\000\000\048\000\049\000\000\000\051\000\052\000\000\000\ -\000\000\000\000\054\000\000\000\000\000\000\000\017\000\018\000\ -\019\000\020\000\021\000\000\000\000\000\000\000\000\000\022\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\024\000\000\000\025\000\026\000\027\000\028\000\ -\029\000\000\000\000\000\030\000\000\000\000\000\000\000\032\000\ -\033\000\034\000\000\000\000\000\000\000\036\000\000\000\037\000\ -\038\000\000\000\000\000\000\000\040\000\000\000\041\000\000\000\ -\000\000\000\000\000\000\000\000\043\000\044\000\000\000\045\000\ -\000\000\000\000\000\000\009\000\010\000\011\000\000\000\000\000\ -\000\000\012\000\013\000\000\000\000\000\047\000\000\000\000\000\ -\000\000\000\000\048\000\049\000\134\004\051\000\052\000\000\000\ -\000\000\000\000\054\000\000\000\017\000\018\000\019\000\020\000\ -\021\000\000\000\000\000\000\000\000\000\022\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\024\000\000\000\025\000\026\000\027\000\028\000\029\000\000\000\ -\000\000\030\000\000\000\000\000\000\000\032\000\033\000\034\000\ -\000\000\000\000\000\000\036\000\000\000\037\000\038\000\000\000\ -\000\000\000\000\040\000\000\000\041\000\000\000\000\000\000\000\ -\000\000\000\000\043\000\044\000\000\000\045\000\000\000\000\000\ -\025\003\025\003\025\003\000\000\000\000\000\000\025\003\025\003\ -\000\000\000\000\000\000\047\000\000\000\000\000\000\000\000\000\ -\048\000\049\000\000\000\051\000\052\000\025\003\000\000\000\000\ -\054\000\025\003\025\003\025\003\025\003\025\003\000\000\000\000\ -\000\000\000\000\025\003\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\025\003\000\000\025\003\ -\025\003\025\003\025\003\025\003\000\000\000\000\025\003\000\000\ -\000\000\000\000\025\003\025\003\025\003\000\000\000\000\000\000\ -\025\003\000\000\025\003\025\003\000\000\000\000\000\000\025\003\ -\000\000\025\003\000\000\000\000\000\000\000\000\000\000\025\003\ -\025\003\000\000\025\003\000\000\000\000\009\000\010\000\011\000\ -\000\000\000\000\000\000\012\000\013\000\000\000\000\000\000\000\ -\025\003\000\000\000\000\000\000\000\000\025\003\025\003\000\000\ -\025\003\025\003\000\000\000\000\000\000\025\003\017\000\018\000\ -\019\000\020\000\021\000\000\000\000\000\000\000\000\000\022\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\024\000\000\000\025\000\026\000\027\000\028\000\ -\029\000\000\000\000\000\030\000\000\000\000\000\000\000\032\000\ -\033\000\034\000\000\000\000\000\000\000\036\000\000\000\037\000\ -\038\000\000\000\000\000\000\000\040\000\000\000\041\000\000\000\ -\000\000\000\000\000\000\000\000\043\000\044\000\000\000\045\000\ -\000\000\000\000\025\003\025\003\025\003\000\000\000\000\000\000\ -\025\003\025\003\000\000\000\000\000\000\047\000\000\000\000\000\ -\000\000\000\000\048\000\049\000\000\000\051\000\052\000\000\000\ -\000\000\000\000\054\000\025\003\025\003\025\003\025\003\025\003\ -\000\000\000\000\000\000\000\000\025\003\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\025\003\ -\000\000\025\003\025\003\025\003\025\003\025\003\000\000\000\000\ -\025\003\000\000\000\000\000\000\025\003\025\003\025\003\000\000\ -\000\000\000\000\025\003\000\000\025\003\025\003\000\000\000\000\ -\000\000\025\003\000\000\025\003\000\000\000\000\000\000\000\000\ -\000\000\025\003\025\003\000\000\025\003\000\000\000\000\023\003\ -\023\003\023\003\000\000\000\000\000\000\023\003\023\003\000\000\ -\000\000\000\000\025\003\000\000\000\000\000\000\000\000\025\003\ -\025\003\000\000\025\003\025\003\000\000\000\000\000\000\025\003\ -\023\003\023\003\023\003\023\003\023\003\000\000\000\000\000\000\ -\000\000\023\003\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\023\003\000\000\023\003\023\003\ -\023\003\023\003\023\003\000\000\000\000\023\003\000\000\000\000\ -\000\000\023\003\023\003\023\003\000\000\000\000\000\000\023\003\ -\000\000\023\003\023\003\000\000\000\000\010\000\023\003\000\000\ -\023\003\000\000\000\000\013\000\000\000\217\003\023\003\023\003\ -\018\002\023\003\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\218\003\000\000\000\000\017\000\018\000\023\003\ -\000\000\000\000\000\000\000\000\023\003\023\003\000\000\023\003\ -\023\003\000\000\000\000\000\000\023\003\000\000\000\000\000\000\ -\000\000\024\000\252\001\000\000\163\000\000\000\164\000\165\000\ -\000\000\000\000\030\000\000\000\000\000\000\000\000\000\166\000\ -\219\003\000\000\010\000\000\000\000\000\000\000\168\000\000\000\ -\013\000\000\000\017\002\000\000\000\000\018\002\000\000\000\000\ -\254\001\000\000\000\000\169\000\000\000\000\000\000\000\218\003\ -\255\001\000\000\017\000\018\000\000\000\010\000\000\000\000\000\ -\170\000\000\000\000\000\013\000\047\000\250\002\000\000\000\002\ -\000\000\048\000\000\000\000\000\051\000\171\000\024\000\252\001\ -\000\000\163\000\000\000\164\000\165\000\017\000\018\000\030\000\ -\000\000\000\000\000\000\000\000\166\000\219\003\000\000\000\000\ -\000\000\000\000\000\000\168\000\000\000\000\000\000\000\000\000\ -\000\000\024\000\252\001\000\000\163\000\254\001\164\000\165\000\ -\169\000\000\000\030\000\000\000\000\000\255\001\000\000\166\000\ -\251\002\000\000\000\000\000\000\000\000\170\000\168\000\000\000\ -\252\002\047\000\000\000\000\000\000\002\000\000\048\000\000\000\ -\254\001\051\000\171\000\169\000\000\000\000\000\010\000\000\000\ -\255\001\000\000\000\000\000\000\013\000\000\000\107\004\000\000\ -\170\000\000\000\000\000\000\000\047\000\000\000\000\000\000\002\ -\000\000\048\000\000\000\108\004\051\000\171\000\017\000\018\000\ -\000\000\010\000\000\000\000\000\000\000\000\000\000\000\013\000\ -\000\000\031\006\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\024\000\252\001\000\000\163\000\218\003\164\000\ -\165\000\017\000\018\000\030\000\000\000\000\000\000\000\000\000\ -\166\000\167\000\000\000\000\000\000\000\000\000\000\000\168\000\ -\000\000\000\000\000\000\000\000\000\000\024\000\252\001\000\000\ -\163\000\254\001\164\000\165\000\169\000\000\000\030\000\000\000\ -\000\000\255\001\000\000\166\000\219\003\000\000\010\000\000\000\ -\000\000\170\000\168\000\000\000\013\000\047\000\000\000\000\000\ -\000\002\000\000\048\000\000\000\254\001\051\000\171\000\169\000\ -\000\000\000\000\000\000\000\000\255\001\000\000\017\000\018\000\ -\000\000\010\000\000\000\000\000\170\000\000\000\000\000\013\000\ -\047\000\000\000\000\000\000\002\000\000\048\000\000\000\000\000\ -\051\000\171\000\024\000\252\001\000\000\163\000\000\000\164\000\ -\165\000\017\000\018\000\030\000\000\000\000\000\000\000\000\000\ -\166\000\167\000\000\000\000\000\000\000\000\000\000\000\168\000\ -\000\000\015\006\000\000\000\000\000\000\024\000\252\001\000\000\ -\163\000\254\001\164\000\165\000\169\000\000\000\030\000\000\000\ -\000\000\255\001\000\000\166\000\253\001\000\000\010\000\000\000\ -\000\000\170\000\168\000\000\000\013\000\047\000\000\000\000\000\ -\000\002\000\000\048\000\000\000\254\001\051\000\171\000\169\000\ -\000\000\000\000\000\000\000\000\255\001\000\000\017\000\018\000\ -\000\000\025\003\000\000\000\000\170\000\000\000\000\000\025\003\ -\047\000\000\000\000\000\000\002\000\000\048\000\000\000\000\000\ -\051\000\171\000\024\000\252\001\000\000\163\000\000\000\164\000\ -\165\000\025\003\025\003\030\000\000\000\000\000\000\000\000\000\ -\166\000\167\000\000\000\000\000\000\000\000\000\000\000\168\000\ -\000\000\000\000\000\000\000\000\000\000\025\003\025\003\000\000\ -\025\003\254\001\025\003\025\003\169\000\000\000\025\003\000\000\ -\000\000\255\001\000\000\025\003\025\003\000\000\023\003\000\000\ -\000\000\170\000\025\003\000\000\023\003\047\000\000\000\000\000\ -\000\002\000\000\048\000\000\000\025\003\051\000\171\000\025\003\ -\000\000\000\000\000\000\000\000\025\003\000\000\023\003\023\003\ -\000\000\000\000\000\000\000\000\025\003\000\000\000\000\000\000\ -\025\003\000\000\000\000\025\003\000\000\025\003\000\000\000\000\ -\025\003\025\003\023\003\023\003\000\000\023\003\000\000\023\003\ -\023\003\000\000\000\000\023\003\000\000\000\000\000\000\000\000\ -\023\003\023\003\000\000\000\000\010\000\000\000\000\000\023\003\ -\000\000\000\000\013\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\023\003\000\000\000\000\023\003\000\000\000\000\000\000\ -\000\000\023\003\161\000\000\000\017\000\018\000\000\000\000\000\ -\000\000\023\003\000\000\000\000\000\000\023\003\000\000\000\000\ -\023\003\000\000\023\003\000\000\000\000\023\003\023\003\000\000\ -\024\000\000\000\162\000\163\000\000\000\164\000\165\000\000\000\ -\000\000\030\000\000\000\000\000\000\000\000\000\166\000\167\000\ -\000\000\000\000\000\000\010\000\000\000\168\000\000\000\205\001\ -\000\000\013\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\169\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\161\000\219\000\017\000\018\000\000\000\000\000\170\000\ -\000\000\000\000\000\000\047\000\000\000\000\000\000\000\000\000\ -\048\000\000\000\000\000\051\000\171\000\000\000\000\000\024\000\ -\000\000\162\000\163\000\000\000\164\000\165\000\000\000\000\000\ -\030\000\000\000\000\000\000\000\000\000\166\000\167\000\000\000\ -\010\000\000\000\000\000\000\000\168\000\000\000\013\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\010\000\011\000\000\000\ -\000\000\169\000\012\000\013\000\000\000\000\000\161\000\000\000\ -\017\000\018\000\000\000\000\000\000\000\000\000\170\000\000\000\ -\000\000\000\000\047\000\000\000\000\000\017\000\018\000\048\000\ -\000\000\000\000\051\000\171\000\024\000\000\000\162\000\163\000\ -\000\000\164\000\165\000\000\000\000\000\030\000\000\000\000\000\ -\000\000\024\000\166\000\167\000\026\000\027\000\028\000\029\000\ -\000\000\168\000\030\000\000\000\025\003\000\000\025\003\166\000\ -\034\000\000\000\025\003\000\000\000\000\000\000\169\000\000\000\ -\000\000\000\000\000\000\040\000\000\000\000\000\156\003\000\000\ -\000\000\000\000\025\003\170\000\025\003\025\003\045\000\047\000\ -\000\000\000\000\000\000\000\000\048\000\000\000\000\000\051\000\ -\171\000\000\000\000\000\000\000\047\000\000\000\000\000\000\000\ -\025\003\048\000\025\003\025\003\051\000\025\003\025\003\000\000\ -\000\000\025\003\000\000\000\000\000\000\000\000\025\003\025\003\ -\000\000\010\000\000\000\000\000\000\000\025\003\000\000\013\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\025\003\000\000\000\000\000\000\000\000\161\000\ -\000\000\017\000\018\000\000\000\000\000\000\000\000\000\025\003\ -\000\000\000\000\000\000\025\003\000\000\000\000\000\000\000\000\ -\025\003\000\000\000\000\025\003\025\003\024\000\000\000\162\000\ -\163\000\000\000\164\000\165\000\000\000\000\000\030\000\000\000\ -\000\000\000\000\000\000\166\000\167\000\000\000\025\003\000\000\ -\000\000\000\000\168\000\000\000\025\003\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\169\000\ -\000\000\000\000\000\000\000\000\025\003\000\000\025\003\025\003\ -\000\000\025\003\000\000\000\000\170\000\000\000\000\000\025\003\ -\047\000\000\000\000\000\000\000\000\000\048\000\000\000\000\000\ -\051\000\171\000\025\003\000\000\025\003\025\003\000\000\025\003\ -\025\003\025\003\025\003\025\003\000\000\000\000\000\000\000\000\ -\025\003\025\003\000\000\000\000\000\000\000\000\000\000\025\003\ -\000\000\000\000\000\000\000\000\000\000\025\003\000\000\025\003\ -\025\003\000\000\025\003\025\003\025\003\000\000\025\003\000\000\ -\000\000\000\000\000\000\025\003\025\003\000\000\213\002\000\000\ -\000\000\025\003\025\003\000\000\213\002\025\003\000\000\000\000\ -\000\000\000\000\025\003\000\000\000\000\025\003\025\003\025\003\ -\000\000\000\000\000\000\000\000\213\002\000\000\213\002\213\002\ -\025\003\010\000\000\000\000\000\025\003\000\000\000\000\013\000\ -\025\003\000\000\000\000\000\000\000\000\025\003\000\000\000\000\ -\025\003\025\003\213\002\000\000\213\002\213\002\000\000\213\002\ -\213\002\017\000\018\000\213\002\000\000\000\000\000\000\000\000\ -\213\002\213\002\000\000\000\000\000\000\000\000\000\000\213\002\ -\000\000\000\000\000\000\000\000\000\000\024\000\000\000\162\000\ -\163\000\000\000\164\000\165\000\213\002\000\000\030\000\000\000\ -\000\000\000\000\000\000\166\000\167\000\000\000\194\002\000\000\ -\000\000\213\002\168\000\000\000\194\002\213\002\000\000\000\000\ -\000\000\000\000\213\002\000\000\000\000\213\002\213\002\169\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\194\002\194\002\ -\000\000\023\003\000\000\000\000\170\000\000\000\000\000\023\003\ -\047\000\000\000\000\000\000\000\000\000\048\000\000\000\000\000\ -\051\000\171\000\194\002\000\000\194\002\194\002\000\000\194\002\ -\194\002\023\003\023\003\194\002\000\000\000\000\000\000\000\000\ -\194\002\194\002\000\000\000\000\000\000\000\000\000\000\194\002\ -\000\000\000\000\000\000\000\000\000\000\023\003\000\000\023\003\ -\023\003\000\000\023\003\023\003\194\002\000\000\023\003\000\000\ -\000\000\000\000\000\000\023\003\023\003\000\000\010\000\000\000\ -\000\000\194\002\023\003\000\000\013\000\194\002\000\000\000\000\ -\000\000\000\000\194\002\000\000\000\000\194\002\194\002\023\003\ -\000\000\000\000\000\000\000\000\000\000\000\000\017\000\018\000\ -\000\000\025\003\000\000\000\000\023\003\000\000\000\000\025\003\ -\023\003\000\000\000\000\000\000\000\000\023\003\000\000\000\000\ -\023\003\023\003\024\000\000\000\000\000\163\000\000\000\164\000\ -\165\000\025\003\025\003\030\000\000\000\000\000\000\000\000\000\ -\166\000\167\000\000\000\000\000\000\000\000\000\000\000\168\000\ -\000\000\000\000\000\000\000\000\000\000\025\003\000\000\000\000\ -\025\003\000\000\025\003\025\003\169\000\000\000\025\003\000\000\ -\000\000\000\000\000\000\025\003\025\003\000\000\000\000\000\000\ -\000\000\170\000\025\003\000\000\000\000\047\000\010\000\011\000\ -\000\000\000\000\048\000\012\000\013\000\051\000\171\000\025\003\ -\000\000\000\000\000\000\000\000\000\000\000\000\115\001\000\000\ -\000\000\000\000\000\000\000\000\025\003\000\000\017\000\018\000\ -\025\003\000\000\000\000\000\000\000\000\025\003\000\000\000\000\ -\025\003\025\003\000\000\000\000\000\000\000\000\000\000\116\001\ -\000\000\000\000\024\000\117\001\000\000\026\000\027\000\028\000\ -\029\000\000\000\000\000\030\000\000\000\000\000\000\000\000\000\ -\166\000\034\000\010\000\011\000\000\000\000\000\000\000\012\000\ -\013\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\ -\000\000\118\001\000\000\000\000\000\000\000\000\000\000\045\000\ -\000\000\119\001\017\000\018\000\000\000\000\000\000\000\000\000\ -\000\000\120\001\121\001\000\000\000\000\047\000\000\000\000\000\ -\122\001\000\000\048\000\000\000\000\000\051\000\024\000\117\001\ -\000\000\026\000\027\000\028\000\029\000\000\000\000\000\030\000\ -\000\000\000\000\000\000\000\000\166\000\034\000\010\000\011\000\ -\000\000\000\000\000\000\012\000\013\000\025\003\025\003\000\000\ -\040\000\000\000\025\003\025\003\000\000\118\001\000\000\000\000\ -\000\000\000\000\000\000\045\000\000\000\119\001\017\000\018\000\ -\000\000\000\000\000\000\000\000\000\000\025\003\025\003\000\000\ -\000\000\047\000\000\000\000\000\122\001\000\000\048\000\000\000\ -\000\000\051\000\024\000\000\000\000\000\026\000\027\000\028\000\ -\029\000\025\003\000\000\030\000\025\003\025\003\025\003\025\003\ -\207\000\034\000\025\003\000\000\000\000\000\000\059\005\025\003\ -\025\003\000\000\000\000\000\000\040\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\025\003\000\000\060\005\000\000\045\000\ -\000\000\000\000\000\000\000\000\243\001\000\000\025\003\000\000\ -\000\000\000\000\000\000\000\000\000\000\047\000\000\000\000\000\ -\000\000\000\000\048\000\000\000\025\003\051\000\000\000\000\000\ -\000\000\025\003\000\000\000\000\025\003\061\005\000\000\137\000\ -\138\000\030\000\000\000\139\000\000\000\000\000\140\000\062\005\ -\000\000\000\000\000\000\032\005\078\001\079\001\000\000\000\000\ -\000\000\000\000\000\000\000\000\080\001\000\000\000\000\142\000\ -\000\000\033\005\081\001\082\001\034\005\083\001\063\005\143\000\ -\144\000\000\000\000\000\000\000\000\000\000\000\084\001\145\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\085\001\ -\246\001\000\000\000\000\064\005\147\000\086\001\087\001\088\001\ -\089\001\090\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\091\001\000\000\000\000\000\000\000\000\186\000\000\000\000\000\ -\000\000\000\000\092\001\093\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\094\001\095\001\096\001\ -\097\001\098\001\000\000\026\001\027\001\028\001\000\000\000\000\ -\000\000\035\005\207\001\000\000\030\001\000\000\000\000\100\001\ -\000\000\000\000\023\003\032\001\023\003\023\003\023\003\000\000\ -\023\003\000\000\000\000\023\003\023\003\000\000\033\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\034\001\ -\000\000\000\000\000\000\000\000\023\003\035\001\036\001\037\001\ -\038\001\039\001\040\001\000\000\023\003\023\003\000\000\000\000\ -\000\000\000\000\000\000\000\000\023\003\000\000\000\000\000\000\ -\041\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\023\003\023\003\234\002\209\001\000\000\235\002\000\000\000\000\ -\000\000\000\000\041\004\078\001\079\001\045\001\046\001\236\002\ -\212\001\049\001\213\001\080\001\000\000\000\000\000\000\000\000\ -\000\000\081\001\082\001\000\000\083\001\052\001\000\000\053\001\ -\000\000\000\000\000\000\000\000\000\000\084\001\000\000\000\000\ -\000\000\000\000\043\004\078\001\079\001\000\000\085\001\000\000\ -\000\000\000\000\000\000\080\001\086\001\087\001\088\001\089\001\ -\090\001\081\001\082\001\000\000\083\001\000\000\000\000\000\000\ -\043\002\000\000\043\002\043\002\043\002\084\001\043\002\091\001\ -\000\000\043\002\043\002\000\000\186\000\000\000\085\001\000\000\ -\000\000\092\001\093\001\000\000\086\001\087\001\088\001\089\001\ -\090\001\000\000\043\002\000\000\094\001\095\001\096\001\097\001\ -\098\001\000\000\043\002\043\002\000\000\042\004\000\000\091\001\ -\000\000\000\000\043\002\000\000\186\000\000\000\100\001\000\000\ -\000\000\092\001\093\001\000\000\000\000\000\000\043\002\043\002\ -\045\004\078\001\079\001\000\000\094\001\095\001\096\001\097\001\ -\098\001\080\001\000\000\000\000\000\000\000\000\044\004\081\001\ -\082\001\000\000\083\001\000\000\000\000\000\000\100\001\000\000\ -\000\000\000\000\000\000\084\001\000\000\000\000\000\000\000\000\ -\041\004\078\001\079\001\000\000\085\001\000\000\000\000\000\000\ -\000\000\080\001\086\001\087\001\088\001\089\001\090\001\081\001\ -\082\001\000\000\083\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\084\001\000\000\091\001\000\000\000\000\ -\000\000\000\000\186\000\000\000\085\001\000\000\000\000\092\001\ -\093\001\000\000\086\001\087\001\088\001\089\001\090\001\000\000\ -\000\000\000\000\094\001\095\001\096\001\097\001\098\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\091\001\046\004\000\000\ -\000\000\000\000\186\000\000\000\100\001\000\000\000\000\092\001\ -\093\001\000\000\000\000\000\000\000\000\000\000\043\004\078\001\ -\079\001\000\000\094\001\095\001\096\001\097\001\098\001\080\001\ -\000\000\000\000\000\000\099\004\000\000\081\001\082\001\000\000\ -\083\001\000\000\000\000\000\000\100\001\000\000\000\000\000\000\ -\000\000\084\001\000\000\000\000\000\000\000\000\045\004\078\001\ -\079\001\000\000\085\001\000\000\000\000\000\000\000\000\080\001\ -\086\001\087\001\088\001\089\001\090\001\081\001\082\001\000\000\ -\083\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\084\001\000\000\091\001\000\000\000\000\000\000\000\000\ -\186\000\000\000\085\001\000\000\000\000\092\001\093\001\000\000\ -\086\001\087\001\088\001\089\001\090\001\000\000\000\000\000\000\ -\094\001\095\001\096\001\097\001\098\001\000\000\000\000\000\000\ -\000\000\000\000\100\004\091\001\000\000\000\000\000\000\000\000\ -\186\000\000\000\100\001\000\000\000\000\092\001\093\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\094\001\095\001\096\001\097\001\098\001\081\005\078\001\079\001\ -\000\000\000\000\000\000\000\000\101\004\000\000\080\001\000\000\ -\000\000\000\000\100\001\000\000\081\001\082\001\000\000\083\001\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\084\001\000\000\000\000\000\000\000\000\083\005\078\001\079\001\ -\000\000\085\001\000\000\000\000\000\000\000\000\080\001\086\001\ -\087\001\088\001\089\001\090\001\081\001\082\001\000\000\083\001\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\084\001\000\000\091\001\000\000\000\000\000\000\000\000\186\000\ -\000\000\085\001\000\000\000\000\092\001\093\001\000\000\086\001\ -\087\001\088\001\089\001\090\001\000\000\000\000\000\000\094\001\ -\095\001\096\001\097\001\098\001\000\000\000\000\000\000\000\000\ -\082\005\000\000\091\001\000\000\000\000\000\000\000\000\186\000\ -\000\000\100\001\000\000\000\000\092\001\093\001\000\000\000\000\ -\000\000\000\000\000\000\085\005\078\001\079\001\000\000\094\001\ -\095\001\096\001\097\001\098\001\080\001\000\000\000\000\000\000\ -\000\000\084\005\081\001\082\001\000\000\083\001\000\000\000\000\ -\000\000\100\001\000\000\000\000\000\000\000\000\084\001\000\000\ -\000\000\000\000\000\000\081\005\078\001\079\001\000\000\085\001\ -\000\000\000\000\000\000\000\000\080\001\086\001\087\001\088\001\ -\089\001\090\001\081\001\082\001\000\000\083\001\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\084\001\000\000\ -\091\001\000\000\000\000\000\000\000\000\186\000\000\000\085\001\ -\000\000\000\000\092\001\093\001\000\000\086\001\087\001\088\001\ -\089\001\090\001\000\000\000\000\000\000\094\001\095\001\096\001\ -\097\001\098\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\091\001\086\005\000\000\000\000\000\000\186\000\000\000\100\001\ -\000\000\000\000\092\001\093\001\000\000\000\000\000\000\000\000\ -\000\000\083\005\078\001\079\001\000\000\094\001\095\001\096\001\ -\097\001\098\001\080\001\000\000\000\000\000\000\106\005\000\000\ -\081\001\082\001\000\000\083\001\000\000\000\000\000\000\100\001\ -\000\000\000\000\000\000\000\000\084\001\000\000\000\000\000\000\ -\000\000\085\005\078\001\079\001\000\000\085\001\000\000\000\000\ -\000\000\000\000\080\001\086\001\087\001\088\001\089\001\090\001\ -\081\001\082\001\000\000\083\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\084\001\000\000\091\001\000\000\ -\000\000\000\000\000\000\186\000\000\000\085\001\000\000\000\000\ -\092\001\093\001\000\000\086\001\087\001\088\001\089\001\090\001\ -\000\000\000\000\000\000\094\001\095\001\096\001\097\001\098\001\ -\000\000\000\000\000\000\000\000\000\000\107\005\091\001\078\001\ -\079\001\000\000\000\000\186\000\000\000\100\001\000\000\080\001\ -\092\001\093\001\000\000\000\000\000\000\081\001\082\001\000\000\ -\083\001\000\000\000\000\094\001\095\001\096\001\097\001\098\001\ -\000\000\084\001\000\000\000\000\000\000\000\000\000\000\108\005\ -\000\000\000\000\085\001\000\000\000\000\100\001\000\000\000\000\ -\086\001\087\001\088\001\089\001\090\001\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\091\001\078\001\079\001\000\000\000\000\ -\186\000\000\000\000\000\000\000\080\001\092\001\093\001\000\000\ -\000\000\000\000\081\001\082\001\000\000\083\001\000\000\000\000\ -\094\001\095\001\096\001\097\001\098\001\000\000\084\001\000\000\ -\000\000\000\000\000\000\000\000\000\000\099\001\000\000\085\001\ -\000\000\000\000\100\001\000\000\000\000\086\001\087\001\088\001\ -\089\001\090\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\091\001\078\001\079\001\000\000\000\000\186\000\000\000\000\000\ -\000\000\080\001\092\001\093\001\000\000\000\000\000\000\081\001\ -\082\001\000\000\083\001\000\000\000\000\094\001\095\001\096\001\ -\097\001\098\001\000\000\084\001\000\000\000\000\031\004\000\000\ -\000\000\078\001\079\001\000\000\085\001\000\000\000\000\100\001\ -\000\000\080\001\086\001\087\001\088\001\089\001\090\001\081\001\ -\082\001\000\000\083\001\000\000\000\000\000\000\000\000\000\000\ -\000\000\138\004\000\000\084\001\000\000\091\001\000\000\000\000\ -\000\000\000\000\186\000\000\000\085\001\000\000\000\000\092\001\ -\093\001\000\000\086\001\087\001\088\001\089\001\090\001\000\000\ -\000\000\000\000\094\001\095\001\096\001\097\001\098\001\000\000\ -\000\000\000\000\000\000\093\004\000\000\091\001\078\001\079\001\ -\000\000\000\000\186\000\000\000\100\001\000\000\080\001\092\001\ -\093\001\000\000\000\000\000\000\081\001\082\001\000\000\083\001\ -\000\000\000\000\094\001\095\001\096\001\097\001\098\001\000\000\ -\084\001\000\000\000\000\000\000\000\000\000\000\240\000\240\000\ -\000\000\085\001\000\000\000\000\100\001\000\000\240\000\086\001\ -\087\001\088\001\089\001\090\001\240\000\240\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\240\000\000\000\091\001\000\000\000\000\000\000\000\000\186\000\ -\000\000\240\000\000\000\000\000\092\001\093\001\000\000\240\000\ -\240\000\240\000\240\000\240\000\000\000\000\000\000\000\094\001\ -\095\001\096\001\097\001\098\001\000\000\000\000\000\000\000\000\ -\000\000\000\000\240\000\078\001\079\001\000\000\000\000\240\000\ -\000\000\100\001\000\000\080\001\240\000\240\000\000\000\000\000\ -\000\000\081\001\000\000\000\000\000\000\000\000\000\000\240\000\ -\240\000\240\000\240\000\240\000\000\000\084\001\000\000\000\000\ -\240\000\000\000\000\000\078\001\079\001\000\000\085\001\000\000\ -\000\000\240\000\000\000\000\000\086\001\087\001\088\001\089\001\ -\090\001\081\001\000\000\000\000\000\000\000\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\084\001\000\000\091\001\ -\000\000\000\000\000\000\000\000\186\000\000\000\085\001\000\000\ -\000\000\092\001\093\001\000\000\086\001\087\001\088\001\089\001\ -\090\001\094\000\000\000\000\000\094\001\095\001\096\001\097\001\ -\098\001\000\000\000\000\000\000\000\000\000\000\000\000\091\001\ -\095\000\016\000\000\000\000\000\186\000\000\000\100\001\000\000\ -\000\000\092\001\093\001\000\000\000\000\096\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\095\001\096\001\097\001\ -\098\001\000\000\000\000\136\000\000\000\137\000\138\000\030\000\ -\031\000\139\000\000\000\000\000\140\000\141\000\100\001\000\000\ -\035\000\000\000\000\000\000\000\000\000\000\000\097\000\000\000\ -\000\000\000\000\000\000\000\000\042\000\142\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\143\000\144\000\000\000\ -\000\000\000\000\000\000\000\000\098\000\145\000\000\000\000\000\ -\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ -\099\000\146\000\147\000\053\000" - -let yycheck = "\009\000\ -\210\000\145\000\012\000\002\000\014\000\015\000\016\000\136\000\ -\199\000\019\000\020\000\021\000\022\000\023\000\002\000\025\000\ -\163\000\132\001\142\000\205\000\136\000\163\002\032\000\202\000\ -\002\000\123\001\036\000\002\000\202\000\039\000\040\000\041\000\ -\011\000\001\000\034\003\002\000\010\000\024\001\010\002\049\000\ -\050\000\027\000\136\000\053\000\054\000\139\000\002\000\026\000\ -\002\000\138\000\002\000\234\003\163\002\002\000\038\003\253\002\ -\098\000\157\000\221\000\029\000\223\000\105\002\003\000\004\000\ -\186\003\225\002\045\000\063\004\110\000\000\000\170\000\115\004\ -\194\003\063\003\003\000\004\000\031\000\006\000\046\000\241\004\ -\035\000\056\005\201\004\063\005\094\000\095\000\096\000\097\000\ -\131\000\099\000\133\000\003\000\008\001\001\000\134\001\003\000\ -\004\000\141\002\000\000\098\000\054\001\003\003\021\001\000\001\ -\083\000\034\000\085\000\086\000\058\000\110\002\098\000\110\000\ -\067\005\214\004\203\000\000\000\000\001\003\005\000\001\042\002\ -\098\000\127\002\110\000\098\000\017\001\240\001\010\001\164\001\ -\000\001\166\001\005\000\098\000\110\000\074\001\192\004\110\000\ -\000\001\056\001\046\000\149\000\007\001\110\004\098\000\110\000\ -\098\000\000\001\098\000\121\000\000\001\098\000\058\000\161\000\ -\162\000\139\000\110\000\000\001\110\000\008\001\110\000\000\000\ -\087\004\110\000\244\004\173\000\014\001\000\001\052\005\108\001\ -\226\004\000\001\144\000\077\005\060\001\066\001\000\000\001\005\ -\092\001\006\001\188\000\030\001\103\002\008\001\157\005\000\001\ -\066\001\004\001\127\000\197\000\129\000\008\001\131\000\073\001\ -\133\000\000\001\066\001\092\001\015\001\099\003\133\001\018\001\ -\129\000\000\000\066\001\030\001\055\001\000\001\037\001\162\005\ -\092\001\073\001\189\000\095\001\094\001\214\002\065\001\008\001\ -\000\001\129\000\224\002\127\000\014\001\129\000\094\001\131\000\ -\115\001\133\000\000\001\206\000\055\001\079\001\094\001\186\000\ -\187\000\115\001\203\004\121\005\091\001\030\001\065\001\091\001\ -\095\001\000\001\036\001\027\001\130\005\000\001\091\001\066\001\ -\107\002\108\002\095\001\115\001\054\005\027\001\073\001\106\001\ -\101\005\237\005\109\001\094\001\008\001\000\001\055\001\092\001\ -\095\001\017\001\121\003\196\000\022\001\023\001\064\001\000\000\ -\065\001\000\001\197\001\204\000\027\001\094\001\123\005\106\001\ -\027\001\008\001\109\001\109\005\143\002\151\004\022\001\094\001\ -\154\004\005\003\044\001\000\001\000\001\055\001\113\001\067\001\ -\091\001\204\001\037\001\206\001\202\003\095\001\064\001\097\001\ -\058\001\193\001\029\001\091\001\176\001\063\001\094\001\095\001\ -\231\001\106\001\000\001\109\001\109\001\091\001\027\001\157\001\ -\074\001\095\001\000\001\000\001\192\001\022\001\164\001\050\001\ -\166\001\252\001\046\003\217\003\091\001\010\001\001\002\173\001\ -\174\001\087\003\088\003\094\001\027\001\040\006\094\001\094\001\ -\092\001\236\001\130\002\094\001\102\001\027\001\188\001\105\001\ -\154\005\107\001\000\001\109\001\095\001\111\001\094\001\038\002\ -\205\005\163\005\033\005\034\005\151\001\115\003\153\001\019\001\ -\155\001\021\001\215\005\000\001\071\001\000\000\048\002\008\001\ -\164\005\000\001\072\001\160\002\026\001\024\001\091\001\091\001\ -\057\001\015\006\095\001\141\001\107\006\143\001\120\001\066\001\ -\255\005\066\001\117\001\118\001\069\001\026\001\121\001\000\001\ -\123\001\000\001\048\004\074\005\056\001\159\001\069\002\094\001\ -\094\001\010\001\015\001\000\001\035\001\091\001\000\001\092\001\ -\094\001\095\001\095\001\008\006\072\001\000\001\000\001\177\001\ -\178\001\014\001\099\001\000\001\017\001\000\001\103\001\081\006\ -\099\005\083\006\004\001\014\001\059\001\000\001\008\001\125\004\ -\000\001\064\001\065\001\173\001\174\001\015\001\092\001\000\001\ -\018\001\203\001\190\005\074\001\000\001\003\001\188\004\103\004\ -\210\001\000\001\088\006\092\001\214\001\004\001\105\001\092\001\ -\027\001\008\001\151\001\010\001\153\001\058\006\155\001\014\001\ -\000\001\227\001\228\001\018\001\099\001\076\004\232\001\027\001\ -\234\001\008\001\010\001\000\001\027\001\000\001\109\001\066\001\ -\062\001\094\001\000\001\092\001\091\001\000\001\095\001\007\000\ -\066\001\251\001\000\001\151\001\000\001\153\001\032\002\155\001\ -\171\005\094\001\004\001\039\006\094\001\007\002\008\001\009\002\ -\010\002\000\001\000\001\094\001\094\001\015\001\091\001\000\001\ -\018\001\092\001\095\001\055\004\052\003\241\003\193\005\000\001\ -\091\001\000\001\073\001\004\001\095\001\035\001\094\001\008\001\ -\017\001\010\001\018\001\092\001\004\001\014\001\040\002\091\001\ -\000\001\032\002\094\001\095\001\091\001\092\001\221\005\094\001\ -\095\001\027\002\027\001\190\002\032\002\059\001\014\001\000\001\ -\172\002\173\002\064\001\065\001\092\001\092\001\032\002\095\001\ -\066\001\032\002\113\001\000\001\074\001\000\001\091\001\103\003\ -\091\001\032\002\160\002\231\001\095\001\109\003\070\005\171\002\ -\094\001\002\001\253\002\094\001\032\002\003\001\032\002\091\001\ -\032\002\036\002\056\002\032\002\038\003\099\001\028\005\073\002\ -\073\001\000\001\066\001\022\001\091\001\072\002\000\001\109\001\ -\094\001\065\001\066\001\010\001\014\001\094\001\094\001\113\001\ -\074\002\075\002\091\001\092\001\151\002\094\001\095\001\094\001\ -\003\001\018\001\042\002\038\003\047\001\000\001\229\004\129\002\ -\038\003\004\001\132\002\053\003\134\002\008\001\094\001\010\001\ -\113\001\004\001\000\001\014\001\022\001\027\001\008\001\018\001\ -\230\002\066\001\232\002\092\001\164\000\165\000\017\002\018\002\ -\027\001\100\002\018\001\076\002\064\001\107\004\000\001\092\001\ -\014\001\177\000\178\000\094\001\250\002\032\002\015\001\159\005\ -\008\001\069\002\036\001\022\001\018\001\205\003\097\001\098\001\ -\018\001\076\003\170\005\078\003\066\001\183\002\090\001\103\002\ -\019\001\201\000\003\001\073\001\094\001\092\001\111\002\112\002\ -\115\001\019\001\092\001\092\001\036\001\094\001\073\001\201\002\ -\192\005\203\002\110\001\205\002\066\001\237\003\073\001\209\002\ -\090\001\008\001\068\006\065\001\066\001\048\001\180\002\018\001\ -\091\001\092\001\151\002\094\001\095\001\083\001\048\001\049\001\ -\049\003\060\001\092\001\018\001\092\001\115\001\066\003\233\002\ -\018\001\068\001\060\001\070\001\200\004\062\003\113\001\090\001\ -\094\001\027\002\068\001\018\001\070\001\094\001\092\001\146\003\ -\094\001\022\001\242\005\151\002\092\001\255\002\134\003\133\005\ -\232\005\172\003\004\003\005\003\000\000\012\001\172\003\008\001\ -\214\004\001\006\118\003\022\001\067\001\015\003\130\003\017\003\ -\251\003\036\001\253\003\254\003\111\001\113\003\000\001\027\001\ -\031\001\022\001\028\003\029\003\060\004\111\001\133\005\073\002\ -\118\003\092\001\088\001\067\004\065\001\039\003\215\002\216\002\ -\000\001\019\001\248\004\050\001\046\003\092\001\006\003\170\002\ -\026\001\220\003\047\001\027\001\094\001\139\003\220\003\057\003\ -\000\000\015\001\112\001\022\001\030\001\238\002\066\001\186\002\ -\071\001\094\001\067\001\031\005\102\003\060\003\048\001\049\001\ -\022\001\196\002\000\001\252\002\095\001\084\001\080\003\090\001\ -\060\003\065\001\060\001\047\005\187\005\055\001\189\005\065\001\ -\014\001\019\001\068\001\017\001\070\001\000\001\101\001\065\001\ -\022\001\047\001\100\003\014\001\022\004\027\001\065\001\014\001\ -\064\001\065\001\006\003\014\001\066\001\000\001\017\001\102\003\ -\027\001\004\001\237\002\022\001\027\001\008\001\094\001\014\001\ -\027\001\047\001\102\003\014\001\015\001\109\001\128\003\018\001\ -\092\005\131\003\004\001\133\003\102\003\111\001\008\001\102\003\ -\106\001\067\001\003\001\109\001\047\001\107\003\144\003\102\003\ -\018\001\177\004\148\003\097\001\098\001\070\003\064\001\101\005\ -\066\001\155\003\102\003\027\001\102\003\159\003\102\003\000\001\ -\126\003\102\003\083\003\015\001\079\001\091\001\018\001\117\005\ -\079\001\095\001\065\001\097\001\098\001\123\005\088\001\066\001\ -\066\006\067\006\047\001\181\003\196\001\064\001\184\003\215\004\ -\091\001\035\001\188\003\003\001\095\001\115\001\097\001\098\001\ -\066\001\225\004\066\001\110\004\064\001\065\001\112\001\073\001\ -\110\004\000\001\069\003\094\001\022\001\221\001\222\001\223\001\ -\115\001\059\001\125\004\213\003\022\001\229\001\066\001\065\001\ -\030\001\139\004\092\001\022\001\019\001\004\001\082\004\064\001\ -\065\001\008\001\109\001\026\001\097\001\098\001\014\001\014\001\ -\015\001\090\001\124\006\018\001\066\001\067\001\240\003\241\003\ -\096\001\055\001\110\001\073\001\000\001\005\002\115\001\065\001\ -\250\003\048\001\252\003\065\001\102\001\110\001\176\004\205\005\ -\206\005\067\001\022\001\109\001\000\001\060\001\065\001\096\001\ -\004\001\215\005\012\004\014\001\008\001\068\001\010\001\070\001\ -\035\001\033\002\014\001\015\001\197\003\198\003\018\001\035\001\ -\027\001\065\001\066\001\066\001\027\001\115\001\116\004\027\001\ -\203\004\035\001\211\003\212\003\106\001\203\004\216\004\109\001\ -\059\001\218\003\132\005\009\004\060\002\065\001\065\001\059\001\ -\000\001\051\004\227\003\053\004\064\001\065\001\000\001\094\001\ -\111\001\059\001\008\006\061\004\000\001\091\001\074\001\065\001\ -\004\001\095\001\030\001\066\001\008\001\071\004\066\001\000\000\ -\066\001\019\001\026\001\015\001\079\001\073\001\018\001\073\001\ -\026\001\220\004\084\004\102\001\055\001\000\001\209\003\099\001\ -\064\001\065\001\109\001\055\001\094\001\064\001\217\003\091\001\ -\092\001\109\001\094\001\095\001\102\001\065\001\048\001\049\001\ -\064\001\014\001\229\003\109\001\058\006\111\001\005\000\077\004\ -\007\000\028\005\060\001\075\001\008\001\113\001\027\001\065\001\ -\035\001\115\001\068\001\244\004\070\001\248\003\066\001\000\001\ -\031\001\064\001\027\001\023\001\059\005\109\001\112\004\035\003\ -\244\004\116\005\030\001\105\004\142\004\112\001\106\001\145\004\ -\059\001\109\001\073\005\050\001\127\005\064\001\065\001\051\003\ -\112\001\026\001\094\001\055\003\065\001\000\001\244\004\074\001\ -\162\004\053\001\164\004\055\001\166\004\111\001\168\004\169\004\ -\064\001\066\001\055\001\173\004\099\005\065\001\109\001\191\002\ -\178\004\008\001\180\004\064\001\182\004\004\001\184\004\026\001\ -\099\001\008\001\086\003\064\001\065\001\004\001\206\002\207\002\ -\023\001\008\001\109\001\018\001\061\005\022\001\200\004\030\001\ -\015\001\097\001\123\004\018\001\027\001\064\001\127\004\066\001\ -\108\004\061\005\125\005\132\004\027\001\109\001\106\001\125\005\ -\075\001\109\001\014\001\066\001\222\004\017\001\053\001\014\001\ -\055\001\227\004\242\002\112\001\149\004\150\004\145\005\061\005\ -\030\001\235\004\065\001\145\005\053\001\158\004\055\001\056\001\ -\065\001\136\000\169\005\066\001\139\000\247\004\141\000\142\000\ -\065\001\027\001\252\004\066\001\050\001\112\001\000\005\106\006\ -\002\005\066\001\004\005\126\004\181\004\007\005\109\001\130\004\ -\191\005\000\001\064\001\065\001\000\001\164\000\165\000\008\001\ -\167\000\065\001\083\001\106\001\022\005\064\001\109\001\064\001\ -\026\005\073\001\177\000\178\000\019\001\031\005\004\001\019\001\ -\066\001\235\005\008\001\026\001\109\001\008\005\026\001\210\005\ -\035\001\015\001\027\001\108\001\210\005\047\005\048\005\101\001\ -\050\005\028\001\201\000\202\000\106\001\027\001\205\000\109\001\ -\179\004\048\001\049\001\088\001\048\001\232\005\014\001\065\005\ -\059\001\066\001\232\005\190\004\109\001\060\001\065\001\000\001\ -\060\001\100\001\003\001\027\001\212\005\068\001\000\000\070\001\ -\068\001\066\001\070\001\112\001\013\001\014\001\027\001\066\001\ -\017\001\091\005\092\005\027\001\066\001\094\001\022\001\074\001\ -\098\005\026\001\027\001\028\001\029\001\080\001\000\001\003\005\ -\083\001\045\001\046\001\102\001\029\005\064\001\112\005\040\001\ -\041\001\065\001\109\001\066\001\111\001\035\001\003\001\047\001\ -\111\001\019\001\043\005\111\001\045\005\066\001\128\005\037\001\ -\026\001\145\003\066\001\060\001\083\001\088\001\063\001\022\001\ -\065\001\066\001\067\001\068\001\064\001\059\001\144\005\083\001\ -\073\001\074\001\064\001\065\001\064\001\151\005\048\001\080\001\ -\052\005\000\001\064\001\040\001\074\001\112\001\109\001\161\005\ -\100\001\132\005\060\001\092\001\166\005\094\001\000\001\096\001\ -\097\001\067\001\068\001\236\003\070\001\035\001\041\005\000\001\ -\066\001\155\005\180\005\108\001\158\005\099\001\111\001\199\003\ -\023\001\109\001\115\001\018\001\064\001\066\001\037\001\109\001\ -\026\001\109\001\019\001\004\004\063\005\059\001\200\005\075\001\ -\000\001\026\001\064\001\065\001\094\001\207\005\064\001\000\001\ -\224\003\225\003\226\003\213\005\074\001\111\001\230\003\136\005\ -\218\005\219\005\000\001\019\001\236\003\121\005\224\005\048\001\ -\049\001\227\005\026\001\027\001\010\001\053\001\130\005\055\001\ -\000\000\026\001\236\005\060\001\112\001\099\001\240\005\134\001\ -\064\001\065\001\244\005\068\001\004\004\070\001\064\001\109\001\ -\048\001\049\001\004\001\109\001\230\005\231\005\008\001\233\005\ -\234\005\022\001\000\001\003\001\060\001\015\001\157\001\009\006\ -\018\001\064\001\112\001\067\001\068\001\164\001\070\001\166\001\ -\090\001\027\001\064\001\040\001\143\005\012\006\173\001\174\001\ -\064\001\176\001\149\005\064\001\065\001\109\001\111\001\022\001\ -\012\006\000\001\071\001\109\001\110\001\188\001\035\001\037\001\ -\040\001\192\001\044\006\045\006\167\005\196\001\197\001\084\001\ -\225\005\051\006\052\006\053\006\054\006\090\001\109\001\111\001\ -\066\001\059\006\033\001\026\001\075\001\063\006\059\001\109\001\ -\110\001\022\001\016\001\069\006\065\001\109\001\221\001\222\001\ -\223\001\110\001\000\000\077\006\078\006\027\001\229\001\202\005\ -\055\001\004\001\037\001\040\001\059\001\008\001\064\001\095\001\ -\063\001\064\001\065\001\066\001\015\001\095\006\096\006\018\001\ -\076\000\112\001\100\006\064\001\102\006\252\001\253\001\078\001\ -\025\006\102\001\001\002\085\006\110\006\064\001\005\002\113\006\ -\109\001\008\002\035\006\015\006\064\001\022\001\053\001\097\001\ -\055\001\123\006\017\002\018\002\064\001\127\006\027\001\105\006\ -\108\000\064\001\065\001\109\001\134\006\135\006\109\001\040\001\ -\033\001\032\002\033\002\064\001\064\001\119\006\120\006\066\001\ -\109\001\125\000\000\000\042\002\095\001\000\001\064\001\065\001\ -\132\000\048\002\075\006\000\001\064\001\071\001\055\001\095\001\ -\066\001\109\001\059\001\013\001\031\006\060\002\063\001\064\001\ -\065\001\109\001\084\001\000\001\093\006\066\001\109\001\042\006\ -\090\001\083\001\028\001\029\001\073\001\078\001\064\001\091\001\ -\109\001\109\001\037\001\016\002\088\006\022\001\019\001\041\001\ -\037\001\075\001\023\002\109\001\110\001\026\001\027\001\066\006\ -\067\006\094\001\108\001\066\001\000\000\072\006\073\006\128\006\ -\103\002\091\001\060\001\000\001\109\001\063\001\047\001\082\006\ -\079\001\040\001\068\001\048\001\049\001\022\001\115\001\000\001\ -\074\001\055\001\000\001\094\006\066\001\059\001\080\001\060\001\ -\000\001\063\001\064\001\130\002\004\001\026\001\067\001\068\001\ -\008\001\070\001\010\001\066\001\111\006\083\001\014\001\015\001\ -\078\001\026\001\018\001\094\001\026\001\000\000\121\006\094\001\ -\090\001\124\006\108\001\027\001\000\001\111\001\093\001\130\006\ -\131\006\160\002\109\001\110\001\163\002\053\001\054\001\055\001\ -\056\001\031\001\169\002\170\002\110\001\172\002\173\002\109\001\ -\064\001\065\001\111\001\000\001\093\001\055\001\026\001\000\001\ -\033\001\059\001\066\001\186\002\050\001\063\001\064\001\077\001\ -\191\002\010\001\066\001\004\001\109\001\196\002\019\001\008\001\ -\080\001\073\001\094\001\083\001\078\001\026\001\055\001\206\002\ -\207\002\018\001\059\001\071\001\064\001\065\001\063\001\064\001\ -\065\001\109\001\027\001\091\001\092\001\109\001\094\001\095\001\ -\084\001\065\001\000\001\048\001\049\001\078\001\004\001\230\002\ -\093\001\232\002\008\001\109\001\010\001\003\001\237\002\060\001\ -\014\001\113\001\093\001\242\002\018\001\073\001\067\001\068\001\ -\109\001\070\001\064\001\250\002\251\002\027\001\253\002\000\000\ -\009\000\065\001\109\001\012\000\109\001\014\000\015\000\016\000\ -\007\003\073\001\019\000\020\000\021\000\022\000\023\000\004\001\ -\025\000\064\001\065\001\008\001\014\001\065\001\066\001\017\001\ -\004\001\014\001\015\001\036\000\008\001\018\001\039\000\040\000\ -\041\000\027\001\111\001\064\001\066\001\092\001\018\001\038\003\ -\049\000\050\000\000\001\073\001\053\000\054\000\004\001\027\001\ -\066\001\008\001\008\001\014\001\010\001\052\003\053\003\073\001\ -\014\001\015\001\095\001\004\001\065\001\091\001\092\001\008\001\ -\094\001\095\001\071\001\016\001\152\001\027\001\069\003\000\001\ -\036\001\022\001\000\000\000\001\094\001\066\001\027\001\084\001\ -\073\001\010\001\027\001\113\001\014\001\094\000\095\000\096\000\ -\097\000\022\001\099\000\090\001\000\000\109\001\019\001\004\001\ -\014\001\115\001\022\001\008\001\000\001\026\001\000\001\003\001\ -\103\003\095\001\015\001\095\001\066\001\018\001\109\003\055\001\ -\010\001\013\001\092\001\073\001\103\001\017\001\027\001\118\003\ -\066\001\067\001\121\003\048\001\049\001\014\001\026\001\027\001\ -\028\001\029\001\022\001\130\003\027\001\091\001\092\001\060\001\ -\094\001\095\001\064\001\065\001\139\003\041\001\067\001\068\001\ -\092\001\070\001\145\003\173\001\174\001\000\001\092\001\091\001\ -\161\000\162\000\109\001\113\001\092\001\066\001\092\001\053\001\ -\060\001\055\001\013\001\063\001\255\001\000\002\017\001\067\001\ -\068\001\014\001\109\001\065\001\094\001\172\003\074\001\026\001\ -\027\001\028\001\029\001\094\001\080\001\053\001\010\002\055\001\ -\115\001\020\001\111\001\053\001\197\000\055\001\041\001\004\001\ -\092\001\065\001\094\001\008\001\096\001\097\001\109\001\065\001\ -\199\003\053\001\015\001\055\001\046\001\018\001\205\003\115\001\ -\108\001\060\001\209\003\111\001\063\001\065\001\062\001\066\001\ -\067\001\068\001\217\003\109\001\219\003\220\003\073\001\074\001\ -\108\001\224\003\225\003\226\003\109\001\080\001\229\003\230\003\ -\053\001\109\001\055\001\234\003\022\001\236\003\237\003\002\001\ -\073\001\092\001\100\001\094\001\065\001\096\001\097\001\013\001\ -\000\000\248\003\065\001\066\001\067\001\066\001\073\001\000\001\ -\027\001\108\001\003\001\109\001\111\001\004\004\028\001\029\001\ -\115\001\015\001\092\001\064\001\013\001\022\001\023\001\094\001\ -\017\001\000\001\064\001\041\001\064\001\022\001\008\001\022\004\ -\065\001\026\001\027\001\028\001\029\001\109\001\040\001\018\001\ -\014\001\062\001\062\001\044\001\062\001\007\000\060\001\027\001\ -\041\001\000\000\092\001\094\001\064\001\079\001\068\001\064\001\ -\014\001\058\001\134\002\014\001\074\001\006\001\063\001\094\001\ -\026\000\073\001\080\001\060\001\109\001\060\004\063\001\095\001\ -\065\001\066\001\067\001\068\001\067\004\064\001\075\001\073\001\ -\073\001\074\001\096\001\090\001\022\001\076\004\092\001\080\001\ -\027\001\094\001\014\001\082\004\073\001\040\001\108\001\013\001\ -\087\004\111\001\094\001\092\001\000\001\094\001\027\001\096\001\ -\097\001\014\001\027\001\021\001\008\001\086\001\028\001\029\001\ -\064\001\013\001\064\001\108\001\107\004\108\004\111\001\110\004\ -\062\001\062\001\115\001\041\001\014\001\116\004\026\001\062\001\ -\028\001\029\001\062\001\062\001\062\001\003\001\125\004\126\004\ -\014\001\086\001\064\001\130\004\027\001\041\001\060\001\091\001\ -\095\001\063\001\073\001\101\001\139\004\014\001\068\001\094\001\ -\027\001\027\001\094\001\014\001\074\001\094\001\000\000\088\001\ -\060\001\094\001\080\001\063\001\080\001\064\001\066\001\067\001\ -\068\001\027\001\073\001\014\001\020\001\015\001\074\001\022\001\ -\177\001\094\001\096\001\097\001\080\001\053\001\008\001\145\000\ -\065\001\176\004\177\004\073\001\179\004\062\001\108\001\062\001\ -\092\001\111\001\062\001\014\001\096\001\097\001\094\001\190\004\ -\112\001\163\000\164\000\165\000\112\001\167\000\094\001\073\001\ -\108\001\210\001\021\001\111\001\203\004\064\001\091\001\177\000\ -\178\000\037\003\073\001\053\001\054\001\055\001\056\001\214\004\ -\215\004\216\004\000\001\088\001\095\001\014\001\064\001\065\001\ -\094\001\014\001\225\004\014\001\056\003\014\001\229\004\201\000\ -\202\000\061\003\091\001\205\000\027\001\019\001\019\001\027\001\ -\112\001\088\001\241\004\022\001\026\001\244\004\014\001\014\001\ -\000\001\248\004\014\001\003\001\014\001\000\000\000\000\096\001\ -\084\003\096\001\001\005\092\001\003\005\013\001\008\001\109\001\ -\109\001\017\001\048\001\109\001\064\001\092\001\022\001\036\001\ -\090\001\036\001\026\001\027\001\028\001\029\001\060\001\036\001\ -\092\001\065\001\040\001\065\001\112\003\028\005\068\001\040\002\ -\070\001\041\001\033\005\034\005\064\001\094\001\036\001\064\001\ -\091\001\000\001\041\005\053\001\003\001\001\000\002\000\003\000\ -\004\000\005\000\006\000\007\000\060\001\052\005\013\001\063\001\ -\053\001\065\001\066\001\067\001\068\001\064\001\061\005\062\005\ -\063\005\073\001\074\001\026\001\064\001\028\001\029\001\064\001\ -\080\001\111\001\064\001\074\005\064\001\064\001\077\005\127\000\ -\099\003\040\001\041\001\210\005\092\001\000\000\094\001\008\005\ -\096\001\097\001\060\001\129\005\082\006\199\005\072\002\248\002\ -\190\003\145\001\145\005\183\003\108\001\060\001\101\005\111\001\ -\063\001\122\001\103\002\115\001\067\001\068\001\109\005\199\003\ -\230\001\165\000\190\002\074\001\064\001\065\001\117\005\018\005\ -\027\004\080\001\121\005\071\001\123\005\137\001\125\005\226\001\ -\103\004\077\001\232\002\130\005\188\001\092\001\133\005\133\005\ -\084\001\096\001\097\001\099\005\171\005\221\004\090\001\255\255\ -\143\005\115\001\145\005\255\255\255\255\108\001\149\005\255\255\ -\111\001\255\255\238\003\239\003\255\255\255\255\255\255\255\255\ -\255\255\109\001\110\001\013\001\255\255\255\255\255\255\255\255\ -\167\005\255\255\255\255\255\003\255\255\255\255\255\255\145\001\ -\255\255\255\255\028\001\029\001\255\255\255\255\255\255\255\255\ -\012\004\255\255\255\255\255\255\187\005\255\255\189\005\041\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\028\004\255\255\255\255\202\005\255\255\255\255\205\005\206\005\ -\255\255\000\001\060\001\210\005\255\255\063\001\255\255\255\255\ -\215\005\255\255\068\001\255\255\255\255\255\255\221\005\193\001\ -\074\001\255\255\196\001\197\001\019\001\255\255\080\001\255\255\ -\255\255\232\005\062\004\026\001\000\001\255\255\000\000\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\096\001\097\001\ -\255\255\255\255\255\255\221\001\222\001\223\001\255\255\019\001\ -\255\255\048\001\108\001\229\001\255\255\111\001\026\001\255\255\ -\255\255\008\006\236\001\255\255\255\255\060\001\255\255\255\255\ -\015\006\255\255\007\000\255\255\067\001\068\001\011\000\070\001\ -\255\255\109\004\252\001\253\001\048\001\049\001\255\255\001\002\ -\031\006\255\255\118\004\005\002\255\255\026\000\008\002\255\255\ -\060\001\255\255\255\255\042\006\255\255\255\255\016\002\067\001\ -\068\001\255\255\070\001\255\255\255\255\023\002\255\255\255\255\ -\045\000\255\255\255\255\058\006\255\255\255\255\255\255\033\002\ -\111\001\255\255\255\255\066\006\067\006\255\255\255\255\080\003\ -\042\002\072\006\073\006\255\255\255\255\255\255\048\002\255\255\ -\255\255\255\255\081\006\082\006\083\006\000\001\255\255\255\255\ -\003\001\088\006\060\002\111\001\255\255\063\002\083\000\094\006\ -\085\000\086\000\013\001\183\004\255\255\185\004\072\002\255\255\ -\019\001\000\001\255\255\255\255\255\255\255\255\255\255\026\001\ -\111\006\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\121\006\255\255\255\255\124\006\041\001\255\255\ -\255\255\255\255\255\255\130\006\131\006\103\002\255\255\255\255\ -\255\255\255\255\222\004\255\255\255\255\255\255\255\255\227\004\ -\255\255\060\001\255\255\255\255\063\001\255\255\000\000\255\255\ -\067\001\068\001\255\255\255\255\255\255\255\255\255\255\074\001\ -\055\001\255\255\057\001\058\001\059\001\080\001\061\001\255\255\ -\255\255\064\001\065\001\086\001\255\255\255\255\255\255\164\000\ -\165\000\092\001\167\000\255\255\255\255\096\001\097\001\255\255\ -\255\255\255\255\081\001\255\255\177\000\178\000\255\255\019\005\ -\255\255\108\001\089\001\090\001\111\001\255\255\255\255\255\255\ -\189\000\255\255\097\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\201\000\202\000\109\001\110\001\ -\255\255\206\000\255\255\255\255\190\002\191\002\255\255\051\005\ -\255\255\053\005\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\206\002\207\002\000\001\255\255\ -\002\001\003\001\004\001\071\005\255\255\255\255\008\001\075\005\ -\076\005\255\255\255\255\013\001\255\255\255\255\255\255\017\001\ -\018\001\019\001\255\255\255\255\255\255\231\002\090\005\255\255\ -\026\001\027\001\028\001\029\001\255\255\255\255\255\255\255\255\ -\242\002\255\255\036\001\255\255\000\000\255\255\255\255\041\001\ -\255\255\251\002\255\255\253\002\112\005\255\255\048\001\049\001\ -\255\255\255\255\255\255\255\255\255\255\007\003\255\255\255\255\ -\029\001\255\255\060\001\255\255\255\255\063\001\064\001\255\255\ -\066\001\067\001\068\001\255\255\070\001\255\255\255\255\073\001\ -\074\001\255\255\255\255\255\255\255\255\050\001\080\001\255\255\ -\255\255\255\255\036\003\255\255\038\003\255\255\255\255\255\255\ -\255\255\091\001\092\001\255\255\094\001\095\001\096\001\097\001\ -\255\255\255\255\100\001\053\003\255\255\255\255\255\255\171\005\ -\255\255\000\001\108\001\109\001\000\000\111\001\255\255\255\255\ -\180\005\115\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\019\001\193\005\255\255\255\255\ -\196\005\255\255\255\255\026\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\000\001\007\000\255\255\ -\117\001\118\001\255\255\255\255\121\001\255\255\123\001\255\255\ -\255\255\048\001\049\001\255\255\110\003\255\255\255\255\255\255\ -\019\001\229\005\255\255\255\255\000\000\060\001\000\001\026\001\ -\002\001\003\001\004\001\255\255\067\001\068\001\008\001\070\001\ -\255\255\255\255\255\255\013\001\134\003\255\255\255\255\017\001\ -\018\001\019\001\255\255\255\255\255\255\048\001\255\255\145\003\ -\026\001\027\001\028\001\029\001\255\255\255\255\255\255\255\255\ -\255\255\060\001\036\001\255\255\255\255\255\255\255\255\041\001\ -\067\001\068\001\255\255\070\001\255\255\255\255\048\001\049\001\ -\111\001\255\255\172\003\255\255\255\255\255\255\255\255\196\001\ -\197\001\255\255\060\001\255\255\255\255\063\001\255\255\255\255\ -\066\001\067\001\068\001\255\255\070\001\255\255\255\255\073\001\ -\074\001\255\255\255\255\055\006\255\255\199\003\080\001\255\255\ -\221\001\222\001\223\001\255\255\111\001\255\255\255\255\255\255\ -\229\001\091\001\092\001\255\255\094\001\095\001\096\001\097\001\ -\255\255\219\003\220\003\255\255\255\255\255\255\224\003\225\003\ -\226\003\255\255\108\001\255\255\230\003\111\001\255\255\252\001\ -\253\001\115\001\236\003\255\255\001\002\255\255\255\255\255\255\ -\005\002\101\006\102\006\255\255\000\001\255\255\255\255\255\255\ -\255\255\109\006\255\255\164\000\165\000\255\255\167\000\255\255\ -\255\255\013\001\004\004\255\255\255\255\255\255\255\255\255\255\ -\177\000\178\000\255\255\255\255\033\002\129\006\026\001\255\255\ -\028\001\029\001\255\255\255\255\022\004\042\002\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\041\001\255\255\200\000\ -\201\000\202\000\007\000\255\255\255\255\255\255\011\000\060\002\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\060\001\255\255\255\255\072\002\054\004\026\000\066\001\067\001\ -\068\001\255\255\255\255\255\255\000\001\255\255\074\001\003\001\ -\255\255\255\255\255\255\255\255\080\001\255\255\255\255\255\255\ -\045\000\013\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\092\001\255\255\103\002\255\255\096\001\255\255\026\001\027\001\ -\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\108\001\255\255\255\255\111\001\255\255\041\001\255\255\255\255\ -\255\255\000\000\108\004\255\255\110\004\255\255\083\000\255\255\ -\085\000\086\000\255\255\255\255\000\001\255\255\255\255\003\001\ -\060\001\255\255\255\255\125\004\008\001\255\255\255\255\067\001\ -\068\001\013\001\014\001\255\255\255\255\255\255\074\001\019\001\ -\255\255\139\004\022\001\255\255\080\001\255\255\026\001\007\000\ -\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\092\001\255\255\094\001\068\001\096\001\041\001\255\255\255\255\ -\255\255\255\255\255\255\136\000\077\001\255\255\255\255\255\255\ -\108\001\255\255\191\002\111\001\255\255\255\255\176\004\255\255\ -\060\001\255\255\255\255\063\001\255\255\065\001\066\001\067\001\ -\068\001\206\002\207\002\006\001\255\255\008\001\074\001\164\000\ -\165\000\255\255\167\000\079\001\080\001\255\255\255\255\255\255\ -\255\255\203\004\255\255\255\255\177\000\178\000\255\255\255\255\ -\092\001\255\255\231\002\255\255\096\001\097\001\216\004\255\255\ -\189\000\255\255\220\004\255\255\255\255\242\002\255\255\255\255\ -\108\001\255\255\255\255\111\001\201\000\202\000\251\002\255\255\ -\253\002\206\000\255\255\255\255\055\001\255\255\057\001\058\001\ -\059\001\255\255\061\001\255\255\255\255\064\001\065\001\255\255\ -\255\255\255\255\255\255\000\001\255\255\255\255\255\255\255\255\ -\255\255\003\005\255\255\255\255\255\255\255\255\081\001\255\255\ -\013\001\255\255\255\255\255\255\255\255\006\001\089\001\090\001\ -\255\255\038\003\255\255\255\255\000\000\026\001\097\001\028\001\ -\029\001\255\255\028\005\196\001\197\001\255\255\255\255\255\255\ -\255\255\255\255\109\001\110\001\041\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\164\000\165\000\255\255\167\000\ -\255\255\255\255\052\005\220\001\221\001\222\001\223\001\060\001\ -\029\001\177\000\178\000\255\255\229\001\255\255\055\001\068\001\ -\057\001\058\001\059\001\255\255\061\001\074\001\015\001\064\001\ -\065\001\255\255\255\255\080\001\255\255\050\001\255\255\255\255\ -\255\255\201\000\202\000\252\001\253\001\255\255\255\255\255\255\ -\001\002\255\255\255\255\096\001\005\002\028\000\029\000\255\255\ -\255\255\090\001\043\001\044\001\045\001\046\001\015\002\108\001\ -\097\001\000\001\111\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\008\001\255\255\255\255\109\001\110\001\013\001\121\005\ -\033\002\066\001\255\255\125\005\145\003\255\255\071\001\072\001\ -\130\005\042\002\255\255\026\001\255\255\028\001\029\001\255\255\ -\255\255\255\255\083\001\084\001\085\001\086\001\255\255\145\005\ -\117\001\118\001\041\001\060\002\121\001\255\255\123\001\172\003\ -\087\000\088\000\255\255\100\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\060\001\255\255\255\255\ -\063\001\255\255\255\255\066\001\067\001\068\001\255\255\255\255\ -\255\255\255\255\199\003\074\001\255\255\255\255\255\255\255\255\ -\157\001\080\001\000\000\255\255\000\000\255\255\103\002\164\001\ -\255\255\166\001\255\255\255\255\255\255\092\001\219\003\220\003\ -\255\255\096\001\097\001\224\003\225\003\226\003\255\255\255\255\ -\210\005\230\003\212\005\255\255\255\255\108\001\255\255\236\003\ -\111\001\255\255\255\255\255\255\255\255\255\255\255\255\196\001\ -\197\001\255\255\255\255\255\255\255\255\255\255\232\005\255\255\ -\023\001\255\255\255\255\255\255\255\255\255\255\255\255\004\004\ -\134\001\243\005\255\255\255\255\255\255\036\001\255\255\255\255\ -\221\001\222\001\223\001\255\255\015\001\255\255\255\255\255\255\ -\229\001\255\255\255\255\255\255\255\255\007\006\255\255\255\255\ -\055\001\255\255\057\001\058\001\059\001\015\006\061\001\255\255\ -\018\006\064\001\065\001\255\255\000\001\255\255\191\002\252\001\ -\253\001\044\001\045\001\046\001\001\002\255\255\255\255\255\255\ -\005\002\013\001\255\255\255\255\255\255\206\002\207\002\255\255\ -\190\001\043\006\255\255\090\001\255\255\255\255\026\001\255\255\ -\028\001\029\001\097\001\255\255\071\001\072\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\033\002\041\001\109\001\110\001\ -\083\001\084\001\085\001\086\001\255\255\042\002\255\255\255\255\ -\255\255\242\002\255\255\255\255\196\001\197\001\255\255\255\255\ -\060\001\100\001\251\002\063\001\253\002\255\255\088\006\060\002\ -\068\001\110\004\255\255\255\255\255\255\255\255\074\001\255\255\ -\255\255\255\255\255\255\072\002\080\001\221\001\222\001\223\001\ -\125\004\255\255\255\255\255\255\255\255\229\001\230\001\255\255\ -\092\001\255\255\255\255\255\255\096\001\097\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\038\003\255\255\255\255\ -\108\001\255\255\103\002\111\001\252\001\253\001\255\255\255\255\ -\255\255\001\002\255\255\255\255\255\255\005\002\255\255\078\001\ -\079\001\080\001\081\001\082\001\083\001\084\001\085\001\086\001\ -\087\001\088\001\089\001\090\001\091\001\092\001\093\001\094\001\ -\095\001\096\001\097\001\098\001\000\000\100\001\255\255\255\255\ -\102\001\033\002\255\255\105\001\255\255\107\001\255\255\109\001\ -\255\255\111\001\042\002\114\001\255\255\255\255\203\004\255\255\ -\255\255\255\255\255\255\160\002\255\255\255\255\255\255\255\255\ -\127\001\255\255\255\255\255\255\060\002\255\255\255\255\013\001\ -\255\255\013\001\255\255\116\003\255\255\255\255\255\255\141\001\ -\255\255\143\001\255\255\255\255\255\255\255\255\028\001\029\001\ -\028\001\029\001\191\002\255\255\255\255\255\255\255\255\255\255\ -\255\255\159\001\255\255\041\001\255\255\041\001\255\255\255\255\ -\145\003\206\002\207\002\255\255\130\002\255\255\255\255\103\002\ -\255\255\000\000\255\255\008\005\255\255\255\255\060\001\255\255\ -\060\001\063\001\255\255\063\001\255\255\255\255\068\001\255\255\ -\068\001\255\255\255\255\172\003\074\001\255\255\074\001\028\005\ -\255\255\255\255\080\001\006\001\080\001\242\002\255\255\255\255\ -\255\255\255\255\255\255\169\002\255\255\255\255\251\002\255\255\ -\253\002\255\255\096\001\097\001\096\001\097\001\199\003\255\255\ -\255\255\255\255\015\001\255\255\255\255\255\255\108\001\255\255\ -\108\001\111\001\232\001\111\001\234\001\255\255\255\255\255\255\ -\255\255\255\255\219\003\220\003\255\255\255\255\223\003\224\003\ -\225\003\226\003\255\255\255\255\055\001\230\003\057\001\058\001\ -\059\001\038\003\061\001\236\003\255\255\064\001\065\001\191\002\ -\255\255\007\002\055\001\009\002\057\001\058\001\059\001\255\255\ -\061\001\255\255\255\255\064\001\065\001\255\255\206\002\207\002\ -\255\255\024\002\255\255\004\004\255\255\074\001\029\002\090\001\ -\255\255\255\255\255\255\255\255\081\001\255\255\097\001\255\255\ -\125\005\255\255\255\255\255\255\089\001\090\001\255\255\132\005\ -\255\255\094\001\109\001\110\001\097\001\255\255\255\255\255\255\ -\255\255\255\255\242\002\255\255\145\005\255\255\255\255\255\255\ -\109\001\110\001\255\255\251\002\255\255\253\002\255\255\255\255\ -\255\255\255\255\255\255\074\002\075\002\255\255\255\255\255\255\ -\255\255\118\003\255\255\255\255\255\255\255\255\123\003\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\052\003\255\255\ -\255\255\000\000\255\255\255\255\000\001\255\255\255\255\003\001\ -\255\255\255\255\255\255\255\255\145\003\255\255\038\003\110\002\ -\255\255\013\001\255\255\255\255\115\002\116\002\117\002\255\255\ -\255\255\255\255\255\255\255\255\255\255\210\005\026\001\027\001\ -\028\001\029\001\255\255\129\002\255\255\110\004\132\002\172\003\ -\255\255\255\255\255\255\255\255\255\255\041\001\255\255\255\255\ -\255\255\103\003\255\255\232\005\125\004\255\255\255\255\109\003\ -\255\255\255\255\255\255\255\255\255\255\255\255\243\005\255\255\ -\060\001\255\255\199\003\255\255\064\001\255\255\066\001\067\001\ -\068\001\255\255\255\255\255\255\255\255\073\001\074\001\255\255\ -\255\255\000\001\255\255\255\255\080\001\255\255\219\003\220\003\ -\255\255\255\255\255\255\224\003\225\003\226\003\013\001\255\255\ -\092\001\230\003\094\001\255\255\096\001\097\001\255\255\236\003\ -\100\001\255\255\255\255\026\001\255\255\028\001\029\001\255\255\ -\108\001\109\001\000\000\111\001\255\255\255\255\043\006\214\002\ -\255\255\145\003\041\001\255\255\219\002\220\002\221\002\004\004\ -\255\255\000\001\203\004\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\233\002\255\255\060\001\255\255\255\255\ -\063\001\255\255\255\255\255\255\172\003\068\001\255\255\205\003\ -\255\255\255\255\255\255\074\001\255\255\255\255\255\255\255\255\ -\255\255\080\001\255\255\002\003\255\255\255\255\004\003\255\255\ -\255\255\255\255\255\255\255\255\255\255\092\001\255\255\199\003\ -\255\255\096\001\097\001\018\003\234\003\255\255\255\255\237\003\ -\055\001\255\255\057\001\058\001\059\001\108\001\061\001\255\255\ -\111\001\064\001\065\001\219\003\220\003\074\004\255\255\255\255\ -\224\003\225\003\226\003\255\255\255\255\255\255\230\003\255\255\ -\255\255\255\255\081\001\028\005\236\003\255\255\255\255\255\255\ -\255\255\255\255\089\001\090\001\255\255\255\255\255\255\255\255\ -\000\000\255\255\097\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\110\004\255\255\255\255\004\004\108\001\109\001\110\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\125\004\255\255\255\255\255\255\255\255\255\255\255\255\094\003\ -\255\255\000\001\001\001\002\001\003\001\255\255\060\004\255\255\ -\255\255\008\001\009\001\010\001\255\255\067\004\013\001\014\001\ -\255\255\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ -\255\255\024\001\025\001\026\001\027\001\028\001\029\001\255\255\ -\255\255\087\004\128\003\255\255\255\255\036\001\037\001\255\255\ -\255\255\040\001\041\001\042\001\043\001\255\255\000\000\255\255\ -\255\255\048\001\049\001\255\255\125\005\107\004\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\060\001\061\001\255\255\ -\063\001\255\255\255\255\066\001\067\001\068\001\203\004\070\001\ -\145\005\255\255\073\001\074\001\255\255\255\255\255\255\255\255\ -\255\255\080\001\255\255\082\001\255\255\255\255\110\004\181\003\ -\255\255\255\255\255\255\255\255\091\001\092\001\255\255\094\001\ -\095\001\096\001\097\001\255\255\255\255\125\004\255\255\255\255\ -\103\001\255\255\105\001\255\255\203\003\108\001\255\255\244\004\ -\111\001\255\255\000\001\255\255\115\001\003\001\255\255\213\003\ -\255\255\255\255\008\001\177\004\255\255\255\255\255\255\013\001\ -\255\255\255\255\255\255\008\005\255\255\019\001\023\001\255\255\ -\255\255\210\005\255\255\255\255\026\001\255\255\028\001\029\001\ -\255\255\255\255\255\255\036\001\255\255\255\255\255\255\028\005\ -\255\255\255\255\255\255\041\001\250\003\255\255\252\003\232\005\ -\214\004\215\004\255\255\255\255\255\255\255\255\055\001\255\255\ -\057\001\058\001\059\001\225\004\061\001\255\255\060\001\064\001\ -\065\001\063\001\255\255\203\004\066\001\067\001\068\001\255\255\ -\061\005\255\255\255\255\241\004\074\001\255\255\255\255\255\255\ -\255\255\255\255\080\001\255\255\255\255\255\255\037\004\038\004\ -\039\004\090\001\255\255\255\255\000\000\255\255\092\001\255\255\ -\097\001\255\255\096\001\097\001\255\255\051\004\255\255\255\255\ -\255\255\255\255\255\255\255\255\109\001\110\001\108\001\255\255\ -\000\001\111\001\255\255\003\001\255\255\255\255\255\255\255\255\ -\255\255\071\004\255\255\033\005\034\005\013\001\014\001\255\255\ -\255\255\017\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\125\005\255\255\026\001\027\001\028\001\029\001\255\255\132\005\ -\255\255\096\004\097\004\098\004\028\005\255\255\255\255\255\255\ -\040\001\041\001\255\255\255\255\145\005\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\074\005\255\255\255\255\077\005\ -\255\255\255\255\255\255\255\255\060\001\255\255\255\255\063\001\ -\255\255\255\255\255\255\067\001\068\001\255\255\255\255\093\005\ -\094\005\073\001\074\001\138\004\255\255\255\255\000\001\101\005\ -\080\001\003\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\013\001\092\001\255\255\094\001\017\001\ -\096\001\097\001\255\255\255\255\255\255\123\005\255\255\255\255\ -\026\001\027\001\028\001\029\001\108\001\210\005\255\255\111\001\ -\255\255\000\000\255\255\115\001\255\255\255\255\180\004\041\001\ -\182\004\255\255\184\004\000\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\232\005\255\255\125\005\255\255\255\255\ -\255\255\255\255\060\001\255\255\255\255\063\001\205\004\206\004\ -\207\004\067\001\068\001\255\255\211\004\212\004\213\004\255\255\ -\074\001\145\005\255\255\255\255\255\255\255\255\080\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\092\001\255\255\094\001\235\004\096\001\097\001\ -\255\255\199\005\055\001\255\255\057\001\058\001\059\001\205\005\ -\061\001\247\004\108\001\064\001\065\001\111\001\255\255\255\255\ -\255\255\215\005\000\005\255\255\255\255\255\255\004\005\221\005\ -\255\255\255\255\255\255\255\255\081\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\089\001\090\001\255\255\255\255\ -\255\255\255\255\210\005\255\255\097\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\109\001\110\001\255\255\255\255\000\001\001\001\002\001\003\001\ -\232\005\255\255\008\006\255\255\008\001\009\001\010\001\255\255\ -\255\255\013\001\014\001\015\001\016\001\017\001\018\001\019\001\ -\020\001\021\001\255\255\255\255\024\001\025\001\026\001\027\001\ -\028\001\029\001\255\255\000\000\255\255\255\255\255\255\255\255\ -\036\001\037\001\255\255\255\255\040\001\041\001\042\001\043\001\ -\044\001\045\001\046\001\255\255\048\001\049\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\058\006\255\255\255\255\255\255\ -\060\001\061\001\255\255\063\001\255\255\255\255\066\001\067\001\ -\068\001\255\255\070\001\071\001\072\001\073\001\074\001\255\255\ -\255\255\255\255\255\255\081\006\080\001\083\006\082\001\083\001\ -\084\001\085\001\086\001\255\255\255\255\255\255\255\255\091\001\ -\092\001\255\255\094\001\095\001\096\001\097\001\255\255\255\255\ -\100\001\255\255\255\255\103\001\255\255\105\001\255\255\255\255\ -\108\001\255\255\255\255\111\001\255\255\255\255\255\255\115\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\166\005\255\255\255\255\255\255\013\001\255\255\255\255\255\255\ -\255\255\000\001\255\255\002\001\003\001\004\001\181\005\182\005\ -\183\005\008\001\255\255\028\001\029\001\255\255\013\001\000\000\ -\255\255\255\255\017\001\018\001\019\001\255\255\255\255\255\255\ -\041\001\255\255\200\005\026\001\027\001\028\001\029\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\036\001\255\255\213\005\ -\255\255\040\001\041\001\060\001\255\255\219\005\063\001\255\255\ -\255\255\048\001\049\001\068\001\255\255\255\255\255\255\255\255\ -\255\255\074\001\255\255\255\255\255\255\060\001\236\005\080\001\ -\063\001\255\255\255\255\066\001\067\001\068\001\244\005\070\001\ -\255\255\255\255\073\001\074\001\255\255\255\255\255\255\096\001\ -\255\255\080\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\108\001\091\001\092\001\111\001\094\001\ -\095\001\096\001\255\255\255\255\255\255\100\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\108\001\255\255\255\255\ -\111\001\255\255\255\255\255\255\115\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\044\006\045\006\ -\255\255\255\255\255\255\000\000\255\255\051\006\052\006\053\006\ -\054\006\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\063\006\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\000\001\001\001\002\001\003\001\255\255\ -\078\006\006\001\007\001\008\001\009\001\010\001\011\001\012\001\ -\013\001\014\001\015\001\016\001\017\001\018\001\019\001\020\001\ -\021\001\022\001\255\255\024\001\025\001\026\001\027\001\028\001\ -\029\001\030\001\031\001\255\255\255\255\255\255\255\255\036\001\ -\037\001\255\255\255\255\040\001\041\001\042\001\043\001\044\001\ -\045\001\046\001\047\001\048\001\049\001\050\001\051\001\255\255\ -\053\001\054\001\055\001\056\001\255\255\255\255\059\001\060\001\ -\061\001\062\001\063\001\064\001\065\001\066\001\067\001\068\001\ -\255\255\070\001\071\001\072\001\073\001\074\001\255\255\076\001\ -\255\255\255\255\255\255\080\001\081\001\082\001\083\001\084\001\ -\085\001\086\001\087\001\255\255\089\001\255\255\091\001\092\001\ -\000\000\094\001\095\001\096\001\097\001\098\001\255\255\100\001\ -\101\001\255\255\103\001\104\001\105\001\106\001\255\255\108\001\ -\109\001\255\255\111\001\255\255\255\255\255\255\115\001\000\001\ -\001\001\002\001\003\001\004\001\255\255\006\001\007\001\008\001\ -\009\001\010\001\011\001\012\001\013\001\014\001\015\001\016\001\ -\017\001\018\001\019\001\020\001\021\001\255\255\255\255\024\001\ -\025\001\026\001\027\001\028\001\029\001\030\001\031\001\255\255\ -\255\255\255\255\255\255\036\001\037\001\255\255\255\255\040\001\ -\041\001\042\001\043\001\044\001\045\001\046\001\047\001\048\001\ -\049\001\050\001\051\001\255\255\053\001\054\001\055\001\056\001\ -\255\255\255\255\059\001\060\001\061\001\255\255\063\001\064\001\ -\065\001\066\001\067\001\068\001\255\255\070\001\071\001\072\001\ -\073\001\074\001\255\255\076\001\255\255\255\255\255\255\080\001\ -\081\001\082\001\083\001\084\001\085\001\086\001\087\001\255\255\ -\089\001\255\255\091\001\092\001\000\000\094\001\095\001\096\001\ -\097\001\098\001\255\255\100\001\101\001\255\255\103\001\104\001\ -\105\001\106\001\255\255\108\001\109\001\255\255\111\001\255\255\ -\255\255\255\255\115\001\000\001\001\001\002\001\003\001\255\255\ -\255\255\006\001\007\001\008\001\009\001\010\001\011\001\012\001\ -\013\001\014\001\015\001\016\001\017\001\018\001\019\001\020\001\ -\021\001\022\001\255\255\024\001\025\001\026\001\027\001\028\001\ -\029\001\030\001\031\001\255\255\255\255\255\255\255\255\036\001\ -\037\001\255\255\255\255\040\001\041\001\042\001\043\001\044\001\ -\045\001\046\001\047\001\048\001\049\001\050\001\051\001\255\255\ -\053\001\054\001\055\001\056\001\255\255\255\255\059\001\060\001\ -\061\001\255\255\063\001\064\001\065\001\066\001\067\001\068\001\ -\255\255\070\001\071\001\072\001\073\001\074\001\255\255\076\001\ -\255\255\255\255\255\255\080\001\081\001\082\001\083\001\084\001\ -\085\001\086\001\087\001\255\255\089\001\255\255\091\001\092\001\ -\000\000\094\001\095\001\096\001\097\001\098\001\255\255\100\001\ -\101\001\255\255\103\001\104\001\105\001\106\001\255\255\108\001\ -\109\001\255\255\111\001\255\255\255\255\255\255\115\001\255\255\ -\000\001\001\001\002\001\003\001\255\255\255\255\006\001\007\001\ -\008\001\009\001\010\001\011\001\012\001\013\001\014\001\015\001\ -\016\001\017\001\018\001\019\001\020\001\021\001\022\001\255\255\ -\024\001\025\001\026\001\027\001\028\001\029\001\030\001\031\001\ -\255\255\255\255\255\255\255\255\036\001\037\001\255\255\255\255\ -\040\001\041\001\042\001\043\001\044\001\045\001\046\001\047\001\ -\048\001\049\001\050\001\051\001\255\255\053\001\054\001\055\001\ -\056\001\255\255\255\255\059\001\060\001\061\001\255\255\063\001\ -\064\001\065\001\066\001\067\001\068\001\255\255\070\001\071\001\ -\072\001\073\001\074\001\255\255\076\001\255\255\255\255\255\255\ -\080\001\081\001\082\001\083\001\084\001\085\001\086\001\087\001\ -\255\255\089\001\255\255\091\001\092\001\000\000\094\001\095\001\ -\096\001\097\001\098\001\255\255\100\001\101\001\255\255\103\001\ -\104\001\105\001\106\001\255\255\108\001\109\001\255\255\111\001\ -\255\255\255\255\255\255\115\001\000\001\001\001\002\001\003\001\ -\255\255\255\255\006\001\007\001\008\001\009\001\010\001\011\001\ -\012\001\013\001\014\001\015\001\016\001\017\001\018\001\019\001\ -\020\001\021\001\022\001\255\255\024\001\025\001\026\001\027\001\ -\028\001\029\001\030\001\031\001\255\255\255\255\255\255\255\255\ -\036\001\037\001\255\255\255\255\040\001\041\001\042\001\043\001\ -\044\001\045\001\046\001\047\001\048\001\049\001\050\001\051\001\ -\255\255\053\001\054\001\055\001\056\001\255\255\255\255\059\001\ -\060\001\061\001\255\255\063\001\064\001\065\001\066\001\067\001\ -\068\001\255\255\070\001\071\001\072\001\073\001\074\001\255\255\ -\076\001\255\255\255\255\255\255\080\001\081\001\082\001\083\001\ -\084\001\085\001\086\001\087\001\255\255\089\001\255\255\091\001\ -\092\001\000\000\094\001\095\001\096\001\097\001\098\001\255\255\ -\100\001\101\001\255\255\103\001\104\001\105\001\106\001\255\255\ -\108\001\109\001\255\255\111\001\255\255\255\255\255\255\115\001\ -\000\001\001\001\002\001\003\001\255\255\255\255\006\001\007\001\ -\008\001\009\001\010\001\011\001\012\001\013\001\014\001\015\001\ -\016\001\017\001\018\001\019\001\020\001\021\001\022\001\255\255\ -\024\001\025\001\026\001\027\001\028\001\029\001\030\001\031\001\ -\255\255\255\255\255\255\255\255\036\001\037\001\255\255\255\255\ -\040\001\041\001\042\001\043\001\044\001\045\001\046\001\047\001\ -\048\001\049\001\050\001\051\001\255\255\053\001\054\001\055\001\ -\056\001\255\255\255\255\059\001\060\001\061\001\255\255\063\001\ -\064\001\065\001\066\001\067\001\068\001\255\255\070\001\071\001\ -\072\001\073\001\074\001\255\255\076\001\255\255\255\255\255\255\ -\080\001\081\001\082\001\083\001\084\001\085\001\086\001\087\001\ -\255\255\089\001\255\255\091\001\092\001\000\000\094\001\095\001\ -\096\001\097\001\098\001\255\255\100\001\101\001\255\255\103\001\ -\104\001\105\001\106\001\255\255\108\001\109\001\255\255\111\001\ -\255\255\255\255\255\255\115\001\255\255\000\001\001\001\002\001\ -\003\001\255\255\255\255\006\001\007\001\008\001\009\001\010\001\ -\011\001\012\001\013\001\014\001\015\001\016\001\017\001\018\001\ -\019\001\020\001\021\001\022\001\255\255\024\001\025\001\026\001\ -\027\001\028\001\029\001\030\001\031\001\255\255\255\255\255\255\ -\255\255\036\001\037\001\255\255\255\255\040\001\041\001\042\001\ -\043\001\044\001\045\001\046\001\047\001\048\001\049\001\050\001\ -\051\001\255\255\053\001\054\001\055\001\056\001\255\255\255\255\ -\059\001\060\001\061\001\255\255\063\001\064\001\065\001\066\001\ -\067\001\068\001\255\255\070\001\071\001\072\001\073\001\074\001\ -\255\255\076\001\255\255\255\255\255\255\080\001\081\001\082\001\ -\083\001\084\001\085\001\086\001\087\001\255\255\089\001\255\255\ -\091\001\092\001\000\000\094\001\095\001\096\001\097\001\098\001\ -\255\255\100\001\101\001\255\255\103\001\104\001\105\001\106\001\ -\255\255\108\001\109\001\255\255\111\001\255\255\255\255\255\255\ -\115\001\000\001\001\001\002\001\003\001\255\255\255\255\006\001\ -\007\001\008\001\009\001\010\001\011\001\012\001\013\001\014\001\ -\015\001\016\001\017\001\018\001\019\001\020\001\021\001\022\001\ -\255\255\024\001\025\001\026\001\027\001\028\001\029\001\030\001\ -\031\001\255\255\255\255\255\255\255\255\036\001\037\001\255\255\ -\255\255\040\001\041\001\042\001\043\001\044\001\045\001\046\001\ -\047\001\048\001\049\001\050\001\051\001\255\255\053\001\054\001\ -\055\001\056\001\255\255\255\255\059\001\060\001\061\001\255\255\ -\063\001\064\001\065\001\066\001\067\001\068\001\255\255\070\001\ -\071\001\072\001\073\001\074\001\255\255\076\001\255\255\255\255\ -\255\255\080\001\081\001\082\001\083\001\084\001\085\001\086\001\ -\087\001\255\255\089\001\255\255\091\001\092\001\000\000\094\001\ -\095\001\096\001\097\001\098\001\255\255\100\001\101\001\255\255\ -\103\001\104\001\105\001\106\001\255\255\108\001\109\001\255\255\ -\111\001\255\255\255\255\255\255\115\001\000\001\001\001\002\001\ -\003\001\255\255\255\255\006\001\007\001\008\001\009\001\010\001\ -\011\001\012\001\013\001\014\001\015\001\016\001\017\001\018\001\ -\019\001\020\001\021\001\022\001\255\255\024\001\025\001\026\001\ -\027\001\028\001\029\001\030\001\031\001\255\255\255\255\255\255\ -\255\255\036\001\037\001\255\255\255\255\040\001\041\001\042\001\ -\043\001\044\001\045\001\046\001\047\001\048\001\049\001\050\001\ -\051\001\255\255\053\001\054\001\055\001\056\001\255\255\255\255\ -\059\001\060\001\061\001\255\255\063\001\064\001\065\001\066\001\ -\067\001\068\001\255\255\070\001\071\001\072\001\073\001\074\001\ -\255\255\076\001\255\255\255\255\255\255\080\001\081\001\082\001\ -\083\001\084\001\085\001\086\001\087\001\255\255\089\001\255\255\ -\091\001\092\001\000\000\094\001\095\001\096\001\097\001\098\001\ -\255\255\100\001\101\001\255\255\103\001\104\001\105\001\106\001\ -\255\255\108\001\109\001\255\255\111\001\255\255\255\255\255\255\ -\115\001\255\255\000\001\001\001\002\001\003\001\255\255\255\255\ -\006\001\007\001\008\001\009\001\010\001\011\001\012\001\013\001\ -\014\001\015\001\016\001\017\001\018\001\019\001\020\001\021\001\ -\022\001\255\255\024\001\025\001\026\001\027\001\028\001\029\001\ -\030\001\031\001\255\255\255\255\255\255\255\255\036\001\037\001\ -\255\255\255\255\040\001\041\001\042\001\043\001\044\001\045\001\ -\046\001\047\001\048\001\049\001\050\001\051\001\255\255\053\001\ -\054\001\055\001\056\001\255\255\255\255\059\001\060\001\061\001\ -\255\255\063\001\064\001\065\001\066\001\067\001\068\001\255\255\ -\070\001\071\001\072\001\073\001\074\001\255\255\076\001\255\255\ -\255\255\255\255\080\001\081\001\082\001\083\001\084\001\085\001\ -\086\001\087\001\255\255\089\001\255\255\091\001\092\001\000\000\ -\094\001\095\001\096\001\097\001\098\001\255\255\100\001\101\001\ -\255\255\103\001\104\001\105\001\106\001\255\255\108\001\109\001\ -\255\255\111\001\255\255\255\255\255\255\115\001\000\001\001\001\ -\002\001\003\001\255\255\255\255\006\001\007\001\008\001\009\001\ -\010\001\011\001\012\001\013\001\014\001\015\001\016\001\017\001\ -\018\001\019\001\020\001\021\001\022\001\255\255\024\001\025\001\ -\026\001\027\001\028\001\029\001\030\001\031\001\255\255\255\255\ -\255\255\255\255\036\001\037\001\255\255\255\255\040\001\041\001\ -\042\001\043\001\044\001\045\001\046\001\047\001\048\001\049\001\ -\050\001\051\001\255\255\053\001\054\001\055\001\056\001\255\255\ -\255\255\059\001\060\001\061\001\255\255\063\001\064\001\065\001\ -\066\001\067\001\068\001\255\255\070\001\071\001\072\001\073\001\ -\074\001\255\255\076\001\255\255\255\255\255\255\080\001\081\001\ -\082\001\083\001\084\001\085\001\086\001\087\001\255\255\089\001\ -\255\255\091\001\092\001\000\000\094\001\095\001\096\001\097\001\ -\098\001\255\255\100\001\101\001\255\255\103\001\104\001\105\001\ -\106\001\255\255\108\001\109\001\255\255\111\001\255\255\255\255\ -\255\255\115\001\000\001\001\001\002\001\003\001\255\255\255\255\ -\006\001\007\001\008\001\009\001\010\001\011\001\012\001\013\001\ -\014\001\015\001\016\001\017\001\018\001\019\001\020\001\021\001\ -\022\001\255\255\024\001\025\001\026\001\027\001\028\001\029\001\ -\030\001\031\001\255\255\255\255\255\255\255\255\036\001\037\001\ -\255\255\255\255\040\001\041\001\042\001\043\001\044\001\045\001\ -\046\001\047\001\048\001\049\001\050\001\051\001\255\255\053\001\ -\054\001\055\001\056\001\255\255\255\255\059\001\060\001\061\001\ -\255\255\063\001\064\001\065\001\066\001\067\001\068\001\255\255\ -\070\001\071\001\072\001\073\001\074\001\255\255\076\001\255\255\ -\255\255\255\255\080\001\081\001\082\001\083\001\084\001\085\001\ -\086\001\087\001\255\255\089\001\255\255\091\001\092\001\000\000\ -\094\001\095\001\096\001\097\001\098\001\255\255\100\001\101\001\ -\255\255\103\001\104\001\105\001\106\001\255\255\108\001\109\001\ -\255\255\111\001\255\255\255\255\255\255\115\001\255\255\000\001\ -\001\001\002\001\003\001\004\001\255\255\006\001\007\001\008\001\ -\009\001\010\001\011\001\012\001\013\001\014\001\015\001\016\001\ -\017\001\018\001\019\001\020\001\021\001\255\255\255\255\024\001\ -\025\001\026\001\027\001\028\001\029\001\030\001\031\001\255\255\ -\255\255\255\255\255\255\036\001\037\001\255\255\255\255\040\001\ -\041\001\042\001\043\001\044\001\045\001\046\001\255\255\048\001\ -\049\001\050\001\051\001\255\255\053\001\054\001\055\001\056\001\ -\255\255\255\255\059\001\060\001\061\001\255\255\063\001\064\001\ -\065\001\066\001\067\001\068\001\255\255\070\001\071\001\072\001\ -\073\001\074\001\255\255\076\001\255\255\255\255\255\255\080\001\ -\081\001\082\001\083\001\084\001\085\001\086\001\087\001\255\255\ -\089\001\255\255\091\001\092\001\000\000\094\001\095\001\096\001\ -\097\001\098\001\255\255\100\001\101\001\255\255\103\001\104\001\ -\105\001\106\001\255\255\108\001\109\001\255\255\111\001\255\255\ -\255\255\255\255\115\001\000\001\001\001\002\001\003\001\004\001\ -\255\255\006\001\007\001\008\001\009\001\010\001\011\001\012\001\ -\013\001\014\001\015\001\016\001\017\001\018\001\019\001\020\001\ -\021\001\255\255\255\255\024\001\025\001\026\001\027\001\028\001\ -\029\001\030\001\031\001\255\255\255\255\255\255\255\255\036\001\ -\037\001\255\255\255\255\040\001\041\001\042\001\043\001\044\001\ -\045\001\046\001\255\255\048\001\049\001\050\001\051\001\255\255\ -\053\001\054\001\055\001\056\001\255\255\255\255\059\001\060\001\ -\061\001\255\255\063\001\064\001\065\001\066\001\067\001\068\001\ -\255\255\070\001\071\001\072\001\073\001\074\001\255\255\076\001\ -\255\255\255\255\255\255\080\001\081\001\082\001\083\001\084\001\ -\085\001\086\001\087\001\255\255\089\001\255\255\091\001\092\001\ -\000\000\094\001\095\001\096\001\255\255\255\255\255\255\100\001\ -\101\001\255\255\103\001\104\001\105\001\106\001\255\255\108\001\ -\109\001\255\255\111\001\255\255\255\255\255\255\115\001\000\001\ -\001\001\002\001\003\001\004\001\255\255\006\001\007\001\008\001\ -\009\001\010\001\011\001\012\001\013\001\014\001\015\001\016\001\ -\017\001\018\001\019\001\020\001\021\001\255\255\255\255\024\001\ -\025\001\026\001\027\001\028\001\029\001\030\001\031\001\255\255\ -\255\255\255\255\255\255\036\001\037\001\255\255\255\255\040\001\ -\041\001\042\001\043\001\044\001\045\001\046\001\255\255\048\001\ -\049\001\050\001\051\001\255\255\053\001\054\001\055\001\056\001\ -\255\255\255\255\059\001\060\001\061\001\255\255\063\001\064\001\ -\065\001\066\001\067\001\068\001\255\255\070\001\071\001\072\001\ -\073\001\074\001\255\255\076\001\255\255\255\255\255\255\080\001\ -\081\001\082\001\083\001\084\001\085\001\086\001\087\001\255\255\ -\089\001\255\255\091\001\092\001\000\000\094\001\095\001\096\001\ -\255\255\255\255\255\255\100\001\101\001\255\255\103\001\104\001\ -\105\001\106\001\255\255\108\001\109\001\255\255\111\001\255\255\ -\255\255\255\255\115\001\255\255\000\001\001\001\002\001\003\001\ -\004\001\255\255\006\001\007\001\008\001\009\001\010\001\011\001\ -\012\001\013\001\014\001\015\001\016\001\017\001\018\001\019\001\ -\020\001\021\001\255\255\255\255\024\001\025\001\026\001\027\001\ -\028\001\029\001\030\001\031\001\255\255\255\255\255\255\255\255\ -\036\001\037\001\255\255\255\255\040\001\041\001\042\001\043\001\ -\044\001\045\001\046\001\255\255\048\001\049\001\050\001\051\001\ -\255\255\053\001\054\001\055\001\056\001\255\255\255\255\059\001\ -\060\001\061\001\255\255\063\001\064\001\065\001\066\001\067\001\ -\068\001\255\255\070\001\071\001\072\001\073\001\074\001\255\255\ -\076\001\255\255\255\255\255\255\080\001\081\001\082\001\083\001\ -\084\001\085\001\086\001\087\001\255\255\089\001\255\255\091\001\ -\092\001\000\000\094\001\095\001\096\001\255\255\255\255\255\255\ -\100\001\101\001\255\255\103\001\104\001\105\001\106\001\255\255\ -\108\001\109\001\255\255\111\001\255\255\255\255\255\255\115\001\ -\000\001\001\001\002\001\003\001\255\255\255\255\255\255\255\255\ -\008\001\009\001\010\001\255\255\255\255\013\001\014\001\015\001\ -\016\001\017\001\018\001\019\001\020\001\021\001\022\001\255\255\ -\024\001\025\001\026\001\027\001\028\001\029\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\036\001\037\001\255\255\255\255\ -\040\001\041\001\042\001\043\001\044\001\045\001\046\001\047\001\ -\048\001\049\001\255\255\051\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\060\001\061\001\255\255\063\001\ -\255\255\255\255\066\001\067\001\068\001\255\255\070\001\071\001\ -\072\001\073\001\074\001\255\255\255\255\255\255\255\255\255\255\ -\080\001\081\001\082\001\083\001\084\001\085\001\086\001\255\255\ -\255\255\089\001\255\255\091\001\092\001\000\000\094\001\095\001\ -\096\001\097\001\098\001\255\255\100\001\255\255\255\255\103\001\ -\104\001\105\001\255\255\255\255\108\001\255\255\255\255\111\001\ -\255\255\255\255\255\255\115\001\000\001\001\001\002\001\003\001\ -\255\255\255\255\255\255\255\255\008\001\009\001\010\001\255\255\ -\255\255\013\001\014\001\015\001\016\001\017\001\018\001\019\001\ -\020\001\021\001\022\001\255\255\024\001\025\001\026\001\027\001\ -\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\036\001\037\001\255\255\255\255\040\001\041\001\042\001\043\001\ -\044\001\045\001\046\001\047\001\048\001\049\001\255\255\051\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\060\001\061\001\255\255\063\001\255\255\255\255\066\001\067\001\ -\068\001\255\255\070\001\071\001\072\001\073\001\074\001\255\255\ -\255\255\255\255\255\255\255\255\080\001\081\001\082\001\083\001\ -\084\001\085\001\086\001\255\255\255\255\089\001\255\255\091\001\ -\092\001\000\000\094\001\095\001\096\001\097\001\098\001\255\255\ -\100\001\255\255\255\255\103\001\104\001\105\001\255\255\255\255\ -\108\001\255\255\255\255\111\001\255\255\255\255\255\255\115\001\ -\255\255\000\001\001\001\002\001\003\001\255\255\255\255\255\255\ -\255\255\008\001\009\001\010\001\255\255\255\255\013\001\014\001\ -\015\001\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ -\255\255\024\001\025\001\026\001\027\001\028\001\029\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\036\001\037\001\255\255\ -\255\255\040\001\041\001\042\001\043\001\044\001\045\001\046\001\ -\255\255\048\001\049\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\060\001\061\001\255\255\ -\063\001\255\255\255\255\066\001\067\001\068\001\255\255\070\001\ -\071\001\072\001\073\001\074\001\255\255\255\255\255\255\255\255\ -\255\255\080\001\255\255\082\001\083\001\084\001\085\001\086\001\ -\255\255\255\255\255\255\255\255\091\001\092\001\000\000\094\001\ -\095\001\096\001\255\255\255\255\255\255\100\001\255\255\255\255\ -\103\001\255\255\105\001\255\255\255\255\108\001\255\255\255\255\ -\111\001\255\255\255\255\255\255\115\001\000\001\001\001\002\001\ -\003\001\255\255\255\255\255\255\255\255\008\001\009\001\010\001\ -\255\255\255\255\013\001\014\001\015\001\016\001\017\001\255\255\ -\019\001\020\001\021\001\255\255\255\255\024\001\025\001\026\001\ -\027\001\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\036\001\037\001\255\255\255\255\040\001\041\001\042\001\ -\043\001\044\001\045\001\046\001\255\255\048\001\049\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\060\001\061\001\255\255\063\001\255\255\255\255\066\001\ -\067\001\068\001\255\255\070\001\071\001\072\001\073\001\074\001\ -\255\255\255\255\255\255\255\255\255\255\080\001\255\255\082\001\ -\083\001\084\001\085\001\086\001\255\255\255\255\255\255\255\255\ -\091\001\092\001\000\000\094\001\095\001\096\001\097\001\255\255\ -\255\255\100\001\255\255\255\255\103\001\255\255\105\001\255\255\ -\255\255\108\001\255\255\255\255\111\001\255\255\255\255\255\255\ -\115\001\000\001\001\001\002\001\003\001\255\255\255\255\255\255\ -\255\255\008\001\009\001\010\001\255\255\255\255\013\001\014\001\ -\015\001\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ -\255\255\024\001\025\001\026\001\027\001\028\001\029\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\036\001\037\001\255\255\ -\255\255\040\001\041\001\042\001\043\001\044\001\045\001\046\001\ -\255\255\048\001\049\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\060\001\061\001\255\255\ -\063\001\255\255\255\255\066\001\067\001\068\001\255\255\070\001\ -\071\001\072\001\073\001\074\001\255\255\255\255\255\255\255\255\ -\255\255\080\001\255\255\082\001\083\001\084\001\085\001\086\001\ -\255\255\255\255\255\255\255\255\091\001\092\001\000\000\094\001\ -\095\001\096\001\255\255\255\255\255\255\100\001\255\255\255\255\ -\103\001\255\255\105\001\255\255\255\255\108\001\255\255\255\255\ -\111\001\255\255\255\255\255\255\115\001\255\255\000\001\001\001\ -\002\001\003\001\255\255\255\255\255\255\255\255\008\001\009\001\ -\010\001\255\255\255\255\013\001\014\001\015\001\016\001\017\001\ -\018\001\019\001\020\001\021\001\255\255\255\255\024\001\025\001\ -\026\001\027\001\028\001\029\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\036\001\037\001\255\255\255\255\040\001\041\001\ -\042\001\043\001\044\001\045\001\046\001\255\255\048\001\049\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\060\001\061\001\255\255\063\001\255\255\255\255\ -\066\001\067\001\068\001\255\255\070\001\071\001\072\001\073\001\ -\074\001\255\255\255\255\255\255\255\255\255\255\080\001\255\255\ -\082\001\083\001\084\001\085\001\086\001\255\255\255\255\255\255\ -\255\255\091\001\092\001\000\000\094\001\095\001\096\001\255\255\ -\255\255\255\255\100\001\255\255\255\255\103\001\255\255\105\001\ -\255\255\255\255\108\001\255\255\255\255\111\001\255\255\255\255\ -\255\255\115\001\000\001\001\001\002\001\003\001\255\255\255\255\ -\255\255\255\255\008\001\009\001\010\001\255\255\255\255\013\001\ -\014\001\015\001\016\001\017\001\018\001\019\001\020\001\021\001\ -\255\255\255\255\024\001\025\001\026\001\027\001\028\001\029\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\036\001\037\001\ -\255\255\255\255\040\001\041\001\042\001\043\001\044\001\045\001\ -\046\001\255\255\048\001\049\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\060\001\061\001\ -\255\255\063\001\255\255\255\255\066\001\067\001\068\001\255\255\ -\070\001\071\001\072\001\073\001\074\001\255\255\255\255\255\255\ -\255\255\255\255\080\001\255\255\082\001\083\001\084\001\085\001\ -\086\001\255\255\255\255\255\255\255\255\091\001\092\001\000\000\ -\094\001\095\001\096\001\255\255\255\255\255\255\100\001\255\255\ -\255\255\103\001\255\255\105\001\255\255\255\255\108\001\255\255\ -\255\255\111\001\255\255\255\255\255\255\115\001\000\001\001\001\ -\002\001\003\001\255\255\255\255\255\255\255\255\008\001\009\001\ -\010\001\255\255\255\255\013\001\014\001\015\001\016\001\017\001\ -\018\001\019\001\020\001\021\001\255\255\255\255\024\001\025\001\ -\026\001\027\001\028\001\029\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\036\001\037\001\255\255\255\255\040\001\041\001\ -\042\001\043\001\044\001\045\001\046\001\255\255\048\001\049\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\060\001\061\001\255\255\063\001\255\255\255\255\ -\066\001\067\001\068\001\255\255\070\001\071\001\072\001\073\001\ -\074\001\255\255\255\255\255\255\255\255\255\255\080\001\255\255\ -\082\001\083\001\084\001\085\001\086\001\255\255\255\255\255\255\ -\255\255\091\001\092\001\000\000\094\001\095\001\096\001\255\255\ -\255\255\255\255\100\001\255\255\255\255\103\001\255\255\105\001\ -\255\255\255\255\108\001\255\255\255\255\111\001\255\255\255\255\ -\255\255\115\001\255\255\000\001\001\001\002\001\003\001\255\255\ -\255\255\255\255\255\255\008\001\009\001\010\001\255\255\255\255\ -\013\001\014\001\015\001\016\001\017\001\018\001\019\001\020\001\ -\021\001\255\255\255\255\024\001\025\001\026\001\027\001\028\001\ -\029\001\255\255\255\255\255\255\255\255\255\255\255\255\036\001\ -\037\001\255\255\255\255\040\001\041\001\042\001\043\001\044\001\ -\045\001\255\255\255\255\048\001\049\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\060\001\ -\061\001\255\255\063\001\255\255\255\255\066\001\067\001\068\001\ -\255\255\070\001\071\001\072\001\073\001\074\001\255\255\255\255\ -\255\255\255\255\255\255\080\001\255\255\082\001\083\001\084\001\ -\085\001\086\001\255\255\255\255\255\255\255\255\091\001\092\001\ -\000\000\094\001\095\001\096\001\097\001\255\255\255\255\100\001\ -\255\255\255\255\103\001\255\255\105\001\255\255\255\255\108\001\ -\255\255\255\255\111\001\255\255\255\255\255\255\115\001\000\001\ -\001\001\002\001\003\001\255\255\255\255\255\255\255\255\008\001\ -\009\001\010\001\255\255\255\255\013\001\014\001\015\001\016\001\ -\017\001\018\001\019\001\020\001\021\001\255\255\255\255\024\001\ -\025\001\026\001\027\001\028\001\029\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\036\001\037\001\255\255\255\255\040\001\ -\041\001\042\001\043\001\044\001\045\001\255\255\255\255\048\001\ -\049\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\060\001\061\001\255\255\063\001\255\255\ -\255\255\066\001\067\001\068\001\255\255\070\001\071\001\072\001\ -\073\001\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ -\255\255\082\001\083\001\084\001\085\001\086\001\255\255\255\255\ -\255\255\255\255\091\001\092\001\000\000\094\001\095\001\096\001\ -\097\001\255\255\255\255\100\001\255\255\255\255\103\001\255\255\ -\105\001\255\255\255\255\108\001\255\255\255\255\111\001\255\255\ -\255\255\255\255\115\001\000\001\001\001\002\001\003\001\255\255\ -\255\255\255\255\255\255\008\001\009\001\010\001\255\255\255\255\ -\013\001\014\001\015\001\016\001\017\001\018\001\019\001\020\001\ -\021\001\255\255\255\255\024\001\025\001\026\001\027\001\028\001\ -\029\001\255\255\255\255\255\255\255\255\255\255\255\255\036\001\ -\037\001\255\255\255\255\040\001\041\001\042\001\043\001\044\001\ -\045\001\255\255\255\255\048\001\049\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\060\001\ -\061\001\255\255\063\001\255\255\255\255\066\001\067\001\068\001\ -\255\255\070\001\071\001\072\001\073\001\074\001\255\255\255\255\ -\255\255\255\255\255\255\080\001\255\255\082\001\083\001\084\001\ -\085\001\086\001\255\255\255\255\255\255\255\255\091\001\092\001\ -\000\000\094\001\095\001\096\001\097\001\255\255\255\255\100\001\ -\255\255\255\255\103\001\255\255\105\001\255\255\255\255\108\001\ -\255\255\255\255\111\001\255\255\255\255\255\255\115\001\255\255\ -\000\001\001\001\002\001\003\001\255\255\255\255\255\255\255\255\ -\008\001\009\001\010\001\255\255\255\255\013\001\014\001\015\001\ -\016\001\017\001\018\001\019\001\020\001\021\001\255\255\255\255\ -\024\001\025\001\026\001\027\001\028\001\029\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\036\001\037\001\255\255\255\255\ -\040\001\041\001\042\001\043\001\044\001\045\001\255\255\255\255\ -\048\001\049\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\060\001\061\001\255\255\063\001\ -\255\255\255\255\066\001\067\001\068\001\255\255\070\001\071\001\ -\072\001\073\001\074\001\255\255\255\255\255\255\255\255\255\255\ -\080\001\255\255\082\001\083\001\084\001\085\001\086\001\255\255\ -\255\255\255\255\255\255\091\001\092\001\000\000\094\001\095\001\ -\096\001\097\001\255\255\255\255\100\001\255\255\255\255\103\001\ -\255\255\105\001\255\255\255\255\108\001\255\255\255\255\111\001\ -\255\255\255\255\255\255\115\001\000\001\001\001\002\001\003\001\ -\255\255\255\255\255\255\255\255\255\255\009\001\010\001\255\255\ -\255\255\013\001\014\001\015\001\016\001\017\001\018\001\019\001\ -\020\001\021\001\255\255\255\255\024\001\025\001\026\001\027\001\ -\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\036\001\037\001\255\255\255\255\040\001\041\001\042\001\043\001\ -\044\001\045\001\046\001\255\255\048\001\049\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\060\001\061\001\255\255\063\001\255\255\255\255\066\001\067\001\ -\068\001\255\255\070\001\071\001\072\001\073\001\074\001\255\255\ -\255\255\255\255\255\255\255\255\080\001\255\255\082\001\083\001\ -\084\001\085\001\086\001\255\255\255\255\255\255\255\255\091\001\ -\092\001\000\000\094\001\095\001\096\001\097\001\255\255\255\255\ -\100\001\255\255\255\255\103\001\255\255\105\001\255\255\255\255\ -\108\001\255\255\255\255\111\001\255\255\255\255\255\255\115\001\ -\000\001\001\001\002\001\003\001\255\255\255\255\255\255\255\255\ -\255\255\009\001\010\001\255\255\255\255\013\001\014\001\015\001\ -\016\001\017\001\018\001\019\001\020\001\021\001\255\255\255\255\ -\024\001\025\001\026\001\027\001\028\001\029\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\036\001\037\001\255\255\255\255\ -\040\001\041\001\042\001\043\001\044\001\045\001\046\001\255\255\ -\048\001\049\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\060\001\061\001\255\255\063\001\ -\255\255\255\255\066\001\067\001\068\001\255\255\070\001\071\001\ -\072\001\073\001\074\001\255\255\255\255\255\255\255\255\255\255\ -\080\001\255\255\082\001\083\001\084\001\085\001\086\001\255\255\ -\255\255\255\255\255\255\091\001\092\001\000\000\094\001\095\001\ -\096\001\097\001\255\255\255\255\100\001\255\255\255\255\103\001\ -\255\255\105\001\255\255\255\255\108\001\255\255\255\255\111\001\ -\255\255\255\255\255\255\115\001\255\255\000\001\001\001\002\001\ -\003\001\255\255\255\255\255\255\255\255\255\255\009\001\010\001\ -\255\255\255\255\013\001\014\001\015\001\016\001\017\001\018\001\ -\019\001\020\001\021\001\255\255\255\255\024\001\025\001\026\001\ -\027\001\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\036\001\037\001\255\255\255\255\040\001\041\001\042\001\ -\043\001\044\001\045\001\046\001\255\255\048\001\049\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\060\001\061\001\255\255\063\001\255\255\255\255\066\001\ -\067\001\068\001\255\255\070\001\071\001\072\001\073\001\074\001\ -\255\255\255\255\255\255\255\255\255\255\080\001\255\255\082\001\ -\083\001\084\001\085\001\086\001\255\255\255\255\255\255\255\255\ -\091\001\092\001\000\000\094\001\095\001\096\001\097\001\255\255\ -\255\255\100\001\255\255\255\255\103\001\255\255\105\001\255\255\ -\255\255\108\001\255\255\255\255\111\001\255\255\255\255\255\255\ -\115\001\000\001\001\001\002\001\003\001\255\255\255\255\255\255\ -\255\255\008\001\009\001\010\001\255\255\255\255\013\001\014\001\ -\015\001\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ -\255\255\024\001\025\001\026\001\027\001\028\001\029\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\036\001\037\001\255\255\ -\255\255\040\001\041\001\042\001\043\001\044\001\255\255\255\255\ -\255\255\048\001\049\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\060\001\061\001\255\255\ -\063\001\255\255\255\255\066\001\067\001\068\001\255\255\070\001\ -\071\001\072\001\073\001\074\001\255\255\255\255\255\255\255\255\ -\255\255\080\001\255\255\082\001\255\255\084\001\085\001\086\001\ -\255\255\255\255\255\255\255\255\091\001\092\001\000\000\094\001\ -\095\001\096\001\097\001\255\255\255\255\255\255\255\255\255\255\ -\103\001\255\255\105\001\255\255\255\255\108\001\255\255\255\255\ -\111\001\255\255\255\255\255\255\115\001\000\001\001\001\002\001\ -\003\001\255\255\255\255\255\255\255\255\008\001\009\001\010\001\ -\255\255\255\255\013\001\014\001\015\001\016\001\017\001\018\001\ -\019\001\020\001\021\001\255\255\255\255\024\001\025\001\026\001\ -\027\001\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\036\001\037\001\255\255\255\255\040\001\041\001\042\001\ -\043\001\044\001\255\255\255\255\255\255\048\001\049\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\060\001\061\001\255\255\063\001\255\255\255\255\066\001\ -\067\001\068\001\255\255\070\001\071\001\072\001\073\001\074\001\ -\255\255\255\255\255\255\255\255\255\255\080\001\255\255\082\001\ -\255\255\084\001\085\001\086\001\255\255\255\255\255\255\255\255\ -\091\001\092\001\000\000\094\001\095\001\096\001\097\001\255\255\ -\255\255\255\255\255\255\255\255\103\001\255\255\105\001\255\255\ -\255\255\108\001\255\255\255\255\111\001\255\255\255\255\255\255\ -\115\001\255\255\000\001\001\001\002\001\003\001\255\255\255\255\ -\255\255\255\255\008\001\009\001\010\001\255\255\255\255\013\001\ -\014\001\015\001\016\001\017\001\018\001\019\001\020\001\021\001\ -\255\255\255\255\024\001\025\001\026\001\027\001\028\001\029\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\036\001\037\001\ -\255\255\255\255\040\001\041\001\042\001\043\001\044\001\255\255\ -\255\255\255\255\048\001\049\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\060\001\061\001\ -\255\255\063\001\255\255\255\255\066\001\067\001\068\001\255\255\ -\070\001\071\001\072\001\073\001\074\001\255\255\255\255\255\255\ -\255\255\255\255\080\001\255\255\082\001\255\255\084\001\085\001\ -\086\001\255\255\255\255\255\255\255\255\091\001\092\001\000\000\ -\094\001\095\001\096\001\097\001\255\255\255\255\255\255\255\255\ -\255\255\103\001\255\255\105\001\255\255\255\255\108\001\255\255\ -\255\255\111\001\255\255\255\255\255\255\115\001\000\001\001\001\ -\002\001\003\001\255\255\255\255\255\255\255\255\008\001\009\001\ -\010\001\255\255\255\255\013\001\014\001\015\001\016\001\017\001\ -\018\001\019\001\020\001\021\001\255\255\255\255\024\001\025\001\ -\026\001\027\001\028\001\029\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\036\001\037\001\255\255\255\255\040\001\041\001\ -\042\001\043\001\044\001\255\255\255\255\255\255\048\001\049\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\060\001\061\001\255\255\063\001\255\255\255\255\ -\066\001\067\001\068\001\255\255\070\001\071\001\072\001\073\001\ -\074\001\255\255\255\255\255\255\255\255\255\255\080\001\255\255\ -\082\001\255\255\084\001\085\001\086\001\255\255\255\255\255\255\ -\255\255\091\001\092\001\000\000\094\001\095\001\096\001\097\001\ -\255\255\255\255\255\255\255\255\255\255\103\001\255\255\105\001\ -\255\255\255\255\108\001\255\255\255\255\111\001\255\255\255\255\ -\255\255\115\001\000\001\001\001\002\001\003\001\255\255\255\255\ -\255\255\255\255\008\001\009\001\010\001\255\255\255\255\013\001\ -\014\001\015\001\016\001\017\001\018\001\019\001\020\001\021\001\ -\255\255\255\255\024\001\025\001\026\001\027\001\028\001\029\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\036\001\037\001\ -\255\255\255\255\040\001\041\001\042\001\043\001\044\001\255\255\ -\255\255\255\255\048\001\049\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\060\001\061\001\ -\255\255\063\001\255\255\255\255\066\001\067\001\068\001\255\255\ -\070\001\071\001\072\001\073\001\074\001\255\255\255\255\255\255\ -\255\255\255\255\080\001\255\255\082\001\255\255\084\001\085\001\ -\086\001\255\255\255\255\255\255\255\255\091\001\092\001\000\000\ -\094\001\095\001\096\001\097\001\255\255\255\255\255\255\255\255\ -\255\255\103\001\255\255\105\001\255\255\255\255\108\001\255\255\ -\255\255\111\001\255\255\255\255\255\255\115\001\255\255\000\001\ -\001\001\002\001\003\001\255\255\255\255\255\255\255\255\008\001\ -\009\001\010\001\255\255\255\255\013\001\014\001\015\001\016\001\ -\017\001\018\001\019\001\020\001\021\001\255\255\255\255\024\001\ -\025\001\026\001\027\001\028\001\029\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\036\001\037\001\255\255\255\255\040\001\ -\041\001\042\001\043\001\044\001\255\255\255\255\255\255\048\001\ -\049\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\060\001\061\001\255\255\063\001\255\255\ -\255\255\066\001\067\001\068\001\255\255\070\001\071\001\072\001\ -\073\001\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ -\255\255\082\001\255\255\084\001\085\001\086\001\255\255\255\255\ -\255\255\255\255\091\001\092\001\000\000\094\001\095\001\096\001\ -\097\001\255\255\255\255\255\255\255\255\255\255\103\001\255\255\ -\105\001\255\255\255\255\108\001\255\255\255\255\111\001\255\255\ -\255\255\255\255\115\001\000\001\001\001\002\001\003\001\255\255\ -\255\255\255\255\255\255\008\001\009\001\010\001\255\255\255\255\ -\013\001\014\001\015\001\016\001\017\001\018\001\019\001\020\001\ -\021\001\255\255\255\255\024\001\025\001\026\001\027\001\028\001\ -\029\001\255\255\255\255\255\255\255\255\255\255\255\255\036\001\ -\037\001\255\255\255\255\040\001\041\001\042\001\043\001\044\001\ -\045\001\046\001\255\255\048\001\049\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\060\001\ -\061\001\255\255\255\255\255\255\255\255\066\001\067\001\068\001\ -\255\255\070\001\255\255\255\255\073\001\074\001\255\255\255\255\ -\255\255\255\255\255\255\080\001\255\255\082\001\255\255\255\255\ -\255\255\086\001\255\255\255\255\255\255\255\255\091\001\092\001\ -\000\000\094\001\095\001\096\001\097\001\255\255\255\255\100\001\ -\255\255\255\255\103\001\255\255\105\001\255\255\255\255\108\001\ -\255\255\255\255\111\001\255\255\255\255\255\255\115\001\000\001\ -\001\001\002\001\003\001\255\255\255\255\255\255\255\255\008\001\ -\009\001\010\001\255\255\255\255\013\001\014\001\255\255\016\001\ -\017\001\018\001\019\001\020\001\021\001\255\255\255\255\024\001\ -\025\001\026\001\027\001\028\001\029\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\036\001\037\001\255\255\255\255\040\001\ -\041\001\042\001\255\255\255\255\255\255\255\255\255\255\048\001\ -\049\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\060\001\061\001\255\255\063\001\255\255\ -\255\255\255\255\067\001\068\001\255\255\070\001\255\255\255\255\ -\073\001\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ -\255\255\082\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\091\001\092\001\000\000\094\001\095\001\096\001\ -\097\001\255\255\255\255\255\255\255\255\255\255\103\001\255\255\ -\105\001\255\255\255\255\108\001\255\255\255\255\111\001\255\255\ -\255\255\255\255\115\001\255\255\000\001\001\001\002\001\003\001\ -\255\255\255\255\255\255\255\255\008\001\009\001\010\001\255\255\ -\255\255\013\001\014\001\255\255\016\001\017\001\018\001\019\001\ -\020\001\021\001\255\255\255\255\024\001\025\001\026\001\027\001\ -\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\036\001\037\001\255\255\255\255\040\001\041\001\042\001\255\255\ -\255\255\255\255\255\255\255\255\048\001\049\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\060\001\061\001\255\255\063\001\255\255\255\255\255\255\067\001\ -\068\001\255\255\070\001\255\255\255\255\073\001\074\001\255\255\ -\255\255\255\255\255\255\255\255\080\001\255\255\082\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\091\001\ -\092\001\000\000\094\001\095\001\096\001\097\001\255\255\255\255\ -\255\255\255\255\255\255\103\001\255\255\105\001\255\255\255\255\ -\108\001\255\255\255\255\111\001\255\255\255\255\255\255\115\001\ -\000\001\001\001\002\001\003\001\255\255\255\255\255\255\255\255\ -\008\001\009\001\010\001\255\255\255\255\013\001\014\001\255\255\ -\016\001\017\001\018\001\019\001\020\001\021\001\255\255\255\255\ -\024\001\025\001\026\001\027\001\028\001\029\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\036\001\037\001\255\255\255\255\ -\040\001\041\001\042\001\255\255\255\255\255\255\255\255\255\255\ -\048\001\049\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\060\001\061\001\255\255\063\001\ -\255\255\255\255\255\255\067\001\068\001\255\255\070\001\255\255\ -\255\255\073\001\074\001\255\255\255\255\255\255\255\255\255\255\ -\080\001\000\000\082\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\091\001\092\001\255\255\094\001\095\001\ -\096\001\097\001\255\255\255\255\255\255\255\255\255\255\103\001\ -\255\255\105\001\255\255\255\255\108\001\255\255\255\255\111\001\ -\255\255\255\255\255\255\115\001\000\001\001\001\002\001\003\001\ -\255\255\255\255\255\255\255\255\008\001\009\001\010\001\255\255\ -\255\255\013\001\014\001\255\255\016\001\017\001\018\001\019\001\ -\020\001\021\001\255\255\255\255\024\001\025\001\026\001\027\001\ -\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\036\001\037\001\255\255\255\255\040\001\041\001\042\001\255\255\ -\255\255\255\255\255\255\255\255\048\001\049\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\060\001\061\001\255\255\063\001\255\255\255\255\255\255\067\001\ -\068\001\000\000\070\001\255\255\255\255\073\001\074\001\255\255\ -\255\255\255\255\255\255\255\255\080\001\255\255\082\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\091\001\ -\092\001\255\255\094\001\095\001\096\001\097\001\255\255\255\255\ -\255\255\255\255\255\255\103\001\255\255\105\001\255\255\255\255\ -\108\001\255\255\255\255\111\001\255\255\255\255\255\255\115\001\ -\255\255\000\001\001\001\002\001\003\001\255\255\255\255\255\255\ -\255\255\008\001\009\001\010\001\255\255\255\255\013\001\014\001\ -\255\255\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ -\255\255\024\001\025\001\026\001\027\001\028\001\029\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\036\001\037\001\255\255\ -\255\255\040\001\041\001\042\001\255\255\255\255\255\255\255\255\ -\255\255\048\001\049\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\000\000\255\255\255\255\255\255\060\001\061\001\255\255\ -\063\001\255\255\255\255\255\255\067\001\068\001\255\255\070\001\ -\255\255\255\255\073\001\074\001\255\255\255\255\255\255\255\255\ -\255\255\080\001\255\255\082\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\091\001\092\001\255\255\094\001\ -\095\001\096\001\097\001\255\255\255\255\255\255\255\255\255\255\ -\103\001\000\001\105\001\255\255\003\001\108\001\255\255\255\255\ -\111\001\008\001\009\001\010\001\115\001\255\255\013\001\014\001\ -\255\255\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ -\255\255\024\001\025\001\026\001\255\255\028\001\029\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\037\001\255\255\ -\255\255\040\001\041\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\048\001\049\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\000\000\255\255\255\255\255\255\060\001\255\255\255\255\ -\063\001\255\255\255\255\255\255\067\001\068\001\255\255\070\001\ -\255\255\255\255\073\001\074\001\255\255\255\255\255\255\255\255\ -\255\255\080\001\255\255\082\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\091\001\092\001\255\255\094\001\ -\095\001\096\001\097\001\255\255\255\255\255\255\255\255\255\255\ -\103\001\000\001\105\001\255\255\003\001\108\001\255\255\255\255\ -\111\001\008\001\009\001\010\001\115\001\255\255\013\001\014\001\ -\255\255\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ -\255\255\024\001\025\001\026\001\255\255\028\001\029\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\037\001\255\255\ -\255\255\040\001\041\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\048\001\049\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\000\000\255\255\255\255\255\255\060\001\255\255\255\255\ -\063\001\255\255\255\255\255\255\067\001\068\001\255\255\070\001\ -\255\255\255\255\073\001\074\001\255\255\255\255\255\255\255\255\ -\255\255\080\001\255\255\082\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\091\001\092\001\255\255\094\001\ -\095\001\096\001\097\001\255\255\255\255\255\255\255\255\255\255\ -\103\001\000\001\105\001\255\255\003\001\108\001\255\255\255\255\ -\111\001\008\001\255\255\010\001\115\001\255\255\013\001\014\001\ -\255\255\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ -\255\255\024\001\025\001\026\001\255\255\028\001\029\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\037\001\255\255\ -\255\255\040\001\041\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\048\001\049\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\000\000\255\255\255\255\255\255\060\001\255\255\255\255\ -\063\001\255\255\255\255\255\255\067\001\068\001\255\255\070\001\ -\255\255\255\255\073\001\074\001\255\255\255\255\255\255\255\255\ -\255\255\080\001\255\255\255\255\255\255\255\255\255\255\000\000\ -\255\255\255\255\255\255\255\255\091\001\092\001\255\255\094\001\ -\095\001\096\001\097\001\255\255\255\255\255\255\255\255\255\255\ -\103\001\000\001\105\001\255\255\003\001\108\001\255\255\255\255\ -\111\001\008\001\255\255\010\001\115\001\255\255\013\001\014\001\ -\255\255\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ -\255\255\024\001\025\001\026\001\255\255\028\001\029\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\037\001\255\255\ -\255\255\040\001\041\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\048\001\049\001\255\255\000\000\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\060\001\255\255\255\255\ -\063\001\255\255\255\255\255\255\067\001\068\001\255\255\070\001\ -\255\255\255\255\073\001\074\001\255\255\255\255\255\255\255\255\ -\255\255\080\001\000\000\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\091\001\092\001\255\255\094\001\ -\095\001\096\001\097\001\255\255\255\255\255\255\255\255\255\255\ -\103\001\000\001\105\001\255\255\003\001\108\001\255\255\255\255\ -\111\001\008\001\255\255\010\001\115\001\255\255\013\001\014\001\ -\255\255\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ -\255\255\024\001\025\001\026\001\255\255\028\001\029\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\037\001\255\255\ -\255\255\040\001\041\001\255\255\255\255\255\255\255\255\000\000\ -\255\255\048\001\049\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\060\001\255\255\255\255\ -\063\001\255\255\255\255\255\255\067\001\068\001\255\255\070\001\ -\255\255\255\255\073\001\074\001\255\255\255\255\255\255\255\255\ -\255\255\080\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\091\001\092\001\255\255\094\001\ -\095\001\096\001\097\001\255\255\255\255\255\255\255\255\255\255\ -\103\001\000\001\105\001\255\255\003\001\108\001\255\255\255\255\ -\111\001\008\001\255\255\010\001\115\001\255\255\013\001\014\001\ -\255\255\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ -\255\255\024\001\025\001\026\001\255\255\028\001\029\001\000\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\037\001\255\255\ -\255\255\040\001\041\001\255\255\013\001\255\255\255\255\000\000\ -\023\001\048\001\049\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\026\001\255\255\028\001\029\001\060\001\255\255\255\255\ -\063\001\255\255\255\255\255\255\067\001\068\001\255\255\070\001\ -\041\001\255\255\073\001\074\001\255\255\000\000\255\255\255\255\ -\055\001\080\001\057\001\058\001\059\001\255\255\061\001\255\255\ -\255\255\064\001\065\001\060\001\091\001\092\001\063\001\094\001\ -\095\001\096\001\097\001\068\001\000\001\255\255\255\255\003\001\ -\103\001\074\001\105\001\255\255\008\001\108\001\010\001\080\001\ -\111\001\013\001\014\001\090\001\115\001\017\001\255\255\019\001\ -\020\001\021\001\097\001\092\001\024\001\025\001\026\001\096\001\ -\028\001\029\001\000\001\255\255\255\255\003\001\109\001\110\001\ -\255\255\037\001\255\255\108\001\040\001\041\001\111\001\013\001\ -\255\255\255\255\000\000\255\255\048\001\049\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\026\001\255\255\028\001\029\001\ -\060\001\255\255\255\255\063\001\255\255\255\255\255\255\067\001\ -\068\001\255\255\070\001\041\001\255\255\073\001\074\001\255\255\ -\000\000\053\001\255\255\055\001\080\001\057\001\058\001\059\001\ -\255\255\061\001\255\255\255\255\064\001\065\001\060\001\091\001\ -\092\001\255\255\094\001\095\001\096\001\097\001\068\001\000\001\ -\255\255\255\255\003\001\103\001\074\001\105\001\255\255\008\001\ -\108\001\010\001\080\001\111\001\013\001\014\001\090\001\115\001\ -\017\001\255\255\019\001\020\001\021\001\097\001\092\001\024\001\ -\025\001\026\001\096\001\028\001\029\001\255\255\255\255\255\255\ -\255\255\109\001\110\001\255\255\037\001\255\255\108\001\040\001\ -\041\001\111\001\255\255\255\255\255\255\000\000\255\255\048\001\ -\049\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\060\001\255\255\255\255\063\001\255\255\ -\255\255\255\255\067\001\068\001\255\255\070\001\255\255\255\255\ -\073\001\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\091\001\092\001\255\255\094\001\095\001\096\001\ -\097\001\255\255\255\255\255\255\255\255\255\255\103\001\000\001\ -\105\001\255\255\003\001\108\001\255\255\255\255\111\001\008\001\ -\255\255\010\001\115\001\255\255\013\001\014\001\255\255\255\255\ -\017\001\255\255\019\001\020\001\021\001\255\255\255\255\024\001\ -\025\001\026\001\255\255\028\001\029\001\000\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\037\001\255\255\255\255\040\001\ -\041\001\255\255\013\001\255\255\255\255\000\000\255\255\048\001\ -\049\001\255\255\255\255\255\255\255\255\255\255\255\255\026\001\ -\255\255\028\001\029\001\060\001\255\255\255\255\063\001\255\255\ -\255\255\255\255\067\001\068\001\255\255\070\001\041\001\255\255\ -\073\001\074\001\255\255\000\000\255\255\255\255\055\001\080\001\ -\057\001\058\001\059\001\255\255\061\001\255\255\255\255\064\001\ -\065\001\060\001\091\001\092\001\255\255\094\001\095\001\096\001\ -\097\001\068\001\000\001\255\255\255\255\003\001\103\001\074\001\ -\105\001\255\255\008\001\108\001\010\001\080\001\111\001\013\001\ -\014\001\090\001\115\001\017\001\255\255\019\001\020\001\021\001\ -\097\001\092\001\024\001\025\001\026\001\096\001\028\001\029\001\ -\000\001\255\255\255\255\255\255\109\001\110\001\255\255\037\001\ -\255\255\108\001\040\001\041\001\111\001\013\001\255\255\255\255\ -\000\000\255\255\048\001\049\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\026\001\255\255\028\001\029\001\060\001\255\255\ -\255\255\063\001\255\255\255\255\255\255\067\001\068\001\255\255\ -\070\001\041\001\255\255\073\001\074\001\255\255\000\000\255\255\ -\255\255\255\255\080\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\060\001\091\001\092\001\255\255\ -\094\001\095\001\096\001\097\001\068\001\000\001\255\255\255\255\ -\003\001\103\001\074\001\105\001\255\255\008\001\108\001\010\001\ -\080\001\111\001\013\001\014\001\255\255\115\001\017\001\255\255\ -\019\001\020\001\021\001\255\255\092\001\024\001\025\001\026\001\ -\096\001\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\037\001\255\255\108\001\040\001\041\001\111\001\ -\255\255\255\255\255\255\000\000\255\255\048\001\049\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\060\001\255\255\255\255\063\001\255\255\255\255\255\255\ -\067\001\068\001\255\255\070\001\255\255\255\255\073\001\074\001\ -\255\255\255\255\255\255\255\255\255\255\080\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\091\001\092\001\255\255\094\001\095\001\096\001\097\001\255\255\ -\255\255\255\255\255\255\255\255\103\001\000\001\105\001\255\255\ -\003\001\108\001\255\255\255\255\111\001\008\001\255\255\010\001\ -\115\001\255\255\013\001\014\001\255\255\255\255\017\001\255\255\ -\019\001\020\001\021\001\255\255\255\255\024\001\025\001\026\001\ -\255\255\028\001\029\001\000\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\037\001\255\255\255\255\040\001\041\001\255\255\ -\013\001\255\255\255\255\000\000\255\255\048\001\049\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\026\001\255\255\028\001\ -\029\001\060\001\255\255\255\255\063\001\255\255\255\255\255\255\ -\067\001\068\001\255\255\070\001\041\001\255\255\073\001\074\001\ -\255\255\000\000\255\255\255\255\255\255\080\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\060\001\ -\091\001\092\001\255\255\094\001\095\001\096\001\097\001\068\001\ -\000\001\255\255\255\255\003\001\103\001\074\001\105\001\255\255\ -\008\001\108\001\010\001\080\001\111\001\013\001\014\001\255\255\ -\115\001\017\001\255\255\019\001\020\001\021\001\255\255\092\001\ -\024\001\025\001\026\001\096\001\028\001\029\001\000\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\037\001\255\255\108\001\ -\040\001\041\001\111\001\013\001\255\255\255\255\000\000\255\255\ -\048\001\049\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\026\001\255\255\028\001\029\001\060\001\255\255\255\255\063\001\ -\255\255\255\255\255\255\067\001\068\001\255\255\070\001\041\001\ -\255\255\073\001\074\001\255\255\255\255\255\255\255\255\255\255\ -\080\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\060\001\091\001\092\001\255\255\094\001\095\001\ -\096\001\097\001\068\001\000\001\255\255\255\255\003\001\103\001\ -\074\001\105\001\255\255\008\001\108\001\010\001\080\001\111\001\ -\013\001\014\001\255\255\115\001\017\001\255\255\019\001\020\001\ -\021\001\255\255\092\001\024\001\025\001\026\001\096\001\028\001\ -\029\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\037\001\255\255\108\001\040\001\041\001\111\001\255\255\255\255\ -\255\255\000\000\255\255\048\001\049\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\060\001\ -\255\255\255\255\063\001\255\255\255\255\255\255\067\001\068\001\ -\255\255\070\001\255\255\255\255\073\001\074\001\255\255\255\255\ -\255\255\255\255\255\255\080\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\091\001\092\001\ -\255\255\094\001\095\001\096\001\097\001\255\255\255\255\255\255\ -\255\255\255\255\103\001\000\001\105\001\255\255\003\001\108\001\ -\255\255\255\255\111\001\008\001\255\255\010\001\115\001\255\255\ -\013\001\014\001\255\255\255\255\017\001\255\255\019\001\020\001\ -\021\001\255\255\255\255\024\001\025\001\026\001\255\255\028\001\ -\029\001\000\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\037\001\255\255\255\255\040\001\041\001\255\255\013\001\255\255\ -\255\255\000\000\255\255\048\001\049\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\026\001\255\255\028\001\029\001\060\001\ -\255\255\255\255\063\001\255\255\255\255\255\255\067\001\068\001\ -\255\255\070\001\041\001\255\255\073\001\074\001\255\255\255\255\ -\255\255\255\255\255\255\080\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\060\001\091\001\092\001\ -\255\255\094\001\095\001\096\001\097\001\068\001\000\001\255\255\ -\255\255\003\001\103\001\074\001\105\001\255\255\008\001\108\001\ -\010\001\080\001\111\001\013\001\014\001\255\255\115\001\017\001\ -\255\255\019\001\020\001\021\001\255\255\092\001\024\001\025\001\ -\026\001\096\001\028\001\029\001\006\001\255\255\008\001\255\255\ -\255\255\255\255\255\255\037\001\255\255\108\001\040\001\041\001\ -\111\001\255\255\255\255\255\255\000\000\255\255\048\001\049\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\060\001\255\255\255\255\063\001\255\255\255\255\ -\255\255\067\001\068\001\255\255\070\001\255\255\255\255\073\001\ -\074\001\255\255\255\255\255\255\255\255\055\001\080\001\057\001\ -\058\001\059\001\255\255\061\001\255\255\255\255\064\001\065\001\ -\255\255\091\001\092\001\255\255\094\001\095\001\096\001\097\001\ -\255\255\000\001\255\255\255\255\003\001\103\001\255\255\105\001\ -\255\255\008\001\108\001\010\001\255\255\111\001\013\001\014\001\ -\090\001\115\001\017\001\255\255\019\001\020\001\021\001\097\001\ -\255\255\024\001\025\001\026\001\255\255\028\001\029\001\255\255\ -\255\255\255\255\255\255\109\001\110\001\255\255\037\001\255\255\ -\255\255\040\001\041\001\255\255\255\255\255\255\255\255\000\000\ -\255\255\048\001\049\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\060\001\255\255\255\255\ -\063\001\255\255\255\255\255\255\067\001\068\001\255\255\070\001\ -\255\255\255\255\073\001\074\001\255\255\255\255\255\255\255\255\ -\255\255\080\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\091\001\092\001\255\255\094\001\ -\095\001\096\001\097\001\255\255\255\255\255\255\255\255\255\255\ -\103\001\000\001\105\001\255\255\003\001\108\001\255\255\255\255\ -\111\001\008\001\255\255\010\001\115\001\255\255\013\001\014\001\ -\255\255\255\255\017\001\255\255\019\001\020\001\021\001\255\255\ -\255\255\024\001\025\001\026\001\255\255\028\001\029\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\037\001\255\255\ -\255\255\040\001\041\001\255\255\255\255\255\255\255\255\000\000\ -\255\255\048\001\049\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\060\001\255\255\255\255\ -\063\001\255\255\255\255\255\255\067\001\068\001\255\255\070\001\ -\255\255\255\255\073\001\074\001\255\255\255\255\255\255\255\255\ -\255\255\080\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\091\001\092\001\255\255\094\001\ -\095\001\096\001\097\001\255\255\000\001\255\255\255\255\003\001\ -\103\001\255\255\105\001\255\255\008\001\108\001\010\001\255\255\ -\111\001\013\001\014\001\255\255\115\001\017\001\255\255\019\001\ -\020\001\021\001\255\255\255\255\024\001\025\001\026\001\255\255\ -\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\037\001\255\255\255\255\040\001\041\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\048\001\049\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\000\000\255\255\255\255\ -\060\001\255\255\255\255\063\001\255\255\255\255\255\255\067\001\ -\068\001\255\255\070\001\255\255\255\255\073\001\074\001\255\255\ -\255\255\255\255\255\255\255\255\080\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\091\001\ -\092\001\255\255\094\001\095\001\096\001\097\001\255\255\000\001\ -\255\255\255\255\003\001\103\001\255\255\105\001\255\255\008\001\ -\108\001\010\001\255\255\111\001\013\001\014\001\255\255\115\001\ -\017\001\255\255\019\001\020\001\021\001\255\255\255\255\024\001\ -\025\001\026\001\255\255\028\001\029\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\037\001\255\255\255\255\040\001\ -\041\001\255\255\255\255\255\255\255\255\255\255\255\255\048\001\ -\049\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\000\000\255\255\255\255\060\001\255\255\255\255\063\001\255\255\ -\255\255\255\255\067\001\068\001\255\255\070\001\255\255\255\255\ -\073\001\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\091\001\092\001\255\255\094\001\255\255\096\001\ -\097\001\255\255\255\255\255\255\255\255\255\255\103\001\000\001\ -\105\001\255\255\003\001\108\001\255\255\255\255\111\001\008\001\ -\255\255\010\001\115\001\255\255\013\001\014\001\255\255\255\255\ -\017\001\255\255\019\001\020\001\021\001\255\255\255\255\024\001\ -\255\255\026\001\255\255\028\001\029\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\037\001\255\255\255\255\040\001\ -\041\001\255\255\255\255\255\255\255\255\255\255\255\255\048\001\ -\049\001\255\255\255\255\000\000\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\060\001\255\255\255\255\063\001\255\255\ -\255\255\255\255\067\001\068\001\255\255\070\001\255\255\255\255\ -\073\001\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\091\001\092\001\255\255\094\001\095\001\096\001\ -\097\001\255\255\255\255\255\255\255\255\255\255\103\001\255\255\ -\105\001\255\255\255\255\108\001\255\255\000\001\111\001\002\001\ -\003\001\004\001\115\001\255\255\255\255\008\001\255\255\255\255\ -\255\255\255\255\013\001\255\255\255\255\255\255\017\001\018\001\ -\019\001\255\255\255\255\255\255\255\255\000\001\255\255\026\001\ -\027\001\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\036\001\255\255\255\255\255\255\040\001\041\001\255\255\ -\000\000\255\255\255\255\255\255\255\255\048\001\049\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\060\001\255\255\255\255\063\001\255\255\255\255\066\001\ -\067\001\068\001\255\255\070\001\255\255\255\255\073\001\074\001\ -\255\255\255\255\255\255\255\255\055\001\080\001\057\001\058\001\ -\059\001\255\255\061\001\255\255\255\255\064\001\065\001\255\255\ -\091\001\092\001\255\255\094\001\095\001\096\001\255\255\255\255\ -\000\001\100\001\002\001\003\001\004\001\255\255\081\001\255\255\ -\008\001\108\001\255\255\255\255\111\001\013\001\089\001\090\001\ -\115\001\017\001\018\001\019\001\255\255\255\255\097\001\255\255\ -\255\255\255\255\026\001\027\001\028\001\029\001\255\255\255\255\ -\008\001\255\255\109\001\110\001\036\001\255\255\255\255\255\255\ -\255\255\041\001\255\255\000\000\255\255\255\255\255\255\023\001\ -\048\001\049\001\255\255\255\255\255\255\255\255\030\001\255\255\ -\255\255\255\255\255\255\255\255\060\001\255\255\255\255\063\001\ -\255\255\255\255\066\001\067\001\068\001\255\255\070\001\255\255\ -\255\255\073\001\074\001\255\255\255\255\255\255\255\255\055\001\ -\080\001\057\001\058\001\059\001\255\255\061\001\255\255\255\255\ -\064\001\065\001\255\255\091\001\092\001\255\255\094\001\095\001\ -\096\001\097\001\255\255\000\001\255\255\002\001\003\001\004\001\ -\255\255\081\001\255\255\008\001\108\001\255\255\255\255\111\001\ -\013\001\089\001\090\001\115\001\017\001\018\001\019\001\255\255\ -\255\255\097\001\255\255\255\255\255\255\026\001\027\001\028\001\ -\029\001\255\255\106\001\255\255\255\255\109\001\110\001\036\001\ -\255\255\255\255\255\255\255\255\041\001\255\255\000\000\255\255\ -\255\255\255\255\255\255\048\001\049\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\060\001\ -\255\255\255\255\063\001\255\255\255\255\066\001\067\001\068\001\ -\255\255\070\001\255\255\255\255\255\255\074\001\255\255\255\255\ -\255\255\255\255\255\255\080\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\091\001\092\001\ -\255\255\094\001\095\001\096\001\097\001\255\255\255\255\255\255\ -\000\001\255\255\002\001\003\001\004\001\255\255\255\255\108\001\ -\008\001\255\255\111\001\255\255\255\255\013\001\115\001\255\255\ -\255\255\017\001\018\001\019\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\026\001\027\001\028\001\029\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\036\001\255\255\255\255\255\255\ -\255\255\041\001\255\255\000\000\255\255\255\255\255\255\255\255\ -\048\001\049\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\060\001\255\255\255\255\063\001\ -\255\255\255\255\066\001\067\001\068\001\255\255\070\001\255\255\ -\255\255\255\255\074\001\255\255\255\255\255\255\255\255\055\001\ -\080\001\057\001\058\001\059\001\255\255\061\001\255\255\255\255\ -\064\001\065\001\255\255\091\001\092\001\255\255\094\001\095\001\ -\096\001\097\001\074\001\000\001\255\255\002\001\003\001\004\001\ -\255\255\081\001\255\255\008\001\108\001\255\255\255\255\111\001\ -\013\001\089\001\090\001\115\001\017\001\018\001\019\001\000\000\ -\255\255\097\001\255\255\255\255\255\255\026\001\027\001\028\001\ -\029\001\255\255\255\255\255\255\255\255\109\001\110\001\036\001\ -\255\255\255\255\255\255\255\255\041\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\048\001\049\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\060\001\ -\255\255\255\255\063\001\255\255\255\255\066\001\067\001\068\001\ -\255\255\070\001\255\255\255\255\255\255\074\001\255\255\255\255\ -\255\255\000\000\055\001\080\001\057\001\058\001\059\001\255\255\ -\061\001\255\255\255\255\064\001\065\001\255\255\091\001\092\001\ -\255\255\094\001\095\001\096\001\097\001\255\255\000\001\255\255\ -\002\001\003\001\004\001\255\255\081\001\255\255\008\001\108\001\ -\255\255\255\255\111\001\013\001\089\001\090\001\115\001\017\001\ -\018\001\019\001\255\255\255\255\097\001\255\255\255\255\255\255\ -\026\001\027\001\028\001\029\001\255\255\255\255\255\255\108\001\ -\109\001\110\001\036\001\000\000\255\255\255\255\255\255\041\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\048\001\049\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\060\001\255\255\255\255\063\001\255\255\255\255\ -\066\001\067\001\068\001\255\255\070\001\255\255\255\255\255\255\ -\074\001\255\255\255\255\255\255\255\255\255\255\080\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\091\001\092\001\255\255\094\001\095\001\096\001\097\001\ -\255\255\000\000\255\255\000\001\255\255\002\001\003\001\255\255\ -\255\255\255\255\108\001\008\001\255\255\111\001\255\255\255\255\ -\013\001\115\001\255\255\255\255\017\001\018\001\019\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\026\001\027\001\028\001\ -\029\001\255\255\255\255\255\255\255\255\255\255\255\255\036\001\ -\255\255\255\255\255\255\255\255\041\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\048\001\049\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\000\000\255\255\255\255\255\255\060\001\ -\255\255\255\255\063\001\255\255\255\255\066\001\067\001\068\001\ -\255\255\070\001\255\255\255\255\006\001\074\001\008\001\000\001\ -\255\255\255\255\003\001\080\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\013\001\255\255\091\001\092\001\ -\017\001\094\001\095\001\096\001\097\001\255\255\255\255\255\255\ -\255\255\026\001\027\001\028\001\029\001\255\255\255\255\108\001\ -\255\255\255\255\111\001\255\255\255\255\255\255\115\001\255\255\ -\041\001\255\255\255\255\255\255\255\255\055\001\255\255\057\001\ -\058\001\059\001\255\255\061\001\255\255\255\255\064\001\065\001\ -\255\255\000\001\255\255\060\001\003\001\255\255\063\001\255\255\ -\255\255\066\001\067\001\068\001\255\255\255\255\013\001\255\255\ -\073\001\074\001\017\001\255\255\255\255\255\255\255\255\080\001\ -\090\001\255\255\092\001\026\001\027\001\028\001\029\001\097\001\ -\255\255\255\255\255\255\092\001\000\000\094\001\255\255\096\001\ -\097\001\255\255\041\001\109\001\110\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\108\001\255\255\255\255\111\001\255\255\ -\255\255\255\255\115\001\000\001\255\255\060\001\003\001\255\255\ -\063\001\255\255\255\255\066\001\067\001\068\001\255\255\255\255\ -\013\001\255\255\073\001\074\001\017\001\255\255\255\255\255\255\ -\255\255\080\001\255\255\255\255\255\255\026\001\027\001\028\001\ -\029\001\255\255\255\255\255\255\255\255\092\001\255\255\094\001\ -\255\255\096\001\097\001\255\255\041\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\108\001\255\255\255\255\ -\111\001\255\255\255\255\255\255\115\001\255\255\255\255\060\001\ -\255\255\000\001\063\001\255\255\003\001\066\001\067\001\068\001\ -\255\255\255\255\255\255\255\255\073\001\074\001\013\001\255\255\ -\255\255\255\255\017\001\080\001\019\001\255\255\255\255\255\255\ -\255\255\255\255\000\000\026\001\027\001\028\001\029\001\092\001\ -\255\255\094\001\255\255\096\001\097\001\255\255\255\255\255\255\ -\255\255\255\255\041\001\255\255\255\255\255\255\255\255\108\001\ -\255\255\255\255\111\001\255\255\255\255\255\255\115\001\255\255\ -\255\255\255\255\255\255\000\001\255\255\060\001\003\001\255\255\ -\063\001\255\255\255\255\255\255\067\001\068\001\255\255\255\255\ -\013\001\255\255\073\001\074\001\017\001\255\255\255\255\255\255\ -\255\255\080\001\255\255\255\255\255\255\026\001\027\001\028\001\ -\029\001\255\255\255\255\255\255\255\255\092\001\255\255\094\001\ -\255\255\096\001\097\001\255\255\041\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\108\001\255\255\255\255\ -\111\001\000\000\255\255\255\255\115\001\255\255\255\255\060\001\ -\255\255\255\255\063\001\255\255\255\255\255\255\067\001\068\001\ -\255\255\255\255\255\255\255\255\073\001\074\001\055\001\255\255\ -\057\001\058\001\059\001\080\001\061\001\255\255\063\001\064\001\ -\065\001\255\255\255\255\255\255\255\255\255\255\255\255\092\001\ -\255\255\094\001\255\255\096\001\097\001\078\001\255\255\255\255\ -\081\001\255\255\255\255\255\255\255\255\255\255\255\255\108\001\ -\089\001\090\001\111\001\255\255\000\001\255\255\115\001\003\001\ -\097\001\005\001\006\001\007\001\008\001\255\255\255\255\011\001\ -\012\001\013\001\255\255\255\255\109\001\110\001\255\255\019\001\ -\255\255\255\255\255\255\023\001\255\255\255\255\026\001\255\255\ -\028\001\029\001\030\001\031\001\032\001\033\001\034\001\035\001\ -\036\001\255\255\255\255\039\001\040\001\041\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\048\001\049\001\050\001\051\001\ -\052\001\053\001\054\001\055\001\056\001\057\001\058\001\059\001\ -\060\001\061\001\000\000\063\001\064\001\065\001\255\255\067\001\ -\068\001\069\001\070\001\071\001\072\001\255\255\074\001\075\001\ -\076\001\077\001\078\001\255\255\080\001\081\001\255\255\255\255\ -\084\001\085\001\255\255\087\001\088\001\089\001\090\001\091\001\ -\092\001\093\001\255\255\095\001\096\001\097\001\255\255\099\001\ -\255\255\101\001\102\001\255\255\104\001\255\255\106\001\107\001\ -\108\001\109\001\110\001\111\001\112\001\255\255\114\001\005\001\ -\006\001\007\001\255\255\255\255\255\255\011\001\012\001\013\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\028\001\029\001\ -\030\001\031\001\032\001\033\001\034\001\255\255\255\255\255\255\ -\255\255\039\001\255\255\041\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\050\001\255\255\052\001\053\001\ -\054\001\055\001\056\001\255\255\255\255\059\001\060\001\255\255\ -\255\255\063\001\064\001\065\001\255\255\000\000\068\001\069\001\ -\255\255\071\001\072\001\255\255\074\001\255\255\076\001\255\255\ -\078\001\255\255\080\001\255\255\255\255\255\255\084\001\085\001\ -\255\255\087\001\255\255\255\255\255\255\255\255\005\001\006\001\ -\007\001\255\255\096\001\097\001\011\001\012\001\013\001\101\001\ -\255\255\255\255\255\255\255\255\106\001\107\001\108\001\109\001\ -\110\001\111\001\255\255\255\255\114\001\028\001\029\001\030\001\ -\031\001\032\001\033\001\034\001\255\255\255\255\255\255\255\255\ -\039\001\255\255\041\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\050\001\255\255\052\001\053\001\054\001\ -\055\001\056\001\255\255\255\255\059\001\060\001\255\255\255\255\ -\063\001\064\001\065\001\255\255\255\255\068\001\069\001\255\255\ -\071\001\072\001\255\255\074\001\255\255\076\001\255\255\078\001\ -\255\255\080\001\255\255\000\000\255\255\084\001\085\001\255\255\ -\087\001\000\000\055\001\255\255\057\001\058\001\059\001\255\255\ -\061\001\255\255\097\001\064\001\065\001\255\255\101\001\255\255\ -\255\255\255\255\255\255\106\001\107\001\108\001\109\001\110\001\ -\111\001\255\255\255\255\114\001\081\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\089\001\090\001\255\255\005\001\ -\006\001\007\001\255\255\255\255\097\001\011\001\012\001\013\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\109\001\110\001\255\255\255\255\255\255\255\255\028\001\029\001\ -\030\001\031\001\032\001\033\001\034\001\255\255\255\255\255\255\ -\255\255\039\001\255\255\041\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\050\001\255\255\052\001\053\001\ -\054\001\055\001\056\001\255\255\255\255\059\001\060\001\255\255\ -\255\255\063\001\064\001\065\001\255\255\255\255\068\001\069\001\ -\255\255\071\001\072\001\255\255\074\001\000\000\076\001\255\255\ -\078\001\255\255\080\001\255\255\255\255\255\255\084\001\085\001\ -\255\255\087\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\097\001\255\255\255\255\255\255\101\001\ -\255\255\255\255\255\255\255\255\106\001\107\001\108\001\109\001\ -\110\001\111\001\255\255\255\255\114\001\000\001\255\255\255\255\ -\255\255\004\001\255\255\006\001\255\255\008\001\255\255\010\001\ -\255\255\012\001\255\255\014\001\015\001\255\255\017\001\018\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\027\001\028\001\255\255\030\001\031\001\000\000\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\050\001\ -\051\001\052\001\053\001\255\255\055\001\056\001\255\255\255\255\ -\059\001\255\255\255\255\255\255\255\255\064\001\065\001\066\001\ -\255\255\255\255\255\255\255\255\071\001\255\255\073\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\081\001\255\255\ -\255\255\084\001\255\255\255\255\255\255\255\255\089\001\000\000\ -\091\001\092\001\255\255\094\001\095\001\255\255\097\001\255\255\ -\255\255\255\255\101\001\000\001\255\255\104\001\255\255\106\001\ -\255\255\000\001\109\001\110\001\255\255\004\001\113\001\006\001\ -\013\001\008\001\255\255\010\001\255\255\012\001\255\255\014\001\ -\015\001\255\255\017\001\018\001\255\255\026\001\255\255\028\001\ -\029\001\255\255\255\255\255\255\027\001\255\255\255\255\030\001\ -\031\001\255\255\255\255\255\255\041\001\255\255\255\255\255\255\ -\255\255\000\000\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\050\001\051\001\255\255\053\001\060\001\ -\055\001\056\001\255\255\255\255\059\001\255\255\067\001\068\001\ -\255\255\064\001\065\001\066\001\255\255\074\001\255\255\255\255\ -\071\001\255\255\073\001\080\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\081\001\255\255\255\255\084\001\255\255\092\001\ -\255\255\255\255\089\001\096\001\091\001\092\001\255\255\094\001\ -\095\001\255\255\097\001\000\000\255\255\255\255\101\001\108\001\ -\255\255\104\001\111\001\106\001\255\255\000\001\109\001\110\001\ -\003\001\004\001\113\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\013\001\014\001\255\255\255\255\255\255\255\255\ -\019\001\255\255\255\255\255\255\255\255\255\255\255\255\026\001\ -\255\255\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\041\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\048\001\049\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\060\001\255\255\255\255\063\001\255\255\255\255\066\001\ -\067\001\068\001\255\255\070\001\255\255\000\001\255\255\074\001\ -\003\001\004\001\000\000\255\255\255\255\080\001\255\255\255\255\ -\255\255\255\255\013\001\014\001\255\255\255\255\255\255\255\255\ -\019\001\092\001\255\255\094\001\255\255\096\001\097\001\026\001\ -\255\255\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\108\001\255\255\255\255\111\001\255\255\041\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\048\001\049\001\255\255\ -\255\255\255\255\255\255\000\000\255\255\255\255\255\255\000\001\ -\255\255\060\001\003\001\004\001\063\001\255\255\255\255\066\001\ -\067\001\068\001\255\255\070\001\013\001\014\001\255\255\074\001\ -\255\255\255\255\019\001\255\255\255\255\080\001\255\255\255\255\ -\255\255\026\001\255\255\028\001\029\001\255\255\255\255\255\255\ -\255\255\092\001\255\255\094\001\255\255\096\001\097\001\255\255\ -\041\001\255\255\255\255\255\255\255\255\000\000\255\255\048\001\ -\049\001\108\001\255\255\255\255\111\001\255\255\255\255\255\255\ -\255\255\000\001\255\255\060\001\003\001\004\001\063\001\255\255\ -\255\255\255\255\067\001\068\001\255\255\070\001\013\001\014\001\ -\255\255\074\001\255\255\255\255\019\001\255\255\255\255\080\001\ -\255\255\255\255\255\255\026\001\255\255\028\001\029\001\255\255\ -\255\255\255\255\255\255\092\001\255\255\094\001\255\255\096\001\ -\097\001\255\255\041\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\048\001\049\001\108\001\255\255\255\255\111\001\255\255\ -\255\255\255\255\255\255\000\001\255\255\060\001\003\001\004\001\ -\063\001\000\000\255\255\255\255\067\001\068\001\255\255\070\001\ -\013\001\014\001\255\255\074\001\255\255\255\255\019\001\255\255\ -\255\255\080\001\255\255\255\255\255\255\026\001\255\255\028\001\ -\029\001\255\255\255\255\255\255\255\255\092\001\255\255\094\001\ -\255\255\096\001\097\001\255\255\041\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\048\001\049\001\108\001\255\255\255\255\ -\111\001\255\255\255\255\255\255\255\255\255\255\255\255\060\001\ -\255\255\255\255\063\001\000\000\255\255\255\255\067\001\068\001\ -\255\255\070\001\255\255\255\255\255\255\074\001\055\001\255\255\ -\057\001\058\001\059\001\080\001\061\001\255\255\255\255\064\001\ -\065\001\255\255\000\001\255\255\255\255\003\001\255\255\092\001\ -\255\255\094\001\008\001\096\001\097\001\255\255\255\255\013\001\ -\081\001\255\255\255\255\255\255\255\255\019\001\255\255\108\001\ -\089\001\090\001\111\001\255\255\026\001\255\255\028\001\029\001\ -\097\001\255\255\255\255\255\255\255\255\000\000\255\255\255\255\ -\255\255\255\255\040\001\041\001\109\001\110\001\255\255\255\255\ -\255\255\255\255\255\255\000\001\255\255\255\255\003\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\060\001\255\255\ -\013\001\063\001\255\255\255\255\066\001\067\001\068\001\255\255\ -\255\255\255\255\255\255\073\001\074\001\026\001\027\001\028\001\ -\029\001\255\255\080\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\041\001\255\255\092\001\000\000\ -\255\255\255\255\096\001\097\001\255\255\000\001\100\001\255\255\ -\003\001\255\255\255\255\255\255\255\255\255\255\108\001\060\001\ -\255\255\111\001\013\001\064\001\255\255\066\001\067\001\068\001\ -\255\255\255\255\255\255\255\255\073\001\074\001\255\255\026\001\ -\027\001\028\001\029\001\080\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\041\001\092\001\ -\255\255\094\001\255\255\096\001\097\001\255\255\255\255\100\001\ -\255\255\000\000\255\255\255\255\255\255\255\255\255\255\108\001\ -\109\001\060\001\111\001\255\255\255\255\064\001\255\255\066\001\ -\067\001\068\001\255\255\255\255\255\255\255\255\073\001\074\001\ -\255\255\000\001\255\255\255\255\003\001\080\001\255\255\255\255\ -\255\255\008\001\255\255\255\255\255\255\255\255\013\001\255\255\ -\255\255\092\001\255\255\094\001\019\001\096\001\097\001\255\255\ -\255\255\100\001\000\000\026\001\255\255\028\001\029\001\255\255\ -\255\255\108\001\109\001\255\255\111\001\255\255\255\255\255\255\ -\255\255\040\001\041\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\000\001\255\255\060\001\003\001\255\255\ -\063\001\255\255\255\255\066\001\067\001\068\001\255\255\255\255\ -\013\001\255\255\073\001\074\001\255\255\255\255\019\001\000\000\ -\255\255\080\001\255\255\255\255\255\255\026\001\027\001\028\001\ -\029\001\255\255\255\255\255\255\255\255\092\001\255\255\255\255\ -\255\255\096\001\097\001\255\255\041\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\048\001\255\255\108\001\255\255\255\255\ -\111\001\255\255\255\255\255\255\255\255\000\001\255\255\060\001\ -\003\001\255\255\063\001\255\255\255\255\255\255\067\001\068\001\ -\255\255\070\001\013\001\255\255\000\000\074\001\255\255\255\255\ -\019\001\255\255\255\255\080\001\255\255\255\255\255\255\026\001\ -\255\255\028\001\029\001\255\255\255\255\255\255\255\255\092\001\ -\255\255\094\001\255\255\096\001\097\001\040\001\041\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\048\001\049\001\108\001\ -\255\255\255\255\111\001\255\255\255\255\255\255\255\255\000\001\ -\255\255\060\001\003\001\255\255\063\001\255\255\255\255\008\001\ -\255\255\068\001\255\255\070\001\013\001\255\255\255\255\074\001\ -\255\255\255\255\019\001\255\255\255\255\080\001\255\255\255\255\ -\255\255\026\001\255\255\028\001\029\001\255\255\255\255\000\000\ -\255\255\092\001\255\255\255\255\255\255\096\001\097\001\255\255\ -\041\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\108\001\255\255\255\255\111\001\255\255\255\255\255\255\ -\255\255\000\001\255\255\060\001\003\001\255\255\063\001\255\255\ -\255\255\255\255\067\001\068\001\255\255\255\255\013\001\255\255\ -\255\255\074\001\255\255\255\255\019\001\255\255\255\255\080\001\ -\255\255\255\255\255\255\026\001\000\000\028\001\029\001\255\255\ -\255\255\255\255\255\255\092\001\255\255\000\000\255\255\096\001\ -\097\001\255\255\041\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\000\001\108\001\255\255\003\001\111\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\060\001\255\255\013\001\ -\063\001\255\255\255\255\255\255\067\001\068\001\255\255\255\255\ -\255\255\255\255\255\255\074\001\026\001\255\255\028\001\029\001\ -\255\255\080\001\255\255\255\255\255\255\255\255\255\255\000\000\ -\255\255\255\255\040\001\041\001\255\255\092\001\255\255\255\255\ -\255\255\096\001\097\001\255\255\255\255\255\255\255\255\000\001\ -\255\255\255\255\003\001\255\255\255\255\108\001\060\001\255\255\ -\111\001\063\001\255\255\255\255\013\001\067\001\068\001\255\255\ -\255\255\255\255\019\001\255\255\074\001\255\255\255\255\255\255\ -\255\255\026\001\080\001\028\001\029\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\000\000\255\255\092\001\255\255\ -\041\001\255\255\096\001\097\001\255\255\000\000\255\255\255\255\ -\255\255\255\255\255\255\255\255\000\001\255\255\108\001\003\001\ -\255\255\111\001\255\255\060\001\255\255\255\255\063\001\255\255\ -\255\255\013\001\067\001\068\001\255\255\255\255\255\255\019\001\ -\255\255\074\001\255\255\255\255\255\255\255\255\026\001\080\001\ -\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\092\001\255\255\041\001\255\255\096\001\ -\097\001\255\255\000\000\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\108\001\255\255\255\255\111\001\255\255\ -\060\001\255\255\255\255\063\001\255\255\255\255\255\255\067\001\ -\068\001\255\255\255\255\255\255\255\255\255\255\074\001\000\001\ -\255\255\255\255\003\001\255\255\080\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\013\001\255\255\255\255\255\255\ -\092\001\255\255\019\001\255\255\096\001\097\001\255\255\000\000\ -\255\255\026\001\255\255\028\001\029\001\255\255\255\255\255\255\ -\108\001\255\255\255\255\111\001\255\255\255\255\255\255\255\255\ -\041\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\000\001\255\255\255\255\003\001\ -\255\255\255\255\255\255\060\001\255\255\000\001\063\001\255\255\ -\255\255\013\001\067\001\068\001\255\255\008\001\255\255\019\001\ -\000\000\074\001\013\001\255\255\255\255\255\255\026\001\080\001\ -\028\001\029\001\000\000\255\255\255\255\255\255\255\255\026\001\ -\255\255\028\001\029\001\092\001\255\255\041\001\255\255\096\001\ -\097\001\255\255\255\255\255\255\255\255\255\255\041\001\255\255\ -\255\255\255\255\255\255\108\001\255\255\255\255\111\001\000\001\ -\060\001\255\255\003\001\063\001\255\255\255\255\255\255\067\001\ -\068\001\060\001\255\255\255\255\013\001\255\255\074\001\066\001\ -\067\001\068\001\019\001\255\255\080\001\255\255\255\255\074\001\ -\255\255\026\001\255\255\028\001\029\001\080\001\255\255\255\255\ -\092\001\255\255\255\255\000\000\096\001\097\001\255\255\255\255\ -\041\001\092\001\255\255\255\255\255\255\096\001\255\255\255\255\ -\108\001\255\255\255\255\111\001\000\001\255\255\255\255\255\255\ -\255\255\108\001\255\255\060\001\111\001\000\001\063\001\255\255\ -\003\001\013\001\067\001\068\001\255\255\255\255\255\255\255\255\ -\255\255\074\001\013\001\255\255\255\255\255\255\026\001\080\001\ -\028\001\029\001\255\255\255\255\000\000\255\255\255\255\026\001\ -\255\255\028\001\029\001\092\001\255\255\041\001\000\000\096\001\ -\097\001\255\255\255\255\255\255\255\255\040\001\041\001\255\255\ -\255\255\255\255\255\255\108\001\255\255\255\255\111\001\255\255\ -\060\001\255\255\000\001\063\001\255\255\003\001\066\001\067\001\ -\068\001\060\001\255\255\255\255\063\001\255\255\074\001\013\001\ -\255\255\068\001\255\255\255\255\080\001\255\255\255\255\074\001\ -\255\255\255\255\255\255\255\255\026\001\080\001\028\001\029\001\ -\092\001\255\255\255\255\255\255\096\001\097\001\255\255\255\255\ -\255\255\092\001\255\255\041\001\000\000\096\001\097\001\255\255\ -\108\001\255\255\255\255\111\001\255\255\255\255\255\255\000\001\ -\255\255\108\001\003\001\255\255\111\001\255\255\060\001\255\255\ -\255\255\063\001\255\255\255\255\013\001\067\001\068\001\255\255\ -\255\255\255\255\255\255\255\255\074\001\255\255\255\255\255\255\ -\255\255\026\001\080\001\028\001\029\001\255\255\255\255\255\255\ -\000\000\255\255\255\255\255\255\255\255\255\255\092\001\255\255\ -\041\001\000\000\096\001\097\001\255\255\255\255\255\255\255\255\ -\000\001\255\255\255\255\255\255\255\255\255\255\108\001\255\255\ -\008\001\111\001\000\001\060\001\255\255\013\001\063\001\255\255\ -\255\255\255\255\067\001\068\001\255\255\255\255\255\255\013\001\ -\255\255\074\001\026\001\255\255\028\001\029\001\255\255\080\001\ -\255\255\255\255\255\255\255\255\026\001\255\255\028\001\029\001\ -\255\255\041\001\000\000\092\001\255\255\255\255\255\255\096\001\ -\097\001\255\255\255\255\041\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\108\001\060\001\255\255\111\001\063\001\ -\255\255\255\255\255\255\067\001\068\001\255\255\060\001\255\255\ -\255\255\063\001\074\001\000\001\255\255\067\001\068\001\255\255\ -\080\001\255\255\255\255\255\255\074\001\255\255\000\000\255\255\ -\013\001\255\255\080\001\255\255\092\001\255\255\255\255\255\255\ -\096\001\097\001\255\255\255\255\255\255\026\001\092\001\028\001\ -\029\001\255\255\096\001\097\001\108\001\255\255\255\255\111\001\ -\255\255\255\255\255\255\255\255\041\001\255\255\108\001\255\255\ -\255\255\111\001\255\255\255\255\000\001\255\255\255\255\003\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\000\001\060\001\ -\255\255\013\001\063\001\255\255\255\255\255\255\067\001\068\001\ -\255\255\255\255\255\255\013\001\255\255\074\001\026\001\255\255\ -\028\001\029\001\255\255\080\001\255\255\255\255\255\255\255\255\ -\026\001\255\255\028\001\029\001\255\255\041\001\255\255\092\001\ -\255\255\255\255\255\255\096\001\097\001\255\255\255\255\041\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\108\001\ -\060\001\255\255\111\001\063\001\255\255\255\255\255\255\255\255\ -\068\001\255\255\060\001\255\255\000\001\063\001\074\001\255\255\ -\255\255\067\001\068\001\255\255\080\001\255\255\255\255\255\255\ -\074\001\013\001\255\255\255\255\255\255\255\255\080\001\255\255\ -\092\001\255\255\255\255\255\255\096\001\097\001\026\001\255\255\ -\028\001\029\001\092\001\255\255\255\255\255\255\096\001\097\001\ -\108\001\255\255\255\255\111\001\255\255\041\001\255\255\255\255\ -\000\001\255\255\108\001\255\255\255\255\111\001\255\255\255\255\ -\255\255\000\001\255\255\255\255\255\255\013\001\255\255\255\255\ -\060\001\255\255\255\255\063\001\255\255\255\255\013\001\067\001\ -\068\001\255\255\026\001\255\255\028\001\029\001\074\001\255\255\ -\255\255\255\255\255\255\026\001\080\001\028\001\029\001\255\255\ -\255\255\041\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\092\001\255\255\041\001\255\255\096\001\097\001\255\255\255\255\ -\255\255\255\255\000\001\255\255\060\001\255\255\255\255\063\001\ -\108\001\255\255\255\255\111\001\068\001\060\001\255\255\013\001\ -\063\001\255\255\074\001\255\255\255\255\068\001\255\255\255\255\ -\080\001\255\255\255\255\074\001\026\001\255\255\028\001\029\001\ -\255\255\080\001\255\255\255\255\092\001\255\255\255\255\255\255\ -\096\001\097\001\255\255\041\001\255\255\092\001\000\001\255\255\ -\255\255\096\001\097\001\255\255\108\001\255\255\255\255\111\001\ -\255\255\255\255\255\255\013\001\255\255\108\001\060\001\255\255\ -\111\001\063\001\255\255\255\255\255\255\255\255\068\001\255\255\ -\026\001\255\255\028\001\029\001\074\001\255\255\255\255\255\255\ -\255\255\255\255\080\001\255\255\255\255\255\255\255\255\041\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\092\001\255\255\ -\255\255\255\255\096\001\097\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\060\001\255\255\255\255\063\001\108\001\255\255\ -\255\255\111\001\068\001\255\255\255\255\255\255\255\255\255\255\ -\074\001\255\255\255\255\255\255\255\255\255\255\080\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\092\001\000\001\255\255\255\255\096\001\097\001\ -\005\001\006\001\007\001\008\001\255\255\255\255\011\001\012\001\ -\013\001\014\001\108\001\255\255\255\255\111\001\019\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\026\001\255\255\028\001\ -\029\001\030\001\031\001\032\001\033\001\034\001\035\001\255\255\ -\255\255\255\255\039\001\255\255\041\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\048\001\049\001\050\001\051\001\052\001\ -\053\001\054\001\055\001\056\001\255\255\255\255\059\001\060\001\ -\255\255\255\255\063\001\064\001\065\001\066\001\255\255\068\001\ -\069\001\070\001\071\001\072\001\255\255\074\001\255\255\076\001\ -\077\001\078\001\255\255\080\001\081\001\255\255\255\255\084\001\ -\085\001\255\255\087\001\255\255\089\001\090\001\255\255\092\001\ -\093\001\255\255\255\255\096\001\097\001\255\255\099\001\255\255\ -\101\001\102\001\255\255\104\001\255\255\106\001\107\001\108\001\ -\109\001\110\001\111\001\112\001\000\001\114\001\255\255\255\255\ -\255\255\005\001\006\001\007\001\008\001\255\255\255\255\011\001\ -\012\001\255\255\255\255\255\255\255\255\255\255\255\255\019\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\026\001\255\255\ -\028\001\255\255\030\001\031\001\032\001\033\001\034\001\035\001\ -\255\255\255\255\255\255\039\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\048\001\049\001\050\001\051\001\ -\052\001\053\001\054\001\055\001\056\001\255\255\255\255\059\001\ -\060\001\255\255\255\255\063\001\064\001\065\001\255\255\255\255\ -\068\001\069\001\070\001\071\001\072\001\255\255\074\001\255\255\ -\076\001\077\001\078\001\255\255\255\255\081\001\255\255\255\255\ -\084\001\085\001\255\255\087\001\255\255\089\001\090\001\255\255\ -\255\255\093\001\255\255\255\255\255\255\097\001\255\255\099\001\ -\255\255\101\001\102\001\255\255\104\001\255\255\106\001\107\001\ -\255\255\109\001\110\001\111\001\112\001\255\255\114\001\000\001\ -\001\001\002\001\255\255\255\255\005\001\006\001\007\001\255\255\ -\009\001\255\255\011\001\012\001\255\255\255\255\015\001\016\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\027\001\255\255\255\255\030\001\031\001\032\001\ -\033\001\034\001\255\255\036\001\255\255\255\255\039\001\255\255\ -\255\255\042\001\043\001\044\001\045\001\046\001\047\001\255\255\ -\255\255\050\001\255\255\052\001\053\001\054\001\055\001\056\001\ -\255\255\255\255\059\001\255\255\061\001\255\255\063\001\064\001\ -\065\001\255\255\255\255\255\255\069\001\255\255\071\001\072\001\ -\255\255\074\001\255\255\076\001\255\255\078\001\255\255\255\255\ -\255\255\082\001\083\001\084\001\085\001\086\001\087\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\094\001\255\255\255\255\ -\255\255\098\001\255\255\100\001\101\001\255\255\255\255\255\255\ -\255\255\106\001\107\001\255\255\109\001\110\001\000\001\001\001\ -\002\001\114\001\255\255\005\001\006\001\007\001\255\255\009\001\ -\255\255\011\001\012\001\255\255\255\255\015\001\016\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\027\001\255\255\255\255\030\001\031\001\032\001\033\001\ -\034\001\255\255\036\001\255\255\255\255\039\001\255\255\255\255\ -\042\001\043\001\044\001\045\001\046\001\047\001\255\255\255\255\ -\050\001\255\255\052\001\053\001\054\001\055\001\056\001\255\255\ -\255\255\059\001\255\255\061\001\255\255\063\001\064\001\065\001\ -\255\255\255\255\255\255\069\001\255\255\071\001\072\001\255\255\ -\074\001\255\255\076\001\255\255\078\001\255\255\255\255\255\255\ -\082\001\083\001\084\001\085\001\086\001\087\001\255\255\255\255\ -\255\255\255\255\255\255\055\001\094\001\057\001\058\001\059\001\ -\098\001\061\001\100\001\101\001\064\001\065\001\255\255\255\255\ -\106\001\107\001\255\255\109\001\110\001\000\001\255\255\255\255\ -\114\001\255\255\005\001\006\001\007\001\081\001\255\255\255\255\ -\011\001\012\001\013\001\255\255\255\255\089\001\090\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\097\001\255\255\026\001\ -\255\255\028\001\029\001\030\001\031\001\032\001\033\001\034\001\ -\255\255\109\001\110\001\255\255\039\001\255\255\041\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\050\001\ -\255\255\052\001\053\001\054\001\055\001\056\001\255\255\255\255\ -\059\001\060\001\255\255\255\255\063\001\064\001\065\001\255\255\ -\255\255\068\001\069\001\255\255\071\001\072\001\255\255\074\001\ -\255\255\076\001\255\255\078\001\255\255\080\001\255\255\255\255\ -\255\255\084\001\085\001\000\001\087\001\255\255\255\255\255\255\ -\005\001\006\001\007\001\255\255\255\255\096\001\011\001\012\001\ -\255\255\255\255\101\001\255\255\255\255\255\255\255\255\106\001\ -\107\001\108\001\109\001\110\001\111\001\255\255\255\255\114\001\ -\255\255\030\001\031\001\032\001\033\001\034\001\255\255\255\255\ -\255\255\255\255\039\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\050\001\255\255\052\001\ -\053\001\054\001\055\001\056\001\255\255\255\255\059\001\255\255\ -\255\255\255\255\063\001\064\001\065\001\255\255\255\255\255\255\ -\069\001\255\255\071\001\072\001\255\255\255\255\255\255\076\001\ -\255\255\078\001\255\255\255\255\255\255\255\255\255\255\084\001\ -\085\001\000\001\087\001\255\255\255\255\255\255\005\001\006\001\ -\007\001\094\001\255\255\255\255\011\001\012\001\255\255\255\255\ -\101\001\255\255\255\255\255\255\255\255\106\001\107\001\255\255\ -\109\001\110\001\255\255\255\255\255\255\114\001\255\255\030\001\ -\031\001\032\001\033\001\034\001\255\255\255\255\255\255\255\255\ -\039\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\050\001\255\255\052\001\053\001\054\001\ -\055\001\056\001\255\255\255\255\059\001\255\255\255\255\255\255\ -\063\001\064\001\065\001\255\255\255\255\255\255\069\001\255\255\ -\071\001\072\001\255\255\255\255\255\255\076\001\255\255\078\001\ -\255\255\255\255\255\255\255\255\255\255\084\001\085\001\000\001\ -\087\001\255\255\255\255\255\255\005\001\006\001\007\001\094\001\ -\255\255\255\255\011\001\012\001\255\255\255\255\101\001\255\255\ -\255\255\255\255\255\255\106\001\107\001\255\255\109\001\110\001\ -\255\255\255\255\255\255\114\001\255\255\030\001\031\001\032\001\ -\033\001\034\001\255\255\255\255\255\255\255\255\039\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\050\001\255\255\052\001\053\001\054\001\055\001\056\001\ -\255\255\255\255\059\001\255\255\255\255\255\255\063\001\064\001\ -\065\001\255\255\255\255\255\255\069\001\255\255\071\001\072\001\ -\255\255\255\255\255\255\076\001\255\255\078\001\255\255\255\255\ -\255\255\255\255\255\255\084\001\085\001\000\001\087\001\255\255\ -\255\255\255\255\005\001\006\001\007\001\094\001\255\255\255\255\ -\011\001\012\001\255\255\255\255\101\001\255\255\255\255\255\255\ -\255\255\106\001\107\001\255\255\109\001\110\001\255\255\255\255\ -\255\255\114\001\255\255\030\001\031\001\032\001\033\001\034\001\ -\255\255\255\255\255\255\255\255\039\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\050\001\ -\255\255\052\001\053\001\054\001\055\001\056\001\255\255\255\255\ -\059\001\255\255\255\255\255\255\063\001\064\001\065\001\255\255\ -\255\255\255\255\069\001\255\255\071\001\072\001\255\255\255\255\ -\255\255\076\001\255\255\078\001\255\255\255\255\255\255\255\255\ -\255\255\084\001\085\001\255\255\087\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\094\001\003\001\004\001\005\001\255\255\ -\255\255\255\255\101\001\255\255\011\001\255\255\013\001\106\001\ -\107\001\255\255\109\001\110\001\019\001\020\001\021\001\114\001\ -\255\255\024\001\025\001\026\001\255\255\028\001\029\001\030\001\ -\255\255\032\001\033\001\034\001\035\001\255\255\255\255\255\255\ -\039\001\040\001\041\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\048\001\049\001\255\255\255\255\052\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\063\001\064\001\255\255\255\255\255\255\000\001\069\001\070\001\ -\255\255\004\001\255\255\074\001\075\001\076\001\077\001\078\001\ -\079\001\080\001\255\255\082\001\255\255\255\255\017\001\255\255\ -\019\001\088\001\255\255\022\001\255\255\255\255\093\001\026\001\ -\027\001\255\255\255\255\255\255\099\001\255\255\255\255\102\001\ -\103\001\036\001\105\001\106\001\107\001\108\001\109\001\255\255\ -\111\001\112\001\113\001\114\001\115\001\048\001\049\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\060\001\255\255\255\255\255\255\064\001\255\255\066\001\ -\067\001\068\001\255\255\070\001\255\255\255\255\073\001\255\255\ -\255\255\255\255\000\001\001\001\002\001\255\255\255\255\255\255\ -\006\001\007\001\255\255\009\001\255\255\255\255\012\001\090\001\ -\091\001\015\001\016\001\255\255\095\001\255\255\097\001\255\255\ -\255\255\100\001\255\255\255\255\255\255\027\001\028\001\255\255\ -\030\001\031\001\109\001\255\255\111\001\255\255\036\001\255\255\ -\255\255\255\255\255\255\255\255\042\001\043\001\044\001\045\001\ -\046\001\047\001\255\255\255\255\050\001\255\255\052\001\053\001\ -\255\255\055\001\056\001\255\255\255\255\059\001\255\255\061\001\ -\255\255\255\255\064\001\065\001\255\255\255\255\255\255\255\255\ -\255\255\071\001\072\001\255\255\074\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\082\001\083\001\084\001\085\001\ -\086\001\087\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\094\001\255\255\255\255\097\001\098\001\255\255\100\001\101\001\ -\255\255\255\255\255\255\255\255\106\001\255\255\108\001\109\001\ -\110\001\000\001\001\001\002\001\255\255\255\255\255\255\006\001\ -\007\001\255\255\009\001\255\255\255\255\012\001\255\255\255\255\ -\015\001\016\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\027\001\028\001\255\255\030\001\ -\031\001\255\255\255\255\255\255\255\255\036\001\255\255\255\255\ -\255\255\255\255\255\255\042\001\043\001\044\001\045\001\046\001\ -\047\001\255\255\255\255\050\001\255\255\052\001\053\001\255\255\ -\055\001\056\001\255\255\255\255\059\001\255\255\061\001\255\255\ -\255\255\064\001\065\001\255\255\255\255\255\255\255\255\255\255\ -\071\001\072\001\255\255\074\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\082\001\083\001\084\001\085\001\086\001\ -\087\001\255\255\255\255\255\255\255\255\255\255\255\255\094\001\ -\255\255\255\255\097\001\098\001\255\255\100\001\101\001\255\255\ -\255\255\255\255\255\255\106\001\255\255\108\001\109\001\110\001\ -\000\001\001\001\002\001\255\255\255\255\255\255\006\001\007\001\ -\255\255\009\001\255\255\255\255\012\001\255\255\255\255\015\001\ -\016\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\027\001\028\001\255\255\030\001\031\001\ -\255\255\255\255\255\255\255\255\036\001\255\255\255\255\255\255\ -\255\255\255\255\042\001\043\001\044\001\045\001\046\001\047\001\ -\255\255\255\255\050\001\255\255\052\001\053\001\255\255\055\001\ -\056\001\255\255\255\255\059\001\255\255\061\001\255\255\255\255\ -\064\001\065\001\255\255\255\255\255\255\255\255\255\255\071\001\ -\072\001\255\255\074\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\082\001\083\001\084\001\085\001\086\001\087\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\094\001\255\255\ -\255\255\097\001\098\001\255\255\100\001\101\001\255\255\255\255\ -\255\255\255\255\106\001\255\255\108\001\109\001\110\001\000\001\ -\001\001\002\001\255\255\255\255\255\255\006\001\007\001\255\255\ -\009\001\255\255\255\255\012\001\255\255\255\255\015\001\016\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\027\001\028\001\255\255\030\001\031\001\255\255\ -\255\255\255\255\255\255\036\001\255\255\255\255\255\255\255\255\ -\255\255\042\001\043\001\044\001\045\001\046\001\047\001\255\255\ -\255\255\050\001\255\255\052\001\053\001\255\255\055\001\056\001\ -\255\255\255\255\059\001\255\255\061\001\255\255\255\255\064\001\ -\065\001\255\255\255\255\255\255\255\255\255\255\071\001\072\001\ -\255\255\074\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\082\001\083\001\084\001\085\001\086\001\087\001\255\255\ -\255\255\000\001\255\255\255\255\255\255\094\001\255\255\006\001\ -\097\001\098\001\255\255\100\001\101\001\012\001\255\255\255\255\ -\015\001\106\001\255\255\255\255\109\001\110\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\028\001\255\255\030\001\ -\031\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\050\001\255\255\052\001\053\001\255\255\ -\055\001\056\001\255\255\255\255\059\001\255\255\000\001\255\255\ -\255\255\064\001\065\001\255\255\006\001\255\255\255\255\255\255\ -\071\001\255\255\012\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\084\001\255\255\255\255\ -\255\255\255\255\028\001\255\255\030\001\031\001\255\255\094\001\ -\255\255\255\255\097\001\255\255\255\255\255\255\101\001\255\255\ -\255\255\255\255\255\255\106\001\255\255\255\255\109\001\110\001\ -\050\001\255\255\052\001\053\001\255\255\055\001\056\001\255\255\ -\255\255\059\001\255\255\000\001\255\255\255\255\064\001\065\001\ -\255\255\006\001\255\255\255\255\255\255\071\001\255\255\012\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\084\001\255\255\255\255\255\255\255\255\028\001\ -\255\255\030\001\031\001\255\255\255\255\255\255\255\255\097\001\ -\255\255\255\255\255\255\101\001\255\255\255\255\255\255\255\255\ -\106\001\255\255\255\255\109\001\110\001\050\001\255\255\052\001\ -\053\001\255\255\055\001\056\001\255\255\255\255\059\001\255\255\ -\000\001\255\255\255\255\064\001\065\001\255\255\006\001\255\255\ -\255\255\255\255\071\001\255\255\012\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\084\001\ -\255\255\255\255\255\255\255\255\028\001\255\255\030\001\031\001\ -\255\255\255\255\255\255\255\255\097\001\255\255\255\255\255\255\ -\101\001\255\255\255\255\255\255\255\255\106\001\255\255\255\255\ -\109\001\110\001\050\001\255\255\052\001\053\001\255\255\055\001\ -\056\001\255\255\255\255\059\001\255\255\000\001\255\255\255\255\ -\064\001\065\001\255\255\006\001\255\255\255\255\255\255\071\001\ -\255\255\012\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\084\001\255\255\255\255\255\255\ -\255\255\028\001\255\255\030\001\031\001\255\255\255\255\255\255\ -\255\255\097\001\255\255\255\255\255\255\101\001\255\255\255\255\ -\255\255\255\255\106\001\255\255\255\255\109\001\110\001\050\001\ -\255\255\052\001\053\001\255\255\055\001\056\001\255\255\255\255\ -\059\001\255\255\000\001\255\255\255\255\064\001\065\001\255\255\ -\006\001\255\255\255\255\255\255\071\001\255\255\012\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\084\001\255\255\255\255\255\255\255\255\028\001\255\255\ -\030\001\031\001\255\255\255\255\255\255\255\255\097\001\255\255\ -\255\255\255\255\101\001\255\255\255\255\255\255\255\255\106\001\ -\255\255\255\255\109\001\110\001\050\001\255\255\052\001\053\001\ -\255\255\055\001\056\001\255\255\255\255\059\001\255\255\000\001\ -\255\255\255\255\064\001\065\001\255\255\006\001\255\255\255\255\ -\255\255\071\001\255\255\012\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\084\001\255\255\ -\255\255\255\255\255\255\028\001\255\255\030\001\031\001\255\255\ -\255\255\255\255\255\255\097\001\255\255\255\255\255\255\101\001\ -\255\255\255\255\255\255\255\255\106\001\255\255\255\255\109\001\ -\110\001\050\001\255\255\052\001\053\001\255\255\055\001\056\001\ -\255\255\255\255\059\001\255\255\255\255\255\255\255\255\064\001\ -\065\001\005\001\006\001\007\001\255\255\255\255\071\001\011\001\ -\012\001\013\001\014\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\084\001\255\255\255\255\255\255\255\255\ -\028\001\029\001\030\001\031\001\032\001\033\001\034\001\255\255\ -\097\001\255\255\255\255\039\001\101\001\041\001\255\255\255\255\ -\255\255\106\001\255\255\255\255\109\001\110\001\050\001\255\255\ -\052\001\053\001\054\001\055\001\056\001\255\255\255\255\059\001\ -\060\001\255\255\255\255\063\001\064\001\065\001\255\255\255\255\ -\068\001\069\001\255\255\071\001\072\001\255\255\074\001\255\255\ -\076\001\255\255\078\001\255\255\080\001\255\255\255\255\255\255\ -\084\001\085\001\255\255\087\001\255\255\089\001\255\255\255\255\ -\005\001\006\001\007\001\255\255\096\001\255\255\011\001\012\001\ -\013\001\101\001\255\255\255\255\255\255\255\255\106\001\107\001\ -\108\001\109\001\110\001\111\001\255\255\255\255\114\001\028\001\ -\029\001\030\001\031\001\032\001\033\001\034\001\255\255\255\255\ -\255\255\255\255\039\001\255\255\041\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\050\001\255\255\052\001\ -\053\001\054\001\055\001\056\001\255\255\255\255\059\001\060\001\ -\255\255\255\255\063\001\064\001\065\001\255\255\255\255\068\001\ -\069\001\255\255\071\001\072\001\255\255\074\001\255\255\076\001\ -\255\255\078\001\255\255\080\001\255\255\255\255\255\255\084\001\ -\085\001\255\255\087\001\255\255\255\255\255\255\005\001\006\001\ -\007\001\255\255\255\255\096\001\011\001\012\001\255\255\255\255\ -\101\001\255\255\255\255\255\255\255\255\106\001\107\001\108\001\ -\109\001\110\001\111\001\255\255\255\255\114\001\255\255\030\001\ -\031\001\032\001\033\001\034\001\255\255\255\255\255\255\255\255\ -\039\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\050\001\255\255\052\001\053\001\054\001\ -\055\001\056\001\255\255\255\255\059\001\255\255\255\255\255\255\ -\063\001\064\001\065\001\255\255\255\255\255\255\069\001\255\255\ -\071\001\072\001\255\255\255\255\255\255\076\001\255\255\078\001\ -\255\255\255\255\255\255\255\255\255\255\084\001\085\001\255\255\ -\087\001\255\255\255\255\255\255\255\255\092\001\005\001\006\001\ -\007\001\255\255\255\255\010\001\011\001\012\001\101\001\255\255\ -\255\255\255\255\255\255\106\001\107\001\255\255\109\001\110\001\ -\255\255\255\255\255\255\114\001\255\255\255\255\255\255\030\001\ -\031\001\032\001\033\001\034\001\255\255\255\255\255\255\255\255\ -\039\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\050\001\255\255\052\001\053\001\054\001\ -\055\001\056\001\255\255\255\255\059\001\255\255\255\255\255\255\ -\063\001\064\001\065\001\255\255\255\255\255\255\069\001\255\255\ -\071\001\072\001\255\255\255\255\255\255\076\001\255\255\078\001\ -\255\255\255\255\255\255\255\255\255\255\084\001\085\001\255\255\ -\087\001\255\255\255\255\005\001\006\001\007\001\255\255\255\255\ -\255\255\011\001\012\001\255\255\255\255\255\255\101\001\255\255\ -\255\255\255\255\255\255\106\001\107\001\255\255\109\001\110\001\ -\026\001\255\255\255\255\114\001\030\001\031\001\032\001\033\001\ -\034\001\255\255\255\255\255\255\255\255\039\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\050\001\255\255\052\001\053\001\054\001\055\001\056\001\255\255\ -\255\255\059\001\255\255\255\255\255\255\063\001\064\001\065\001\ -\255\255\255\255\255\255\069\001\255\255\071\001\072\001\255\255\ -\255\255\255\255\076\001\255\255\078\001\255\255\255\255\255\255\ -\255\255\255\255\084\001\085\001\255\255\087\001\255\255\255\255\ -\005\001\006\001\007\001\255\255\255\255\255\255\011\001\012\001\ -\255\255\255\255\255\255\101\001\255\255\255\255\255\255\255\255\ -\106\001\107\001\255\255\109\001\110\001\255\255\255\255\255\255\ -\114\001\030\001\031\001\032\001\033\001\034\001\255\255\255\255\ -\255\255\255\255\039\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\050\001\255\255\052\001\ -\053\001\054\001\055\001\056\001\255\255\255\255\059\001\255\255\ -\255\255\255\255\063\001\064\001\065\001\255\255\255\255\255\255\ -\069\001\255\255\071\001\072\001\255\255\255\255\255\255\076\001\ -\255\255\078\001\255\255\255\255\255\255\255\255\083\001\084\001\ -\085\001\255\255\087\001\255\255\255\255\005\001\006\001\007\001\ -\255\255\255\255\255\255\011\001\012\001\255\255\255\255\255\255\ -\101\001\255\255\255\255\255\255\255\255\106\001\107\001\255\255\ -\109\001\110\001\255\255\255\255\255\255\114\001\030\001\031\001\ -\032\001\033\001\034\001\255\255\255\255\255\255\255\255\039\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\050\001\255\255\052\001\053\001\054\001\055\001\ -\056\001\255\255\255\255\059\001\255\255\255\255\255\255\063\001\ -\064\001\065\001\255\255\255\255\255\255\069\001\255\255\071\001\ -\072\001\255\255\255\255\255\255\076\001\255\255\078\001\255\255\ -\255\255\255\255\255\255\255\255\084\001\085\001\255\255\087\001\ -\255\255\255\255\255\255\255\255\092\001\005\001\006\001\007\001\ -\255\255\255\255\010\001\011\001\012\001\101\001\255\255\255\255\ -\255\255\255\255\106\001\107\001\255\255\109\001\110\001\255\255\ -\255\255\255\255\114\001\255\255\255\255\255\255\030\001\031\001\ -\032\001\033\001\034\001\255\255\255\255\255\255\255\255\039\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\050\001\255\255\052\001\053\001\054\001\055\001\ -\056\001\255\255\255\255\059\001\255\255\255\255\255\255\063\001\ -\064\001\065\001\255\255\255\255\255\255\069\001\255\255\071\001\ -\072\001\255\255\255\255\255\255\076\001\255\255\078\001\255\255\ -\255\255\255\255\255\255\255\255\084\001\085\001\255\255\087\001\ -\255\255\255\255\255\255\005\001\006\001\007\001\255\255\255\255\ -\255\255\011\001\012\001\255\255\255\255\101\001\255\255\255\255\ -\255\255\255\255\106\001\107\001\022\001\109\001\110\001\255\255\ -\255\255\255\255\114\001\255\255\030\001\031\001\032\001\033\001\ -\034\001\255\255\255\255\255\255\255\255\039\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\050\001\255\255\052\001\053\001\054\001\055\001\056\001\255\255\ -\255\255\059\001\255\255\255\255\255\255\063\001\064\001\065\001\ -\255\255\255\255\255\255\069\001\255\255\071\001\072\001\255\255\ -\255\255\255\255\076\001\255\255\078\001\255\255\255\255\255\255\ -\255\255\255\255\084\001\085\001\255\255\087\001\255\255\255\255\ -\005\001\006\001\007\001\255\255\255\255\255\255\011\001\012\001\ -\255\255\255\255\255\255\101\001\255\255\255\255\255\255\255\255\ -\106\001\107\001\255\255\109\001\110\001\026\001\255\255\255\255\ -\114\001\030\001\031\001\032\001\033\001\034\001\255\255\255\255\ -\255\255\255\255\039\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\050\001\255\255\052\001\ -\053\001\054\001\055\001\056\001\255\255\255\255\059\001\255\255\ -\255\255\255\255\063\001\064\001\065\001\255\255\255\255\255\255\ -\069\001\255\255\071\001\072\001\255\255\255\255\255\255\076\001\ -\255\255\078\001\255\255\255\255\255\255\255\255\255\255\084\001\ -\085\001\255\255\087\001\255\255\255\255\005\001\006\001\007\001\ -\255\255\255\255\255\255\011\001\012\001\255\255\255\255\255\255\ -\101\001\255\255\255\255\255\255\255\255\106\001\107\001\255\255\ -\109\001\110\001\255\255\255\255\255\255\114\001\030\001\031\001\ -\032\001\033\001\034\001\255\255\255\255\255\255\255\255\039\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\050\001\255\255\052\001\053\001\054\001\055\001\ -\056\001\255\255\255\255\059\001\255\255\255\255\255\255\063\001\ -\064\001\065\001\255\255\255\255\255\255\069\001\255\255\071\001\ -\072\001\255\255\255\255\255\255\076\001\255\255\078\001\255\255\ -\255\255\255\255\255\255\255\255\084\001\085\001\255\255\087\001\ -\255\255\255\255\005\001\006\001\007\001\255\255\255\255\255\255\ -\011\001\012\001\255\255\255\255\255\255\101\001\255\255\255\255\ -\255\255\255\255\106\001\107\001\255\255\109\001\110\001\255\255\ -\255\255\255\255\114\001\030\001\031\001\032\001\033\001\034\001\ -\255\255\255\255\255\255\255\255\039\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\050\001\ -\255\255\052\001\053\001\054\001\055\001\056\001\255\255\255\255\ -\059\001\255\255\255\255\255\255\063\001\064\001\065\001\255\255\ -\255\255\255\255\069\001\255\255\071\001\072\001\255\255\255\255\ -\255\255\076\001\255\255\078\001\255\255\255\255\255\255\255\255\ -\255\255\084\001\085\001\255\255\087\001\255\255\255\255\005\001\ -\006\001\007\001\255\255\255\255\255\255\011\001\012\001\255\255\ -\255\255\255\255\101\001\255\255\255\255\255\255\255\255\106\001\ -\107\001\255\255\109\001\110\001\255\255\255\255\255\255\114\001\ -\030\001\031\001\032\001\033\001\034\001\255\255\255\255\255\255\ -\255\255\039\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\050\001\255\255\052\001\053\001\ -\054\001\055\001\056\001\255\255\255\255\059\001\255\255\255\255\ -\255\255\063\001\064\001\065\001\255\255\255\255\255\255\069\001\ -\255\255\071\001\072\001\255\255\255\255\006\001\076\001\255\255\ -\078\001\255\255\255\255\012\001\255\255\014\001\084\001\085\001\ -\017\001\087\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\027\001\255\255\255\255\030\001\031\001\101\001\ -\255\255\255\255\255\255\255\255\106\001\107\001\255\255\109\001\ -\110\001\255\255\255\255\255\255\114\001\255\255\255\255\255\255\ -\255\255\050\001\051\001\255\255\053\001\255\255\055\001\056\001\ -\255\255\255\255\059\001\255\255\255\255\255\255\255\255\064\001\ -\065\001\255\255\006\001\255\255\255\255\255\255\071\001\255\255\ -\012\001\255\255\014\001\255\255\255\255\017\001\255\255\255\255\ -\081\001\255\255\255\255\084\001\255\255\255\255\255\255\027\001\ -\089\001\255\255\030\001\031\001\255\255\006\001\255\255\255\255\ -\097\001\255\255\255\255\012\001\101\001\014\001\255\255\104\001\ -\255\255\106\001\255\255\255\255\109\001\110\001\050\001\051\001\ -\255\255\053\001\255\255\055\001\056\001\030\001\031\001\059\001\ -\255\255\255\255\255\255\255\255\064\001\065\001\255\255\255\255\ -\255\255\255\255\255\255\071\001\255\255\255\255\255\255\255\255\ -\255\255\050\001\051\001\255\255\053\001\081\001\055\001\056\001\ -\084\001\255\255\059\001\255\255\255\255\089\001\255\255\064\001\ -\065\001\255\255\255\255\255\255\255\255\097\001\071\001\255\255\ -\073\001\101\001\255\255\255\255\104\001\255\255\106\001\255\255\ -\081\001\109\001\110\001\084\001\255\255\255\255\006\001\255\255\ -\089\001\255\255\255\255\255\255\012\001\255\255\014\001\255\255\ -\097\001\255\255\255\255\255\255\101\001\255\255\255\255\104\001\ -\255\255\106\001\255\255\027\001\109\001\110\001\030\001\031\001\ -\255\255\006\001\255\255\255\255\255\255\255\255\255\255\012\001\ -\255\255\014\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\050\001\051\001\255\255\053\001\027\001\055\001\ -\056\001\030\001\031\001\059\001\255\255\255\255\255\255\255\255\ -\064\001\065\001\255\255\255\255\255\255\255\255\255\255\071\001\ -\255\255\255\255\255\255\255\255\255\255\050\001\051\001\255\255\ -\053\001\081\001\055\001\056\001\084\001\255\255\059\001\255\255\ -\255\255\089\001\255\255\064\001\065\001\255\255\006\001\255\255\ -\255\255\097\001\071\001\255\255\012\001\101\001\255\255\255\255\ -\104\001\255\255\106\001\255\255\081\001\109\001\110\001\084\001\ -\255\255\255\255\255\255\255\255\089\001\255\255\030\001\031\001\ -\255\255\006\001\255\255\255\255\097\001\255\255\255\255\012\001\ -\101\001\255\255\255\255\104\001\255\255\106\001\255\255\255\255\ -\109\001\110\001\050\001\051\001\255\255\053\001\255\255\055\001\ -\056\001\030\001\031\001\059\001\255\255\255\255\255\255\255\255\ -\064\001\065\001\255\255\255\255\255\255\255\255\255\255\071\001\ -\255\255\073\001\255\255\255\255\255\255\050\001\051\001\255\255\ -\053\001\081\001\055\001\056\001\084\001\255\255\059\001\255\255\ -\255\255\089\001\255\255\064\001\065\001\255\255\006\001\255\255\ -\255\255\097\001\071\001\255\255\012\001\101\001\255\255\255\255\ -\104\001\255\255\106\001\255\255\081\001\109\001\110\001\084\001\ -\255\255\255\255\255\255\255\255\089\001\255\255\030\001\031\001\ -\255\255\006\001\255\255\255\255\097\001\255\255\255\255\012\001\ -\101\001\255\255\255\255\104\001\255\255\106\001\255\255\255\255\ -\109\001\110\001\050\001\051\001\255\255\053\001\255\255\055\001\ -\056\001\030\001\031\001\059\001\255\255\255\255\255\255\255\255\ -\064\001\065\001\255\255\255\255\255\255\255\255\255\255\071\001\ -\255\255\255\255\255\255\255\255\255\255\050\001\051\001\255\255\ -\053\001\081\001\055\001\056\001\084\001\255\255\059\001\255\255\ -\255\255\089\001\255\255\064\001\065\001\255\255\006\001\255\255\ -\255\255\097\001\071\001\255\255\012\001\101\001\255\255\255\255\ -\104\001\255\255\106\001\255\255\081\001\109\001\110\001\084\001\ -\255\255\255\255\255\255\255\255\089\001\255\255\030\001\031\001\ -\255\255\255\255\255\255\255\255\097\001\255\255\255\255\255\255\ -\101\001\255\255\255\255\104\001\255\255\106\001\255\255\255\255\ -\109\001\110\001\050\001\051\001\255\255\053\001\255\255\055\001\ -\056\001\255\255\255\255\059\001\255\255\255\255\255\255\255\255\ -\064\001\065\001\255\255\255\255\006\001\255\255\255\255\071\001\ -\255\255\255\255\012\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\081\001\255\255\255\255\084\001\255\255\255\255\255\255\ -\255\255\089\001\028\001\255\255\030\001\031\001\255\255\255\255\ -\255\255\097\001\255\255\255\255\255\255\101\001\255\255\255\255\ -\104\001\255\255\106\001\255\255\255\255\109\001\110\001\255\255\ -\050\001\255\255\052\001\053\001\255\255\055\001\056\001\255\255\ -\255\255\059\001\255\255\255\255\255\255\255\255\064\001\065\001\ -\255\255\255\255\255\255\006\001\255\255\071\001\255\255\010\001\ -\255\255\012\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\084\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\028\001\092\001\030\001\031\001\255\255\255\255\097\001\ -\255\255\255\255\255\255\101\001\255\255\255\255\255\255\255\255\ -\106\001\255\255\255\255\109\001\110\001\255\255\255\255\050\001\ -\255\255\052\001\053\001\255\255\055\001\056\001\255\255\255\255\ -\059\001\255\255\255\255\255\255\255\255\064\001\065\001\255\255\ -\006\001\255\255\255\255\255\255\071\001\255\255\012\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\006\001\007\001\255\255\ -\255\255\084\001\011\001\012\001\255\255\255\255\028\001\255\255\ -\030\001\031\001\255\255\255\255\255\255\255\255\097\001\255\255\ -\255\255\255\255\101\001\255\255\255\255\030\001\031\001\106\001\ -\255\255\255\255\109\001\110\001\050\001\255\255\052\001\053\001\ -\255\255\055\001\056\001\255\255\255\255\059\001\255\255\255\255\ -\255\255\050\001\064\001\065\001\053\001\054\001\055\001\056\001\ -\255\255\071\001\059\001\255\255\006\001\255\255\008\001\064\001\ -\065\001\255\255\012\001\255\255\255\255\255\255\084\001\255\255\ -\255\255\255\255\255\255\076\001\255\255\255\255\092\001\255\255\ -\255\255\255\255\028\001\097\001\030\001\031\001\087\001\101\001\ -\255\255\255\255\255\255\255\255\106\001\255\255\255\255\109\001\ -\110\001\255\255\255\255\255\255\101\001\255\255\255\255\255\255\ -\050\001\106\001\052\001\053\001\109\001\055\001\056\001\255\255\ -\255\255\059\001\255\255\255\255\255\255\255\255\064\001\065\001\ -\255\255\006\001\255\255\255\255\255\255\071\001\255\255\012\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\084\001\255\255\255\255\255\255\255\255\028\001\ -\255\255\030\001\031\001\255\255\255\255\255\255\255\255\097\001\ -\255\255\255\255\255\255\101\001\255\255\255\255\255\255\255\255\ -\106\001\255\255\255\255\109\001\110\001\050\001\255\255\052\001\ -\053\001\255\255\055\001\056\001\255\255\255\255\059\001\255\255\ -\255\255\255\255\255\255\064\001\065\001\255\255\006\001\255\255\ -\255\255\255\255\071\001\255\255\012\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\084\001\ -\255\255\255\255\255\255\255\255\028\001\255\255\030\001\031\001\ -\255\255\006\001\255\255\255\255\097\001\255\255\255\255\012\001\ -\101\001\255\255\255\255\255\255\255\255\106\001\255\255\255\255\ -\109\001\110\001\050\001\255\255\052\001\053\001\255\255\055\001\ -\056\001\030\001\031\001\059\001\255\255\255\255\255\255\255\255\ -\064\001\065\001\255\255\255\255\255\255\255\255\255\255\071\001\ -\255\255\255\255\255\255\255\255\255\255\050\001\255\255\052\001\ -\053\001\255\255\055\001\056\001\084\001\255\255\059\001\255\255\ -\255\255\255\255\255\255\064\001\065\001\255\255\006\001\255\255\ -\255\255\097\001\071\001\255\255\012\001\101\001\255\255\255\255\ -\255\255\255\255\106\001\255\255\255\255\109\001\110\001\084\001\ -\255\255\255\255\255\255\255\255\028\001\255\255\030\001\031\001\ -\093\001\006\001\255\255\255\255\097\001\255\255\255\255\012\001\ -\101\001\255\255\255\255\255\255\255\255\106\001\255\255\255\255\ -\109\001\110\001\050\001\255\255\052\001\053\001\255\255\055\001\ -\056\001\030\001\031\001\059\001\255\255\255\255\255\255\255\255\ -\064\001\065\001\255\255\255\255\255\255\255\255\255\255\071\001\ -\255\255\255\255\255\255\255\255\255\255\050\001\255\255\052\001\ -\053\001\255\255\055\001\056\001\084\001\255\255\059\001\255\255\ -\255\255\255\255\255\255\064\001\065\001\255\255\006\001\255\255\ -\255\255\097\001\071\001\255\255\012\001\101\001\255\255\255\255\ -\255\255\255\255\106\001\255\255\255\255\109\001\110\001\084\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\030\001\031\001\ -\255\255\006\001\255\255\255\255\097\001\255\255\255\255\012\001\ -\101\001\255\255\255\255\255\255\255\255\106\001\255\255\255\255\ -\109\001\110\001\050\001\255\255\052\001\053\001\255\255\055\001\ -\056\001\030\001\031\001\059\001\255\255\255\255\255\255\255\255\ -\064\001\065\001\255\255\255\255\255\255\255\255\255\255\071\001\ -\255\255\255\255\255\255\255\255\255\255\050\001\255\255\052\001\ -\053\001\255\255\055\001\056\001\084\001\255\255\059\001\255\255\ -\255\255\255\255\255\255\064\001\065\001\255\255\006\001\255\255\ -\255\255\097\001\071\001\255\255\012\001\101\001\255\255\255\255\ -\255\255\255\255\106\001\255\255\255\255\109\001\110\001\084\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\030\001\031\001\ -\255\255\006\001\255\255\255\255\097\001\255\255\255\255\012\001\ -\101\001\255\255\255\255\255\255\255\255\106\001\255\255\255\255\ -\109\001\110\001\050\001\255\255\255\255\053\001\255\255\055\001\ -\056\001\030\001\031\001\059\001\255\255\255\255\255\255\255\255\ -\064\001\065\001\255\255\255\255\255\255\255\255\255\255\071\001\ -\255\255\255\255\255\255\255\255\255\255\050\001\255\255\255\255\ -\053\001\255\255\055\001\056\001\084\001\255\255\059\001\255\255\ -\255\255\255\255\255\255\064\001\065\001\255\255\255\255\255\255\ -\255\255\097\001\071\001\255\255\255\255\101\001\006\001\007\001\ -\255\255\255\255\106\001\011\001\012\001\109\001\110\001\084\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\022\001\255\255\ -\255\255\255\255\255\255\255\255\097\001\255\255\030\001\031\001\ -\101\001\255\255\255\255\255\255\255\255\106\001\255\255\255\255\ -\109\001\110\001\255\255\255\255\255\255\255\255\255\255\047\001\ -\255\255\255\255\050\001\051\001\255\255\053\001\054\001\055\001\ -\056\001\255\255\255\255\059\001\255\255\255\255\255\255\255\255\ -\064\001\065\001\006\001\007\001\255\255\255\255\255\255\011\001\ -\012\001\255\255\255\255\255\255\076\001\255\255\255\255\255\255\ -\255\255\081\001\255\255\255\255\255\255\255\255\255\255\087\001\ -\255\255\089\001\030\001\031\001\255\255\255\255\255\255\255\255\ -\255\255\097\001\098\001\255\255\255\255\101\001\255\255\255\255\ -\104\001\255\255\106\001\255\255\255\255\109\001\050\001\051\001\ -\255\255\053\001\054\001\055\001\056\001\255\255\255\255\059\001\ -\255\255\255\255\255\255\255\255\064\001\065\001\006\001\007\001\ -\255\255\255\255\255\255\011\001\012\001\006\001\007\001\255\255\ -\076\001\255\255\011\001\012\001\255\255\081\001\255\255\255\255\ -\255\255\255\255\255\255\087\001\255\255\089\001\030\001\031\001\ -\255\255\255\255\255\255\255\255\255\255\030\001\031\001\255\255\ -\255\255\101\001\255\255\255\255\104\001\255\255\106\001\255\255\ -\255\255\109\001\050\001\255\255\255\255\053\001\054\001\055\001\ -\056\001\050\001\255\255\059\001\053\001\054\001\055\001\056\001\ -\064\001\065\001\059\001\255\255\255\255\255\255\008\001\064\001\ -\065\001\255\255\255\255\255\255\076\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\076\001\255\255\023\001\255\255\087\001\ -\255\255\255\255\255\255\255\255\030\001\255\255\087\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\101\001\255\255\255\255\ -\255\255\255\255\106\001\255\255\101\001\109\001\255\255\255\255\ -\255\255\106\001\255\255\255\255\109\001\055\001\255\255\057\001\ -\058\001\059\001\255\255\061\001\255\255\255\255\064\001\065\001\ -\255\255\255\255\255\255\000\001\001\001\002\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\009\001\255\255\255\255\081\001\ -\255\255\014\001\015\001\016\001\017\001\018\001\088\001\089\001\ -\090\001\255\255\255\255\255\255\255\255\255\255\027\001\097\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\036\001\ -\106\001\255\255\255\255\109\001\110\001\042\001\043\001\044\001\ -\045\001\046\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\061\001\255\255\255\255\255\255\255\255\066\001\255\255\255\255\ -\255\255\255\255\071\001\072\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\082\001\083\001\084\001\ -\085\001\086\001\255\255\000\001\001\001\002\001\255\255\255\255\ -\255\255\094\001\007\001\255\255\009\001\255\255\255\255\100\001\ -\255\255\255\255\055\001\016\001\057\001\058\001\059\001\255\255\ -\061\001\255\255\255\255\064\001\065\001\255\255\027\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\036\001\ -\255\255\255\255\255\255\255\255\081\001\042\001\043\001\044\001\ -\045\001\046\001\047\001\255\255\089\001\090\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\097\001\255\255\255\255\255\255\ -\061\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\109\001\110\001\071\001\072\001\255\255\074\001\255\255\255\255\ -\255\255\255\255\000\001\001\001\002\001\082\001\083\001\084\001\ -\085\001\086\001\087\001\009\001\255\255\255\255\255\255\255\255\ -\255\255\015\001\016\001\255\255\018\001\098\001\255\255\100\001\ -\255\255\255\255\255\255\255\255\255\255\027\001\255\255\255\255\ -\255\255\255\255\000\001\001\001\002\001\255\255\036\001\255\255\ -\255\255\255\255\255\255\009\001\042\001\043\001\044\001\045\001\ -\046\001\015\001\016\001\255\255\018\001\255\255\255\255\255\255\ -\055\001\255\255\057\001\058\001\059\001\027\001\061\001\061\001\ -\255\255\064\001\065\001\255\255\066\001\255\255\036\001\255\255\ -\255\255\071\001\072\001\255\255\042\001\043\001\044\001\045\001\ -\046\001\255\255\081\001\255\255\082\001\083\001\084\001\085\001\ -\086\001\255\255\089\001\090\001\255\255\091\001\255\255\061\001\ -\255\255\255\255\097\001\255\255\066\001\255\255\100\001\255\255\ -\255\255\071\001\072\001\255\255\255\255\255\255\109\001\110\001\ -\000\001\001\001\002\001\255\255\082\001\083\001\084\001\085\001\ -\086\001\009\001\255\255\255\255\255\255\255\255\092\001\015\001\ -\016\001\255\255\018\001\255\255\255\255\255\255\100\001\255\255\ -\255\255\255\255\255\255\027\001\255\255\255\255\255\255\255\255\ -\000\001\001\001\002\001\255\255\036\001\255\255\255\255\255\255\ -\255\255\009\001\042\001\043\001\044\001\045\001\046\001\015\001\ -\016\001\255\255\018\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\027\001\255\255\061\001\255\255\255\255\ -\255\255\255\255\066\001\255\255\036\001\255\255\255\255\071\001\ -\072\001\255\255\042\001\043\001\044\001\045\001\046\001\255\255\ -\255\255\255\255\082\001\083\001\084\001\085\001\086\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\061\001\094\001\255\255\ -\255\255\255\255\066\001\255\255\100\001\255\255\255\255\071\001\ -\072\001\255\255\255\255\255\255\255\255\255\255\000\001\001\001\ -\002\001\255\255\082\001\083\001\084\001\085\001\086\001\009\001\ -\255\255\255\255\255\255\091\001\255\255\015\001\016\001\255\255\ -\018\001\255\255\255\255\255\255\100\001\255\255\255\255\255\255\ -\255\255\027\001\255\255\255\255\255\255\255\255\000\001\001\001\ -\002\001\255\255\036\001\255\255\255\255\255\255\255\255\009\001\ -\042\001\043\001\044\001\045\001\046\001\015\001\016\001\255\255\ -\018\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\027\001\255\255\061\001\255\255\255\255\255\255\255\255\ -\066\001\255\255\036\001\255\255\255\255\071\001\072\001\255\255\ -\042\001\043\001\044\001\045\001\046\001\255\255\255\255\255\255\ -\082\001\083\001\084\001\085\001\086\001\255\255\255\255\255\255\ -\255\255\255\255\092\001\061\001\255\255\255\255\255\255\255\255\ -\066\001\255\255\100\001\255\255\255\255\071\001\072\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\082\001\083\001\084\001\085\001\086\001\000\001\001\001\002\001\ -\255\255\255\255\255\255\255\255\094\001\255\255\009\001\255\255\ -\255\255\255\255\100\001\255\255\015\001\016\001\255\255\018\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\027\001\255\255\255\255\255\255\255\255\000\001\001\001\002\001\ -\255\255\036\001\255\255\255\255\255\255\255\255\009\001\042\001\ -\043\001\044\001\045\001\046\001\015\001\016\001\255\255\018\001\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\027\001\255\255\061\001\255\255\255\255\255\255\255\255\066\001\ -\255\255\036\001\255\255\255\255\071\001\072\001\255\255\042\001\ -\043\001\044\001\045\001\046\001\255\255\255\255\255\255\082\001\ -\083\001\084\001\085\001\086\001\255\255\255\255\255\255\255\255\ -\091\001\255\255\061\001\255\255\255\255\255\255\255\255\066\001\ -\255\255\100\001\255\255\255\255\071\001\072\001\255\255\255\255\ -\255\255\255\255\255\255\000\001\001\001\002\001\255\255\082\001\ -\083\001\084\001\085\001\086\001\009\001\255\255\255\255\255\255\ -\255\255\092\001\015\001\016\001\255\255\018\001\255\255\255\255\ -\255\255\100\001\255\255\255\255\255\255\255\255\027\001\255\255\ -\255\255\255\255\255\255\000\001\001\001\002\001\255\255\036\001\ -\255\255\255\255\255\255\255\255\009\001\042\001\043\001\044\001\ -\045\001\046\001\015\001\016\001\255\255\018\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\027\001\255\255\ -\061\001\255\255\255\255\255\255\255\255\066\001\255\255\036\001\ -\255\255\255\255\071\001\072\001\255\255\042\001\043\001\044\001\ -\045\001\046\001\255\255\255\255\255\255\082\001\083\001\084\001\ -\085\001\086\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\061\001\094\001\255\255\255\255\255\255\066\001\255\255\100\001\ -\255\255\255\255\071\001\072\001\255\255\255\255\255\255\255\255\ -\255\255\000\001\001\001\002\001\255\255\082\001\083\001\084\001\ -\085\001\086\001\009\001\255\255\255\255\255\255\091\001\255\255\ -\015\001\016\001\255\255\018\001\255\255\255\255\255\255\100\001\ -\255\255\255\255\255\255\255\255\027\001\255\255\255\255\255\255\ -\255\255\000\001\001\001\002\001\255\255\036\001\255\255\255\255\ -\255\255\255\255\009\001\042\001\043\001\044\001\045\001\046\001\ -\015\001\016\001\255\255\018\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\027\001\255\255\061\001\255\255\ -\255\255\255\255\255\255\066\001\255\255\036\001\255\255\255\255\ -\071\001\072\001\255\255\042\001\043\001\044\001\045\001\046\001\ -\255\255\255\255\255\255\082\001\083\001\084\001\085\001\086\001\ -\255\255\255\255\255\255\255\255\255\255\092\001\061\001\001\001\ -\002\001\255\255\255\255\066\001\255\255\100\001\255\255\009\001\ -\071\001\072\001\255\255\255\255\255\255\015\001\016\001\255\255\ -\018\001\255\255\255\255\082\001\083\001\084\001\085\001\086\001\ -\255\255\027\001\255\255\255\255\255\255\255\255\255\255\094\001\ -\255\255\255\255\036\001\255\255\255\255\100\001\255\255\255\255\ -\042\001\043\001\044\001\045\001\046\001\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\061\001\001\001\002\001\255\255\255\255\ -\066\001\255\255\255\255\255\255\009\001\071\001\072\001\255\255\ -\255\255\255\255\015\001\016\001\255\255\018\001\255\255\255\255\ -\082\001\083\001\084\001\085\001\086\001\255\255\027\001\255\255\ -\255\255\255\255\255\255\255\255\255\255\095\001\255\255\036\001\ -\255\255\255\255\100\001\255\255\255\255\042\001\043\001\044\001\ -\045\001\046\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\061\001\001\001\002\001\255\255\255\255\066\001\255\255\255\255\ -\255\255\009\001\071\001\072\001\255\255\255\255\255\255\015\001\ -\016\001\255\255\018\001\255\255\255\255\082\001\083\001\084\001\ -\085\001\086\001\255\255\027\001\255\255\255\255\091\001\255\255\ -\255\255\001\001\002\001\255\255\036\001\255\255\255\255\100\001\ -\255\255\009\001\042\001\043\001\044\001\045\001\046\001\015\001\ -\016\001\255\255\018\001\255\255\255\255\255\255\255\255\255\255\ -\255\255\025\001\255\255\027\001\255\255\061\001\255\255\255\255\ -\255\255\255\255\066\001\255\255\036\001\255\255\255\255\071\001\ -\072\001\255\255\042\001\043\001\044\001\045\001\046\001\255\255\ -\255\255\255\255\082\001\083\001\084\001\085\001\086\001\255\255\ -\255\255\255\255\255\255\091\001\255\255\061\001\001\001\002\001\ -\255\255\255\255\066\001\255\255\100\001\255\255\009\001\071\001\ -\072\001\255\255\255\255\255\255\015\001\016\001\255\255\018\001\ -\255\255\255\255\082\001\083\001\084\001\085\001\086\001\255\255\ -\027\001\255\255\255\255\255\255\255\255\255\255\001\001\002\001\ -\255\255\036\001\255\255\255\255\100\001\255\255\009\001\042\001\ -\043\001\044\001\045\001\046\001\015\001\016\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\027\001\255\255\061\001\255\255\255\255\255\255\255\255\066\001\ -\255\255\036\001\255\255\255\255\071\001\072\001\255\255\042\001\ -\043\001\044\001\045\001\046\001\255\255\255\255\255\255\082\001\ -\083\001\084\001\085\001\086\001\255\255\255\255\255\255\255\255\ -\255\255\255\255\061\001\001\001\002\001\255\255\255\255\066\001\ -\255\255\100\001\255\255\009\001\071\001\072\001\255\255\255\255\ -\255\255\015\001\255\255\255\255\255\255\255\255\255\255\082\001\ -\083\001\084\001\085\001\086\001\255\255\027\001\255\255\255\255\ -\091\001\255\255\255\255\001\001\002\001\255\255\036\001\255\255\ -\255\255\100\001\255\255\255\255\042\001\043\001\044\001\045\001\ -\046\001\015\001\255\255\255\255\255\255\255\255\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\027\001\255\255\061\001\ -\255\255\255\255\255\255\255\255\066\001\255\255\036\001\255\255\ -\255\255\071\001\072\001\255\255\042\001\043\001\044\001\045\001\ -\046\001\013\001\255\255\255\255\082\001\083\001\084\001\085\001\ -\086\001\255\255\255\255\255\255\255\255\255\255\255\255\061\001\ -\028\001\029\001\255\255\255\255\066\001\255\255\100\001\255\255\ -\255\255\071\001\072\001\255\255\255\255\041\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\083\001\084\001\085\001\ -\086\001\255\255\255\255\055\001\255\255\057\001\058\001\059\001\ -\060\001\061\001\255\255\255\255\064\001\065\001\100\001\255\255\ -\068\001\255\255\255\255\255\255\255\255\255\255\074\001\255\255\ -\255\255\255\255\255\255\255\255\080\001\081\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\089\001\090\001\255\255\ -\255\255\255\255\255\255\255\255\096\001\097\001\255\255\255\255\ -\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ -\108\001\109\001\110\001\111\001" - -let yynames_const = "\ - AMPERAMPER\000\ - AMPERSAND\000\ - AND\000\ - AS\000\ - ASSERT\000\ - BACKQUOTE\000\ - BANG\000\ - BAR\000\ - BARBAR\000\ - BARRBRACKET\000\ - BEGIN\000\ - CLASS\000\ - COLON\000\ - COLONCOLON\000\ - COLONEQUAL\000\ - COLONGREATER\000\ - COMMA\000\ - CONSTRAINT\000\ - DO\000\ - DONE\000\ - DOT\000\ - DOTDOT\000\ - DOWNTO\000\ - ELSE\000\ - END\000\ - EOF\000\ - EQUAL\000\ - EXCEPTION\000\ - EXTERNAL\000\ - FALSE\000\ - FOR\000\ - FUN\000\ - FUNCTION\000\ - FUNCTOR\000\ - GREATER\000\ - GREATERRBRACE\000\ - GREATERRBRACKET\000\ - IF\000\ - IN\000\ - INCLUDE\000\ - INHERIT\000\ - INITIALIZER\000\ - LAZY\000\ - LBRACE\000\ - LBRACELESS\000\ - LBRACKET\000\ - LBRACKETBAR\000\ - LBRACKETLESS\000\ - LBRACKETGREATER\000\ - LBRACKETPERCENT\000\ - LBRACKETPERCENTPERCENT\000\ - LESS\000\ - LESSMINUS\000\ - LET\000\ - LPAREN\000\ - LBRACKETAT\000\ - LBRACKETATAT\000\ - LBRACKETATATAT\000\ - MATCH\000\ - METHOD\000\ - MINUS\000\ - MINUSDOT\000\ - MINUSGREATER\000\ - MODULE\000\ - MUTABLE\000\ - NEW\000\ - NONREC\000\ - OBJECT\000\ - OF\000\ - OPEN\000\ - OR\000\ - PERCENT\000\ - PLUS\000\ - PLUSDOT\000\ - PLUSEQ\000\ - PRIVATE\000\ - QUESTION\000\ - QUOTE\000\ - RBRACE\000\ - RBRACKET\000\ - REC\000\ - RPAREN\000\ - SEMI\000\ - SEMISEMI\000\ - HASH\000\ - SIG\000\ - STAR\000\ - STRUCT\000\ - THEN\000\ - TILDE\000\ - TO\000\ - TRUE\000\ - TRY\000\ - TYPE\000\ - UNDERSCORE\000\ - VAL\000\ - VIRTUAL\000\ - WHEN\000\ - WHILE\000\ - WITH\000\ - EOL\000\ - " - -let yynames_block = "\ - CHAR\000\ - FLOAT\000\ - INFIXOP0\000\ - INFIXOP1\000\ - INFIXOP2\000\ - INFIXOP3\000\ - INFIXOP4\000\ - DOTOP\000\ - INT\000\ - LABEL\000\ - LIDENT\000\ - OPTLABEL\000\ - PREFIXOP\000\ - HASHOP\000\ - STRING\000\ - UIDENT\000\ - COMMENT\000\ - DOCSTRING\000\ - " - -let yyact = [| - (fun _ -> failwith "parser") -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'structure) in - Obj.repr( -# 630 "parsing/parser.mly" - ( extra_str 1 _1 ) -# 7030 "parsing/parser.ml" - : Parsetree.structure)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'signature) in - Obj.repr( -# 633 "parsing/parser.mly" - ( extra_sig 1 _1 ) -# 7037 "parsing/parser.ml" - : Parsetree.signature)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'top_structure) in - Obj.repr( -# 636 "parsing/parser.mly" - ( Ptop_def (extra_str 1 _1) ) -# 7044 "parsing/parser.ml" - : Parsetree.toplevel_phrase)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'toplevel_directive) in - Obj.repr( -# 637 "parsing/parser.mly" - ( _1 ) -# 7051 "parsing/parser.ml" - : Parsetree.toplevel_phrase)) -; (fun __caml_parser_env -> - Obj.repr( -# 638 "parsing/parser.mly" - ( raise End_of_file ) -# 7057 "parsing/parser.ml" - : Parsetree.toplevel_phrase)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 642 "parsing/parser.mly" - ( (text_str 1) @ [mkstrexp _1 _2] ) -# 7065 "parsing/parser.ml" - : 'top_structure)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'top_structure_tail) in - Obj.repr( -# 644 "parsing/parser.mly" - ( _1 ) -# 7072 "parsing/parser.ml" - : 'top_structure)) -; (fun __caml_parser_env -> - Obj.repr( -# 647 "parsing/parser.mly" - ( [] ) -# 7078 "parsing/parser.ml" - : 'top_structure_tail)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'structure_item) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'top_structure_tail) in - Obj.repr( -# 648 "parsing/parser.mly" - ( (text_str 1) @ _1 :: _2 ) -# 7086 "parsing/parser.ml" - : 'top_structure_tail)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'use_file_body) in - Obj.repr( -# 651 "parsing/parser.mly" - ( extra_def 1 _1 ) -# 7093 "parsing/parser.ml" - : Parsetree.toplevel_phrase list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'use_file_tail) in - Obj.repr( -# 654 "parsing/parser.mly" - ( _1 ) -# 7100 "parsing/parser.ml" - : 'use_file_body)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'seq_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'post_item_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'use_file_tail) in - Obj.repr( -# 656 "parsing/parser.mly" - ( (text_def 1) @ Ptop_def[mkstrexp _1 _2] :: _3 ) -# 7109 "parsing/parser.ml" - : 'use_file_body)) -; (fun __caml_parser_env -> - Obj.repr( -# 660 "parsing/parser.mly" - ( [] ) -# 7115 "parsing/parser.ml" - : 'use_file_tail)) -; (fun __caml_parser_env -> - Obj.repr( -# 662 "parsing/parser.mly" - ( text_def 1 ) -# 7121 "parsing/parser.ml" - : 'use_file_tail)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'seq_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'post_item_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'use_file_tail) in - Obj.repr( -# 664 "parsing/parser.mly" - ( mark_rhs_docs 2 3; - (text_def 1) @ (text_def 2) @ Ptop_def[mkstrexp _2 _3] :: _4 ) -# 7131 "parsing/parser.ml" - : 'use_file_tail)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'structure_item) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'use_file_tail) in - Obj.repr( -# 667 "parsing/parser.mly" - ( (text_def 1) @ (text_def 2) @ Ptop_def[_2] :: _3 ) -# 7139 "parsing/parser.ml" - : 'use_file_tail)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'toplevel_directive) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'use_file_tail) in - Obj.repr( -# 669 "parsing/parser.mly" - ( mark_rhs_docs 2 3; - (text_def 1) @ (text_def 2) @ _2 :: _3 ) -# 7148 "parsing/parser.ml" - : 'use_file_tail)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'structure_item) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'use_file_tail) in - Obj.repr( -# 672 "parsing/parser.mly" - ( (text_def 1) @ Ptop_def[_1] :: _2 ) -# 7156 "parsing/parser.ml" - : 'use_file_tail)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'toplevel_directive) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'use_file_tail) in - Obj.repr( -# 674 "parsing/parser.mly" - ( mark_rhs_docs 1 1; - (text_def 1) @ _1 :: _2 ) -# 7165 "parsing/parser.ml" - : 'use_file_tail)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in - Obj.repr( -# 678 "parsing/parser.mly" - ( _1 ) -# 7172 "parsing/parser.ml" - : Parsetree.core_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - Obj.repr( -# 681 "parsing/parser.mly" - ( _1 ) -# 7179 "parsing/parser.ml" - : Parsetree.expression)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in - Obj.repr( -# 684 "parsing/parser.mly" - ( _1 ) -# 7186 "parsing/parser.ml" - : Parsetree.pattern)) -; (fun __caml_parser_env -> - Obj.repr( -# 691 "parsing/parser.mly" - ( mkrhs "*" 2, None ) -# 7192 "parsing/parser.ml" - : 'functor_arg)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'functor_arg_name) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in - Obj.repr( -# 693 "parsing/parser.mly" - ( mkrhs _2 2, Some _4 ) -# 7200 "parsing/parser.ml" - : 'functor_arg)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 697 "parsing/parser.mly" - ( _1 ) -# 7207 "parsing/parser.ml" - : 'functor_arg_name)) -; (fun __caml_parser_env -> - Obj.repr( -# 698 "parsing/parser.mly" - ( "_" ) -# 7213 "parsing/parser.ml" - : 'functor_arg_name)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'functor_args) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'functor_arg) in - Obj.repr( -# 703 "parsing/parser.mly" - ( _2 :: _1 ) -# 7221 "parsing/parser.ml" - : 'functor_args)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'functor_arg) in - Obj.repr( -# 705 "parsing/parser.mly" - ( [ _1 ] ) -# 7228 "parsing/parser.ml" - : 'functor_args)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'mod_longident) in - Obj.repr( -# 710 "parsing/parser.mly" - ( mkmod(Pmod_ident (mkrhs _1 1)) ) -# 7235 "parsing/parser.ml" - : 'module_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'structure) in - Obj.repr( -# 712 "parsing/parser.mly" - ( mkmod ~attrs:_2 (Pmod_structure(extra_str 3 _3)) ) -# 7243 "parsing/parser.ml" - : 'module_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'structure) in - Obj.repr( -# 714 "parsing/parser.mly" - ( unclosed "struct" 1 "end" 4 ) -# 7251 "parsing/parser.ml" - : 'module_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'functor_args) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'module_expr) in - Obj.repr( -# 716 "parsing/parser.mly" - ( let modexp = - List.fold_left - (fun acc (n, t) -> mkmod(Pmod_functor(n, t, acc))) - _5 _3 - in wrap_mod_attrs modexp _2 ) -# 7264 "parsing/parser.ml" - : 'module_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'paren_module_expr) in - Obj.repr( -# 722 "parsing/parser.mly" - ( mkmod(Pmod_apply(_1, _2)) ) -# 7272 "parsing/parser.ml" - : 'module_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'module_expr) in - Obj.repr( -# 724 "parsing/parser.mly" - ( mkmod(Pmod_apply(_1, mkmod (Pmod_structure []))) ) -# 7279 "parsing/parser.ml" - : 'module_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'paren_module_expr) in - Obj.repr( -# 726 "parsing/parser.mly" - ( _1 ) -# 7286 "parsing/parser.ml" - : 'module_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in - Obj.repr( -# 728 "parsing/parser.mly" - ( Mod.attr _1 _2 ) -# 7294 "parsing/parser.ml" - : 'module_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in - Obj.repr( -# 730 "parsing/parser.mly" - ( mkmod(Pmod_extension _1) ) -# 7301 "parsing/parser.ml" - : 'module_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'module_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in - Obj.repr( -# 735 "parsing/parser.mly" - ( mkmod(Pmod_constraint(_2, _4)) ) -# 7309 "parsing/parser.ml" - : 'paren_module_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'module_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in - Obj.repr( -# 737 "parsing/parser.mly" - ( unclosed "(" 1 ")" 5 ) -# 7317 "parsing/parser.ml" - : 'paren_module_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in - Obj.repr( -# 739 "parsing/parser.mly" - ( _2 ) -# 7324 "parsing/parser.ml" - : 'paren_module_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in - Obj.repr( -# 741 "parsing/parser.mly" - ( unclosed "(" 1 ")" 3 ) -# 7331 "parsing/parser.ml" - : 'paren_module_expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 743 "parsing/parser.mly" - ( mkmod ~attrs:_3 (Pmod_unpack _4)) -# 7339 "parsing/parser.ml" - : 'paren_module_expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in - Obj.repr( -# 745 "parsing/parser.mly" - ( mkmod ~attrs:_3 - (Pmod_unpack( - ghexp(Pexp_constraint(_4, ghtyp(Ptyp_package _6))))) ) -# 7350 "parsing/parser.ml" - : 'paren_module_expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 6 : 'attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 5 : 'expr) in - let _6 = (Parsing.peek_val __caml_parser_env 3 : 'package_type) in - let _8 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in - Obj.repr( -# 750 "parsing/parser.mly" - ( mkmod ~attrs:_3 - (Pmod_unpack( - ghexp(Pexp_coerce(_4, Some(ghtyp(Ptyp_package _6)), - ghtyp(Ptyp_package _8))))) ) -# 7363 "parsing/parser.ml" - : 'paren_module_expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in - Obj.repr( -# 755 "parsing/parser.mly" - ( mkmod ~attrs:_3 - (Pmod_unpack( - ghexp(Pexp_coerce(_4, None, ghtyp(Ptyp_package _6))))) ) -# 7374 "parsing/parser.ml" - : 'paren_module_expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - Obj.repr( -# 759 "parsing/parser.mly" - ( unclosed "(" 1 ")" 6 ) -# 7382 "parsing/parser.ml" - : 'paren_module_expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - Obj.repr( -# 761 "parsing/parser.mly" - ( unclosed "(" 1 ")" 6 ) -# 7390 "parsing/parser.ml" - : 'paren_module_expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 763 "parsing/parser.mly" - ( unclosed "(" 1 ")" 5 ) -# 7398 "parsing/parser.ml" - : 'paren_module_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'seq_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'post_item_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'structure_tail) in - Obj.repr( -# 768 "parsing/parser.mly" - ( mark_rhs_docs 1 2; - (text_str 1) @ mkstrexp _1 _2 :: _3 ) -# 7408 "parsing/parser.ml" - : 'structure)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'structure_tail) in - Obj.repr( -# 770 "parsing/parser.mly" - ( _1 ) -# 7415 "parsing/parser.ml" - : 'structure)) -; (fun __caml_parser_env -> - Obj.repr( -# 773 "parsing/parser.mly" - ( [] ) -# 7421 "parsing/parser.ml" - : 'structure_tail)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'structure) in - Obj.repr( -# 774 "parsing/parser.mly" - ( (text_str 1) @ _2 ) -# 7428 "parsing/parser.ml" - : 'structure_tail)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'structure_item) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'structure_tail) in - Obj.repr( -# 775 "parsing/parser.mly" - ( (text_str 1) @ _1 :: _2 ) -# 7436 "parsing/parser.ml" - : 'structure_tail)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'let_bindings) in - Obj.repr( -# 779 "parsing/parser.mly" - ( val_of_let_bindings _1 ) -# 7443 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'primitive_declaration) in - Obj.repr( -# 781 "parsing/parser.mly" - ( let (body, ext) = _1 in mkstr_ext (Pstr_primitive body) ext ) -# 7450 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'value_description) in - Obj.repr( -# 783 "parsing/parser.mly" - ( let (body, ext) = _1 in mkstr_ext (Pstr_primitive body) ext ) -# 7457 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_declarations) in - Obj.repr( -# 785 "parsing/parser.mly" - ( let (nr, l, ext ) = _1 in mkstr_ext (Pstr_type (nr, List.rev l)) ext ) -# 7464 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'str_type_extension) in - Obj.repr( -# 787 "parsing/parser.mly" - ( let (l, ext) = _1 in mkstr_ext (Pstr_typext l) ext ) -# 7471 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'str_exception_declaration) in - Obj.repr( -# 789 "parsing/parser.mly" - ( let (l, ext) = _1 in mkstr_ext (Pstr_exception l) ext ) -# 7478 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_binding) in - Obj.repr( -# 791 "parsing/parser.mly" - ( let (body, ext) = _1 in mkstr_ext (Pstr_module body) ext ) -# 7485 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'rec_module_bindings) in - Obj.repr( -# 793 "parsing/parser.mly" - ( let (l, ext) = _1 in mkstr_ext (Pstr_recmodule(List.rev l)) ext ) -# 7492 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_type_declaration) in - Obj.repr( -# 795 "parsing/parser.mly" - ( let (body, ext) = _1 in mkstr_ext (Pstr_modtype body) ext ) -# 7499 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'open_statement) in - Obj.repr( -# 797 "parsing/parser.mly" - ( let (body, ext) = _1 in mkstr_ext (Pstr_open body) ext ) -# 7506 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_declarations) in - Obj.repr( -# 799 "parsing/parser.mly" - ( let (l, ext) = _1 in mkstr_ext (Pstr_class (List.rev l)) ext ) -# 7513 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_type_declarations) in - Obj.repr( -# 801 "parsing/parser.mly" - ( let (l, ext) = _1 in mkstr_ext (Pstr_class_type (List.rev l)) ext ) -# 7520 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'str_include_statement) in - Obj.repr( -# 803 "parsing/parser.mly" - ( let (body, ext) = _1 in mkstr_ext (Pstr_include body) ext ) -# 7527 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'item_extension) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 805 "parsing/parser.mly" - ( mkstr(Pstr_extension (_1, (add_docs_attrs (symbol_docs ()) _2))) ) -# 7535 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'floating_attribute) in - Obj.repr( -# 807 "parsing/parser.mly" - ( mark_symbol_docs (); - mkstr(Pstr_attribute _1) ) -# 7543 "parsing/parser.ml" - : 'structure_item)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 812 "parsing/parser.mly" - ( let (ext, attrs) = _2 in - Incl.mk _3 ~attrs:(attrs@_4) - ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) - , ext ) -# 7555 "parsing/parser.ml" - : 'str_include_statement)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'module_expr) in - Obj.repr( -# 819 "parsing/parser.mly" - ( _2 ) -# 7562 "parsing/parser.ml" - : 'module_binding_body)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'module_type) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'module_expr) in - Obj.repr( -# 821 "parsing/parser.mly" - ( mkmod(Pmod_constraint(_4, _2)) ) -# 7570 "parsing/parser.ml" - : 'module_binding_body)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'functor_arg) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'module_binding_body) in - Obj.repr( -# 823 "parsing/parser.mly" - ( mkmod(Pmod_functor(fst _1, snd _1, _2)) ) -# 7578 "parsing/parser.ml" - : 'module_binding_body)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_binding_body) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 827 "parsing/parser.mly" - ( let (ext, attrs) = _2 in - Mb.mk (mkrhs _3 3) _4 ~attrs:(attrs@_5) - ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) - , ext ) -# 7591 "parsing/parser.ml" - : 'module_binding)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'rec_module_binding) in - Obj.repr( -# 833 "parsing/parser.mly" - ( let (b, ext) = _1 in ([b], ext) ) -# 7598 "parsing/parser.ml" - : 'rec_module_bindings)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'rec_module_bindings) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'and_module_binding) in - Obj.repr( -# 835 "parsing/parser.mly" - ( let (l, ext) = _1 in (_2 :: l, ext) ) -# 7606 "parsing/parser.ml" - : 'rec_module_bindings)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : string) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'module_binding_body) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 839 "parsing/parser.mly" - ( let (ext, attrs) = _2 in - Mb.mk (mkrhs _4 4) _5 ~attrs:(attrs@_6) - ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) - , ext ) -# 7619 "parsing/parser.ml" - : 'rec_module_binding)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_binding_body) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 846 "parsing/parser.mly" - ( Mb.mk (mkrhs _3 3) _4 ~attrs:(_2@_5) ~loc:(symbol_rloc ()) - ~text:(symbol_text ()) ~docs:(symbol_docs ()) ) -# 7630 "parsing/parser.ml" - : 'and_module_binding)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'mty_longident) in - Obj.repr( -# 854 "parsing/parser.mly" - ( mkmty(Pmty_ident (mkrhs _1 1)) ) -# 7637 "parsing/parser.ml" - : 'module_type)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'signature) in - Obj.repr( -# 856 "parsing/parser.mly" - ( mkmty ~attrs:_2 (Pmty_signature (extra_sig 3 _3)) ) -# 7645 "parsing/parser.ml" - : 'module_type)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'signature) in - Obj.repr( -# 858 "parsing/parser.mly" - ( unclosed "sig" 1 "end" 4 ) -# 7653 "parsing/parser.ml" - : 'module_type)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'functor_args) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'module_type) in - Obj.repr( -# 861 "parsing/parser.mly" - ( let mty = - List.fold_left - (fun acc (n, t) -> mkmty(Pmty_functor(n, t, acc))) - _5 _3 - in wrap_mty_attrs mty _2 ) -# 7666 "parsing/parser.ml" - : 'module_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'module_type) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'module_type) in - Obj.repr( -# 868 "parsing/parser.mly" - ( mkmty(Pmty_functor(mknoloc "_", Some _1, _3)) ) -# 7674 "parsing/parser.ml" - : 'module_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'module_type) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'with_constraints) in - Obj.repr( -# 870 "parsing/parser.mly" - ( mkmty(Pmty_with(_1, List.rev _3)) ) -# 7682 "parsing/parser.ml" - : 'module_type)) -; (fun __caml_parser_env -> - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'attributes) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'module_expr) in - Obj.repr( -# 872 "parsing/parser.mly" - ( mkmty ~attrs:_4 (Pmty_typeof _5) ) -# 7690 "parsing/parser.ml" - : 'module_type)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in - Obj.repr( -# 876 "parsing/parser.mly" - ( _2 ) -# 7697 "parsing/parser.ml" - : 'module_type)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in - Obj.repr( -# 878 "parsing/parser.mly" - ( unclosed "(" 1 ")" 3 ) -# 7704 "parsing/parser.ml" - : 'module_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in - Obj.repr( -# 880 "parsing/parser.mly" - ( mkmty(Pmty_extension _1) ) -# 7711 "parsing/parser.ml" - : 'module_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in - Obj.repr( -# 882 "parsing/parser.mly" - ( Mty.attr _1 _2 ) -# 7719 "parsing/parser.ml" - : 'module_type)) -; (fun __caml_parser_env -> - Obj.repr( -# 885 "parsing/parser.mly" - ( [] ) -# 7725 "parsing/parser.ml" - : 'signature)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'signature) in - Obj.repr( -# 886 "parsing/parser.mly" - ( (text_sig 1) @ _2 ) -# 7732 "parsing/parser.ml" - : 'signature)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'signature_item) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'signature) in - Obj.repr( -# 887 "parsing/parser.mly" - ( (text_sig 1) @ _1 :: _2 ) -# 7740 "parsing/parser.ml" - : 'signature)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'value_description) in - Obj.repr( -# 891 "parsing/parser.mly" - ( let (body, ext) = _1 in mksig_ext (Psig_value body) ext ) -# 7747 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'primitive_declaration) in - Obj.repr( -# 893 "parsing/parser.mly" - ( let (body, ext) = _1 in mksig_ext (Psig_value body) ext) -# 7754 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_declarations) in - Obj.repr( -# 895 "parsing/parser.mly" - ( let (nr, l, ext) = _1 in mksig_ext (Psig_type (nr, List.rev l)) ext ) -# 7761 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'sig_type_extension) in - Obj.repr( -# 897 "parsing/parser.mly" - ( let (l, ext) = _1 in mksig_ext (Psig_typext l) ext ) -# 7768 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'sig_exception_declaration) in - Obj.repr( -# 899 "parsing/parser.mly" - ( let (l, ext) = _1 in mksig_ext (Psig_exception l) ext ) -# 7775 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_declaration) in - Obj.repr( -# 901 "parsing/parser.mly" - ( let (body, ext) = _1 in mksig_ext (Psig_module body) ext ) -# 7782 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_alias) in - Obj.repr( -# 903 "parsing/parser.mly" - ( let (body, ext) = _1 in mksig_ext (Psig_module body) ext ) -# 7789 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'rec_module_declarations) in - Obj.repr( -# 905 "parsing/parser.mly" - ( let (l, ext) = _1 in mksig_ext (Psig_recmodule (List.rev l)) ext ) -# 7796 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_type_declaration) in - Obj.repr( -# 907 "parsing/parser.mly" - ( let (body, ext) = _1 in mksig_ext (Psig_modtype body) ext ) -# 7803 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'open_statement) in - Obj.repr( -# 909 "parsing/parser.mly" - ( let (body, ext) = _1 in mksig_ext (Psig_open body) ext ) -# 7810 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'sig_include_statement) in - Obj.repr( -# 911 "parsing/parser.mly" - ( let (body, ext) = _1 in mksig_ext (Psig_include body) ext ) -# 7817 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_descriptions) in - Obj.repr( -# 913 "parsing/parser.mly" - ( let (l, ext) = _1 in mksig_ext (Psig_class (List.rev l)) ext ) -# 7824 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_type_declarations) in - Obj.repr( -# 915 "parsing/parser.mly" - ( let (l, ext) = _1 in mksig_ext (Psig_class_type (List.rev l)) ext ) -# 7831 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'item_extension) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 917 "parsing/parser.mly" - ( mksig(Psig_extension (_1, (add_docs_attrs (symbol_docs ()) _2))) ) -# 7839 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'floating_attribute) in - Obj.repr( -# 919 "parsing/parser.mly" - ( mark_symbol_docs (); - mksig(Psig_attribute _1) ) -# 7847 "parsing/parser.ml" - : 'signature_item)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'override_flag) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'mod_longident) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 924 "parsing/parser.mly" - ( let (ext, attrs) = _3 in - Opn.mk (mkrhs _4 4) ~override:_2 ~attrs:(attrs@_5) - ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) - , ext) -# 7860 "parsing/parser.ml" - : 'open_statement)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 931 "parsing/parser.mly" - ( let (ext, attrs) = _2 in - Incl.mk _3 ~attrs:(attrs@_4) - ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) - , ext) -# 7872 "parsing/parser.ml" - : 'sig_include_statement)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'module_type) in - Obj.repr( -# 938 "parsing/parser.mly" - ( _2 ) -# 7879 "parsing/parser.ml" - : 'module_declaration_body)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'module_type) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'module_declaration_body) in - Obj.repr( -# 940 "parsing/parser.mly" - ( mkmty(Pmty_functor(mkrhs _2 2, Some _4, _6)) ) -# 7888 "parsing/parser.ml" - : 'module_declaration_body)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'module_declaration_body) in - Obj.repr( -# 942 "parsing/parser.mly" - ( mkmty(Pmty_functor(mkrhs "*" 1, None, _3)) ) -# 7895 "parsing/parser.ml" - : 'module_declaration_body)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_declaration_body) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 946 "parsing/parser.mly" - ( let (ext, attrs) = _2 in - Md.mk (mkrhs _3 3) _4 ~attrs:(attrs@_5) - ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) - , ext ) -# 7908 "parsing/parser.ml" - : 'module_declaration)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'mod_longident) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 953 "parsing/parser.mly" - ( let (ext, attrs) = _2 in - Md.mk (mkrhs _3 3) - (Mty.alias ~loc:(rhs_loc 5) (mkrhs _5 5)) ~attrs:(attrs@_6) - ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) - , ext ) -# 7922 "parsing/parser.ml" - : 'module_alias)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'rec_module_declaration) in - Obj.repr( -# 961 "parsing/parser.mly" - ( let (body, ext) = _1 in ([body], ext) ) -# 7929 "parsing/parser.ml" - : 'rec_module_declarations)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'rec_module_declarations) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'and_module_declaration) in - Obj.repr( -# 963 "parsing/parser.mly" - ( let (l, ext) = _1 in (_2 :: l, ext) ) -# 7937 "parsing/parser.ml" - : 'rec_module_declarations)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 967 "parsing/parser.mly" - ( let (ext, attrs) = _2 in - Md.mk (mkrhs _4 4) _6 ~attrs:(attrs@_7) - ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) - , ext) -# 7950 "parsing/parser.ml" - : 'rec_module_declaration)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 974 "parsing/parser.mly" - ( Md.mk (mkrhs _3 3) _5 ~attrs:(_2@_6) ~loc:(symbol_rloc()) - ~text:(symbol_text()) ~docs:(symbol_docs()) ) -# 7961 "parsing/parser.ml" - : 'and_module_declaration)) -; (fun __caml_parser_env -> - Obj.repr( -# 978 "parsing/parser.mly" - ( None ) -# 7967 "parsing/parser.ml" - : 'module_type_declaration_body)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'module_type) in - Obj.repr( -# 979 "parsing/parser.mly" - ( Some _2 ) -# 7974 "parsing/parser.ml" - : 'module_type_declaration_body)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'ident) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'module_type_declaration_body) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 984 "parsing/parser.mly" - ( let (ext, attrs) = _3 in - Mtd.mk (mkrhs _4 4) ?typ:_5 ~attrs:(attrs@_6) - ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) - , ext ) -# 7987 "parsing/parser.ml" - : 'module_type_declaration)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_declaration) in - Obj.repr( -# 993 "parsing/parser.mly" - ( let (body, ext) = _1 in ([body], ext) ) -# 7994 "parsing/parser.ml" - : 'class_declarations)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_declarations) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'and_class_declaration) in - Obj.repr( -# 995 "parsing/parser.mly" - ( let (l, ext) = _1 in (_2 :: l, ext) ) -# 8002 "parsing/parser.ml" - : 'class_declarations)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'virtual_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'class_type_parameters) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'class_fun_binding) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1000 "parsing/parser.mly" - ( let (ext, attrs) = _2 in - Ci.mk (mkrhs _5 5) _6 ~virt:_3 ~params:_4 ~attrs:(attrs@_7) - ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) - , ext ) -# 8017 "parsing/parser.ml" - : 'class_declaration)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'virtual_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'class_type_parameters) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'class_fun_binding) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1008 "parsing/parser.mly" - ( Ci.mk (mkrhs _5 5) _6 ~virt:_3 ~params:_4 - ~attrs:(_2@_7) ~loc:(symbol_rloc ()) - ~text:(symbol_text ()) ~docs:(symbol_docs ()) ) -# 8031 "parsing/parser.ml" - : 'and_class_declaration)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_expr) in - Obj.repr( -# 1014 "parsing/parser.mly" - ( _2 ) -# 8038 "parsing/parser.ml" - : 'class_fun_binding)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'class_type) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'class_expr) in - Obj.repr( -# 1016 "parsing/parser.mly" - ( mkclass(Pcl_constraint(_4, _2)) ) -# 8046 "parsing/parser.ml" - : 'class_fun_binding)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'labeled_simple_pattern) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_fun_binding) in - Obj.repr( -# 1018 "parsing/parser.mly" - ( let (l,o,p) = _1 in mkclass(Pcl_fun(l, o, p, _2)) ) -# 8054 "parsing/parser.ml" - : 'class_fun_binding)) -; (fun __caml_parser_env -> - Obj.repr( -# 1021 "parsing/parser.mly" - ( [] ) -# 8060 "parsing/parser.ml" - : 'class_type_parameters)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'type_parameter_list) in - Obj.repr( -# 1022 "parsing/parser.mly" - ( List.rev _2 ) -# 8067 "parsing/parser.ml" - : 'class_type_parameters)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'labeled_simple_pattern) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'class_expr) in - Obj.repr( -# 1026 "parsing/parser.mly" - ( let (l,o,p) = _1 in mkclass(Pcl_fun(l, o, p, _3)) ) -# 8075 "parsing/parser.ml" - : 'class_fun_def)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'labeled_simple_pattern) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_fun_def) in - Obj.repr( -# 1028 "parsing/parser.mly" - ( let (l,o,p) = _1 in mkclass(Pcl_fun(l, o, p, _2)) ) -# 8083 "parsing/parser.ml" - : 'class_fun_def)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_simple_expr) in - Obj.repr( -# 1032 "parsing/parser.mly" - ( _1 ) -# 8090 "parsing/parser.ml" - : 'class_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'class_fun_def) in - Obj.repr( -# 1034 "parsing/parser.mly" - ( wrap_class_attrs _3 _2 ) -# 8098 "parsing/parser.ml" - : 'class_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_simple_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_labeled_expr_list) in - Obj.repr( -# 1036 "parsing/parser.mly" - ( mkclass(Pcl_apply(_1, List.rev _2)) ) -# 8106 "parsing/parser.ml" - : 'class_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'let_bindings) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'class_expr) in - Obj.repr( -# 1038 "parsing/parser.mly" - ( class_of_let_bindings _1 _3 ) -# 8114 "parsing/parser.ml" - : 'class_expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'override_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'class_expr) in - Obj.repr( -# 1040 "parsing/parser.mly" - ( wrap_class_attrs (mkclass(Pcl_open(_3, mkrhs _5 5, _7))) _4 ) -# 8124 "parsing/parser.ml" - : 'class_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in - Obj.repr( -# 1042 "parsing/parser.mly" - ( Cl.attr _1 _2 ) -# 8132 "parsing/parser.ml" - : 'class_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in - Obj.repr( -# 1044 "parsing/parser.mly" - ( mkclass(Pcl_extension _1) ) -# 8139 "parsing/parser.ml" - : 'class_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'core_type_comma_list) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'class_longident) in - Obj.repr( -# 1048 "parsing/parser.mly" - ( mkclass(Pcl_constr(mkloc _4 (rhs_loc 4), List.rev _2)) ) -# 8147 "parsing/parser.ml" - : 'class_simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_longident) in - Obj.repr( -# 1050 "parsing/parser.mly" - ( mkclass(Pcl_constr(mkrhs _1 1, [])) ) -# 8154 "parsing/parser.ml" - : 'class_simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'class_structure) in - Obj.repr( -# 1052 "parsing/parser.mly" - ( mkclass ~attrs:_2 (Pcl_structure _3) ) -# 8162 "parsing/parser.ml" - : 'class_simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'class_structure) in - Obj.repr( -# 1054 "parsing/parser.mly" - ( unclosed "object" 1 "end" 4 ) -# 8170 "parsing/parser.ml" - : 'class_simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'class_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'class_type) in - Obj.repr( -# 1056 "parsing/parser.mly" - ( mkclass(Pcl_constraint(_2, _4)) ) -# 8178 "parsing/parser.ml" - : 'class_simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'class_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'class_type) in - Obj.repr( -# 1058 "parsing/parser.mly" - ( unclosed "(" 1 ")" 5 ) -# 8186 "parsing/parser.ml" - : 'class_simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'class_expr) in - Obj.repr( -# 1060 "parsing/parser.mly" - ( _2 ) -# 8193 "parsing/parser.ml" - : 'class_simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'class_expr) in - Obj.repr( -# 1062 "parsing/parser.mly" - ( unclosed "(" 1 ")" 3 ) -# 8200 "parsing/parser.ml" - : 'class_simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_self_pattern) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_fields) in - Obj.repr( -# 1066 "parsing/parser.mly" - ( Cstr.mk _1 (extra_cstr 2 (List.rev _2)) ) -# 8208 "parsing/parser.ml" - : 'class_structure)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in - Obj.repr( -# 1070 "parsing/parser.mly" - ( reloc_pat _2 ) -# 8215 "parsing/parser.ml" - : 'class_self_pattern)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'pattern) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in - Obj.repr( -# 1072 "parsing/parser.mly" - ( mkpat(Ppat_constraint(_2, _4)) ) -# 8223 "parsing/parser.ml" - : 'class_self_pattern)) -; (fun __caml_parser_env -> - Obj.repr( -# 1074 "parsing/parser.mly" - ( ghpat(Ppat_any) ) -# 8229 "parsing/parser.ml" - : 'class_self_pattern)) -; (fun __caml_parser_env -> - Obj.repr( -# 1078 "parsing/parser.mly" - ( [] ) -# 8235 "parsing/parser.ml" - : 'class_fields)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_fields) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_field) in - Obj.repr( -# 1080 "parsing/parser.mly" - ( _2 :: (text_cstr 2) @ _1 ) -# 8243 "parsing/parser.ml" - : 'class_fields)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : 'override_flag) in - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'class_expr) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'parent_binder) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1085 "parsing/parser.mly" - ( mkcf (Pcf_inherit (_2, _4, _5)) ~attrs:(_3@_6) ~docs:(symbol_docs ()) ) -# 8254 "parsing/parser.ml" - : 'class_field)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'value) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1087 "parsing/parser.mly" - ( let v, attrs = _2 in - mkcf (Pcf_val v) ~attrs:(attrs@_3) ~docs:(symbol_docs ()) ) -# 8263 "parsing/parser.ml" - : 'class_field)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'method_) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1090 "parsing/parser.mly" - ( let meth, attrs = _2 in - mkcf (Pcf_method meth) ~attrs:(attrs@_3) ~docs:(symbol_docs ()) ) -# 8272 "parsing/parser.ml" - : 'class_field)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'constrain_field) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1093 "parsing/parser.mly" - ( mkcf (Pcf_constraint _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) -# 8281 "parsing/parser.ml" - : 'class_field)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1095 "parsing/parser.mly" - ( mkcf (Pcf_initializer _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) -# 8290 "parsing/parser.ml" - : 'class_field)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'item_extension) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1097 "parsing/parser.mly" - ( mkcf (Pcf_extension _1) ~attrs:_2 ~docs:(symbol_docs ()) ) -# 8298 "parsing/parser.ml" - : 'class_field)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'floating_attribute) in - Obj.repr( -# 1099 "parsing/parser.mly" - ( mark_symbol_docs (); - mkcf (Pcf_attribute _1) ) -# 8306 "parsing/parser.ml" - : 'class_field)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 1104 "parsing/parser.mly" - ( Some (mkrhs _2 2) ) -# 8313 "parsing/parser.ml" - : 'parent_binder)) -; (fun __caml_parser_env -> - Obj.repr( -# 1106 "parsing/parser.mly" - ( None ) -# 8319 "parsing/parser.ml" - : 'parent_binder)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'override_flag) in - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'label) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1111 "parsing/parser.mly" - ( if _1 = Override then syntax_error (); - (mkloc _5 (rhs_loc 5), Mutable, Cfk_virtual _7), _2 ) -# 8330 "parsing/parser.ml" - : 'value)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'override_flag) in - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'mutable_flag) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'label) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1114 "parsing/parser.mly" - ( if _1 = Override then syntax_error (); - (mkrhs _5 5, _4, Cfk_virtual _7), _2 ) -# 8342 "parsing/parser.ml" - : 'value)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 5 : 'override_flag) in - let _2 = (Parsing.peek_val __caml_parser_env 4 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'mutable_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'label) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1117 "parsing/parser.mly" - ( (mkrhs _4 4, _3, Cfk_concrete (_1, _6)), _2 ) -# 8353 "parsing/parser.ml" - : 'value)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'override_flag) in - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mutable_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'label) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'type_constraint) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1119 "parsing/parser.mly" - ( - let e = mkexp_constraint _7 _5 in - (mkrhs _4 4, _3, Cfk_concrete (_1, e)), _2 - ) -# 8368 "parsing/parser.ml" - : 'value)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'override_flag) in - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'label) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'poly_type) in - Obj.repr( -# 1127 "parsing/parser.mly" - ( if _1 = Override then syntax_error (); - (mkloc _5 (rhs_loc 5), Private, Cfk_virtual _7), _2 ) -# 8379 "parsing/parser.ml" - : 'method_)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'override_flag) in - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'private_flag) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'label) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'poly_type) in - Obj.repr( -# 1130 "parsing/parser.mly" - ( if _1 = Override then syntax_error (); - (mkloc _5 (rhs_loc 5), _4, Cfk_virtual _7), _2 ) -# 8391 "parsing/parser.ml" - : 'method_)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'override_flag) in - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'private_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'label) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'strict_binding) in - Obj.repr( -# 1133 "parsing/parser.mly" - ( (mkloc _4 (rhs_loc 4), _3, - Cfk_concrete (_1, ghexp(Pexp_poly (_5, None)))), _2 ) -# 8403 "parsing/parser.ml" - : 'method_)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 7 : 'override_flag) in - let _2 = (Parsing.peek_val __caml_parser_env 6 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 5 : 'private_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 4 : 'label) in - let _6 = (Parsing.peek_val __caml_parser_env 2 : 'poly_type) in - let _8 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1136 "parsing/parser.mly" - ( (mkloc _4 (rhs_loc 4), _3, - Cfk_concrete (_1, ghexp(Pexp_poly(_8, Some _6)))), _2 ) -# 8416 "parsing/parser.ml" - : 'method_)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 10 : 'override_flag) in - let _2 = (Parsing.peek_val __caml_parser_env 9 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 8 : 'private_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 7 : 'label) in - let _7 = (Parsing.peek_val __caml_parser_env 4 : 'lident_list) in - let _9 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in - let _11 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1140 "parsing/parser.mly" - ( let exp, poly = wrap_type_annotation _7 _9 _11 in - (mkloc _4 (rhs_loc 4), _3, - Cfk_concrete (_1, ghexp(Pexp_poly(exp, Some poly)))), _2 ) -# 8431 "parsing/parser.ml" - : 'method_)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_signature) in - Obj.repr( -# 1149 "parsing/parser.mly" - ( _1 ) -# 8438 "parsing/parser.ml" - : 'class_type)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'simple_core_type_or_tuple) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'class_type) in - Obj.repr( -# 1152 "parsing/parser.mly" - ( mkcty(Pcty_arrow(Optional _2 , _4, _6)) ) -# 8447 "parsing/parser.ml" - : 'class_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'simple_core_type_or_tuple) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'class_type) in - Obj.repr( -# 1154 "parsing/parser.mly" - ( mkcty(Pcty_arrow(Optional _1, _2, _4)) ) -# 8456 "parsing/parser.ml" - : 'class_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : string) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'simple_core_type_or_tuple) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'class_type) in - Obj.repr( -# 1156 "parsing/parser.mly" - ( mkcty(Pcty_arrow(Labelled _1, _3, _5)) ) -# 8465 "parsing/parser.ml" - : 'class_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'simple_core_type_or_tuple) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'class_type) in - Obj.repr( -# 1158 "parsing/parser.mly" - ( mkcty(Pcty_arrow(Nolabel, _1, _3)) ) -# 8473 "parsing/parser.ml" - : 'class_type)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'core_type_comma_list) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'clty_longident) in - Obj.repr( -# 1162 "parsing/parser.mly" - ( mkcty(Pcty_constr (mkloc _4 (rhs_loc 4), List.rev _2)) ) -# 8481 "parsing/parser.ml" - : 'class_signature)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'clty_longident) in - Obj.repr( -# 1164 "parsing/parser.mly" - ( mkcty(Pcty_constr (mkrhs _1 1, [])) ) -# 8488 "parsing/parser.ml" - : 'class_signature)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'class_sig_body) in - Obj.repr( -# 1166 "parsing/parser.mly" - ( mkcty ~attrs:_2 (Pcty_signature _3) ) -# 8496 "parsing/parser.ml" - : 'class_signature)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'class_sig_body) in - Obj.repr( -# 1168 "parsing/parser.mly" - ( unclosed "object" 1 "end" 4 ) -# 8504 "parsing/parser.ml" - : 'class_signature)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_signature) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in - Obj.repr( -# 1170 "parsing/parser.mly" - ( Cty.attr _1 _2 ) -# 8512 "parsing/parser.ml" - : 'class_signature)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in - Obj.repr( -# 1172 "parsing/parser.mly" - ( mkcty(Pcty_extension _1) ) -# 8519 "parsing/parser.ml" - : 'class_signature)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'override_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'class_signature) in - Obj.repr( -# 1174 "parsing/parser.mly" - ( wrap_class_type_attrs (mkcty(Pcty_open(_3, mkrhs _5 5, _7))) _4 ) -# 8529 "parsing/parser.ml" - : 'class_signature)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_self_type) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_sig_fields) in - Obj.repr( -# 1178 "parsing/parser.mly" - ( Csig.mk _1 (extra_csig 2 (List.rev _2)) ) -# 8537 "parsing/parser.ml" - : 'class_sig_body)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in - Obj.repr( -# 1182 "parsing/parser.mly" - ( _2 ) -# 8544 "parsing/parser.ml" - : 'class_self_type)) -; (fun __caml_parser_env -> - Obj.repr( -# 1184 "parsing/parser.mly" - ( mktyp(Ptyp_any) ) -# 8550 "parsing/parser.ml" - : 'class_self_type)) -; (fun __caml_parser_env -> - Obj.repr( -# 1187 "parsing/parser.mly" - ( [] ) -# 8556 "parsing/parser.ml" - : 'class_sig_fields)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_sig_fields) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_sig_field) in - Obj.repr( -# 1188 "parsing/parser.mly" - ( _2 :: (text_csig 2) @ _1 ) -# 8564 "parsing/parser.ml" - : 'class_sig_fields)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'class_signature) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1192 "parsing/parser.mly" - ( mkctf (Pctf_inherit _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) -# 8573 "parsing/parser.ml" - : 'class_sig_field)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'value_type) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1194 "parsing/parser.mly" - ( mkctf (Pctf_val _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) -# 8582 "parsing/parser.ml" - : 'class_sig_field)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'private_virtual_flags) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'label) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'poly_type) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1197 "parsing/parser.mly" - ( - let (p, v) = _3 in - mkctf (Pctf_method (mkrhs _4 4, p, v, _6)) ~attrs:(_2@_7) ~docs:(symbol_docs ()) - ) -# 8596 "parsing/parser.ml" - : 'class_sig_field)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'constrain_field) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1202 "parsing/parser.mly" - ( mkctf (Pctf_constraint _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) -# 8605 "parsing/parser.ml" - : 'class_sig_field)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'item_extension) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1204 "parsing/parser.mly" - ( mkctf (Pctf_extension _1) ~attrs:_2 ~docs:(symbol_docs ()) ) -# 8613 "parsing/parser.ml" - : 'class_sig_field)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'floating_attribute) in - Obj.repr( -# 1206 "parsing/parser.mly" - ( mark_symbol_docs (); - mkctf(Pctf_attribute _1) ) -# 8621 "parsing/parser.ml" - : 'class_sig_field)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'mutable_flag) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'label) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1211 "parsing/parser.mly" - ( mkrhs _3 3, _2, Virtual, _5 ) -# 8630 "parsing/parser.ml" - : 'value_type)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'virtual_flag) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'label) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1213 "parsing/parser.mly" - ( mkrhs _3 3, Mutable, _2, _5 ) -# 8639 "parsing/parser.ml" - : 'value_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'label) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1215 "parsing/parser.mly" - ( mkrhs _1 1, Immutable, Concrete, _3 ) -# 8647 "parsing/parser.ml" - : 'value_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1218 "parsing/parser.mly" - ( _1, _3, symbol_rloc() ) -# 8655 "parsing/parser.ml" - : 'constrain)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1221 "parsing/parser.mly" - ( _1, _3 ) -# 8663 "parsing/parser.ml" - : 'constrain_field)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_description) in - Obj.repr( -# 1225 "parsing/parser.mly" - ( let (body, ext) = _1 in ([body],ext) ) -# 8670 "parsing/parser.ml" - : 'class_descriptions)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_descriptions) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'and_class_description) in - Obj.repr( -# 1227 "parsing/parser.mly" - ( let (l, ext) = _1 in (_2 :: l, ext) ) -# 8678 "parsing/parser.ml" - : 'class_descriptions)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 6 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 5 : 'virtual_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 4 : 'class_type_parameters) in - let _5 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _7 = (Parsing.peek_val __caml_parser_env 1 : 'class_type) in - let _8 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1232 "parsing/parser.mly" - ( let (ext, attrs) = _2 in - Ci.mk (mkrhs _5 5) _7 ~virt:_3 ~params:_4 ~attrs:(attrs @ _8) - ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) - , ext ) -# 8693 "parsing/parser.ml" - : 'class_description)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 6 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 5 : 'virtual_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 4 : 'class_type_parameters) in - let _5 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _7 = (Parsing.peek_val __caml_parser_env 1 : 'class_type) in - let _8 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1240 "parsing/parser.mly" - ( Ci.mk (mkrhs _5 5) _7 ~virt:_3 ~params:_4 - ~attrs:(_2@_8) ~loc:(symbol_rloc ()) - ~text:(symbol_text ()) ~docs:(symbol_docs ()) ) -# 8707 "parsing/parser.ml" - : 'and_class_description)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_type_declaration) in - Obj.repr( -# 1246 "parsing/parser.mly" - ( let (body, ext) = _1 in ([body],ext) ) -# 8714 "parsing/parser.ml" - : 'class_type_declarations)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_type_declarations) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'and_class_type_declaration) in - Obj.repr( -# 1248 "parsing/parser.mly" - ( let (l, ext) = _1 in (_2 :: l, ext) ) -# 8722 "parsing/parser.ml" - : 'class_type_declarations)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 6 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 5 : 'virtual_flag) in - let _5 = (Parsing.peek_val __caml_parser_env 4 : 'class_type_parameters) in - let _6 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _8 = (Parsing.peek_val __caml_parser_env 1 : 'class_signature) in - let _9 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1253 "parsing/parser.mly" - ( let (ext, attrs) = _3 in - Ci.mk (mkrhs _6 6) _8 ~virt:_4 ~params:_5 ~attrs:(attrs@_9) - ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) - , ext) -# 8737 "parsing/parser.ml" - : 'class_type_declaration)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 6 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 5 : 'virtual_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 4 : 'class_type_parameters) in - let _5 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _7 = (Parsing.peek_val __caml_parser_env 1 : 'class_signature) in - let _8 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1261 "parsing/parser.mly" - ( Ci.mk (mkrhs _5 5) _7 ~virt:_3 ~params:_4 - ~attrs:(_2@_8) ~loc:(symbol_rloc ()) - ~text:(symbol_text ()) ~docs:(symbol_docs ()) ) -# 8751 "parsing/parser.ml" - : 'and_class_type_declaration)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1269 "parsing/parser.mly" - ( _1 ) -# 8758 "parsing/parser.ml" - : 'seq_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1270 "parsing/parser.mly" - ( _1 ) -# 8765 "parsing/parser.ml" - : 'seq_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1271 "parsing/parser.mly" - ( mkexp(Pexp_sequence(_1, _3)) ) -# 8773 "parsing/parser.ml" - : 'seq_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'expr) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'attr_id) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1273 "parsing/parser.mly" - ( let seq = mkexp(Pexp_sequence (_1, _5)) in - let payload = PStr [mkstrexp seq []] in - mkexp (Pexp_extension (_4, payload)) ) -# 8784 "parsing/parser.ml" - : 'seq_expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'label_let_pattern) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'opt_default) in - Obj.repr( -# 1279 "parsing/parser.mly" - ( (Optional (fst _3), _4, snd _3) ) -# 8792 "parsing/parser.ml" - : 'labeled_simple_pattern)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_var) in - Obj.repr( -# 1281 "parsing/parser.mly" - ( (Optional (fst _2), None, snd _2) ) -# 8799 "parsing/parser.ml" - : 'labeled_simple_pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : string) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'let_pattern) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'opt_default) in - Obj.repr( -# 1283 "parsing/parser.mly" - ( (Optional _1, _4, _3) ) -# 8808 "parsing/parser.ml" - : 'labeled_simple_pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'pattern_var) in - Obj.repr( -# 1285 "parsing/parser.mly" - ( (Optional _1, None, _2) ) -# 8816 "parsing/parser.ml" - : 'labeled_simple_pattern)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'label_let_pattern) in - Obj.repr( -# 1287 "parsing/parser.mly" - ( (Labelled (fst _3), None, snd _3) ) -# 8823 "parsing/parser.ml" - : 'labeled_simple_pattern)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_var) in - Obj.repr( -# 1289 "parsing/parser.mly" - ( (Labelled (fst _2), None, snd _2) ) -# 8830 "parsing/parser.ml" - : 'labeled_simple_pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_pattern) in - Obj.repr( -# 1291 "parsing/parser.mly" - ( (Labelled _1, None, _2) ) -# 8838 "parsing/parser.ml" - : 'labeled_simple_pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_pattern) in - Obj.repr( -# 1293 "parsing/parser.mly" - ( (Nolabel, None, _1) ) -# 8845 "parsing/parser.ml" - : 'labeled_simple_pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 1296 "parsing/parser.mly" - ( mkpat(Ppat_var (mkrhs _1 1)) ) -# 8852 "parsing/parser.ml" - : 'pattern_var)) -; (fun __caml_parser_env -> - Obj.repr( -# 1297 "parsing/parser.mly" - ( mkpat Ppat_any ) -# 8858 "parsing/parser.ml" - : 'pattern_var)) -; (fun __caml_parser_env -> - Obj.repr( -# 1300 "parsing/parser.mly" - ( None ) -# 8864 "parsing/parser.ml" - : 'opt_default)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1301 "parsing/parser.mly" - ( Some _2 ) -# 8871 "parsing/parser.ml" - : 'opt_default)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label_var) in - Obj.repr( -# 1305 "parsing/parser.mly" - ( _1 ) -# 8878 "parsing/parser.ml" - : 'label_let_pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'label_var) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1307 "parsing/parser.mly" - ( let (lab, pat) = _1 in (lab, mkpat(Ppat_constraint(pat, _3))) ) -# 8886 "parsing/parser.ml" - : 'label_let_pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 1310 "parsing/parser.mly" - ( (_1, mkpat(Ppat_var (mkrhs _1 1))) ) -# 8893 "parsing/parser.ml" - : 'label_var)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1314 "parsing/parser.mly" - ( _1 ) -# 8900 "parsing/parser.ml" - : 'let_pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1316 "parsing/parser.mly" - ( mkpat(Ppat_constraint(_1, _3)) ) -# 8908 "parsing/parser.ml" - : 'let_pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in - Obj.repr( -# 1320 "parsing/parser.mly" - ( _1 ) -# 8915 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'simple_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_labeled_expr_list) in - Obj.repr( -# 1322 "parsing/parser.mly" - ( mkexp(Pexp_apply(_1, List.rev _2)) ) -# 8923 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'let_bindings) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1324 "parsing/parser.mly" - ( expr_of_let_bindings _1 _3 ) -# 8931 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'module_binding_body) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1326 "parsing/parser.mly" - ( mkexp_attrs (Pexp_letmodule(mkrhs _4 4, _5, _7)) _3 ) -# 8941 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'let_exception_declaration) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1328 "parsing/parser.mly" - ( mkexp_attrs (Pexp_letexception(_4, _6)) _3 ) -# 8950 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'override_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1330 "parsing/parser.mly" - ( mkexp_attrs (Pexp_open(_3, mkrhs _5 5, _7)) _4 ) -# 8960 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_bar) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'match_cases) in - Obj.repr( -# 1332 "parsing/parser.mly" - ( mkexp_attrs (Pexp_function(List.rev _4)) _2 ) -# 8969 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'labeled_simple_pattern) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'fun_def) in - Obj.repr( -# 1334 "parsing/parser.mly" - ( let (l,o,p) = _3 in - mkexp_attrs (Pexp_fun(l, o, p, _4)) _2 ) -# 8979 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'ext_attributes) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'lident_list) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'fun_def) in - Obj.repr( -# 1337 "parsing/parser.mly" - ( mkexp_attrs (mk_newtypes _5 _7).pexp_desc _2 ) -# 8988 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'seq_expr) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'opt_bar) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'match_cases) in - Obj.repr( -# 1339 "parsing/parser.mly" - ( mkexp_attrs (Pexp_match(_3, List.rev _6)) _2 ) -# 8998 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'seq_expr) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'opt_bar) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'match_cases) in - Obj.repr( -# 1341 "parsing/parser.mly" - ( mkexp_attrs (Pexp_try(_3, List.rev _6)) _2 ) -# 9008 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'seq_expr) in - Obj.repr( -# 1343 "parsing/parser.mly" - ( syntax_error() ) -# 9016 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'expr_comma_list) in - Obj.repr( -# 1345 "parsing/parser.mly" - ( mkexp(Pexp_tuple(List.rev _1)) ) -# 9023 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'constr_longident) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in - Obj.repr( -# 1347 "parsing/parser.mly" - ( mkexp(Pexp_construct(mkrhs _1 1, Some _2)) ) -# 9031 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'name_tag) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in - Obj.repr( -# 1349 "parsing/parser.mly" - ( mkexp(Pexp_variant(_1, Some _2)) ) -# 9039 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'seq_expr) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1351 "parsing/parser.mly" - ( mkexp_attrs(Pexp_ifthenelse(_3, _5, Some _7)) _2 ) -# 9049 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'seq_expr) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1353 "parsing/parser.mly" - ( mkexp_attrs (Pexp_ifthenelse(_3, _5, None)) _2 ) -# 9058 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'seq_expr) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - Obj.repr( -# 1355 "parsing/parser.mly" - ( mkexp_attrs (Pexp_while(_3, _5)) _2 ) -# 9067 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 8 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 7 : 'pattern) in - let _5 = (Parsing.peek_val __caml_parser_env 5 : 'seq_expr) in - let _6 = (Parsing.peek_val __caml_parser_env 4 : 'direction_flag) in - let _7 = (Parsing.peek_val __caml_parser_env 3 : 'seq_expr) in - let _9 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - Obj.repr( -# 1358 "parsing/parser.mly" - ( mkexp_attrs(Pexp_for(_3, _5, _7, _6, _9)) _2 ) -# 9079 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1360 "parsing/parser.mly" - ( mkexp_cons (rhs_loc 2) (ghexp(Pexp_tuple[_1;_3])) (symbol_rloc()) ) -# 9087 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1362 "parsing/parser.mly" - ( mkinfix _1 _2 _3 ) -# 9096 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1364 "parsing/parser.mly" - ( mkinfix _1 _2 _3 ) -# 9105 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1366 "parsing/parser.mly" - ( mkinfix _1 _2 _3 ) -# 9114 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1368 "parsing/parser.mly" - ( mkinfix _1 _2 _3 ) -# 9123 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1370 "parsing/parser.mly" - ( mkinfix _1 _2 _3 ) -# 9132 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1372 "parsing/parser.mly" - ( mkinfix _1 "+" _3 ) -# 9140 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1374 "parsing/parser.mly" - ( mkinfix _1 "+." _3 ) -# 9148 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1376 "parsing/parser.mly" - ( mkinfix _1 "+=" _3 ) -# 9156 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1378 "parsing/parser.mly" - ( mkinfix _1 "-" _3 ) -# 9164 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1380 "parsing/parser.mly" - ( mkinfix _1 "-." _3 ) -# 9172 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1382 "parsing/parser.mly" - ( mkinfix _1 "*" _3 ) -# 9180 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1384 "parsing/parser.mly" - ( mkinfix _1 "%" _3 ) -# 9188 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1386 "parsing/parser.mly" - ( mkinfix _1 "=" _3 ) -# 9196 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1388 "parsing/parser.mly" - ( mkinfix _1 "<" _3 ) -# 9204 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1390 "parsing/parser.mly" - ( mkinfix _1 ">" _3 ) -# 9212 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1392 "parsing/parser.mly" - ( mkinfix _1 "or" _3 ) -# 9220 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1394 "parsing/parser.mly" - ( mkinfix _1 "||" _3 ) -# 9228 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1396 "parsing/parser.mly" - ( mkinfix _1 "&" _3 ) -# 9236 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1398 "parsing/parser.mly" - ( mkinfix _1 "&&" _3 ) -# 9244 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1400 "parsing/parser.mly" - ( mkinfix _1 ":=" _3 ) -# 9252 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'subtractive) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1402 "parsing/parser.mly" - ( mkuminus _1 _2 ) -# 9260 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'additive) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1404 "parsing/parser.mly" - ( mkuplus _1 _2 ) -# 9268 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'label_longident) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1406 "parsing/parser.mly" - ( mkexp(Pexp_setfield(_1, mkrhs _3 3, _5)) ) -# 9277 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'seq_expr) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1408 "parsing/parser.mly" - ( mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "Array" "set")), - [Nolabel,_1; Nolabel,_4; Nolabel,_7])) ) -# 9287 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'seq_expr) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1411 "parsing/parser.mly" - ( mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "String" "set")), - [Nolabel,_1; Nolabel,_4; Nolabel,_7])) ) -# 9297 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1414 "parsing/parser.mly" - ( bigarray_set _1 _4 _7 ) -# 9306 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 5 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1416 "parsing/parser.mly" - ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "[]<-")) in - mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _4; Nolabel, _7]) ) -# 9317 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 5 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1419 "parsing/parser.mly" - ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "()<-")) in - mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _4; Nolabel, _7]) ) -# 9328 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 5 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1422 "parsing/parser.mly" - ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "{}<-")) in - mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _4; Nolabel, _7]) ) -# 9339 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 8 : 'simple_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 6 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 5 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in - let _9 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1425 "parsing/parser.mly" - ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3,"." ^ _4 ^ "[]<-")) in - mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _6; Nolabel, _9]) ) -# 9351 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 8 : 'simple_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 6 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 5 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in - let _9 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1428 "parsing/parser.mly" - ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "()<-")) in - mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _6; Nolabel, _9]) ) -# 9363 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 8 : 'simple_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 6 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 5 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in - let _9 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1431 "parsing/parser.mly" - ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "{}<-")) in - mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _6; Nolabel, _9]) ) -# 9375 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'label) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1434 "parsing/parser.mly" - ( mkexp(Pexp_setinstvar(mkrhs _1 1, _3)) ) -# 9383 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in - Obj.repr( -# 1436 "parsing/parser.mly" - ( mkexp_attrs (Pexp_assert _3) _2 ) -# 9391 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in - Obj.repr( -# 1438 "parsing/parser.mly" - ( mkexp_attrs (Pexp_lazy _3) _2 ) -# 9399 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'class_structure) in - Obj.repr( -# 1440 "parsing/parser.mly" - ( mkexp_attrs (Pexp_object _3) _2 ) -# 9407 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'class_structure) in - Obj.repr( -# 1442 "parsing/parser.mly" - ( unclosed "object" 1 "end" 4 ) -# 9415 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in - Obj.repr( -# 1444 "parsing/parser.mly" - ( Exp.attr _1 _2 ) -# 9423 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - Obj.repr( -# 1446 "parsing/parser.mly" - ( not_expecting 1 "wildcard \"_\"" ) -# 9429 "parsing/parser.ml" - : 'expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'val_longident) in - Obj.repr( -# 1450 "parsing/parser.mly" - ( mkexp(Pexp_ident (mkrhs _1 1)) ) -# 9436 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constant) in - Obj.repr( -# 1452 "parsing/parser.mly" - ( mkexp(Pexp_constant _1) ) -# 9443 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constr_longident) in - Obj.repr( -# 1454 "parsing/parser.mly" - ( mkexp(Pexp_construct(mkrhs _1 1, None)) ) -# 9450 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'name_tag) in - Obj.repr( -# 1456 "parsing/parser.mly" - ( mkexp(Pexp_variant(_1, None)) ) -# 9457 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - Obj.repr( -# 1458 "parsing/parser.mly" - ( reloc_exp _2 ) -# 9464 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - Obj.repr( -# 1460 "parsing/parser.mly" - ( unclosed "(" 1 ")" 3 ) -# 9471 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - Obj.repr( -# 1462 "parsing/parser.mly" - ( wrap_exp_attrs (reloc_exp _3) _2 (* check location *) ) -# 9479 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ext_attributes) in - Obj.repr( -# 1464 "parsing/parser.mly" - ( mkexp_attrs (Pexp_construct (mkloc (Lident "()") (symbol_rloc ()), - None)) _2 ) -# 9487 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - Obj.repr( -# 1467 "parsing/parser.mly" - ( unclosed "begin" 1 "end" 4 ) -# 9495 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'seq_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'type_constraint) in - Obj.repr( -# 1469 "parsing/parser.mly" - ( mkexp_constraint _2 _3 ) -# 9503 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'simple_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'label_longident) in - Obj.repr( -# 1471 "parsing/parser.mly" - ( mkexp(Pexp_field(_1, mkrhs _3 3)) ) -# 9511 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - Obj.repr( -# 1473 "parsing/parser.mly" - ( mkexp(Pexp_open(Fresh, mkrhs _1 1, _4)) ) -# 9519 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in - Obj.repr( -# 1475 "parsing/parser.mly" - ( mkexp(Pexp_open(Fresh, mkrhs _1 1, - mkexp(Pexp_construct(mkrhs (Lident "()") 1, None)))) ) -# 9527 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - Obj.repr( -# 1478 "parsing/parser.mly" - ( unclosed "(" 3 ")" 5 ) -# 9535 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - Obj.repr( -# 1480 "parsing/parser.mly" - ( mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "Array" "get")), - [Nolabel,_1; Nolabel,_4])) ) -# 9544 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - Obj.repr( -# 1483 "parsing/parser.mly" - ( unclosed "(" 3 ")" 5 ) -# 9552 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - Obj.repr( -# 1485 "parsing/parser.mly" - ( mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "String" "get")), - [Nolabel,_1; Nolabel,_4])) ) -# 9561 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in - Obj.repr( -# 1488 "parsing/parser.mly" - ( unclosed "[" 3 "]" 5 ) -# 9569 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1490 "parsing/parser.mly" - ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "[]")) in - mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _4]) ) -# 9579 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1493 "parsing/parser.mly" - ( unclosed "[" 3 "]" 5 ) -# 9588 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1495 "parsing/parser.mly" - ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "()")) in - mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _4]) ) -# 9598 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1498 "parsing/parser.mly" - ( unclosed "(" 3 ")" 5 ) -# 9607 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1500 "parsing/parser.mly" - ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "{}")) in - mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _4]) ) -# 9617 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1503 "parsing/parser.mly" - ( unclosed "{" 3 "}" 5 ) -# 9626 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1505 "parsing/parser.mly" - ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "[]")) in - mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _6]) ) -# 9637 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1508 "parsing/parser.mly" - ( unclosed "[" 5 "]" 7 ) -# 9647 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1510 "parsing/parser.mly" - ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "()")) in - mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _6]) ) -# 9658 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1513 "parsing/parser.mly" - ( unclosed "(" 5 ")" 7 ) -# 9668 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1515 "parsing/parser.mly" - ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "{}")) in - mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _6]) ) -# 9679 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1518 "parsing/parser.mly" - ( unclosed "{" 5 "}" 7 ) -# 9689 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in - Obj.repr( -# 1520 "parsing/parser.mly" - ( bigarray_get _1 _4 ) -# 9697 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr_comma_list) in - Obj.repr( -# 1522 "parsing/parser.mly" - ( unclosed "{" 3 "}" 5 ) -# 9705 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'record_expr) in - Obj.repr( -# 1524 "parsing/parser.mly" - ( let (exten, fields) = _2 in mkexp (Pexp_record(fields, exten)) ) -# 9712 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'record_expr) in - Obj.repr( -# 1526 "parsing/parser.mly" - ( unclosed "{" 1 "}" 3 ) -# 9719 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'record_expr) in - Obj.repr( -# 1528 "parsing/parser.mly" - ( let (exten, fields) = _4 in - let rec_exp = mkexp(Pexp_record(fields, exten)) in - mkexp(Pexp_open(Fresh, mkrhs _1 1, rec_exp)) ) -# 9729 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'record_expr) in - Obj.repr( -# 1532 "parsing/parser.mly" - ( unclosed "{" 3 "}" 5 ) -# 9737 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in - Obj.repr( -# 1534 "parsing/parser.mly" - ( mkexp (Pexp_array(List.rev _2)) ) -# 9745 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in - Obj.repr( -# 1536 "parsing/parser.mly" - ( unclosed "[|" 1 "|]" 4 ) -# 9753 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - Obj.repr( -# 1538 "parsing/parser.mly" - ( mkexp (Pexp_array []) ) -# 9759 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 5 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in - Obj.repr( -# 1540 "parsing/parser.mly" - ( mkexp(Pexp_open(Fresh, mkrhs _1 1, mkexp(Pexp_array(List.rev _4)))) ) -# 9768 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in - Obj.repr( -# 1542 "parsing/parser.mly" - ( mkexp(Pexp_open(Fresh, mkrhs _1 1, mkexp(Pexp_array []))) ) -# 9775 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 5 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in - Obj.repr( -# 1544 "parsing/parser.mly" - ( unclosed "[|" 3 "|]" 6 ) -# 9784 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in - Obj.repr( -# 1546 "parsing/parser.mly" - ( reloc_exp (mktailexp (rhs_loc 4) (List.rev _2)) ) -# 9792 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in - Obj.repr( -# 1548 "parsing/parser.mly" - ( unclosed "[" 1 "]" 4 ) -# 9800 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 5 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in - Obj.repr( -# 1550 "parsing/parser.mly" - ( let list_exp = reloc_exp (mktailexp (rhs_loc 6) (List.rev _4)) in - mkexp(Pexp_open(Fresh, mkrhs _1 1, list_exp)) ) -# 9810 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in - Obj.repr( -# 1553 "parsing/parser.mly" - ( mkexp(Pexp_open(Fresh, mkrhs _1 1, - mkexp(Pexp_construct(mkrhs (Lident "[]") 1, None)))) ) -# 9818 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 5 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in - Obj.repr( -# 1556 "parsing/parser.mly" - ( unclosed "[" 3 "]" 6 ) -# 9827 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in - Obj.repr( -# 1558 "parsing/parser.mly" - ( mkexp(Pexp_apply(mkoperator _1 1, [Nolabel,_2])) ) -# 9835 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in - Obj.repr( -# 1560 "parsing/parser.mly" - ( mkexp(Pexp_apply(mkoperator "!" 1, [Nolabel,_2])) ) -# 9842 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'class_longident) in - Obj.repr( -# 1562 "parsing/parser.mly" - ( mkexp_attrs (Pexp_new(mkrhs _3 3)) _2 ) -# 9850 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'field_expr_list) in - Obj.repr( -# 1564 "parsing/parser.mly" - ( mkexp (Pexp_override _2) ) -# 9857 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'field_expr_list) in - Obj.repr( -# 1566 "parsing/parser.mly" - ( unclosed "{<" 1 ">}" 3 ) -# 9864 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - Obj.repr( -# 1568 "parsing/parser.mly" - ( mkexp (Pexp_override [])) -# 9870 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'field_expr_list) in - Obj.repr( -# 1570 "parsing/parser.mly" - ( mkexp(Pexp_open(Fresh, mkrhs _1 1, mkexp (Pexp_override _4)))) -# 9878 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in - Obj.repr( -# 1572 "parsing/parser.mly" - ( mkexp(Pexp_open(Fresh, mkrhs _1 1, mkexp (Pexp_override [])))) -# 9885 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'field_expr_list) in - Obj.repr( -# 1574 "parsing/parser.mly" - ( unclosed "{<" 3 ">}" 5 ) -# 9893 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'simple_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'label) in - Obj.repr( -# 1576 "parsing/parser.mly" - ( mkexp(Pexp_send(_1, mkrhs _3 3)) ) -# 9901 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'simple_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in - Obj.repr( -# 1578 "parsing/parser.mly" - ( mkinfix _1 _2 _3 ) -# 9910 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in - Obj.repr( -# 1580 "parsing/parser.mly" - ( mkexp_attrs (Pexp_pack _4) _3 ) -# 9918 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'module_expr) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in - Obj.repr( -# 1582 "parsing/parser.mly" - ( mkexp_attrs (Pexp_constraint (ghexp (Pexp_pack _4), - ghtyp (Ptyp_package _6))) - _3 ) -# 9929 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'module_expr) in - Obj.repr( -# 1586 "parsing/parser.mly" - ( unclosed "(" 1 ")" 6 ) -# 9937 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 8 : 'mod_longident) in - let _5 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in - let _6 = (Parsing.peek_val __caml_parser_env 3 : 'module_expr) in - let _8 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in - Obj.repr( -# 1589 "parsing/parser.mly" - ( mkexp(Pexp_open(Fresh, mkrhs _1 1, - mkexp_attrs (Pexp_constraint (ghexp (Pexp_pack _6), - ghtyp (Ptyp_package _8))) - _5 )) ) -# 9950 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 7 : 'mod_longident) in - let _5 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in - let _6 = (Parsing.peek_val __caml_parser_env 2 : 'module_expr) in - Obj.repr( -# 1594 "parsing/parser.mly" - ( unclosed "(" 3 ")" 8 ) -# 9959 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in - Obj.repr( -# 1596 "parsing/parser.mly" - ( mkexp (Pexp_extension _1) ) -# 9966 "parsing/parser.ml" - : 'simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'labeled_simple_expr) in - Obj.repr( -# 1600 "parsing/parser.mly" - ( [_1] ) -# 9973 "parsing/parser.ml" - : 'simple_labeled_expr_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'simple_labeled_expr_list) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'labeled_simple_expr) in - Obj.repr( -# 1602 "parsing/parser.mly" - ( _2 :: _1 ) -# 9981 "parsing/parser.ml" - : 'simple_labeled_expr_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in - Obj.repr( -# 1606 "parsing/parser.mly" - ( (Nolabel, _1) ) -# 9988 "parsing/parser.ml" - : 'labeled_simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label_expr) in - Obj.repr( -# 1608 "parsing/parser.mly" - ( _1 ) -# 9995 "parsing/parser.ml" - : 'labeled_simple_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in - Obj.repr( -# 1612 "parsing/parser.mly" - ( (Labelled _1, _2) ) -# 10003 "parsing/parser.ml" - : 'label_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_ident) in - Obj.repr( -# 1614 "parsing/parser.mly" - ( (Labelled (fst _2), snd _2) ) -# 10010 "parsing/parser.ml" - : 'label_expr)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_ident) in - Obj.repr( -# 1616 "parsing/parser.mly" - ( (Optional (fst _2), snd _2) ) -# 10017 "parsing/parser.ml" - : 'label_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in - Obj.repr( -# 1618 "parsing/parser.mly" - ( (Optional _1, _2) ) -# 10025 "parsing/parser.ml" - : 'label_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 1621 "parsing/parser.mly" - ( (_1, mkexp(Pexp_ident(mkrhs (Lident _1) 1))) ) -# 10032 "parsing/parser.ml" - : 'label_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 1624 "parsing/parser.mly" - ( [mkrhs _1 1] ) -# 10039 "parsing/parser.ml" - : 'lident_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'lident_list) in - Obj.repr( -# 1625 "parsing/parser.mly" - ( mkrhs _1 1 :: _2 ) -# 10047 "parsing/parser.ml" - : 'lident_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'val_ident) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'strict_binding) in - Obj.repr( -# 1629 "parsing/parser.mly" - ( (mkpatvar _1 1, _2) ) -# 10055 "parsing/parser.ml" - : 'let_binding_body)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'val_ident) in - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'type_constraint) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1631 "parsing/parser.mly" - ( let v = mkpatvar _1 1 in (* PR#7344 *) - let t = - match _2 with - Some t, None -> t - | _, Some t -> t - | _ -> assert false - in - (ghpat(Ppat_constraint(v, ghtyp(Ptyp_poly([],t)))), - mkexp_constraint _4 _2) ) -# 10072 "parsing/parser.ml" - : 'let_binding_body)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'val_ident) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'typevar_list) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1641 "parsing/parser.mly" - ( (ghpat(Ppat_constraint(mkpatvar _1 1, - ghtyp(Ptyp_poly(List.rev _3,_5)))), - _7) ) -# 10084 "parsing/parser.ml" - : 'let_binding_body)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 7 : 'val_ident) in - let _4 = (Parsing.peek_val __caml_parser_env 4 : 'lident_list) in - let _6 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in - let _8 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1645 "parsing/parser.mly" - ( let exp, poly = wrap_type_annotation _4 _6 _8 in - (ghpat(Ppat_constraint(mkpatvar _1 1, poly)), exp) ) -# 10095 "parsing/parser.ml" - : 'let_binding_body)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1648 "parsing/parser.mly" - ( (_1, _3) ) -# 10103 "parsing/parser.ml" - : 'let_binding_body)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_pattern_not_ident) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1650 "parsing/parser.mly" - ( (ghpat(Ppat_constraint(_1, _3)), _5) ) -# 10112 "parsing/parser.ml" - : 'let_binding_body)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'let_binding) in - Obj.repr( -# 1653 "parsing/parser.mly" - ( _1 ) -# 10119 "parsing/parser.ml" - : 'let_bindings)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'let_bindings) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'and_let_binding) in - Obj.repr( -# 1654 "parsing/parser.mly" - ( addlb _1 _2 ) -# 10127 "parsing/parser.ml" - : 'let_bindings)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'rec_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'let_binding_body) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1658 "parsing/parser.mly" - ( let (ext, attr) = _2 in - mklbs ext _3 (mklb true _4 (attr@_5)) ) -# 10138 "parsing/parser.ml" - : 'let_binding)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'let_binding_body) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1663 "parsing/parser.mly" - ( mklb false _3 (_2@_4) ) -# 10147 "parsing/parser.ml" - : 'and_let_binding)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'strict_binding) in - Obj.repr( -# 1667 "parsing/parser.mly" - ( _1 ) -# 10154 "parsing/parser.ml" - : 'fun_binding)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'type_constraint) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1669 "parsing/parser.mly" - ( mkexp_constraint _3 _1 ) -# 10162 "parsing/parser.ml" - : 'fun_binding)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1673 "parsing/parser.mly" - ( _2 ) -# 10169 "parsing/parser.ml" - : 'strict_binding)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'labeled_simple_pattern) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'fun_binding) in - Obj.repr( -# 1675 "parsing/parser.mly" - ( let (l, o, p) = _1 in ghexp(Pexp_fun(l, o, p, _2)) ) -# 10177 "parsing/parser.ml" - : 'strict_binding)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'lident_list) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'fun_binding) in - Obj.repr( -# 1677 "parsing/parser.mly" - ( mk_newtypes _3 _5 ) -# 10185 "parsing/parser.ml" - : 'strict_binding)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'match_case) in - Obj.repr( -# 1680 "parsing/parser.mly" - ( [_1] ) -# 10192 "parsing/parser.ml" - : 'match_cases)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'match_cases) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'match_case) in - Obj.repr( -# 1681 "parsing/parser.mly" - ( _3 :: _1 ) -# 10200 "parsing/parser.ml" - : 'match_cases)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1685 "parsing/parser.mly" - ( Exp.case _1 _3 ) -# 10208 "parsing/parser.ml" - : 'match_case)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'pattern) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'seq_expr) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1687 "parsing/parser.mly" - ( Exp.case _1 ~guard:_3 _5 ) -# 10217 "parsing/parser.ml" - : 'match_case)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in - Obj.repr( -# 1689 "parsing/parser.mly" - ( Exp.case _1 (Exp.unreachable ~loc:(rhs_loc 3) ())) -# 10224 "parsing/parser.ml" - : 'match_case)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1693 "parsing/parser.mly" - ( _2 ) -# 10231 "parsing/parser.ml" - : 'fun_def)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'simple_core_type) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 1695 "parsing/parser.mly" - ( mkexp (Pexp_constraint (_4, _2)) ) -# 10239 "parsing/parser.ml" - : 'fun_def)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'labeled_simple_pattern) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'fun_def) in - Obj.repr( -# 1698 "parsing/parser.mly" - ( - let (l,o,p) = _1 in - ghexp(Pexp_fun(l, o, p, _2)) - ) -# 10250 "parsing/parser.ml" - : 'fun_def)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'lident_list) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'fun_def) in - Obj.repr( -# 1703 "parsing/parser.mly" - ( mk_newtypes _3 _5 ) -# 10258 "parsing/parser.ml" - : 'fun_def)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr_comma_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1706 "parsing/parser.mly" - ( _3 :: _1 ) -# 10266 "parsing/parser.ml" - : 'expr_comma_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1707 "parsing/parser.mly" - ( [_3; _1] ) -# 10274 "parsing/parser.ml" - : 'expr_comma_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'simple_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_expr_list) in - Obj.repr( -# 1710 "parsing/parser.mly" - ( (Some _1, _3) ) -# 10282 "parsing/parser.ml" - : 'record_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_expr_list) in - Obj.repr( -# 1711 "parsing/parser.mly" - ( (None, _1) ) -# 10289 "parsing/parser.ml" - : 'record_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_expr) in - Obj.repr( -# 1714 "parsing/parser.mly" - ( [_1] ) -# 10296 "parsing/parser.ml" - : 'lbl_expr_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'lbl_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_expr_list) in - Obj.repr( -# 1715 "parsing/parser.mly" - ( _1 :: _3 ) -# 10304 "parsing/parser.ml" - : 'lbl_expr_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'lbl_expr) in - Obj.repr( -# 1716 "parsing/parser.mly" - ( [_1] ) -# 10311 "parsing/parser.ml" - : 'lbl_expr_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'label_longident) in - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'opt_type_constraint) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1720 "parsing/parser.mly" - ( (mkrhs _1 1, mkexp_opt_constraint _4 _2) ) -# 10320 "parsing/parser.ml" - : 'lbl_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'label_longident) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'opt_type_constraint) in - Obj.repr( -# 1722 "parsing/parser.mly" - ( (mkrhs _1 1, mkexp_opt_constraint (exp_of_label _1 1) _2) ) -# 10328 "parsing/parser.ml" - : 'lbl_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'field_expr) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'opt_semi) in - Obj.repr( -# 1725 "parsing/parser.mly" - ( [_1] ) -# 10336 "parsing/parser.ml" - : 'field_expr_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'field_expr) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'field_expr_list) in - Obj.repr( -# 1726 "parsing/parser.mly" - ( _1 :: _3 ) -# 10344 "parsing/parser.ml" - : 'field_expr_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'label) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1730 "parsing/parser.mly" - ( (mkrhs _1 1, _3) ) -# 10352 "parsing/parser.ml" - : 'field_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label) in - Obj.repr( -# 1732 "parsing/parser.mly" - ( (mkrhs _1 1, exp_of_label (Lident _1) 1) ) -# 10359 "parsing/parser.ml" - : 'field_expr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1735 "parsing/parser.mly" - ( [_1] ) -# 10366 "parsing/parser.ml" - : 'expr_semi_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in - Obj.repr( -# 1736 "parsing/parser.mly" - ( _3 :: _1 ) -# 10374 "parsing/parser.ml" - : 'expr_semi_list)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1739 "parsing/parser.mly" - ( (Some _2, None) ) -# 10381 "parsing/parser.ml" - : 'type_constraint)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1740 "parsing/parser.mly" - ( (Some _2, Some _4) ) -# 10389 "parsing/parser.ml" - : 'type_constraint)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1741 "parsing/parser.mly" - ( (None, Some _2) ) -# 10396 "parsing/parser.ml" - : 'type_constraint)) -; (fun __caml_parser_env -> - Obj.repr( -# 1742 "parsing/parser.mly" - ( syntax_error() ) -# 10402 "parsing/parser.ml" - : 'type_constraint)) -; (fun __caml_parser_env -> - Obj.repr( -# 1743 "parsing/parser.mly" - ( syntax_error() ) -# 10408 "parsing/parser.ml" - : 'type_constraint)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_constraint) in - Obj.repr( -# 1746 "parsing/parser.mly" - ( Some _1 ) -# 10415 "parsing/parser.ml" - : 'opt_type_constraint)) -; (fun __caml_parser_env -> - Obj.repr( -# 1747 "parsing/parser.mly" - ( None ) -# 10421 "parsing/parser.ml" - : 'opt_type_constraint)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'val_ident) in - Obj.repr( -# 1754 "parsing/parser.mly" - ( mkpat(Ppat_alias(_1, mkrhs _3 3)) ) -# 10429 "parsing/parser.ml" - : 'pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in - Obj.repr( -# 1756 "parsing/parser.mly" - ( expecting 3 "identifier" ) -# 10436 "parsing/parser.ml" - : 'pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern_comma_list) in - Obj.repr( -# 1758 "parsing/parser.mly" - ( mkpat(Ppat_tuple(List.rev _1)) ) -# 10443 "parsing/parser.ml" - : 'pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1760 "parsing/parser.mly" - ( mkpat_cons (rhs_loc 2) (ghpat(Ppat_tuple[_1;_3])) (symbol_rloc()) ) -# 10451 "parsing/parser.ml" - : 'pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in - Obj.repr( -# 1762 "parsing/parser.mly" - ( expecting 3 "pattern" ) -# 10458 "parsing/parser.ml" - : 'pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1764 "parsing/parser.mly" - ( mkpat(Ppat_or(_1, _3)) ) -# 10466 "parsing/parser.ml" - : 'pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in - Obj.repr( -# 1766 "parsing/parser.mly" - ( expecting 3 "pattern" ) -# 10473 "parsing/parser.ml" - : 'pattern)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1768 "parsing/parser.mly" - ( mkpat_attrs (Ppat_exception _3) _2) -# 10481 "parsing/parser.ml" - : 'pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in - Obj.repr( -# 1770 "parsing/parser.mly" - ( Pat.attr _1 _2 ) -# 10489 "parsing/parser.ml" - : 'pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern_gen) in - Obj.repr( -# 1771 "parsing/parser.mly" - ( _1 ) -# 10496 "parsing/parser.ml" - : 'pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'val_ident) in - Obj.repr( -# 1775 "parsing/parser.mly" - ( mkpat(Ppat_alias(_1, mkrhs _3 3)) ) -# 10504 "parsing/parser.ml" - : 'pattern_no_exn)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in - Obj.repr( -# 1777 "parsing/parser.mly" - ( expecting 3 "identifier" ) -# 10511 "parsing/parser.ml" - : 'pattern_no_exn)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern_no_exn_comma_list) in - Obj.repr( -# 1779 "parsing/parser.mly" - ( mkpat(Ppat_tuple(List.rev _1)) ) -# 10518 "parsing/parser.ml" - : 'pattern_no_exn)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1781 "parsing/parser.mly" - ( mkpat_cons (rhs_loc 2) (ghpat(Ppat_tuple[_1;_3])) (symbol_rloc()) ) -# 10526 "parsing/parser.ml" - : 'pattern_no_exn)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in - Obj.repr( -# 1783 "parsing/parser.mly" - ( expecting 3 "pattern" ) -# 10533 "parsing/parser.ml" - : 'pattern_no_exn)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1785 "parsing/parser.mly" - ( mkpat(Ppat_or(_1, _3)) ) -# 10541 "parsing/parser.ml" - : 'pattern_no_exn)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in - Obj.repr( -# 1787 "parsing/parser.mly" - ( expecting 3 "pattern" ) -# 10548 "parsing/parser.ml" - : 'pattern_no_exn)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'pattern_no_exn) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in - Obj.repr( -# 1789 "parsing/parser.mly" - ( Pat.attr _1 _2 ) -# 10556 "parsing/parser.ml" - : 'pattern_no_exn)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern_gen) in - Obj.repr( -# 1790 "parsing/parser.mly" - ( _1 ) -# 10563 "parsing/parser.ml" - : 'pattern_no_exn)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_pattern) in - Obj.repr( -# 1794 "parsing/parser.mly" - ( _1 ) -# 10570 "parsing/parser.ml" - : 'pattern_gen)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'constr_longident) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1796 "parsing/parser.mly" - ( mkpat(Ppat_construct(mkrhs _1 1, Some _2)) ) -# 10578 "parsing/parser.ml" - : 'pattern_gen)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'name_tag) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1798 "parsing/parser.mly" - ( mkpat(Ppat_variant(_1, Some _2)) ) -# 10586 "parsing/parser.ml" - : 'pattern_gen)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'simple_pattern) in - Obj.repr( -# 1800 "parsing/parser.mly" - ( mkpat_attrs (Ppat_lazy _3) _2) -# 10594 "parsing/parser.ml" - : 'pattern_gen)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'val_ident) in - Obj.repr( -# 1804 "parsing/parser.mly" - ( mkpat(Ppat_var (mkrhs _1 1)) ) -# 10601 "parsing/parser.ml" - : 'simple_pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_pattern_not_ident) in - Obj.repr( -# 1805 "parsing/parser.mly" - ( _1 ) -# 10608 "parsing/parser.ml" - : 'simple_pattern)) -; (fun __caml_parser_env -> - Obj.repr( -# 1809 "parsing/parser.mly" - ( mkpat(Ppat_any) ) -# 10614 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'signed_constant) in - Obj.repr( -# 1811 "parsing/parser.mly" - ( mkpat(Ppat_constant _1) ) -# 10621 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'signed_constant) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'signed_constant) in - Obj.repr( -# 1813 "parsing/parser.mly" - ( mkpat(Ppat_interval (_1, _3)) ) -# 10629 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constr_longident) in - Obj.repr( -# 1815 "parsing/parser.mly" - ( mkpat(Ppat_construct(mkrhs _1 1, None)) ) -# 10636 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'name_tag) in - Obj.repr( -# 1817 "parsing/parser.mly" - ( mkpat(Ppat_variant(_1, None)) ) -# 10643 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'type_longident) in - Obj.repr( -# 1819 "parsing/parser.mly" - ( mkpat(Ppat_type (mkrhs _2 2)) ) -# 10650 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_delimited_pattern) in - Obj.repr( -# 1821 "parsing/parser.mly" - ( _1 ) -# 10657 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'simple_delimited_pattern) in - Obj.repr( -# 1823 "parsing/parser.mly" - ( mkpat @@ Ppat_open(mkrhs _1 1, _3) ) -# 10665 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in - Obj.repr( -# 1825 "parsing/parser.mly" - ( mkpat @@ Ppat_open(mkrhs _1 1, mkpat @@ - Ppat_construct ( mkrhs (Lident "[]") 4, None)) ) -# 10673 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in - Obj.repr( -# 1828 "parsing/parser.mly" - ( mkpat @@ Ppat_open( mkrhs _1 1, mkpat @@ - Ppat_construct ( mkrhs (Lident "()") 4, None) ) ) -# 10681 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in - Obj.repr( -# 1831 "parsing/parser.mly" - ( mkpat @@ Ppat_open (mkrhs _1 1, _4)) -# 10689 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in - Obj.repr( -# 1833 "parsing/parser.mly" - (unclosed "(" 3 ")" 5 ) -# 10697 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in - Obj.repr( -# 1835 "parsing/parser.mly" - ( expecting 4 "pattern" ) -# 10704 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in - Obj.repr( -# 1837 "parsing/parser.mly" - ( reloc_pat _2 ) -# 10711 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in - Obj.repr( -# 1839 "parsing/parser.mly" - ( unclosed "(" 1 ")" 3 ) -# 10718 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'pattern) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in - Obj.repr( -# 1841 "parsing/parser.mly" - ( mkpat(Ppat_constraint(_2, _4)) ) -# 10726 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'pattern) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in - Obj.repr( -# 1843 "parsing/parser.mly" - ( unclosed "(" 1 ")" 5 ) -# 10734 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in - Obj.repr( -# 1845 "parsing/parser.mly" - ( expecting 4 "type" ) -# 10741 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : string) in - Obj.repr( -# 1847 "parsing/parser.mly" - ( mkpat_attrs (Ppat_unpack (mkrhs _4 4)) _3 ) -# 10749 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in - Obj.repr( -# 1849 "parsing/parser.mly" - ( mkpat_attrs - (Ppat_constraint(mkpat(Ppat_unpack (mkrhs _4 4)), - ghtyp(Ptyp_package _6))) - _3 ) -# 10761 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in - Obj.repr( -# 1854 "parsing/parser.mly" - ( unclosed "(" 1 ")" 7 ) -# 10770 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in - Obj.repr( -# 1856 "parsing/parser.mly" - ( mkpat(Ppat_extension _1) ) -# 10777 "parsing/parser.ml" - : 'simple_pattern_not_ident)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'lbl_pattern_list) in - Obj.repr( -# 1861 "parsing/parser.mly" - ( let (fields, closed) = _2 in mkpat(Ppat_record(fields, closed)) ) -# 10784 "parsing/parser.ml" - : 'simple_delimited_pattern)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'lbl_pattern_list) in - Obj.repr( -# 1863 "parsing/parser.mly" - ( unclosed "{" 1 "}" 3 ) -# 10791 "parsing/parser.ml" - : 'simple_delimited_pattern)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_semi_list) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in - Obj.repr( -# 1865 "parsing/parser.mly" - ( reloc_pat (mktailpat (rhs_loc 4) (List.rev _2)) ) -# 10799 "parsing/parser.ml" - : 'simple_delimited_pattern)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_semi_list) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in - Obj.repr( -# 1867 "parsing/parser.mly" - ( unclosed "[" 1 "]" 4 ) -# 10807 "parsing/parser.ml" - : 'simple_delimited_pattern)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_semi_list) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in - Obj.repr( -# 1869 "parsing/parser.mly" - ( mkpat(Ppat_array(List.rev _2)) ) -# 10815 "parsing/parser.ml" - : 'simple_delimited_pattern)) -; (fun __caml_parser_env -> - Obj.repr( -# 1871 "parsing/parser.mly" - ( mkpat(Ppat_array []) ) -# 10821 "parsing/parser.ml" - : 'simple_delimited_pattern)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_semi_list) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in - Obj.repr( -# 1873 "parsing/parser.mly" - ( unclosed "[|" 1 "|]" 4 ) -# 10829 "parsing/parser.ml" - : 'simple_delimited_pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_comma_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1876 "parsing/parser.mly" - ( _3 :: _1 ) -# 10837 "parsing/parser.ml" - : 'pattern_comma_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1877 "parsing/parser.mly" - ( [_3; _1] ) -# 10845 "parsing/parser.ml" - : 'pattern_comma_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in - Obj.repr( -# 1878 "parsing/parser.mly" - ( expecting 3 "pattern" ) -# 10852 "parsing/parser.ml" - : 'pattern_comma_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn_comma_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1881 "parsing/parser.mly" - ( _3 :: _1 ) -# 10860 "parsing/parser.ml" - : 'pattern_no_exn_comma_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1882 "parsing/parser.mly" - ( [_3; _1] ) -# 10868 "parsing/parser.ml" - : 'pattern_no_exn_comma_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in - Obj.repr( -# 1883 "parsing/parser.mly" - ( expecting 3 "pattern" ) -# 10875 "parsing/parser.ml" - : 'pattern_no_exn_comma_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1886 "parsing/parser.mly" - ( [_1] ) -# 10882 "parsing/parser.ml" - : 'pattern_semi_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_semi_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1887 "parsing/parser.mly" - ( _3 :: _1 ) -# 10890 "parsing/parser.ml" - : 'pattern_semi_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_pattern) in - Obj.repr( -# 1890 "parsing/parser.mly" - ( [_1], Closed ) -# 10897 "parsing/parser.ml" - : 'lbl_pattern_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'lbl_pattern) in - Obj.repr( -# 1891 "parsing/parser.mly" - ( [_1], Closed ) -# 10904 "parsing/parser.ml" - : 'lbl_pattern_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'lbl_pattern) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'opt_semi) in - Obj.repr( -# 1892 "parsing/parser.mly" - ( [_1], Open ) -# 10912 "parsing/parser.ml" - : 'lbl_pattern_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'lbl_pattern) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_pattern_list) in - Obj.repr( -# 1894 "parsing/parser.mly" - ( let (fields, closed) = _3 in _1 :: fields, closed ) -# 10920 "parsing/parser.ml" - : 'lbl_pattern_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'label_longident) in - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'opt_pattern_type_constraint) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 1898 "parsing/parser.mly" - ( (mkrhs _1 1, mkpat_opt_constraint _4 _2) ) -# 10929 "parsing/parser.ml" - : 'lbl_pattern)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'label_longident) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'opt_pattern_type_constraint) in - Obj.repr( -# 1900 "parsing/parser.mly" - ( (mkrhs _1 1, mkpat_opt_constraint (pat_of_label _1 1) _2) ) -# 10937 "parsing/parser.ml" - : 'lbl_pattern)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1903 "parsing/parser.mly" - ( Some _2 ) -# 10944 "parsing/parser.ml" - : 'opt_pattern_type_constraint)) -; (fun __caml_parser_env -> - Obj.repr( -# 1904 "parsing/parser.mly" - ( None ) -# 10950 "parsing/parser.ml" - : 'opt_pattern_type_constraint)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'val_ident) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1911 "parsing/parser.mly" - ( let (ext, attrs) = _2 in - Val.mk (mkrhs _3 3) _5 ~attrs:(attrs@_6) - ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) - , ext ) -# 10963 "parsing/parser.ml" - : 'value_description)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string * string option) in - Obj.repr( -# 1920 "parsing/parser.mly" - ( [fst _1] ) -# 10970 "parsing/parser.ml" - : 'primitive_declaration_body)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : string * string option) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'primitive_declaration_body) in - Obj.repr( -# 1921 "parsing/parser.mly" - ( fst _1 :: _2 ) -# 10978 "parsing/parser.ml" - : 'primitive_declaration_body)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 6 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 5 : 'val_ident) in - let _5 = (Parsing.peek_val __caml_parser_env 3 : 'core_type) in - let _7 = (Parsing.peek_val __caml_parser_env 1 : 'primitive_declaration_body) in - let _8 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1926 "parsing/parser.mly" - ( let (ext, attrs) = _2 in - Val.mk (mkrhs _3 3) _5 ~prim:_7 ~attrs:(attrs@_8) - ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) - , ext ) -# 10992 "parsing/parser.ml" - : 'primitive_declaration)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_declaration) in - Obj.repr( -# 1936 "parsing/parser.mly" - ( let (nonrec_flag, ty, ext) = _1 in (nonrec_flag, [ty], ext) ) -# 10999 "parsing/parser.ml" - : 'type_declarations)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'type_declarations) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'and_type_declaration) in - Obj.repr( -# 1938 "parsing/parser.mly" - ( let (nonrec_flag, tys, ext) = _1 in (nonrec_flag, _2 :: tys, ext) ) -# 11007 "parsing/parser.ml" - : 'type_declarations)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 6 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 5 : 'nonrec_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 4 : 'optional_type_parameters) in - let _5 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _6 = (Parsing.peek_val __caml_parser_env 2 : 'type_kind) in - let _7 = (Parsing.peek_val __caml_parser_env 1 : 'constraints) in - let _8 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1944 "parsing/parser.mly" - ( let (kind, priv, manifest) = _6 in - let (ext, attrs) = _2 in - let ty = - Type.mk (mkrhs _5 5) ~params:_4 ~cstrs:(List.rev _7) ~kind - ~priv ?manifest ~attrs:(attrs@_8) - ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) - in - (_3, ty, ext) ) -# 11027 "parsing/parser.ml" - : 'type_declaration)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'optional_type_parameters) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'type_kind) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'constraints) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 1956 "parsing/parser.mly" - ( let (kind, priv, manifest) = _5 in - Type.mk (mkrhs _4 4) ~params:_3 ~cstrs:(List.rev _6) - ~kind ~priv ?manifest ~attrs:(_2@_7) ~loc:(symbol_rloc ()) - ~text:(symbol_text ()) ~docs:(symbol_docs ()) ) -# 11042 "parsing/parser.ml" - : 'and_type_declaration)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'constraints) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'constrain) in - Obj.repr( -# 1962 "parsing/parser.mly" - ( _3 :: _1 ) -# 11050 "parsing/parser.ml" - : 'constraints)) -; (fun __caml_parser_env -> - Obj.repr( -# 1963 "parsing/parser.mly" - ( [] ) -# 11056 "parsing/parser.ml" - : 'constraints)) -; (fun __caml_parser_env -> - Obj.repr( -# 1967 "parsing/parser.mly" - ( (Ptype_abstract, Public, None) ) -# 11062 "parsing/parser.ml" - : 'type_kind)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1969 "parsing/parser.mly" - ( (Ptype_abstract, Public, Some _2) ) -# 11069 "parsing/parser.ml" - : 'type_kind)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 1971 "parsing/parser.mly" - ( (Ptype_abstract, Private, Some _3) ) -# 11076 "parsing/parser.ml" - : 'type_kind)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_declarations) in - Obj.repr( -# 1973 "parsing/parser.mly" - ( (Ptype_variant(List.rev _2), Public, None) ) -# 11083 "parsing/parser.ml" - : 'type_kind)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_declarations) in - Obj.repr( -# 1975 "parsing/parser.mly" - ( (Ptype_variant(List.rev _3), Private, None) ) -# 11090 "parsing/parser.ml" - : 'type_kind)) -; (fun __caml_parser_env -> - Obj.repr( -# 1977 "parsing/parser.mly" - ( (Ptype_open, Public, None) ) -# 11096 "parsing/parser.ml" - : 'type_kind)) -; (fun __caml_parser_env -> - Obj.repr( -# 1979 "parsing/parser.mly" - ( (Ptype_open, Private, None) ) -# 11102 "parsing/parser.ml" - : 'type_kind)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'private_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'label_declarations) in - Obj.repr( -# 1981 "parsing/parser.mly" - ( (Ptype_record _4, _2, None) ) -# 11110 "parsing/parser.ml" - : 'type_kind)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'core_type) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'private_flag) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_declarations) in - Obj.repr( -# 1983 "parsing/parser.mly" - ( (Ptype_variant(List.rev _5), _4, Some _2) ) -# 11119 "parsing/parser.ml" - : 'type_kind)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'core_type) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'private_flag) in - Obj.repr( -# 1985 "parsing/parser.mly" - ( (Ptype_open, _4, Some _2) ) -# 11127 "parsing/parser.ml" - : 'type_kind)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'core_type) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'private_flag) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'label_declarations) in - Obj.repr( -# 1987 "parsing/parser.mly" - ( (Ptype_record _6, _4, Some _2) ) -# 11136 "parsing/parser.ml" - : 'type_kind)) -; (fun __caml_parser_env -> - Obj.repr( -# 1990 "parsing/parser.mly" - ( [] ) -# 11142 "parsing/parser.ml" - : 'optional_type_parameters)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'optional_type_parameter) in - Obj.repr( -# 1991 "parsing/parser.mly" - ( [_1] ) -# 11149 "parsing/parser.ml" - : 'optional_type_parameters)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'optional_type_parameter_list) in - Obj.repr( -# 1992 "parsing/parser.mly" - ( List.rev _2 ) -# 11156 "parsing/parser.ml" - : 'optional_type_parameters)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'type_variance) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'optional_type_variable) in - Obj.repr( -# 1995 "parsing/parser.mly" - ( _2, _1 ) -# 11164 "parsing/parser.ml" - : 'optional_type_parameter)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'optional_type_parameter) in - Obj.repr( -# 1998 "parsing/parser.mly" - ( [_1] ) -# 11171 "parsing/parser.ml" - : 'optional_type_parameter_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'optional_type_parameter_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'optional_type_parameter) in - Obj.repr( -# 1999 "parsing/parser.mly" - ( _3 :: _1 ) -# 11179 "parsing/parser.ml" - : 'optional_type_parameter_list)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in - Obj.repr( -# 2002 "parsing/parser.mly" - ( mktyp(Ptyp_var _2) ) -# 11186 "parsing/parser.ml" - : 'optional_type_variable)) -; (fun __caml_parser_env -> - Obj.repr( -# 2003 "parsing/parser.mly" - ( mktyp(Ptyp_any) ) -# 11192 "parsing/parser.ml" - : 'optional_type_variable)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'type_variance) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'type_variable) in - Obj.repr( -# 2008 "parsing/parser.mly" - ( _2, _1 ) -# 11200 "parsing/parser.ml" - : 'type_parameter)) -; (fun __caml_parser_env -> - Obj.repr( -# 2011 "parsing/parser.mly" - ( Invariant ) -# 11206 "parsing/parser.ml" - : 'type_variance)) -; (fun __caml_parser_env -> - Obj.repr( -# 2012 "parsing/parser.mly" - ( Covariant ) -# 11212 "parsing/parser.ml" - : 'type_variance)) -; (fun __caml_parser_env -> - Obj.repr( -# 2013 "parsing/parser.mly" - ( Contravariant ) -# 11218 "parsing/parser.ml" - : 'type_variance)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in - Obj.repr( -# 2016 "parsing/parser.mly" - ( mktyp(Ptyp_var _2) ) -# 11225 "parsing/parser.ml" - : 'type_variable)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_parameter) in - Obj.repr( -# 2019 "parsing/parser.mly" - ( [_1] ) -# 11232 "parsing/parser.ml" - : 'type_parameter_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'type_parameter_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'type_parameter) in - Obj.repr( -# 2020 "parsing/parser.mly" - ( _3 :: _1 ) -# 11240 "parsing/parser.ml" - : 'type_parameter_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_declaration) in - Obj.repr( -# 2023 "parsing/parser.mly" - ( [_1] ) -# 11247 "parsing/parser.ml" - : 'constructor_declarations)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'bar_constructor_declaration) in - Obj.repr( -# 2024 "parsing/parser.mly" - ( [_1] ) -# 11254 "parsing/parser.ml" - : 'constructor_declarations)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'constructor_declarations) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'bar_constructor_declaration) in - Obj.repr( -# 2025 "parsing/parser.mly" - ( _2 :: _1 ) -# 11262 "parsing/parser.ml" - : 'constructor_declarations)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'constr_ident) in - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'generalized_constructor_arguments) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2029 "parsing/parser.mly" - ( - let args,res = _2 in - Type.constructor (mkrhs _1 1) ~args ?res ~attrs:_3 - ~loc:(symbol_rloc()) ~info:(symbol_info ()) - ) -# 11275 "parsing/parser.ml" - : 'constructor_declaration)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'constr_ident) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'generalized_constructor_arguments) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2037 "parsing/parser.mly" - ( - let args,res = _3 in - Type.constructor (mkrhs _2 2) ~args ?res ~attrs:_4 - ~loc:(symbol_rloc()) ~info:(symbol_info ()) - ) -# 11288 "parsing/parser.ml" - : 'bar_constructor_declaration)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'sig_exception_declaration) in - Obj.repr( -# 2044 "parsing/parser.mly" - ( _1 ) -# 11295 "parsing/parser.ml" - : 'str_exception_declaration)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 4 : 'constr_ident) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'constr_longident) in - let _6 = (Parsing.peek_val __caml_parser_env 1 : 'attributes) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 2047 "parsing/parser.mly" - ( let (ext,attrs) = _2 in - Te.rebind (mkrhs _3 3) (mkrhs _5 5) ~attrs:(attrs @ _6 @ _7) - ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) - , ext ) -# 11309 "parsing/parser.ml" - : 'str_exception_declaration)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'constr_ident) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'generalized_constructor_arguments) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'attributes) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 2055 "parsing/parser.mly" - ( let args, res = _4 in - let (ext,attrs) = _2 in - Te.decl (mkrhs _3 3) ~args ?res ~attrs:(attrs @ _5 @ _6) - ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) - , ext ) -# 11324 "parsing/parser.ml" - : 'sig_exception_declaration)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'constr_ident) in - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'generalized_constructor_arguments) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2063 "parsing/parser.mly" - ( let args, res = _2 in - Te.decl (mkrhs _1 1) ~args ?res ~attrs:_3 ~loc:(symbol_rloc()) ) -# 11334 "parsing/parser.ml" - : 'let_exception_declaration)) -; (fun __caml_parser_env -> - Obj.repr( -# 2067 "parsing/parser.mly" - ( (Pcstr_tuple [],None) ) -# 11340 "parsing/parser.ml" - : 'generalized_constructor_arguments)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_arguments) in - Obj.repr( -# 2068 "parsing/parser.mly" - ( (_2,None) ) -# 11347 "parsing/parser.ml" - : 'generalized_constructor_arguments)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'constructor_arguments) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in - Obj.repr( -# 2070 "parsing/parser.mly" - ( (_2,Some _4) ) -# 11355 "parsing/parser.ml" - : 'generalized_constructor_arguments)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in - Obj.repr( -# 2072 "parsing/parser.mly" - ( (Pcstr_tuple [],Some _2) ) -# 11362 "parsing/parser.ml" - : 'generalized_constructor_arguments)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_list) in - Obj.repr( -# 2076 "parsing/parser.mly" - ( Pcstr_tuple (List.rev _1) ) -# 11369 "parsing/parser.ml" - : 'constructor_arguments)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'label_declarations) in - Obj.repr( -# 2077 "parsing/parser.mly" - ( Pcstr_record _2 ) -# 11376 "parsing/parser.ml" - : 'constructor_arguments)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label_declaration) in - Obj.repr( -# 2080 "parsing/parser.mly" - ( [_1] ) -# 11383 "parsing/parser.ml" - : 'label_declarations)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label_declaration_semi) in - Obj.repr( -# 2081 "parsing/parser.mly" - ( [_1] ) -# 11390 "parsing/parser.ml" - : 'label_declarations)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'label_declaration_semi) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_declarations) in - Obj.repr( -# 2082 "parsing/parser.mly" - ( _1 :: _2 ) -# 11398 "parsing/parser.ml" - : 'label_declarations)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mutable_flag) in - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'label) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'poly_type_no_attr) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2086 "parsing/parser.mly" - ( - Type.field (mkrhs _2 2) _4 ~mut:_1 ~attrs:_5 - ~loc:(symbol_rloc()) ~info:(symbol_info ()) - ) -# 11411 "parsing/parser.ml" - : 'label_declaration)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 6 : 'mutable_flag) in - let _2 = (Parsing.peek_val __caml_parser_env 5 : 'label) in - let _4 = (Parsing.peek_val __caml_parser_env 3 : 'poly_type_no_attr) in - let _5 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _7 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2093 "parsing/parser.mly" - ( - let info = - match rhs_info 5 with - | Some _ as info_before_semi -> info_before_semi - | None -> symbol_info () - in - Type.field (mkrhs _2 2) _4 ~mut:_1 ~attrs:(_5 @ _7) - ~loc:(symbol_rloc()) ~info - ) -# 11430 "parsing/parser.ml" - : 'label_declaration_semi)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 7 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 6 : 'nonrec_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 5 : 'optional_type_parameters) in - let _5 = (Parsing.peek_val __caml_parser_env 4 : 'type_longident) in - let _7 = (Parsing.peek_val __caml_parser_env 2 : 'private_flag) in - let _8 = (Parsing.peek_val __caml_parser_env 1 : 'str_extension_constructors) in - let _9 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 2109 "parsing/parser.mly" - ( let (ext, attrs) = _2 in - if _3 <> Recursive then not_expecting 3 "nonrec flag"; - Te.mk (mkrhs _5 5) (List.rev _8) ~params:_4 ~priv:_7 - ~attrs:(attrs@_9) ~docs:(symbol_docs ()) - , ext ) -# 11447 "parsing/parser.ml" - : 'str_type_extension)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 7 : 'ext_attributes) in - let _3 = (Parsing.peek_val __caml_parser_env 6 : 'nonrec_flag) in - let _4 = (Parsing.peek_val __caml_parser_env 5 : 'optional_type_parameters) in - let _5 = (Parsing.peek_val __caml_parser_env 4 : 'type_longident) in - let _7 = (Parsing.peek_val __caml_parser_env 2 : 'private_flag) in - let _8 = (Parsing.peek_val __caml_parser_env 1 : 'sig_extension_constructors) in - let _9 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 2118 "parsing/parser.mly" - ( let (ext, attrs) = _2 in - if _3 <> Recursive then not_expecting 3 "nonrec flag"; - Te.mk (mkrhs _5 5) (List.rev _8) ~params:_4 ~priv:_7 - ~attrs:(attrs @ _9) ~docs:(symbol_docs ()) - , ext ) -# 11464 "parsing/parser.ml" - : 'sig_type_extension)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension_constructor_declaration) in - Obj.repr( -# 2125 "parsing/parser.mly" - ( [_1] ) -# 11471 "parsing/parser.ml" - : 'str_extension_constructors)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'bar_extension_constructor_declaration) in - Obj.repr( -# 2126 "parsing/parser.mly" - ( [_1] ) -# 11478 "parsing/parser.ml" - : 'str_extension_constructors)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension_constructor_rebind) in - Obj.repr( -# 2127 "parsing/parser.mly" - ( [_1] ) -# 11485 "parsing/parser.ml" - : 'str_extension_constructors)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'bar_extension_constructor_rebind) in - Obj.repr( -# 2128 "parsing/parser.mly" - ( [_1] ) -# 11492 "parsing/parser.ml" - : 'str_extension_constructors)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'str_extension_constructors) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'bar_extension_constructor_declaration) in - Obj.repr( -# 2130 "parsing/parser.mly" - ( _2 :: _1 ) -# 11500 "parsing/parser.ml" - : 'str_extension_constructors)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'str_extension_constructors) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'bar_extension_constructor_rebind) in - Obj.repr( -# 2132 "parsing/parser.mly" - ( _2 :: _1 ) -# 11508 "parsing/parser.ml" - : 'str_extension_constructors)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension_constructor_declaration) in - Obj.repr( -# 2135 "parsing/parser.mly" - ( [_1] ) -# 11515 "parsing/parser.ml" - : 'sig_extension_constructors)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'bar_extension_constructor_declaration) in - Obj.repr( -# 2136 "parsing/parser.mly" - ( [_1] ) -# 11522 "parsing/parser.ml" - : 'sig_extension_constructors)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'sig_extension_constructors) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'bar_extension_constructor_declaration) in - Obj.repr( -# 2138 "parsing/parser.mly" - ( _2 :: _1 ) -# 11530 "parsing/parser.ml" - : 'sig_extension_constructors)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'constr_ident) in - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'generalized_constructor_arguments) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2142 "parsing/parser.mly" - ( let args, res = _2 in - Te.decl (mkrhs _1 1) ~args ?res ~attrs:_3 - ~loc:(symbol_rloc()) ~info:(symbol_info ()) ) -# 11541 "parsing/parser.ml" - : 'extension_constructor_declaration)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'constr_ident) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'generalized_constructor_arguments) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2148 "parsing/parser.mly" - ( let args, res = _3 in - Te.decl (mkrhs _2 2) ~args ?res ~attrs:_4 - ~loc:(symbol_rloc()) ~info:(symbol_info ()) ) -# 11552 "parsing/parser.ml" - : 'bar_extension_constructor_declaration)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'constr_ident) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'constr_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2154 "parsing/parser.mly" - ( Te.rebind (mkrhs _1 1) (mkrhs _3 3) ~attrs:_4 - ~loc:(symbol_rloc()) ~info:(symbol_info ()) ) -# 11562 "parsing/parser.ml" - : 'extension_constructor_rebind)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'constr_ident) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'constr_longident) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2159 "parsing/parser.mly" - ( Te.rebind (mkrhs _2 2) (mkrhs _4 4) ~attrs:_5 - ~loc:(symbol_rloc()) ~info:(symbol_info ()) ) -# 11572 "parsing/parser.ml" - : 'bar_extension_constructor_rebind)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'with_constraint) in - Obj.repr( -# 2166 "parsing/parser.mly" - ( [_1] ) -# 11579 "parsing/parser.ml" - : 'with_constraints)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'with_constraints) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'with_constraint) in - Obj.repr( -# 2167 "parsing/parser.mly" - ( _3 :: _1 ) -# 11587 "parsing/parser.ml" - : 'with_constraints)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : 'optional_type_parameters) in - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'label_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'with_type_binder) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'core_type_no_attr) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'constraints) in - Obj.repr( -# 2172 "parsing/parser.mly" - ( Pwith_type - (mkrhs _3 3, - (Type.mk (mkrhs (Longident.last _3) 3) - ~params:_2 - ~cstrs:(List.rev _6) - ~manifest:_5 - ~priv:_4 - ~loc:(symbol_rloc()))) ) -# 11605 "parsing/parser.ml" - : 'with_constraint)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'optional_type_parameters) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'label_longident) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_no_attr) in - Obj.repr( -# 2183 "parsing/parser.mly" - ( Pwith_typesubst - (mkrhs _3 3, - (Type.mk (mkrhs (Longident.last _3) 3) - ~params:_2 - ~manifest:_5 - ~loc:(symbol_rloc()))) ) -# 11619 "parsing/parser.ml" - : 'with_constraint)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'mod_ext_longident) in - Obj.repr( -# 2190 "parsing/parser.mly" - ( Pwith_module (mkrhs _2 2, mkrhs _4 4) ) -# 11627 "parsing/parser.ml" - : 'with_constraint)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'mod_ext_longident) in - Obj.repr( -# 2192 "parsing/parser.mly" - ( Pwith_modsubst (mkrhs _2 2, mkrhs _4 4) ) -# 11635 "parsing/parser.ml" - : 'with_constraint)) -; (fun __caml_parser_env -> - Obj.repr( -# 2195 "parsing/parser.mly" - ( Public ) -# 11641 "parsing/parser.ml" - : 'with_type_binder)) -; (fun __caml_parser_env -> - Obj.repr( -# 2196 "parsing/parser.mly" - ( Private ) -# 11647 "parsing/parser.ml" - : 'with_type_binder)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in - Obj.repr( -# 2202 "parsing/parser.mly" - ( [mkrhs _2 2] ) -# 11654 "parsing/parser.ml" - : 'typevar_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'typevar_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in - Obj.repr( -# 2203 "parsing/parser.mly" - ( mkrhs _3 3 :: _1 ) -# 11662 "parsing/parser.ml" - : 'typevar_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 2207 "parsing/parser.mly" - ( _1 ) -# 11669 "parsing/parser.ml" - : 'poly_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'typevar_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 2209 "parsing/parser.mly" - ( mktyp(Ptyp_poly(List.rev _1, _3)) ) -# 11677 "parsing/parser.ml" - : 'poly_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_no_attr) in - Obj.repr( -# 2213 "parsing/parser.mly" - ( _1 ) -# 11684 "parsing/parser.ml" - : 'poly_type_no_attr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'typevar_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_no_attr) in - Obj.repr( -# 2215 "parsing/parser.mly" - ( mktyp(Ptyp_poly(List.rev _1, _3)) ) -# 11692 "parsing/parser.ml" - : 'poly_type_no_attr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_no_attr) in - Obj.repr( -# 2222 "parsing/parser.mly" - ( _1 ) -# 11699 "parsing/parser.ml" - : 'core_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in - Obj.repr( -# 2224 "parsing/parser.mly" - ( Typ.attr _1 _2 ) -# 11707 "parsing/parser.ml" - : 'core_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type2) in - Obj.repr( -# 2228 "parsing/parser.mly" - ( _1 ) -# 11714 "parsing/parser.ml" - : 'core_type_no_attr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'core_type2) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in - Obj.repr( -# 2230 "parsing/parser.mly" - ( mktyp(Ptyp_alias(_1, _4)) ) -# 11722 "parsing/parser.ml" - : 'core_type_no_attr)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type_or_tuple) in - Obj.repr( -# 2234 "parsing/parser.mly" - ( _1 ) -# 11729 "parsing/parser.ml" - : 'core_type2)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : string) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'core_type2) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'core_type2) in - Obj.repr( -# 2236 "parsing/parser.mly" - ( let param = extra_rhs_core_type _4 ~pos:4 in - mktyp (Ptyp_arrow(Optional _2 , param, _6)) ) -# 11739 "parsing/parser.ml" - : 'core_type2)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : string) in - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'core_type2) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'core_type2) in - Obj.repr( -# 2239 "parsing/parser.mly" - ( let param = extra_rhs_core_type _2 ~pos:2 in - mktyp(Ptyp_arrow(Optional _1 , param, _4)) - ) -# 11750 "parsing/parser.ml" - : 'core_type2)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : string) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'core_type2) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'core_type2) in - Obj.repr( -# 2243 "parsing/parser.mly" - ( let param = extra_rhs_core_type _3 ~pos:3 in - mktyp(Ptyp_arrow(Labelled _1, param, _5)) ) -# 11760 "parsing/parser.ml" - : 'core_type2)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'core_type2) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type2) in - Obj.repr( -# 2246 "parsing/parser.mly" - ( let param = extra_rhs_core_type _1 ~pos:1 in - mktyp(Ptyp_arrow(Nolabel, param, _3)) ) -# 11769 "parsing/parser.ml" - : 'core_type2)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type2) in - Obj.repr( -# 2252 "parsing/parser.mly" - ( _1 ) -# 11776 "parsing/parser.ml" - : 'simple_core_type)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'core_type_comma_list) in - Obj.repr( -# 2254 "parsing/parser.mly" - ( match _2 with [sty] -> sty | _ -> raise Parse_error ) -# 11783 "parsing/parser.ml" - : 'simple_core_type)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in - Obj.repr( -# 2259 "parsing/parser.mly" - ( mktyp(Ptyp_var _2) ) -# 11790 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - Obj.repr( -# 2261 "parsing/parser.mly" - ( mktyp(Ptyp_any) ) -# 11796 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_longident) in - Obj.repr( -# 2263 "parsing/parser.mly" - ( mktyp(Ptyp_constr(mkrhs _1 1, [])) ) -# 11803 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'simple_core_type2) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'type_longident) in - Obj.repr( -# 2265 "parsing/parser.mly" - ( mktyp(Ptyp_constr(mkrhs _2 2, [_1])) ) -# 11811 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'core_type_comma_list) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'type_longident) in - Obj.repr( -# 2267 "parsing/parser.mly" - ( mktyp(Ptyp_constr(mkrhs _4 4, List.rev _2)) ) -# 11819 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'meth_list) in - Obj.repr( -# 2269 "parsing/parser.mly" - ( let (f, c) = _2 in mktyp(Ptyp_object (f, c)) ) -# 11826 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - Obj.repr( -# 2271 "parsing/parser.mly" - ( mktyp(Ptyp_object ([], Closed)) ) -# 11832 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_longident) in - Obj.repr( -# 2273 "parsing/parser.mly" - ( mktyp(Ptyp_class(mkrhs _2 2, [])) ) -# 11839 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'simple_core_type2) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'class_longident) in - Obj.repr( -# 2275 "parsing/parser.mly" - ( mktyp(Ptyp_class(mkrhs _3 3, [_1])) ) -# 11847 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'core_type_comma_list) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'class_longident) in - Obj.repr( -# 2277 "parsing/parser.mly" - ( mktyp(Ptyp_class(mkrhs _5 5, List.rev _2)) ) -# 11855 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'tag_field) in - Obj.repr( -# 2279 "parsing/parser.mly" - ( mktyp(Ptyp_variant([_2], Closed, None)) ) -# 11862 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'row_field_list) in - Obj.repr( -# 2285 "parsing/parser.mly" - ( mktyp(Ptyp_variant(List.rev _3, Closed, None)) ) -# 11869 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 3 : 'row_field) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'row_field_list) in - Obj.repr( -# 2287 "parsing/parser.mly" - ( mktyp(Ptyp_variant(_2 :: List.rev _4, Closed, None)) ) -# 11877 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'opt_bar) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'row_field_list) in - Obj.repr( -# 2289 "parsing/parser.mly" - ( mktyp(Ptyp_variant(List.rev _3, Open, None)) ) -# 11885 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - Obj.repr( -# 2291 "parsing/parser.mly" - ( mktyp(Ptyp_variant([], Open, None)) ) -# 11891 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'opt_bar) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'row_field_list) in - Obj.repr( -# 2293 "parsing/parser.mly" - ( mktyp(Ptyp_variant(List.rev _3, Closed, Some [])) ) -# 11899 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 4 : 'opt_bar) in - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'row_field_list) in - let _5 = (Parsing.peek_val __caml_parser_env 1 : 'name_tag_list) in - Obj.repr( -# 2295 "parsing/parser.mly" - ( mktyp(Ptyp_variant(List.rev _3, Closed, Some (List.rev _5))) ) -# 11908 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in - Obj.repr( -# 2297 "parsing/parser.mly" - ( mktyp_attrs (Ptyp_package _4) _3 ) -# 11916 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in - Obj.repr( -# 2299 "parsing/parser.mly" - ( mktyp (Ptyp_extension _1) ) -# 11923 "parsing/parser.ml" - : 'simple_core_type2)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_type) in - Obj.repr( -# 2302 "parsing/parser.mly" - ( package_type_of_module_type _1 ) -# 11930 "parsing/parser.ml" - : 'package_type)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'row_field) in - Obj.repr( -# 2305 "parsing/parser.mly" - ( [_1] ) -# 11937 "parsing/parser.ml" - : 'row_field_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'row_field_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'row_field) in - Obj.repr( -# 2306 "parsing/parser.mly" - ( _3 :: _1 ) -# 11945 "parsing/parser.ml" - : 'row_field_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'tag_field) in - Obj.repr( -# 2309 "parsing/parser.mly" - ( _1 ) -# 11952 "parsing/parser.ml" - : 'row_field)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in - Obj.repr( -# 2310 "parsing/parser.mly" - ( Rinherit _1 ) -# 11959 "parsing/parser.ml" - : 'row_field)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'name_tag) in - let _3 = (Parsing.peek_val __caml_parser_env 2 : 'opt_ampersand) in - let _4 = (Parsing.peek_val __caml_parser_env 1 : 'amper_type_list) in - let _5 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2314 "parsing/parser.mly" - ( Rtag (mkrhs _1 1, add_info_attrs (symbol_info ()) _5, - _3, List.rev _4) ) -# 11970 "parsing/parser.ml" - : 'tag_field)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'name_tag) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2317 "parsing/parser.mly" - ( Rtag (mkrhs _1 1, add_info_attrs (symbol_info ()) _2, true, []) ) -# 11978 "parsing/parser.ml" - : 'tag_field)) -; (fun __caml_parser_env -> - Obj.repr( -# 2320 "parsing/parser.mly" - ( true ) -# 11984 "parsing/parser.ml" - : 'opt_ampersand)) -; (fun __caml_parser_env -> - Obj.repr( -# 2321 "parsing/parser.mly" - ( false ) -# 11990 "parsing/parser.ml" - : 'opt_ampersand)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_no_attr) in - Obj.repr( -# 2324 "parsing/parser.mly" - ( [_1] ) -# 11997 "parsing/parser.ml" - : 'amper_type_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'amper_type_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_no_attr) in - Obj.repr( -# 2325 "parsing/parser.mly" - ( _3 :: _1 ) -# 12005 "parsing/parser.ml" - : 'amper_type_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'name_tag) in - Obj.repr( -# 2328 "parsing/parser.mly" - ( [_1] ) -# 12012 "parsing/parser.ml" - : 'name_tag_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'name_tag_list) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'name_tag) in - Obj.repr( -# 2329 "parsing/parser.mly" - ( _2 :: _1 ) -# 12020 "parsing/parser.ml" - : 'name_tag_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in - Obj.repr( -# 2332 "parsing/parser.mly" - ( _1 ) -# 12027 "parsing/parser.ml" - : 'simple_core_type_or_tuple)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'simple_core_type) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_list) in - Obj.repr( -# 2334 "parsing/parser.mly" - ( mktyp(Ptyp_tuple(_1 :: List.rev _3)) ) -# 12035 "parsing/parser.ml" - : 'simple_core_type_or_tuple)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 2337 "parsing/parser.mly" - ( [_1] ) -# 12042 "parsing/parser.ml" - : 'core_type_comma_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'core_type_comma_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 2338 "parsing/parser.mly" - ( _3 :: _1 ) -# 12050 "parsing/parser.ml" - : 'core_type_comma_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in - Obj.repr( -# 2341 "parsing/parser.mly" - ( [_1] ) -# 12057 "parsing/parser.ml" - : 'core_type_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'core_type_list) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in - Obj.repr( -# 2342 "parsing/parser.mly" - ( _3 :: _1 ) -# 12065 "parsing/parser.ml" - : 'core_type_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'field_semi) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'meth_list) in - Obj.repr( -# 2345 "parsing/parser.mly" - ( let (f, c) = _2 in (_1 :: f, c) ) -# 12073 "parsing/parser.ml" - : 'meth_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'inherit_field_semi) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'meth_list) in - Obj.repr( -# 2346 "parsing/parser.mly" - ( let (f, c) = _2 in (_1 :: f, c) ) -# 12081 "parsing/parser.ml" - : 'meth_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'field_semi) in - Obj.repr( -# 2347 "parsing/parser.mly" - ( [_1], Closed ) -# 12088 "parsing/parser.ml" - : 'meth_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'field) in - Obj.repr( -# 2348 "parsing/parser.mly" - ( [_1], Closed ) -# 12095 "parsing/parser.ml" - : 'meth_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'inherit_field_semi) in - Obj.repr( -# 2349 "parsing/parser.mly" - ( [_1], Closed ) -# 12102 "parsing/parser.ml" - : 'meth_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in - Obj.repr( -# 2350 "parsing/parser.mly" - ( [Oinherit _1], Closed ) -# 12109 "parsing/parser.ml" - : 'meth_list)) -; (fun __caml_parser_env -> - Obj.repr( -# 2351 "parsing/parser.mly" - ( [], Open ) -# 12115 "parsing/parser.ml" - : 'meth_list)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'label) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'poly_type_no_attr) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2355 "parsing/parser.mly" - ( Otag (mkrhs _1 1, add_info_attrs (symbol_info ()) _4, _3) ) -# 12124 "parsing/parser.ml" - : 'field)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 5 : 'label) in - let _3 = (Parsing.peek_val __caml_parser_env 3 : 'poly_type_no_attr) in - let _4 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in - let _6 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2360 "parsing/parser.mly" - ( let info = - match rhs_info 4 with - | Some _ as info_before_semi -> info_before_semi - | None -> symbol_info () - in - ( Otag (mkrhs _1 1, add_info_attrs info (_4 @ _6), _3)) ) -# 12139 "parsing/parser.ml" - : 'field_semi)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'simple_core_type) in - Obj.repr( -# 2369 "parsing/parser.mly" - ( Oinherit _1 ) -# 12146 "parsing/parser.ml" - : 'inherit_field_semi)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2372 "parsing/parser.mly" - ( _1 ) -# 12153 "parsing/parser.ml" - : 'label)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in - Obj.repr( -# 2378 "parsing/parser.mly" - ( let (n, m) = _1 in Pconst_integer (n, m) ) -# 12160 "parsing/parser.ml" - : 'constant)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : char) in - Obj.repr( -# 2379 "parsing/parser.mly" - ( Pconst_char _1 ) -# 12167 "parsing/parser.ml" - : 'constant)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string * string option) in - Obj.repr( -# 2380 "parsing/parser.mly" - ( let (s, d) = _1 in Pconst_string (s, d) ) -# 12174 "parsing/parser.ml" - : 'constant)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in - Obj.repr( -# 2381 "parsing/parser.mly" - ( let (f, m) = _1 in Pconst_float (f, m) ) -# 12181 "parsing/parser.ml" - : 'constant)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constant) in - Obj.repr( -# 2384 "parsing/parser.mly" - ( _1 ) -# 12188 "parsing/parser.ml" - : 'signed_constant)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in - Obj.repr( -# 2385 "parsing/parser.mly" - ( let (n, m) = _2 in Pconst_integer("-" ^ n, m) ) -# 12195 "parsing/parser.ml" - : 'signed_constant)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in - Obj.repr( -# 2386 "parsing/parser.mly" - ( let (f, m) = _2 in Pconst_float("-" ^ f, m) ) -# 12202 "parsing/parser.ml" - : 'signed_constant)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in - Obj.repr( -# 2387 "parsing/parser.mly" - ( let (n, m) = _2 in Pconst_integer (n, m) ) -# 12209 "parsing/parser.ml" - : 'signed_constant)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in - Obj.repr( -# 2388 "parsing/parser.mly" - ( let (f, m) = _2 in Pconst_float(f, m) ) -# 12216 "parsing/parser.ml" - : 'signed_constant)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2394 "parsing/parser.mly" - ( _1 ) -# 12223 "parsing/parser.ml" - : 'ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2395 "parsing/parser.mly" - ( _1 ) -# 12230 "parsing/parser.ml" - : 'ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2398 "parsing/parser.mly" - ( _1 ) -# 12237 "parsing/parser.ml" - : 'val_ident)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'operator) in - Obj.repr( -# 2399 "parsing/parser.mly" - ( _2 ) -# 12244 "parsing/parser.ml" - : 'val_ident)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'operator) in - Obj.repr( -# 2400 "parsing/parser.mly" - ( unclosed "(" 1 ")" 3 ) -# 12251 "parsing/parser.ml" - : 'val_ident)) -; (fun __caml_parser_env -> - Obj.repr( -# 2401 "parsing/parser.mly" - ( expecting 2 "operator" ) -# 12257 "parsing/parser.ml" - : 'val_ident)) -; (fun __caml_parser_env -> - Obj.repr( -# 2402 "parsing/parser.mly" - ( expecting 3 "module-expr" ) -# 12263 "parsing/parser.ml" - : 'val_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2405 "parsing/parser.mly" - ( _1 ) -# 12270 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2406 "parsing/parser.mly" - ( _1 ) -# 12277 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2407 "parsing/parser.mly" - ( _1 ) -# 12284 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2408 "parsing/parser.mly" - ( _1 ) -# 12291 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2409 "parsing/parser.mly" - ( _1 ) -# 12298 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2410 "parsing/parser.mly" - ( _1 ) -# 12305 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in - Obj.repr( -# 2411 "parsing/parser.mly" - ( "."^ _1 ^"()" ) -# 12312 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : string) in - Obj.repr( -# 2412 "parsing/parser.mly" - ( "."^ _1 ^ "()<-" ) -# 12319 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in - Obj.repr( -# 2413 "parsing/parser.mly" - ( "."^ _1 ^"[]" ) -# 12326 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : string) in - Obj.repr( -# 2414 "parsing/parser.mly" - ( "."^ _1 ^ "[]<-" ) -# 12333 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in - Obj.repr( -# 2415 "parsing/parser.mly" - ( "."^ _1 ^"{}" ) -# 12340 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : string) in - Obj.repr( -# 2416 "parsing/parser.mly" - ( "."^ _1 ^ "{}<-" ) -# 12347 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2417 "parsing/parser.mly" - ( _1 ) -# 12354 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2418 "parsing/parser.mly" - ( "!" ) -# 12360 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2419 "parsing/parser.mly" - ( "+" ) -# 12366 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2420 "parsing/parser.mly" - ( "+." ) -# 12372 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2421 "parsing/parser.mly" - ( "-" ) -# 12378 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2422 "parsing/parser.mly" - ( "-." ) -# 12384 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2423 "parsing/parser.mly" - ( "*" ) -# 12390 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2424 "parsing/parser.mly" - ( "=" ) -# 12396 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2425 "parsing/parser.mly" - ( "<" ) -# 12402 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2426 "parsing/parser.mly" - ( ">" ) -# 12408 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2427 "parsing/parser.mly" - ( "or" ) -# 12414 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2428 "parsing/parser.mly" - ( "||" ) -# 12420 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2429 "parsing/parser.mly" - ( "&" ) -# 12426 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2430 "parsing/parser.mly" - ( "&&" ) -# 12432 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2431 "parsing/parser.mly" - ( ":=" ) -# 12438 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2432 "parsing/parser.mly" - ( "+=" ) -# 12444 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - Obj.repr( -# 2433 "parsing/parser.mly" - ( "%" ) -# 12450 "parsing/parser.ml" - : 'operator)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2436 "parsing/parser.mly" - ( _1 ) -# 12457 "parsing/parser.ml" - : 'constr_ident)) -; (fun __caml_parser_env -> - Obj.repr( -# 2437 "parsing/parser.mly" - ( "[]" ) -# 12463 "parsing/parser.ml" - : 'constr_ident)) -; (fun __caml_parser_env -> - Obj.repr( -# 2438 "parsing/parser.mly" - ( "()" ) -# 12469 "parsing/parser.ml" - : 'constr_ident)) -; (fun __caml_parser_env -> - Obj.repr( -# 2439 "parsing/parser.mly" - ( "::" ) -# 12475 "parsing/parser.ml" - : 'constr_ident)) -; (fun __caml_parser_env -> - Obj.repr( -# 2440 "parsing/parser.mly" - ( "false" ) -# 12481 "parsing/parser.ml" - : 'constr_ident)) -; (fun __caml_parser_env -> - Obj.repr( -# 2441 "parsing/parser.mly" - ( "true" ) -# 12487 "parsing/parser.ml" - : 'constr_ident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'val_ident) in - Obj.repr( -# 2445 "parsing/parser.mly" - ( Lident _1 ) -# 12494 "parsing/parser.ml" - : 'val_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'val_ident) in - Obj.repr( -# 2446 "parsing/parser.mly" - ( Ldot(_1, _3) ) -# 12502 "parsing/parser.ml" - : 'val_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'mod_longident) in - Obj.repr( -# 2449 "parsing/parser.mly" - ( _1 ) -# 12509 "parsing/parser.ml" - : 'constr_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in - Obj.repr( -# 2450 "parsing/parser.mly" - ( Ldot(_1,"::") ) -# 12516 "parsing/parser.ml" - : 'constr_longident)) -; (fun __caml_parser_env -> - Obj.repr( -# 2451 "parsing/parser.mly" - ( Lident "[]" ) -# 12522 "parsing/parser.ml" - : 'constr_longident)) -; (fun __caml_parser_env -> - Obj.repr( -# 2452 "parsing/parser.mly" - ( Lident "()" ) -# 12528 "parsing/parser.ml" - : 'constr_longident)) -; (fun __caml_parser_env -> - Obj.repr( -# 2453 "parsing/parser.mly" - ( Lident "::" ) -# 12534 "parsing/parser.ml" - : 'constr_longident)) -; (fun __caml_parser_env -> - Obj.repr( -# 2454 "parsing/parser.mly" - ( Lident "false" ) -# 12540 "parsing/parser.ml" - : 'constr_longident)) -; (fun __caml_parser_env -> - Obj.repr( -# 2455 "parsing/parser.mly" - ( Lident "true" ) -# 12546 "parsing/parser.ml" - : 'constr_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2458 "parsing/parser.mly" - ( Lident _1 ) -# 12553 "parsing/parser.ml" - : 'label_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2459 "parsing/parser.mly" - ( Ldot(_1, _3) ) -# 12561 "parsing/parser.ml" - : 'label_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2462 "parsing/parser.mly" - ( Lident _1 ) -# 12568 "parsing/parser.ml" - : 'type_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_ext_longident) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2463 "parsing/parser.mly" - ( Ldot(_1, _3) ) -# 12576 "parsing/parser.ml" - : 'type_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2466 "parsing/parser.mly" - ( Lident _1 ) -# 12583 "parsing/parser.ml" - : 'mod_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2467 "parsing/parser.mly" - ( Ldot(_1, _3) ) -# 12591 "parsing/parser.ml" - : 'mod_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2470 "parsing/parser.mly" - ( Lident _1 ) -# 12598 "parsing/parser.ml" - : 'mod_ext_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_ext_longident) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2471 "parsing/parser.mly" - ( Ldot(_1, _3) ) -# 12606 "parsing/parser.ml" - : 'mod_ext_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_ext_longident) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'mod_ext_longident) in - Obj.repr( -# 2472 "parsing/parser.mly" - ( lapply _1 _3 ) -# 12614 "parsing/parser.ml" - : 'mod_ext_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in - Obj.repr( -# 2475 "parsing/parser.mly" - ( Lident _1 ) -# 12621 "parsing/parser.ml" - : 'mty_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_ext_longident) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in - Obj.repr( -# 2476 "parsing/parser.mly" - ( Ldot(_1, _3) ) -# 12629 "parsing/parser.ml" - : 'mty_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2479 "parsing/parser.mly" - ( Lident _1 ) -# 12636 "parsing/parser.ml" - : 'clty_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_ext_longident) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2480 "parsing/parser.mly" - ( Ldot(_1, _3) ) -# 12644 "parsing/parser.ml" - : 'clty_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2483 "parsing/parser.mly" - ( Lident _1 ) -# 12651 "parsing/parser.ml" - : 'class_longident)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2484 "parsing/parser.mly" - ( Ldot(_1, _3) ) -# 12659 "parsing/parser.ml" - : 'class_longident)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in - Obj.repr( -# 2490 "parsing/parser.mly" - ( Ptop_dir(_2, Pdir_none) ) -# 12666 "parsing/parser.ml" - : 'toplevel_directive)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ident) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : string * string option) in - Obj.repr( -# 2491 "parsing/parser.mly" - ( Ptop_dir(_2, Pdir_string (fst _3)) ) -# 12674 "parsing/parser.ml" - : 'toplevel_directive)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ident) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in - Obj.repr( -# 2492 "parsing/parser.mly" - ( let (n, m) = _3 in - Ptop_dir(_2, Pdir_int (n ,m)) ) -# 12683 "parsing/parser.ml" - : 'toplevel_directive)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ident) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'val_longident) in - Obj.repr( -# 2494 "parsing/parser.mly" - ( Ptop_dir(_2, Pdir_ident _3) ) -# 12691 "parsing/parser.ml" - : 'toplevel_directive)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ident) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'mod_longident) in - Obj.repr( -# 2495 "parsing/parser.mly" - ( Ptop_dir(_2, Pdir_ident _3) ) -# 12699 "parsing/parser.ml" - : 'toplevel_directive)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ident) in - Obj.repr( -# 2496 "parsing/parser.mly" - ( Ptop_dir(_2, Pdir_bool false) ) -# 12706 "parsing/parser.ml" - : 'toplevel_directive)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ident) in - Obj.repr( -# 2497 "parsing/parser.mly" - ( Ptop_dir(_2, Pdir_bool true) ) -# 12713 "parsing/parser.ml" - : 'toplevel_directive)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in - Obj.repr( -# 2503 "parsing/parser.mly" - ( _2 ) -# 12720 "parsing/parser.ml" - : 'name_tag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2506 "parsing/parser.mly" - ( Nonrecursive ) -# 12726 "parsing/parser.ml" - : 'rec_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2507 "parsing/parser.mly" - ( Recursive ) -# 12732 "parsing/parser.ml" - : 'rec_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2510 "parsing/parser.mly" - ( Recursive ) -# 12738 "parsing/parser.ml" - : 'nonrec_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2511 "parsing/parser.mly" - ( Nonrecursive ) -# 12744 "parsing/parser.ml" - : 'nonrec_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2514 "parsing/parser.mly" - ( Upto ) -# 12750 "parsing/parser.ml" - : 'direction_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2515 "parsing/parser.mly" - ( Downto ) -# 12756 "parsing/parser.ml" - : 'direction_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2518 "parsing/parser.mly" - ( Public ) -# 12762 "parsing/parser.ml" - : 'private_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2519 "parsing/parser.mly" - ( Private ) -# 12768 "parsing/parser.ml" - : 'private_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2522 "parsing/parser.mly" - ( Immutable ) -# 12774 "parsing/parser.ml" - : 'mutable_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2523 "parsing/parser.mly" - ( Mutable ) -# 12780 "parsing/parser.ml" - : 'mutable_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2526 "parsing/parser.mly" - ( Concrete ) -# 12786 "parsing/parser.ml" - : 'virtual_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2527 "parsing/parser.mly" - ( Virtual ) -# 12792 "parsing/parser.ml" - : 'virtual_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2530 "parsing/parser.mly" - ( Public, Concrete ) -# 12798 "parsing/parser.ml" - : 'private_virtual_flags)) -; (fun __caml_parser_env -> - Obj.repr( -# 2531 "parsing/parser.mly" - ( Private, Concrete ) -# 12804 "parsing/parser.ml" - : 'private_virtual_flags)) -; (fun __caml_parser_env -> - Obj.repr( -# 2532 "parsing/parser.mly" - ( Public, Virtual ) -# 12810 "parsing/parser.ml" - : 'private_virtual_flags)) -; (fun __caml_parser_env -> - Obj.repr( -# 2533 "parsing/parser.mly" - ( Private, Virtual ) -# 12816 "parsing/parser.ml" - : 'private_virtual_flags)) -; (fun __caml_parser_env -> - Obj.repr( -# 2534 "parsing/parser.mly" - ( Private, Virtual ) -# 12822 "parsing/parser.ml" - : 'private_virtual_flags)) -; (fun __caml_parser_env -> - Obj.repr( -# 2537 "parsing/parser.mly" - ( Fresh ) -# 12828 "parsing/parser.ml" - : 'override_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2538 "parsing/parser.mly" - ( Override ) -# 12834 "parsing/parser.ml" - : 'override_flag)) -; (fun __caml_parser_env -> - Obj.repr( -# 2541 "parsing/parser.mly" - ( () ) -# 12840 "parsing/parser.ml" - : 'opt_bar)) -; (fun __caml_parser_env -> - Obj.repr( -# 2542 "parsing/parser.mly" - ( () ) -# 12846 "parsing/parser.ml" - : 'opt_bar)) -; (fun __caml_parser_env -> - Obj.repr( -# 2545 "parsing/parser.mly" - ( () ) -# 12852 "parsing/parser.ml" - : 'opt_semi)) -; (fun __caml_parser_env -> - Obj.repr( -# 2546 "parsing/parser.mly" - ( () ) -# 12858 "parsing/parser.ml" - : 'opt_semi)) -; (fun __caml_parser_env -> - Obj.repr( -# 2549 "parsing/parser.mly" - ( "-" ) -# 12864 "parsing/parser.ml" - : 'subtractive)) -; (fun __caml_parser_env -> - Obj.repr( -# 2550 "parsing/parser.mly" - ( "-." ) -# 12870 "parsing/parser.ml" - : 'subtractive)) -; (fun __caml_parser_env -> - Obj.repr( -# 2553 "parsing/parser.mly" - ( "+" ) -# 12876 "parsing/parser.ml" - : 'additive)) -; (fun __caml_parser_env -> - Obj.repr( -# 2554 "parsing/parser.mly" - ( "+." ) -# 12882 "parsing/parser.ml" - : 'additive)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2560 "parsing/parser.mly" - ( _1 ) -# 12889 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in - Obj.repr( -# 2561 "parsing/parser.mly" - ( _1 ) -# 12896 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2562 "parsing/parser.mly" - ( "and" ) -# 12902 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2563 "parsing/parser.mly" - ( "as" ) -# 12908 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2564 "parsing/parser.mly" - ( "assert" ) -# 12914 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2565 "parsing/parser.mly" - ( "begin" ) -# 12920 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2566 "parsing/parser.mly" - ( "class" ) -# 12926 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2567 "parsing/parser.mly" - ( "constraint" ) -# 12932 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2568 "parsing/parser.mly" - ( "do" ) -# 12938 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2569 "parsing/parser.mly" - ( "done" ) -# 12944 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2570 "parsing/parser.mly" - ( "downto" ) -# 12950 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2571 "parsing/parser.mly" - ( "else" ) -# 12956 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2572 "parsing/parser.mly" - ( "end" ) -# 12962 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2573 "parsing/parser.mly" - ( "exception" ) -# 12968 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2574 "parsing/parser.mly" - ( "external" ) -# 12974 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2575 "parsing/parser.mly" - ( "false" ) -# 12980 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2576 "parsing/parser.mly" - ( "for" ) -# 12986 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2577 "parsing/parser.mly" - ( "fun" ) -# 12992 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2578 "parsing/parser.mly" - ( "function" ) -# 12998 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2579 "parsing/parser.mly" - ( "functor" ) -# 13004 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2580 "parsing/parser.mly" - ( "if" ) -# 13010 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2581 "parsing/parser.mly" - ( "in" ) -# 13016 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2582 "parsing/parser.mly" - ( "include" ) -# 13022 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2583 "parsing/parser.mly" - ( "inherit" ) -# 13028 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2584 "parsing/parser.mly" - ( "initializer" ) -# 13034 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2585 "parsing/parser.mly" - ( "lazy" ) -# 13040 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2586 "parsing/parser.mly" - ( "let" ) -# 13046 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2587 "parsing/parser.mly" - ( "match" ) -# 13052 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2588 "parsing/parser.mly" - ( "method" ) -# 13058 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2589 "parsing/parser.mly" - ( "module" ) -# 13064 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2590 "parsing/parser.mly" - ( "mutable" ) -# 13070 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2591 "parsing/parser.mly" - ( "new" ) -# 13076 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2592 "parsing/parser.mly" - ( "nonrec" ) -# 13082 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2593 "parsing/parser.mly" - ( "object" ) -# 13088 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2594 "parsing/parser.mly" - ( "of" ) -# 13094 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2595 "parsing/parser.mly" - ( "open" ) -# 13100 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2596 "parsing/parser.mly" - ( "or" ) -# 13106 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2597 "parsing/parser.mly" - ( "private" ) -# 13112 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2598 "parsing/parser.mly" - ( "rec" ) -# 13118 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2599 "parsing/parser.mly" - ( "sig" ) -# 13124 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2600 "parsing/parser.mly" - ( "struct" ) -# 13130 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2601 "parsing/parser.mly" - ( "then" ) -# 13136 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2602 "parsing/parser.mly" - ( "to" ) -# 13142 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2603 "parsing/parser.mly" - ( "true" ) -# 13148 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2604 "parsing/parser.mly" - ( "try" ) -# 13154 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2605 "parsing/parser.mly" - ( "type" ) -# 13160 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2606 "parsing/parser.mly" - ( "val" ) -# 13166 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2607 "parsing/parser.mly" - ( "virtual" ) -# 13172 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2608 "parsing/parser.mly" - ( "when" ) -# 13178 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2609 "parsing/parser.mly" - ( "while" ) -# 13184 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - Obj.repr( -# 2610 "parsing/parser.mly" - ( "with" ) -# 13190 "parsing/parser.ml" - : 'single_attr_id)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'single_attr_id) in - Obj.repr( -# 2615 "parsing/parser.mly" - ( mkloc _1 (symbol_rloc()) ) -# 13197 "parsing/parser.ml" - : 'attr_id)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 2 : 'single_attr_id) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'attr_id) in - Obj.repr( -# 2616 "parsing/parser.mly" - ( mkloc (_1 ^ "." ^ _3.txt) (symbol_rloc())) -# 13205 "parsing/parser.ml" - : 'attr_id)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attr_id) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'payload) in - Obj.repr( -# 2619 "parsing/parser.mly" - ( (_2, _3) ) -# 13213 "parsing/parser.ml" - : 'attribute)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attr_id) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'payload) in - Obj.repr( -# 2622 "parsing/parser.mly" - ( (_2, _3) ) -# 13221 "parsing/parser.ml" - : 'post_item_attribute)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attr_id) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'payload) in - Obj.repr( -# 2625 "parsing/parser.mly" - ( (_2, _3) ) -# 13229 "parsing/parser.ml" - : 'floating_attribute)) -; (fun __caml_parser_env -> - Obj.repr( -# 2628 "parsing/parser.mly" - ( [] ) -# 13235 "parsing/parser.ml" - : 'post_item_attributes)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'post_item_attribute) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in - Obj.repr( -# 2629 "parsing/parser.mly" - ( _1 :: _2 ) -# 13243 "parsing/parser.ml" - : 'post_item_attributes)) -; (fun __caml_parser_env -> - Obj.repr( -# 2632 "parsing/parser.mly" - ( [] ) -# 13249 "parsing/parser.ml" - : 'attributes)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'attribute) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2633 "parsing/parser.mly" - ( _1 :: _2 ) -# 13257 "parsing/parser.ml" - : 'attributes)) -; (fun __caml_parser_env -> - Obj.repr( -# 2636 "parsing/parser.mly" - ( None, [] ) -# 13263 "parsing/parser.ml" - : 'ext_attributes)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 1 : 'attribute) in - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2637 "parsing/parser.mly" - ( None, _1 :: _2 ) -# 13271 "parsing/parser.ml" - : 'ext_attributes)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 1 : 'attr_id) in - let _3 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in - Obj.repr( -# 2638 "parsing/parser.mly" - ( Some _2, _3 ) -# 13279 "parsing/parser.ml" - : 'ext_attributes)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attr_id) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'payload) in - Obj.repr( -# 2641 "parsing/parser.mly" - ( (_2, _3) ) -# 13287 "parsing/parser.ml" - : 'extension)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attr_id) in - let _3 = (Parsing.peek_val __caml_parser_env 1 : 'payload) in - Obj.repr( -# 2644 "parsing/parser.mly" - ( (_2, _3) ) -# 13295 "parsing/parser.ml" - : 'item_extension)) -; (fun __caml_parser_env -> - let _1 = (Parsing.peek_val __caml_parser_env 0 : 'structure) in - Obj.repr( -# 2647 "parsing/parser.mly" - ( PStr _1 ) -# 13302 "parsing/parser.ml" - : 'payload)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'signature) in - Obj.repr( -# 2648 "parsing/parser.mly" - ( PSig _2 ) -# 13309 "parsing/parser.ml" - : 'payload)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in - Obj.repr( -# 2649 "parsing/parser.mly" - ( PTyp _2 ) -# 13316 "parsing/parser.ml" - : 'payload)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in - Obj.repr( -# 2650 "parsing/parser.mly" - ( PPat (_2, None) ) -# 13323 "parsing/parser.ml" - : 'payload)) -; (fun __caml_parser_env -> - let _2 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in - let _4 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in - Obj.repr( -# 2651 "parsing/parser.mly" - ( PPat (_2, Some _4) ) -# 13331 "parsing/parser.ml" - : 'payload)) -(* Entry implementation *) -; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0))) -(* Entry interface *) -; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0))) -(* Entry toplevel_phrase *) -; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0))) -(* Entry use_file *) -; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0))) -(* Entry parse_core_type *) -; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0))) -(* Entry parse_expression *) -; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0))) -(* Entry parse_pattern *) -; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0))) -|] -let yytables = - { Parsing.actions=yyact; - Parsing.transl_const=yytransl_const; - Parsing.transl_block=yytransl_block; - Parsing.lhs=yylhs; - Parsing.len=yylen; - Parsing.defred=yydefred; - Parsing.dgoto=yydgoto; - Parsing.sindex=yysindex; - Parsing.rindex=yyrindex; - Parsing.gindex=yygindex; - Parsing.tablesize=yytablesize; - Parsing.table=yytable; - Parsing.check=yycheck; - Parsing.error_function=parse_error; - Parsing.names_const=yynames_const; - Parsing.names_block=yynames_block } -let implementation (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = - (Parsing.yyparse yytables 1 lexfun lexbuf : Parsetree.structure) -let interface (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = - (Parsing.yyparse yytables 2 lexfun lexbuf : Parsetree.signature) -let toplevel_phrase (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = - (Parsing.yyparse yytables 3 lexfun lexbuf : Parsetree.toplevel_phrase) -let use_file (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = - (Parsing.yyparse yytables 4 lexfun lexbuf : Parsetree.toplevel_phrase list) -let parse_core_type (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = - (Parsing.yyparse yytables 5 lexfun lexbuf : Parsetree.core_type) -let parse_expression (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = - (Parsing.yyparse yytables 6 lexfun lexbuf : Parsetree.expression) -let parse_pattern (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = - (Parsing.yyparse yytables 7 lexfun lexbuf : Parsetree.pattern) -;; diff --git a/analysis/vendor/compiler-libs-406/parsing.ml b/analysis/vendor/compiler-libs-406/parsing.ml deleted file mode 100644 index 3b779f5c7..000000000 --- a/analysis/vendor/compiler-libs-406/parsing.ml +++ /dev/null @@ -1,211 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* The parsing engine *) - -open Lexing - -(* Internal interface to the parsing engine *) - -type parser_env = - { mutable s_stack : int array; (* States *) - mutable v_stack : Obj.t array; (* Semantic attributes *) - mutable symb_start_stack : position array; (* Start positions *) - mutable symb_end_stack : position array; (* End positions *) - mutable stacksize : int; (* Size of the stacks *) - mutable stackbase : int; (* Base sp for current parse *) - mutable curr_char : int; (* Last token read *) - mutable lval : Obj.t; (* Its semantic attribute *) - mutable symb_start : position; (* Start pos. of the current symbol*) - mutable symb_end : position; (* End pos. of the current symbol *) - mutable asp : int; (* The stack pointer for attributes *) - mutable rule_len : int; (* Number of rhs items in the rule *) - mutable rule_number : int; (* Rule number to reduce by *) - mutable sp : int; (* Saved sp for parse_engine *) - mutable state : int; (* Saved state for parse_engine *) - mutable errflag : int } (* Saved error flag for parse_engine *) - -type parse_tables = - { actions : (parser_env -> Obj.t) array; - transl_const : int array; - transl_block : int array; - lhs : string; - len : string; - defred : string; - dgoto : string; - sindex : string; - rindex : string; - gindex : string; - tablesize : int; - table : string; - check : string; - error_function : string -> unit; - names_const : string; - names_block : string } - -exception YYexit of Obj.t -exception Parse_error - -type parser_input = - Start - | Token_read - | Stacks_grown_1 - | Stacks_grown_2 - | Semantic_action_computed - | Error_detected - -type parser_output = - Read_token - | Raise_parse_error - | Grow_stacks_1 - | Grow_stacks_2 - | Compute_semantic_action - | Call_error_function - -(* to avoid warnings *) -let _ = [Read_token; Raise_parse_error; Grow_stacks_1; Grow_stacks_2; - Compute_semantic_action; Call_error_function] - -external parse_engine : - parse_tables -> parser_env -> parser_input -> Obj.t -> parser_output - = "caml_parse_engine" - -external set_trace: bool -> bool - = "caml_set_parser_trace" - -let env = - { s_stack = Array.make 100 0; - v_stack = Array.make 100 (Obj.repr ()); - symb_start_stack = Array.make 100 dummy_pos; - symb_end_stack = Array.make 100 dummy_pos; - stacksize = 100; - stackbase = 0; - curr_char = 0; - lval = Obj.repr (); - symb_start = dummy_pos; - symb_end = dummy_pos; - asp = 0; - rule_len = 0; - rule_number = 0; - sp = 0; - state = 0; - errflag = 0 } - -let grow_stacks() = - let oldsize = env.stacksize in - let newsize = oldsize * 2 in - let new_s = Array.make newsize 0 - and new_v = Array.make newsize (Obj.repr ()) - and new_start = Array.make newsize dummy_pos - and new_end = Array.make newsize dummy_pos in - Array.blit env.s_stack 0 new_s 0 oldsize; - env.s_stack <- new_s; - Array.blit env.v_stack 0 new_v 0 oldsize; - env.v_stack <- new_v; - Array.blit env.symb_start_stack 0 new_start 0 oldsize; - env.symb_start_stack <- new_start; - Array.blit env.symb_end_stack 0 new_end 0 oldsize; - env.symb_end_stack <- new_end; - env.stacksize <- newsize - -let clear_parser() = - Array.fill env.v_stack 0 env.stacksize (Obj.repr ()); - env.lval <- Obj.repr () - -let current_lookahead_fun = ref (fun (_ : Obj.t) -> false) - -let yyparse tables start lexer lexbuf = - let rec loop cmd arg = - match parse_engine tables env cmd arg with - Read_token -> - let t = Obj.repr(lexer lexbuf) in - env.symb_start <- lexbuf.lex_start_p; - env.symb_end <- lexbuf.lex_curr_p; - loop Token_read t - | Raise_parse_error -> - raise Parse_error - | Compute_semantic_action -> - let (action, value) = - try - (Semantic_action_computed, tables.actions.(env.rule_number) env) - with Parse_error -> - (Error_detected, Obj.repr ()) in - loop action value - | Grow_stacks_1 -> - grow_stacks(); loop Stacks_grown_1 (Obj.repr ()) - | Grow_stacks_2 -> - grow_stacks(); loop Stacks_grown_2 (Obj.repr ()) - | Call_error_function -> - tables.error_function "syntax error"; - loop Error_detected (Obj.repr ()) in - let init_asp = env.asp - and init_sp = env.sp - and init_stackbase = env.stackbase - and init_state = env.state - and init_curr_char = env.curr_char - and init_lval = env.lval - and init_errflag = env.errflag in - env.stackbase <- env.sp + 1; - env.curr_char <- start; - env.symb_end <- lexbuf.lex_curr_p; - try - loop Start (Obj.repr ()) - with exn -> - let curr_char = env.curr_char in - env.asp <- init_asp; - env.sp <- init_sp; - env.stackbase <- init_stackbase; - env.state <- init_state; - env.curr_char <- init_curr_char; - env.lval <- init_lval; - env.errflag <- init_errflag; - match exn with - YYexit v -> - Obj.magic v - | _ -> - current_lookahead_fun := - (fun tok -> - if Obj.is_block tok - then tables.transl_block.(Obj.tag tok) = curr_char - else tables.transl_const.(Obj.magic tok) = curr_char); - raise exn - -let peek_val env n = - Obj.magic env.v_stack.(env.asp - n) - -let symbol_start_pos () = - let rec loop i = - if i <= 0 then env.symb_end_stack.(env.asp) - else begin - let st = env.symb_start_stack.(env.asp - i + 1) in - let en = env.symb_end_stack.(env.asp - i + 1) in - if st <> en then st else loop (i - 1) - end - in - loop env.rule_len - -let symbol_end_pos () = env.symb_end_stack.(env.asp) -let rhs_start_pos n = env.symb_start_stack.(env.asp - (env.rule_len - n)) -let rhs_end_pos n = env.symb_end_stack.(env.asp - (env.rule_len - n)) - -let symbol_start () = (symbol_start_pos ()).pos_cnum -let symbol_end () = (symbol_end_pos ()).pos_cnum -let rhs_start n = (rhs_start_pos n).pos_cnum -let rhs_end n = (rhs_end_pos n).pos_cnum - -let is_current_lookahead tok = - (!current_lookahead_fun)(Obj.repr tok) - -let parse_error (_ : string) = () diff --git a/analysis/vendor/compiler-libs-406/parsing.mli b/analysis/vendor/compiler-libs-406/parsing.mli deleted file mode 100644 index 73b9504d4..000000000 --- a/analysis/vendor/compiler-libs-406/parsing.mli +++ /dev/null @@ -1,105 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** The run-time library for parsers generated by [ocamlyacc]. *) - -val symbol_start : unit -> int -(** [symbol_start] and {!Parsing.symbol_end} are to be called in the - action part of a grammar rule only. They return the offset of the - string that matches the left-hand side of the rule: [symbol_start()] - returns the offset of the first character; [symbol_end()] returns the - offset after the last character. The first character in a file is at - offset 0. *) - -val symbol_end : unit -> int -(** See {!Parsing.symbol_start}. *) - -val rhs_start : int -> int -(** Same as {!Parsing.symbol_start} and {!Parsing.symbol_end}, but - return the offset of the string matching the [n]th item on the - right-hand side of the rule, where [n] is the integer parameter - to [rhs_start] and [rhs_end]. [n] is 1 for the leftmost item. *) - -val rhs_end : int -> int -(** See {!Parsing.rhs_start}. *) - -val symbol_start_pos : unit -> Lexing.position -(** Same as [symbol_start], but return a [position] instead of an offset. *) - -val symbol_end_pos : unit -> Lexing.position -(** Same as [symbol_end], but return a [position] instead of an offset. *) - -val rhs_start_pos : int -> Lexing.position -(** Same as [rhs_start], but return a [position] instead of an offset. *) - -val rhs_end_pos : int -> Lexing.position -(** Same as [rhs_end], but return a [position] instead of an offset. *) - -val clear_parser : unit -> unit -(** Empty the parser stack. Call it just after a parsing function - has returned, to remove all pointers from the parser stack - to structures that were built by semantic actions during parsing. - This is optional, but lowers the memory requirements of the - programs. *) - -exception Parse_error -(** Raised when a parser encounters a syntax error. - Can also be raised from the action part of a grammar rule, - to initiate error recovery. *) - -val set_trace: bool -> bool -(** Control debugging support for [ocamlyacc]-generated parsers. - After [Parsing.set_trace true], the pushdown automaton that - executes the parsers prints a trace of its actions (reading a token, - shifting a state, reducing by a rule) on standard output. - [Parsing.set_trace false] turns this debugging trace off. - The boolean returned is the previous state of the trace flag. - @since 3.11.0 -*) - -(**/**) - -(** {1 } *) - -(** The following definitions are used by the generated parsers only. - They are not intended to be used directly by user programs. *) - -type parser_env - -type parse_tables = - { actions : (parser_env -> Obj.t) array; - transl_const : int array; - transl_block : int array; - lhs : string; - len : string; - defred : string; - dgoto : string; - sindex : string; - rindex : string; - gindex : string; - tablesize : int; - table : string; - check : string; - error_function : string -> unit; - names_const : string; - names_block : string } - -exception YYexit of Obj.t - -val yyparse : - parse_tables -> int -> (Lexing.lexbuf -> 'a) -> Lexing.lexbuf -> 'b -val peek_val : parser_env -> int -> 'a -val is_current_lookahead : 'a -> bool -val parse_error : string -> unit diff --git a/analysis/vendor/compiler-libs-406/primitive.ml b/analysis/vendor/compiler-libs-406/primitive.ml deleted file mode 100644 index 4d0a070d5..000000000 --- a/analysis/vendor/compiler-libs-406/primitive.ml +++ /dev/null @@ -1,222 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Description of primitive functions *) - -open Misc -open Parsetree - -type boxed_integer = Pnativeint | Pint32 | Pint64 - -type native_repr = - | Same_as_ocaml_repr - | Unboxed_float - | Unboxed_integer of boxed_integer - | Untagged_int - -type description = - { prim_name: string; (* Name of primitive or C function *) - prim_arity: int; (* Number of arguments *) - prim_alloc: bool; (* Does it allocates or raise? *) - prim_native_name: string; (* Name of C function for the nat. code gen. *) - prim_native_repr_args: native_repr list; - prim_native_repr_res: native_repr } - -type error = - | Old_style_float_with_native_repr_attribute - | Old_style_noalloc_with_noalloc_attribute - | No_native_primitive_with_repr_attribute - -exception Error of Location.t * error - -let is_ocaml_repr = function - | Same_as_ocaml_repr -> true - | Unboxed_float - | Unboxed_integer _ - | Untagged_int -> false - -let is_unboxed = function - | Same_as_ocaml_repr - | Untagged_int -> false - | Unboxed_float - | Unboxed_integer _ -> true - -let is_untagged = function - | Untagged_int -> true - | Same_as_ocaml_repr - | Unboxed_float - | Unboxed_integer _ -> false - -let rec make_native_repr_args arity x = - if arity = 0 then - [] - else - x :: make_native_repr_args (arity - 1) x - -let simple ~name ~arity ~alloc = - {prim_name = name; - prim_arity = arity; - prim_alloc = alloc; - prim_native_name = ""; - prim_native_repr_args = make_native_repr_args arity Same_as_ocaml_repr; - prim_native_repr_res = Same_as_ocaml_repr} - -let make ~name ~alloc ~native_name ~native_repr_args ~native_repr_res = - {prim_name = name; - prim_arity = List.length native_repr_args; - prim_alloc = alloc; - prim_native_name = native_name; - prim_native_repr_args = native_repr_args; - prim_native_repr_res = native_repr_res} - -let parse_declaration valdecl ~native_repr_args ~native_repr_res = - let arity = List.length native_repr_args in - let name, native_name, old_style_noalloc, old_style_float = - match valdecl.pval_prim with - | name :: "noalloc" :: name2 :: "float" :: _ -> (name, name2, true, true) - | name :: "noalloc" :: name2 :: _ -> (name, name2, true, false) - | name :: name2 :: "float" :: _ -> (name, name2, false, true) - | name :: "noalloc" :: _ -> (name, "", true, false) - | name :: name2 :: _ -> (name, name2, false, false) - | name :: _ -> (name, "", false, false) - | [] -> - fatal_error "Primitive.parse_declaration" - in - let noalloc_attribute = - Attr_helper.has_no_payload_attribute ["noalloc"; "ocaml.noalloc"] - valdecl.pval_attributes - in - if old_style_float && - not (List.for_all is_ocaml_repr native_repr_args && - is_ocaml_repr native_repr_res) then - raise (Error (valdecl.pval_loc, - Old_style_float_with_native_repr_attribute)); - if old_style_noalloc && noalloc_attribute then - raise (Error (valdecl.pval_loc, - Old_style_noalloc_with_noalloc_attribute)); - (* The compiler used to assume "noalloc" with "float", we just make this - explicit now (GPR#167): *) - let old_style_noalloc = old_style_noalloc || old_style_float in - if old_style_float then - Location.deprecated valdecl.pval_loc - "[@@unboxed] + [@@noalloc] should be used instead of \"float\"" - else if old_style_noalloc then - Location.deprecated valdecl.pval_loc - "[@@noalloc] should be used instead of \"noalloc\""; - if native_name = "" && - not (List.for_all is_ocaml_repr native_repr_args && - is_ocaml_repr native_repr_res) then - raise (Error (valdecl.pval_loc, - No_native_primitive_with_repr_attribute)); - let noalloc = old_style_noalloc || noalloc_attribute in - let native_repr_args, native_repr_res = - if old_style_float then - (make_native_repr_args arity Unboxed_float, Unboxed_float) - else - (native_repr_args, native_repr_res) - in - {prim_name = name; - prim_arity = arity; - prim_alloc = not noalloc; - prim_native_name = native_name; - prim_native_repr_args = native_repr_args; - prim_native_repr_res = native_repr_res} - -open Outcometree - -let rec add_native_repr_attributes ty attrs = - match ty, attrs with - | Otyp_arrow (label, a, b), attr_opt :: rest -> - let b = add_native_repr_attributes b rest in - let a = - match attr_opt with - | None -> a - | Some attr -> Otyp_attribute (a, attr) - in - Otyp_arrow (label, a, b) - | _, [Some attr] -> Otyp_attribute (ty, attr) - | _ -> - assert (List.for_all (fun x -> x = None) attrs); - ty - -let oattr_unboxed = { oattr_name = "unboxed" } -let oattr_untagged = { oattr_name = "untagged" } -let oattr_noalloc = { oattr_name = "noalloc" } - -let print p osig_val_decl = - let prims = - if p.prim_native_name <> "" then - [p.prim_name; p.prim_native_name] - else - [p.prim_name] - in - let for_all f = - List.for_all f p.prim_native_repr_args && f p.prim_native_repr_res - in - let all_unboxed = for_all is_unboxed in - let all_untagged = for_all is_untagged in - let attrs = if p.prim_alloc then [] else [oattr_noalloc] in - let attrs = - if all_unboxed then - oattr_unboxed :: attrs - else if all_untagged then - oattr_untagged :: attrs - else - attrs - in - let attr_of_native_repr = function - | Same_as_ocaml_repr -> None - | Unboxed_float - | Unboxed_integer _ -> if all_unboxed then None else Some oattr_unboxed - | Untagged_int -> if all_untagged then None else Some oattr_untagged - in - let type_attrs = - List.map attr_of_native_repr p.prim_native_repr_args @ - [attr_of_native_repr p.prim_native_repr_res] - in - { osig_val_decl with - oval_prims = prims; - oval_type = add_native_repr_attributes osig_val_decl.oval_type type_attrs; - oval_attributes = attrs } - -let native_name p = - if p.prim_native_name <> "" - then p.prim_native_name - else p.prim_name - -let byte_name p = - p.prim_name - -let report_error ppf err = - match err with - | Old_style_float_with_native_repr_attribute -> - Format.fprintf ppf "Cannot use \"float\" in conjunction with \ - [%@unboxed]/[%@untagged]" - | Old_style_noalloc_with_noalloc_attribute -> - Format.fprintf ppf "Cannot use \"noalloc\" in conjunction with \ - [%@%@noalloc]" - | No_native_primitive_with_repr_attribute -> - Format.fprintf ppf - "The native code version of the primitive is mandatory when \ - attributes [%@untagged] or [%@unboxed] are present" - -let () = - Location.register_error_of_exn - (function - | Error (loc, err) -> - Some (Location.error_of_printer loc report_error err) - | _ -> - None - ) diff --git a/analysis/vendor/compiler-libs-406/profile.ml b/analysis/vendor/compiler-libs-406/profile.ml deleted file mode 100644 index 59d67a124..000000000 --- a/analysis/vendor/compiler-libs-406/profile.ml +++ /dev/null @@ -1,334 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Pierre Chambart, OCamlPro *) -(* *) -(* Copyright 2015 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -[@@@ocaml.warning "+a-18-40-42-48"] - -type file = string - -external time_include_children: bool -> float = "caml_sys_time_include_children" -let cpu_time () = time_include_children true - -module Measure = struct - type t = { - time : float; - allocated_words : float; - top_heap_words : int; - } - let create () = - let stat = Gc.quick_stat () in - { - time = cpu_time (); - allocated_words = stat.minor_words +. stat.major_words; - top_heap_words = stat.top_heap_words; - } - let zero = { time = 0.; allocated_words = 0.; top_heap_words = 0 } -end - -module Measure_diff = struct - let timestamp = let r = ref (-1) in fun () -> incr r; !r - type t = { - timestamp : int; - duration : float; - allocated_words : float; - top_heap_words_increase : int; - } - let zero () = { - timestamp = timestamp (); - duration = 0.; - allocated_words = 0.; - top_heap_words_increase = 0; - } - let accumulate t (m1 : Measure.t) (m2 : Measure.t) = { - timestamp = t.timestamp; - duration = t.duration +. (m2.time -. m1.time); - allocated_words = - t.allocated_words +. (m2.allocated_words -. m1.allocated_words); - top_heap_words_increase = - t.top_heap_words_increase + (m2.top_heap_words - m1.top_heap_words); - } - let of_diff m1 m2 = - accumulate (zero ()) m1 m2 -end - -type hierarchy = - | E of (string, Measure_diff.t * hierarchy) Hashtbl.t -[@@unboxed] - -let create () = E (Hashtbl.create 2) -let hierarchy = ref (create ()) -let initial_measure = ref None -let reset () = hierarchy := create (); initial_measure := None - -let record_call ?(accumulate = false) name f = - let E prev_hierarchy = !hierarchy in - let start_measure = Measure.create () in - if !initial_measure = None then initial_measure := Some start_measure; - let this_measure_diff, this_table = - (* We allow the recording of multiple categories by the same name, for tools - like ocamldoc that use the compiler libs but don't care about profile - information, and so may record, say, "parsing" multiple times. *) - if accumulate - then - match Hashtbl.find prev_hierarchy name with - | exception Not_found -> Measure_diff.zero (), Hashtbl.create 2 - | measure_diff, E table -> - Hashtbl.remove prev_hierarchy name; - measure_diff, table - else Measure_diff.zero (), Hashtbl.create 2 - in - hierarchy := E this_table; - Misc.try_finally f - (fun () -> - hierarchy := E prev_hierarchy; - let end_measure = Measure.create () in - let measure_diff = - Measure_diff.accumulate this_measure_diff start_measure end_measure in - Hashtbl.add prev_hierarchy name (measure_diff, E this_table)) - -let record ?accumulate pass f x = record_call ?accumulate pass (fun () -> f x) - -type display = { - to_string : max:float -> width:int -> string; - worth_displaying : max:float -> bool; -} - -let time_display v : display = - (* Because indentation is meaningful, and because the durations are - the first element of each row, we can't pad them with spaces. *) - let to_string_without_unit v ~width = Printf.sprintf "%0*.03f" width v in - let to_string ~max:_ ~width = - to_string_without_unit v ~width:(width - 1) ^ "s" in - let worth_displaying ~max:_ = - float_of_string (to_string_without_unit v ~width:0) <> 0. in - { to_string; worth_displaying } - -let memory_word_display = - (* To make memory numbers easily comparable across rows, we choose a single - scale for an entire column. To keep the display compact and not overly - precise (no one cares about the exact number of bytes), we pick the largest - scale we can and we only show 3 digits. Avoiding showing tiny numbers also - allows us to avoid displaying passes that barely allocate compared to the - rest of the compiler. *) - let bytes_of_words words = words *. float_of_int (Sys.word_size / 8) in - let to_string_without_unit v ~width scale = - let precision = 3 and precision_power = 1e3 in - let v_rescaled = bytes_of_words v /. scale in - let v_rounded = - floor (v_rescaled *. precision_power +. 0.5) /. precision_power in - let v_str = Printf.sprintf "%.*f" precision v_rounded in - let index_of_dot = String.index v_str '.' in - let v_str_truncated = - String.sub v_str 0 - (if index_of_dot >= precision - then index_of_dot - else precision + 1) - in - Printf.sprintf "%*s" width v_str_truncated - in - let choose_memory_scale = - let units = [|"B"; "kB"; "MB"; "GB"|] in - fun words -> - let bytes = bytes_of_words words in - let scale = ref (Array.length units - 1) in - while !scale > 0 && bytes < 1024. ** float_of_int !scale do - decr scale - done; - 1024. ** float_of_int !scale, units.(!scale) - in - fun ?previous v : display -> - let to_string ~max ~width = - let scale, scale_str = choose_memory_scale max in - let width = width - String.length scale_str in - to_string_without_unit v ~width scale ^ scale_str - in - let worth_displaying ~max = - let scale, _ = choose_memory_scale max in - float_of_string (to_string_without_unit v ~width:0 scale) <> 0. - && match previous with - | None -> true - | Some p -> - (* This branch is for numbers that represent absolute quantity, rather - than differences. It allows us to skip displaying the same absolute - quantity many times in a row. *) - to_string_without_unit p ~width:0 scale - <> to_string_without_unit v ~width:0 scale - in - { to_string; worth_displaying } - -let profile_list (E table) = - let l = Hashtbl.fold (fun k d l -> (k, d) :: l) table [] in - List.sort (fun (_, (p1, _)) (_, (p2, _)) -> - compare p1.Measure_diff.timestamp p2.Measure_diff.timestamp) l - -let compute_other_category (E table : hierarchy) (total : Measure_diff.t) = - let r = ref total in - Hashtbl.iter (fun _pass ((p2 : Measure_diff.t), _) -> - let p1 = !r in - r := { - timestamp = p1.timestamp; - duration = p1.duration -. p2.duration; - allocated_words = p1.allocated_words -. p2.allocated_words; - top_heap_words_increase = - p1.top_heap_words_increase - p2.top_heap_words_increase; - } - ) table; - !r - -type row = R of string * (float * display) list * row list -type column = [ `Time | `Alloc | `Top_heap | `Abs_top_heap ] - -let rec rows_of_hierarchy ~nesting make_row name measure_diff hierarchy env = - let rows = - rows_of_hierarchy_list - ~nesting:(nesting + 1) make_row hierarchy measure_diff env in - let values, env = - make_row env measure_diff ~toplevel_other:(nesting = 0 && name = "other") in - R (name, values, rows), env - -and rows_of_hierarchy_list ~nesting make_row hierarchy total env = - let list = profile_list hierarchy in - let list = - if list <> [] || nesting = 0 - then list @ [ "other", (compute_other_category hierarchy total, create ()) ] - else [] - in - let env = ref env in - List.map (fun (name, (measure_diff, hierarchy)) -> - let a, env' = - rows_of_hierarchy ~nesting make_row name measure_diff hierarchy !env in - env := env'; - a - ) list - -let rows_of_hierarchy hierarchy measure_diff initial_measure columns = - (* Computing top heap size is a bit complicated: if the compiler applies a - list of passes n times (rather than applying pass1 n times, then pass2 n - times etc), we only show one row for that pass but what does "top heap - size at the end of that pass" even mean? - It seems the only sensible answer is to pretend the compiler applied pass1 - n times, pass2 n times by accumulating all the heap size increases that - happened during each pass, and then compute what the heap size would have - been. So that's what we do. - There's a bit of extra complication, which is that the heap can increase in - between measurements. So the heap sizes can be a bit off until the "other" - rows account for what's missing. We special case the toplevel "other" row - so that any increases that happened before the start of the compilation is - correctly reported, as a lot of code may run before the start of the - compilation (eg functor applications). *) - let make_row prev_top_heap_words (p : Measure_diff.t) ~toplevel_other = - let top_heap_words = - prev_top_heap_words - + p.top_heap_words_increase - - if toplevel_other - then initial_measure.Measure.top_heap_words - else 0 - in - let make value ~f = value, f value in - List.map (function - | `Time -> - make p.duration ~f:time_display - | `Alloc -> - make p.allocated_words ~f:memory_word_display - | `Top_heap -> - make (float_of_int p.top_heap_words_increase) ~f:memory_word_display - | `Abs_top_heap -> - make (float_of_int top_heap_words) - ~f:(memory_word_display ~previous:(float_of_int prev_top_heap_words)) - ) columns, - top_heap_words - in - rows_of_hierarchy_list ~nesting:0 make_row hierarchy measure_diff - initial_measure.top_heap_words - -let max_by_column ~n_columns rows = - let a = Array.make n_columns 0. in - let rec loop (R (_, values, rows)) = - List.iteri (fun i (v, _) -> a.(i) <- max a.(i) v) values; - List.iter loop rows - in - List.iter loop rows; - a - -let width_by_column ~n_columns ~display_cell rows = - let a = Array.make n_columns 1 in - let rec loop (R (_, values, rows)) = - List.iteri (fun i cell -> - let _, str = display_cell i cell ~width:0 in - a.(i) <- max a.(i) (String.length str) - ) values; - List.iter loop rows; - in - List.iter loop rows; - a - -let display_rows ppf rows = - let n_columns = - match rows with - | [] -> 0 - | R (_, values, _) :: _ -> List.length values - in - let maxs = max_by_column ~n_columns rows in - let display_cell i (_, c) ~width = - let display_cell = c.worth_displaying ~max:maxs.(i) in - display_cell, if display_cell - then c.to_string ~max:maxs.(i) ~width - else String.make width '-' - in - let widths = width_by_column ~n_columns ~display_cell rows in - let rec loop (R (name, values, rows)) ~indentation = - let worth_displaying, cell_strings = - values - |> List.mapi (fun i cell -> display_cell i cell ~width:widths.(i)) - |> List.split - in - if List.exists (fun b -> b) worth_displaying then - Format.fprintf ppf "%s%s %s@\n" - indentation (String.concat " " cell_strings) name; - List.iter (loop ~indentation:(" " ^ indentation)) rows; - in - List.iter (loop ~indentation:"") rows - -let print ppf columns = - match columns with - | [] -> () - | _ :: _ -> - let initial_measure = - match !initial_measure with - | Some v -> v - | None -> Measure.zero - in - let total = Measure_diff.of_diff Measure.zero (Measure.create ()) in - display_rows ppf (rows_of_hierarchy !hierarchy total initial_measure columns) - -let column_mapping = [ - "time", `Time; - "alloc", `Alloc; - "top-heap", `Top_heap; - "absolute-top-heap", `Abs_top_heap; -] - -let column_names = List.map fst column_mapping - -let options_doc = - Printf.sprintf - " Print performance information for each pass\ - \n The columns are: %s." - (String.concat " " column_names) - -let all_columns = List.map snd column_mapping - -let generate = "generate" -let transl = "transl" -let typing = "typing" diff --git a/analysis/vendor/compiler-libs-406/profile.mli b/analysis/vendor/compiler-libs-406/profile.mli deleted file mode 100644 index 83a825241..000000000 --- a/analysis/vendor/compiler-libs-406/profile.mli +++ /dev/null @@ -1,44 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Pierre Chambart, OCamlPro *) -(* *) -(* Copyright 2015 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Compiler performance recording *) - -type file = string - -val reset : unit -> unit -(** erase all recorded profile information *) - -val record_call : ?accumulate:bool -> string -> (unit -> 'a) -> 'a -(** [record_call pass f] calls [f] and records its profile information. *) - -val record : ?accumulate:bool -> string -> ('a -> 'b) -> 'a -> 'b -(** [record pass f arg] records the profile information of [f arg] *) - -type column = [ `Time | `Alloc | `Top_heap | `Abs_top_heap ] - -val print : Format.formatter -> column list -> unit -(** Prints the selected recorded profiling information to the formatter. *) - -(** Command line flags *) - -val options_doc : string -val all_columns : column list - -(** A few pass names that are needed in several places, and shared to - avoid typos. *) - -val generate : string -val transl : string -val typing : string diff --git a/analysis/vendor/compiler-libs-406/queue.ml b/analysis/vendor/compiler-libs-406/queue.ml deleted file mode 100644 index ffda7a467..000000000 --- a/analysis/vendor/compiler-libs-406/queue.ml +++ /dev/null @@ -1,132 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Francois Pottier, projet Cristal, INRIA Rocquencourt *) -(* Jeremie Dimino, Jane Street Europe *) -(* *) -(* Copyright 2002 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -exception Empty - -type 'a cell = - | Nil - | Cons of { content: 'a; mutable next: 'a cell } - -type 'a t = { - mutable length: int; - mutable first: 'a cell; - mutable last: 'a cell -} - -let create () = { - length = 0; - first = Nil; - last = Nil -} - -let clear q = - q.length <- 0; - q.first <- Nil; - q.last <- Nil - -let add x q = - let cell = Cons { - content = x; - next = Nil - } in - match q.last with - | Nil -> - q.length <- 1; - q.first <- cell; - q.last <- cell - | Cons last -> - q.length <- q.length + 1; - last.next <- cell; - q.last <- cell - -let push = - add - -let peek q = - match q.first with - | Nil -> raise Empty - | Cons { content } -> content - -let top = - peek - -let take q = - match q.first with - | Nil -> raise Empty - | Cons { content; next = Nil } -> - clear q; - content - | Cons { content; next } -> - q.length <- q.length - 1; - q.first <- next; - content - -let pop = - take - -let copy = - let rec copy q_res prev cell = - match cell with - | Nil -> q_res.last <- prev; q_res - | Cons { content; next } -> - let res = Cons { content; next = Nil } in - begin match prev with - | Nil -> q_res.first <- res - | Cons p -> p.next <- res - end; - copy q_res res next - in - fun q -> copy { length = q.length; first = Nil; last = Nil } Nil q.first - -let is_empty q = - q.length = 0 - -let length q = - q.length - -let iter = - let rec iter f cell = - match cell with - | Nil -> () - | Cons { content; next } -> - f content; - iter f next - in - fun f q -> iter f q.first - -let fold = - let rec fold f accu cell = - match cell with - | Nil -> accu - | Cons { content; next } -> - let accu = f accu content in - fold f accu next - in - fun f accu q -> fold f accu q.first - -let transfer q1 q2 = - if q1.length > 0 then - match q2.last with - | Nil -> - q2.length <- q1.length; - q2.first <- q1.first; - q2.last <- q1.last; - clear q1 - | Cons last -> - q2.length <- q2.length + q1.length; - last.next <- q1.first; - q2.last <- q1.last; - clear q1 diff --git a/analysis/vendor/compiler-libs-406/queue.mli b/analysis/vendor/compiler-libs-406/queue.mli deleted file mode 100644 index 46e48fd05..000000000 --- a/analysis/vendor/compiler-libs-406/queue.mli +++ /dev/null @@ -1,82 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** First-in first-out queues. - - This module implements queues (FIFOs), with in-place modification. - - {b Warning} This module is not thread-safe: each {!Queue.t} value - must be protected from concurrent access (e.g. with a [Mutex.t]). - Failure to do so can lead to a crash. -*) - -type 'a t -(** The type of queues containing elements of type ['a]. *) - - -exception Empty -(** Raised when {!Queue.take} or {!Queue.peek} is applied to an empty queue. *) - - -val create : unit -> 'a t -(** Return a new queue, initially empty. *) - -val add : 'a -> 'a t -> unit -(** [add x q] adds the element [x] at the end of the queue [q]. *) - -val push : 'a -> 'a t -> unit -(** [push] is a synonym for [add]. *) - -val take : 'a t -> 'a -(** [take q] removes and returns the first element in queue [q], - or raises {!Empty} if the queue is empty. *) - -val pop : 'a t -> 'a -(** [pop] is a synonym for [take]. *) - -val peek : 'a t -> 'a -(** [peek q] returns the first element in queue [q], without removing - it from the queue, or raises {!Empty} if the queue is empty. *) - -val top : 'a t -> 'a -(** [top] is a synonym for [peek]. *) - -val clear : 'a t -> unit -(** Discard all elements from a queue. *) - -val copy : 'a t -> 'a t -(** Return a copy of the given queue. *) - -val is_empty : 'a t -> bool -(** Return [true] if the given queue is empty, [false] otherwise. *) - -val length : 'a t -> int -(** Return the number of elements in a queue. *) - -val iter : ('a -> unit) -> 'a t -> unit -(** [iter f q] applies [f] in turn to all elements of [q], - from the least recently entered to the most recently entered. - The queue itself is unchanged. *) - -val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b -(** [fold f accu q] is equivalent to [List.fold_left f accu l], - where [l] is the list of [q]'s elements. The queue remains - unchanged. *) - -val transfer : 'a t -> 'a t -> unit -(** [transfer q1 q2] adds all of [q1]'s elements at the end of - the queue [q2], then clears [q1]. It is equivalent to the - sequence [iter (fun x -> add x q2) q1; clear q1], but runs - in constant time. *) diff --git a/analysis/vendor/compiler-libs-406/random.ml b/analysis/vendor/compiler-libs-406/random.ml deleted file mode 100644 index 1c33e5e6e..000000000 --- a/analysis/vendor/compiler-libs-406/random.ml +++ /dev/null @@ -1,277 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Damien Doligez, projet Para, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Pseudo-random number generator - This is a lagged-Fibonacci F(55, 24, +) with a modified addition - function to enhance the mixing of bits. - If we use normal addition, the low-order bit fails tests 1 and 7 - of the Diehard test suite, and bits 1 and 2 also fail test 7. - If we use multiplication as suggested by Marsaglia, it doesn't fare - much better. - By mixing the bits of one of the numbers before addition (XOR the - 5 high-order bits into the low-order bits), we get a generator that - passes all the Diehard tests. -*) - -external random_seed: unit -> int array = "caml_sys_random_seed" - -module State = struct - - type t = { st : int array; mutable idx : int } - - let new_state () = { st = Array.make 55 0; idx = 0 } - let assign st1 st2 = - Array.blit st2.st 0 st1.st 0 55; - st1.idx <- st2.idx - - - let full_init s seed = - let combine accu x = Digest.string (accu ^ string_of_int x) in - let extract d = - Char.code d.[0] + (Char.code d.[1] lsl 8) + (Char.code d.[2] lsl 16) - + (Char.code d.[3] lsl 24) - in - let seed = if Array.length seed = 0 then [| 0 |] else seed in - let l = Array.length seed in - for i = 0 to 54 do - s.st.(i) <- i; - done; - let accu = ref "x" in - for i = 0 to 54 + max 55 l do - let j = i mod 55 in - let k = i mod l in - accu := combine !accu seed.(k); - s.st.(j) <- (s.st.(j) lxor extract !accu) land 0x3FFFFFFF; (* PR#5575 *) - done; - s.idx <- 0 - - - let make seed = - let result = new_state () in - full_init result seed; - result - - - let make_self_init () = make (random_seed ()) - - let copy s = - let result = new_state () in - assign result s; - result - - - (* Returns 30 random bits as an integer 0 <= x < 1073741824 *) - let bits s = - s.idx <- (s.idx + 1) mod 55; - let curval = s.st.(s.idx) in - let newval = s.st.((s.idx + 24) mod 55) - + (curval lxor ((curval lsr 25) land 0x1F)) in - let newval30 = newval land 0x3FFFFFFF in (* PR#5575 *) - s.st.(s.idx) <- newval30; - newval30 - - - let rec intaux s n = - let r = bits s in - let v = r mod n in - if r - v > 0x3FFFFFFF - n + 1 then intaux s n else v - - let int s bound = - if bound > 0x3FFFFFFF || bound <= 0 - then invalid_arg "Random.int" - else intaux s bound - - - let rec int32aux s n = - let b1 = Int32.of_int (bits s) in - let b2 = Int32.shift_left (Int32.of_int (bits s land 1)) 30 in - let r = Int32.logor b1 b2 in - let v = Int32.rem r n in - if Int32.sub r v > Int32.add (Int32.sub Int32.max_int n) 1l - then int32aux s n - else v - - let int32 s bound = - if bound <= 0l - then invalid_arg "Random.int32" - else int32aux s bound - - - let rec int64aux s n = - let b1 = Int64.of_int (bits s) in - let b2 = Int64.shift_left (Int64.of_int (bits s)) 30 in - let b3 = Int64.shift_left (Int64.of_int (bits s land 7)) 60 in - let r = Int64.logor b1 (Int64.logor b2 b3) in - let v = Int64.rem r n in - if Int64.sub r v > Int64.add (Int64.sub Int64.max_int n) 1L - then int64aux s n - else v - - let int64 s bound = - if bound <= 0L - then invalid_arg "Random.int64" - else int64aux s bound - - - let nativeint = - if Nativeint.size = 32 - then fun s bound -> Nativeint.of_int32 (int32 s (Nativeint.to_int32 bound)) - else fun s bound -> Int64.to_nativeint (int64 s (Int64.of_nativeint bound)) - - - (* Returns a float 0 <= x <= 1 with at most 60 bits of precision. *) - let rawfloat s = - let scale = 1073741824.0 (* 2^30 *) - and r1 = Stdlib.float (bits s) - and r2 = Stdlib.float (bits s) - in (r1 /. scale +. r2) /. scale - - - let float s bound = rawfloat s *. bound - - let bool s = (bits s land 1 = 0) - -end - -(* This is the state you get with [init 27182818] and then applying - the "land 0x3FFFFFFF" filter to them. See #5575, #5793, #5977. *) -let default = { - State.st = [| - 0x3ae2522b; 0x1d8d4634; 0x15b4fad0; 0x18b14ace; 0x12f8a3c4; 0x3b086c47; - 0x16d467d6; 0x101d91c7; 0x321df177; 0x0176c193; 0x1ff72bf1; 0x1e889109; - 0x0b464b18; 0x2b86b97c; 0x0891da48; 0x03137463; 0x085ac5a1; 0x15d61f2f; - 0x3bced359; 0x29c1c132; 0x3a86766e; 0x366d8c86; 0x1f5b6222; 0x3ce1b59f; - 0x2ebf78e1; 0x27cd1b86; 0x258f3dc3; 0x389a8194; 0x02e4c44c; 0x18c43f7d; - 0x0f6e534f; 0x1e7df359; 0x055d0b7e; 0x10e84e7e; 0x126198e4; 0x0e7722cb; - 0x1cbede28; 0x3391b964; 0x3d40e92a; 0x0c59933d; 0x0b8cd0b7; 0x24efff1c; - 0x2803fdaa; 0x08ebc72e; 0x0f522e32; 0x05398edc; 0x2144a04c; 0x0aef3cbd; - 0x01ad4719; 0x35b93cd6; 0x2a559d4f; 0x1e6fd768; 0x26e27f36; 0x186f18c3; - 0x2fbf967a; - |]; - State.idx = 0; -} - -let bits () = State.bits default -let int bound = State.int default bound -let int32 bound = State.int32 default bound -let nativeint bound = State.nativeint default bound -let int64 bound = State.int64 default bound -let float scale = State.float default scale -let bool () = State.bool default - -let full_init seed = State.full_init default seed -let init seed = State.full_init default [| seed |] -let self_init () = full_init (random_seed()) - -(* Manipulating the current state. *) - -let get_state () = State.copy default -let set_state s = State.assign default s - -(******************** - -(* Test functions. Not included in the library. - The [chisquare] function should be called with n > 10r. - It returns a triple (low, actual, high). - If low <= actual <= high, the [g] function passed the test, - otherwise it failed. - - Some results: - -init 27182818; chisquare int 100000 1000 -init 27182818; chisquare int 100000 100 -init 27182818; chisquare int 100000 5000 -init 27182818; chisquare int 1000000 1000 -init 27182818; chisquare int 100000 1024 -init 299792643; chisquare int 100000 1024 -init 14142136; chisquare int 100000 1024 -init 27182818; init_diff 1024; chisquare diff 100000 1024 -init 27182818; init_diff 100; chisquare diff 100000 100 -init 27182818; init_diff2 1024; chisquare diff2 100000 1024 -init 27182818; init_diff2 100; chisquare diff2 100000 100 -init 14142136; init_diff2 100; chisquare diff2 100000 100 -init 299792643; init_diff2 100; chisquare diff2 100000 100 -- : float * float * float = (936.754446796632465, 997.5, 1063.24555320336754) -# - : float * float * float = (80., 89.7400000000052387, 120.) -# - : float * float * float = (4858.57864376269, 5045.5, 5141.42135623731) -# - : float * float * float = -(936.754446796632465, 944.805999999982305, 1063.24555320336754) -# - : float * float * float = (960., 1019.19744000000355, 1088.) -# - : float * float * float = (960., 1059.31776000000536, 1088.) -# - : float * float * float = (960., 1039.98463999999512, 1088.) -# - : float * float * float = (960., 1054.38207999999577, 1088.) -# - : float * float * float = (80., 90.096000000005, 120.) -# - : float * float * float = (960., 1076.78720000000612, 1088.) -# - : float * float * float = (80., 85.1760000000067521, 120.) -# - : float * float * float = (80., 85.2160000000003492, 120.) -# - : float * float * float = (80., 80.6220000000030268, 120.) - -*) - -(* Return the sum of the squares of v[i0,i1[ *) -let rec sumsq v i0 i1 = - if i0 >= i1 then 0.0 - else if i1 = i0 + 1 then Stdlib.float v.(i0) *. Stdlib.float v.(i0) - else sumsq v i0 ((i0+i1)/2) +. sumsq v ((i0+i1)/2) i1 - - -let chisquare g n r = - if n <= 10 * r then invalid_arg "chisquare"; - let f = Array.make r 0 in - for i = 1 to n do - let t = g r in - f.(t) <- f.(t) + 1 - done; - let t = sumsq f 0 r - and r = Stdlib.float r - and n = Stdlib.float n in - let sr = 2.0 *. sqrt r in - (r -. sr, (r *. t /. n) -. n, r +. sr) - - -(* This is to test for linear dependencies between successive random numbers. -*) -let st = ref 0 -let init_diff r = st := int r -let diff r = - let x1 = !st - and x2 = int r - in - st := x2; - if x1 >= x2 then - x1 - x2 - else - r + x1 - x2 - - -let st1 = ref 0 -and st2 = ref 0 - - -(* This is to test for quadratic dependencies between successive random - numbers. -*) -let init_diff2 r = st1 := int r; st2 := int r -let diff2 r = - let x1 = !st1 - and x2 = !st2 - and x3 = int r - in - st1 := x2; - st2 := x3; - (x3 - x2 - x2 + x1 + 2*r) mod r - - -********************) diff --git a/analysis/vendor/compiler-libs-406/random.mli b/analysis/vendor/compiler-libs-406/random.mli deleted file mode 100644 index f8eae5fac..000000000 --- a/analysis/vendor/compiler-libs-406/random.mli +++ /dev/null @@ -1,107 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Damien Doligez, projet Para, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Pseudo-random number generators (PRNG). *) - -(** {1 Basic functions} *) - -val init : int -> unit -(** Initialize the generator, using the argument as a seed. - The same seed will always yield the same sequence of numbers. *) - -val full_init : int array -> unit -(** Same as {!Random.init} but takes more data as seed. *) - -val self_init : unit -> unit -(** Initialize the generator with a random seed chosen - in a system-dependent way. If [/dev/urandom] is available on - the host machine, it is used to provide a highly random initial - seed. Otherwise, a less random seed is computed from system - parameters (current time, process IDs). *) - -val bits : unit -> int -(** Return 30 random bits in a nonnegative integer. - @before 3.12.0 used a different algorithm (affects all the following - functions) -*) - -val int : int -> int -(** [Random.int bound] returns a random integer between 0 (inclusive) - and [bound] (exclusive). [bound] must be greater than 0 and less - than 2{^30}. *) - -val int32 : Int32.t -> Int32.t -(** [Random.int32 bound] returns a random integer between 0 (inclusive) - and [bound] (exclusive). [bound] must be greater than 0. *) - -val nativeint : Nativeint.t -> Nativeint.t -(** [Random.nativeint bound] returns a random integer between 0 (inclusive) - and [bound] (exclusive). [bound] must be greater than 0. *) - -val int64 : Int64.t -> Int64.t -(** [Random.int64 bound] returns a random integer between 0 (inclusive) - and [bound] (exclusive). [bound] must be greater than 0. *) - -val float : float -> float -(** [Random.float bound] returns a random floating-point number - between 0 and [bound] (inclusive). If [bound] is - negative, the result is negative or zero. If [bound] is 0, - the result is 0. *) - -val bool : unit -> bool -(** [Random.bool ()] returns [true] or [false] with probability 0.5 each. *) - - -(** {1 Advanced functions} *) - -(** The functions from module {!State} manipulate the current state - of the random generator explicitly. - This allows using one or several deterministic PRNGs, - even in a multi-threaded program, without interference from - other parts of the program. -*) - -module State : sig - type t - (** The type of PRNG states. *) - - val make : int array -> t - (** Create a new state and initialize it with the given seed. *) - - val make_self_init : unit -> t - (** Create a new state and initialize it with a system-dependent - low-entropy seed. *) - - val copy : t -> t - (** Return a copy of the given state. *) - - val bits : t -> int - val int : t -> int -> int - val int32 : t -> Int32.t -> Int32.t - val nativeint : t -> Nativeint.t -> Nativeint.t - val int64 : t -> Int64.t -> Int64.t - val float : t -> float -> float - val bool : t -> bool - (** These functions are the same as the basic functions, except that they - use (and update) the given PRNG state instead of the default one. - *) -end - - -val get_state : unit -> State.t -(** Return the current state of the generator used by the basic functions. *) - -val set_state : State.t -> unit -(** Set the state of the generator used by the basic functions. *) diff --git a/analysis/vendor/compiler-libs-406/set.ml b/analysis/vendor/compiler-libs-406/set.ml deleted file mode 100644 index b3cbda47d..000000000 --- a/analysis/vendor/compiler-libs-406/set.ml +++ /dev/null @@ -1,526 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Sets over ordered types *) - -module type OrderedType = - sig - type t - val compare: t -> t -> int - end - -module type S = - sig - type elt - type t - val empty: t - val is_empty: t -> bool - val mem: elt -> t -> bool - val add: elt -> t -> t - val singleton: elt -> t - val remove: elt -> t -> t - val union: t -> t -> t - val inter: t -> t -> t - val diff: t -> t -> t - val compare: t -> t -> int - val equal: t -> t -> bool - val subset: t -> t -> bool - val iter: (elt -> unit) -> t -> unit - val map: (elt -> elt) -> t -> t - val fold: (elt -> 'a -> 'a) -> t -> 'a -> 'a - val for_all: (elt -> bool) -> t -> bool - val exists: (elt -> bool) -> t -> bool - val filter: (elt -> bool) -> t -> t - val partition: (elt -> bool) -> t -> t * t - val cardinal: t -> int - val elements: t -> elt list - val min_elt: t -> elt - val min_elt_opt: t -> elt option - val max_elt: t -> elt - val max_elt_opt: t -> elt option - val choose: t -> elt - val choose_opt: t -> elt option - val split: elt -> t -> t * bool * t - val find: elt -> t -> elt - val find_opt: elt -> t -> elt option - val find_first: (elt -> bool) -> t -> elt - val find_first_opt: (elt -> bool) -> t -> elt option - val find_last: (elt -> bool) -> t -> elt - val find_last_opt: (elt -> bool) -> t -> elt option - val of_list: elt list -> t - end - -module Make(Ord: OrderedType) = - struct - type elt = Ord.t - type t = Empty | Node of {l:t; v:elt; r:t; h:int} - - (* Sets are represented by balanced binary trees (the heights of the - children differ by at most 2 *) - - let height = function - Empty -> 0 - | Node {h} -> h - - (* Creates a new node with left son l, value v and right son r. - We must have all elements of l < v < all elements of r. - l and r must be balanced and | height l - height r | <= 2. - Inline expansion of height for better speed. *) - - let create l v r = - let hl = match l with Empty -> 0 | Node {h} -> h in - let hr = match r with Empty -> 0 | Node {h} -> h in - Node{l; v; r; h=(if hl >= hr then hl + 1 else hr + 1)} - - (* Same as create, but performs one step of rebalancing if necessary. - Assumes l and r balanced and | height l - height r | <= 3. - Inline expansion of create for better speed in the most frequent case - where no rebalancing is required. *) - - let bal l v r = - let hl = match l with Empty -> 0 | Node {h} -> h in - let hr = match r with Empty -> 0 | Node {h} -> h in - if hl > hr + 2 then begin - match l with - Empty -> invalid_arg "Set.bal" - | Node{l=ll; v=lv; r=lr} -> - if height ll >= height lr then - create ll lv (create lr v r) - else begin - match lr with - Empty -> invalid_arg "Set.bal" - | Node{l=lrl; v=lrv; r=lrr}-> - create (create ll lv lrl) lrv (create lrr v r) - end - end else if hr > hl + 2 then begin - match r with - Empty -> invalid_arg "Set.bal" - | Node{l=rl; v=rv; r=rr} -> - if height rr >= height rl then - create (create l v rl) rv rr - else begin - match rl with - Empty -> invalid_arg "Set.bal" - | Node{l=rll; v=rlv; r=rlr} -> - create (create l v rll) rlv (create rlr rv rr) - end - end else - Node{l; v; r; h=(if hl >= hr then hl + 1 else hr + 1)} - - (* Insertion of one element *) - - let rec add x = function - Empty -> Node{l=Empty; v=x; r=Empty; h=1} - | Node{l; v; r} as t -> - let c = Ord.compare x v in - if c = 0 then t else - if c < 0 then - let ll = add x l in - if l == ll then t else bal ll v r - else - let rr = add x r in - if r == rr then t else bal l v rr - - let singleton x = Node{l=Empty; v=x; r=Empty; h=1} - - (* Beware: those two functions assume that the added v is *strictly* - smaller (or bigger) than all the present elements in the tree; it - does not test for equality with the current min (or max) element. - Indeed, they are only used during the "join" operation which - respects this precondition. - *) - - let rec add_min_element x = function - | Empty -> singleton x - | Node {l; v; r} -> - bal (add_min_element x l) v r - - let rec add_max_element x = function - | Empty -> singleton x - | Node {l; v; r} -> - bal l v (add_max_element x r) - - (* Same as create and bal, but no assumptions are made on the - relative heights of l and r. *) - - let rec join l v r = - match (l, r) with - (Empty, _) -> add_min_element v r - | (_, Empty) -> add_max_element v l - | (Node{l=ll; v=lv; r=lr; h=lh}, Node{l=rl; v=rv; r=rr; h=rh}) -> - if lh > rh + 2 then bal ll lv (join lr v r) else - if rh > lh + 2 then bal (join l v rl) rv rr else - create l v r - - (* Smallest and greatest element of a set *) - - let rec min_elt = function - Empty -> raise Not_found - | Node{l=Empty; v} -> v - | Node{l} -> min_elt l - - let rec min_elt_opt = function - Empty -> None - | Node{l=Empty; v} -> Some v - | Node{l} -> min_elt_opt l - - let rec max_elt = function - Empty -> raise Not_found - | Node{v; r=Empty} -> v - | Node{r} -> max_elt r - - let rec max_elt_opt = function - Empty -> None - | Node{v; r=Empty} -> Some v - | Node{r} -> max_elt_opt r - - (* Remove the smallest element of the given set *) - - let rec remove_min_elt = function - Empty -> invalid_arg "Set.remove_min_elt" - | Node{l=Empty; r} -> r - | Node{l; v; r} -> bal (remove_min_elt l) v r - - (* Merge two trees l and r into one. - All elements of l must precede the elements of r. - Assume | height l - height r | <= 2. *) - - let merge t1 t2 = - match (t1, t2) with - (Empty, t) -> t - | (t, Empty) -> t - | (_, _) -> bal t1 (min_elt t2) (remove_min_elt t2) - - (* Merge two trees l and r into one. - All elements of l must precede the elements of r. - No assumption on the heights of l and r. *) - - let concat t1 t2 = - match (t1, t2) with - (Empty, t) -> t - | (t, Empty) -> t - | (_, _) -> join t1 (min_elt t2) (remove_min_elt t2) - - (* Splitting. split x s returns a triple (l, present, r) where - - l is the set of elements of s that are < x - - r is the set of elements of s that are > x - - present is false if s contains no element equal to x, - or true if s contains an element equal to x. *) - - let rec split x = function - Empty -> - (Empty, false, Empty) - | Node{l; v; r} -> - let c = Ord.compare x v in - if c = 0 then (l, true, r) - else if c < 0 then - let (ll, pres, rl) = split x l in (ll, pres, join rl v r) - else - let (lr, pres, rr) = split x r in (join l v lr, pres, rr) - - (* Implementation of the set operations *) - - let empty = Empty - - let is_empty = function Empty -> true | _ -> false - - let rec mem x = function - Empty -> false - | Node{l; v; r} -> - let c = Ord.compare x v in - c = 0 || mem x (if c < 0 then l else r) - - let rec remove x = function - Empty -> Empty - | (Node{l; v; r} as t) -> - let c = Ord.compare x v in - if c = 0 then merge l r - else - if c < 0 then - let ll = remove x l in - if l == ll then t - else bal ll v r - else - let rr = remove x r in - if r == rr then t - else bal l v rr - - let rec union s1 s2 = - match (s1, s2) with - (Empty, t2) -> t2 - | (t1, Empty) -> t1 - | (Node{l=l1; v=v1; r=r1; h=h1}, Node{l=l2; v=v2; r=r2; h=h2}) -> - if h1 >= h2 then - if h2 = 1 then add v2 s1 else begin - let (l2, _, r2) = split v1 s2 in - join (union l1 l2) v1 (union r1 r2) - end - else - if h1 = 1 then add v1 s2 else begin - let (l1, _, r1) = split v2 s1 in - join (union l1 l2) v2 (union r1 r2) - end - - let rec inter s1 s2 = - match (s1, s2) with - (Empty, _) -> Empty - | (_, Empty) -> Empty - | (Node{l=l1; v=v1; r=r1}, t2) -> - match split v1 t2 with - (l2, false, r2) -> - concat (inter l1 l2) (inter r1 r2) - | (l2, true, r2) -> - join (inter l1 l2) v1 (inter r1 r2) - - let rec diff s1 s2 = - match (s1, s2) with - (Empty, _) -> Empty - | (t1, Empty) -> t1 - | (Node{l=l1; v=v1; r=r1}, t2) -> - match split v1 t2 with - (l2, false, r2) -> - join (diff l1 l2) v1 (diff r1 r2) - | (l2, true, r2) -> - concat (diff l1 l2) (diff r1 r2) - - type enumeration = End | More of elt * t * enumeration - - let rec cons_enum s e = - match s with - Empty -> e - | Node{l; v; r} -> cons_enum l (More(v, r, e)) - - let rec compare_aux e1 e2 = - match (e1, e2) with - (End, End) -> 0 - | (End, _) -> -1 - | (_, End) -> 1 - | (More(v1, r1, e1), More(v2, r2, e2)) -> - let c = Ord.compare v1 v2 in - if c <> 0 - then c - else compare_aux (cons_enum r1 e1) (cons_enum r2 e2) - - let compare s1 s2 = - compare_aux (cons_enum s1 End) (cons_enum s2 End) - - let equal s1 s2 = - compare s1 s2 = 0 - - let rec subset s1 s2 = - match (s1, s2) with - Empty, _ -> - true - | _, Empty -> - false - | Node {l=l1; v=v1; r=r1}, (Node {l=l2; v=v2; r=r2} as t2) -> - let c = Ord.compare v1 v2 in - if c = 0 then - subset l1 l2 && subset r1 r2 - else if c < 0 then - subset (Node {l=l1; v=v1; r=Empty; h=0}) l2 && subset r1 t2 - else - subset (Node {l=Empty; v=v1; r=r1; h=0}) r2 && subset l1 t2 - - let rec iter f = function - Empty -> () - | Node{l; v; r} -> iter f l; f v; iter f r - - let rec fold f s accu = - match s with - Empty -> accu - | Node{l; v; r} -> fold f r (f v (fold f l accu)) - - let rec for_all p = function - Empty -> true - | Node{l; v; r} -> p v && for_all p l && for_all p r - - let rec exists p = function - Empty -> false - | Node{l; v; r} -> p v || exists p l || exists p r - - let rec filter p = function - Empty -> Empty - | (Node{l; v; r}) as t -> - (* call [p] in the expected left-to-right order *) - let l' = filter p l in - let pv = p v in - let r' = filter p r in - if pv then - if l==l' && r==r' then t else join l' v r' - else concat l' r' - - let rec partition p = function - Empty -> (Empty, Empty) - | Node{l; v; r} -> - (* call [p] in the expected left-to-right order *) - let (lt, lf) = partition p l in - let pv = p v in - let (rt, rf) = partition p r in - if pv - then (join lt v rt, concat lf rf) - else (concat lt rt, join lf v rf) - - let rec cardinal = function - Empty -> 0 - | Node{l; r} -> cardinal l + 1 + cardinal r - - let rec elements_aux accu = function - Empty -> accu - | Node{l; v; r} -> elements_aux (v :: elements_aux accu r) l - - let elements s = - elements_aux [] s - - let choose = min_elt - - let choose_opt = min_elt_opt - - let rec find x = function - Empty -> raise Not_found - | Node{l; v; r} -> - let c = Ord.compare x v in - if c = 0 then v - else find x (if c < 0 then l else r) - - let rec find_first_aux v0 f = function - Empty -> - v0 - | Node{l; v; r} -> - if f v then - find_first_aux v f l - else - find_first_aux v0 f r - - let rec find_first f = function - Empty -> - raise Not_found - | Node{l; v; r} -> - if f v then - find_first_aux v f l - else - find_first f r - - let rec find_first_opt_aux v0 f = function - Empty -> - Some v0 - | Node{l; v; r} -> - if f v then - find_first_opt_aux v f l - else - find_first_opt_aux v0 f r - - let rec find_first_opt f = function - Empty -> - None - | Node{l; v; r} -> - if f v then - find_first_opt_aux v f l - else - find_first_opt f r - - let rec find_last_aux v0 f = function - Empty -> - v0 - | Node{l; v; r} -> - if f v then - find_last_aux v f r - else - find_last_aux v0 f l - - let rec find_last f = function - Empty -> - raise Not_found - | Node{l; v; r} -> - if f v then - find_last_aux v f r - else - find_last f l - - let rec find_last_opt_aux v0 f = function - Empty -> - Some v0 - | Node{l; v; r} -> - if f v then - find_last_opt_aux v f r - else - find_last_opt_aux v0 f l - - let rec find_last_opt f = function - Empty -> - None - | Node{l; v; r} -> - if f v then - find_last_opt_aux v f r - else - find_last_opt f l - - let rec find_opt x = function - Empty -> None - | Node{l; v; r} -> - let c = Ord.compare x v in - if c = 0 then Some v - else find_opt x (if c < 0 then l else r) - - let try_join l v r = - (* [join l v r] can only be called when (elements of l < v < - elements of r); use [try_join l v r] when this property may - not hold, but you hope it does hold in the common case *) - if (l = Empty || Ord.compare (max_elt l) v < 0) - && (r = Empty || Ord.compare v (min_elt r) < 0) - then join l v r - else union l (add v r) - - let rec map f = function - | Empty -> Empty - | Node{l; v; r} as t -> - (* enforce left-to-right evaluation order *) - let l' = map f l in - let v' = f v in - let r' = map f r in - if l == l' && v == v' && r == r' then t - else try_join l' v' r' - - let of_sorted_list l = - let rec sub n l = - match n, l with - | 0, l -> Empty, l - | 1, x0 :: l -> Node {l=Empty; v=x0; r=Empty; h=1}, l - | 2, x0 :: x1 :: l -> - Node{l=Node{l=Empty; v=x0; r=Empty; h=1}; v=x1; r=Empty; h=2}, l - | 3, x0 :: x1 :: x2 :: l -> - Node{l=Node{l=Empty; v=x0; r=Empty; h=1}; v=x1; - r=Node{l=Empty; v=x2; r=Empty; h=1}; h=2}, l - | n, l -> - let nl = n / 2 in - let left, l = sub nl l in - match l with - | [] -> assert false - | mid :: l -> - let right, l = sub (n - nl - 1) l in - create left mid right, l - in - fst (sub (List.length l) l) - - let of_list l = - match l with - | [] -> empty - | [x0] -> singleton x0 - | [x0; x1] -> add x1 (singleton x0) - | [x0; x1; x2] -> add x2 (add x1 (singleton x0)) - | [x0; x1; x2; x3] -> add x3 (add x2 (add x1 (singleton x0))) - | [x0; x1; x2; x3; x4] -> add x4 (add x3 (add x2 (add x1 (singleton x0)))) - | _ -> of_sorted_list (List.sort_uniq Ord.compare l) - end diff --git a/analysis/vendor/compiler-libs-406/set.mli b/analysis/vendor/compiler-libs-406/set.mli deleted file mode 100644 index a20cfe538..000000000 --- a/analysis/vendor/compiler-libs-406/set.mli +++ /dev/null @@ -1,266 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Sets over ordered types. - - This module implements the set data structure, given a total ordering - function over the set elements. All operations over sets - are purely applicative (no side-effects). - The implementation uses balanced binary trees, and is therefore - reasonably efficient: insertion and membership take time - logarithmic in the size of the set, for instance. - - The {!Make} functor constructs implementations for any type, given a - [compare] function. - For instance: - {[ - module IntPairs = - struct - type t = int * int - let compare (x0,y0) (x1,y1) = - match Stdlib.compare x0 x1 with - 0 -> Stdlib.compare y0 y1 - | c -> c - end - - module PairsSet = Set.Make(IntPairs) - - let m = PairsSet.(empty |> add (2,3) |> add (5,7) |> add (11,13)) - ]} - - This creates a new module [PairsSet], with a new type [PairsSet.t] - of sets of [int * int]. -*) - -module type OrderedType = - sig - type t - (** The type of the set elements. *) - - val compare : t -> t -> int - (** A total ordering function over the set elements. - This is a two-argument function [f] such that - [f e1 e2] is zero if the elements [e1] and [e2] are equal, - [f e1 e2] is strictly negative if [e1] is smaller than [e2], - and [f e1 e2] is strictly positive if [e1] is greater than [e2]. - Example: a suitable ordering function is the generic structural - comparison function {!Stdlib.compare}. *) - end -(** Input signature of the functor {!Set.Make}. *) - -module type S = - sig - type elt - (** The type of the set elements. *) - - type t - (** The type of sets. *) - - val empty: t - (** The empty set. *) - - val is_empty: t -> bool - (** Test whether a set is empty or not. *) - - val mem: elt -> t -> bool - (** [mem x s] tests whether [x] belongs to the set [s]. *) - - val add: elt -> t -> t - (** [add x s] returns a set containing all elements of [s], - plus [x]. If [x] was already in [s], [s] is returned unchanged - (the result of the function is then physically equal to [s]). - @before 4.03 Physical equality was not ensured. *) - - val singleton: elt -> t - (** [singleton x] returns the one-element set containing only [x]. *) - - val remove: elt -> t -> t - (** [remove x s] returns a set containing all elements of [s], - except [x]. If [x] was not in [s], [s] is returned unchanged - (the result of the function is then physically equal to [s]). - @before 4.03 Physical equality was not ensured. *) - - val union: t -> t -> t - (** Set union. *) - - val inter: t -> t -> t - (** Set intersection. *) - - val diff: t -> t -> t - (** Set difference. *) - - val compare: t -> t -> int - (** Total ordering between sets. Can be used as the ordering function - for doing sets of sets. *) - - val equal: t -> t -> bool - (** [equal s1 s2] tests whether the sets [s1] and [s2] are - equal, that is, contain equal elements. *) - - val subset: t -> t -> bool - (** [subset s1 s2] tests whether the set [s1] is a subset of - the set [s2]. *) - - val iter: (elt -> unit) -> t -> unit - (** [iter f s] applies [f] in turn to all elements of [s]. - The elements of [s] are presented to [f] in increasing order - with respect to the ordering over the type of the elements. *) - - val map: (elt -> elt) -> t -> t - (** [map f s] is the set whose elements are [f a0],[f a1]... [f - aN], where [a0],[a1]...[aN] are the elements of [s]. - - The elements are passed to [f] in increasing order - with respect to the ordering over the type of the elements. - - If no element of [s] is changed by [f], [s] is returned - unchanged. (If each output of [f] is physically equal to its - input, the returned set is physically equal to [s].) - @since 4.04.0 *) - - val fold: (elt -> 'a -> 'a) -> t -> 'a -> 'a - (** [fold f s a] computes [(f xN ... (f x2 (f x1 a))...)], - where [x1 ... xN] are the elements of [s], in increasing order. *) - - val for_all: (elt -> bool) -> t -> bool - (** [for_all p s] checks if all elements of the set - satisfy the predicate [p]. *) - - val exists: (elt -> bool) -> t -> bool - (** [exists p s] checks if at least one element of - the set satisfies the predicate [p]. *) - - val filter: (elt -> bool) -> t -> t - (** [filter p s] returns the set of all elements in [s] - that satisfy predicate [p]. If [p] satisfies every element in [s], - [s] is returned unchanged (the result of the function is then - physically equal to [s]). - @before 4.03 Physical equality was not ensured.*) - - val partition: (elt -> bool) -> t -> t * t - (** [partition p s] returns a pair of sets [(s1, s2)], where - [s1] is the set of all the elements of [s] that satisfy the - predicate [p], and [s2] is the set of all the elements of - [s] that do not satisfy [p]. *) - - val cardinal: t -> int - (** Return the number of elements of a set. *) - - val elements: t -> elt list - (** Return the list of all elements of the given set. - The returned list is sorted in increasing order with respect - to the ordering [Ord.compare], where [Ord] is the argument - given to {!Set.Make}. *) - - val min_elt: t -> elt - (** Return the smallest element of the given set - (with respect to the [Ord.compare] ordering), or raise - [Not_found] if the set is empty. *) - - val min_elt_opt: t -> elt option - (** Return the smallest element of the given set - (with respect to the [Ord.compare] ordering), or [None] - if the set is empty. - @since 4.05 - *) - - val max_elt: t -> elt - (** Same as {!Set.S.min_elt}, but returns the largest element of the - given set. *) - - val max_elt_opt: t -> elt option - (** Same as {!Set.S.min_elt_opt}, but returns the largest element of the - given set. - @since 4.05 - *) - - val choose: t -> elt - (** Return one element of the given set, or raise [Not_found] if - the set is empty. Which element is chosen is unspecified, - but equal elements will be chosen for equal sets. *) - - val choose_opt: t -> elt option - (** Return one element of the given set, or [None] if - the set is empty. Which element is chosen is unspecified, - but equal elements will be chosen for equal sets. - @since 4.05 - *) - - val split: elt -> t -> t * bool * t - (** [split x s] returns a triple [(l, present, r)], where - [l] is the set of elements of [s] that are - strictly less than [x]; - [r] is the set of elements of [s] that are - strictly greater than [x]; - [present] is [false] if [s] contains no element equal to [x], - or [true] if [s] contains an element equal to [x]. *) - - val find: elt -> t -> elt - (** [find x s] returns the element of [s] equal to [x] (according - to [Ord.compare]), or raise [Not_found] if no such element - exists. - @since 4.01.0 *) - - val find_opt: elt -> t -> elt option - (** [find_opt x s] returns the element of [s] equal to [x] (according - to [Ord.compare]), or [None] if no such element - exists. - @since 4.05 *) - - val find_first: (elt -> bool) -> t -> elt - (** [find_first f s], where [f] is a monotonically increasing function, - returns the lowest element [e] of [s] such that [f e], - or raises [Not_found] if no such element exists. - - For example, [find_first (fun e -> Ord.compare e x >= 0) s] will return - the first element [e] of [s] where [Ord.compare e x >= 0] (intuitively: - [e >= x]), or raise [Not_found] if [x] is greater than any element of - [s]. - - @since 4.05 - *) - - val find_first_opt: (elt -> bool) -> t -> elt option - (** [find_first_opt f s], where [f] is a monotonically increasing function, - returns an option containing the lowest element [e] of [s] such that - [f e], or [None] if no such element exists. - @since 4.05 - *) - - val find_last: (elt -> bool) -> t -> elt - (** [find_last f s], where [f] is a monotonically decreasing function, - returns the highest element [e] of [s] such that [f e], - or raises [Not_found] if no such element exists. - @since 4.05 - *) - - val find_last_opt: (elt -> bool) -> t -> elt option - (** [find_last_opt f s], where [f] is a monotonically decreasing function, - returns an option containing the highest element [e] of [s] such that - [f e], or [None] if no such element exists. - @since 4.05 - *) - - val of_list: elt list -> t - (** [of_list l] creates a set from a list of elements. - This is usually more efficient than folding [add] over the list, - except perhaps for lists with many duplicated elements. - @since 4.02.0 *) - end -(** Output signature of the functor {!Set.Make}. *) - -module Make (Ord : OrderedType) : S with type elt = Ord.t -(** Functor building an implementation of the set structure - given a totally ordered type. *) diff --git a/analysis/vendor/compiler-libs-406/sort.ml b/analysis/vendor/compiler-libs-406/sort.ml deleted file mode 100644 index 3e3b12e06..000000000 --- a/analysis/vendor/compiler-libs-406/sort.ml +++ /dev/null @@ -1,99 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* Merging and sorting *) - -open Array - -let rec merge order l1 l2 = - match l1 with - [] -> l2 - | h1 :: t1 -> - match l2 with - [] -> l1 - | h2 :: t2 -> - if order h1 h2 - then h1 :: merge order t1 l2 - else h2 :: merge order l1 t2 - -let list order l = - let rec initlist = function - [] -> [] - | [e] -> [[e]] - | e1::e2::rest -> - (if order e1 e2 then [e1;e2] else [e2;e1]) :: initlist rest in - let rec merge2 = function - l1::l2::rest -> merge order l1 l2 :: merge2 rest - | x -> x in - let rec mergeall = function - [] -> [] - | [l] -> l - | llist -> mergeall (merge2 llist) in - mergeall(initlist l) - -let swap arr i j = - let tmp = unsafe_get arr i in - unsafe_set arr i (unsafe_get arr j); - unsafe_set arr j tmp - -(* There is a known performance bug in the code below. If you find - it, don't bother reporting it. You're not supposed to use this - module anyway. *) -let array cmp arr = - let rec qsort lo hi = - if hi - lo >= 6 then begin - let mid = (lo + hi) lsr 1 in - (* Select median value from among LO, MID, and HI. Rearrange - LO and HI so the three values are sorted. This lowers the - probability of picking a pathological pivot. It also - avoids extra comparisons on i and j in the two tight "while" - loops below. *) - if cmp (unsafe_get arr mid) (unsafe_get arr lo) then swap arr mid lo; - if cmp (unsafe_get arr hi) (unsafe_get arr mid) then begin - swap arr mid hi; - if cmp (unsafe_get arr mid) (unsafe_get arr lo) then swap arr mid lo - end; - let pivot = unsafe_get arr mid in - let i = ref (lo + 1) and j = ref (hi - 1) in - if not (cmp pivot (unsafe_get arr hi)) - || not (cmp (unsafe_get arr lo) pivot) - then raise (Invalid_argument "Sort.array"); - while !i < !j do - while not (cmp pivot (unsafe_get arr !i)) do incr i done; - while not (cmp (unsafe_get arr !j) pivot) do decr j done; - if !i < !j then swap arr !i !j; - incr i; decr j - done; - (* Recursion on smaller half, tail-call on larger half *) - if !j - lo <= hi - !i then begin - qsort lo !j; qsort !i hi - end else begin - qsort !i hi; qsort lo !j - end - end in - qsort 0 (Array.length arr - 1); - (* Finish sorting by insertion sort *) - for i = 1 to Array.length arr - 1 do - let val_i = (unsafe_get arr i) in - if not (cmp (unsafe_get arr (i - 1)) val_i) then begin - unsafe_set arr i (unsafe_get arr (i - 1)); - let j = ref (i - 1) in - while !j >= 1 && not (cmp (unsafe_get arr (!j - 1)) val_i) do - unsafe_set arr !j (unsafe_get arr (!j - 1)); - decr j - done; - unsafe_set arr !j val_i - end - done diff --git a/analysis/vendor/compiler-libs-406/sort.mli b/analysis/vendor/compiler-libs-406/sort.mli deleted file mode 100644 index 80ebad260..000000000 --- a/analysis/vendor/compiler-libs-406/sort.mli +++ /dev/null @@ -1,44 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Sorting and merging lists. - - @deprecated This module is obsolete and exists only for backward - compatibility. - The sorting functions in {!Array} and {!List} should be used instead. - The new functions are faster and use less memory. -*) - -val list : ('a -> 'a -> bool) -> 'a list -> 'a list - [@@ocaml.deprecated "Use List.sort instead."] -(** Sort a list in increasing order according to an ordering predicate. - The predicate should return [true] if its first argument is - less than or equal to its second argument. *) - -val array : ('a -> 'a -> bool) -> 'a array -> unit - [@@ocaml.deprecated "Use Array.sort instead."] -(** Sort an array in increasing order according to an - ordering predicate. - The predicate should return [true] if its first argument is - less than or equal to its second argument. - The array is sorted in place. *) - -val merge : ('a -> 'a -> bool) -> 'a list -> 'a list -> 'a list - [@@ocaml.deprecated "Use List.merge instead."] -(** Merge two lists according to the given predicate. - Assuming the two argument lists are sorted according to the - predicate, [merge] returns a sorted list containing the elements - from the two lists. The behavior is undefined if the two - argument lists were not sorted. *) diff --git a/analysis/vendor/compiler-libs-406/spacetime.ml b/analysis/vendor/compiler-libs-406/spacetime.ml deleted file mode 100644 index 3e8abe1d0..000000000 --- a/analysis/vendor/compiler-libs-406/spacetime.ml +++ /dev/null @@ -1,91 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Mark Shinwell and Leo White, Jane Street Europe *) -(* *) -(* Copyright 2015--2016 Jane Street Group LLC *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -external spacetime_enabled : unit -> bool - = "caml_spacetime_enabled" [@@noalloc] - -let enabled = spacetime_enabled () - -let if_spacetime_enabled f = - if enabled then f () else () - -module Series = struct - type t = { - channel : out_channel; - mutable closed : bool; - } - - external write_magic_number : out_channel -> unit - = "caml_spacetime_only_works_for_native_code" - "caml_spacetime_write_magic_number" - - external register_channel_for_spacetime : out_channel -> unit - = "caml_register_channel_for_spacetime" - - let create ~path = - if spacetime_enabled () then begin - let channel = open_out path in - register_channel_for_spacetime channel; - let t = - { channel = channel; - closed = false; - } - in - write_magic_number t.channel; - t - end else begin - { channel = stdout; (* arbitrary value *) - closed = true; - } - end - - external save_event : ?time:float -> out_channel -> event_name:string -> unit - = "caml_spacetime_only_works_for_native_code" - "caml_spacetime_save_event" - - let save_event ?time t ~event_name = - if_spacetime_enabled (fun () -> - save_event ?time t.channel ~event_name) - - external save_trie : ?time:float -> out_channel -> unit - = "caml_spacetime_only_works_for_native_code" - "caml_spacetime_save_trie" - - let save_and_close ?time t = - if_spacetime_enabled (fun () -> - if t.closed then failwith "Series is closed"; - save_trie ?time t.channel; - close_out t.channel; - t.closed <- true) -end - -module Snapshot = struct - external take : ?time:float -> out_channel -> unit - = "caml_spacetime_only_works_for_native_code" - "caml_spacetime_take_snapshot" - - let take ?time { Series.closed; channel } = - if_spacetime_enabled (fun () -> - if closed then failwith "Series is closed"; - Gc.minor (); - take ?time channel) -end - -external save_event_for_automatic_snapshots : event_name:string -> unit - = "caml_spacetime_only_works_for_native_code" - "caml_spacetime_save_event_for_automatic_snapshots" - -let save_event_for_automatic_snapshots ~event_name = - if_spacetime_enabled (fun () -> - save_event_for_automatic_snapshots ~event_name) diff --git a/analysis/vendor/compiler-libs-406/spacetime.mli b/analysis/vendor/compiler-libs-406/spacetime.mli deleted file mode 100644 index 1f770905d..000000000 --- a/analysis/vendor/compiler-libs-406/spacetime.mli +++ /dev/null @@ -1,99 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Mark Shinwell and Leo White, Jane Street Europe *) -(* *) -(* Copyright 2015--2016 Jane Street Group LLC *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Profiling of a program's space behaviour over time. - Currently only supported on x86-64 platforms running 64-bit code. - - To use the functions in this module you must: - - configure the compiler with "-spacetime"; - - compile to native code. - Without these conditions being satisfied the functions in this module - will have no effect. - - Instead of manually taking profiling heap snapshots with this module it is - possible to use an automatic snapshot facility that writes profiling - information at fixed intervals to a file. To enable this, all that needs to - be done is to build the relevant program using a compiler configured with - -spacetime; and set the environment variable OCAML_SPACETIME_INTERVAL to an - integer number of milliseconds giving the interval between profiling heap - snapshots. This interval should not be made excessively small relative to - the running time of the program. A typical interval to start with might be - 1/100 of the running time of the program. The program must exit "normally" - (i.e. by calling [exit], with whatever exit code, rather than being - abnormally terminated by a signal) so that the snapshot file is - correctly completed. - - When using the automatic snapshot mode the profiling output is written - to a file called "spacetime-" where is the process ID of the - program. (If the program forks and continues executing then multiple - files may be produced with different pid numbers.) The profiling output - is by default written to the current working directory when the program - starts. This may be customised by setting the OCAML_SPACETIME_SNAPSHOT_DIR - environment variable to the name of the desired directory. - - If using automatic snapshots the presence of the - [save_event_for_automatic_snapshots] function, below, should be noted. - - The functions in this module are thread safe. - - For functions to decode the information recorded by the profiler, - see the Spacetime offline library in otherlibs/. *) - -(** [enabled] is [true] if the compiler is configured with spacetime and [false] - otherwise *) -val enabled : bool - -module Series : sig - (** Type representing a file that will hold a series of heap snapshots - together with additional information required to interpret those - snapshots. *) - type t - - (** [create ~path] creates a series file at [path]. *) - val create : path:string -> t - - (** [save_event] writes an event, which is an arbitrary string, into the - given series file. This may be used for identifying particular points - during program execution when analysing the profile. - The optional [time] parameter is as for {!Snapshot.take}. - *) - val save_event : ?time:float -> t -> event_name:string -> unit - - (** [save_and_close series] writes information into [series] required for - interpreting the snapshots that [series] contains and then closes the - [series] file. This function must be called to produce a valid series - file. - The optional [time] parameter is as for {!Snapshot.take}. - *) - val save_and_close : ?time:float -> t -> unit -end - -module Snapshot : sig - (** [take series] takes a snapshot of the profiling annotations on the values - in the minor and major heaps, together with GC stats, and write the - result to the [series] file. This function triggers a minor GC but does - not allocate any memory itself. - If the optional [time] is specified, it will be used instead of the - result of {!Sys.time} as the timestamp of the snapshot. Such [time]s - should start from zero and be monotonically increasing. This parameter - is intended to be used so that snapshots can be correlated against wall - clock time (which is not supported in the standard library) rather than - elapsed CPU time. - *) - val take : ?time:float -> Series.t -> unit -end - -(** Like {!Series.save_event}, but writes to the automatic snapshot file. - This function is a no-op if OCAML_SPACETIME_INTERVAL was not set. *) -val save_event_for_automatic_snapshots : event_name:string -> unit diff --git a/analysis/vendor/compiler-libs-406/stack.mli b/analysis/vendor/compiler-libs-406/stack.mli deleted file mode 100644 index 4ce899536..000000000 --- a/analysis/vendor/compiler-libs-406/stack.mli +++ /dev/null @@ -1,63 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Last-in first-out stacks. - - This module implements stacks (LIFOs), with in-place modification. -*) - -type 'a t -(** The type of stacks containing elements of type ['a]. *) - -exception Empty -(** Raised when {!Stack.pop} or {!Stack.top} is applied to an empty stack. *) - - -val create : unit -> 'a t -(** Return a new stack, initially empty. *) - -val push : 'a -> 'a t -> unit -(** [push x s] adds the element [x] at the top of stack [s]. *) - -val pop : 'a t -> 'a -(** [pop s] removes and returns the topmost element in stack [s], - or raises {!Empty} if the stack is empty. *) - -val top : 'a t -> 'a -(** [top s] returns the topmost element in stack [s], - or raises {!Empty} if the stack is empty. *) - -val clear : 'a t -> unit -(** Discard all elements from a stack. *) - -val copy : 'a t -> 'a t -(** Return a copy of the given stack. *) - -val is_empty : 'a t -> bool -(** Return [true] if the given stack is empty, [false] otherwise. *) - -val length : 'a t -> int -(** Return the number of elements in a stack. Time complexity O(1) *) - -val iter : ('a -> unit) -> 'a t -> unit -(** [iter f s] applies [f] in turn to all elements of [s], - from the element at the top of the stack to the element at the - bottom of the stack. The stack itself is unchanged. *) - -val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b -(** [fold f accu s] is [(f (... (f (f accu x1) x2) ...) xn)] - where [x1] is the top of the stack, [x2] the second element, - and [xn] the bottom element. The stack is unchanged. - @since 4.03 *) diff --git a/analysis/vendor/compiler-libs-406/stdLabels.mli b/analysis/vendor/compiler-libs-406/stdLabels.mli deleted file mode 100644 index 4b24fd2b5..000000000 --- a/analysis/vendor/compiler-libs-406/stdLabels.mli +++ /dev/null @@ -1,29 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Jacques Garrigue, Kyoto University RIMS *) -(* *) -(* Copyright 2001 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Standard labeled libraries. - - This meta-module provides labelized version of the {!Array}, - {!Bytes}, {!List} and {!String} modules. - - They only differ by their labels. Detailed interfaces can be found - in [arrayLabels.mli], [bytesLabels.mli], [listLabels.mli] - and [stringLabels.mli]. -*) - -module Array = ArrayLabels -module Bytes = BytesLabels -module List = ListLabels -module String = StringLabels diff --git a/analysis/vendor/compiler-libs-406/stream.ml b/analysis/vendor/compiler-libs-406/stream.ml deleted file mode 100644 index e9b5e6113..000000000 --- a/analysis/vendor/compiler-libs-406/stream.ml +++ /dev/null @@ -1,233 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Daniel de Rauglaudre, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1997 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -type 'a t = 'a cell option -and 'a cell = { mutable count : int; mutable data : 'a data } -and 'a data = - Sempty - | Scons of 'a * 'a data - | Sapp of 'a data * 'a data - | Slazy of 'a data Lazy.t - | Sgen of 'a gen - | Sbuffio : buffio -> char data -and 'a gen = { mutable curr : 'a option option; func : int -> 'a option } -and buffio = - { ic : in_channel; buff : bytes; mutable len : int; mutable ind : int } - -exception Failure -exception Error of string - -let count = function - | None -> 0 - | Some { count } -> count -let data = function - | None -> Sempty - | Some { data } -> data - -let fill_buff b = - b.len <- input b.ic b.buff 0 (Bytes.length b.buff); b.ind <- 0 - - -let rec get_data : type v. int -> v data -> v data = fun count d -> match d with - (* Returns either Sempty or Scons(a, _) even when d is a generator - or a buffer. In those cases, the item a is seen as extracted from - the generator/buffer. - The count parameter is used for calling `Sgen-functions'. *) - Sempty | Scons (_, _) -> d - | Sapp (d1, d2) -> - begin match get_data count d1 with - Scons (a, d11) -> Scons (a, Sapp (d11, d2)) - | Sempty -> get_data count d2 - | _ -> assert false - end - | Sgen {curr = Some None} -> Sempty - | Sgen ({curr = Some(Some a)} as g) -> - g.curr <- None; Scons(a, d) - | Sgen g -> - begin match g.func count with - None -> g.curr <- Some(None); Sempty - | Some a -> Scons(a, d) - (* Warning: anyone using g thinks that an item has been read *) - end - | Sbuffio b -> - if b.ind >= b.len then fill_buff b; - if b.len == 0 then Sempty else - let r = Bytes.unsafe_get b.buff b.ind in - (* Warning: anyone using g thinks that an item has been read *) - b.ind <- succ b.ind; Scons(r, d) - | Slazy f -> get_data count (Lazy.force f) - - -let rec peek_data : type v. v cell -> v option = fun s -> - (* consult the first item of s *) - match s.data with - Sempty -> None - | Scons (a, _) -> Some a - | Sapp (_, _) -> - begin match get_data s.count s.data with - Scons(a, _) as d -> s.data <- d; Some a - | Sempty -> None - | _ -> assert false - end - | Slazy f -> s.data <- (Lazy.force f); peek_data s - | Sgen {curr = Some a} -> a - | Sgen g -> let x = g.func s.count in g.curr <- Some x; x - | Sbuffio b -> - if b.ind >= b.len then fill_buff b; - if b.len == 0 then begin s.data <- Sempty; None end - else Some (Bytes.unsafe_get b.buff b.ind) - - -let peek = function - | None -> None - | Some s -> peek_data s - - -let rec junk_data : type v. v cell -> unit = fun s -> - match s.data with - Scons (_, d) -> s.count <- (succ s.count); s.data <- d - | Sgen ({curr = Some _} as g) -> s.count <- (succ s.count); g.curr <- None - | Sbuffio b -> s.count <- (succ s.count); b.ind <- succ b.ind - | _ -> - match peek_data s with - None -> () - | Some _ -> junk_data s - - -let junk = function - | None -> () - | Some data -> junk_data data - -let rec nget_data n s = - if n <= 0 then [], s.data, 0 - else - match peek_data s with - Some a -> - junk_data s; - let (al, d, k) = nget_data (pred n) s in a :: al, Scons (a, d), succ k - | None -> [], s.data, 0 - - -let npeek_data n s = - let (al, d, len) = nget_data n s in - s.count <- (s.count - len); - s.data <- d; - al - - -let npeek n = function - | None -> [] - | Some d -> npeek_data n d - -let next s = - match peek s with - Some a -> junk s; a - | None -> raise Failure - - -let empty s = - match peek s with - Some _ -> raise Failure - | None -> () - - -let iter f strm = - let rec do_rec () = - match peek strm with - Some a -> junk strm; ignore(f a); do_rec () - | None -> () - in - do_rec () - - -(* Stream building functions *) - -let from f = Some {count = 0; data = Sgen {curr = None; func = f}} - -let of_list l = - Some {count = 0; data = List.fold_right (fun x l -> Scons (x, l)) l Sempty} - - -let of_string s = - let count = ref 0 in - from (fun _ -> - (* We cannot use the index passed by the [from] function directly - because it returns the current stream count, with absolutely no - guarantee that it will start from 0. For example, in the case - of [Stream.icons 'c' (Stream.from_string "ab")], the first - access to the string will be made with count [1] already. - *) - let c = !count in - if c < String.length s - then (incr count; Some s.[c]) - else None) - - -let of_bytes s = - let count = ref 0 in - from (fun _ -> - let c = !count in - if c < Bytes.length s - then (incr count; Some (Bytes.get s c)) - else None) - - -let of_channel ic = - Some {count = 0; - data = Sbuffio {ic = ic; buff = Bytes.create 4096; len = 0; ind = 0}} - - -(* Stream expressions builders *) - -let iapp i s = Some {count = 0; data = Sapp (data i, data s)} -let icons i s = Some {count = 0; data = Scons (i, data s)} -let ising i = Some {count = 0; data = Scons (i, Sempty)} - -let lapp f s = - Some {count = 0; data = Slazy (lazy(Sapp (data (f ()), data s)))} - -let lcons f s = Some {count = 0; data = Slazy (lazy(Scons (f (), data s)))} -let lsing f = Some {count = 0; data = Slazy (lazy(Scons (f (), Sempty)))} - -let sempty = None -let slazy f = Some {count = 0; data = Slazy (lazy(data (f ())))} - -(* For debugging use *) - -let rec dump : type v. (v -> unit) -> v t -> unit = fun f s -> - print_string "{count = "; - print_int (count s); - print_string "; data = "; - dump_data f (data s); - print_string "}"; - print_newline () -and dump_data : type v. (v -> unit) -> v data -> unit = fun f -> - function - Sempty -> print_string "Sempty" - | Scons (a, d) -> - print_string "Scons ("; - f a; - print_string ", "; - dump_data f d; - print_string ")" - | Sapp (d1, d2) -> - print_string "Sapp ("; - dump_data f d1; - print_string ", "; - dump_data f d2; - print_string ")" - | Slazy _ -> print_string "Slazy" - | Sgen _ -> print_string "Sgen" - | Sbuffio _ -> print_string "Sbuffio" diff --git a/analysis/vendor/compiler-libs-406/stream.mli b/analysis/vendor/compiler-libs-406/stream.mli deleted file mode 100644 index e52bab896..000000000 --- a/analysis/vendor/compiler-libs-406/stream.mli +++ /dev/null @@ -1,110 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Daniel de Rauglaudre, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1997 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Streams and parsers. *) - -type 'a t -(** The type of streams holding values of type ['a]. *) - -exception Failure -(** Raised by parsers when none of the first components of the stream - patterns is accepted. *) - -exception Error of string -(** Raised by parsers when the first component of a stream pattern is - accepted, but one of the following components is rejected. *) - - -(** {1 Stream builders} *) - -val from : (int -> 'a option) -> 'a t -(** [Stream.from f] returns a stream built from the function [f]. - To create a new stream element, the function [f] is called with - the current stream count. The user function [f] must return either - [Some ] for a value or [None] to specify the end of the - stream. - - Do note that the indices passed to [f] may not start at [0] in the - general case. For example, [[< '0; '1; Stream.from f >]] would call - [f] the first time with count [2]. -*) - -val of_list : 'a list -> 'a t -(** Return the stream holding the elements of the list in the same - order. *) - -val of_string : string -> char t -(** Return the stream of the characters of the string parameter. *) - -val of_bytes : bytes -> char t -(** Return the stream of the characters of the bytes parameter. - @since 4.02.0 *) - -val of_channel : in_channel -> char t -(** Return the stream of the characters read from the input channel. *) - - -(** {1 Stream iterator} *) - -val iter : ('a -> unit) -> 'a t -> unit -(** [Stream.iter f s] scans the whole stream s, applying function [f] - in turn to each stream element encountered. *) - - -(** {1 Predefined parsers} *) - -val next : 'a t -> 'a -(** Return the first element of the stream and remove it from the - stream. Raise {!Stream.Failure} if the stream is empty. *) - -val empty : 'a t -> unit -(** Return [()] if the stream is empty, else raise {!Stream.Failure}. *) - - -(** {1 Useful functions} *) - -val peek : 'a t -> 'a option -(** Return [Some] of "the first element" of the stream, or [None] if - the stream is empty. *) - -val junk : 'a t -> unit -(** Remove the first element of the stream, possibly unfreezing - it before. *) - -val count : 'a t -> int -(** Return the current count of the stream elements, i.e. the number - of the stream elements discarded. *) - -val npeek : int -> 'a t -> 'a list -(** [npeek n] returns the list of the [n] first elements of - the stream, or all its remaining elements if less than [n] - elements are available. *) - -(**/**) - -(* The following is for system use only. Do not call directly. *) - -val iapp : 'a t -> 'a t -> 'a t -val icons : 'a -> 'a t -> 'a t -val ising : 'a -> 'a t - -val lapp : (unit -> 'a t) -> 'a t -> 'a t -val lcons : (unit -> 'a) -> 'a t -> 'a t -val lsing : (unit -> 'a) -> 'a t - -val sempty : 'a t -val slazy : (unit -> 'a t) -> 'a t - -val dump : ('a -> unit) -> 'a t -> unit diff --git a/analysis/vendor/compiler-libs-406/string_map.ml b/analysis/vendor/compiler-libs-406/string_map.ml deleted file mode 100644 index 7a6dfd308..000000000 --- a/analysis/vendor/compiler-libs-406/string_map.ml +++ /dev/null @@ -1,157 +0,0 @@ - -(* we don't create [map_poly], since some operations require raise an exception which carries [key] *) - - - - type key = string - let compare_key = Ext_string.compare - -type 'a t = (key,'a) Map_gen.t -exception Duplicate_key of key - -let empty = Map_gen.empty -let is_empty = Map_gen.is_empty -let iter = Map_gen.iter -let fold = Map_gen.fold -let for_all = Map_gen.for_all -let exists = Map_gen.exists -let singleton = Map_gen.singleton -let cardinal = Map_gen.cardinal -let bindings = Map_gen.bindings -let keys = Map_gen.keys -let choose = Map_gen.choose -let partition = Map_gen.partition -let filter = Map_gen.filter -let map = Map_gen.map -let mapi = Map_gen.mapi -let bal = Map_gen.bal -let height = Map_gen.height -let max_binding_exn = Map_gen.max_binding_exn -let min_binding_exn = Map_gen.min_binding_exn - - -let rec add x data (tree : _ Map_gen.t as 'a) : 'a = match tree with - | Empty -> - Node(Empty, x, data, Empty, 1) - | Node(l, v, d, r, h) -> - let c = compare_key x v in - if c = 0 then - Node(l, x, data, r, h) - else if c < 0 then - bal (add x data l) v d r - else - bal l v d (add x data r) - - -let rec adjust x data replace (tree : _ Map_gen.t as 'a) : 'a = - match tree with - | Empty -> - Node(Empty, x, data (), Empty, 1) - | Node(l, v, d, r, h) -> - let c = compare_key x v in - if c = 0 then - Node(l, x, replace d , r, h) - else if c < 0 then - bal (adjust x data replace l) v d r - else - bal l v d (adjust x data replace r) - - -let rec find_exn x (tree : _ Map_gen.t ) = match tree with - | Empty -> - raise Not_found - | Node(l, v, d, r, _) -> - let c = compare_key x v in - if c = 0 then d - else find_exn x (if c < 0 then l else r) - -let rec find_opt x (tree : _ Map_gen.t ) = match tree with - | Empty -> None - | Node(l, v, d, r, _) -> - let c = compare_key x v in - if c = 0 then Some d - else find_opt x (if c < 0 then l else r) - -let rec find_default x (tree : _ Map_gen.t ) default = match tree with - | Empty -> default - | Node(l, v, d, r, _) -> - let c = compare_key x v in - if c = 0 then d - else find_default x (if c < 0 then l else r) default - -let rec mem x (tree : _ Map_gen.t ) = match tree with - | Empty -> - false - | Node(l, v, _d, r, _) -> - let c = compare_key x v in - c = 0 || mem x (if c < 0 then l else r) - -let rec remove x (tree : _ Map_gen.t as 'a) : 'a = match tree with - | Empty -> - Empty - | Node(l, v, d, r, _h) -> - let c = compare_key x v in - if c = 0 then - Map_gen.merge l r - else if c < 0 then - bal (remove x l) v d r - else - bal l v d (remove x r) - - -let rec split x (tree : _ Map_gen.t as 'a) : 'a * _ option * 'a = match tree with - | Empty -> - (Empty, None, Empty) - | Node(l, v, d, r, _) -> - let c = compare_key x v in - if c = 0 then (l, Some d, r) - else if c < 0 then - let (ll, pres, rl) = split x l in (ll, pres, Map_gen.join rl v d r) - else - let (lr, pres, rr) = split x r in (Map_gen.join l v d lr, pres, rr) - -let rec merge f (s1 : _ Map_gen.t) (s2 : _ Map_gen.t) : _ Map_gen.t = - match (s1, s2) with - | (Empty, Empty) -> Empty - | (Node (l1, v1, d1, r1, h1), _) when h1 >= height s2 -> - let (l2, d2, r2) = split v1 s2 in - Map_gen.concat_or_join (merge f l1 l2) v1 (f v1 (Some d1) d2) (merge f r1 r2) - | (_, Node (l2, v2, d2, r2, _h2)) -> - let (l1, d1, r1) = split v2 s1 in - Map_gen.concat_or_join (merge f l1 l2) v2 (f v2 d1 (Some d2)) (merge f r1 r2) - | _ -> - assert false - -let rec disjoint_merge (s1 : _ Map_gen.t) (s2 : _ Map_gen.t) : _ Map_gen.t = - match (s1, s2) with - | (Empty, Empty) -> Empty - | (Node (l1, v1, d1, r1, h1), _) when h1 >= height s2 -> - begin match split v1 s2 with - | l2, None, r2 -> - Map_gen.join (disjoint_merge l1 l2) v1 d1 (disjoint_merge r1 r2) - | _, Some _, _ -> - raise (Duplicate_key v1) - end - | (_, Node (l2, v2, d2, r2, _h2)) -> - begin match split v2 s1 with - | (l1, None, r1) -> - Map_gen.join (disjoint_merge l1 l2) v2 d2 (disjoint_merge r1 r2) - | (_, Some _, _) -> - raise (Duplicate_key v2) - end - | _ -> - assert false - - - -let compare cmp m1 m2 = Map_gen.compare compare_key cmp m1 m2 - -let equal cmp m1 m2 = Map_gen.equal compare_key cmp m1 m2 - -let add_list (xs : _ list ) init = - List.fold_left (fun acc (k,v) -> add k v acc) init xs - -let of_list xs = add_list xs empty - -let of_array xs = - Array.fold_left (fun acc (k,v) -> add k v acc) empty xs diff --git a/analysis/vendor/compiler-libs-406/typeclass.mli b/analysis/vendor/compiler-libs-406/typeclass.mli deleted file mode 100644 index 1735bf9e9..000000000 --- a/analysis/vendor/compiler-libs-406/typeclass.mli +++ /dev/null @@ -1,124 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1996 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -open Asttypes -open Types -open Format - -type 'a class_info = { - cls_id : Ident.t; - cls_id_loc : string loc; - cls_decl : class_declaration; - cls_ty_id : Ident.t; - cls_ty_decl : class_type_declaration; - cls_obj_id : Ident.t; - cls_obj_abbr : type_declaration; - cls_typesharp_id : Ident.t; - cls_abbr : type_declaration; - cls_arity : int; - cls_pub_methods : string list; - cls_info : 'a; -} - -type class_type_info = { - clsty_ty_id : Ident.t; - clsty_id_loc : string loc; - clsty_ty_decl : class_type_declaration; - clsty_obj_id : Ident.t; - clsty_obj_abbr : type_declaration; - clsty_typesharp_id : Ident.t; - clsty_abbr : type_declaration; - clsty_info : Typedtree.class_type_declaration; -} - -val class_declarations: - Env.t -> Parsetree.class_declaration list -> - Typedtree.class_declaration class_info list * Env.t - -(* -and class_declaration = - (class_expr, Types.class_declaration) class_infos -*) - -val class_descriptions: - Env.t -> Parsetree.class_description list -> - Typedtree.class_description class_info list * Env.t - -(* -and class_description = - (class_type, unit) class_infos -*) - -val class_type_declarations: - Env.t -> Parsetree.class_description list -> class_type_info list * Env.t - -(* -and class_type_declaration = - (class_type, Types.class_type_declaration) class_infos -*) - -val approx_class_declarations: - Env.t -> Parsetree.class_description list -> class_type_info list - -val virtual_methods: Types.class_signature -> label list - -(* -val type_classes : - bool -> - ('a -> Types.type_expr) -> - (Env.t -> 'a -> 'b * Types.class_type) -> - Env.t -> - 'a Parsetree.class_infos list -> - ( Ident.t * Types.class_declaration * - Ident.t * Types.class_type_declaration * - Ident.t * Types.type_declaration * - Ident.t * Types.type_declaration * - int * string list * 'b * 'b Typedtree.class_infos) - list * Env.t -*) - -type error = - Unconsistent_constraint of (type_expr * type_expr) list - | Field_type_mismatch of string * string * (type_expr * type_expr) list - | Structure_expected of class_type - | Cannot_apply of class_type - | Apply_wrong_label of arg_label - | Pattern_type_clash of type_expr - | Repeated_parameter - | Unbound_class_2 of Longident.t - | Unbound_class_type_2 of Longident.t - | Abbrev_type_clash of type_expr * type_expr * type_expr - | Constructor_type_mismatch of string * (type_expr * type_expr) list - | Virtual_class of bool * bool * string list * string list - | Parameter_arity_mismatch of Longident.t * int * int - | Parameter_mismatch of (type_expr * type_expr) list - | Bad_parameters of Ident.t * type_expr * type_expr - | Class_match_failure of Ctype.class_match_failure list - | Unbound_val of string - | Unbound_type_var of (formatter -> unit) * Ctype.closed_class_failure - | Make_nongen_seltype of type_expr - | Non_generalizable_class of Ident.t * Types.class_declaration - | Cannot_coerce_self of type_expr - | Non_collapsable_conjunction of - Ident.t * Types.class_declaration * (type_expr * type_expr) list - | Final_self_clash of (type_expr * type_expr) list - | Mutability_mismatch of string * mutable_flag - | No_overriding of string * string - | Duplicate of string * string - -exception Error of Location.t * Env.t * error -exception Error_forward of Location.error - -val report_error : Env.t -> formatter -> error -> unit diff --git a/analysis/vendor/compiler-libs-406/warnings.ml b/analysis/vendor/compiler-libs-406/warnings.ml deleted file mode 100644 index 23f3f1d5a..000000000 --- a/analysis/vendor/compiler-libs-406/warnings.ml +++ /dev/null @@ -1,650 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Pierre Weis && Damien Doligez, INRIA Rocquencourt *) -(* *) -(* Copyright 1998 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(* When you change this, you need to update the documentation: - - man/ocamlc.m - - man/ocamlopt.m - - manual/manual/cmds/comp.etex - - manual/manual/cmds/native.etex -*) - -type loc = { - loc_start: Lexing.position; - loc_end: Lexing.position; - loc_ghost: bool; -} - -type t = - | Comment_start (* 1 *) - | Comment_not_end (* 2 *) - | Deprecated of string * loc * loc (* 3 *) - | Fragile_match of string (* 4 *) - | Partial_application (* 5 *) - | Labels_omitted of string list (* 6 *) - | Method_override of string list (* 7 *) - | Partial_match of string (* 8 *) - | Non_closed_record_pattern of string (* 9 *) - | Statement_type (* 10 *) - | Unused_match (* 11 *) - | Unused_pat (* 12 *) - | Instance_variable_override of string list (* 13 *) - | Illegal_backslash (* 14 *) - | Implicit_public_methods of string list (* 15 *) - | Unerasable_optional_argument (* 16 *) - | Undeclared_virtual_method of string (* 17 *) - | Not_principal of string (* 18 *) - | Without_principality of string (* 19 *) - | Unused_argument (* 20 *) - | Nonreturning_statement (* 21 *) - | Preprocessor of string (* 22 *) - | Useless_record_with (* 23 *) - | Bad_module_name of string (* 24 *) - | All_clauses_guarded (* 8, used to be 25 *) - | Unused_var of string (* 26 *) - | Unused_var_strict of string (* 27 *) - | Wildcard_arg_to_constant_constr (* 28 *) - | Eol_in_string (* 29 *) - | Duplicate_definitions of string * string * string * string (*30 *) - | Multiple_definition of string * string * string (* 31 *) - | Unused_value_declaration of string (* 32 *) - | Unused_open of string (* 33 *) - | Unused_type_declaration of string (* 34 *) - | Unused_for_index of string (* 35 *) - | Unused_ancestor of string (* 36 *) - | Unused_constructor of string * bool * bool (* 37 *) - | Unused_extension of string * bool * bool * bool (* 38 *) - | Unused_rec_flag (* 39 *) - | Name_out_of_scope of string * string list * bool (* 40 *) - | Ambiguous_name of string list * string list * bool (* 41 *) - | Disambiguated_name of string (* 42 *) - | Nonoptional_label of string (* 43 *) - | Open_shadow_identifier of string * string (* 44 *) - | Open_shadow_label_constructor of string * string (* 45 *) - | Bad_env_variable of string * string (* 46 *) - | Attribute_payload of string * string (* 47 *) - | Eliminated_optional_arguments of string list (* 48 *) - | No_cmi_file of string * string option (* 49 *) - | Bad_docstring of bool (* 50 *) - | Expect_tailcall (* 51 *) - | Fragile_literal_pattern (* 52 *) - | Misplaced_attribute of string (* 53 *) - | Duplicated_attribute of string (* 54 *) - | Inlining_impossible of string (* 55 *) - | Unreachable_case (* 56 *) - | Ambiguous_pattern of string list (* 57 *) - | No_cmx_file of string (* 58 *) - | Assignment_to_non_mutable_value (* 59 *) - | Unused_module of string (* 60 *) - | Unboxable_type_in_prim_decl of string (* 61 *) - | Constraint_on_gadt (* 62 *) -;; - -(* If you remove a warning, leave a hole in the numbering. NEVER change - the numbers of existing warnings. - If you add a new warning, add it at the end with a new number; - do NOT reuse one of the holes. -*) - -let number = function - | Comment_start -> 1 - | Comment_not_end -> 2 - | Deprecated _ -> 3 - | Fragile_match _ -> 4 - | Partial_application -> 5 - | Labels_omitted _ -> 6 - | Method_override _ -> 7 - | Partial_match _ -> 8 - | Non_closed_record_pattern _ -> 9 - | Statement_type -> 10 - | Unused_match -> 11 - | Unused_pat -> 12 - | Instance_variable_override _ -> 13 - | Illegal_backslash -> 14 - | Implicit_public_methods _ -> 15 - | Unerasable_optional_argument -> 16 - | Undeclared_virtual_method _ -> 17 - | Not_principal _ -> 18 - | Without_principality _ -> 19 - | Unused_argument -> 20 - | Nonreturning_statement -> 21 - | Preprocessor _ -> 22 - | Useless_record_with -> 23 - | Bad_module_name _ -> 24 - | All_clauses_guarded -> 8 (* used to be 25 *) - | Unused_var _ -> 26 - | Unused_var_strict _ -> 27 - | Wildcard_arg_to_constant_constr -> 28 - | Eol_in_string -> 29 - | Duplicate_definitions _ -> 30 - | Multiple_definition _ -> 31 - | Unused_value_declaration _ -> 32 - | Unused_open _ -> 33 - | Unused_type_declaration _ -> 34 - | Unused_for_index _ -> 35 - | Unused_ancestor _ -> 36 - | Unused_constructor _ -> 37 - | Unused_extension _ -> 38 - | Unused_rec_flag -> 39 - | Name_out_of_scope _ -> 40 - | Ambiguous_name _ -> 41 - | Disambiguated_name _ -> 42 - | Nonoptional_label _ -> 43 - | Open_shadow_identifier _ -> 44 - | Open_shadow_label_constructor _ -> 45 - | Bad_env_variable _ -> 46 - | Attribute_payload _ -> 47 - | Eliminated_optional_arguments _ -> 48 - | No_cmi_file _ -> 49 - | Bad_docstring _ -> 50 - | Expect_tailcall -> 51 - | Fragile_literal_pattern -> 52 - | Misplaced_attribute _ -> 53 - | Duplicated_attribute _ -> 54 - | Inlining_impossible _ -> 55 - | Unreachable_case -> 56 - | Ambiguous_pattern _ -> 57 - | No_cmx_file _ -> 58 - | Assignment_to_non_mutable_value -> 59 - | Unused_module _ -> 60 - | Unboxable_type_in_prim_decl _ -> 61 - | Constraint_on_gadt -> 62 -;; - -let last_warning_number = 62 -;; - -(* Must be the max number returned by the [number] function. *) - -let letter = function - | 'a' -> - let rec loop i = if i = 0 then [] else i :: loop (i - 1) in - loop last_warning_number - | 'b' -> [] - | 'c' -> [1; 2] - | 'd' -> [3] - | 'e' -> [4] - | 'f' -> [5] - | 'g' -> [] - | 'h' -> [] - | 'i' -> [] - | 'j' -> [] - | 'k' -> [32; 33; 34; 35; 36; 37; 38; 39] - | 'l' -> [6] - | 'm' -> [7] - | 'n' -> [] - | 'o' -> [] - | 'p' -> [8] - | 'q' -> [] - | 'r' -> [9] - | 's' -> [10] - | 't' -> [] - | 'u' -> [11; 12] - | 'v' -> [13] - | 'w' -> [] - | 'x' -> [14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 30] - | 'y' -> [26] - | 'z' -> [27] - | _ -> assert false -;; - -type state = - { - active: bool array; - error: bool array; - } - -let current = - ref - { - active = Array.make (last_warning_number + 1) true; - error = Array.make (last_warning_number + 1) false; - } - -let disabled = ref false - -let without_warnings f = - Misc.protect_refs [Misc.R(disabled, true)] f - -let backup () = !current - -let restore x = current := x - -let is_active x = not !disabled && (!current).active.(number x);; -let is_error x = not !disabled && (!current).error.(number x);; - -let mk_lazy f = - let state = backup () in - lazy - ( - let prev = backup () in - restore state; - try - let r = f () in - restore prev; - r - with exn -> - restore prev; - raise exn - ) - -let parse_opt error active flags s = - let set i = flags.(i) <- true in - let clear i = flags.(i) <- false in - let set_all i = active.(i) <- true; error.(i) <- true in - let error () = raise (Arg.Bad "Ill-formed list of warnings") in - let rec get_num n i = - if i >= String.length s then i, n - else match s.[i] with - | '0'..'9' -> get_num (10 * n + Char.code s.[i] - Char.code '0') (i + 1) - | _ -> i, n - in - let get_range i = - let i, n1 = get_num 0 i in - if i + 2 < String.length s && s.[i] = '.' && s.[i + 1] = '.' then - let i, n2 = get_num 0 (i + 2) in - if n2 < n1 then error (); - i, n1, n2 - else - i, n1, n1 - in - let rec loop i = - if i >= String.length s then () else - match s.[i] with - | 'A' .. 'Z' -> - List.iter set (letter (Char.lowercase_ascii s.[i])); - loop (i+1) - | 'a' .. 'z' -> - List.iter clear (letter s.[i]); - loop (i+1) - | '+' -> loop_letter_num set (i+1) - | '-' -> loop_letter_num clear (i+1) - | '@' -> loop_letter_num set_all (i+1) - | _ -> error () - and loop_letter_num myset i = - if i >= String.length s then error () else - match s.[i] with - | '0' .. '9' -> - let i, n1, n2 = get_range i in - for n = n1 to min n2 last_warning_number do myset n done; - loop i - | 'A' .. 'Z' -> - List.iter myset (letter (Char.lowercase_ascii s.[i])); - loop (i+1) - | 'a' .. 'z' -> - List.iter myset (letter s.[i]); - loop (i+1) - | _ -> error () - in - loop 0 -;; - -let parse_options errflag s = - let error = Array.copy (!current).error in - let active = Array.copy (!current).active in - parse_opt error active (if errflag then error else active) s; - current := {error; active} - -(* If you change these, don't forget to change them in man/ocamlc.m *) -let defaults_w = "+a-4-6-7-9-27-29-32..42-44-45-48-50-60";; -let defaults_warn_error = "-a+31";; - -let () = parse_options false defaults_w;; -let () = parse_options true defaults_warn_error;; - -let message = function - | Comment_start -> "this is the start of a comment." - | Comment_not_end -> "this is not the end of a comment." - | Deprecated (s, _, _) -> - (* Reduce \r\n to \n: - - Prevents any \r characters being printed on Unix when processing - Windows sources - - Prevents \r\r\n being generated on Windows, which affects the - testsuite - *) - "deprecated: " ^ Misc.normalise_eol s - | Fragile_match "" -> - "this pattern-matching is fragile." - | Fragile_match s -> - "this pattern-matching is fragile.\n\ - It will remain exhaustive when constructors are added to type " ^ s ^ "." - | Partial_application -> - "this function application is partial,\n\ - maybe some arguments are missing." - | Labels_omitted [] -> assert false - | Labels_omitted [l] -> - "label " ^ l ^ " was omitted in the application of this function." - | Labels_omitted ls -> - "labels " ^ String.concat ", " ls ^ - " were omitted in the application of this function." - | Method_override [lab] -> - "the method " ^ lab ^ " is overridden." - | Method_override (cname :: slist) -> - String.concat " " - ("the following methods are overridden by the class" - :: cname :: ":\n " :: slist) - | Method_override [] -> assert false - | Partial_match "" -> "this pattern-matching is not exhaustive." - | Partial_match s -> - "this pattern-matching is not exhaustive.\n\ - Here is an example of a case that is not matched:\n" ^ s - | Non_closed_record_pattern s -> - "the following labels are not bound in this record pattern:\n" ^ s ^ - "\nEither bind these labels explicitly or add '; _' to the pattern." - | Statement_type -> - "this expression should have type unit." - | Unused_match -> "this match case is unused." - | Unused_pat -> "this sub-pattern is unused." - | Instance_variable_override [lab] -> - "the instance variable " ^ lab ^ " is overridden.\n" ^ - "The behaviour changed in ocaml 3.10 (previous behaviour was hiding.)" - | Instance_variable_override (cname :: slist) -> - String.concat " " - ("the following instance variables are overridden by the class" - :: cname :: ":\n " :: slist) ^ - "\nThe behaviour changed in ocaml 3.10 (previous behaviour was hiding.)" - | Instance_variable_override [] -> assert false - | Illegal_backslash -> "illegal backslash escape in string." - | Implicit_public_methods l -> - "the following private methods were made public implicitly:\n " - ^ String.concat " " l ^ "." - | Unerasable_optional_argument -> "this optional argument cannot be erased." - | Undeclared_virtual_method m -> "the virtual method "^m^" is not declared." - | Not_principal s -> s^" is not principal." - | Without_principality s -> s^" without principality." - | Unused_argument -> "this argument will not be used by the function." - | Nonreturning_statement -> - "this statement never returns (or has an unsound type.)" - | Preprocessor s -> s - | Useless_record_with -> - "all the fields are explicitly listed in this record:\n\ - the 'with' clause is useless." - | Bad_module_name (modname) -> - "bad source file name: \"" ^ modname ^ "\" is not a valid module name." - | All_clauses_guarded -> - "this pattern-matching is not exhaustive.\n\ - All clauses in this pattern-matching are guarded." - | Unused_var v | Unused_var_strict v -> "unused variable " ^ v ^ "." - | Wildcard_arg_to_constant_constr -> - "wildcard pattern given as argument to a constant constructor" - | Eol_in_string -> - "unescaped end-of-line in a string constant (non-portable code)" - | Duplicate_definitions (kind, cname, tc1, tc2) -> - Printf.sprintf "the %s %s is defined in both types %s and %s." - kind cname tc1 tc2 - | Multiple_definition(modname, file1, file2) -> - Printf.sprintf - "files %s and %s both define a module named %s" - file1 file2 modname - | Unused_value_declaration v -> "unused value " ^ v ^ "." - | Unused_open s -> "unused open " ^ s ^ "." - | Unused_type_declaration s -> "unused type " ^ s ^ "." - | Unused_for_index s -> "unused for-loop index " ^ s ^ "." - | Unused_ancestor s -> "unused ancestor variable " ^ s ^ "." - | Unused_constructor (s, false, false) -> "unused constructor " ^ s ^ "." - | Unused_constructor (s, true, _) -> - "constructor " ^ s ^ - " is never used to build values.\n\ - (However, this constructor appears in patterns.)" - | Unused_constructor (s, false, true) -> - "constructor " ^ s ^ - " is never used to build values.\n\ - Its type is exported as a private type." - | Unused_extension (s, is_exception, cu_pattern, cu_privatize) -> - let kind = - if is_exception then "exception" else "extension constructor" in - let name = kind ^ " " ^ s in - begin match cu_pattern, cu_privatize with - | false, false -> "unused " ^ name - | true, _ -> - name ^ - " is never used to build values.\n\ - (However, this constructor appears in patterns.)" - | false, true -> - name ^ - " is never used to build values.\n\ - It is exported or rebound as a private extension." - end - | Unused_rec_flag -> - "unused rec flag." - | Name_out_of_scope (ty, [nm], false) -> - nm ^ " was selected from type " ^ ty ^ - ".\nIt is not visible in the current scope, and will not \n\ - be selected if the type becomes unknown." - | Name_out_of_scope (_, _, false) -> assert false - | Name_out_of_scope (ty, slist, true) -> - "this record of type "^ ty ^" contains fields that are \n\ - not visible in the current scope: " - ^ String.concat " " slist ^ ".\n\ - They will not be selected if the type becomes unknown." - | Ambiguous_name ([s], tl, false) -> - s ^ " belongs to several types: " ^ String.concat " " tl ^ - "\nThe first one was selected. Please disambiguate if this is wrong." - | Ambiguous_name (_, _, false) -> assert false - | Ambiguous_name (_slist, tl, true) -> - "these field labels belong to several types: " ^ - String.concat " " tl ^ - "\nThe first one was selected. Please disambiguate if this is wrong." - | Disambiguated_name s -> - "this use of " ^ s ^ " relies on type-directed disambiguation,\n\ - it will not compile with OCaml 4.00 or earlier." - | Nonoptional_label s -> - "the label " ^ s ^ " is not optional." - | Open_shadow_identifier (kind, s) -> - Printf.sprintf - "this open statement shadows the %s identifier %s (which is later used)" - kind s - | Open_shadow_label_constructor (kind, s) -> - Printf.sprintf - "this open statement shadows the %s %s (which is later used)" - kind s - | Bad_env_variable (var, s) -> - Printf.sprintf "illegal environment variable %s : %s" var s - | Attribute_payload (a, s) -> - Printf.sprintf "illegal payload for attribute '%s'.\n%s" a s - | Eliminated_optional_arguments sl -> - Printf.sprintf "implicit elimination of optional argument%s %s" - (if List.length sl = 1 then "" else "s") - (String.concat ", " sl) - | No_cmi_file(name, None) -> - "no cmi file was found in path for module " ^ name - | No_cmi_file(name, Some msg) -> - Printf.sprintf - "no valid cmi file was found in path for module %s. %s" - name msg - | Bad_docstring unattached -> - if unattached then "unattached documentation comment (ignored)" - else "ambiguous documentation comment" - | Expect_tailcall -> - Printf.sprintf "expected tailcall" - | Fragile_literal_pattern -> - Printf.sprintf - "Code should not depend on the actual values of\n\ - this constructor's arguments. They are only for information\n\ - and may change in future versions. (See manual section 8.5)" - | Unreachable_case -> - "this match case is unreachable.\n\ - Consider replacing it with a refutation case ' -> .'" - | Misplaced_attribute attr_name -> - Printf.sprintf "the %S attribute cannot appear in this context" attr_name - | Duplicated_attribute attr_name -> - Printf.sprintf "the %S attribute is used more than once on this \ - expression" - attr_name - | Inlining_impossible reason -> - Printf.sprintf "Cannot inline: %s" reason - | Ambiguous_pattern vars -> - let msg = - let vars = List.sort String.compare vars in - match vars with - | [] -> assert false - | [x] -> "variable " ^ x - | _::_ -> - "variables " ^ String.concat "," vars in - Printf.sprintf - "Ambiguous or-pattern variables under guard;\n\ - %s may match different arguments. (See manual section 8.5)" - msg - | No_cmx_file name -> - Printf.sprintf - "no cmx file was found in path for module %s, \ - and its interface was not compiled with -opaque" name - | Assignment_to_non_mutable_value -> - "A potential assignment to a non-mutable value was detected \n\ - in this source file. Such assignments may generate incorrect code \n\ - when using Flambda." - | Unused_module s -> "unused module " ^ s ^ "." - | Unboxable_type_in_prim_decl t -> - Printf.sprintf - "This primitive declaration uses type %s, which is unannotated and\n\ - unboxable. The representation of such types may change in future\n\ - versions. You should annotate the declaration of %s with [@@boxed]\n\ - or [@@unboxed]." t t - | Constraint_on_gadt -> - "Type constraints do not apply to GADT cases of variant types." -;; - -let sub_locs = function - | Deprecated (_, def, use) -> - [ - def, "Definition"; - use, "Expected signature"; - ] - | _ -> [] - -let nerrors = ref 0;; - -type reporting_information = - { number : int - ; message : string - ; is_error : bool - ; sub_locs : (loc * string) list; - } - -let report w = - match is_active w with - | false -> `Inactive - | true -> - if is_error w then incr nerrors; - `Active { number = number w; message = message w; is_error = is_error w; - sub_locs = sub_locs w; - } -;; - -exception Errors;; - -let reset_fatal () = - nerrors := 0 - -let check_fatal () = - if !nerrors > 0 then begin - nerrors := 0; - raise Errors; - end; -;; - -let descriptions = - [ - 1, "Suspicious-looking start-of-comment mark."; - 2, "Suspicious-looking end-of-comment mark."; - 3, "Deprecated feature."; - 4, "Fragile pattern matching: matching that will remain complete even\n\ - \ if additional constructors are added to one of the variant types\n\ - \ matched."; - 5, "Partially applied function: expression whose result has function\n\ - \ type and is ignored."; - 6, "Label omitted in function application."; - 7, "Method overridden."; - 8, "Partial match: missing cases in pattern-matching."; - 9, "Missing fields in a record pattern."; - 10, "Expression on the left-hand side of a sequence that doesn't have \ - type\n\ - \ \"unit\" (and that is not a function, see warning number 5)."; - 11, "Redundant case in a pattern matching (unused match case)."; - 12, "Redundant sub-pattern in a pattern-matching."; - 13, "Instance variable overridden."; - 14, "Illegal backslash escape in a string constant."; - 15, "Private method made public implicitly."; - 16, "Unerasable optional argument."; - 17, "Undeclared virtual method."; - 18, "Non-principal type."; - 19, "Type without principality."; - 20, "Unused function argument."; - 21, "Non-returning statement."; - 22, "Preprocessor warning."; - 23, "Useless record \"with\" clause."; - 24, "Bad module name: the source file name is not a valid OCaml module \ - name."; - 25, "Deprecated: now part of warning 8."; - 26, "Suspicious unused variable: unused variable that is bound\n\ - \ with \"let\" or \"as\", and doesn't start with an underscore (\"_\")\n\ - \ character."; - 27, "Innocuous unused variable: unused variable that is not bound with\n\ - \ \"let\" nor \"as\", and doesn't start with an underscore (\"_\")\n\ - \ character."; - 28, "Wildcard pattern given as argument to a constant constructor."; - 29, "Unescaped end-of-line in a string constant (non-portable code)."; - 30, "Two labels or constructors of the same name are defined in two\n\ - \ mutually recursive types."; - 31, "A module is linked twice in the same executable."; - 32, "Unused value declaration."; - 33, "Unused open statement."; - 34, "Unused type declaration."; - 35, "Unused for-loop index."; - 36, "Unused ancestor variable."; - 37, "Unused constructor."; - 38, "Unused extension constructor."; - 39, "Unused rec flag."; - 40, "Constructor or label name used out of scope."; - 41, "Ambiguous constructor or label name."; - 42, "Disambiguated constructor or label name (compatibility warning)."; - 43, "Nonoptional label applied as optional."; - 44, "Open statement shadows an already defined identifier."; - 45, "Open statement shadows an already defined label or constructor."; - 46, "Error in environment variable."; - 47, "Illegal attribute payload."; - 48, "Implicit elimination of optional arguments."; - 49, "Absent cmi file when looking up module alias."; - 50, "Unexpected documentation comment."; - 51, "Warning on non-tail calls if @tailcall present."; - 52, "Fragile constant pattern."; - 53, "Attribute cannot appear in this context"; - 54, "Attribute used more than once on an expression"; - 55, "Inlining impossible"; - 56, "Unreachable case in a pattern-matching (based on type information)."; - 57, "Ambiguous or-pattern variables under guard"; - 58, "Missing cmx file"; - 59, "Assignment to non-mutable value"; - 60, "Unused module declaration"; - 61, "Unboxable type in primitive declaration"; - 62, "Type constraint on GADT type declaration" - ] -;; - -let help_warnings () = - List.iter (fun (i, s) -> Printf.printf "%3i %s\n" i s) descriptions; - print_endline " A all warnings"; - for i = Char.code 'b' to Char.code 'z' do - let c = Char.chr i in - match letter c with - | [] -> () - | [n] -> - Printf.printf " %c Alias for warning %i.\n" (Char.uppercase_ascii c) n - | l -> - Printf.printf " %c warnings %s.\n" - (Char.uppercase_ascii c) - (String.concat ", " (List.map string_of_int l)) - done; - exit 0 -;; diff --git a/analysis/vendor/compiler-libs-406/warnings.mli b/analysis/vendor/compiler-libs-406/warnings.mli deleted file mode 100644 index 1171f8b3f..000000000 --- a/analysis/vendor/compiler-libs-406/warnings.mli +++ /dev/null @@ -1,118 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Pierre Weis && Damien Doligez, INRIA Rocquencourt *) -(* *) -(* Copyright 1998 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -type loc = { - loc_start: Lexing.position; - loc_end: Lexing.position; - loc_ghost: bool; -} - -type t = - | Comment_start (* 1 *) - | Comment_not_end (* 2 *) - | Deprecated of string * loc * loc (* 3 *) - | Fragile_match of string (* 4 *) - | Partial_application (* 5 *) - | Labels_omitted of string list (* 6 *) - | Method_override of string list (* 7 *) - | Partial_match of string (* 8 *) - | Non_closed_record_pattern of string (* 9 *) - | Statement_type (* 10 *) - | Unused_match (* 11 *) - | Unused_pat (* 12 *) - | Instance_variable_override of string list (* 13 *) - | Illegal_backslash (* 14 *) - | Implicit_public_methods of string list (* 15 *) - | Unerasable_optional_argument (* 16 *) - | Undeclared_virtual_method of string (* 17 *) - | Not_principal of string (* 18 *) - | Without_principality of string (* 19 *) - | Unused_argument (* 20 *) - | Nonreturning_statement (* 21 *) - | Preprocessor of string (* 22 *) - | Useless_record_with (* 23 *) - | Bad_module_name of string (* 24 *) - | All_clauses_guarded (* 8, used to be 25 *) - | Unused_var of string (* 26 *) - | Unused_var_strict of string (* 27 *) - | Wildcard_arg_to_constant_constr (* 28 *) - | Eol_in_string (* 29 *) - | Duplicate_definitions of string * string * string * string (* 30 *) - | Multiple_definition of string * string * string (* 31 *) - | Unused_value_declaration of string (* 32 *) - | Unused_open of string (* 33 *) - | Unused_type_declaration of string (* 34 *) - | Unused_for_index of string (* 35 *) - | Unused_ancestor of string (* 36 *) - | Unused_constructor of string * bool * bool (* 37 *) - | Unused_extension of string * bool * bool * bool (* 38 *) - | Unused_rec_flag (* 39 *) - | Name_out_of_scope of string * string list * bool (* 40 *) - | Ambiguous_name of string list * string list * bool (* 41 *) - | Disambiguated_name of string (* 42 *) - | Nonoptional_label of string (* 43 *) - | Open_shadow_identifier of string * string (* 44 *) - | Open_shadow_label_constructor of string * string (* 45 *) - | Bad_env_variable of string * string (* 46 *) - | Attribute_payload of string * string (* 47 *) - | Eliminated_optional_arguments of string list (* 48 *) - | No_cmi_file of string * string option (* 49 *) - | Bad_docstring of bool (* 50 *) - | Expect_tailcall (* 51 *) - | Fragile_literal_pattern (* 52 *) - | Misplaced_attribute of string (* 53 *) - | Duplicated_attribute of string (* 54 *) - | Inlining_impossible of string (* 55 *) - | Unreachable_case (* 56 *) - | Ambiguous_pattern of string list (* 57 *) - | No_cmx_file of string (* 58 *) - | Assignment_to_non_mutable_value (* 59 *) - | Unused_module of string (* 60 *) - | Unboxable_type_in_prim_decl of string (* 61 *) - | Constraint_on_gadt (* 62 *) -;; - -val parse_options : bool -> string -> unit;; - -val without_warnings : (unit -> 'a) -> 'a - -val is_active : t -> bool;; -val is_error : t -> bool;; - -val defaults_w : string;; -val defaults_warn_error : string;; - -type reporting_information = - { number : int - ; message : string - ; is_error : bool - ; sub_locs : (loc * string) list; - } - -val report : t -> [ `Active of reporting_information | `Inactive ] - -exception Errors;; - -val check_fatal : unit -> unit;; -val reset_fatal: unit -> unit - -val help_warnings: unit -> unit - -type state -val backup: unit -> state -val restore: state -> unit -val mk_lazy: (unit -> 'a) -> 'a Lazy.t - (** Like [Lazy.of_fun], but the function is applied with - the warning settings at the time [mk_lazy] is called. *) diff --git a/analysis/vendor/compiler-libs-406/weak.ml b/analysis/vendor/compiler-libs-406/weak.ml deleted file mode 100644 index 4ade095ac..000000000 --- a/analysis/vendor/compiler-libs-406/weak.ml +++ /dev/null @@ -1,336 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Damien Doligez, projet Para, INRIA Rocquencourt *) -(* *) -(* Copyright 1997 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Weak array operations *) - -type 'a t - -external create : int -> 'a t = "caml_weak_create" - -(** number of additional values in a weak pointer *) -let additional_values = 2 - -let length x = Obj.size(Obj.repr x) - additional_values - -external set : 'a t -> int -> 'a option -> unit = "caml_weak_set" -external get : 'a t -> int -> 'a option = "caml_weak_get" -external get_copy : 'a t -> int -> 'a option = "caml_weak_get_copy" -external check : 'a t -> int -> bool = "caml_weak_check" -external blit : 'a t -> int -> 'a t -> int -> int -> unit = "caml_weak_blit" -(* blit: src srcoff dst dstoff len *) - -let fill ar ofs len x = - if ofs < 0 || len < 0 || ofs + len > length ar - then raise (Invalid_argument "Weak.fill") - else begin - for i = ofs to (ofs + len - 1) do - set ar i x - done - end - - -(** Weak hash tables *) - -module type S = sig - type data - type t - val create : int -> t - val clear : t -> unit - val merge : t -> data -> data - val add : t -> data -> unit - val remove : t -> data -> unit - val find : t -> data -> data - val find_opt : t -> data -> data option - val find_all : t -> data -> data list - val mem : t -> data -> bool - val iter : (data -> unit) -> t -> unit - val fold : (data -> 'a -> 'a) -> t -> 'a -> 'a - val count : t -> int - val stats : t -> int * int * int * int * int * int -end - -module Make (H : Hashtbl.HashedType) : (S with type data = H.t) = struct - - type 'a weak_t = 'a t - let weak_create = create - let emptybucket = weak_create 0 - - type data = H.t - - type t = { - mutable table : data weak_t array; - mutable hashes : int array array; - mutable limit : int; (* bucket size limit *) - mutable oversize : int; (* number of oversize buckets *) - mutable rover : int; (* for internal bookkeeping *) - } - - let get_index t h = (h land max_int) mod (Array.length t.table) - - let limit = 7 - let over_limit = 2 - - let create sz = - let sz = if sz < 7 then 7 else sz in - let sz = if sz > Sys.max_array_length then Sys.max_array_length else sz in - { - table = Array.make sz emptybucket; - hashes = Array.make sz [| |]; - limit = limit; - oversize = 0; - rover = 0; - } - - let clear t = - for i = 0 to Array.length t.table - 1 do - t.table.(i) <- emptybucket; - t.hashes.(i) <- [| |]; - done; - t.limit <- limit; - t.oversize <- 0 - - - let fold f t init = - let rec fold_bucket i b accu = - if i >= length b then accu else - match get b i with - | Some v -> fold_bucket (i+1) b (f v accu) - | None -> fold_bucket (i+1) b accu - in - Array.fold_right (fold_bucket 0) t.table init - - - let iter f t = - let rec iter_bucket i b = - if i >= length b then () else - match get b i with - | Some v -> f v; iter_bucket (i+1) b - | None -> iter_bucket (i+1) b - in - Array.iter (iter_bucket 0) t.table - - - let iter_weak f t = - let rec iter_bucket i j b = - if i >= length b then () else - match check b i with - | true -> f b t.hashes.(j) i; iter_bucket (i+1) j b - | false -> iter_bucket (i+1) j b - in - Array.iteri (iter_bucket 0) t.table - - - let rec count_bucket i b accu = - if i >= length b then accu else - count_bucket (i+1) b (accu + (if check b i then 1 else 0)) - - - let count t = - Array.fold_right (count_bucket 0) t.table 0 - - - let next_sz n = min (3 * n / 2 + 3) Sys.max_array_length - let prev_sz n = ((n - 3) * 2 + 2) / 3 - - let test_shrink_bucket t = - let bucket = t.table.(t.rover) in - let hbucket = t.hashes.(t.rover) in - let len = length bucket in - let prev_len = prev_sz len in - let live = count_bucket 0 bucket 0 in - if live <= prev_len then begin - let rec loop i j = - if j >= prev_len then begin - if check bucket i then loop (i + 1) j - else if check bucket j then begin - blit bucket j bucket i 1; - hbucket.(i) <- hbucket.(j); - loop (i + 1) (j - 1); - end else loop i (j - 1); - end; - in - loop 0 (length bucket - 1); - if prev_len = 0 then begin - t.table.(t.rover) <- emptybucket; - t.hashes.(t.rover) <- [| |]; - end else begin - Obj.truncate (Obj.repr bucket) (prev_len + additional_values); - Obj.truncate (Obj.repr hbucket) prev_len; - end; - if len > t.limit && prev_len <= t.limit then t.oversize <- t.oversize - 1; - end; - t.rover <- (t.rover + 1) mod (Array.length t.table) - - - let rec resize t = - let oldlen = Array.length t.table in - let newlen = next_sz oldlen in - if newlen > oldlen then begin - let newt = create newlen in - let add_weak ob oh oi = - let setter nb ni _ = blit ob oi nb ni 1 in - let h = oh.(oi) in - add_aux newt setter None h (get_index newt h); - in - iter_weak add_weak t; - t.table <- newt.table; - t.hashes <- newt.hashes; - t.limit <- newt.limit; - t.oversize <- newt.oversize; - t.rover <- t.rover mod Array.length newt.table; - end else begin - t.limit <- max_int; (* maximum size already reached *) - t.oversize <- 0; - end - - and add_aux t setter d h index = - let bucket = t.table.(index) in - let hashes = t.hashes.(index) in - let sz = length bucket in - let rec loop i = - if i >= sz then begin - let newsz = - min (3 * sz / 2 + 3) (Sys.max_array_length - additional_values) - in - if newsz <= sz then failwith "Weak.Make: hash bucket cannot grow more"; - let newbucket = weak_create newsz in - let newhashes = Array.make newsz 0 in - blit bucket 0 newbucket 0 sz; - Array.blit hashes 0 newhashes 0 sz; - setter newbucket sz d; - newhashes.(sz) <- h; - t.table.(index) <- newbucket; - t.hashes.(index) <- newhashes; - if sz <= t.limit && newsz > t.limit then begin - t.oversize <- t.oversize + 1; - for _i = 0 to over_limit do test_shrink_bucket t done; - end; - if t.oversize > Array.length t.table / over_limit then resize t; - end else if check bucket i then begin - loop (i + 1) - end else begin - setter bucket i d; - hashes.(i) <- h; - end; - in - loop 0 - - - let add t d = - let h = H.hash d in - add_aux t set (Some d) h (get_index t h) - - - let find_or t d ifnotfound = - let h = H.hash d in - let index = get_index t h in - let bucket = t.table.(index) in - let hashes = t.hashes.(index) in - let sz = length bucket in - let rec loop i = - if i >= sz then ifnotfound h index - else if h = hashes.(i) then begin - match get_copy bucket i with - | Some v when H.equal v d - -> begin match get bucket i with - | Some v -> v - | None -> loop (i + 1) - end - | _ -> loop (i + 1) - end else loop (i + 1) - in - loop 0 - - - let merge t d = - find_or t d (fun h index -> add_aux t set (Some d) h index; d) - - - let find t d = find_or t d (fun _h _index -> raise Not_found) - - let find_opt t d = - let h = H.hash d in - let index = get_index t h in - let bucket = t.table.(index) in - let hashes = t.hashes.(index) in - let sz = length bucket in - let rec loop i = - if i >= sz then None - else if h = hashes.(i) then begin - match get_copy bucket i with - | Some v when H.equal v d - -> begin match get bucket i with - | Some _ as v -> v - | None -> loop (i + 1) - end - | _ -> loop (i + 1) - end else loop (i + 1) - in - loop 0 - - - let find_shadow t d iffound ifnotfound = - let h = H.hash d in - let index = get_index t h in - let bucket = t.table.(index) in - let hashes = t.hashes.(index) in - let sz = length bucket in - let rec loop i = - if i >= sz then ifnotfound - else if h = hashes.(i) then begin - match get_copy bucket i with - | Some v when H.equal v d -> iffound bucket i - | _ -> loop (i + 1) - end else loop (i + 1) - in - loop 0 - - - let remove t d = find_shadow t d (fun w i -> set w i None) () - - - let mem t d = find_shadow t d (fun _w _i -> true) false - - - let find_all t d = - let h = H.hash d in - let index = get_index t h in - let bucket = t.table.(index) in - let hashes = t.hashes.(index) in - let sz = length bucket in - let rec loop i accu = - if i >= sz then accu - else if h = hashes.(i) then begin - match get_copy bucket i with - | Some v when H.equal v d - -> begin match get bucket i with - | Some v -> loop (i + 1) (v :: accu) - | None -> loop (i + 1) accu - end - | _ -> loop (i + 1) accu - end else loop (i + 1) accu - in - loop 0 [] - - - let stats t = - let len = Array.length t.table in - let lens = Array.map length t.table in - Array.sort compare lens; - let totlen = Array.fold_left ( + ) 0 lens in - (len, count t, totlen, lens.(0), lens.(len/2), lens.(len-1)) - - -end diff --git a/analysis/vendor/compiler-libs-406/weak.mli b/analysis/vendor/compiler-libs-406/weak.mli deleted file mode 100644 index 842520aa1..000000000 --- a/analysis/vendor/compiler-libs-406/weak.mli +++ /dev/null @@ -1,185 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Damien Doligez, projet Para, INRIA Rocquencourt *) -(* *) -(* Copyright 1997 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -(** Arrays of weak pointers and hash sets of weak pointers. *) - - -(** {1 Low-level functions} *) - -type 'a t -(** The type of arrays of weak pointers (weak arrays). A weak - pointer is a value that the garbage collector may erase whenever - the value is not used any more (through normal pointers) by the - program. Note that finalisation functions are run after the - weak pointers are erased. - - A weak pointer is said to be full if it points to a value, - empty if the value was erased by the GC. - - Notes: - - Integers are not allocated and cannot be stored in weak arrays. - - Weak arrays cannot be marshaled using {!Pervasives.output_value} - nor the functions of the {!Marshal} module. -*) - - -val create : int -> 'a t -(** [Weak.create n] returns a new weak array of length [n]. - All the pointers are initially empty. Raise [Invalid_argument] - if [n] is negative or greater than {!Sys.max_array_length}[-1].*) - -val length : 'a t -> int -(** [Weak.length ar] returns the length (number of elements) of - [ar].*) - -val set : 'a t -> int -> 'a option -> unit -(** [Weak.set ar n (Some el)] sets the [n]th cell of [ar] to be a - (full) pointer to [el]; [Weak.set ar n None] sets the [n]th - cell of [ar] to empty. - Raise [Invalid_argument "Weak.set"] if [n] is not in the range - 0 to {!Weak.length}[ a - 1].*) - -val get : 'a t -> int -> 'a option -(** [Weak.get ar n] returns None if the [n]th cell of [ar] is - empty, [Some x] (where [x] is the value) if it is full. - Raise [Invalid_argument "Weak.get"] if [n] is not in the range - 0 to {!Weak.length}[ a - 1].*) - -val get_copy : 'a t -> int -> 'a option -(** [Weak.get_copy ar n] returns None if the [n]th cell of [ar] is - empty, [Some x] (where [x] is a (shallow) copy of the value) if - it is full. - In addition to pitfalls with mutable values, the interesting - difference with [get] is that [get_copy] does not prevent - the incremental GC from erasing the value in its current cycle - ([get] may delay the erasure to the next GC cycle). - Raise [Invalid_argument "Weak.get"] if [n] is not in the range - 0 to {!Weak.length}[ a - 1]. - - If the element is a custom block it is not copied. - -*) - - -val check : 'a t -> int -> bool -(** [Weak.check ar n] returns [true] if the [n]th cell of [ar] is - full, [false] if it is empty. Note that even if [Weak.check ar n] - returns [true], a subsequent {!Weak.get}[ ar n] can return [None].*) - -val fill : 'a t -> int -> int -> 'a option -> unit -(** [Weak.fill ar ofs len el] sets to [el] all pointers of [ar] from - [ofs] to [ofs + len - 1]. Raise [Invalid_argument "Weak.fill"] - if [ofs] and [len] do not designate a valid subarray of [a].*) - -val blit : 'a t -> int -> 'a t -> int -> int -> unit -(** [Weak.blit ar1 off1 ar2 off2 len] copies [len] weak pointers - from [ar1] (starting at [off1]) to [ar2] (starting at [off2]). - It works correctly even if [ar1] and [ar2] are the same. - Raise [Invalid_argument "Weak.blit"] if [off1] and [len] do - not designate a valid subarray of [ar1], or if [off2] and [len] - do not designate a valid subarray of [ar2].*) - - -(** {1 Weak hash sets} *) - -(** A weak hash set is a hashed set of values. Each value may - magically disappear from the set when it is not used by the - rest of the program any more. This is normally used to share - data structures without inducing memory leaks. - Weak hash sets are defined on values from a {!Hashtbl.HashedType} - module; the [equal] relation and [hash] function are taken from that - module. We will say that [v] is an instance of [x] if [equal x v] - is [true]. - - The [equal] relation must be able to work on a shallow copy of - the values and give the same result as with the values themselves. - *) - -module type S = sig - type data - (** The type of the elements stored in the table. *) - - type t - (** The type of tables that contain elements of type [data]. - Note that weak hash sets cannot be marshaled using - {!Pervasives.output_value} or the functions of the {!Marshal} - module. *) - - val create : int -> t - (** [create n] creates a new empty weak hash set, of initial - size [n]. The table will grow as needed. *) - - val clear : t -> unit - (** Remove all elements from the table. *) - - val merge : t -> data -> data - (** [merge t x] returns an instance of [x] found in [t] if any, - or else adds [x] to [t] and return [x]. *) - - val add : t -> data -> unit - (** [add t x] adds [x] to [t]. If there is already an instance - of [x] in [t], it is unspecified which one will be - returned by subsequent calls to [find] and [merge]. *) - - val remove : t -> data -> unit - (** [remove t x] removes from [t] one instance of [x]. Does - nothing if there is no instance of [x] in [t]. *) - - val find : t -> data -> data - (** [find t x] returns an instance of [x] found in [t]. - Raise [Not_found] if there is no such element. *) - - val find_opt: t -> data -> data option - (** [find_opt t x] returns an instance of [x] found in [t] - or [None] if there is no such element. - @since 4.05 - *) - - val find_all : t -> data -> data list - (** [find_all t x] returns a list of all the instances of [x] - found in [t]. *) - - val mem : t -> data -> bool - (** [mem t x] returns [true] if there is at least one instance - of [x] in [t], false otherwise. *) - - val iter : (data -> unit) -> t -> unit - (** [iter f t] calls [f] on each element of [t], in some unspecified - order. It is not specified what happens if [f] tries to change - [t] itself. *) - - val fold : (data -> 'a -> 'a) -> t -> 'a -> 'a - (** [fold f t init] computes [(f d1 (... (f dN init)))] where - [d1 ... dN] are the elements of [t] in some unspecified order. - It is not specified what happens if [f] tries to change [t] - itself. *) - - val count : t -> int - (** Count the number of elements in the table. [count t] gives the - same result as [fold (fun _ n -> n+1) t 0] but does not delay the - deallocation of the dead elements. *) - - val stats : t -> int * int * int * int * int * int - (** Return statistics on the table. The numbers are, in order: - table length, number of entries, sum of bucket lengths, - smallest bucket length, median bucket length, biggest bucket length. *) -end -(** The output signature of the functor {!Weak.Make}. *) - -module Make (H : Hashtbl.HashedType) : S with type data = H.t -(** Functor building an implementation of the weak hash set structure. - [H.equal] can't be the physical equality, since only shallow - copies of the elements in the set are given to it. - *) diff --git a/analysis/vendor/dune b/analysis/vendor/dune index c4e8b807b..5d23f6980 100644 --- a/analysis/vendor/dune +++ b/analysis/vendor/dune @@ -1 +1 @@ -(dirs compiler-libs-406 ext res_outcome_printer json) +(dirs compiler-libs-406 ext ml res_outcome_printer json) diff --git a/analysis/vendor/ext/README.md b/analysis/vendor/ext/README.md new file mode 100644 index 000000000..b4a1edaea --- /dev/null +++ b/analysis/vendor/ext/README.md @@ -0,0 +1 @@ +This folder hosts some of the utils we use in ReScript, internally. diff --git a/analysis/vendor/ext/bs_hash_stubs.ml b/analysis/vendor/ext/bs_hash_stubs.ml new file mode 100644 index 000000000..6a59fe51e --- /dev/null +++ b/analysis/vendor/ext/bs_hash_stubs.ml @@ -0,0 +1,40 @@ + +#ifdef BROWSER + + +let hash_string : string -> int = Hashtbl.hash +let hash_string_int s i = Hashtbl.hash (s,i) +let hash_string_small_int : string -> int -> int = hash_string_int +let hash_stamp_and_name (i:int) (s:string) = Hashtbl.hash(i,s) +let hash_int (i:int) = Hashtbl.hash i +let string_length_based_compare (x : string ) (y : string) = + let len1 = String.length x in + let len2 = String.length y in + if len1 = len2 then String.compare x y + else compare (len1:int) len2 +let int_unsafe_blit: int array -> int -> int array -> int -> int -> unit = + Array.blit + +#else +external hash_string : string -> int = "caml_bs_hash_string" [@@noalloc];; + +external hash_string_int : string -> int -> int = "caml_bs_hash_string_and_int" [@@noalloc];; + +external hash_string_small_int : string -> int -> int = "caml_bs_hash_string_and_small_int" [@@noalloc];; + +external hash_stamp_and_name : int -> string -> int = "caml_bs_hash_stamp_and_name" [@@noalloc];; + +external hash_small_int : int -> int = "caml_bs_hash_small_int" [@@noalloc];; + +external hash_int : int -> int = "caml_bs_hash_int" [@@noalloc];; + +external string_length_based_compare : string -> string -> int = "caml_string_length_based_compare" [@@noalloc];; + +external + int_unsafe_blit : + int array -> int -> int array -> int -> int -> unit = "caml_int_array_blit" [@@noalloc];; + +external set_as_old_file : string -> unit = "caml_stale_file" +#endif + + diff --git a/analysis/vendor/compiler-libs-406/bsb_db_decode.mli b/analysis/vendor/ext/bsb_db.ml similarity index 70% rename from analysis/vendor/compiler-libs-406/bsb_db_decode.mli rename to analysis/vendor/ext/bsb_db.ml index c19c6c18b..001824a5f 100644 --- a/analysis/vendor/compiler-libs-406/bsb_db_decode.mli +++ b/analysis/vendor/ext/bsb_db.ml @@ -1,4 +1,4 @@ -(* Copyright (C) 2019 - Present Authors of BuckleScript +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -22,37 +22,28 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +type case = bool +(** true means upper case*) - - -type t +type info = + | Intf + (* intemediate state *) + | Impl + | Impl_intf -type group = { - modules : string array ; - dir_length : int ; - dir_info_offset : int ; - module_info_offset : int ; - } - -(* exposed only for testing *) -val decode_internal : - string -> - int ref -> - group array - - - -val read_build_file : filename:string -> group array +type syntax_kind = Ml | Res +type module_info = { + mutable info : info; + dir : string; + syntax_kind : syntax_kind; + case : bool; + name_sans_extension : string; +} +type map = module_info Map_string.t -type module_info = { - case : bool (* Bsb_db.case*); - dir_name : string -} +type 'a cat = { mutable lib : 'a; mutable dev : 'a } -val find_opt : - t -> (* contains global info *) - int -> (* more likely to be zero *) - string -> (* module name *) - module_info option \ No newline at end of file +type t = map cat +(** indexed by the group *) diff --git a/analysis/vendor/ext/bsb_db.mli b/analysis/vendor/ext/bsb_db.mli new file mode 100644 index 000000000..31df8b685 --- /dev/null +++ b/analysis/vendor/ext/bsb_db.mli @@ -0,0 +1,67 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(** Store a file called [.bsbuild] that can be communicated + between [bsb.exe] and [bsb_helper.exe]. + [bsb.exe] stores such data which would be retrieved by + [bsb_helper.exe]. It is currently used to combine with + ocamldep to figure out which module->file it depends on +*) + +type case = bool + +type info = + | Intf + (* intemediate state *) + | Impl + | Impl_intf + +type syntax_kind = Ml | Res + +type module_info = { + mutable info : info; + dir : string; + syntax_kind : syntax_kind; + (* This is actually not stored in bsbuild meta info + since creating .d file only emit .cmj/.cmi dependencies, so it does not + need know which syntax it is written + *) + case : bool; + name_sans_extension : string; +} + +type map = module_info Map_string.t + +type 'a cat = { mutable lib : 'a; mutable dev : 'a } + +type t = map cat + +(** store the meta data indexed by {!Bsb_dir_index} + {[ + 0 --> lib group + 1 --> dev 1 group + . + + ]} +*) diff --git a/analysis/vendor/ext/bsc_args.ml b/analysis/vendor/ext/bsc_args.ml new file mode 100644 index 000000000..721c191c6 --- /dev/null +++ b/analysis/vendor/ext/bsc_args.ml @@ -0,0 +1,131 @@ +(* Copyright (C) 2020- Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type anon_fun = rev_args:string list -> unit + +type string_action = + | String_call of (string -> unit) + | String_set of string ref + | String_optional_set of string option ref + | String_list_add of string list ref + +type unit_action = + | Unit_call of (unit -> unit) + | Unit_lazy of unit lazy_t + | Unit_set of bool ref + | Unit_clear of bool ref + +type spec = Unit_dummy | Unit of unit_action | String of string_action + +exception Bad = Arg.Bad + +let bad_arg s = raise_notrace (Bad s) + +type error = Unknown of string | Missing of string + +type t = spec Ext_spec.t + +let ( +> ) = Ext_buffer.add_string + +let usage_b (buf : Ext_buffer.t) ~usage (speclist : t) = + buf +> usage; + buf +> "\nOptions:\n"; + let max_col = ref 0 in + Ext_array.iter speclist (fun (key, _, _) -> + if String.length key > !max_col then max_col := String.length key); + Ext_array.iter speclist (fun (key, _, doc) -> + if not (Ext_string.starts_with doc "*internal*") then ( + buf +> " "; + buf +> key; + buf +> String.make (!max_col - String.length key + 2) ' '; + let cur = ref 0 in + let doc_length = String.length doc in + while !cur < doc_length do + match String.index_from_opt doc !cur '\n' with + | None -> + if !cur <> 0 then ( + buf +> "\n"; + buf +> String.make (!max_col + 4) ' '); + buf +> String.sub doc !cur (String.length doc - !cur); + cur := doc_length + | Some new_line_pos -> + if !cur <> 0 then ( + buf +> "\n"; + buf +> String.make (!max_col + 4) ' '); + buf +> String.sub doc !cur (new_line_pos - !cur); + cur := new_line_pos + 1 + done; + buf +> "\n")) + +let stop_raise ~usage ~(error : error) (speclist : t) = + let b = Ext_buffer.create 200 in + (match error with + | Unknown ("-help" | "--help" | "-h") -> + usage_b b ~usage speclist; + Ext_buffer.output_buffer stdout b; + exit 0 + | Unknown s -> + b +> "unknown option: '"; + b +> s; + b +> "'.\n" + | Missing s -> + b +> "option '"; + b +> s; + b +> "' needs an argument.\n"); + usage_b b ~usage speclist; + bad_arg (Ext_buffer.contents b) + +let parse_exn ~usage ~argv ?(start = 1) ?(finish = Array.length argv) + (speclist : t) (anonfun : rev_args:string list -> unit) = + let current = ref start in + let rev_list = ref [] in + while !current < finish do + let s = argv.(!current) in + incr current; + if s <> "" && s.[0] = '-' then + match Ext_spec.assoc3 speclist s with + | Some action -> ( + match action with + | Unit_dummy -> () + | Unit r -> ( + match r with + | Unit_set r -> r := true + | Unit_clear r -> r := false + | Unit_call f -> f () + | Unit_lazy f -> Lazy.force f) + | String f -> ( + if !current >= finish then + stop_raise ~usage ~error:(Missing s) speclist + else + let arg = argv.(!current) in + incr current; + match f with + | String_call f -> f arg + | String_set u -> u := arg + | String_optional_set s -> s := Some arg + | String_list_add s -> s := arg :: !s)) + | None -> stop_raise ~usage ~error:(Unknown s) speclist + else rev_list := s :: !rev_list + done; + anonfun ~rev_args:!rev_list diff --git a/analysis/vendor/ext/bsc_args.mli b/analysis/vendor/ext/bsc_args.mli new file mode 100644 index 000000000..05bf9e66c --- /dev/null +++ b/analysis/vendor/ext/bsc_args.mli @@ -0,0 +1,54 @@ +(* Copyright (C) 2020- Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type anon_fun = rev_args:string list -> unit + +type string_action = + | String_call of (string -> unit) + | String_set of string ref + | String_optional_set of string option ref + | String_list_add of string list ref + +type unit_action = + | Unit_call of (unit -> unit) + | Unit_lazy of unit lazy_t + | Unit_set of bool ref + | Unit_clear of bool ref + +type spec = Unit_dummy | Unit of unit_action | String of string_action + +type t = (string * spec * string) array + +exception Bad of string + +val bad_arg : string -> 'a + +val parse_exn : + usage:string -> + argv:string array -> + ?start:int -> + ?finish:int -> + t -> + (rev_args:string list -> unit) -> + unit diff --git a/analysis/vendor/compiler-libs-406/bsc_warnings.ml b/analysis/vendor/ext/bsc_warnings.ml similarity index 97% rename from analysis/vendor/compiler-libs-406/bsc_warnings.ml rename to analysis/vendor/ext/bsc_warnings.ml index 1dc1fe285..833b46443 100644 --- a/analysis/vendor/compiler-libs-406/bsc_warnings.ml +++ b/analysis/vendor/ext/bsc_warnings.ml @@ -22,8 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - - (** See the meanings of the warning codes here: https://caml.inria.fr/pub/docs/manual-ocaml/comp.html#sec281 @@ -40,8 +38,7 @@ - 45 Open statement shadows an already defined label or constructor. - 48 Implicit elimination of optional arguments. https://caml.inria.fr/mantis/view.php?id=6352 - 101 (bsb-specific) unsafe polymorphic comparison. -*) - +*) (* The purpose of default warning set is to make it strict while @@ -73,5 +70,6 @@ - 102 Bs_polymorphic_comparison *) let defaults_w = "+a-4-9-20-40-41-42-50-61-102" -let defaults_warn_error = "-a+5+6+101+109";; -(*TODO: add +10*) \ No newline at end of file + +let defaults_warn_error = "-a+5+6+101+109" +(*TODO: add +10*) diff --git a/analysis/vendor/ext/config.ml b/analysis/vendor/ext/config.ml new file mode 100644 index 000000000..2b181a608 --- /dev/null +++ b/analysis/vendor/ext/config.ml @@ -0,0 +1,45 @@ +let version = "4.06.1+BS" + +let standard_library = + let ( // ) = Filename.concat in + Filename.dirname Sys.executable_name + // Filename.parent_dir_name // "lib" // "ocaml" + +let standard_library_default = standard_library + +let syntax_kind = ref `ml + +let bs_only = ref true + +let unsafe_empty_array = ref false + +let use_automatic_curried_application = ref false + +and cmi_magic_number = "Caml1999I022" + +and ast_impl_magic_number = "Caml1999M022" + +and ast_intf_magic_number = "Caml1999N022" + +and cmt_magic_number = "Caml1999T022" + +let load_path = ref ([] : string list) + +let interface_suffix = ref ".mli" + +(* This is normally the same as in obj.ml, but we have to define it + separately because it can differ when we're in the middle of a + bootstrapping phase. *) + +let print_config oc = + let p name valu = Printf.fprintf oc "%s: %s\n" name valu in + p "version" version; + p "standard_library_default" standard_library_default; + p "standard_library" standard_library; + + (* print the magic number *) + p "cmi_magic_number" cmi_magic_number; + p "ast_impl_magic_number" ast_impl_magic_number; + p "ast_intf_magic_number" ast_intf_magic_number; + p "cmt_magic_number" cmt_magic_number; + flush oc diff --git a/analysis/vendor/compiler-libs-406/callback.mli b/analysis/vendor/ext/config.mli similarity index 54% rename from analysis/vendor/compiler-libs-406/callback.mli rename to analysis/vendor/ext/config.mli index 27c8b5004..3c3a78fd6 100644 --- a/analysis/vendor/compiler-libs-406/callback.mli +++ b/analysis/vendor/ext/config.mli @@ -13,22 +13,38 @@ (* *) (**************************************************************************) -(** Registering OCaml values with the C runtime. - - This module allows OCaml values to be registered with the C runtime - under a symbolic name, so that C code can later call back registered - OCaml functions, or raise registered OCaml exceptions. -*) - -val register : string -> 'a -> unit -(** [Callback.register n v] registers the value [v] under - the name [n]. C code can later retrieve a handle to [v] - by calling [caml_named_value(n)]. *) - -val register_exception : string -> exn -> unit -(** [Callback.register_exception n exn] registers the - exception contained in the exception value [exn] - under the name [n]. C code can later retrieve a handle to - the exception by calling [caml_named_value(n)]. The exception - value thus obtained is suitable for passing as first argument - to [raise_constant] or [raise_with_arg]. *) +(* System configuration *) + +val version : string +(* The current version number of the system *) + +val standard_library : string +(* The directory containing the standard libraries *) + +val syntax_kind : [ `ml | `rescript ] ref + +val bs_only : bool ref + +val unsafe_empty_array : bool ref + +val load_path : string list ref +(* Directories in the search path for .cmi and .cmo files *) + +val interface_suffix : string ref +(* Suffix for interface file names *) + +val cmi_magic_number : string + +(* Magic number for compiled interface files *) +val ast_intf_magic_number : string + +(* Magic number for file holding an interface syntax tree *) +val ast_impl_magic_number : string + +(* Magic number for file holding an implementation syntax tree *) +val cmt_magic_number : string +(* Magic number for compiled interface files *) + +val print_config : out_channel -> unit + +val use_automatic_curried_application : bool ref \ No newline at end of file diff --git a/analysis/vendor/ext/dune b/analysis/vendor/ext/dune index fdacc5d36..78f08fc33 100644 --- a/analysis/vendor/ext/dune +++ b/analysis/vendor/ext/dune @@ -1,4 +1,121 @@ (library (name ext) - (flags -w "") - (libraries)) +; (wrapped false) + (preprocess + (action + (run %{bin:cppo} %{env:CPPO_FLAGS=} %{input-file}))) + (flags + (:standard -w +a-4-42-40-9-48-70)) + (foreign_stubs + (language c) + (names ext_basic_hash_stubs))) + +(ocamllex ext_json_parse) + +(rule + (targets hash_set_string.ml) + (deps hash_set.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_STRING %{deps} -o %{targets}))) + +(rule + (targets hash_set_int.ml) + (deps hash_set.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_INT %{deps} -o %{targets}))) + +(rule + (targets hash_set_ident.ml) + (deps hash_set.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_IDENT %{deps} -o %{targets}))) + +(rule + (targets hash_set.ml) + (deps hash_set.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_FUNCTOR %{deps} -o %{targets}))) + +(rule + (targets hash_set_poly.ml) + (deps hash_set.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_POLY %{deps} -o %{targets}))) + +(rule + (targets vec_int.ml) + (deps vec.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_INT %{deps} -o %{targets}))) + +(rule + (targets vec.ml) + (deps vec.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_FUNCTOR %{deps} -o %{targets}))) + +(rule + (targets set_string.ml) + (deps set.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_STRING %{deps} -o %{targets}))) + +(rule + (targets set_int.ml) + (deps set.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_INT %{deps} -o %{targets}))) + +(rule + (targets set_ident.ml) + (deps set.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_IDENT %{deps} -o %{targets}))) + +(rule + (targets map_string.ml) + (deps map.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_STRING %{deps} -o %{targets}))) + +(rule + (targets map_int.ml) + (deps map.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_INT %{deps} -o %{targets}))) + +(rule + (targets map_ident.ml) + (deps map.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_IDENT %{deps} -o %{targets}))) + +(rule + (targets ordered_hash_map_local_ident.ml) + (deps ordered_hash_map.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_LOCAL_IDENT %{deps} -o %{targets}))) + +(rule + (targets hash_string.ml) + (deps hash.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_STRING %{deps} -o %{targets}))) + +(rule + (targets hash_int.ml) + (deps hash.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_INT %{deps} -o %{targets}))) + +(rule + (targets hash_ident.ml) + (deps hash.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_IDENT %{deps} -o %{targets}))) + +(rule + (targets hash.ml) + (deps hash.cppo.ml) + (action + (run %{bin:cppo} -D TYPE_FUNCTOR %{deps} -o %{targets}))) diff --git a/analysis/vendor/ext/encoding.md b/analysis/vendor/ext/encoding.md new file mode 100644 index 000000000..59228c029 --- /dev/null +++ b/analysis/vendor/ext/encoding.md @@ -0,0 +1,42 @@ + + + + + + +```c +CAMLprim value caml_ml_string_length(value s) +{ + mlsize_t temp; + temp = Bosize_val(s) - 1; + Assert (Byte (s, temp - Byte (s, temp)) == 0); + return Val_long(temp - Byte (s, temp)); +} +``` + +Like all heap blocks, strings contain a header defining the size of +the string in machine words. The actual block contents are: +- the characters of the string +- padding bytes to align the block on a word boundary. + The padding is one of + 00 + 00 01 + 00 00 02 + 00 00 00 03 + on a 32-bit machine, and up to 00 00 .... 07 on a 64-bit machine. + +Thus, the string is always zero-terminated, and its length can be +computed as follows: + + number_of_words_in_block * sizeof(word) - last_byte_of_block - 1 + +The null-termination comes handy when passing a string to C, but is +not relied upon to compute the length (in Caml), allowing the string +to contain nulls. + +so, suppose + +"" -> `8 - 7 - 1 ` +"a" -> `8 - 6 - 1` +"0123456" -> `8 - 0 - 1` +"01234567" -> `2 * 8 - 7 - 1` \ No newline at end of file diff --git a/analysis/vendor/ext/ext_array.ml b/analysis/vendor/ext/ext_array.ml new file mode 100644 index 000000000..0f3f1a75d --- /dev/null +++ b/analysis/vendor/ext/ext_array.ml @@ -0,0 +1,255 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +external ( .!() ) : 'a array -> int -> 'a = "%array_unsafe_get" + +external ( .!()<- ) : 'a array -> int -> 'a -> unit = "%array_unsafe_set" + +let reverse_range a i len = + if len = 0 then () + else + for k = 0 to (len - 1) / 2 do + let t = a.!(i + k) in + a.!(i + k) <- a.!(i + len - 1 - k); + a.!(i + len - 1 - k) <- t + done + +let reverse_in_place a = reverse_range a 0 (Array.length a) + +let reverse a = + let b_len = Array.length a in + if b_len = 0 then [||] + else + let b = Array.copy a in + for i = 0 to b_len - 1 do + Array.unsafe_set b i (Array.unsafe_get a (b_len - 1 - i)) + done; + b + +let reverse_of_list = function + | [] -> [||] + | hd :: tl -> + let len = List.length tl in + let a = Array.make (len + 1) hd in + let rec fill i = function + | [] -> a + | hd :: tl -> + Array.unsafe_set a i hd; + fill (i - 1) tl + in + fill (len - 1) tl + +let filter a f = + let arr_len = Array.length a in + let rec aux acc i = + if i = arr_len then reverse_of_list acc + else + let v = Array.unsafe_get a i in + if f v then aux (v :: acc) (i + 1) else aux acc (i + 1) + in + aux [] 0 + +let filter_map a (f : _ -> _ option) = + let arr_len = Array.length a in + let rec aux acc i = + if i = arr_len then reverse_of_list acc + else + let v = Array.unsafe_get a i in + match f v with Some v -> aux (v :: acc) (i + 1) | None -> aux acc (i + 1) + in + aux [] 0 + +let range from to_ = + if from > to_ then invalid_arg "Ext_array.range" + else Array.init (to_ - from + 1) (fun i -> i + from) + +let map2i f a b = + let len = Array.length a in + if len <> Array.length b then invalid_arg "Ext_array.map2i" + else Array.mapi (fun i a -> f i a (Array.unsafe_get b i)) a + +let rec tolist_f_aux a f i res = + if i < 0 then res + else + let v = Array.unsafe_get a i in + tolist_f_aux a f (i - 1) (f v :: res) + +let to_list_f a f = tolist_f_aux a f (Array.length a - 1) [] + +let rec tolist_aux a f i res = + if i < 0 then res + else + tolist_aux a f (i - 1) + (match f a.!(i) with Some v -> v :: res | None -> res) + +let to_list_map a f = tolist_aux a f (Array.length a - 1) [] + +let to_list_map_acc a acc f = tolist_aux a f (Array.length a - 1) acc + +let of_list_map a f = + match a with + | [] -> [||] + | [ a0 ] -> + let b0 = f a0 in + [| b0 |] + | [ a0; a1 ] -> + let b0 = f a0 in + let b1 = f a1 in + [| b0; b1 |] + | [ a0; a1; a2 ] -> + let b0 = f a0 in + let b1 = f a1 in + let b2 = f a2 in + [| b0; b1; b2 |] + | [ a0; a1; a2; a3 ] -> + let b0 = f a0 in + let b1 = f a1 in + let b2 = f a2 in + let b3 = f a3 in + [| b0; b1; b2; b3 |] + | [ a0; a1; a2; a3; a4 ] -> + let b0 = f a0 in + let b1 = f a1 in + let b2 = f a2 in + let b3 = f a3 in + let b4 = f a4 in + [| b0; b1; b2; b3; b4 |] + | a0 :: a1 :: a2 :: a3 :: a4 :: tl -> + let b0 = f a0 in + let b1 = f a1 in + let b2 = f a2 in + let b3 = f a3 in + let b4 = f a4 in + let len = List.length tl + 5 in + let arr = Array.make len b0 in + Array.unsafe_set arr 1 b1; + Array.unsafe_set arr 2 b2; + Array.unsafe_set arr 3 b3; + Array.unsafe_set arr 4 b4; + let rec fill i = function + | [] -> arr + | hd :: tl -> + Array.unsafe_set arr i (f hd); + fill (i + 1) tl + in + fill 5 tl + +(** + {[ + # rfind_with_index [|1;2;3|] (=) 2;; + - : int = 1 + # rfind_with_index [|1;2;3|] (=) 1;; + - : int = 0 + # rfind_with_index [|1;2;3|] (=) 3;; + - : int = 2 + # rfind_with_index [|1;2;3|] (=) 4;; + - : int = -1 + ]} +*) +let rfind_with_index arr cmp v = + let len = Array.length arr in + let rec aux i = + if i < 0 then i + else if cmp (Array.unsafe_get arr i) v then i + else aux (i - 1) + in + aux (len - 1) + +type 'a split = No_split | Split of 'a array * 'a array + +let find_with_index arr cmp v = + let len = Array.length arr in + let rec aux i len = + if i >= len then -1 + else if cmp (Array.unsafe_get arr i) v then i + else aux (i + 1) len + in + aux 0 len + +let find_and_split arr cmp v : _ split = + let i = find_with_index arr cmp v in + if i < 0 then No_split + else + Split (Array.sub arr 0 i, Array.sub arr (i + 1) (Array.length arr - i - 1)) + +(** TODO: available since 4.03, use {!Array.exists} *) + +let exists a p = + let n = Array.length a in + let rec loop i = + if i = n then false + else if p (Array.unsafe_get a i) then true + else loop (succ i) + in + loop 0 + +let is_empty arr = Array.length arr = 0 + +let rec unsafe_loop index len p xs ys = + if index >= len then true + else + p (Array.unsafe_get xs index) (Array.unsafe_get ys index) + && unsafe_loop (succ index) len p xs ys + +let for_alli a p = + let n = Array.length a in + let rec loop i = + if i = n then true + else if p i (Array.unsafe_get a i) then loop (succ i) + else false + in + loop 0 + +let for_all2_no_exn xs ys p = + let len_xs = Array.length xs in + let len_ys = Array.length ys in + len_xs = len_ys && unsafe_loop 0 len_xs p xs ys + +let map a f = + let open Array in + let l = length a in + if l = 0 then [||] + else + let r = make l (f (unsafe_get a 0)) in + for i = 1 to l - 1 do + unsafe_set r i (f (unsafe_get a i)) + done; + r + +let iter a f = + let open Array in + for i = 0 to length a - 1 do + f (unsafe_get a i) + done + +let fold_left a x f = + let open Array in + let r = ref x in + for i = 0 to length a - 1 do + r := f !r (unsafe_get a i) + done; + !r + +let get_or arr i cb = + if i >= 0 && i < Array.length arr then Array.unsafe_get arr i else cb () diff --git a/analysis/vendor/compiler-libs-406/ext_array.mli b/analysis/vendor/ext/ext_array.mli similarity index 62% rename from analysis/vendor/compiler-libs-406/ext_array.mli rename to analysis/vendor/ext/ext_array.mli index a2272630a..6e55062a8 100644 --- a/analysis/vendor/compiler-libs-406/ext_array.mli +++ b/analysis/vendor/ext/ext_array.mli @@ -22,57 +22,49 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +val reverse_range : 'a array -> int -> int -> unit +(** Some utilities for {!Array} operations *) +val reverse_in_place : 'a array -> unit +val reverse : 'a array -> 'a array - - -(** Some utilities for {!Array} operations *) -val reverse_range : 'a array -> int -> int -> unit -val reverse_in_place : 'a array -> unit -val reverse : 'a array -> 'a array val reverse_of_list : 'a list -> 'a array -val filter : ('a -> bool) -> 'a array -> 'a array +val filter : 'a array -> ('a -> bool) -> 'a array -val filter_map : ('a -> 'b option) -> 'a array -> 'b array +val filter_map : 'a array -> ('a -> 'b option) -> 'b array val range : int -> int -> int array -val map2i : (int -> 'a -> 'b -> 'c ) -> 'a array -> 'b array -> 'c array +val map2i : (int -> 'a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array + +val to_list_f : 'a array -> ('a -> 'b) -> 'b list -val to_list_f : ('a -> 'b) -> 'a array -> 'b list -val to_list_map : ('a -> 'b option) -> 'a array -> 'b list +val to_list_map : 'a array -> ('a -> 'b option) -> 'b list -val to_list_map_acc : - ('a -> 'b option) -> - 'a array -> - 'b list -> - 'b list +val to_list_map_acc : 'a array -> 'b list -> ('a -> 'b option) -> 'b list -val of_list_map : ('a -> 'b) -> 'a list -> 'b array +val of_list_map : 'a list -> ('a -> 'b) -> 'b array val rfind_with_index : 'a array -> ('a -> 'b -> bool) -> 'b -> int +type 'a split = No_split | Split of 'a array * 'a array + +val find_and_split : 'a array -> ('a -> 'b -> bool) -> 'b -> 'a split + +val exists : 'a array -> ('a -> bool) -> bool + +val is_empty : 'a array -> bool -type 'a split = [ `No_split | `Split of 'a array * 'a array ] +val for_all2_no_exn : 'a array -> 'b array -> ('a -> 'b -> bool) -> bool -val rfind_and_split : - 'a array -> - ('a -> 'b -> bool) -> - 'b -> 'a split +val for_alli : 'a array -> (int -> 'a -> bool) -> bool -val find_and_split : - 'a array -> - ('a -> 'b -> bool) -> - 'b -> 'a split +val map : 'a array -> ('a -> 'b) -> 'b array -val exists : ('a -> bool) -> 'a array -> bool +val iter : 'a array -> ('a -> unit) -> unit -val is_empty : 'a array -> bool +val fold_left : 'b array -> 'a -> ('a -> 'b -> 'a) -> 'a -val for_all2_no_exn : - ('a -> 'b -> bool) -> - 'a array -> - 'b array -> - bool \ No newline at end of file +val get_or : 'a array -> int -> (unit -> 'a) -> 'a diff --git a/analysis/vendor/ext/ext_basic_hash_stubs.c b/analysis/vendor/ext/ext_basic_hash_stubs.c new file mode 100644 index 000000000..4937997fe --- /dev/null +++ b/analysis/vendor/ext/ext_basic_hash_stubs.c @@ -0,0 +1,216 @@ +#include "caml/hash.h" +#include "caml/mlvalues.h" +#include +#include +#include "caml/memory.h" +#include "caml/osdeps.h" +#include "caml/signals.h" +#include "caml/misc.h" +#include +typedef uint32_t uint32; + +#define FINAL_MIX(h) \ + h ^= h >> 16; \ + h *= 0x85ebca6b; \ + h ^= h >> 13; \ + h *= 0xc2b2ae35; \ + h ^= h >> 16; + +#define ROTL32(x,n) ((x) << n | (x) >> (32-n)) + +#define MIX(h,d) \ + d *= 0xcc9e2d51; \ + d = ROTL32(d, 15); \ + d *= 0x1b873593; \ + h ^= d; \ + h = ROTL32(h, 13); \ + h = h * 5 + 0xe6546b64; + +CAMLprim value caml_bs_hash_string (value obj){ + + uint32 h = 0; + h = caml_hash_mix_string(h,obj); + FINAL_MIX(h); + return Val_int(h & 0x3FFFFFFFU); +} + +CAMLprim value caml_bs_hash_int ( value d){ + uint32 h = 0; + h = caml_hash_mix_intnat(h,d); + FINAL_MIX(h); + return Val_int(h & 0x3FFFFFFFU); +} + +CAMLprim value caml_bs_hash_string_and_int (value obj, value d){ + uint32 h = 0; + h = caml_hash_mix_string(h,obj); + h = caml_hash_mix_intnat(h,d); + FINAL_MIX(h); + return Val_int(h & 0x3FFFFFFFU); +} + +CAMLprim value caml_bs_hash_string_and_small_int(value obj, value d){ + uint32 h = 0; + h = caml_hash_mix_string(h,obj); + MIX(h,d); + FINAL_MIX(h); + return Val_int(h & 0x3FFFFFFFU); +} + +CAMLprim value caml_bs_hash_small_int(value d){ + uint32 h = 0; + // intnat stamp = Long_val(d); + // FIXME: unused value + MIX(h,d); + FINAL_MIX(h); + return Val_int(h & 0x3FFFFFFFU); +} + +CAMLprim value caml_int_array_blit( + value a1, value ofs1, + value a2, value ofs2, + value n) + { + memmove((value *)&Field(a2, Long_val(ofs2)), + (value *)&Field(a1, Long_val(ofs1)), + Long_val(n) * sizeof(value)); + return Val_unit; + } +/* + * http://stackoverflow.com/questions/664014/what-integer-hash-function-are-good-that-accepts-an-integer-hash-key + * https://en.wikipedia.org/wiki/MurmurHash + * http://zimbry.blogspot.it/2011/09/better-bit-mixing-improving-on.html + * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx + * We gave up the idea to hash Ident.t (take only one argument) + * customized hash function for Ident.t, first + * argument is stamp, second argument is string + * It's not just introducing c stubs, we need make a clear line + * which part of our libraries depends on Ident.t + */ +CAMLprim value caml_bs_hash_stamp_and_name(value d, value obj ){ + uint32 h = 0; + intnat stamp = Long_val(d); + if (stamp){ + MIX(h,d); + } else { + h = caml_hash_mix_string(h,obj); + } + + FINAL_MIX(h); + return Val_int(h & 0x3FFFFFFFU); +} + + + + + +// https://github.com/ocaml/ocaml/pull/255/files +#define Val_long_clang(x) ((intnat) (((uintnat)(x) << 1)) + 1) + +CAMLprim value caml_string_length_based_compare(value s1, value s2) +{ + mlsize_t len1, len2; + mlsize_t temp; + int res; + if (s1 == s2) return Val_int(0); + + len1 = Wosize_val(s1); + temp = Bsize_wsize(len1) - 1 ; + len1 = temp - Byte(s1,temp); + + len2 = Wosize_val(s2); + temp = Bsize_wsize(len2) - 1 ; + len2 = temp - Byte(s2,temp); + + if (len1 != len2) + { + if (len1 < len2 ) { + return Val_long_clang(-1); + } else { + return Val_long_clang(1); + } + } + else { + + res = memcmp(String_val(s1), String_val(s2), len1); + if(res < 0) return Val_long_clang(-1); + if(res > 0) return Val_long_clang(1); + return Val_long_clang(0); + + } +} + + + +#include +#ifdef _WIN32 +#include +CAMLprim value caml_stale_file(value path) +{ + CAMLparam1(path); + struct _utimbuf tv; + char * p = caml_stat_strdup(String_val(path)); + tv.modtime = 0; + caml_enter_blocking_section(); + _utime(p, &tv); + caml_leave_blocking_section(); + caml_stat_free(p); + CAMLreturn(Val_unit); +} +#else +CAMLprim value caml_stale_file(value path) +{ + CAMLparam1(path); + struct timeval tv[2]; + char * p = caml_stat_strdup_to_os(String_val(path)); + // unicode friendly + tv[0].tv_sec = 0.0; + tv[0].tv_usec = 0.0; + tv[1].tv_sec = 0.0; + tv[1].tv_usec = 0.0; + // caml_enter_blocking_section(); + // not needed for single thread + utimes(p, tv); + // caml_leave_blocking_section(); + // not needed for single thread + caml_stat_free(p); + // TODO: error checking + CAMLreturn(Val_unit); +} +#endif + + +CAMLprim value caml_sys_is_directory_no_exn(value name) +{ + CAMLparam1(name); +#ifdef _WIN32 + struct _stati64 st; +#else + struct stat st; +#endif + char_os * p; + int ret; + + + if(!caml_string_is_c_safe(name)){ + CAMLreturn(Val_false); + } + + p = caml_stat_strdup_to_os(String_val(name)); + caml_enter_blocking_section(); + ret = stat_os(p, &st); + caml_leave_blocking_section(); + caml_stat_free(p); + + if (ret == -1) CAMLreturn(Val_false); +#ifdef S_ISDIR + CAMLreturn(Val_bool(S_ISDIR(st.st_mode))); +#else + CAMLreturn(Val_bool(st.st_mode & S_IFDIR)); +#endif +} +/* local variables: */ +/* compile-command: "ocamlopt.opt -c ext_basic_hash_stubs.c" */ +/* end: */ + + diff --git a/analysis/vendor/ext/ext_buffer.ml b/analysis/vendor/ext/ext_buffer.ml new file mode 100644 index 000000000..1e478b354 --- /dev/null +++ b/analysis/vendor/ext/ext_buffer.ml @@ -0,0 +1,204 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Pierre Weis and Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +(* Extensible buffers *) + +type t = { + mutable buffer : bytes; + mutable position : int; + mutable length : int; +} + +let create n = + let n = if n < 1 then 1 else n in + let s = Bytes.create n in + { buffer = s; position = 0; length = n } + +let contents b = Bytes.sub_string b.buffer 0 b.position +(* let to_bytes b = Bytes.sub b.buffer 0 b.position *) + +(* let sub b ofs len = + if ofs < 0 || len < 0 || ofs > b.position - len + then invalid_arg "Ext_buffer.sub" + else Bytes.sub_string b.buffer ofs len *) + +(* let blit src srcoff dst dstoff len = + if len < 0 || srcoff < 0 || srcoff > src.position - len + || dstoff < 0 || dstoff > (Bytes.length dst) - len + then invalid_arg "Ext_buffer.blit" + else + Bytes.unsafe_blit src.buffer srcoff dst dstoff len *) + +let length b = b.position + +let is_empty b = b.position = 0 + +let clear b = b.position <- 0 + +(* let reset b = + b.position <- 0; b.buffer <- b.initial_buffer; + b.length <- Bytes.length b.buffer *) + +let resize b more = + let len = b.length in + let new_len = ref len in + while b.position + more > !new_len do + new_len := 2 * !new_len + done; + let new_buffer = Bytes.create !new_len in + (* PR#6148: let's keep using [blit] rather than [unsafe_blit] in + this tricky function that is slow anyway. *) + Bytes.blit b.buffer 0 new_buffer 0 b.position; + b.buffer <- new_buffer; + b.length <- !new_len; + assert (b.position + more <= b.length) + +let[@inline] add_char b c = + let pos = b.position in + if pos >= b.length then resize b 1; + Bytes.unsafe_set b.buffer pos c; + b.position <- pos + 1 + +(* let add_substring b s offset len = + if offset < 0 || len < 0 || offset > String.length s - len + then invalid_arg "Ext_buffer.add_substring/add_subbytes"; + let new_position = b.position + len in + if new_position > b.length then resize b len; + Ext_bytes.unsafe_blit_string s offset b.buffer b.position len; + b.position <- new_position *) + +(* let add_subbytes b s offset len = + add_substring b (Bytes.unsafe_to_string s) offset len *) + +let add_string b s = + let len = String.length s in + let new_position = b.position + len in + if new_position > b.length then resize b len; + Ext_bytes.unsafe_blit_string s 0 b.buffer b.position len; + b.position <- new_position + +(* TODO: micro-optimzie *) +let add_string_char b s c = + let s_len = String.length s in + let len = s_len + 1 in + let new_position = b.position + len in + if new_position > b.length then resize b len; + let b_buffer = b.buffer in + Ext_bytes.unsafe_blit_string s 0 b_buffer b.position s_len; + Bytes.unsafe_set b_buffer (new_position - 1) c; + b.position <- new_position + +let add_char_string b c s = + let s_len = String.length s in + let len = s_len + 1 in + let new_position = b.position + len in + if new_position > b.length then resize b len; + let b_buffer = b.buffer in + let b_position = b.position in + Bytes.unsafe_set b_buffer b_position c; + Ext_bytes.unsafe_blit_string s 0 b_buffer (b_position + 1) s_len; + b.position <- new_position + +(* equivalent to add_char " "; add_char "$"; add_string s *) +let add_ninja_prefix_var b s = + let s_len = String.length s in + let len = s_len + 2 in + let new_position = b.position + len in + if new_position > b.length then resize b len; + let b_buffer = b.buffer in + let b_position = b.position in + Bytes.unsafe_set b_buffer b_position ' '; + Bytes.unsafe_set b_buffer (b_position + 1) '$'; + Ext_bytes.unsafe_blit_string s 0 b_buffer (b_position + 2) s_len; + b.position <- new_position + +(* let add_bytes b s = add_string b (Bytes.unsafe_to_string s) + + let add_buffer b bs = + add_subbytes b bs.buffer 0 bs.position *) + +(* let add_channel b ic len = + if len < 0 + || len > Sys.max_string_length + then (* PR#5004 *) + invalid_arg "Ext_buffer.add_channel"; + if b.position + len > b.length then resize b len; + really_input ic b.buffer b.position len; + b.position <- b.position + len *) + +let output_buffer oc b = output oc b.buffer 0 b.position + +external unsafe_string : bytes -> int -> int -> Digest.t = "caml_md5_string" + +let digest b = unsafe_string b.buffer 0 b.position + +let rec not_equal_aux (b : bytes) (s : string) i len = + if i >= len then false + else + Bytes.unsafe_get b i <> String.unsafe_get s i + || not_equal_aux b s (i + 1) len + +(** avoid a large copy *) +let not_equal (b : t) (s : string) = + let b_len = b.position in + let s_len = String.length s in + b_len <> s_len || not_equal_aux b.buffer s 0 s_len + +(** + It could be one byte, two bytes, three bytes and four bytes + TODO: inline for better performance +*) +let add_int_1 (b : t) (x : int) = + let c = Char.unsafe_chr (x land 0xff) in + let pos = b.position in + if pos >= b.length then resize b 1; + Bytes.unsafe_set b.buffer pos c; + b.position <- pos + 1 + +let add_int_2 (b : t) (x : int) = + let c1 = Char.unsafe_chr (x land 0xff) in + let c2 = Char.unsafe_chr ((x lsr 8) land 0xff) in + let pos = b.position in + if pos + 1 >= b.length then resize b 2; + let b_buffer = b.buffer in + Bytes.unsafe_set b_buffer pos c1; + Bytes.unsafe_set b_buffer (pos + 1) c2; + b.position <- pos + 2 + +let add_int_3 (b : t) (x : int) = + let c1 = Char.unsafe_chr (x land 0xff) in + let c2 = Char.unsafe_chr ((x lsr 8) land 0xff) in + let c3 = Char.unsafe_chr ((x lsr 16) land 0xff) in + let pos = b.position in + if pos + 2 >= b.length then resize b 3; + let b_buffer = b.buffer in + Bytes.unsafe_set b_buffer pos c1; + Bytes.unsafe_set b_buffer (pos + 1) c2; + Bytes.unsafe_set b_buffer (pos + 2) c3; + b.position <- pos + 3 + +let add_int_4 (b : t) (x : int) = + let c1 = Char.unsafe_chr (x land 0xff) in + let c2 = Char.unsafe_chr ((x lsr 8) land 0xff) in + let c3 = Char.unsafe_chr ((x lsr 16) land 0xff) in + let c4 = Char.unsafe_chr ((x lsr 24) land 0xff) in + let pos = b.position in + if pos + 3 >= b.length then resize b 4; + let b_buffer = b.buffer in + Bytes.unsafe_set b_buffer pos c1; + Bytes.unsafe_set b_buffer (pos + 1) c2; + Bytes.unsafe_set b_buffer (pos + 2) c3; + Bytes.unsafe_set b_buffer (pos + 3) c4; + b.position <- pos + 4 diff --git a/analysis/vendor/ext/ext_buffer.mli b/analysis/vendor/ext/ext_buffer.mli new file mode 100644 index 000000000..38ae58e8a --- /dev/null +++ b/analysis/vendor/ext/ext_buffer.mli @@ -0,0 +1,103 @@ +(***********************************************************************) +(* *) +(* OCaml *) +(* *) +(* Pierre Weis and Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999 Institut National de Recherche en Informatique et *) +(* en Automatique. All rights reserved. This file is distributed *) +(* under the terms of the GNU Library General Public License, with *) +(* the special exception on linking described in file ../LICENSE. *) +(* *) +(***********************************************************************) + +(** Extensible buffers. + + This module implements buffers that automatically expand + as necessary. It provides accumulative concatenation of strings + in quasi-linear time (instead of quadratic time when strings are + concatenated pairwise). +*) + +(* ReScript customization: customized for efficient digest *) + +type t +(** The abstract type of buffers. *) + +val create : int -> t +(** [create n] returns a fresh buffer, initially empty. + The [n] parameter is the initial size of the internal byte sequence + that holds the buffer contents. That byte sequence is automatically + reallocated when more than [n] characters are stored in the buffer, + but shrinks back to [n] characters when [reset] is called. + For best performance, [n] should be of the same order of magnitude + as the number of characters that are expected to be stored in + the buffer (for instance, 80 for a buffer that holds one output + line). Nothing bad will happen if the buffer grows beyond that + limit, however. In doubt, take [n = 16] for instance. + If [n] is not between 1 and {!Sys.max_string_length}, it will + be clipped to that interval. *) + +val contents : t -> string +(** Return a copy of the current contents of the buffer. + The buffer itself is unchanged. *) + +val length : t -> int +(** Return the number of characters currently contained in the buffer. *) + +val is_empty : t -> bool + +val clear : t -> unit +(** Empty the buffer. *) + +val add_char : t -> char -> unit + [@@inline] +(** [add_char b c] appends the character [c] at the end of the buffer [b]. *) + +val add_string : t -> string -> unit +(** [add_string b s] appends the string [s] at the end of the buffer [b]. *) + +(* val add_bytes : t -> bytes -> unit *) +(** [add_string b s] appends the string [s] at the end of the buffer [b]. + @since 4.02 *) + +(* val add_substring : t -> string -> int -> int -> unit *) +(** [add_substring b s ofs len] takes [len] characters from offset + [ofs] in string [s] and appends them at the end of the buffer [b]. *) + +(* val add_subbytes : t -> bytes -> int -> int -> unit *) +(** [add_substring b s ofs len] takes [len] characters from offset + [ofs] in byte sequence [s] and appends them at the end of the buffer [b]. + @since 4.02 *) + +(* val add_buffer : t -> t -> unit *) +(** [add_buffer b1 b2] appends the current contents of buffer [b2] + at the end of buffer [b1]. [b2] is not modified. *) + +(* val add_channel : t -> in_channel -> int -> unit *) +(** [add_channel b ic n] reads exactly [n] character from the + input channel [ic] and stores them at the end of buffer [b]. + Raise [End_of_file] if the channel contains fewer than [n] + characters. *) + +val output_buffer : out_channel -> t -> unit +(** [output_buffer oc b] writes the current contents of buffer [b] + on the output channel [oc]. *) + +val digest : t -> Digest.t + +val not_equal : t -> string -> bool + +val add_int_1 : t -> int -> unit + +val add_int_2 : t -> int -> unit + +val add_int_3 : t -> int -> unit + +val add_int_4 : t -> int -> unit + +val add_string_char : t -> string -> char -> unit + +val add_ninja_prefix_var : t -> string -> unit + +val add_char_string : t -> char -> string -> unit diff --git a/analysis/vendor/ext/ext_bytes.ml b/analysis/vendor/ext/ext_bytes.ml new file mode 100644 index 000000000..f4148ebba --- /dev/null +++ b/analysis/vendor/ext/ext_bytes.ml @@ -0,0 +1,27 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +external unsafe_blit_string : string -> int -> bytes -> int -> int -> unit + = "caml_blit_string" + [@@noalloc] diff --git a/analysis/vendor/compiler-libs-406/ext_bytes.mli b/analysis/vendor/ext/ext_bytes.mli similarity index 88% rename from analysis/vendor/compiler-libs-406/ext_bytes.mli rename to analysis/vendor/ext/ext_bytes.mli index f08a1104f..f4148ebba 100644 --- a/analysis/vendor/compiler-libs-406/ext_bytes.mli +++ b/analysis/vendor/ext/ext_bytes.mli @@ -22,16 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - - - - external unsafe_blit_string : string -> int -> bytes -> int -> int -> unit - = "caml_blit_string" -[@@noalloc] - - - -(** Port the {!Bytes.escaped} from trunk to make it not locale sensitive *) - -val escaped : bytes -> bytes + = "caml_blit_string" + [@@noalloc] diff --git a/analysis/vendor/compiler-libs-406/ext_json_types.ml b/analysis/vendor/ext/ext_char.ml similarity index 73% rename from analysis/vendor/compiler-libs-406/ext_json_types.ml rename to analysis/vendor/ext/ext_char.ml index 1a71e403c..9dcb31a73 100644 --- a/analysis/vendor/compiler-libs-406/ext_json_types.ml +++ b/analysis/vendor/ext/ext_char.ml @@ -1,4 +1,4 @@ -(* Copyright (C) 2015-2017 Bloomberg Finance L.P. +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -22,26 +22,14 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -type loc = Lexing.position -type json_str = - { str : string ; loc : loc} +(** {!Char.escaped} is locale sensitive in 4.02.3, fixed in the trunk, + backport it here +*) -type json_flo = - { flo : string ; loc : loc} -type json_array = - { content : t array ; - loc_start : loc ; - loc_end : loc ; - } +let valid_hex x = + match x with '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' -> true | _ -> false -and json_map = - { map : t String_map.t ; loc : loc } -and t = - | True of loc - | False of loc - | Null of loc - | Flo of json_flo - | Str of json_str - | Arr of json_array - | Obj of json_map - +let is_lower_case c = + (c >= 'a' && c <= 'z') + || (c >= '\224' && c <= '\246') + || (c >= '\248' && c <= '\254') diff --git a/analysis/vendor/ext/ext_char.mli b/analysis/vendor/ext/ext_char.mli new file mode 100644 index 000000000..bf150c840 --- /dev/null +++ b/analysis/vendor/ext/ext_char.mli @@ -0,0 +1,29 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(** Extension to Standard char module, avoid locale sensitivity *) + +val valid_hex : char -> bool + +val is_lower_case : char -> bool diff --git a/analysis/vendor/ext/ext_cmp.ml b/analysis/vendor/ext/ext_cmp.ml new file mode 100644 index 000000000..e14746cea --- /dev/null +++ b/analysis/vendor/ext/ext_cmp.ml @@ -0,0 +1,37 @@ +type 'a compare = 'a -> 'a -> int + +type ('a, 'id) cmp = 'a compare + +external getCmp : ('a, 'id) cmp -> 'a compare = "%identity" + +module type S = sig + type id + + type t + + val cmp : (t, id) cmp +end + +type ('key, 'id) t = (module S with type t = 'key and type id = 'id) + +module Make (M : sig + type t + + val cmp : (t -> t -> int[@bs]) +end) = +struct + type id + + type t = M.t + + let cmp = M.cmp +end + +let make (type key) (cmp : (key -> key -> int[@bs])) = + let module M = struct + type t = key + + let cmp = cmp + end in + let module N = Make (M) in + (module N : S with type t = key) diff --git a/analysis/vendor/ext/ext_cmp.mli b/analysis/vendor/ext/ext_cmp.mli new file mode 100644 index 000000000..8588d120e --- /dev/null +++ b/analysis/vendor/ext/ext_cmp.mli @@ -0,0 +1,24 @@ +type 'a compare = 'a -> 'a -> int + +type ('a, 'id) cmp + +external getCmp : ('a, 'id) cmp -> 'a compare = "%identity" +(** only used for data structures, not exported for client usage *) + +module type S = sig + type id + + type t + + val cmp : (t, id) cmp +end + +type ('key, 'id) t = (module S with type t = 'key and type id = 'id) + +module Make (M : sig + type t + + val cmp : t compare +end) : S with type t = M.t + +val make : ('a -> 'a -> int) -> (module S with type t = 'a) diff --git a/analysis/vendor/ext/ext_color.ml b/analysis/vendor/ext/ext_color.ml new file mode 100644 index 000000000..d5ed3bb16 --- /dev/null +++ b/analysis/vendor/ext/ext_color.ml @@ -0,0 +1,74 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type color = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White + +type style = FG of color | BG of color | Bold | Dim + +(* let ansi_of_color = function + | Black -> "0" + | Red -> "1" + | Green -> "2" + | Yellow -> "3" + | Blue -> "4" + | Magenta -> "5" + | Cyan -> "6" + | White -> "7" *) + +let code_of_style = function + | FG Black -> "30" + | FG Red -> "31" + | FG Green -> "32" + | FG Yellow -> "33" + | FG Blue -> "34" + | FG Magenta -> "35" + | FG Cyan -> "36" + | FG White -> "37" + | BG Black -> "40" + | BG Red -> "41" + | BG Green -> "42" + | BG Yellow -> "43" + | BG Blue -> "44" + | BG Magenta -> "45" + | BG Cyan -> "46" + | BG White -> "47" + | Bold -> "1" + | Dim -> "2" + +(** TODO: add more styles later *) +let style_of_tag s = + match s with + | Format.String_tag "error" -> [ Bold; FG Red ] + | Format.String_tag "warning" -> [ Bold; FG Magenta ] + | Format.String_tag "info" -> [ Bold; FG Yellow ] + | Format.String_tag "dim" -> [ Dim ] + | Format.String_tag "filename" -> [ FG Cyan ] + | _ -> [] + +let ansi_of_tag s = + let l = style_of_tag s in + let s = String.concat ";" (Ext_list.map l code_of_style) in + "\x1b[" ^ s ^ "m" + +let reset_lit = "\x1b[0m" diff --git a/analysis/vendor/ext/ext_color.mli b/analysis/vendor/ext/ext_color.mli new file mode 100644 index 000000000..d2aa14845 --- /dev/null +++ b/analysis/vendor/ext/ext_color.mli @@ -0,0 +1,32 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type color = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White + +type style = FG of color | BG of color | Bold | Dim + +val ansi_of_tag : Format.stag -> string +(** Input is the tag for example `@{@}` return escape code *) + +val reset_lit : string diff --git a/analysis/vendor/compiler-libs-406/ext_digest.ml b/analysis/vendor/ext/ext_digest.ml similarity index 93% rename from analysis/vendor/compiler-libs-406/ext_digest.ml rename to analysis/vendor/ext/ext_digest.ml index 4a134830f..b2143a3bb 100644 --- a/analysis/vendor/compiler-libs-406/ext_digest.ml +++ b/analysis/vendor/ext/ext_digest.ml @@ -1,4 +1,4 @@ -(* Copyright (C) 2019- Authors of BuckleScript +(* Copyright (C) 2019- Hongbo Zhang, Authors of ReScript * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -22,7 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +let length = 16 - let length = 16 - - let hex_length = 32 \ No newline at end of file +let hex_length = 32 diff --git a/analysis/vendor/ext/ext_digest.mli b/analysis/vendor/ext/ext_digest.mli new file mode 100644 index 000000000..150f64344 --- /dev/null +++ b/analysis/vendor/ext/ext_digest.mli @@ -0,0 +1,27 @@ +(* Copyright (C) 2019- Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +val length : int + +val hex_length : int diff --git a/analysis/vendor/ext/ext_file_extensions.ml b/analysis/vendor/ext/ext_file_extensions.ml new file mode 100644 index 000000000..5449c417f --- /dev/null +++ b/analysis/vendor/ext/ext_file_extensions.ml @@ -0,0 +1,27 @@ +type valid_input = + | Ml + | Mli + | Res + | Resi + | Intf_ast + | Impl_ast + | Mlmap + | Cmi + | Unknown + +(** This is per-file based, + when [ocamlc] [-c -o another_dir/xx.cmi] + it will return (another_dir/xx) +*) + +let classify_input ext = + match () with + | _ when ext = Literals.suffix_ml -> Ml + | _ when ext = !Config.interface_suffix -> Mli + | _ when ext = Literals.suffix_ast -> Impl_ast + | _ when ext = Literals.suffix_iast -> Intf_ast + | _ when ext = Literals.suffix_mlmap -> Mlmap + | _ when ext = Literals.suffix_cmi -> Cmi + | _ when ext = Literals.suffix_res -> Res + | _ when ext = Literals.suffix_resi -> Resi + | _ -> Unknown diff --git a/analysis/vendor/ext/ext_filename.ml b/analysis/vendor/ext/ext_filename.ml new file mode 100644 index 000000000..a12e0ccf3 --- /dev/null +++ b/analysis/vendor/ext/ext_filename.ml @@ -0,0 +1,141 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +let is_dir_sep_unix c = c = '/' + +let is_dir_sep_win_cygwin c = c = '/' || c = '\\' || c = ':' + +let is_dir_sep = if Sys.unix then is_dir_sep_unix else is_dir_sep_win_cygwin + +(* reference ninja.cc IsKnownShellSafeCharacter *) +let maybe_quote (s : string) = + let noneed_quote = + Ext_string.for_all s (function + | '0' .. '9' | 'a' .. 'z' | 'A' .. 'Z' | '_' | '+' | '-' | '.' | '/' | '@' + -> + true + | _ -> false) + in + if noneed_quote then s else Filename.quote s + +let chop_extension_maybe name = + let rec search_dot i = + if i < 0 || is_dir_sep (String.unsafe_get name i) then name + else if String.unsafe_get name i = '.' then String.sub name 0 i + else search_dot (i - 1) + in + search_dot (String.length name - 1) + +let get_extension_maybe name = + let name_len = String.length name in + let rec search_dot name i name_len = + if i < 0 || is_dir_sep (String.unsafe_get name i) then "" + else if String.unsafe_get name i = '.' then String.sub name i (name_len - i) + else search_dot name (i - 1) name_len + in + search_dot name (name_len - 1) name_len + +let chop_all_extensions_maybe name = + let rec search_dot i last = + if i < 0 || is_dir_sep (String.unsafe_get name i) then + match last with None -> name | Some i -> String.sub name 0 i + else if String.unsafe_get name i = '.' then search_dot (i - 1) (Some i) + else search_dot (i - 1) last + in + search_dot (String.length name - 1) None + +let new_extension name (ext : string) = + let rec search_dot name i ext = + if i < 0 || is_dir_sep (String.unsafe_get name i) then name ^ ext + else if String.unsafe_get name i = '.' then ( + let ext_len = String.length ext in + let buf = Bytes.create (i + ext_len) in + Bytes.blit_string name 0 buf 0 i; + Bytes.blit_string ext 0 buf i ext_len; + Bytes.unsafe_to_string buf) + else search_dot name (i - 1) ext + in + search_dot name (String.length name - 1) ext + +(** TODO: improve efficiency + given a path, calcuate its module name + Note that `ocamlc.opt -c aa.xx.mli` gives `aa.xx.cmi` + we can not strip all extensions, otherwise + we can not tell the difference between "x.cpp.ml" + and "x.ml" +*) +let module_name name = + let rec search_dot i name = + if i < 0 then Ext_string.capitalize_ascii name + else if String.unsafe_get name i = '.' then Ext_string.capitalize_sub name i + else search_dot (i - 1) name + in + let name = Filename.basename name in + let name_len = String.length name in + search_dot (name_len - 1) name + +type module_info = { module_name : string; case : bool } + +let rec valid_module_name_aux name off len = + if off >= len then true + else + let c = String.unsafe_get name off in + match c with + | 'A' .. 'Z' | 'a' .. 'z' | '0' .. '9' | '_' | '\'' | '.' | '[' | ']' -> + valid_module_name_aux name (off + 1) len + | _ -> false + +type state = Invalid | Upper | Lower + +let valid_module_name name len = + if len = 0 then Invalid + else + let c = String.unsafe_get name 0 in + match c with + | 'A' .. 'Z' -> if valid_module_name_aux name 1 len then Upper else Invalid + | 'a' .. 'z' | '0' .. '9' | '_' | '[' | ']' -> + if valid_module_name_aux name 1 len then Lower else Invalid + | _ -> Invalid + +let as_module ~basename = + let rec search_dot i name name_len = + if i < 0 then + (* Input e.g, [a_b] *) + match valid_module_name name name_len with + | Invalid -> None + | Upper -> Some { module_name = name; case = true } + | Lower -> + Some { module_name = Ext_string.capitalize_ascii name; case = false } + else if String.unsafe_get name i = '.' then + (*Input e.g, [A_b] *) + match valid_module_name name i with + | Invalid -> None + | Upper -> + Some { module_name = Ext_string.capitalize_sub name i; case = true } + | Lower -> + Some { module_name = Ext_string.capitalize_sub name i; case = false } + else search_dot (i - 1) name name_len + in + let name_len = String.length basename in + search_dot (name_len - 1) basename name_len diff --git a/analysis/vendor/ext/ext_filename.mli b/analysis/vendor/ext/ext_filename.mli new file mode 100644 index 000000000..e95c3f217 --- /dev/null +++ b/analysis/vendor/ext/ext_filename.mli @@ -0,0 +1,52 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(* TODO: + Change the module name, this code is not really an extension of the standard + library but rather specific to JS Module name convention. +*) + +(** An extension module to calculate relative path follow node/npm style. + TODO : this short name will have to change upon renaming the file. +*) + +val is_dir_sep : char -> bool + +val maybe_quote : string -> string + +val chop_extension_maybe : string -> string + +(* return an empty string if no extension found *) +val get_extension_maybe : string -> string + +val new_extension : string -> string -> string + +val chop_all_extensions_maybe : string -> string + +(* OCaml specific abstraction*) +val module_name : string -> string + +type module_info = { module_name : string; case : bool } + +val as_module : basename:string -> module_info option diff --git a/analysis/vendor/ext/ext_fmt.ml b/analysis/vendor/ext/ext_fmt.ml new file mode 100644 index 000000000..ea59637c4 --- /dev/null +++ b/analysis/vendor/ext/ext_fmt.ml @@ -0,0 +1,10 @@ +let with_file_as_pp filename f = + Ext_pervasives.finally (open_out_bin filename) ~clean:close_out (fun chan -> + let fmt = Format.formatter_of_out_channel chan in + let v = f fmt in + Format.pp_print_flush fmt (); + v) + +let failwithf ~loc fmt = Format.ksprintf (fun s -> failwith (loc ^ s)) fmt + +let invalid_argf fmt = Format.ksprintf invalid_arg fmt diff --git a/analysis/vendor/ext/ext_format.ml b/analysis/vendor/ext/ext_format.ml new file mode 100644 index 000000000..c6924a234 --- /dev/null +++ b/analysis/vendor/ext/ext_format.ml @@ -0,0 +1,103 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +open Format + +type t = formatter + +(* let string = pp_print_string *) + +(* let break = fun fmt -> pp_print_break fmt 0 0 + + let break1 = + fun fmt -> pp_print_break fmt 0 1 + + let space fmt = + pp_print_break fmt 1 0 +*) +(* let vgroup fmt indent u = + pp_open_vbox fmt indent; + let v = u () in + pp_close_box fmt (); + v + + let group fmt indent u = + pp_open_hovbox fmt indent; + let v = u () in + pp_close_box fmt (); + v + + let paren fmt u = + string fmt "("; + let v = u () in + string fmt ")"; + v + + let brace fmt u = + string fmt "{"; + (* break1 fmt ; *) + let v = u () in + string fmt "}"; + v + + let bracket fmt u = + string fmt "["; + let v = u () in + string fmt "]"; + v *) + +(* let paren_group st n action = + group st n (fun _ -> paren st action) + + let brace_group st n action = + group st n (fun _ -> brace st action ) + + let brace_vgroup st n action = + vgroup st n (fun _ -> + string st "{"; + pp_print_break st 0 2; + let v = vgroup st 0 action in + pp_print_break st 0 0; + string st "}"; + v + ) + let bracket_group st n action = + group st n (fun _ -> bracket st action) + + let newline fmt = pp_print_newline fmt () + + let to_out_channel = formatter_of_out_channel + + (* let non_breaking_space fmt = string fmt " " *) + (* let set_needed_space_function _ _ = () *) + let flush = pp_print_flush +*) +(* let list = pp_print_list *) + +let pp_print_queue ?(pp_sep = pp_print_cut) pp_v ppf q = + Queue.iter + (fun q -> + pp_v ppf q; + pp_sep ppf ()) + q diff --git a/analysis/vendor/ext/ext_format.mli b/analysis/vendor/ext/ext_format.mli new file mode 100644 index 000000000..f921110f4 --- /dev/null +++ b/analysis/vendor/ext/ext_format.mli @@ -0,0 +1,66 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(** Simplified wrapper module for the standard library [Format] module. +*) + +type t = private Format.formatter + +(* val string : t -> string -> unit + + val break : t -> unit + + val break1 : t -> unit + + val space : t -> unit + + val group : t -> int -> (unit -> 'a) -> 'a + (** [group] will record current indentation + and indent futher + *) + + val vgroup : t -> int -> (unit -> 'a) -> 'a + + val paren : t -> (unit -> 'a) -> 'a + + val paren_group : t -> int -> (unit -> 'a) -> 'a + + val brace_group : t -> int -> (unit -> 'a) -> 'a + + val brace_vgroup : t -> int -> (unit -> 'a) -> 'a + + val bracket_group : t -> int -> (unit -> 'a) -> 'a + + val newline : t -> unit + + val to_out_channel : out_channel -> t + + val flush : t -> unit -> unit *) + +val pp_print_queue : + ?pp_sep:(Format.formatter -> unit -> unit) -> + (Format.formatter -> 'a -> unit) -> + Format.formatter -> + 'a Queue.t -> + unit diff --git a/analysis/vendor/ext/ext_ident.ml b/analysis/vendor/ext/ext_ident.ml new file mode 100644 index 000000000..f04e01806 --- /dev/null +++ b/analysis/vendor/ext/ext_ident.ml @@ -0,0 +1,195 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * 2017 - Hongbo Zhang, Authors of ReScript + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + + + + + + + + +let js_flag = 0b1_000 (* check with ocaml compiler *) + +(* let js_module_flag = 0b10_000 (\* javascript external modules *\) *) +(* TODO: + check name conflicts with javascript conventions + {[ + Ext_ident.convert "^";; + - : string = "$caret" + ]} +*) +let js_object_flag = 0b100_000 (* javascript object flags *) + +let is_js (i : Ident.t) = + i.flags land js_flag <> 0 + +let is_js_or_global (i : Ident.t) = + i.flags land (8 lor 1) <> 0 + + +let is_js_object (i : Ident.t) = + i.flags land js_object_flag <> 0 + +let make_js_object (i : Ident.t) = + i.flags <- i.flags lor js_object_flag + +(* It's a js function hard coded by js api, so when printing, + it should preserve the name +*) +let create_js (name : string) : Ident.t = + { name = name; flags = js_flag ; stamp = 0} + +let create = Ident.create + +(* FIXME: no need for `$' operator *) +let create_tmp ?(name=Literals.tmp) () = create name + + +let js_module_table : Ident.t Hash_string.t = Hash_string.create 31 + +(* This is for a js exeternal module, we can change it when printing + for example + {[ + var React$1 = require('react'); + React$1.render(..) + ]} + + Given a name, if duplicated, they should have the same id +*) +(* let create_js_module (name : string) : Ident.t = + let name = + String.concat "" @@ Ext_list.map + (Ext_string.split name '-') Ext_string.capitalize_ascii in + (* TODO: if we do such transformation, we should avoid collision for example: + react-dom + react--dom + check collision later + *) + match Hash_string.find_exn js_module_table name with + | exception Not_found -> + let ans = Ident.create name in + (* let ans = { v with flags = js_module_flag} in *) + Hash_string.add js_module_table name ans; + ans + | v -> (* v *) Ident.rename v + + +*) + +let [@inline] convert ?(op=false) (c : char) : string = + (match c with + | '*' -> "$star" + | '\'' -> "$p" + | '!' -> "$bang" + | '>' -> "$great" + | '<' -> "$less" + | '=' -> "$eq" + | '+' -> "$plus" + | '-' -> if op then "$neg" else "$" + | '@' -> "$at" + | '^' -> "$caret" + | '/' -> "$slash" + | '|' -> "$pipe" + | '.' -> "$dot" + | '%' -> "$percent" + | '~' -> "$tilde" + | '#' -> "$hash" + | ':' -> "$colon" + | '?' -> "$question" + | '&' -> "$amp" + | '(' -> "$lpar" + | ')' -> "$rpar" + | '{' -> "$lbrace" + | '}' -> "$lbrace" + | '[' -> "$lbrack" + | ']' -> "$rbrack" + + | _ -> "$unknown") +let [@inline] no_escape (c : char) = + match c with + | 'a' .. 'z' | 'A' .. 'Z' + | '0' .. '9' | '_' | '$' -> true + | _ -> false + +exception Not_normal_letter of int +let name_mangle name = + let len = String.length name in + try + for i = 0 to len - 1 do + if not (no_escape (String.unsafe_get name i)) then + raise_notrace (Not_normal_letter i) + done; + name (* Normal letter *) + with + | Not_normal_letter i -> + let buffer = Ext_buffer.create len in + for j = 0 to len - 1 do + let c = String.unsafe_get name j in + if no_escape c then Ext_buffer.add_char buffer c + else + Ext_buffer.add_string buffer (convert ~op:(i=0) c) + done; Ext_buffer.contents buffer + +(* TODO: + check name conflicts with javascript conventions + {[ + Ext_ident.convert "^";; + - : string = "$caret" + ]} + [convert name] if [name] is a js keyword,add "$$" + otherwise do the name mangling to make sure ocaml identifier it is + a valid js identifier +*) +let convert (name : string) = + if Js_reserved_map.is_reserved name then + "$$" ^ name + else name_mangle name + +(** keyword could be used in property *) + +(* It is currently made a persistent ident to avoid fresh ids + which would result in different signature files + - other solution: use lazy values +*) +let make_unused () = create "_" + + + +let reset () = + Hash_string.clear js_module_table + + +(* Has to be total order, [x < y] + and [x > y] should be consistent + flags are not relevant here +*) +let compare (x : Ident.t ) ( y : Ident.t) = + let u = x.stamp - y.stamp in + if u = 0 then + Ext_string.compare x.name y.name + else u + +let equal ( x : Ident.t) ( y : Ident.t) = + if x.stamp <> 0 then x.stamp = y.stamp + else y.stamp = 0 && x.name = y.name diff --git a/analysis/vendor/ext/ext_ident.mli b/analysis/vendor/ext/ext_ident.mli new file mode 100644 index 000000000..290a635e0 --- /dev/null +++ b/analysis/vendor/ext/ext_ident.mli @@ -0,0 +1,65 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + + + + + + + + +(** A wrapper around [Ident] module in compiler-libs*) + +val is_js : Ident.t -> bool + +val is_js_object : Ident.t -> bool + +(** create identifiers for predefined [js] global variables *) +val create_js : string -> Ident.t + +val create : string -> Ident.t + +val make_js_object : Ident.t -> unit + +val reset : unit -> unit + +val create_tmp : ?name:string -> unit -> Ident.t + +val make_unused : unit -> Ident.t + + + +(** + Invariant: if name is not converted, the reference should be equal +*) +val convert : string -> string + + + +val is_js_or_global : Ident.t -> bool + + + +val compare : Ident.t -> Ident.t -> int +val equal : Ident.t -> Ident.t -> bool diff --git a/analysis/vendor/ext/ext_int.ml b/analysis/vendor/ext/ext_int.ml new file mode 100644 index 000000000..f31d4251d --- /dev/null +++ b/analysis/vendor/ext/ext_int.ml @@ -0,0 +1,36 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type t = int + +let compare (x : t) (y : t) = Stdlib.compare x y + +let equal (x : t) (y : t) = x = y + +let move = 0x1_0000_0000 + +(* works only on 64 bit platform *) +let int32_unsigned_to_int (n : int32) : int = + let i = Int32.to_int n in + if i < 0 then i + move else i diff --git a/analysis/vendor/ext/ext_int.mli b/analysis/vendor/ext/ext_int.mli new file mode 100644 index 000000000..acfc7af2e --- /dev/null +++ b/analysis/vendor/ext/ext_int.mli @@ -0,0 +1,35 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type t = int + +val compare : t -> t -> int + +val equal : t -> t -> bool + +val int32_unsigned_to_int : int32 -> int +(** + works on 64 bit platform only + given input as an uint32 and convert it io int64 +*) diff --git a/analysis/vendor/compiler-libs-406/ext_io.ml b/analysis/vendor/ext/ext_io.ml similarity index 66% rename from analysis/vendor/compiler-libs-406/ext_io.ml rename to analysis/vendor/ext/ext_io.ml index d98177754..ee3a96eb6 100644 --- a/analysis/vendor/compiler-libs-406/ext_io.ml +++ b/analysis/vendor/ext/ext_io.ml @@ -22,33 +22,27 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - (** on 32 bit , there are 16M limitation *) let load_file f = - Ext_pervasives.finally (open_in_bin f) ~clean:close_in begin fun ic -> - let n = in_channel_length ic in - let s = Bytes.create n in - really_input ic s 0 n; - Bytes.unsafe_to_string s - end - - -let rev_lines_of_chann chan = - let rec loop acc chan = - match input_line chan with - | line -> loop (line :: acc) chan - | exception End_of_file -> close_in chan ; acc in - loop [] chan - - -let rev_lines_of_file file = - Ext_pervasives.finally - ~clean:close_in - (open_in_bin file) rev_lines_of_chann - - -let write_file f content = - Ext_pervasives.finally ~clean:close_out - (open_out_bin f) begin fun oc -> - output_string oc content - end + Ext_pervasives.finally (open_in_bin f) ~clean:close_in (fun ic -> + let n = in_channel_length ic in + let s = Bytes.create n in + really_input ic s 0 n; + Bytes.unsafe_to_string s) + +let rev_lines_of_chann chan = + let rec loop acc chan = + match input_line chan with + | line -> loop (line :: acc) chan + | exception End_of_file -> + close_in chan; + acc + in + loop [] chan + +let rev_lines_of_file file = + Ext_pervasives.finally ~clean:close_in (open_in_bin file) rev_lines_of_chann + +let write_file f content = + Ext_pervasives.finally ~clean:close_out (open_out_bin f) (fun oc -> + output_string oc content) diff --git a/analysis/vendor/compiler-libs-406/ext_io.mli b/analysis/vendor/ext/ext_io.mli similarity index 100% rename from analysis/vendor/compiler-libs-406/ext_io.mli rename to analysis/vendor/ext/ext_io.mli diff --git a/analysis/vendor/ext/ext_js_file_kind.ml b/analysis/vendor/ext/ext_js_file_kind.ml new file mode 100644 index 000000000..1688b3962 --- /dev/null +++ b/analysis/vendor/ext/ext_js_file_kind.ml @@ -0,0 +1,28 @@ +(* Copyright (C) 2020- Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +type case = Upper | Little + +type [@warning "-69"] t = { case : case; suffix : Ext_js_suffix.t } + +let any_runtime_kind = { case = Little; suffix = Ext_js_suffix.Js } diff --git a/analysis/vendor/compiler-libs-406/ext_position.ml b/analysis/vendor/ext/ext_js_regex.ml similarity index 62% rename from analysis/vendor/compiler-libs-406/ext_position.ml rename to analysis/vendor/ext/ext_js_regex.ml index 356bf0929..83a881fcf 100644 --- a/analysis/vendor/compiler-libs-406/ext_position.ml +++ b/analysis/vendor/ext/ext_js_regex.ml @@ -22,41 +22,26 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - -type t = Lexing.position = { - pos_fname : string ; - pos_lnum : int ; - pos_bol : int ; - pos_cnum : int -} - -let offset (x : t) (y:t) = - { - x with - pos_lnum = - x.pos_lnum + y.pos_lnum - 1; - pos_cnum = - x.pos_cnum + y.pos_cnum; - pos_bol = - if y.pos_lnum = 1 then - x.pos_bol - else x.pos_cnum + y.pos_bol - } - -let print fmt (pos : t) = - Format.fprintf fmt "(line %d, column %d)" pos.pos_lnum (pos.pos_cnum - pos.pos_bol) - - - -let lexbuf_from_channel_with_fname ic fname = - let x = Lexing.from_function (fun buf n -> input ic buf 0 n) in - let pos : t = { - pos_fname = fname ; - pos_lnum = 1; - pos_bol = 0; - pos_cnum = 0 (* copied from zero_pos*) - } in - x.lex_start_p <- pos; - x.lex_curr_p <- pos ; - x - +let check_from_end al = + let rec aux l seen = + match l with + | [] -> false + | e :: r -> + if e < 0 || e > 255 then false + else + let c = Char.chr e in + if c = '/' then true + else if Ext_list.exists seen (fun x -> x = c) then false + (* flag should not be repeated *) + else if c = 'i' || c = 'g' || c = 'm' || c = 'y' || c = 'u' then + aux r (c :: seen) + else false + in + aux al [] + +let js_regex_checker s = + match Ext_utf8.decode_utf8_string s with + | [] -> false + | 47 (* [Char.code '/' = 47 ]*) :: tail -> check_from_end (List.rev tail) + | _ :: _ -> false + | exception Ext_utf8.Invalid_utf8 _ -> false diff --git a/analysis/vendor/ext/ext_js_regex.mli b/analysis/vendor/ext/ext_js_regex.mli new file mode 100644 index 000000000..a627d7b06 --- /dev/null +++ b/analysis/vendor/ext/ext_js_regex.mli @@ -0,0 +1,27 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(* This is a module that checks if js regex is valid or not *) + +val js_regex_checker : string -> bool diff --git a/analysis/vendor/ext/ext_js_suffix.ml b/analysis/vendor/ext/ext_js_suffix.ml new file mode 100644 index 000000000..ab09d7ec7 --- /dev/null +++ b/analysis/vendor/ext/ext_js_suffix.ml @@ -0,0 +1,28 @@ +type t = + | Js + | Mjs + | Cjs + | Bs_js + | Bs_mjs + | Bs_cjs + | Unknown_extension + +let to_string (x : t) = + match x with + | Js -> Literals.suffix_js + | Mjs -> Literals.suffix_mjs + | Cjs -> Literals.suffix_cjs + | Bs_js -> Literals.suffix_bs_js + | Bs_mjs -> Literals.suffix_bs_mjs + | Bs_cjs -> Literals.suffix_bs_cjs + | Unknown_extension -> assert false + +let of_string (x : string) : t = + match () with + | () when x = Literals.suffix_js -> Js + | () when x = Literals.suffix_mjs -> Mjs + | () when x = Literals.suffix_cjs -> Cjs + | () when x = Literals.suffix_bs_js -> Bs_js + | () when x = Literals.suffix_bs_mjs -> Bs_mjs + | () when x = Literals.suffix_bs_cjs -> Bs_cjs + | _ -> Unknown_extension diff --git a/analysis/vendor/ext/ext_json.ml b/analysis/vendor/ext/ext_json.ml new file mode 100644 index 000000000..3dedb8d87 --- /dev/null +++ b/analysis/vendor/ext/ext_json.ml @@ -0,0 +1,69 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type callback = + [ `Str of string -> unit + | `Str_loc of string -> Lexing.position -> unit + | `Flo of string -> unit + | `Flo_loc of string -> Lexing.position -> unit + | `Bool of bool -> unit + | `Obj of Ext_json_types.t Map_string.t -> unit + | `Arr of Ext_json_types.t array -> unit + | `Arr_loc of + Ext_json_types.t array -> Lexing.position -> Lexing.position -> unit + | `Null of unit -> unit + | `Not_found of unit -> unit + | `Id of Ext_json_types.t -> unit ] + +type path = string list + +type status = No_path | Found of Ext_json_types.t | Wrong_type of path + +let test ?(fail = fun () -> ()) key (cb : callback) + (m : Ext_json_types.t Map_string.t) = + (match (Map_string.find_exn m key, cb) with + | exception Not_found -> ( + match cb with `Not_found f -> f () | _ -> fail ()) + | True _, `Bool cb -> cb true + | False _, `Bool cb -> cb false + | Flo { flo = s }, `Flo cb -> cb s + | Flo { flo = s; loc }, `Flo_loc cb -> cb s loc + | Obj { map = b }, `Obj cb -> cb b + | Arr { content }, `Arr cb -> cb content + | Arr { content; loc_start; loc_end }, `Arr_loc cb -> + cb content loc_start loc_end + | Null _, `Null cb -> cb () + | Str { str = s }, `Str cb -> cb s + | Str { str = s; loc }, `Str_loc cb -> cb s loc + | any, `Id cb -> cb any + | _, _ -> fail ()); + m + +let loc_of (x : Ext_json_types.t) = + match x with + | True p | False p | Null p -> p + | Str p -> p.loc + | Arr p -> p.loc_start + | Obj p -> p.loc + | Flo p -> p.loc diff --git a/analysis/vendor/ext/ext_json.mli b/analysis/vendor/ext/ext_json.mli new file mode 100644 index 000000000..9e3935e5e --- /dev/null +++ b/analysis/vendor/ext/ext_json.mli @@ -0,0 +1,50 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type path = string list + +type status = No_path | Found of Ext_json_types.t | Wrong_type of path + +type callback = + [ `Str of string -> unit + | `Str_loc of string -> Lexing.position -> unit + | `Flo of string -> unit + | `Flo_loc of string -> Lexing.position -> unit + | `Bool of bool -> unit + | `Obj of Ext_json_types.t Map_string.t -> unit + | `Arr of Ext_json_types.t array -> unit + | `Arr_loc of + Ext_json_types.t array -> Lexing.position -> Lexing.position -> unit + | `Null of unit -> unit + | `Not_found of unit -> unit + | `Id of Ext_json_types.t -> unit ] + +val test : + ?fail:(unit -> unit) -> + string -> + callback -> + Ext_json_types.t Map_string.t -> + Ext_json_types.t Map_string.t + +val loc_of : Ext_json_types.t -> Ext_position.t diff --git a/analysis/vendor/ext/ext_json_noloc.ml b/analysis/vendor/ext/ext_json_noloc.ml new file mode 100644 index 000000000..9ce2733c0 --- /dev/null +++ b/analysis/vendor/ext/ext_json_noloc.ml @@ -0,0 +1,148 @@ +(* Copyright (C) 2017- Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(* This file is only used in bsb watcher searlization *) +type t = + | True + | False + | Null + | Flo of string + | Str of string + | Arr of t array + | Obj of t Map_string.t + +(** poor man's serialization *) +let naive_escaped (unmodified_input : string) : string = + let n = ref 0 in + let len = String.length unmodified_input in + for i = 0 to len - 1 do + n := + !n + + + match String.unsafe_get unmodified_input i with + | '\"' | '\\' | '\n' | '\t' | '\r' | '\b' -> 2 + | _ -> 1 + done; + if !n = len then unmodified_input + else + let result = Bytes.create !n in + n := 0; + for i = 0 to len - 1 do + let open Bytes in + (match String.unsafe_get unmodified_input i with + | ('\"' | '\\') as c -> + unsafe_set result !n '\\'; + incr n; + unsafe_set result !n c + | '\n' -> + unsafe_set result !n '\\'; + incr n; + unsafe_set result !n 'n' + | '\t' -> + unsafe_set result !n '\\'; + incr n; + unsafe_set result !n 't' + | '\r' -> + unsafe_set result !n '\\'; + incr n; + unsafe_set result !n 'r' + | '\b' -> + unsafe_set result !n '\\'; + incr n; + unsafe_set result !n 'b' + | c -> unsafe_set result !n c); + incr n + done; + Bytes.unsafe_to_string result + +let quot x = "\"" ^ naive_escaped x ^ "\"" + +let true_ = True + +let false_ = False + +let null = Null + +let str s = Str s + +let flo s = Flo s + +let arr s = Arr s + +let obj s = Obj s + +let kvs s = Obj (Map_string.of_list s) + +let rec encode_buf (x : t) (buf : Buffer.t) : unit = + let a str = Buffer.add_string buf str in + match x with + | Null -> a "null" + | Str s -> a (quot s) + | Flo s -> + a s + (* + since our parsing keep the original float representation, we just dump it as is, there is no cases like [nan] *) + | Arr content -> ( + match content with + | [||] -> a "[]" + | _ -> + a "[ "; + encode_buf (Array.unsafe_get content 0) buf; + for i = 1 to Array.length content - 1 do + a " , "; + encode_buf (Array.unsafe_get content i) buf + done; + a " ]") + | True -> a "true" + | False -> a "false" + | Obj map -> + if Map_string.is_empty map then a "{}" + else ( + (*prerr_endline "WEIRD"; + prerr_endline (string_of_int @@ Map_string.cardinal map ); *) + a "{ "; + let (_ : int) = + Map_string.fold map 0 (fun k v i -> + if i <> 0 then a " , "; + a (quot k); + a " : "; + encode_buf v buf; + i + 1) + in + a " }") + +let to_string x = + let buf = Buffer.create 1024 in + encode_buf x buf; + Buffer.contents buf + +let to_channel (oc : out_channel) x = + let buf = Buffer.create 1024 in + encode_buf x buf; + Buffer.output_buffer oc buf + +let to_file name v = + let ochan = open_out_bin name in + to_channel ochan v; + close_out ochan diff --git a/analysis/vendor/ext/ext_json_noloc.mli b/analysis/vendor/ext/ext_json_noloc.mli new file mode 100644 index 000000000..b6d8485f2 --- /dev/null +++ b/analysis/vendor/ext/ext_json_noloc.mli @@ -0,0 +1,54 @@ +(* Copyright (C) 2017- Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type t = private + | True + | False + | Null + | Flo of string + | Str of string + | Arr of t array + | Obj of t Map_string.t + +val true_ : t + +val false_ : t + +val null : t + +val str : string -> t + +val flo : string -> t + +val arr : t array -> t + +val obj : t Map_string.t -> t + +val kvs : (string * t) list -> t + +val to_string : t -> string + +val to_channel : out_channel -> t -> unit + +val to_file : string -> t -> unit diff --git a/analysis/vendor/ext/ext_json_parse.ml b/analysis/vendor/ext/ext_json_parse.ml deleted file mode 100644 index 5b2130cb2..000000000 --- a/analysis/vendor/ext/ext_json_parse.ml +++ /dev/null @@ -1,314 +0,0 @@ -module StringMap = Map.Make (String) - -type error = - | Illegal_character of char - | Unterminated_string - | Unterminated_comment - | Illegal_escape of string - | Unexpected_token - | Expect_comma_or_rbracket - | Expect_comma_or_rbrace - | Expect_colon - | Expect_string_or_rbrace - | Expect_eof -(* | Trailing_comma_in_obj *) -(* | Trailing_comma_in_array *) - -let fprintf = Format.fprintf - -let report_error ppf = function - | Illegal_character c -> fprintf ppf "Illegal character (%s)" (Char.escaped c) - | Illegal_escape s -> - fprintf ppf "Illegal backslash escape in string or character (%s)" s - | Unterminated_string -> fprintf ppf "Unterminated_string" - | Expect_comma_or_rbracket -> fprintf ppf "Expect_comma_or_rbracket" - | Expect_comma_or_rbrace -> fprintf ppf "Expect_comma_or_rbrace" - | Expect_colon -> fprintf ppf "Expect_colon" - | Expect_string_or_rbrace -> fprintf ppf "Expect_string_or_rbrace" - | Expect_eof -> fprintf ppf "Expect_eof" - | Unexpected_token -> fprintf ppf "Unexpected_token" - (* | Trailing_comma_in_obj *) - (* -> fprintf ppf "Trailing_comma_in_obj" *) - (* | Trailing_comma_in_array *) - (* -> fprintf ppf "Trailing_comma_in_array" *) - | Unterminated_comment -> fprintf ppf "Unterminated_comment" - -exception Error of Lexing.position * Lexing.position * error - -let () = - Printexc.register_printer (function x -> - (match x with - | Error (loc_start, loc_end, error) -> - Some - (Format.asprintf "@[%a:@ %a@ -@ %a)@]" report_error error - Ext_position.print loc_start Ext_position.print loc_end) - | _ -> None)) - -type token = - | Comma - | Eof - | False - | Lbrace - | Lbracket - | Null - | Colon - | Number of string - | Rbrace - | Rbracket - | String of string - | True - -let error (lexbuf : Lexing.lexbuf) e = - raise (Error (lexbuf.lex_start_p, lexbuf.lex_curr_p, e)) - [@@raises Error] - -let lexeme_len (x : Lexing.lexbuf) = x.lex_curr_pos - x.lex_start_pos - -let update_loc ({lex_curr_p; _} as lexbuf : Lexing.lexbuf) diff = - lexbuf.lex_curr_p <- - { - lex_curr_p with - pos_lnum = lex_curr_p.pos_lnum + 1; - pos_bol = lex_curr_p.pos_cnum - diff; - } - -let char_for_backslash = function - | 'n' -> '\010' - | 'r' -> '\013' - | 'b' -> '\008' - | 't' -> '\009' - | c -> c - -let dec_code c1 c2 c3 = - (100 * (Char.code c1 - 48)) + (10 * (Char.code c2 - 48)) + (Char.code c3 - 48) - -let hex_code c1 c2 = - let d1 = Char.code c1 in - let val1 = - if d1 >= 97 then d1 - 87 else if d1 >= 65 then d1 - 55 else d1 - 48 - in - let d2 = Char.code c2 in - let val2 = - if d2 >= 97 then d2 - 87 else if d2 >= 65 then d2 - 55 else d2 - 48 - in - (val1 * 16) + val2 - -let lf = '\010' - -let __ocaml_lex_tables = - { - Lexing.lex_base = - "\000\000\239\255\240\255\241\255\000\000\025\000\011\000\244\255\245\255\246\255\247\255\248\255\249\255\000\000\000\000\000\000\041\000\001\000\254\255\005\000\005\000\253\255\001\000\002\000\252\255\000\000\000\000\003\000\251\255\001\000\003\000\250\255\079\000\089\000\099\000\121\000\131\000\141\000\153\000\163\000\001\000\253\255\254\255\023\000\255\255\006\000\246\255\189\000\248\255\215\000\255\255\249\255\249\000\181\000\252\255\009\000\063\000\075\000\234\000\251\255\032\001\250\255"; - Lexing.lex_backtrk = - "\255\255\255\255\255\255\255\255\013\000\013\000\016\000\255\255\255\255\255\255\255\255\255\255\255\255\016\000\016\000\016\000\016\000\016\000\255\255\000\000\012\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\013\000\255\255\013\000\255\255\013\000\255\255\255\255\255\255\255\255\001\000\255\255\255\255\255\255\008\000\255\255\255\255\255\255\255\255\006\000\006\000\255\255\006\000\001\000\002\000\255\255\255\255\255\255\255\255"; - Lexing.lex_default = - "\001\000\000\000\000\000\000\000\255\255\255\255\255\255\000\000\000\000\000\000\000\000\000\000\000\000\255\255\255\255\255\255\255\255\255\255\000\000\255\255\020\000\000\000\255\255\255\255\000\000\255\255\255\255\255\255\000\000\255\255\255\255\000\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\042\000\000\000\000\000\255\255\000\000\047\000\000\000\047\000\000\000\051\000\000\000\000\000\255\255\255\255\000\000\255\255\255\255\255\255\255\255\000\000\255\255\000\000"; - Lexing.lex_trans = - "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\019\000\018\000\018\000\019\000\017\000\019\000\255\255\048\000\019\000\255\255\057\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\019\000\000\000\003\000\000\000\000\000\019\000\000\000\000\000\050\000\000\000\000\000\043\000\008\000\006\000\033\000\016\000\004\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\007\000\004\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\032\000\044\000\033\000\056\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\021\000\057\000\000\000\000\000\000\000\020\000\000\000\000\000\012\000\000\000\011\000\032\000\056\000\000\000\025\000\049\000\000\000\000\000\032\000\014\000\024\000\028\000\000\000\000\000\057\000\026\000\030\000\013\000\031\000\000\000\000\000\022\000\027\000\015\000\029\000\023\000\000\000\000\000\000\000\039\000\010\000\039\000\009\000\032\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\037\000\000\000\037\000\000\000\035\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\255\255\035\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\000\000\000\000\255\255\000\000\056\000\000\000\000\000\055\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\054\000\000\000\054\000\000\000\000\000\000\000\000\000\054\000\000\000\002\000\041\000\000\000\000\000\000\000\255\255\046\000\053\000\053\000\053\000\053\000\053\000\053\000\053\000\053\000\053\000\053\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\255\059\000\059\000\059\000\059\000\059\000\059\000\059\000\059\000\059\000\059\000\000\000\000\000\000\000\000\000\000\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\054\000\000\000\000\000\000\000\000\000\000\000\054\000\060\000\060\000\060\000\060\000\060\000\060\000\000\000\000\000\000\000\000\000\000\000\054\000\000\000\000\000\000\000\054\000\000\000\054\000\000\000\000\000\000\000\052\000\061\000\061\000\061\000\061\000\061\000\061\000\061\000\061\000\061\000\061\000\060\000\060\000\060\000\060\000\060\000\060\000\000\000\061\000\061\000\061\000\061\000\061\000\061\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\061\000\061\000\061\000\061\000\061\000\061\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\255\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"; - Lexing.lex_check = - "\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\000\000\000\000\017\000\000\000\000\000\019\000\020\000\045\000\019\000\020\000\055\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\000\000\255\255\000\000\255\255\255\255\019\000\255\255\255\255\045\000\255\255\255\255\040\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\004\000\043\000\005\000\056\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\005\000\016\000\057\000\255\255\255\255\255\255\016\000\255\255\255\255\000\000\255\255\000\000\005\000\056\000\255\255\014\000\045\000\255\255\255\255\004\000\000\000\023\000\027\000\255\255\255\255\057\000\025\000\029\000\000\000\030\000\255\255\255\255\015\000\026\000\000\000\013\000\022\000\255\255\255\255\255\255\032\000\000\000\032\000\000\000\005\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\032\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\035\000\255\255\035\000\255\255\034\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\035\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\047\000\034\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\038\000\039\000\039\000\039\000\039\000\039\000\039\000\039\000\039\000\039\000\039\000\255\255\255\255\047\000\255\255\049\000\255\255\255\255\049\000\053\000\053\000\053\000\053\000\053\000\053\000\053\000\053\000\053\000\053\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\049\000\255\255\049\000\255\255\255\255\255\255\255\255\049\000\255\255\000\000\040\000\255\255\255\255\255\255\020\000\045\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\047\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\058\000\255\255\255\255\255\255\255\255\255\255\052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\049\000\255\255\255\255\255\255\255\255\255\255\049\000\052\000\052\000\052\000\052\000\052\000\052\000\255\255\255\255\255\255\255\255\255\255\049\000\255\255\255\255\255\255\049\000\255\255\049\000\255\255\255\255\255\255\049\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\052\000\052\000\052\000\052\000\052\000\052\000\255\255\060\000\060\000\060\000\060\000\060\000\060\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\060\000\060\000\060\000\060\000\060\000\060\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\047\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\049\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255"; - Lexing.lex_base_code = ""; - Lexing.lex_backtrk_code = ""; - Lexing.lex_default_code = ""; - Lexing.lex_trans_code = ""; - Lexing.lex_check_code = ""; - Lexing.lex_code = ""; - } - -let rec lex_json buf lexbuf = __ocaml_lex_lex_json_rec buf lexbuf 0 - [@@raises Error] - -and __ocaml_lex_lex_json_rec buf lexbuf __ocaml_lex_state = - match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with - | 0 -> lex_json buf lexbuf - | 1 -> - update_loc lexbuf 0; - lex_json buf lexbuf - | 2 -> comment buf lexbuf - | 3 -> True - | 4 -> False - | 5 -> Null - | 6 -> Lbracket - | 7 -> Rbracket - | 8 -> Lbrace - | 9 -> Rbrace - | 10 -> Comma - | 11 -> Colon - | 12 -> lex_json buf lexbuf - | 13 -> Number (Lexing.lexeme lexbuf) - | 14 -> - let pos = Lexing.lexeme_start_p lexbuf in - scan_string buf pos lexbuf; - let content = Buffer.contents buf in - Buffer.clear buf; - String content - | 15 -> Eof - | 16 -> - let c = Lexing.sub_lexeme_char lexbuf lexbuf.Lexing.lex_start_pos in - error lexbuf (Illegal_character c) - | __ocaml_lex_state -> - lexbuf.Lexing.refill_buff lexbuf; - __ocaml_lex_lex_json_rec buf lexbuf __ocaml_lex_state - [@@raises Error] - -and comment buf lexbuf = __ocaml_lex_comment_rec buf lexbuf 40 [@@raises Error] - -and __ocaml_lex_comment_rec buf lexbuf __ocaml_lex_state = - match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with - | 0 -> lex_json buf lexbuf - | 1 -> comment buf lexbuf - | 2 -> error lexbuf Unterminated_comment - | __ocaml_lex_state -> - lexbuf.Lexing.refill_buff lexbuf; - __ocaml_lex_comment_rec buf lexbuf __ocaml_lex_state - [@@raises Error] - -and scan_string buf start lexbuf = - __ocaml_lex_scan_string_rec buf start lexbuf 45 - [@@raises Error] - -and __ocaml_lex_scan_string_rec buf start lexbuf __ocaml_lex_state = - match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with - | 0 -> () - | 1 -> - let len = lexeme_len lexbuf - 2 in - update_loc lexbuf len; - - scan_string buf start lexbuf - | 2 -> - let len = lexeme_len lexbuf - 3 in - update_loc lexbuf len; - scan_string buf start lexbuf - | 3 -> - let c = Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_start_pos + 1) in - Buffer.add_char buf (char_for_backslash c); - scan_string buf start lexbuf - | 4 -> - let c1 = Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_start_pos + 1) - and c2 = Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_start_pos + 2) - and c3 = Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_start_pos + 3) - and s = - Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_start_pos - (lexbuf.Lexing.lex_start_pos + 4) - in - let v = dec_code c1 c2 c3 in - (try Buffer.add_char buf (Char.chr v) - with _ -> error lexbuf (Illegal_escape s)); - scan_string buf start lexbuf - | 5 -> - let c1 = Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_start_pos + 2) - and c2 = Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_start_pos + 3) in - let v = hex_code c1 c2 in - (try Buffer.add_char buf (Char.chr v) - with _ -> error lexbuf (Illegal_escape (Char.escaped c2))); - - scan_string buf start lexbuf - | 6 -> - let c = Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_start_pos + 1) in - Buffer.add_char buf '\\'; - Buffer.add_char buf c; - - scan_string buf start lexbuf - | 7 -> - update_loc lexbuf 0; - Buffer.add_char buf lf; - - scan_string buf start lexbuf - | 8 -> - let ofs = lexbuf.lex_start_pos in - let len = lexbuf.lex_curr_pos - ofs in - Buffer.add_substring buf (Bytes.to_string lexbuf.lex_buffer) ofs len; - - scan_string buf start lexbuf - | 9 -> error lexbuf Unterminated_string - | __ocaml_lex_state -> - lexbuf.Lexing.refill_buff lexbuf; - __ocaml_lex_scan_string_rec buf start lexbuf __ocaml_lex_state - [@@raises Error] - -let parse_json lexbuf = - let buf = Buffer.create 64 in - let look_ahead = ref None in - let token () : token = - match !look_ahead with - | None -> lex_json buf lexbuf - | Some x -> - look_ahead := None; - x - [@@raises Error] - in - let push e = look_ahead := Some e in - let rec json (lexbuf : Lexing.lexbuf) : Ext_json_types.t = - match token () with - | True -> True lexbuf.lex_start_p - | False -> False lexbuf.lex_start_p - | Null -> Null lexbuf.lex_start_p - | Number s -> Flo s - | String s -> Str s - | Lbracket -> parse_array lexbuf.lex_start_p lexbuf.lex_curr_p [] lexbuf - | Lbrace -> parse_map lexbuf.lex_start_p StringMap.empty lexbuf - | _ -> error lexbuf Unexpected_token - (* Note if we remove [trailing_comma] support - we should report errors (actually more work), for example - {[ - match token () with - | Rbracket -> - if trailing_comma then - error lexbuf Trailing_comma_in_array - else - ]} - {[ - match token () with - | Rbrace -> - if trailing_comma then - error lexbuf Trailing_comma_in_obj - else - - ]} - *) - [@@raises Error] - and parse_array loc_start loc_finish acc lexbuf : Ext_json_types.t = - match token () with - | Rbracket -> Arr (Array.of_list (acc |> List.rev)) - | x -> ( - push x; - let new_one = json lexbuf in - match token () with - | Comma -> parse_array loc_start loc_finish (new_one :: acc) lexbuf - | Rbracket -> Arr (Array.of_list (new_one :: acc |> List.rev)) - | _ -> error lexbuf Expect_comma_or_rbracket) - [@@raises Error] - and parse_map loc_start acc lexbuf : Ext_json_types.t = - match token () with - | Rbrace -> Obj acc - | String key -> ( - match token () with - | Colon -> ( - let value = json lexbuf in - match token () with - | Rbrace -> Obj (StringMap.add key value acc) - | Comma -> parse_map loc_start (StringMap.add key value acc) lexbuf - | _ -> error lexbuf Expect_comma_or_rbrace) - | _ -> error lexbuf Expect_colon) - | _ -> error lexbuf Expect_string_or_rbrace - [@@raises Error] - in - - let v = json lexbuf in - match token () with - | Eof -> v - | _ -> error lexbuf Expect_eof - [@@raises Error] - -let parse_json_from_file s = - let in_chan = open_in s in - match - let lexbuf = Ext_position.lexbuf_from_channel_with_fname in_chan s in - parse_json lexbuf - with - | exception (Error _ | Invalid_argument _ | Sys_error _) -> - close_in_noerr in_chan; - None - | v -> - close_in_noerr in_chan; - Some v diff --git a/analysis/vendor/ext/ext_json_parse.mli b/analysis/vendor/ext/ext_json_parse.mli new file mode 100644 index 000000000..2a23566e8 --- /dev/null +++ b/analysis/vendor/ext/ext_json_parse.mli @@ -0,0 +1,35 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type error + +val report_error : Format.formatter -> error -> unit + +exception Error of Lexing.position * Lexing.position * error + +val parse_json_from_string : string -> Ext_json_types.t + +val parse_json_from_chan : string -> in_channel -> Ext_json_types.t + +val parse_json_from_file : string -> Ext_json_types.t diff --git a/analysis/vendor/ext/ext_json_parse.mll b/analysis/vendor/ext/ext_json_parse.mll new file mode 100644 index 000000000..92f50feec --- /dev/null +++ b/analysis/vendor/ext/ext_json_parse.mll @@ -0,0 +1,351 @@ +{ +type error = + | Illegal_character of char + | Unterminated_string + | Unterminated_comment + | Illegal_escape of string + | Unexpected_token + | Expect_comma_or_rbracket + | Expect_comma_or_rbrace + | Expect_colon + | Expect_string_or_rbrace + | Expect_eof + (* | Trailing_comma_in_obj *) + (* | Trailing_comma_in_array *) + + +let fprintf = Format.fprintf +let report_error ppf = function + | Illegal_character c -> + fprintf ppf "Illegal character (%s)" (Char.escaped c) + | Illegal_escape s -> + fprintf ppf "Illegal backslash escape in string or character (%s)" s + | Unterminated_string -> + fprintf ppf "Unterminated_string" + | Expect_comma_or_rbracket -> + fprintf ppf "Expect_comma_or_rbracket" + | Expect_comma_or_rbrace -> + fprintf ppf "Expect_comma_or_rbrace" + | Expect_colon -> + fprintf ppf "Expect_colon" + | Expect_string_or_rbrace -> + fprintf ppf "Expect_string_or_rbrace" + | Expect_eof -> + fprintf ppf "Expect_eof" + | Unexpected_token + -> + fprintf ppf "Unexpected_token" + (* | Trailing_comma_in_obj *) + (* -> fprintf ppf "Trailing_comma_in_obj" *) + (* | Trailing_comma_in_array *) + (* -> fprintf ppf "Trailing_comma_in_array" *) + | Unterminated_comment + -> fprintf ppf "Unterminated_comment" + + +exception Error of Lexing.position * Lexing.position * error + + +let () = + Printexc.register_printer + (function x -> + match x with + | Error (loc_start,loc_end,error) -> + Some (Format.asprintf + "@[%a:@ %a@ -@ %a)@]" + report_error error + Ext_position.print loc_start + Ext_position.print loc_end + ) + + | _ -> None + ) + + + + + +type token = + | Comma + | Eof + | False + | Lbrace + | Lbracket + | Null + | Colon + | Number of string + | Rbrace + | Rbracket + | String of string + | True + +let error (lexbuf : Lexing.lexbuf) e = + raise (Error (lexbuf.lex_start_p, lexbuf.lex_curr_p, e)) + + +let lexeme_len (x : Lexing.lexbuf) = + x.lex_curr_pos - x.lex_start_pos + +let update_loc (lexbuf : Lexing.lexbuf) diff = + let lex_curr_p = lexbuf.lex_curr_p in + lexbuf.lex_curr_p <- + { + lex_curr_p with + pos_lnum = lex_curr_p.pos_lnum + 1; + pos_bol = lex_curr_p.pos_cnum - diff; + } + +let char_for_backslash = function + | 'n' -> '\010' + | 'r' -> '\013' + | 'b' -> '\008' + | 't' -> '\009' + | c -> c + +let dec_code c1 c2 c3 = + 100 * (Char.code c1 - 48) + 10 * (Char.code c2 - 48) + (Char.code c3 - 48) + +let hex_code c1 c2 = + let d1 = Char.code c1 in + let val1 = + if d1 >= 97 then d1 - 87 + else if d1 >= 65 then d1 - 55 + else d1 - 48 in + let d2 = Char.code c2 in + let val2 = + if d2 >= 97 then d2 - 87 + else if d2 >= 65 then d2 - 55 + else d2 - 48 in + val1 * 16 + val2 + +let lf = '\010' +} + +let lf = '\010' +let lf_cr = ['\010' '\013'] +let dos_newline = "\013\010" +let blank = [' ' '\009' '\012'] + +let digit = ['0'-'9'] +let nonzero = ['1'-'9'] +let digits = digit + +let frac = '.' digits +let e = ['e' 'E']['+' '-']? +let exp = e digits +let positive_int = (digit | nonzero digits) +let number = '-'? positive_int (frac | exp | frac exp) ? +let hexdigit = digit | ['a'-'f' 'A'-'F'] + +let comment_start = "/*" +let comment_end = "*/" + +rule lex_json buf = parse +| blank + { lex_json buf lexbuf} +| lf | dos_newline { + update_loc lexbuf 0; + lex_json buf lexbuf + } +| comment_start { comment buf lexbuf} +| "true" { True} +| "false" {False} +| "null" {Null} +| "[" {Lbracket} +| "]" {Rbracket} +| "{" {Lbrace} +| "}" {Rbrace} +| "," {Comma} +| ':' {Colon} +| ("//" (_ # lf_cr)*) {lex_json buf lexbuf} + +| number { Number (Lexing.lexeme lexbuf)} + +| '"' { + let pos = Lexing.lexeme_start_p lexbuf in + scan_string buf pos lexbuf; + let content = (Buffer.contents buf) in + Buffer.clear buf ; + String content +} +| eof {Eof } +| _ as c { error lexbuf (Illegal_character c )} +and comment buf = parse +| comment_end {lex_json buf lexbuf} +| _ {comment buf lexbuf} +| eof {error lexbuf Unterminated_comment} +(* Note this is wrong for JSON conversion *) +(* We should fix it later *) +and scan_string buf start = parse +| '"' { () } +| '\\' lf [' ' '\t']* + { + let len = lexeme_len lexbuf - 2 in + update_loc lexbuf len; + + scan_string buf start lexbuf + } +| '\\' dos_newline [' ' '\t']* + { + let len = lexeme_len lexbuf - 3 in + update_loc lexbuf len; + scan_string buf start lexbuf + } +| '\\' (['\\' '\'' '"' 'n' 't' 'b' 'r' ' '] as c) + { + Buffer.add_char buf (char_for_backslash c); + scan_string buf start lexbuf + } +| '\\' (digit as c1) (digit as c2) (digit as c3) as s + { + let v = dec_code c1 c2 c3 in + if v > 255 then + error lexbuf (Illegal_escape s) ; + Buffer.add_char buf (Char.chr v); + + scan_string buf start lexbuf + } +| '\\' 'x' (hexdigit as c1) (hexdigit as c2) + { + let v = hex_code c1 c2 in + Buffer.add_char buf (Char.chr v); + + scan_string buf start lexbuf + } +| '\\' (_ as c) + { + Buffer.add_char buf '\\'; + Buffer.add_char buf c; + + scan_string buf start lexbuf + } +| lf + { + update_loc lexbuf 0; + Buffer.add_char buf lf; + + scan_string buf start lexbuf + } +| ([^ '\\' '"'] # lf)+ + { + let ofs = lexbuf.lex_start_pos in + let len = lexbuf.lex_curr_pos - ofs in + Buffer.add_subbytes buf lexbuf.lex_buffer ofs len; + + scan_string buf start lexbuf + } +| eof + { + error lexbuf Unterminated_string + } + +{ + + + + + + +let parse_json lexbuf = + let buf = Buffer.create 64 in + let look_ahead = ref None in + let token () : token = + match !look_ahead with + | None -> + lex_json buf lexbuf + | Some x -> + look_ahead := None ; + x + in + let push e = look_ahead := Some e in + let rec json (lexbuf : Lexing.lexbuf) : Ext_json_types.t = + match token () with + | True -> True lexbuf.lex_start_p + | False -> False lexbuf.lex_start_p + | Null -> Null lexbuf.lex_start_p + | Number s -> Flo {flo = s; loc = lexbuf.lex_start_p} + | String s -> Str { str = s; loc = lexbuf.lex_start_p} + | Lbracket -> parse_array lexbuf.lex_start_p lexbuf.lex_curr_p [] lexbuf + | Lbrace -> parse_map lexbuf.lex_start_p Map_string.empty lexbuf + | _ -> error lexbuf Unexpected_token + +(* Note if we remove [trailing_comma] support + we should report errors (actually more work), for example + {[ + match token () with + | Rbracket -> + if trailing_comma then + error lexbuf Trailing_comma_in_array + else + ]} + {[ + match token () with + | Rbrace -> + if trailing_comma then + error lexbuf Trailing_comma_in_obj + else + + ]} + *) + and parse_array loc_start loc_finish acc lexbuf + : Ext_json_types.t = + match token () with + | Rbracket -> + Arr {loc_start ; content = Ext_array.reverse_of_list acc ; + loc_end = lexbuf.lex_curr_p } + | x -> + push x ; + let new_one = json lexbuf in + begin match token () with + | Comma -> + parse_array loc_start loc_finish (new_one :: acc) lexbuf + | Rbracket + -> Arr {content = (Ext_array.reverse_of_list (new_one::acc)); + loc_start ; + loc_end = lexbuf.lex_curr_p } + | _ -> + error lexbuf Expect_comma_or_rbracket + end + and parse_map loc_start acc lexbuf : Ext_json_types.t = + match token () with + | Rbrace -> + Obj { map = acc ; loc = loc_start} + | String key -> + begin match token () with + | Colon -> + let value = json lexbuf in + begin match token () with + | Rbrace -> Obj {map = Map_string.add acc key value ; loc = loc_start} + | Comma -> + parse_map loc_start (Map_string.add acc key value ) lexbuf + | _ -> error lexbuf Expect_comma_or_rbrace + end + | _ -> error lexbuf Expect_colon + end + | _ -> error lexbuf Expect_string_or_rbrace + in + let v = json lexbuf in + match token () with + | Eof -> v + | _ -> error lexbuf Expect_eof + +let parse_json_from_string s = + parse_json (Lexing.from_string s ) + +let parse_json_from_chan fname in_chan = + let lexbuf = + Ext_position.lexbuf_from_channel_with_fname + in_chan fname in + parse_json lexbuf + +let parse_json_from_file s = + let in_chan = open_in s in + let lexbuf = + Ext_position.lexbuf_from_channel_with_fname + in_chan s in + match parse_json lexbuf with + | exception e -> close_in in_chan ; raise e + | v -> close_in in_chan; v + + + + +} diff --git a/analysis/vendor/ext/ext_json_types.ml b/analysis/vendor/ext/ext_json_types.ml index 780c2f5e2..1eb6212dd 100644 --- a/analysis/vendor/ext/ext_json_types.ml +++ b/analysis/vendor/ext/ext_json_types.ml @@ -23,13 +23,14 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) type loc = Lexing.position -type json_str = string -type json_flo = string -module StringMap = Map.Make (String) +type json_str = { str : string; loc : loc } -type json_array = t array -and json_map = t StringMap.t +type json_flo = { flo : string; loc : loc } + +type json_array = { content : t array; loc_start : loc; loc_end : loc } + +and json_map = { map : t Map_string.t; loc : loc } and t = | True of loc diff --git a/analysis/vendor/compiler-libs-406/ext_json_write.ml b/analysis/vendor/ext/ext_json_write.ml similarity index 65% rename from analysis/vendor/compiler-libs-406/ext_json_write.ml rename to analysis/vendor/ext/ext_json_write.ml index 601f3eea7..965fe982e 100644 --- a/analysis/vendor/compiler-libs-406/ext_json_write.ml +++ b/analysis/vendor/ext/ext_json_write.ml @@ -23,64 +23,64 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) (** poor man's serialization *) +(* + let quot x = + "\"" ^ String.escaped x ^ "\"" *) -let quot x = - "\"" ^ String.escaped x ^ "\"" - -let rec encode_aux (x : Ext_json_types.t ) - (buf : Buffer.t) : unit = - let a str = Buffer.add_string buf str in - match x with - | Null _ -> a "null" - | Str {str = s; _} -> a (quot s) - | Flo {flo = s; _} -> - a s (* +(* let rec encode_aux (x : Ext_json_types.t ) + (buf : Buffer.t) : unit = + let a str = Buffer.add_string buf str in + match x with + | Null _ -> a "null" + | Str {str = s } -> a (quot s) + | Flo {flo = s} -> + a s (* since our parsing keep the original float representation, we just dump it as is, there is no cases like [nan] *) - | Arr {content; _} -> - begin match content with + | Arr {content} -> + begin match content with | [||] -> a "[]" - | _ -> + | _ -> a "[ "; encode_aux (Array.unsafe_get content 0) - buf ; - for i = 1 to Array.length content - 1 do + buf ; + for i = 1 to Array.length content - 1 do a " , "; - encode_aux + encode_aux (Array.unsafe_get content i) buf - done; + done; a " ]" end - | True _ -> a "true" - | False _ -> a "false" - | Obj {map; _} -> - if String_map.is_empty map then + | True _ -> a "true" + | False _ -> a "false" + | Obj {map} -> + if Map_string.is_empty map then a "{}" - else - begin + else + begin (*prerr_endline "WEIRD"; - prerr_endline (string_of_int @@ String_map.cardinal map ); *) + prerr_endline (string_of_int @@ Map_string.cardinal map ); *) a "{ "; - let _ : int = String_map.fold (fun k v i -> + let _ : int = Map_string.fold map 0 (fun k v i -> if i <> 0 then begin - a " , " - end; + a " , " + end; a (quot k); a " : "; encode_aux v buf ; - i + 1 - ) map 0 in + i + 1 + ) in a " }" end +*) - -let to_string (x : Ext_json_types.t) = - let buf = Buffer.create 1024 in +(* let to_string (x : Ext_json_types.t) = + let buf = Buffer.create 1024 in encode_aux x buf ; - Buffer.contents buf + Buffer.contents buf -let to_channel (oc : out_channel) x = - let buf = Buffer.create 1024 in + let to_channel (oc : out_channel) x = + let buf = Buffer.create 1024 in encode_aux x buf ; - Buffer.output_buffer oc buf + Buffer.output_buffer oc buf *) diff --git a/analysis/vendor/compiler-libs-406/ext_json_write.mli b/analysis/vendor/ext/ext_json_write.mli similarity index 92% rename from analysis/vendor/compiler-libs-406/ext_json_write.mli rename to analysis/vendor/ext/ext_json_write.mli index d9cddb001..5ccfab757 100644 --- a/analysis/vendor/compiler-libs-406/ext_json_write.mli +++ b/analysis/vendor/ext/ext_json_write.mli @@ -22,7 +22,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +(*val to_string : Ext_json_types.t -> string -val to_string : Ext_json_types.t -> string -val to_channel : out_channel -> Ext_json_types.t -> unit \ No newline at end of file + val to_channel : out_channel -> Ext_json_types.t -> unit*) diff --git a/analysis/vendor/ext/ext_list.ml b/analysis/vendor/ext/ext_list.ml new file mode 100644 index 000000000..be7f30b8d --- /dev/null +++ b/analysis/vendor/ext/ext_list.ml @@ -0,0 +1,724 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +external ( .!() ) : 'a array -> int -> 'a = "%array_unsafe_get" + +let rec map l f = + match l with + | [] -> [] + | [ x1 ] -> + let y1 = f x1 in + [ y1 ] + | [ x1; x2 ] -> + let y1 = f x1 in + let y2 = f x2 in + [ y1; y2 ] + | [ x1; x2; x3 ] -> + let y1 = f x1 in + let y2 = f x2 in + let y3 = f x3 in + [ y1; y2; y3 ] + | [ x1; x2; x3; x4 ] -> + let y1 = f x1 in + let y2 = f x2 in + let y3 = f x3 in + let y4 = f x4 in + [ y1; y2; y3; y4 ] + | x1 :: x2 :: x3 :: x4 :: x5 :: tail -> + let y1 = f x1 in + let y2 = f x2 in + let y3 = f x3 in + let y4 = f x4 in + let y5 = f x5 in + y1 :: y2 :: y3 :: y4 :: y5 :: map tail f + +let rec has_string l f = + match l with + | [] -> false + | [ x1 ] -> x1 = f + | [ x1; x2 ] -> x1 = f || x2 = f + | [ x1; x2; x3 ] -> x1 = f || x2 = f || x3 = f + | x1 :: x2 :: x3 :: x4 -> x1 = f || x2 = f || x3 = f || has_string x4 f + +let rec map_combine l1 l2 f = + match (l1, l2) with + | [], [] -> [] + | a1 :: l1, a2 :: l2 -> (f a1, a2) :: map_combine l1 l2 f + | _, _ -> invalid_arg "Ext_list.map_combine" + +let rec arr_list_combine_unsafe arr l i j acc f = + if i = j then acc + else + match l with + | [] -> invalid_arg "Ext_list.combine" + | h :: tl -> + (f arr.!(i), h) :: arr_list_combine_unsafe arr tl (i + 1) j acc f + +let combine_array_append arr l acc f = + let len = Array.length arr in + arr_list_combine_unsafe arr l 0 len acc f + +let combine_array arr l f = + let len = Array.length arr in + arr_list_combine_unsafe arr l 0 len [] f + +let rec arr_list_filter_map_unasfe arr l i j acc f = + if i = j then acc + else + match l with + | [] -> invalid_arg "Ext_list.arr_list_filter_map_unsafe" + | h :: tl -> ( + match f arr.!(i) h with + | None -> arr_list_filter_map_unasfe arr tl (i + 1) j acc f + | Some v -> v :: arr_list_filter_map_unasfe arr tl (i + 1) j acc f) + +let array_list_filter_map arr l f = + let len = Array.length arr in + arr_list_filter_map_unasfe arr l 0 len [] f + +let rec map_split_opt (xs : 'a list) (f : 'a -> 'b option * 'c option) : + 'b list * 'c list = + match xs with + | [] -> ([], []) + | x :: xs -> ( + let c, d = f x in + let cs, ds = map_split_opt xs f in + ( (match c with Some c -> c :: cs | None -> cs), + match d with Some d -> d :: ds | None -> ds )) + +let rec map_snd l f = + match l with + | [] -> [] + | [ (v1, x1) ] -> + let y1 = f x1 in + [ (v1, y1) ] + | [ (v1, x1); (v2, x2) ] -> + let y1 = f x1 in + let y2 = f x2 in + [ (v1, y1); (v2, y2) ] + | [ (v1, x1); (v2, x2); (v3, x3) ] -> + let y1 = f x1 in + let y2 = f x2 in + let y3 = f x3 in + [ (v1, y1); (v2, y2); (v3, y3) ] + | [ (v1, x1); (v2, x2); (v3, x3); (v4, x4) ] -> + let y1 = f x1 in + let y2 = f x2 in + let y3 = f x3 in + let y4 = f x4 in + [ (v1, y1); (v2, y2); (v3, y3); (v4, y4) ] + | (v1, x1) :: (v2, x2) :: (v3, x3) :: (v4, x4) :: (v5, x5) :: tail -> + let y1 = f x1 in + let y2 = f x2 in + let y3 = f x3 in + let y4 = f x4 in + let y5 = f x5 in + (v1, y1) :: (v2, y2) :: (v3, y3) :: (v4, y4) :: (v5, y5) :: map_snd tail f + +let rec map_last l f = + match l with + | [] -> [] + | [ x1 ] -> + let y1 = f true x1 in + [ y1 ] + | [ x1; x2 ] -> + let y1 = f false x1 in + let y2 = f true x2 in + [ y1; y2 ] + | [ x1; x2; x3 ] -> + let y1 = f false x1 in + let y2 = f false x2 in + let y3 = f true x3 in + [ y1; y2; y3 ] + | [ x1; x2; x3; x4 ] -> + let y1 = f false x1 in + let y2 = f false x2 in + let y3 = f false x3 in + let y4 = f true x4 in + [ y1; y2; y3; y4 ] + | x1 :: x2 :: x3 :: x4 :: tail -> + (* make sure that tail is not empty *) + let y1 = f false x1 in + let y2 = f false x2 in + let y3 = f false x3 in + let y4 = f false x4 in + y1 :: y2 :: y3 :: y4 :: map_last tail f + +let rec mapi_aux lst i f tail = + match lst with + | [] -> tail + | a :: l -> + let r = f i a in + r :: mapi_aux l (i + 1) f tail + +let mapi lst f = mapi_aux lst 0 f [] + +let mapi_append lst f tail = mapi_aux lst 0 f tail + +let rec last xs = + match xs with + | [ x ] -> x + | _ :: tl -> last tl + | [] -> invalid_arg "Ext_list.last" + +let rec append_aux l1 l2 = + match l1 with + | [] -> l2 + | [ a0 ] -> a0 :: l2 + | [ a0; a1 ] -> a0 :: a1 :: l2 + | [ a0; a1; a2 ] -> a0 :: a1 :: a2 :: l2 + | [ a0; a1; a2; a3 ] -> a0 :: a1 :: a2 :: a3 :: l2 + | [ a0; a1; a2; a3; a4 ] -> a0 :: a1 :: a2 :: a3 :: a4 :: l2 + | a0 :: a1 :: a2 :: a3 :: a4 :: rest -> + a0 :: a1 :: a2 :: a3 :: a4 :: append_aux rest l2 + +let append l1 l2 = match l2 with [] -> l1 | _ -> append_aux l1 l2 + +let append_one l1 x = append_aux l1 [ x ] + +let rec map_append l1 l2 f = + match l1 with + | [] -> l2 + | [ a0 ] -> f a0 :: l2 + | [ a0; a1 ] -> + let b0 = f a0 in + let b1 = f a1 in + b0 :: b1 :: l2 + | [ a0; a1; a2 ] -> + let b0 = f a0 in + let b1 = f a1 in + let b2 = f a2 in + b0 :: b1 :: b2 :: l2 + | [ a0; a1; a2; a3 ] -> + let b0 = f a0 in + let b1 = f a1 in + let b2 = f a2 in + let b3 = f a3 in + b0 :: b1 :: b2 :: b3 :: l2 + | [ a0; a1; a2; a3; a4 ] -> + let b0 = f a0 in + let b1 = f a1 in + let b2 = f a2 in + let b3 = f a3 in + let b4 = f a4 in + b0 :: b1 :: b2 :: b3 :: b4 :: l2 + | a0 :: a1 :: a2 :: a3 :: a4 :: rest -> + let b0 = f a0 in + let b1 = f a1 in + let b2 = f a2 in + let b3 = f a3 in + let b4 = f a4 in + b0 :: b1 :: b2 :: b3 :: b4 :: map_append rest l2 f + +let rec fold_right l acc f = + match l with + | [] -> acc + | [ a0 ] -> f a0 acc + | [ a0; a1 ] -> f a0 (f a1 acc) + | [ a0; a1; a2 ] -> f a0 (f a1 (f a2 acc)) + | [ a0; a1; a2; a3 ] -> f a0 (f a1 (f a2 (f a3 acc))) + | [ a0; a1; a2; a3; a4 ] -> f a0 (f a1 (f a2 (f a3 (f a4 acc)))) + | a0 :: a1 :: a2 :: a3 :: a4 :: rest -> + f a0 (f a1 (f a2 (f a3 (f a4 (fold_right rest acc f))))) + +let rec fold_right2 l r acc f = + match (l, r) with + | [], [] -> acc + | [ a0 ], [ b0 ] -> f a0 b0 acc + | [ a0; a1 ], [ b0; b1 ] -> f a0 b0 (f a1 b1 acc) + | [ a0; a1; a2 ], [ b0; b1; b2 ] -> f a0 b0 (f a1 b1 (f a2 b2 acc)) + | [ a0; a1; a2; a3 ], [ b0; b1; b2; b3 ] -> + f a0 b0 (f a1 b1 (f a2 b2 (f a3 b3 acc))) + | [ a0; a1; a2; a3; a4 ], [ b0; b1; b2; b3; b4 ] -> + f a0 b0 (f a1 b1 (f a2 b2 (f a3 b3 (f a4 b4 acc)))) + | a0 :: a1 :: a2 :: a3 :: a4 :: arest, b0 :: b1 :: b2 :: b3 :: b4 :: brest -> + f a0 b0 + (f a1 b1 (f a2 b2 (f a3 b3 (f a4 b4 (fold_right2 arest brest acc f))))) + | _, _ -> invalid_arg "Ext_list.fold_right2" + +let rec fold_right3 l r last acc f = + match (l, r, last) with + | [], [], [] -> acc + | [ a0 ], [ b0 ], [ c0 ] -> f a0 b0 c0 acc + | [ a0; a1 ], [ b0; b1 ], [ c0; c1 ] -> f a0 b0 c0 (f a1 b1 c1 acc) + | [ a0; a1; a2 ], [ b0; b1; b2 ], [ c0; c1; c2 ] -> + f a0 b0 c0 (f a1 b1 c1 (f a2 b2 c2 acc)) + | [ a0; a1; a2; a3 ], [ b0; b1; b2; b3 ], [ c0; c1; c2; c3 ] -> + f a0 b0 c0 (f a1 b1 c1 (f a2 b2 c2 (f a3 b3 c3 acc))) + | [ a0; a1; a2; a3; a4 ], [ b0; b1; b2; b3; b4 ], [ c0; c1; c2; c3; c4 ] -> + f a0 b0 c0 (f a1 b1 c1 (f a2 b2 c2 (f a3 b3 c3 (f a4 b4 c4 acc)))) + | ( a0 :: a1 :: a2 :: a3 :: a4 :: arest, + b0 :: b1 :: b2 :: b3 :: b4 :: brest, + c0 :: c1 :: c2 :: c3 :: c4 :: crest ) -> + f a0 b0 c0 + (f a1 b1 c1 + (f a2 b2 c2 + (f a3 b3 c3 (f a4 b4 c4 (fold_right3 arest brest crest acc f))))) + | _, _, _ -> invalid_arg "Ext_list.fold_right2" + +let rec map2i l r f = + match (l, r) with + | [], [] -> [] + | [ a0 ], [ b0 ] -> [ f 0 a0 b0 ] + | [ a0; a1 ], [ b0; b1 ] -> + let c0 = f 0 a0 b0 in + let c1 = f 1 a1 b1 in + [ c0; c1 ] + | [ a0; a1; a2 ], [ b0; b1; b2 ] -> + let c0 = f 0 a0 b0 in + let c1 = f 1 a1 b1 in + let c2 = f 2 a2 b2 in + [ c0; c1; c2 ] + | [ a0; a1; a2; a3 ], [ b0; b1; b2; b3 ] -> + let c0 = f 0 a0 b0 in + let c1 = f 1 a1 b1 in + let c2 = f 2 a2 b2 in + let c3 = f 3 a3 b3 in + [ c0; c1; c2; c3 ] + | [ a0; a1; a2; a3; a4 ], [ b0; b1; b2; b3; b4 ] -> + let c0 = f 0 a0 b0 in + let c1 = f 1 a1 b1 in + let c2 = f 2 a2 b2 in + let c3 = f 3 a3 b3 in + let c4 = f 4 a4 b4 in + [ c0; c1; c2; c3; c4 ] + | a0 :: a1 :: a2 :: a3 :: a4 :: arest, b0 :: b1 :: b2 :: b3 :: b4 :: brest -> + let c0 = f 0 a0 b0 in + let c1 = f 1 a1 b1 in + let c2 = f 2 a2 b2 in + let c3 = f 3 a3 b3 in + let c4 = f 4 a4 b4 in + c0 :: c1 :: c2 :: c3 :: c4 :: map2i arest brest f + | _, _ -> invalid_arg "Ext_list.map2" + +let rec map2 l r f = + match (l, r) with + | [], [] -> [] + | [ a0 ], [ b0 ] -> [ f a0 b0 ] + | [ a0; a1 ], [ b0; b1 ] -> + let c0 = f a0 b0 in + let c1 = f a1 b1 in + [ c0; c1 ] + | [ a0; a1; a2 ], [ b0; b1; b2 ] -> + let c0 = f a0 b0 in + let c1 = f a1 b1 in + let c2 = f a2 b2 in + [ c0; c1; c2 ] + | [ a0; a1; a2; a3 ], [ b0; b1; b2; b3 ] -> + let c0 = f a0 b0 in + let c1 = f a1 b1 in + let c2 = f a2 b2 in + let c3 = f a3 b3 in + [ c0; c1; c2; c3 ] + | [ a0; a1; a2; a3; a4 ], [ b0; b1; b2; b3; b4 ] -> + let c0 = f a0 b0 in + let c1 = f a1 b1 in + let c2 = f a2 b2 in + let c3 = f a3 b3 in + let c4 = f a4 b4 in + [ c0; c1; c2; c3; c4 ] + | a0 :: a1 :: a2 :: a3 :: a4 :: arest, b0 :: b1 :: b2 :: b3 :: b4 :: brest -> + let c0 = f a0 b0 in + let c1 = f a1 b1 in + let c2 = f a2 b2 in + let c3 = f a3 b3 in + let c4 = f a4 b4 in + c0 :: c1 :: c2 :: c3 :: c4 :: map2 arest brest f + | _, _ -> invalid_arg "Ext_list.map2" + +let rec fold_left_with_offset l accu i f = + match l with + | [] -> accu + | a :: l -> fold_left_with_offset l (f a accu i) (i + 1) f + +let rec filter_map xs (f : 'a -> 'b option) = + match xs with + | [] -> [] + | y :: ys -> ( + match f y with None -> filter_map ys f | Some z -> z :: filter_map ys f) + +let rec exclude (xs : 'a list) (p : 'a -> bool) : 'a list = + match xs with + | [] -> [] + | x :: xs -> if p x then exclude xs p else x :: exclude xs p + +let rec exclude_with_val l p = + match l with + | [] -> None + | a0 :: xs -> ( + if p a0 then Some (exclude xs p) + else + match xs with + | [] -> None + | a1 :: rest -> ( + if p a1 then Some (a0 :: exclude rest p) + else + match exclude_with_val rest p with + | None -> None + | Some rest -> Some (a0 :: a1 :: rest))) + +let rec same_length xs ys = + match (xs, ys) with + | [], [] -> true + | _ :: xs, _ :: ys -> same_length xs ys + | _, _ -> false + +let init n f = + match n with + | 0 -> [] + | 1 -> + let a0 = f 0 in + [ a0 ] + | 2 -> + let a0 = f 0 in + let a1 = f 1 in + [ a0; a1 ] + | 3 -> + let a0 = f 0 in + let a1 = f 1 in + let a2 = f 2 in + [ a0; a1; a2 ] + | 4 -> + let a0 = f 0 in + let a1 = f 1 in + let a2 = f 2 in + let a3 = f 3 in + [ a0; a1; a2; a3 ] + | 5 -> + let a0 = f 0 in + let a1 = f 1 in + let a2 = f 2 in + let a3 = f 3 in + let a4 = f 4 in + [ a0; a1; a2; a3; a4 ] + | _ -> Array.to_list (Array.init n f) + +let rec rev_append l1 l2 = + match l1 with + | [] -> l2 + | [ a0 ] -> a0 :: l2 (* single element is common *) + | [ a0; a1 ] -> a1 :: a0 :: l2 + | a0 :: a1 :: a2 :: rest -> rev_append rest (a2 :: a1 :: a0 :: l2) + +let rev l = rev_append l [] + +let rec small_split_at n acc l = + if n <= 0 then (rev acc, l) + else + match l with + | x :: xs -> small_split_at (n - 1) (x :: acc) xs + | _ -> invalid_arg "Ext_list.split_at" + +let split_at l n = small_split_at n [] l + +let rec split_at_last_aux acc x = + match x with + | [] -> invalid_arg "Ext_list.split_at_last" + | [ x ] -> (rev acc, x) + | y0 :: ys -> split_at_last_aux (y0 :: acc) ys + +let split_at_last (x : 'a list) = + match x with + | [] -> invalid_arg "Ext_list.split_at_last" + | [ a0 ] -> ([], a0) + | [ a0; a1 ] -> ([ a0 ], a1) + | [ a0; a1; a2 ] -> ([ a0; a1 ], a2) + | [ a0; a1; a2; a3 ] -> ([ a0; a1; a2 ], a3) + | [ a0; a1; a2; a3; a4 ] -> ([ a0; a1; a2; a3 ], a4) + | a0 :: a1 :: a2 :: a3 :: a4 :: rest -> + let rev, last = split_at_last_aux [] rest in + (a0 :: a1 :: a2 :: a3 :: a4 :: rev, last) + +(** + can not do loop unroll due to state combination +*) +let filter_mapi xs f = + let rec aux i xs = + match xs with + | [] -> [] + | y :: ys -> ( + match f y i with + | None -> aux (i + 1) ys + | Some z -> z :: aux (i + 1) ys) + in + aux 0 xs + +let rec filter_map2 xs ys (f : 'a -> 'b -> 'c option) = + match (xs, ys) with + | [], [] -> [] + | u :: us, v :: vs -> ( + match f u v with + | None -> filter_map2 us vs f (* idea: rec f us vs instead? *) + | Some z -> z :: filter_map2 us vs f) + | _ -> invalid_arg "Ext_list.filter_map2" + +let rec rev_map_append l1 l2 f = + match l1 with [] -> l2 | a :: l -> rev_map_append l (f a :: l2) f + +(** It is not worth loop unrolling, + it is already tail-call, and we need to be careful + about evaluation order when unroll +*) +let rec flat_map_aux f acc append lx = + match lx with + | [] -> rev_append acc append + | a0 :: rest -> + let new_acc = + match f a0 with + | [] -> acc + | [ a0 ] -> a0 :: acc + | [ a0; a1 ] -> a1 :: a0 :: acc + | a0 :: a1 :: a2 :: rest -> rev_append rest (a2 :: a1 :: a0 :: acc) + in + flat_map_aux f new_acc append rest + +let flat_map lx f = flat_map_aux f [] [] lx + +let flat_map_append lx append f = flat_map_aux f [] append lx + +let rec length_compare l n = + if n < 0 then `Gt + else + match l with + | _ :: xs -> length_compare xs (n - 1) + | [] -> if n = 0 then `Eq else `Lt + +let rec length_ge l n = + if n > 0 then match l with _ :: tl -> length_ge tl (n - 1) | [] -> false + else true + +(** + {[length xs = length ys + n ]} +*) +let rec length_larger_than_n xs ys n = + match (xs, ys) with + | _, [] -> length_compare xs n = `Eq + | _ :: xs, _ :: ys -> length_larger_than_n xs ys n + | [], _ -> false + +let rec group (eq : 'a -> 'a -> bool) lst = + match lst with [] -> [] | x :: xs -> aux eq x (group eq xs) + +and aux eq (x : 'a) (xss : 'a list list) : 'a list list = + match xss with + | [] -> [ [ x ] ] + | (y0 :: _ as y) :: ys -> + (* cannot be empty *) + if eq x y0 then (x :: y) :: ys else y :: aux eq x ys + | _ :: _ -> assert false + +let stable_group lst eq = group eq lst |> rev + +let rec drop h n = + if n < 0 then invalid_arg "Ext_list.drop" + else if n = 0 then h + else + match h with [] -> invalid_arg "Ext_list.drop" | _ :: tl -> drop tl (n - 1) + +let rec find_first x p = + match x with [] -> None | x :: l -> if p x then Some x else find_first l p + +let rec find_first_not xs p = + match xs with + | [] -> None + | a :: l -> if p a then find_first_not l p else Some a + +let rec rev_iter l f = + match l with + | [] -> () + | [ x1 ] -> f x1 + | [ x1; x2 ] -> + f x2; + f x1 + | [ x1; x2; x3 ] -> + f x3; + f x2; + f x1 + | [ x1; x2; x3; x4 ] -> + f x4; + f x3; + f x2; + f x1 + | x1 :: x2 :: x3 :: x4 :: x5 :: tail -> + rev_iter tail f; + f x5; + f x4; + f x3; + f x2; + f x1 + +let rec iter l f = + match l with + | [] -> () + | [ x1 ] -> f x1 + | [ x1; x2 ] -> + f x1; + f x2 + | [ x1; x2; x3 ] -> + f x1; + f x2; + f x3 + | [ x1; x2; x3; x4 ] -> + f x1; + f x2; + f x3; + f x4 + | x1 :: x2 :: x3 :: x4 :: x5 :: tail -> + f x1; + f x2; + f x3; + f x4; + f x5; + iter tail f + +let rec for_all lst p = + match lst with [] -> true | a :: l -> p a && for_all l p + +let rec for_all_snd lst p = + match lst with [] -> true | (_, a) :: l -> p a && for_all_snd l p + +let rec for_all2_no_exn l1 l2 p = + match (l1, l2) with + | [], [] -> true + | a1 :: l1, a2 :: l2 -> p a1 a2 && for_all2_no_exn l1 l2 p + | _, _ -> false + +let rec find_opt xs p = + match xs with + | [] -> None + | x :: l -> ( match p x with Some _ as v -> v | None -> find_opt l p) + +let rec find_def xs p def = + match xs with + | [] -> def + | x :: l -> ( match p x with Some v -> v | None -> find_def l p def) + +let rec split_map l f = + match l with + | [] -> ([], []) + | [ x1 ] -> + let a0, b0 = f x1 in + ([ a0 ], [ b0 ]) + | [ x1; x2 ] -> + let a1, b1 = f x1 in + let a2, b2 = f x2 in + ([ a1; a2 ], [ b1; b2 ]) + | [ x1; x2; x3 ] -> + let a1, b1 = f x1 in + let a2, b2 = f x2 in + let a3, b3 = f x3 in + ([ a1; a2; a3 ], [ b1; b2; b3 ]) + | [ x1; x2; x3; x4 ] -> + let a1, b1 = f x1 in + let a2, b2 = f x2 in + let a3, b3 = f x3 in + let a4, b4 = f x4 in + ([ a1; a2; a3; a4 ], [ b1; b2; b3; b4 ]) + | x1 :: x2 :: x3 :: x4 :: x5 :: tail -> + let a1, b1 = f x1 in + let a2, b2 = f x2 in + let a3, b3 = f x3 in + let a4, b4 = f x4 in + let a5, b5 = f x5 in + let ass, bss = split_map tail f in + (a1 :: a2 :: a3 :: a4 :: a5 :: ass, b1 :: b2 :: b3 :: b4 :: b5 :: bss) + +let sort_via_array lst cmp = + let arr = Array.of_list lst in + Array.sort cmp arr; + Array.to_list arr + +let sort_via_arrayf lst cmp f = + let arr = Array.of_list lst in + Array.sort cmp arr; + Ext_array.to_list_f arr f + +let rec assoc_by_string lst (k : string) def = + match lst with + | [] -> ( match def with None -> assert false | Some x -> x) + | (k1, v1) :: rest -> if k1 = k then v1 else assoc_by_string rest k def + +let rec assoc_by_int lst (k : int) def = + match lst with + | [] -> ( match def with None -> assert false | Some x -> x) + | (k1, v1) :: rest -> if k1 = k then v1 else assoc_by_int rest k def + +let rec nth_aux l n = + match l with + | [] -> None + | a :: l -> if n = 0 then Some a else nth_aux l (n - 1) + +let nth_opt l n = if n < 0 then None else nth_aux l n + +let rec iter_snd lst f = + match lst with + | [] -> () + | (_, x) :: xs -> + f x; + iter_snd xs f + +let rec iter_fst lst f = + match lst with + | [] -> () + | (x, _) :: xs -> + f x; + iter_fst xs f + +let rec exists l p = match l with [] -> false | x :: xs -> p x || exists xs p + +let rec exists_fst l p = + match l with [] -> false | (a, _) :: l -> p a || exists_fst l p + +let rec exists_snd l p = + match l with [] -> false | (_, a) :: l -> p a || exists_snd l p + +let rec concat_append (xss : 'a list list) (xs : 'a list) : 'a list = + match xss with [] -> xs | l :: r -> append l (concat_append r xs) + +let rec fold_left l accu f = + match l with [] -> accu | a :: l -> fold_left l (f accu a) f + +let reduce_from_left lst fn = + match lst with + | first :: rest -> fold_left rest first fn + | _ -> invalid_arg "Ext_list.reduce_from_left" + +let rec fold_left2 l1 l2 accu f = + match (l1, l2) with + | [], [] -> accu + | a1 :: l1, a2 :: l2 -> fold_left2 l1 l2 (f a1 a2 accu) f + | _, _ -> invalid_arg "Ext_list.fold_left2" + +let singleton_exn xs = match xs with [ x ] -> x | _ -> assert false + +let rec mem_string (xs : string list) (x : string) = + match xs with [] -> false | a :: l -> a = x || mem_string l x + +let filter lst p = + let rec find ~p accu lst = + match lst with + | [] -> rev accu + | x :: l -> if p x then find (x :: accu) l ~p else find accu l ~p + in + find [] lst ~p diff --git a/analysis/vendor/ext/ext_list.mli b/analysis/vendor/ext/ext_list.mli new file mode 100644 index 000000000..95a078bd3 --- /dev/null +++ b/analysis/vendor/ext/ext_list.mli @@ -0,0 +1,233 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +val map : 'a list -> ('a -> 'b) -> 'b list + +val map_combine : 'a list -> 'b list -> ('a -> 'c) -> ('c * 'b) list + +val combine_array : 'a array -> 'b list -> ('a -> 'c) -> ('c * 'b) list + +val combine_array_append : + 'a array -> 'b list -> ('c * 'b) list -> ('a -> 'c) -> ('c * 'b) list + +val has_string : string list -> string -> bool + +val map_split_opt : + 'a list -> ('a -> 'b option * 'c option) -> 'b list * 'c list + +val mapi : 'a list -> (int -> 'a -> 'b) -> 'b list + +val mapi_append : 'a list -> (int -> 'a -> 'b) -> 'b list -> 'b list + +val map_snd : ('a * 'b) list -> ('b -> 'c) -> ('a * 'c) list + +val map_last : 'a list -> (bool -> 'a -> 'b) -> 'b list +(** [map_last f xs ] + will pass [true] to [f] for the last element, + [false] otherwise. + For empty list, it returns empty +*) + +val last : 'a list -> 'a +(** [last l] + return the last element + raise if the list is empty +*) + +val append : 'a list -> 'a list -> 'a list + +val append_one : 'a list -> 'a -> 'a list + +val map_append : 'b list -> 'a list -> ('b -> 'a) -> 'a list + +val fold_right : 'a list -> 'b -> ('a -> 'b -> 'b) -> 'b + +val fold_right2 : 'a list -> 'b list -> 'c -> ('a -> 'b -> 'c -> 'c) -> 'c + +val fold_right3 : + 'a list -> 'b list -> 'c list -> 'd -> ('a -> 'b -> 'c -> 'd -> 'd) -> 'd + +val map2 : 'a list -> 'b list -> ('a -> 'b -> 'c) -> 'c list + +val map2i : 'a list -> 'b list -> (int -> 'a -> 'b -> 'c) -> 'c list + +val fold_left_with_offset : + 'a list -> 'acc -> int -> ('a -> 'acc -> int -> 'acc) -> 'acc + +val filter_map : 'a list -> ('a -> 'b option) -> 'b list +(** @unused *) + +val exclude : 'a list -> ('a -> bool) -> 'a list +(** [exclude p l] is the opposite of [filter p l] *) + +val exclude_with_val : 'a list -> ('a -> bool) -> 'a list option +(** [excludes p l] + return a tuple [excluded,newl] + where [exluded] is true indicates that at least one + element is removed,[newl] is the new list where all [p x] for [x] is false + +*) + +val same_length : 'a list -> 'b list -> bool + +val init : int -> (int -> 'a) -> 'a list + +val split_at : 'a list -> int -> 'a list * 'a list +(** [split_at n l] + will split [l] into two lists [a,b], [a] will be of length [n], + otherwise, it will raise +*) + +val split_at_last : 'a list -> 'a list * 'a +(** [split_at_last l] + It is equivalent to [split_at (List.length l - 1) l ] +*) + +val filter_mapi : 'a list -> ('a -> int -> 'b option) -> 'b list + +val filter_map2 : 'a list -> 'b list -> ('a -> 'b -> 'c option) -> 'c list + +val length_compare : 'a list -> int -> [ `Gt | `Eq | `Lt ] + +val length_ge : 'a list -> int -> bool + +(** + + {[length xs = length ys + n ]} + input n should be positive + TODO: input checking +*) + +val length_larger_than_n : 'a list -> 'a list -> int -> bool + +val rev_map_append : 'a list -> 'b list -> ('a -> 'b) -> 'b list +(** + [rev_map_append f l1 l2] + [map f l1] and reverse it to append [l2] + This weird semantics is due to it is the most efficient operation + we can do +*) + +val flat_map : 'a list -> ('a -> 'b list) -> 'b list + +val flat_map_append : 'a list -> 'b list -> ('a -> 'b list) -> 'b list + +val stable_group : 'a list -> ('a -> 'a -> bool) -> 'a list list +(** + [stable_group eq lst] + Example: + Input: + {[ + stable_group (=) [1;2;3;4;3] + ]} + Output: + {[ + [[1];[2];[4];[3;3]] + ]} + TODO: this is O(n^2) behavior + which could be improved later +*) + +val drop : 'a list -> int -> 'a list +(** [drop n list] + raise when [n] is negative + raise when list's length is less than [n] +*) + +val find_first : 'a list -> ('a -> bool) -> 'a option + +val find_first_not : 'a list -> ('a -> bool) -> 'a option +(** [find_first_not p lst ] + if all elements in [lst] pass, return [None] + otherwise return the first element [e] as [Some e] which + fails the predicate +*) + +(** [find_opt f l] returns [None] if all return [None], + otherwise returns the first one. +*) + +val find_opt : 'a list -> ('a -> 'b option) -> 'b option + +val find_def : 'a list -> ('a -> 'b option) -> 'b -> 'b + +val rev_iter : 'a list -> ('a -> unit) -> unit + +val iter : 'a list -> ('a -> unit) -> unit + +val for_all : 'a list -> ('a -> bool) -> bool + +val for_all_snd : ('a * 'b) list -> ('b -> bool) -> bool + +val for_all2_no_exn : 'a list -> 'b list -> ('a -> 'b -> bool) -> bool +(** [for_all2_no_exn p xs ys] + return [true] if all satisfied, + [false] otherwise or length not equal +*) + +val split_map : 'a list -> ('a -> 'b * 'c) -> 'b list * 'c list +(** [f] is applied follow the list order *) + +val reduce_from_left : 'a list -> ('a -> 'a -> 'a) -> 'a +(** [fn] is applied from left to right *) + +val sort_via_array : 'a list -> ('a -> 'a -> int) -> 'a list + +val sort_via_arrayf : 'a list -> ('a -> 'a -> int) -> ('a -> 'b) -> 'b list + +val assoc_by_string : (string * 'a) list -> string -> 'a option -> 'a +(** [assoc_by_string default key lst] + if [key] is found in the list return that val, + other unbox the [default], + otherwise [assert false ] +*) + +val assoc_by_int : (int * 'a) list -> int -> 'a option -> 'a + +val nth_opt : 'a list -> int -> 'a option + +val iter_snd : ('a * 'b) list -> ('b -> unit) -> unit + +val iter_fst : ('a * 'b) list -> ('a -> unit) -> unit + +val exists : 'a list -> ('a -> bool) -> bool + +val exists_fst : ('a * 'b) list -> ('a -> bool) -> bool + +val exists_snd : ('a * 'b) list -> ('b -> bool) -> bool + +val concat_append : 'a list list -> 'a list -> 'a list + +val fold_left2 : 'a list -> 'b list -> 'c -> ('a -> 'b -> 'c -> 'c) -> 'c + +val fold_left : 'a list -> 'b -> ('b -> 'a -> 'b) -> 'b + +val singleton_exn : 'a list -> 'a + +val mem_string : string list -> string -> bool + +val filter : 'a list -> ('a -> bool) -> 'a list + +val array_list_filter_map : + 'a array -> 'b list -> ('a -> 'b -> 'c option) -> 'c list diff --git a/analysis/vendor/ext/ext_marshal.ml b/analysis/vendor/ext/ext_marshal.ml new file mode 100644 index 000000000..73b1b3087 --- /dev/null +++ b/analysis/vendor/ext/ext_marshal.ml @@ -0,0 +1,25 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +let from_string (s : string) = Marshal.from_string s 0 diff --git a/analysis/vendor/ext/ext_marshal.mli b/analysis/vendor/ext/ext_marshal.mli new file mode 100644 index 000000000..9980f8846 --- /dev/null +++ b/analysis/vendor/ext/ext_marshal.mli @@ -0,0 +1,28 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(** Extension to the standard library [Marshall] module +*) + +val from_string : string -> 'a diff --git a/analysis/vendor/ext/ext_module_system.ml b/analysis/vendor/ext/ext_module_system.ml new file mode 100644 index 000000000..b3178b0c9 --- /dev/null +++ b/analysis/vendor/ext/ext_module_system.ml @@ -0,0 +1 @@ +type t = NodeJS | Es6 | Es6_global diff --git a/analysis/vendor/ext/ext_modulename.ml b/analysis/vendor/ext/ext_modulename.ml new file mode 100644 index 000000000..ddc0292de --- /dev/null +++ b/analysis/vendor/ext/ext_modulename.ml @@ -0,0 +1,84 @@ +(* Copyright (C) 2017 Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +let good_hint_name module_name offset = + let len = String.length module_name in + len > offset + && (function 'a' .. 'z' | 'A' .. 'Z' -> true | _ -> false) + (String.unsafe_get module_name offset) + && Ext_string.for_all_from module_name (offset + 1) (function + | 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' -> true + | _ -> false) + +let rec collect_start buf s off len = + if off >= len then () + else + let next = succ off in + match String.unsafe_get s off with + | 'a' .. 'z' as c -> + Ext_buffer.add_char buf (Char.uppercase_ascii c); + collect_next buf s next len + | 'A' .. 'Z' as c -> + Ext_buffer.add_char buf c; + collect_next buf s next len + | _ -> collect_start buf s next len + +and collect_next buf s off len = + if off >= len then () + else + let next = off + 1 in + match String.unsafe_get s off with + | ('a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_') as c -> + Ext_buffer.add_char buf c; + collect_next buf s next len + | '.' | '-' -> collect_start buf s next len + | _ -> collect_next buf s next len + +(** This is for a js exeternal module, we can change it when printing + for example + {[ + var React$1 = require('react'); + React$1.render(..) + ]} + Given a name, if duplicated, they should have the same id +*) +let js_id_name_of_hint_name module_name = + let i = Ext_string.rindex_neg module_name '/' in + if i >= 0 then ( + let offset = succ i in + if good_hint_name module_name offset then + Ext_string.capitalize_ascii (Ext_string.tail_from module_name offset) + else + let str_len = String.length module_name in + let buf = Ext_buffer.create str_len in + collect_start buf module_name offset str_len; + if Ext_buffer.is_empty buf then Ext_string.capitalize_ascii module_name + else Ext_buffer.contents buf) + else if good_hint_name module_name 0 then + Ext_string.capitalize_ascii module_name + else + let str_len = String.length module_name in + let buf = Ext_buffer.create str_len in + collect_start buf module_name 0 str_len; + if Ext_buffer.is_empty buf then module_name else Ext_buffer.contents buf diff --git a/analysis/vendor/ext/ext_modulename.mli b/analysis/vendor/ext/ext_modulename.mli new file mode 100644 index 000000000..d59902439 --- /dev/null +++ b/analysis/vendor/ext/ext_modulename.mli @@ -0,0 +1,28 @@ +(* Copyright (C) 2017 Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +val js_id_name_of_hint_name : string -> string +(** Given an JS bundle name, generate a meaningful + bounded module name +*) diff --git a/analysis/vendor/ext/ext_namespace.ml b/analysis/vendor/ext/ext_namespace.ml new file mode 100644 index 000000000..7781b80c9 --- /dev/null +++ b/analysis/vendor/ext/ext_namespace.ml @@ -0,0 +1,88 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +let rec rindex_rec s i = + if i < 0 then i + else + let char = String.unsafe_get s i in + if Ext_filename.is_dir_sep char then -1 + else if char = Literals.ns_sep_char then i + else rindex_rec s (i - 1) + +let change_ext_ns_suffix name ext = + let i = rindex_rec name (String.length name - 1) in + if i < 0 then name ^ ext else String.sub name 0 i ^ ext +(* FIXME: micro-optimizaiton*) + +let try_split_module_name name = + let len = String.length name in + let i = rindex_rec name (len - 1) in + if i < 0 then None + else Some (String.sub name (i + 1) (len - i - 1), String.sub name 0 i) + +let js_name_of_modulename s (case : Ext_js_file_kind.case) suffix : string = + let s = + match case with Little -> Ext_string.uncapitalize_ascii s | Upper -> s + in + change_ext_ns_suffix s (Ext_js_suffix.to_string suffix) + +(* https://docs.npmjs.com/files/package.json + Some rules: + The name must be less than or equal to 214 characters. This includes the scope for scoped packages. + The name can't start with a dot or an underscore. + New packages must not have uppercase letters in the name. + The name ends up being part of a URL, an argument on the command line, and a folder name. Therefore, the name can't contain any non-URL-safe characters. +*) +let is_valid_npm_package_name (s : string) = + let len = String.length s in + len <= 214 (* magic number forced by npm *) + && len > 0 + && + match String.unsafe_get s 0 with + | 'a' .. 'z' | '@' -> + Ext_string.for_all_from s 1 (fun x -> + match x with + | 'a' .. 'z' | '0' .. '9' | '_' | '-' -> true + | _ -> false) + | _ -> false + +let namespace_of_package_name (s : string) : string = + let len = String.length s in + let buf = Ext_buffer.create len in + let add capital ch = + Ext_buffer.add_char buf (if capital then Char.uppercase_ascii ch else ch) + in + let rec aux capital off len = + if off >= len then () + else + let ch = String.unsafe_get s off in + match ch with + | 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' -> + add capital ch; + aux false (off + 1) len + | '/' | '-' -> aux true (off + 1) len + | _ -> aux capital (off + 1) len + in + aux true 0 len; + Ext_buffer.contents buf diff --git a/analysis/vendor/ext/ext_namespace.mli b/analysis/vendor/ext/ext_namespace.mli new file mode 100644 index 000000000..830e74cba --- /dev/null +++ b/analysis/vendor/ext/ext_namespace.mli @@ -0,0 +1,51 @@ +(* Copyright (C) 2017- Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +val try_split_module_name : string -> (string * string) option + +(* Note we have to output uncapitalized file Name, + or at least be consistent, since by reading cmi file on Case insensitive OS, we don't really know it is `list.cmi` or `List.cmi`, so that `require (./list.js)` or `require(./List.js)` + relevant issues: #1609, #913 + + #1933 when removing ns suffix, don't pass the bound + of basename +*) +val change_ext_ns_suffix : string -> string -> string + +val js_name_of_modulename : + string -> Ext_js_file_kind.case -> Ext_js_suffix.t -> string +(** [js_name_of_modulename ~little A-Ns] +*) + +(* TODO handle cases like + '@angular/core' + its directory structure is like + {[ + @angular + |-------- core + ]} +*) +val is_valid_npm_package_name : string -> bool + +val namespace_of_package_name : string -> string diff --git a/analysis/vendor/ext/ext_namespace_encode.ml b/analysis/vendor/ext/ext_namespace_encode.ml new file mode 100644 index 000000000..071a92c96 --- /dev/null +++ b/analysis/vendor/ext/ext_namespace_encode.ml @@ -0,0 +1,26 @@ +(* Copyright (C) 2020- Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +let make ?ns cunit = + match ns with None -> cunit | Some ns -> cunit ^ Literals.ns_sep ^ ns diff --git a/analysis/vendor/ext/ext_namespace_encode.mli b/analysis/vendor/ext/ext_namespace_encode.mli new file mode 100644 index 000000000..7042a13c1 --- /dev/null +++ b/analysis/vendor/ext/ext_namespace_encode.mli @@ -0,0 +1,29 @@ +(* Copyright (C) 2020- Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +val make : ?ns:string -> string -> string +(** [make ~ns:"Ns" "a" ] + A typical example would return "a-Ns" + Note the namespace comes from the output of [namespace_of_package_name] +*) diff --git a/analysis/vendor/ext/ext_obj.ml b/analysis/vendor/ext/ext_obj.ml new file mode 100644 index 000000000..f57d9f680 --- /dev/null +++ b/analysis/vendor/ext/ext_obj.ml @@ -0,0 +1,124 @@ +(* Copyright (C) 2019-Present Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +let rec dump r = + if Obj.is_int r then string_of_int (Obj.magic r : int) + else + (* Block. *) + let rec get_fields acc = function + | 0 -> acc + | n -> + let n = n - 1 in + get_fields (Obj.field r n :: acc) n + in + let rec is_list r = + if Obj.is_int r then r = Obj.repr 0 (* [] *) + else + let s = Obj.size r and t = Obj.tag r in + t = 0 && s = 2 && is_list (Obj.field r 1) + (* h :: t *) + in + let rec get_list r = + if Obj.is_int r then [] + else + let h = Obj.field r 0 and t = get_list (Obj.field r 1) in + h :: t + in + let opaque name = + (* XXX In future, print the address of value 'r'. Not possible + * in pure OCaml at the moment. *) + "<" ^ name ^ ">" + in + let s = Obj.size r and t = Obj.tag r in + (* From the tag, determine the type of block. *) + match t with + | _ when is_list r -> + let fields = get_list r in + "[" ^ String.concat "; " (Ext_list.map fields dump) ^ "]" + | 0 -> + let fields = get_fields [] s in + "(" ^ String.concat ", " (Ext_list.map fields dump) ^ ")" + | x when x = Obj.lazy_tag -> + (* Note that [lazy_tag .. forward_tag] are < no_scan_tag. Not + * clear if very large constructed values could have the same + * tag. XXX *) + opaque "lazy" + | x when x = Obj.closure_tag -> opaque "closure" + | x when x = Obj.object_tag -> + let fields = get_fields [] s in + let _clasz, id, slots = + match fields with h :: h' :: t -> (h, h', t) | _ -> assert false + in + (* No information on decoding the class (first field). So just print + * out the ID and the slots. *) + "Object #" ^ dump id ^ " (" + ^ String.concat ", " (Ext_list.map slots dump) + ^ ")" + | x when x = Obj.infix_tag -> opaque "infix" + | x when x = Obj.forward_tag -> opaque "forward" + | x when x < Obj.no_scan_tag -> + let fields = get_fields [] s in + "Tag" ^ string_of_int t ^ " (" + ^ String.concat ", " (Ext_list.map fields dump) + ^ ")" + | x when x = Obj.string_tag -> + "\"" ^ String.escaped (Obj.magic r : string) ^ "\"" + | x when x = Obj.double_tag -> string_of_float (Obj.magic r : float) + | x when x = Obj.abstract_tag -> opaque "abstract" + | x when x = Obj.custom_tag -> opaque "custom" + | x when x = Obj.custom_tag -> opaque "final" + | x when x = Obj.double_array_tag -> + "[|" + ^ String.concat ";" + (Array.to_list + (Array.map string_of_float (Obj.magic r : float array))) + ^ "|]" + | _ -> opaque (Printf.sprintf "unknown: tag %d size %d" t s) + +let dump v = dump (Obj.repr v) + +let dump_endline ?(__LOC__ = "") v = + print_endline __LOC__; + print_endline (dump v) + +let pp_any fmt v = Format.fprintf fmt "@[%s@]" (dump v) + +let bt () = + let raw_bt = Printexc.backtrace_slots (Printexc.get_raw_backtrace ()) in + match raw_bt with + | None -> () + | Some raw_bt -> + let acc = ref [] in + for i = Array.length raw_bt - 1 downto 0 do + let slot = raw_bt.(i) in + match Printexc.Slot.location slot with + | None -> () + | Some bt -> ( + match !acc with + | [] -> acc := [ bt ] + | hd :: _ -> if hd <> bt then acc := bt :: !acc) + done; + Ext_list.iter !acc (fun bt -> + Printf.eprintf "File \"%s\", line %d, characters %d-%d\n" bt.filename + bt.line_number bt.start_char bt.end_char) diff --git a/analysis/vendor/ext/ext_obj.mli b/analysis/vendor/ext/ext_obj.mli new file mode 100644 index 000000000..dddf4735a --- /dev/null +++ b/analysis/vendor/ext/ext_obj.mli @@ -0,0 +1,30 @@ +(* Copyright (C) 2019-Present Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +val dump : 'a -> string + +val dump_endline : ?__LOC__:string -> 'a -> unit + +val pp_any : Format.formatter -> 'a -> unit + +val bt : unit -> unit diff --git a/analysis/vendor/ext/ext_option.ml b/analysis/vendor/ext/ext_option.ml new file mode 100644 index 000000000..0e4f128ab --- /dev/null +++ b/analysis/vendor/ext/ext_option.ml @@ -0,0 +1,29 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +let map v f = match v with None -> None | Some x -> Some (f x) + +let iter v f = match v with None -> () | Some x -> f x + +let exists v f = match v with None -> false | Some x -> f x diff --git a/analysis/vendor/ext/ext_option.mli b/analysis/vendor/ext/ext_option.mli new file mode 100644 index 000000000..41e0bb042 --- /dev/null +++ b/analysis/vendor/ext/ext_option.mli @@ -0,0 +1,31 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(** Utilities for [option] type *) + +val map : 'a option -> ('a -> 'b) -> 'b option + +val iter : 'a option -> ('a -> unit) -> unit + +val exists : 'a option -> ('a -> bool) -> bool diff --git a/analysis/vendor/ext/ext_path.ml b/analysis/vendor/ext/ext_path.ml new file mode 100644 index 000000000..9ad999077 --- /dev/null +++ b/analysis/vendor/ext/ext_path.ml @@ -0,0 +1,274 @@ +(* Copyright (C) 2017 Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(* [@@@warning "-37"] *) +type t = (* | File of string *) + | Dir of string [@@unboxed] + +let simple_convert_node_path_to_os_path = + if Sys.unix then fun x -> x + else if Sys.win32 || Sys.cygwin then Ext_string.replace_slash_backward + else failwith ("Unknown OS : " ^ Sys.os_type) + +let cwd = lazy (Sys.getcwd ()) + +let split_by_sep_per_os : string -> string list = + if Ext_sys.is_windows_or_cygwin then fun x -> + (* on Windows, we can still accept -bs-package-output lib/js *) + Ext_string.split_by + (fun x -> match x with '/' | '\\' -> true | _ -> false) + x + else fun x -> Ext_string.split x '/' + +(** example + {[ + "/bb/mbigc/mbig2899/bgit/bucklescript/jscomp/stdlib/external/pervasives.cmj" + "/bb/mbigc/mbig2899/bgit/bucklescript/jscomp/stdlib/ocaml_array.ml" + ]} + + The other way + {[ + + "/bb/mbigc/mbig2899/bgit/bucklescript/jscomp/stdlib/ocaml_array.ml" + "/bb/mbigc/mbig2899/bgit/bucklescript/jscomp/stdlib/external/pervasives.cmj" + ]} + {[ + "/bb/mbigc/mbig2899/bgit/bucklescript/jscomp/stdlib//ocaml_array.ml" + ]} + {[ + /a/b + /c/d + ]} +*) +let node_relative_path ~from:(file_or_dir_2 : t) (file_or_dir_1 : t) = + let relevant_dir1 = + match file_or_dir_1 with Dir x -> x + (* | File file1 -> Filename.dirname file1 *) + in + let relevant_dir2 = + match file_or_dir_2 with Dir x -> x + (* | File file2 -> Filename.dirname file2 *) + in + let dir1 = split_by_sep_per_os relevant_dir1 in + let dir2 = split_by_sep_per_os relevant_dir2 in + let rec go (dir1 : string list) (dir2 : string list) = + match (dir1, dir2) with + | "." :: xs, ys -> go xs ys + | xs, "." :: ys -> go xs ys + | x :: xs, y :: ys when x = y -> go xs ys + | _, _ -> Ext_list.map_append dir2 dir1 (fun _ -> Literals.node_parent) + in + match go dir1 dir2 with + | x :: _ as ys when x = Literals.node_parent -> + String.concat Literals.node_sep ys + | ys -> String.concat Literals.node_sep @@ (Literals.node_current :: ys) + +let node_concat ~dir base = dir ^ Literals.node_sep ^ base + +let node_rebase_file ~from ~to_ file = + node_concat + ~dir: + (if from = to_ then Literals.node_current + else node_relative_path ~from:(Dir from) (Dir to_)) + file + +(*** + {[ + Filename.concat "." "";; + "./" + ]} +*) +let combine path1 path2 = + if Filename.is_relative path2 then + if Ext_string.is_empty path2 then path1 + else if path1 = Filename.current_dir_name then path2 + else if path2 = Filename.current_dir_name then path1 + else Filename.concat path1 path2 + else path2 + +let ( // ) x y = + if x = Filename.current_dir_name then y + else if y = Filename.current_dir_name then x + else Filename.concat x y + +(** + {[ + split_aux "//ghosg//ghsogh/";; + - : string * string list = ("/", ["ghosg"; "ghsogh"]) + ]} + Note that + {[ + Filename.dirname "/a/" = "/" + Filename.dirname "/a/b/" = Filename.dirname "/a/b" = "/a" + ]} + Special case: + {[ + basename "//" = "/" + basename "///" = "/" + ]} + {[ + basename "" = "." + basename "" = "." + dirname "" = "." + dirname "" = "." + ]} +*) +let split_aux p = + let rec go p acc = + let dir = Filename.dirname p in + if dir = p then (dir, acc) + else + let new_path = Filename.basename p in + if Ext_string.equal new_path Filename.dir_sep then go dir acc + (* We could do more path simplification here + leave to [rel_normalized_absolute_path] + *) + else go dir (new_path :: acc) + in + + go p [] + +(** + TODO: optimization + if [from] and [to] resolve to the same path, a zero-length string is returned + + This function is useed in [es6-global] and + [amdjs-global] format and tailored for `rollup` +*) +let rel_normalized_absolute_path ~from to_ = + let root1, paths1 = split_aux from in + let root2, paths2 = split_aux to_ in + if root1 <> root2 then root2 + else + let rec go xss yss = + match (xss, yss) with + | x :: xs, y :: ys -> + if Ext_string.equal x y then go xs ys + else if x = Filename.current_dir_name then go xs yss + else if y = Filename.current_dir_name then go xss ys + else + let start = + Ext_list.fold_left xs Ext_string.parent_dir_lit (fun acc _ -> + acc // Ext_string.parent_dir_lit) + in + Ext_list.fold_left yss start (fun acc v -> acc // v) + | [], [] -> Ext_string.empty + | [], y :: ys -> Ext_list.fold_left ys y (fun acc x -> acc // x) + | _ :: xs, [] -> + Ext_list.fold_left xs Ext_string.parent_dir_lit (fun acc _ -> + acc // Ext_string.parent_dir_lit) + in + let v = go paths1 paths2 in + + if Ext_string.is_empty v then Literals.node_current + else if + v = "." || v = ".." + || Ext_string.starts_with v "./" + || Ext_string.starts_with v "../" + then v + else "./" ^ v + +(*TODO: could be hgighly optimized later + {[ + normalize_absolute_path "/gsho/./..";; + + normalize_absolute_path "/a/b/../c../d/e/f";; + + normalize_absolute_path "/gsho/./..";; + + normalize_absolute_path "/gsho/./../..";; + + normalize_absolute_path "/a/b/c/d";; + + normalize_absolute_path "/a/b/c/d/";; + + normalize_absolute_path "/a/";; + + normalize_absolute_path "/a";; + ]} +*) + +(** See tests in {!Ounit_path_tests} *) +let normalize_absolute_path x = + let drop_if_exist xs = match xs with [] -> [] | _ :: xs -> xs in + let rec normalize_list acc paths = + match paths with + | [] -> acc + | x :: xs -> + if Ext_string.equal x Ext_string.current_dir_lit then + normalize_list acc xs + else if Ext_string.equal x Ext_string.parent_dir_lit then + normalize_list (drop_if_exist acc) xs + else normalize_list (x :: acc) xs + in + let root, paths = split_aux x in + let rev_paths = normalize_list [] paths in + let rec go acc rev_paths = + match rev_paths with + | [] -> Filename.concat root acc + | last :: rest -> go (Filename.concat last acc) rest + in + match rev_paths with [] -> root | last :: rest -> go last rest + +let absolute_path cwd s = + let process s = + let s = if Filename.is_relative s then Lazy.force cwd // s else s in + (* Now simplify . and .. components *) + let rec aux s = + let base, dir = (Filename.basename s, Filename.dirname s) in + if dir = s then dir + else if base = Filename.current_dir_name then aux dir + else if base = Filename.parent_dir_name then Filename.dirname (aux dir) + else aux dir // base + in + aux s + in + process s + +let absolute_cwd_path s = absolute_path cwd s + +(* let absolute cwd s = + match s with + | File x -> File (absolute_path cwd x ) + | Dir x -> Dir (absolute_path cwd x) *) + +let concat dirname filename = + if filename = Filename.current_dir_name then dirname + else if dirname = Filename.current_dir_name then filename + else Filename.concat dirname filename + +let check_suffix_case = Ext_string.ends_with + +(* Input must be absolute directory *) +let rec find_root_filename ~cwd filename = + if Sys.file_exists (Filename.concat cwd filename) then cwd + else + let cwd' = Filename.dirname cwd in + if String.length cwd' < String.length cwd then + find_root_filename ~cwd:cwd' filename + else Ext_fmt.failwithf ~loc:__LOC__ "%s not found from %s" filename cwd + +let find_package_json_dir cwd = find_root_filename ~cwd Literals.bsconfig_json + +let package_dir = lazy (find_package_json_dir (Lazy.force cwd)) diff --git a/analysis/vendor/ext/ext_path.mli b/analysis/vendor/ext/ext_path.mli new file mode 100644 index 000000000..76e6e209c --- /dev/null +++ b/analysis/vendor/ext/ext_path.mli @@ -0,0 +1,79 @@ +(* Copyright (C) 2017 Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type t + +val simple_convert_node_path_to_os_path : string -> string +(** Js_output is node style, which means + separator is only '/' + + if the path contains 'node_modules', + [node_relative_path] will discard its prefix and + just treat it as a library instead +*) + +val combine : string -> string -> string +(** + [combine path1 path2] + 1. add some simplifications when concatenating + 2. when [path2] is absolute, return [path2] +*) + +(** + {[ + get_extension "a.txt" = ".txt" + get_extension "a" = "" + ]} +*) + +val node_rebase_file : from:string -> to_:string -> string -> string + +val rel_normalized_absolute_path : from:string -> string -> string +(** + TODO: could be highly optimized + if [from] and [to] resolve to the same path, a zero-length string is returned + Given that two paths are directory + + A typical use case is + {[ + Filename.concat + (rel_normalized_absolute_path cwd (Filename.dirname a)) + (Filename.basename a) + ]} +*) + +val normalize_absolute_path : string -> string + +val absolute_cwd_path : string -> string + +val concat : string -> string -> string +(** [concat dirname filename] + The same as {!Filename.concat} except a tiny optimization + for current directory simplification +*) + +val check_suffix_case : string -> string -> bool + +(* It is lazy so that it will not hit errors when in script mode *) +val package_dir : string Lazy.t diff --git a/analysis/vendor/ext/ext_pervasives.ml b/analysis/vendor/ext/ext_pervasives.ml new file mode 100644 index 000000000..ede7f8a22 --- /dev/null +++ b/analysis/vendor/ext/ext_pervasives.ml @@ -0,0 +1,97 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +external reraise : exn -> 'a = "%reraise" + +let finally v ~clean:action f = + match f v with + | exception e -> + action v; + reraise e + | e -> + action v; + e + +(* let try_it f = + try ignore (f ()) with _ -> () *) + +let with_file_as_chan filename f = + finally (open_out_bin filename) ~clean:close_out f + +let max_int (x : int) y = if x >= y then x else y + +let min_int (x : int) y = if x < y then x else y + +let max_int_option (x : int option) y = + match (x, y) with + | None, _ -> y + | Some _, None -> x + | Some x0, Some y0 -> if x0 >= y0 then x else y + +(* external id : 'a -> 'a = "%identity" *) + +(* + let hash_variant s = + let accu = ref 0 in + for i = 0 to String.length s - 1 do + accu := 223 * !accu + Char.code s.[i] + done; + (* reduce to 31 bits *) + accu := !accu land (1 lsl 31 - 1); + (* make it signed for 64 bits architectures *) + if !accu > 0x3FFFFFFF then !accu - (1 lsl 31) else !accu *) + +(* let todo loc = + failwith (loc ^ " Not supported yet") +*) + +let rec int_of_string_aux s acc off len = + if off >= len then acc + else + let d = Char.code (String.unsafe_get s off) - 48 in + if d >= 0 && d <= 9 then int_of_string_aux s ((10 * acc) + d) (off + 1) len + else -1 +(* error *) + +let nat_of_string_exn (s : string) = + let acc = int_of_string_aux s 0 0 (String.length s) in + if acc < 0 then invalid_arg s else acc + +(** return index *) +let parse_nat_of_string (s : string) (cursor : int ref) = + let current = !cursor in + assert (current >= 0); + let acc = ref 0 in + let s_len = String.length s in + let todo = ref true in + let cur = ref current in + while !todo && !cursor < s_len do + let d = Char.code (String.unsafe_get s !cur) - 48 in + if d >= 0 && d <= 9 then ( + acc := (10 * !acc) + d; + incr cur) + else todo := false + done; + cursor := !cur; + !acc diff --git a/analysis/vendor/compiler-libs-406/ext_pervasives.mli b/analysis/vendor/ext/ext_pervasives.mli similarity index 84% rename from analysis/vendor/compiler-libs-406/ext_pervasives.mli rename to analysis/vendor/ext/ext_pervasives.mli index 89c17ee17..a4761900b 100644 --- a/analysis/vendor/compiler-libs-406/ext_pervasives.mli +++ b/analysis/vendor/ext/ext_pervasives.mli @@ -22,40 +22,22 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - - - - - - - (** Extension to standard library [Pervavives] module, safe to open *) -external reraise: exn -> 'a = "%reraise" +external reraise : exn -> 'a = "%reraise" -val finally : - 'a -> - clean:('a -> unit) -> - ('a -> 'b) -> 'b +val finally : 'a -> clean:('a -> unit) -> ('a -> 'b) -> 'b (* val try_it : (unit -> 'a) -> unit *) val with_file_as_chan : string -> (out_channel -> 'a) -> 'a +val max_int : int -> int -> int -val max_int : int -> int -> int - -val min_int : int -> int -> int -val max_int_option : - int option -> - int option -> - int option - - - - +val min_int : int -> int -> int +val max_int_option : int option -> int option -> int option (* external id : 'a -> 'a = "%identity" *) @@ -68,7 +50,4 @@ val max_int_option : val nat_of_string_exn : string -> int -val parse_nat_of_string: - string -> - int ref -> - int \ No newline at end of file +val parse_nat_of_string : string -> int ref -> int diff --git a/analysis/vendor/ext/ext_position.ml b/analysis/vendor/ext/ext_position.ml index c7b38e08f..96e575bc6 100644 --- a/analysis/vendor/ext/ext_position.ml +++ b/analysis/vendor/ext/ext_position.ml @@ -23,12 +23,20 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) type t = Lexing.position = { - pos_fname: string; [@dead] - pos_lnum: int; - pos_bol: int; - pos_cnum: int; + pos_fname : string; + pos_lnum : int; + pos_bol : int; + pos_cnum : int; } +let offset (x : t) (y : t) = + { + x with + pos_lnum = x.pos_lnum + y.pos_lnum - 1; + pos_cnum = x.pos_cnum + y.pos_cnum; + pos_bol = (if y.pos_lnum = 1 then x.pos_bol else x.pos_cnum + y.pos_bol); + } + let print fmt (pos : t) = Format.fprintf fmt "(line %d, column %d)" pos.pos_lnum (pos.pos_cnum - pos.pos_bol) @@ -46,4 +54,3 @@ let lexbuf_from_channel_with_fname ic fname = x.lex_start_p <- pos; x.lex_curr_p <- pos; x - [@@raises Invalid_argument] diff --git a/analysis/vendor/compiler-libs-406/ext_position.mli b/analysis/vendor/ext/ext_position.mli similarity index 87% rename from analysis/vendor/compiler-libs-406/ext_position.mli rename to analysis/vendor/ext/ext_position.mli index 14f310286..0d17a2cf2 100644 --- a/analysis/vendor/compiler-libs-406/ext_position.mli +++ b/analysis/vendor/ext/ext_position.mli @@ -22,14 +22,14 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - type t = Lexing.position = { - pos_fname : string ; - pos_lnum : int ; - pos_bol : int ; - pos_cnum : int + pos_fname : string; + pos_lnum : int; + pos_bol : int; + pos_cnum : int; } +val offset : t -> t -> t (** [offset pos newpos] return a new position here [newpos] is zero based, the use case is that @@ -37,10 +37,7 @@ type t = Lexing.position = { therefore, we get a [newpos] and we need rebase it on top of [pos] *) -val offset : t -> t -> t -val lexbuf_from_channel_with_fname: - in_channel -> string -> - Lexing.lexbuf +val lexbuf_from_channel_with_fname : in_channel -> string -> Lexing.lexbuf -val print : Format.formatter -> t -> unit \ No newline at end of file +val print : Format.formatter -> t -> unit diff --git a/analysis/vendor/ext/ext_pp.ml b/analysis/vendor/ext/ext_pp.ml new file mode 100644 index 000000000..7ac050268 --- /dev/null +++ b/analysis/vendor/ext/ext_pp.ml @@ -0,0 +1,171 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +module L = struct + let space = " " + + let indent_str = " " +end + +let indent_length = String.length L.indent_str + +type t = { + output_string : string -> unit; + output_char : char -> unit; + flush : unit -> unit; + mutable indent_level : int; + mutable last_new_line : bool; + (* only when we print newline, we print the indent *) +} + +let from_channel chan = + { + output_string = (fun s -> output_string chan s); + output_char = (fun c -> output_char chan c); + flush = (fun _ -> flush chan); + indent_level = 0; + last_new_line = false; + } + +let from_buffer buf = + { + output_string = (fun s -> Buffer.add_string buf s); + output_char = (fun c -> Buffer.add_char buf c); + flush = (fun _ -> ()); + indent_level = 0; + last_new_line = false; + } + +(* If we have [newline] in [s], + all indentations will be broken + in the future, we can detect this in [s] +*) +let string t s = + t.output_string s; + t.last_new_line <- false + +let newline t = + if not t.last_new_line then ( + t.output_char '\n'; + for _ = 0 to t.indent_level - 1 do + t.output_string L.indent_str + done; + t.last_new_line <- true) + +let at_least_two_lines t = + if not t.last_new_line then t.output_char '\n'; + t.output_char '\n'; + for _ = 0 to t.indent_level - 1 do + t.output_string L.indent_str + done; + t.last_new_line <- true + +let force_newline t = + t.output_char '\n'; + for _ = 0 to t.indent_level - 1 do + t.output_string L.indent_str + done; + t.last_new_line <- true + +let space t = string t L.space + +let nspace t n = string t (String.make n ' ') + +let group t i action = + if i = 0 then action () + else + let old = t.indent_level in + t.indent_level <- t.indent_level + i; + Ext_pervasives.finally ~clean:(fun _ -> t.indent_level <- old) () action + +let vgroup = group + +let paren t action = + string t "("; + let v = action () in + string t ")"; + v + +let brace fmt u = + string fmt "{"; + (* break1 fmt ; *) + let v = u () in + string fmt "}"; + v + +let bracket fmt u = + string fmt "["; + let v = u () in + string fmt "]"; + v + +let brace_vgroup st n action = + string st "{"; + let v = + vgroup st n (fun _ -> + newline st; + let v = action () in + v) + in + force_newline st; + string st "}"; + v + +let bracket_vgroup st n action = + string st "["; + let v = + vgroup st n (fun _ -> + newline st; + let v = action () in + v) + in + force_newline st; + string st "]"; + v + +let bracket_group st n action = group st n (fun _ -> bracket st action) + +let paren_vgroup st n action = + string st "("; + let v = + group st n (fun _ -> + newline st; + let v = action () in + v) + in + newline st; + string st ")"; + v + +let paren_group st n action = group st n (fun _ -> paren st action) + +let cond_paren_group st b n action = + if b then paren_group st n action else action () + +let brace_group st n action = group st n (fun _ -> brace st action) + +(* let indent t n = + t.indent_level <- t.indent_level + n *) + +let flush t () = t.flush () diff --git a/analysis/vendor/ext/ext_pp.mli b/analysis/vendor/ext/ext_pp.mli new file mode 100644 index 000000000..6db5327aa --- /dev/null +++ b/analysis/vendor/ext/ext_pp.mli @@ -0,0 +1,79 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type t +(** A simple pretty printer + + Advantage compared with [Format], + [P.newline] does not screw the layout, have better control when do a newline (sicne JS has ASI) + Easy to tweak + + {ul + {- be a little smarter} + {- buffer the last line, so that we can do a smart newline, when it's really safe to do so} + } +*) + +val indent_length : int + +val string : t -> string -> unit + +val space : t -> unit + +val nspace : t -> int -> unit + +val group : t -> int -> (unit -> 'a) -> 'a +(** [group] will record current indentation + and indent futher +*) + +val vgroup : t -> int -> (unit -> 'a) -> 'a + +val paren : t -> (unit -> 'a) -> 'a + +val brace : t -> (unit -> 'a) -> 'a + +val paren_group : t -> int -> (unit -> 'a) -> 'a + +val cond_paren_group : t -> bool -> int -> (unit -> 'a) -> 'a + +val paren_vgroup : t -> int -> (unit -> 'a) -> 'a + +val brace_group : t -> int -> (unit -> 'a) -> 'a + +val brace_vgroup : t -> int -> (unit -> 'a) -> 'a + +val bracket_group : t -> int -> (unit -> 'a) -> 'a + +val bracket_vgroup : t -> int -> (unit -> 'a) -> 'a + +val newline : t -> unit + +val at_least_two_lines : t -> unit + +val from_channel : out_channel -> t + +val from_buffer : Buffer.t -> t + +val flush : t -> unit -> unit diff --git a/analysis/vendor/ext/ext_pp_scope.ml b/analysis/vendor/ext/ext_pp_scope.ml new file mode 100644 index 000000000..66df85da5 --- /dev/null +++ b/analysis/vendor/ext/ext_pp_scope.ml @@ -0,0 +1,113 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type t = int Map_int.t Map_string.t + +(* + -- "name" --> int map -- stamp --> index suffix +*) +let empty : t = Map_string.empty + +let rec print fmt v = + Format.fprintf fmt "@[{"; + Map_string.iter v (fun k m -> + Format.fprintf fmt "%s: @[%a@],@ " k print_int_map m); + Format.fprintf fmt "}@]" + +and print_int_map fmt m = + Map_int.iter m (fun k v -> Format.fprintf fmt "%d - %d" k v) + +let add_ident ~mangled:name (stamp : int) (cxt : t) : int * t = + match Map_string.find_opt cxt name with + | None -> (0, Map_string.add cxt name (Map_int.add Map_int.empty stamp 0)) + | Some imap -> ( + match Map_int.find_opt imap stamp with + | None -> + let v = Map_int.cardinal imap in + (v, Map_string.add cxt name (Map_int.add imap stamp v)) + | Some i -> (i, cxt)) + +(** + same as {!Js_dump.ident} except it generates a string instead of doing the printing + For fast/debug mode, we can generate the name as + [Printf.sprintf "%s$%d" name id.stamp] which is + not relevant to the context + + Attention: + - $$Array.length, due to the fact that global module is + always printed in the begining(via imports), so you get a gurantee, + (global modules will not be printed as [List$1]) + + However, this means we loose the ability of dynamic loading, is it a big + deal? we can fix this by a scanning first, since we already know which + modules are global + + check [test/test_global_print.ml] for regression + - collision + It is obvious that for the same identifier that they + print the same name. + + It also needs to be hold that for two different identifiers, + they print different names: + - This happens when they escape to the same name and + share the same stamp + So the key has to be mangled name + stamp + otherwise, if two identifier happens to have same mangled name, + if we use the original name as key, they can have same id (like 0). + then it caused a collision + + Here we can guarantee that if mangled name and stamp are not all the same + they can not have a collision + +*) +let str_of_ident (cxt : t) (id : Ident.t) : string * t = + if Ext_ident.is_js id then (* reserved by compiler *) + (id.name, cxt) + else + let id_name = id.name in + let name = Ext_ident.convert id_name in + let i, new_cxt = add_ident ~mangled:name id.stamp cxt in + ((if i == 0 then name else Printf.sprintf "%s$%d" name i), new_cxt) + +let ident (cxt : t) f (id : Ident.t) : t = + let str, cxt = str_of_ident cxt id in + Ext_pp.string f str; + cxt + +let merge (cxt : t) (set : Set_ident.t) = + Set_ident.fold set cxt (fun ident acc -> + snd (add_ident ~mangled:(Ext_ident.convert ident.name) ident.stamp acc)) + +(* Assume that all idents are already in [scope] + so both [param/0] and [param/1] are in idents, we don't need + update twice, once is enough +*) +let sub_scope (scope : t) (idents : Set_ident.t) : t = + Set_ident.fold idents empty (fun { name } acc -> + let mangled = Ext_ident.convert name in + match Map_string.find_exn scope mangled with + | exception Not_found -> assert false + | imap -> + if Map_string.mem acc mangled then acc + else Map_string.add acc mangled imap) diff --git a/analysis/vendor/ext/ext_pp_scope.mli b/analysis/vendor/ext/ext_pp_scope.mli new file mode 100644 index 000000000..460a0354d --- /dev/null +++ b/analysis/vendor/ext/ext_pp_scope.mli @@ -0,0 +1,44 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(** Scope type to improve identifier name printing + Defines scope type [t], so that the pretty printer would + print more beautiful code: + print [identifer] instead of [identifier$1234] + when it can +*) + +type t + +val empty : t + +val print : Format.formatter -> t -> unit + +val sub_scope : t -> Set_ident.t -> t + +val merge : t -> Set_ident.t -> t + +val str_of_ident : t -> Ident.t -> string * t + +val ident : t -> Ext_pp.t -> Ident.t -> t diff --git a/analysis/vendor/ext/ext_ref.ml b/analysis/vendor/ext/ext_ref.ml new file mode 100644 index 000000000..e0afb7892 --- /dev/null +++ b/analysis/vendor/ext/ext_ref.ml @@ -0,0 +1,77 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +let non_exn_protect r v body = + let old = !r in + r := v; + let res = body () in + r := old; + res + +let protect r v body = + let old = !r in + try + r := v; + let res = body () in + r := old; + res + with x -> + r := old; + raise x + +let non_exn_protect2 r1 r2 v1 v2 body = + let old1 = !r1 in + let old2 = !r2 in + r1 := v1; + r2 := v2; + let res = body () in + r1 := old1; + r2 := old2; + res + +let protect2 r1 r2 v1 v2 body = + let old1 = !r1 in + let old2 = !r2 in + try + r1 := v1; + r2 := v2; + let res = body () in + r1 := old1; + r2 := old2; + res + with x -> + r1 := old1; + r2 := old2; + raise x + +let protect_list rvs body = + let olds = Ext_list.map rvs (fun (x, _) -> !x) in + let () = List.iter (fun (x, y) -> x := y) rvs in + try + let res = body () in + List.iter2 (fun (x, _) old -> x := old) rvs olds; + res + with e -> + List.iter2 (fun (x, _) old -> x := old) rvs olds; + raise e diff --git a/analysis/vendor/ext/ext_ref.mli b/analysis/vendor/ext/ext_ref.mli new file mode 100644 index 000000000..94a47dcf0 --- /dev/null +++ b/analysis/vendor/ext/ext_ref.mli @@ -0,0 +1,40 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(** [non_exn_protect ref value f] assusme [f()] + would not raise +*) + +val non_exn_protect : 'a ref -> 'a -> (unit -> 'b) -> 'b + +val protect : 'a ref -> 'a -> (unit -> 'b) -> 'b + +val protect2 : 'a ref -> 'b ref -> 'a -> 'b -> (unit -> 'c) -> 'c + +val non_exn_protect2 : 'a ref -> 'b ref -> 'a -> 'b -> (unit -> 'c) -> 'c +(** [non_exn_protect2 refa refb va vb f ] + assume [f ()] would not raise +*) + +val protect_list : ('a ref * 'a) list -> (unit -> 'b) -> 'b diff --git a/analysis/vendor/ext/ext_scc.ml b/analysis/vendor/ext/ext_scc.ml new file mode 100644 index 000000000..d640d6871 --- /dev/null +++ b/analysis/vendor/ext/ext_scc.ml @@ -0,0 +1,101 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type node = Vec_int.t + +(** + [int] as data for this algorithm + Pros: + 1. Easy to eoncode algorithm (especially given that the capacity of node is known) + 2. Algorithms itself are much more efficient + 3. Node comparison semantics is clear + 4. Easy to print output + Cons: + 1. post processing input data +*) +let min_int (x : int) y = if x < y then x else y + +let graph e = + let index = ref 0 in + let s = Vec_int.empty () in + + let output = Int_vec_vec.empty () in + (* collect output *) + let node_numes = Array.length e in + + let on_stack_array = Array.make node_numes false in + let index_array = Array.make node_numes (-1) in + let lowlink_array = Array.make node_numes (-1) in + + let rec scc v_data = + let new_index = !index + 1 in + index := new_index; + Vec_int.push s v_data; + + index_array.(v_data) <- new_index; + lowlink_array.(v_data) <- new_index; + on_stack_array.(v_data) <- true; + let v = e.(v_data) in + Vec_int.iter v (fun w_data -> + if Array.unsafe_get index_array w_data < 0 then ( + (* not processed *) + scc w_data; + Array.unsafe_set lowlink_array v_data + (min_int + (Array.unsafe_get lowlink_array v_data) + (Array.unsafe_get lowlink_array w_data))) + else if Array.unsafe_get on_stack_array w_data then + (* successor is in stack and hence in current scc *) + Array.unsafe_set lowlink_array v_data + (min_int + (Array.unsafe_get lowlink_array v_data) + (Array.unsafe_get lowlink_array w_data))); + + if + Array.unsafe_get lowlink_array v_data + = Array.unsafe_get index_array v_data + then ( + (* start a new scc *) + let s_len = Vec_int.length s in + let last_index = ref (s_len - 1) in + let u = ref (Vec_int.unsafe_get s !last_index) in + while !u <> v_data do + Array.unsafe_set on_stack_array !u false; + last_index := !last_index - 1; + u := Vec_int.unsafe_get s !last_index + done; + on_stack_array.(v_data) <- false; + (* necessary *) + Int_vec_vec.push output + (Vec_int.get_and_delete_range s !last_index (s_len - !last_index))) + in + for i = 0 to node_numes - 1 do + if Array.unsafe_get index_array i < 0 then scc i + done; + output + +let graph_check v = + let v = graph v in + ( Int_vec_vec.length v, + Int_vec_vec.fold_left (fun acc x -> Vec_int.length x :: acc) [] v ) diff --git a/analysis/vendor/ext/ext_scc.mli b/analysis/vendor/ext/ext_scc.mli new file mode 100644 index 000000000..b72bc8228 --- /dev/null +++ b/analysis/vendor/ext/ext_scc.mli @@ -0,0 +1,42 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type node = Vec_int.t + +val graph : Vec_int.t array -> Int_vec_vec.t +(** Assume input is int array with offset from 0 + Typical input + {[ + [| + [ 1 ; 2 ]; // 0 -> 1, 0 -> 2 + [ 1 ]; // 0 -> 1 + [ 2 ] // 0 -> 2 + |] + ]} + Note that we can tell how many nodes by calculating + [Array.length] of the input +*) + +val graph_check : node array -> int * int list +(** Used for unit test *) diff --git a/analysis/vendor/ext/ext_spec.ml b/analysis/vendor/ext/ext_spec.ml new file mode 100644 index 000000000..9cd6778ed --- /dev/null +++ b/analysis/vendor/ext/ext_spec.ml @@ -0,0 +1,36 @@ +(* Copyright (C) 2020- Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(* A small module which is also used by {!Bsb_helper} *) +type 'a t = (string * 'a * string) array + +let rec unsafe_loop i (l : 'a t) n x = + if i = n then None + else + let y1, y2, _ = Array.unsafe_get l i in + if y1 = x then Some y2 else unsafe_loop (i + 1) l n x + +let assoc3 (l : 'a t) (x : string) : 'a option = + let n = Array.length l in + unsafe_loop 0 l n x diff --git a/analysis/vendor/ext/ext_spec.mli b/analysis/vendor/ext/ext_spec.mli new file mode 100644 index 000000000..918f42565 --- /dev/null +++ b/analysis/vendor/ext/ext_spec.mli @@ -0,0 +1,3 @@ +type 'a t = (string * 'a * string) array + +val assoc3 : 'a t -> string -> 'a option diff --git a/analysis/vendor/ext/ext_stack.ml b/analysis/vendor/ext/ext_stack.ml new file mode 100644 index 000000000..0ecebca62 --- /dev/null +++ b/analysis/vendor/ext/ext_stack.ml @@ -0,0 +1,41 @@ +(* Copyright (C) 2017 Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type 'a t = 'a list ref + +let create_ref_empty () = ref [] + +let ref_top x = + match !x with y :: _ -> y | _ -> invalid_arg "Ext_list.ref_top" + +let ref_empty x = match !x with [] -> true | _ -> false + +let ref_push x refs = refs := x :: !refs + +let ref_pop refs = + match !refs with + | [] -> invalid_arg "Ext_list.ref_pop" + | x :: rest -> + refs := rest; + x diff --git a/analysis/vendor/ext/ext_stack.mli b/analysis/vendor/ext/ext_stack.mli new file mode 100644 index 000000000..2d85a3133 --- /dev/null +++ b/analysis/vendor/ext/ext_stack.mli @@ -0,0 +1,35 @@ +(* Copyright (C) 2017 Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type 'a t = 'a list ref + +val create_ref_empty : unit -> 'a t + +val ref_top : 'a t -> 'a + +val ref_empty : 'a t -> bool + +val ref_push : 'a -> 'a t -> unit + +val ref_pop : 'a t -> 'a diff --git a/analysis/vendor/compiler-libs-406/ext_string.ml b/analysis/vendor/ext/ext_string.ml similarity index 84% rename from analysis/vendor/compiler-libs-406/ext_string.ml rename to analysis/vendor/ext/ext_string.ml index a644a4241..617f416d8 100644 --- a/analysis/vendor/compiler-libs-406/ext_string.ml +++ b/analysis/vendor/ext/ext_string.ml @@ -1,5 +1,5 @@ -(* Copyright (C) 2015-2016 Bloomberg Finance L.P. - * +(* Copyright (C) 2015 - 2016 Bloomberg Finance L.P. + * Copyright (C) 2017 - Hongbo Zhang, Authors of ReScript * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -112,23 +112,24 @@ let ends_with_then_chop s beg = if i >= 0 then Some (String.sub s 0 i) else None +(* let check_suffix_case = ends_with *) +(* let check_suffix_case_then_chop = ends_with_then_chop *) + +(* let check_any_suffix_case s suffixes = + Ext_list.exists suffixes (fun x -> check_suffix_case s x) *) + +(* let check_any_suffix_case_then_chop s suffixes = + let rec aux suffixes = + match suffixes with + | [] -> None + | x::xs -> + let id = ends_with_index s x in + if id >= 0 then Some (String.sub s 0 id) + else aux xs in + aux suffixes *) + + -(** In OCaml 4.02.3, {!String.escaped} is locale senstive, - this version try to make it not locale senstive, this bug is fixed - in the compiler trunk -*) -let escaped s = - let rec needs_escape i = - if i >= String.length s then false else - match String.unsafe_get s i with - | '"' | '\\' | '\n' | '\t' | '\r' | '\b' -> true - | ' ' .. '~' -> needs_escape (i+1) - | _ -> true - in - if needs_escape 0 then - Bytes.unsafe_to_string (Ext_bytes.escaped (Bytes.unsafe_of_string s)) - else - s (* it is unsafe to expose such API as unsafe since user can provide bad input range @@ -161,6 +162,7 @@ let repeat n s = + let unsafe_is_sub ~sub i s j ~len = let rec check k = if k = len @@ -172,8 +174,9 @@ let unsafe_is_sub ~sub i s j ~len = j+len <= String.length s && check 0 -exception Local_exit + let find ?(start=0) ~sub s = + let exception Local_exit in let n = String.length sub in let s_len = String.length s in let i = ref start in @@ -204,9 +207,9 @@ let non_overlap_count ~sub s = let rfind ~sub s = + let exception Local_exit in let n = String.length sub in let i = ref (String.length s - n) in - let module M = struct exception Exit end in try while !i >= 0 do if unsafe_is_sub ~sub 0 s !i ~len:n then @@ -225,9 +228,9 @@ let tail_from s x = let equal (x : string) y = x = y (* let rec index_rec s lim i c = - if i >= lim then -1 else - if String.unsafe_get s i = c then i - else index_rec s lim (i + 1) c *) + if i >= lim then -1 else + if String.unsafe_get s i = c then i + else index_rec s lim (i + 1) c *) @@ -245,16 +248,16 @@ let index_count s i c count = index_rec_count s lim i c count (* let index_next s i c = - index_count s i c 1 *) + index_count s i c 1 *) (* let extract_until s cursor c = - let len = String.length s in - let start = !cursor in - if start < 0 || start >= len then ( + let len = String.length s in + let start = !cursor in + if start < 0 || start >= len then ( cursor := -1; "" ) - else + else let i = index_rec s len start c in let finish = if i < 0 then ( @@ -266,7 +269,7 @@ let index_count s i c count = i ) in String.sub s start (finish - start) *) - + let rec rindex_rec s i c = if i < 0 then i else if String.unsafe_get s i = c then i else rindex_rec s (i - 1) c;; @@ -329,8 +332,11 @@ let replace_backward_slash (x : string)= let empty = "" -let compare : string -> string -> int = compare;; - +#ifdef BROWSER +let compare = Bs_hash_stubs.string_length_based_compare +#else +external compare : string -> string -> int = "caml_string_length_based_compare" [@@noalloc];; +#endif let single_space = " " let single_colon = ":" @@ -461,44 +467,65 @@ let capitalize_sub (s : string) len : string = done ; Bytes.unsafe_to_string bytes - + let uncapitalize_ascii = - String.uncapitalize_ascii + String.uncapitalize_ascii +let lowercase_ascii = String.lowercase_ascii -let lowercase_ascii (s : string) = - Bytes.unsafe_to_string - (Bytes.map Char.lowercase_ascii (Bytes.unsafe_of_string s)) +external (.![]) : string -> int -> int = "%string_unsafe_get" +let get_int_1_unsafe (x : string) off : int = + x.![off] +let get_int_2_unsafe (x : string) off : int = + x.![off] lor + x.![off+1] lsl 8 -let get_int_1 (x : string) off : int = - Char.code x.[off] +let get_int_3_unsafe (x : string) off : int = + x.![off] lor + x.![off+1] lsl 8 lor + x.![off+2] lsl 16 -let get_int_2 (x : string) off : int = - Char.code x.[off] lor - Char.code x.[off+1] lsl 8 - -let get_int_3 (x : string) off : int = - Char.code x.[off] lor - Char.code x.[off+1] lsl 8 lor - Char.code x.[off+2] lsl 16 -let get_int_4 (x : string) off : int = - Char.code x.[off] lor - Char.code x.[off+1] lsl 8 lor - Char.code x.[off+2] lsl 16 lor - Char.code x.[off+3] lsl 24 +let get_int_4_unsafe (x : string) off : int = + x.![off] lor + x.![off+1] lsl 8 lor + x.![off+2] lsl 16 lor + x.![off+3] lsl 24 let get_1_2_3_4 (x : string) ~off len : int = - if len = 1 then get_int_1 x off - else if len = 2 then get_int_2 x off - else if len = 3 then get_int_3 x off - else if len = 4 then get_int_4 x off + if len = 1 then get_int_1_unsafe x off + else if len = 2 then get_int_2_unsafe x off + else if len = 3 then get_int_3_unsafe x off + else if len = 4 then get_int_4_unsafe x off else assert false let unsafe_sub x offs len = let b = Bytes.create len in Ext_bytes.unsafe_blit_string x offs b 0 len; - (Bytes.unsafe_to_string b); \ No newline at end of file + (Bytes.unsafe_to_string b) + +let is_valid_hash_number (x:string) = + let len = String.length x in + len > 0 && ( + let a = x.![0] in + a <= 57 && + (if len > 1 then + a > 48 && + for_all_from x 1 (function '0' .. '9' -> true | _ -> false) + else + a >= 48 ) + ) + + +let hash_number_as_i32_exn + ( x : string) : int32 = + Int32.of_string x + + +let first_marshal_char (x : string) = + x <> "" && + ( String.unsafe_get x 0 = '\132') + \ No newline at end of file diff --git a/analysis/vendor/compiler-libs-406/ext_string.mli b/analysis/vendor/ext/ext_string.mli similarity index 82% rename from analysis/vendor/compiler-libs-406/ext_string.mli rename to analysis/vendor/ext/ext_string.mli index c44649fa7..a1c6a66e9 100644 --- a/analysis/vendor/compiler-libs-406/ext_string.mli +++ b/analysis/vendor/ext/ext_string.mli @@ -1,5 +1,5 @@ -(* Copyright (C) 2015-2016 Bloomberg Finance L.P. - * +(* Copyright (C) 2015 - 2016 Bloomberg Finance L.P. + * Copyright (C) 2017 - Hongbo Zhang, Authors of ReScript * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -59,23 +59,23 @@ val ends_with_index : string -> string -> int val ends_with : string -> string -> bool (** - [ends_with_then_chop name ext] - @example: + [ends_with_then_chop name ext] + @example: {[ ends_with_then_chop "a.cmj" ".cmj" - "a" + "a" ]} This is useful in controlled or file case sensitve system *) val ends_with_then_chop : string -> string -> string option -val escaped : string -> string + (** - [for_all_from s start p] - if [start] is negative, it raises, - if [start] is too large, it returns true + [for_all_from s start p] + if [start] is negative, it raises, + if [start] is too large, it returns true *) val for_all_from: string -> @@ -95,7 +95,7 @@ val repeat : int -> string -> string val equal : string -> string -> bool (** - [extract_until s cursor sep] + [extract_until s cursor sep] When [sep] not found, the cursor is updated to -1, otherwise cursor is increased to 1 + [sep_position] User can not determine whether it is found or not by @@ -103,10 +103,10 @@ val equal : string -> string -> bool "\n\n" would result in an empty string too. *) (* val extract_until: - string -> - int ref -> (* cursor to be updated *) - char -> - string *) + string -> + int ref -> (* cursor to be updated *) + char -> + string *) val index_count: string -> @@ -116,15 +116,15 @@ val index_count: int (* val index_next : - string -> - int -> - char -> - int *) + string -> + int -> + char -> + int *) + - (** - [find ~start ~sub s] - returns [-1] if not found + [find ~start ~sub s] + returns [-1] if not found *) val find : ?start:int -> sub:string -> string -> int @@ -135,7 +135,7 @@ val non_overlap_count : sub:string -> string -> int val rfind : sub:string -> string -> int (** [tail_from s 1] - return a substring from offset 1 (inclusive) + return a substring from offset 1 (inclusive) *) val tail_from : string -> int -> string @@ -164,8 +164,11 @@ val replace_backward_slash : string -> string val empty : string -val compare : string -> string -> int;; - +#ifdef BROWSER +val compare : string -> string -> int +#else +external compare : string -> string -> int = "caml_string_length_based_compare" [@@noalloc];; +#endif val single_space : string val concat3 : string -> string -> string -> string @@ -187,16 +190,16 @@ val capitalize_sub: string -> int -> string - + val uncapitalize_ascii : string -> string val lowercase_ascii : string -> string (** Play parity to {!Ext_buffer.add_int_1} *) -val get_int_1 : string -> int -> int -val get_int_2 : string -> int -> int -val get_int_3 : string -> int -> int -val get_int_4 : string -> int -> int +(* val get_int_1 : string -> int -> int + val get_int_2 : string -> int -> int + val get_int_3 : string -> int -> int + val get_int_4 : string -> int -> int *) val get_1_2_3_4 : string -> @@ -208,4 +211,16 @@ val unsafe_sub : string -> int -> int -> - string \ No newline at end of file + string + +val is_valid_hash_number: + string -> + bool + +val hash_number_as_i32_exn: + string -> + int32 + +val first_marshal_char: + string -> + bool \ No newline at end of file diff --git a/analysis/vendor/ext/ext_string_array.ml b/analysis/vendor/ext/ext_string_array.ml new file mode 100644 index 000000000..27b8c182d --- /dev/null +++ b/analysis/vendor/ext/ext_string_array.ml @@ -0,0 +1,87 @@ +(* Copyright (C) 2020 - Present Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(* Invariant: the same as encoding Map_string.compare_key *) +let cmp = Ext_string.compare + +let rec binarySearchAux (arr : string array) (lo : int) (hi : int) + (key : string) : _ option = + let mid = (lo + hi) / 2 in + let midVal = Array.unsafe_get arr mid in + let c = cmp key midVal in + if c = 0 then Some mid + else if c < 0 then + (* a[lo] =< key < a[mid] <= a[hi] *) + if hi = mid then + let loVal = Array.unsafe_get arr lo in + if loVal = key then Some lo else None + else binarySearchAux arr lo mid key + else if (* a[lo] =< a[mid] < key <= a[hi] *) + lo = mid then + let hiVal = Array.unsafe_get arr hi in + if hiVal = key then Some hi else None + else binarySearchAux arr mid hi key + +let find_sorted sorted key : int option = + let len = Array.length sorted in + if len = 0 then None + else + let lo = Array.unsafe_get sorted 0 in + let c = cmp key lo in + if c < 0 then None + else + let hi = Array.unsafe_get sorted (len - 1) in + let c2 = cmp key hi in + if c2 > 0 then None else binarySearchAux sorted 0 (len - 1) key + +let rec binarySearchAssoc (arr : (string * _) array) (lo : int) (hi : int) + (key : string) : _ option = + let mid = (lo + hi) / 2 in + let midVal = Array.unsafe_get arr mid in + let c = cmp key (fst midVal) in + if c = 0 then Some (snd midVal) + else if c < 0 then + (* a[lo] =< key < a[mid] <= a[hi] *) + if hi = mid then + let loVal = Array.unsafe_get arr lo in + if fst loVal = key then Some (snd loVal) else None + else binarySearchAssoc arr lo mid key + else if (* a[lo] =< a[mid] < key <= a[hi] *) + lo = mid then + let hiVal = Array.unsafe_get arr hi in + if fst hiVal = key then Some (snd hiVal) else None + else binarySearchAssoc arr mid hi key + +let find_sorted_assoc (type a) (sorted : (string * a) array) (key : string) : + a option = + let len = Array.length sorted in + if len = 0 then None + else + let lo = Array.unsafe_get sorted 0 in + let c = cmp key (fst lo) in + if c < 0 then None + else + let hi = Array.unsafe_get sorted (len - 1) in + let c2 = cmp key (fst hi) in + if c2 > 0 then None else binarySearchAssoc sorted 0 (len - 1) key diff --git a/analysis/vendor/ext/ext_string_array.mli b/analysis/vendor/ext/ext_string_array.mli new file mode 100644 index 000000000..09c196e31 --- /dev/null +++ b/analysis/vendor/ext/ext_string_array.mli @@ -0,0 +1,29 @@ +(* Copyright (C) 2020 - Present Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +val cmp : string -> string -> int + +val find_sorted : string array -> string -> int option + +val find_sorted_assoc : (string * 'a) array -> string -> 'a option diff --git a/analysis/vendor/ext/ext_sys.ml b/analysis/vendor/ext/ext_sys.ml new file mode 100644 index 000000000..917d39755 --- /dev/null +++ b/analysis/vendor/ext/ext_sys.ml @@ -0,0 +1,36 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(** TODO: not exported yet, wait for Windows Fix*) +#ifdef BROWSER +let is_directory_no_exn f = + try Sys.is_directory f with _ -> false +#else +external is_directory_no_exn : string -> bool = "caml_sys_is_directory_no_exn" +#endif + + +let is_windows_or_cygwin = Sys.win32 || Sys.cygwin + + diff --git a/analysis/vendor/ext/ext_sys.mli b/analysis/vendor/ext/ext_sys.mli new file mode 100644 index 000000000..f884380ae --- /dev/null +++ b/analysis/vendor/ext/ext_sys.mli @@ -0,0 +1,27 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +val is_directory_no_exn : string -> bool + +val is_windows_or_cygwin : bool diff --git a/analysis/vendor/ext/ext_topsort.ml b/analysis/vendor/ext/ext_topsort.ml new file mode 100644 index 000000000..fc44e7176 --- /dev/null +++ b/analysis/vendor/ext/ext_topsort.ml @@ -0,0 +1,61 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type edges = { id : int; deps : Vec_int.t } + +module Edge_vec = Vec.Make (struct + type t = edges + + let null = { id = 0; deps = Vec_int.empty () } +end) + +type t = Edge_vec.t + +(** + This graph is different the graph used in [scc] graph, since + we need dynamic shrink the graph, so for each vector the first node is it self , + it will also change the input. + + TODO: error handling (cycle handling) and defensive bad input (missing edges etc) +*) + +let layered_dfs (g : t) = + let queue = Queue.create () in + let rec aux g = + let new_entries = + Edge_vec.inplace_filter_with + (fun (x : edges) -> not (Vec_int.is_empty x.deps)) + ~cb_no:(fun x acc -> Set_int.add acc x.id) + Set_int.empty g + in + if not (Set_int.is_empty new_entries) then ( + Queue.push new_entries queue; + Edge_vec.iter g (fun edges -> + Vec_int.inplace_filter + (fun x -> not (Set_int.mem new_entries x)) + edges.deps); + aux g) + in + aux g; + queue diff --git a/analysis/vendor/ext/ext_topsort.mli b/analysis/vendor/ext/ext_topsort.mli new file mode 100644 index 000000000..673f8d125 --- /dev/null +++ b/analysis/vendor/ext/ext_topsort.mli @@ -0,0 +1,33 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type edges = { id : int; deps : Vec_int.t } + +module Edge_vec : Vec_gen.S with type elt = edges + +type t = Edge_vec.t + +val layered_dfs : t -> Set_int.t Queue.t +(** the input will be modified , +*) diff --git a/analysis/vendor/ext/ext_utf8.ml b/analysis/vendor/ext/ext_utf8.ml new file mode 100644 index 000000000..0d02b2c57 --- /dev/null +++ b/analysis/vendor/ext/ext_utf8.ml @@ -0,0 +1,131 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type byte = Single of int | Cont of int | Leading of int * int | Invalid + +(** [classify chr] returns the {!byte} corresponding to [chr] *) +let classify chr = + let c = int_of_char chr in + (* Classify byte according to leftmost 0 bit *) + if c land 0b1000_0000 = 0 then Single c + else if (* c 0b0____*) + c land 0b0100_0000 = 0 then Cont (c land 0b0011_1111) + else if (* c 0b10___*) + c land 0b0010_0000 = 0 then Leading (1, c land 0b0001_1111) + else if (* c 0b110__*) + c land 0b0001_0000 = 0 then Leading (2, c land 0b0000_1111) + else if (* c 0b1110_ *) + c land 0b0000_1000 = 0 then Leading (3, c land 0b0000_0111) + else if (* c 0b1111_0___*) + c land 0b0000_0100 = 0 then Leading (4, c land 0b0000_0011) + else if (* c 0b1111_10__*) + c land 0b0000_0010 = 0 then Leading (5, c land 0b0000_0001) + (* c 0b1111_110__ *) + else Invalid + +exception Invalid_utf8 of string + +(* when the first char is [Leading], + TODO: need more error checking + when out of bond +*) +let rec follow s n (c : int) offset = + if n = 0 then (c, offset) + else + match classify s.[offset + 1] with + | Cont cc -> follow s (n - 1) ((c lsl 6) lor (cc land 0x3f)) (offset + 1) + | _ -> raise (Invalid_utf8 "Continuation byte expected") + +let rec next s ~remaining offset = + if remaining = 0 then offset + else + match classify s.[offset + 1] with + | Cont _cc -> next s ~remaining:(remaining - 1) (offset + 1) + | _ -> -1 + | exception _ -> -1 +(* it can happen when out of bound *) + +let decode_utf8_string s = + let lst = ref [] in + let add elem = lst := elem :: !lst in + let rec decode_utf8_cont s i s_len = + if i = s_len then () + else + match classify s.[i] with + | Single c -> + add c; + decode_utf8_cont s (i + 1) s_len + | Cont _ -> raise (Invalid_utf8 "Unexpected continuation byte") + | Leading (n, c) -> + let c', i' = follow s n c i in + add c'; + decode_utf8_cont s (i' + 1) s_len + | Invalid -> raise (Invalid_utf8 "Invalid byte") + in + decode_utf8_cont s 0 (String.length s); + List.rev !lst + +(** To decode {j||j} we need verify in the ast so that we have better error + location, then we do the decode later +*) + +(* let verify s loc = + assert false *) + +let encode_codepoint c = + (* reused from syntax/src/res_utf8.ml *) + let h2 = 0b1100_0000 in + let h3 = 0b1110_0000 in + let h4 = 0b1111_0000 in + let cont_mask = 0b0011_1111 in + if c <= 127 then ( + let bytes = (Bytes.create [@doesNotRaise]) 1 in + Bytes.unsafe_set bytes 0 (Char.unsafe_chr c); + Bytes.unsafe_to_string bytes) + else if c <= 2047 then ( + let bytes = (Bytes.create [@doesNotRaise]) 2 in + Bytes.unsafe_set bytes 0 (Char.unsafe_chr (h2 lor (c lsr 6))); + Bytes.unsafe_set bytes 1 + (Char.unsafe_chr (0b1000_0000 lor (c land cont_mask))); + Bytes.unsafe_to_string bytes) + else if c <= 65535 then ( + let bytes = (Bytes.create [@doesNotRaise]) 3 in + Bytes.unsafe_set bytes 0 (Char.unsafe_chr (h3 lor (c lsr 12))); + Bytes.unsafe_set bytes 1 + (Char.unsafe_chr (0b1000_0000 lor ((c lsr 6) land cont_mask))); + Bytes.unsafe_set bytes 2 + (Char.unsafe_chr (0b1000_0000 lor (c land cont_mask))); + Bytes.unsafe_to_string bytes) + else + (* if c <= max then *) + let bytes = (Bytes.create [@doesNotRaise]) 4 in + Bytes.unsafe_set bytes 0 (Char.unsafe_chr (h4 lor (c lsr 18))); + Bytes.unsafe_set bytes 1 + (Char.unsafe_chr (0b1000_0000 lor ((c lsr 12) land cont_mask))); + Bytes.unsafe_set bytes 2 + (Char.unsafe_chr (0b1000_0000 lor ((c lsr 6) land cont_mask))); + Bytes.unsafe_set bytes 3 + (Char.unsafe_chr (0b1000_0000 lor (c land cont_mask))); + Bytes.unsafe_to_string bytes + diff --git a/analysis/vendor/ext/ext_utf8.mli b/analysis/vendor/ext/ext_utf8.mli new file mode 100644 index 000000000..e1beadec5 --- /dev/null +++ b/analysis/vendor/ext/ext_utf8.mli @@ -0,0 +1,40 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type byte = Single of int | Cont of int | Leading of int * int | Invalid + +val classify : char -> byte + +val follow : string -> int -> int -> int -> int * int + +val next : string -> remaining:int -> int -> int +(** + return [-1] if failed +*) + +exception Invalid_utf8 of string + +val decode_utf8_string : string -> int list + +val encode_codepoint : int -> string diff --git a/analysis/vendor/ext/ext_util.ml b/analysis/vendor/ext/ext_util.ml new file mode 100644 index 000000000..1be75ff11 --- /dev/null +++ b/analysis/vendor/ext/ext_util.ml @@ -0,0 +1,61 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(** + {[ + (power_2_above 16 63 = 64) + (power_2_above 16 76 = 128) + ]} +*) +let rec power_2_above x n = + if x >= n then x + else if x * 2 > Sys.max_array_length then x + else power_2_above (x * 2) n + +let stats_to_string + ({ num_bindings; num_buckets; max_bucket_length; bucket_histogram } : + Hashtbl.statistics) = + Printf.sprintf "bindings: %d,buckets: %d, longest: %d, hist:[%s]" num_bindings + num_buckets max_bucket_length + (String.concat "," + (Array.to_list (Array.map string_of_int bucket_histogram))) + +let string_of_int_as_char (i : int) : string = + if i <= 255 && i >= 0 then Format.asprintf "%C" (Char.unsafe_chr i) + else + let str = + match Char.unsafe_chr i with + | '\'' -> "\\'" + | '\\' -> "\\\\" + | '\n' -> "\\n" + | '\t' -> "\\t" + | '\r' -> "\\r" + | '\b' -> "\\b" + | ' ' .. '~' as c -> + let s = (Bytes.create [@doesNotRaise]) 1 in + Bytes.unsafe_set s 0 c; + Bytes.unsafe_to_string s + | _ -> Ext_utf8.encode_codepoint i + in + Printf.sprintf "\'%s\'" str diff --git a/analysis/vendor/ext/ext_util.mli b/analysis/vendor/ext/ext_util.mli new file mode 100644 index 000000000..d31d11a90 --- /dev/null +++ b/analysis/vendor/ext/ext_util.mli @@ -0,0 +1,30 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +val power_2_above : int -> int -> int + +val stats_to_string : Hashtbl.statistics -> string + +val string_of_int_as_char : int -> string + diff --git a/analysis/vendor/ext/hash.cppo.ml b/analysis/vendor/ext/hash.cppo.ml new file mode 100644 index 000000000..6194e414e --- /dev/null +++ b/analysis/vendor/ext/hash.cppo.ml @@ -0,0 +1,144 @@ +#if defined TYPE_IDENT +type key = Ident.t +type 'a t = (key, 'a) Hash_gen.t +let key_index (h : _ t ) (key : key) = + (Bs_hash_stubs.hash_stamp_and_name key.stamp key.name ) land (Array.length h.data - 1) +(* (Bs_hash_stubs.hash_string_int key.name key.stamp ) land (Array.length h.data - 1) *) +let eq_key = Ext_ident.equal +#elif defined TYPE_STRING +type key = string +type 'a t = (key, 'a) Hash_gen.t +let key_index (h : _ t ) (key : key) = + (Bs_hash_stubs.hash_string key ) land (Array.length h.data - 1) +let eq_key = Ext_string.equal +#elif defined TYPE_INT +type key = int +type 'a t = (key, 'a) Hash_gen.t +let key_index (h : _ t ) (key : key) = + (Bs_hash_stubs.hash_int key ) land (Array.length h.data - 1) +let eq_key = Ext_int.equal + +#elif defined TYPE_FUNCTOR +module Make (Key : Hashtbl.HashedType) = struct + type key = Key.t + type 'a t = (key, 'a) Hash_gen.t + let key_index (h : _ t ) (key : key) = + (Key.hash key ) land (Array.length h.data - 1) + let eq_key = Key.equal + +#else + [%error "unknown type"] +#endif + + type ('a, 'b) bucket = ('a,'b) Hash_gen.bucket + let create = Hash_gen.create + let clear = Hash_gen.clear + let reset = Hash_gen.reset + let iter = Hash_gen.iter + let to_list = Hash_gen.to_list + let fold = Hash_gen.fold + let length = Hash_gen.length + (* let stats = Hash_gen.stats *) + + + + let add (h : _ t) key data = + let i = key_index h key in + let h_data = h.data in + Array.unsafe_set h_data i (Cons{key; data; next=Array.unsafe_get h_data i}); + h.size <- h.size + 1; + if h.size > Array.length h_data lsl 1 then Hash_gen.resize key_index h + + (* after upgrade to 4.04 we should provide an efficient [replace_or_init] *) + let add_or_update + (h : 'a t) + (key : key) + ~update:(modf : 'a -> 'a) + (default : 'a) : unit = + let rec find_bucket (bucketlist : _ bucket) : bool = + match bucketlist with + | Cons rhs -> + if eq_key rhs.key key then begin rhs.data <- modf rhs.data; false end + else find_bucket rhs.next + | Empty -> true in + let i = key_index h key in + let h_data = h.data in + if find_bucket (Array.unsafe_get h_data i) then + begin + Array.unsafe_set h_data i (Cons{key; data=default; next = Array.unsafe_get h_data i}); + h.size <- h.size + 1 ; + if h.size > Array.length h_data lsl 1 then Hash_gen.resize key_index h + end + + let remove (h : _ t ) key = + let i = key_index h key in + let h_data = h.data in + Hash_gen.remove_bucket h i key ~prec:Empty (Array.unsafe_get h_data i) eq_key + + (* for short bucket list, [find_rec is not called ] *) + let rec find_rec key (bucketlist : _ bucket) = match bucketlist with + | Empty -> + raise Not_found + | Cons rhs -> + if eq_key key rhs.key then rhs.data else find_rec key rhs.next + + let find_exn (h : _ t) key = + match Array.unsafe_get h.data (key_index h key) with + | Empty -> raise Not_found + | Cons rhs -> + if eq_key key rhs.key then rhs.data else + match rhs.next with + | Empty -> raise Not_found + | Cons rhs -> + if eq_key key rhs.key then rhs.data else + match rhs.next with + | Empty -> raise Not_found + | Cons rhs -> + if eq_key key rhs.key then rhs.data else find_rec key rhs.next + + let find_opt (h : _ t) key = + Hash_gen.small_bucket_opt eq_key key (Array.unsafe_get h.data (key_index h key)) + + let find_key_opt (h : _ t) key = + Hash_gen.small_bucket_key_opt eq_key key (Array.unsafe_get h.data (key_index h key)) + + let find_default (h : _ t) key default = + Hash_gen.small_bucket_default eq_key key default (Array.unsafe_get h.data (key_index h key)) + + let find_all (h : _ t) key = + let rec find_in_bucket (bucketlist : _ bucket) = match bucketlist with + | Empty -> + [] + | Cons rhs -> + if eq_key key rhs.key + then rhs.data :: find_in_bucket rhs.next + else find_in_bucket rhs.next in + find_in_bucket (Array.unsafe_get h.data (key_index h key)) + + + let replace h key data = + let i = key_index h key in + let h_data = h.data in + let l = Array.unsafe_get h_data i in + if Hash_gen.replace_bucket key data l eq_key then + begin + Array.unsafe_set h_data i (Cons{key; data; next=l}); + h.size <- h.size + 1; + if h.size > Array.length h_data lsl 1 then Hash_gen.resize key_index h; + end + + let mem (h : _ t) key = + Hash_gen.small_bucket_mem + (Array.unsafe_get h.data (key_index h key)) + eq_key key + + + let of_list2 ks vs = + let len = List.length ks in + let map = create len in + List.iter2 (fun k v -> add map k v) ks vs ; + map + +#if defined TYPE_FUNCTOR +end +#endif diff --git a/analysis/vendor/ext/hash.mli b/analysis/vendor/ext/hash.mli new file mode 100644 index 000000000..1a5b6ffa8 --- /dev/null +++ b/analysis/vendor/ext/hash.mli @@ -0,0 +1 @@ +module Make (Key : Hashtbl.HashedType) : Hash_gen.S with type key = Key.t diff --git a/analysis/vendor/ext/hash_gen.ml b/analysis/vendor/ext/hash_gen.ml new file mode 100644 index 000000000..01b6498fb --- /dev/null +++ b/analysis/vendor/ext/hash_gen.ml @@ -0,0 +1,241 @@ +(***********************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. All rights reserved. This file is distributed *) +(* under the terms of the GNU Library General Public License, with *) +(* the special exception on linking described in file ../LICENSE. *) +(* *) +(***********************************************************************) + +(* Hash tables *) + +(* We do dynamic hashing, and resize the table and rehash the elements + when buckets become too long. *) + +type ('a, 'b) bucket = + | Empty + | Cons of { + mutable key : 'a; + mutable data : 'b; + mutable next : ('a, 'b) bucket; + } + +type ('a, 'b) t = { + mutable size : int; + (* number of entries *) + mutable data : ('a, 'b) bucket array; + (* the buckets *) + initial_size : int; (* initial array size *) +} + +let create initial_size = + let s = Ext_util.power_2_above 16 initial_size in + { initial_size = s; size = 0; data = Array.make s Empty } + +let clear h = + h.size <- 0; + let len = Array.length h.data in + for i = 0 to len - 1 do + Array.unsafe_set h.data i Empty + done + +let reset h = + h.size <- 0; + h.data <- Array.make h.initial_size Empty + +let length h = h.size + +let resize indexfun h = + let odata = h.data in + let osize = Array.length odata in + let nsize = osize * 2 in + if nsize < Sys.max_array_length then ( + let ndata = Array.make nsize Empty in + let ndata_tail = Array.make nsize Empty in + h.data <- ndata; + (* so that indexfun sees the new bucket count *) + let rec insert_bucket = function + | Empty -> () + | Cons { key; next } as cell -> + let nidx = indexfun h key in + (match Array.unsafe_get ndata_tail nidx with + | Empty -> Array.unsafe_set ndata nidx cell + | Cons tail -> tail.next <- cell); + Array.unsafe_set ndata_tail nidx cell; + insert_bucket next + in + for i = 0 to osize - 1 do + insert_bucket (Array.unsafe_get odata i) + done; + for i = 0 to nsize - 1 do + match Array.unsafe_get ndata_tail i with + | Empty -> () + | Cons tail -> tail.next <- Empty + done) + +let iter h f = + let rec do_bucket = function + | Empty -> () + | Cons l -> + f l.key l.data; + do_bucket l.next + in + let d = h.data in + for i = 0 to Array.length d - 1 do + do_bucket (Array.unsafe_get d i) + done + +let fold h init f = + let rec do_bucket b accu = + match b with + | Empty -> accu + | Cons l -> do_bucket l.next (f l.key l.data accu) + in + let d = h.data in + let accu = ref init in + for i = 0 to Array.length d - 1 do + accu := do_bucket (Array.unsafe_get d i) !accu + done; + !accu + +let to_list h f = fold h [] (fun k data acc -> f k data :: acc) + +let rec small_bucket_mem (lst : _ bucket) eq key = + match lst with + | Empty -> false + | Cons lst -> ( + eq key lst.key + || + match lst.next with + | Empty -> false + | Cons lst -> ( + eq key lst.key + || + match lst.next with + | Empty -> false + | Cons lst -> eq key lst.key || small_bucket_mem lst.next eq key)) + +let rec small_bucket_opt eq key (lst : _ bucket) : _ option = + match lst with + | Empty -> None + | Cons lst -> ( + if eq key lst.key then Some lst.data + else + match lst.next with + | Empty -> None + | Cons lst -> ( + if eq key lst.key then Some lst.data + else + match lst.next with + | Empty -> None + | Cons lst -> + if eq key lst.key then Some lst.data + else small_bucket_opt eq key lst.next)) + +let rec small_bucket_key_opt eq key (lst : _ bucket) : _ option = + match lst with + | Empty -> None + | Cons { key = k; next } -> ( + if eq key k then Some k + else + match next with + | Empty -> None + | Cons { key = k; next } -> ( + if eq key k then Some k + else + match next with + | Empty -> None + | Cons { key = k; next } -> + if eq key k then Some k else small_bucket_key_opt eq key next) + ) + +let rec small_bucket_default eq key default (lst : _ bucket) = + match lst with + | Empty -> default + | Cons lst -> ( + if eq key lst.key then lst.data + else + match lst.next with + | Empty -> default + | Cons lst -> ( + if eq key lst.key then lst.data + else + match lst.next with + | Empty -> default + | Cons lst -> + if eq key lst.key then lst.data + else small_bucket_default eq key default lst.next)) + +let rec remove_bucket h (i : int) key ~(prec : _ bucket) (buck : _ bucket) + eq_key = + match buck with + | Empty -> () + | Cons { key = k; next } -> + if eq_key k key then ( + h.size <- h.size - 1; + match prec with + | Empty -> Array.unsafe_set h.data i next + | Cons c -> c.next <- next) + else remove_bucket h i key ~prec:buck next eq_key + +let rec replace_bucket key data (buck : _ bucket) eq_key = + match buck with + | Empty -> true + | Cons slot -> + if eq_key slot.key key then ( + slot.key <- key; + slot.data <- data; + false) + else replace_bucket key data slot.next eq_key + +module type S = sig + type key + + type 'a t + + val create : int -> 'a t + + val clear : 'a t -> unit + + val reset : 'a t -> unit + + val add : 'a t -> key -> 'a -> unit + + val add_or_update : 'a t -> key -> update:('a -> 'a) -> 'a -> unit + + val remove : 'a t -> key -> unit + + val find_exn : 'a t -> key -> 'a + + val find_all : 'a t -> key -> 'a list + + val find_opt : 'a t -> key -> 'a option + + val find_key_opt : 'a t -> key -> key option + (** return the key found in the hashtbl. + Use case: when you find the key existed in hashtbl, + you want to use the one stored in the hashtbl. + (they are semantically equivlanent, but may have other information different) + *) + + val find_default : 'a t -> key -> 'a -> 'a + + val replace : 'a t -> key -> 'a -> unit + + val mem : 'a t -> key -> bool + + val iter : 'a t -> (key -> 'a -> unit) -> unit + + val fold : 'a t -> 'b -> (key -> 'a -> 'b -> 'b) -> 'b + + val length : 'a t -> int + + (* val stats: 'a t -> Hashtbl.statistics *) + val to_list : 'a t -> (key -> 'a -> 'c) -> 'c list + + val of_list2 : key list -> 'a list -> 'a t +end diff --git a/analysis/vendor/ext/hash_ident.mli b/analysis/vendor/ext/hash_ident.mli new file mode 100644 index 000000000..0a299ad28 --- /dev/null +++ b/analysis/vendor/ext/hash_ident.mli @@ -0,0 +1,5 @@ + + +include Hash_gen.S with type key = Ident.t + + diff --git a/analysis/vendor/ext/hash_int.mli b/analysis/vendor/ext/hash_int.mli new file mode 100644 index 000000000..a4a8caf23 --- /dev/null +++ b/analysis/vendor/ext/hash_int.mli @@ -0,0 +1,25 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +include Hash_gen.S with type key = int diff --git a/analysis/vendor/ext/hash_set.cppo.ml b/analysis/vendor/ext/hash_set.cppo.ml new file mode 100644 index 000000000..73779079a --- /dev/null +++ b/analysis/vendor/ext/hash_set.cppo.ml @@ -0,0 +1,124 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +[@@@warning "-32"] (* FIXME *) +#ifdef TYPE_INT +type key = int +let key_index (h : _ Hash_set_gen.t ) (key : key) = + (Bs_hash_stubs.hash_int key) land (Array.length h.data - 1) +let eq_key = Ext_int.equal +type t = key Hash_set_gen.t +#elif defined TYPE_STRING +type key = string +let key_index (h : _ Hash_set_gen.t ) (key : key) = + (Bs_hash_stubs.hash_string key) land (Array.length h.data - 1) +let eq_key = Ext_string.equal +type t = key Hash_set_gen.t +#elif defined TYPE_IDENT +type key = Ident.t +let key_index (h : _ Hash_set_gen.t ) (key : key) = + (Bs_hash_stubs.hash_string_int key.name key.stamp) land (Array.length h.data - 1) +let eq_key = Ext_ident.equal +type t = key Hash_set_gen.t +#elif defined TYPE_FUNCTOR +module Make (H: Hashtbl.HashedType) : (Hash_set_gen.S with type key = H.t) = struct + type key = H.t + let eq_key = H.equal + let key_index (h : _ Hash_set_gen.t ) key = + (H.hash key) land (Array.length h.data - 1) + type t = key Hash_set_gen.t + +#elif defined TYPE_POLY + [@@@warning "-3"] + (* we used cppo the mixture does not work*) + external seeded_hash_param : + int -> int -> int -> 'a -> int = "caml_hash" "noalloc" + let key_index (h : _ Hash_set_gen.t ) (key : 'a) = + seeded_hash_param 10 100 0 key land (Array.length h.data - 1) + let eq_key = (=) + type 'a t = 'a Hash_set_gen.t +#else + [%error "unknown type"] +#endif + + + let create = Hash_set_gen.create + let clear = Hash_set_gen.clear + let reset = Hash_set_gen.reset + (* let copy = Hash_set_gen.copy *) + let iter = Hash_set_gen.iter + let fold = Hash_set_gen.fold + let length = Hash_set_gen.length + (* let stats = Hash_set_gen.stats *) + let to_list = Hash_set_gen.to_list + + + + let remove (h : _ Hash_set_gen.t ) key = + let i = key_index h key in + let h_data = h.data in + Hash_set_gen.remove_bucket h i key ~prec:Empty (Array.unsafe_get h_data i) eq_key + + + + let add (h : _ Hash_set_gen.t) key = + let i = key_index h key in + let h_data = h.data in + let old_bucket = (Array.unsafe_get h_data i) in + if not (Hash_set_gen.small_bucket_mem eq_key key old_bucket) then + begin + Array.unsafe_set h_data i (Cons {key = key ; next = old_bucket}); + h.size <- h.size + 1 ; + if h.size > Array.length h_data lsl 1 then Hash_set_gen.resize key_index h + end + + let of_array arr = + let len = Array.length arr in + let tbl = create len in + for i = 0 to len - 1 do + add tbl (Array.unsafe_get arr i); + done ; + tbl + + + let check_add (h : _ Hash_set_gen.t) key : bool = + let i = key_index h key in + let h_data = h.data in + let old_bucket = (Array.unsafe_get h_data i) in + if not (Hash_set_gen.small_bucket_mem eq_key key old_bucket) then + begin + Array.unsafe_set h_data i (Cons { key = key ; next = old_bucket}); + h.size <- h.size + 1 ; + if h.size > Array.length h_data lsl 1 then Hash_set_gen.resize key_index h; + true + end + else false + + + let mem (h : _ Hash_set_gen.t) key = + Hash_set_gen.small_bucket_mem eq_key key (Array.unsafe_get h.data (key_index h key)) + +#ifdef TYPE_FUNCTOR +end +#endif + diff --git a/analysis/vendor/ext/hash_set.mli b/analysis/vendor/ext/hash_set.mli new file mode 100644 index 000000000..bd8254337 --- /dev/null +++ b/analysis/vendor/ext/hash_set.mli @@ -0,0 +1,32 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(** Ideas are based on {!Hash}, + however, {!Hash.add} does not really optimize and has a bad semantics for {!Hash_set}, + This module fixes the semantics of [add]. + [remove] is not optimized since it is not used too much +*) + +(** A naive t implementation on top of [hashtbl], the value is [unit]*) +module Make (H : Hashtbl.HashedType) : Hash_set_gen.S with type key = H.t diff --git a/analysis/vendor/ext/hash_set_gen.ml b/analysis/vendor/ext/hash_set_gen.ml new file mode 100644 index 000000000..a1879036f --- /dev/null +++ b/analysis/vendor/ext/hash_set_gen.ml @@ -0,0 +1,167 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(* We do dynamic hashing, and resize the table and rehash the elements + when buckets become too long. *) + +type 'a bucket = + | Empty + | Cons of { mutable key : 'a; mutable next : 'a bucket } + +type 'a t = { + mutable size : int; + (* number of entries *) + mutable data : 'a bucket array; + (* the buckets *) + initial_size : int; (* initial array size *) +} + +let create initial_size = + let s = Ext_util.power_2_above 16 initial_size in + { initial_size = s; size = 0; data = Array.make s Empty } + +let clear h = + h.size <- 0; + let len = Array.length h.data in + for i = 0 to len - 1 do + Array.unsafe_set h.data i Empty + done + +let reset h = + h.size <- 0; + h.data <- Array.make h.initial_size Empty + +let length h = h.size + +let resize indexfun h = + let odata = h.data in + let osize = Array.length odata in + let nsize = osize * 2 in + if nsize < Sys.max_array_length then ( + let ndata = Array.make nsize Empty in + let ndata_tail = Array.make nsize Empty in + h.data <- ndata; + (* so that indexfun sees the new bucket count *) + let rec insert_bucket = function + | Empty -> () + | Cons { key; next } as cell -> + let nidx = indexfun h key in + (match Array.unsafe_get ndata_tail nidx with + | Empty -> Array.unsafe_set ndata nidx cell + | Cons tail -> tail.next <- cell); + Array.unsafe_set ndata_tail nidx cell; + insert_bucket next + in + for i = 0 to osize - 1 do + insert_bucket (Array.unsafe_get odata i) + done; + for i = 0 to nsize - 1 do + match Array.unsafe_get ndata_tail i with + | Empty -> () + | Cons tail -> tail.next <- Empty + done) + +let iter h f = + let rec do_bucket = function + | Empty -> () + | Cons l -> + f l.key; + do_bucket l.next + in + let d = h.data in + for i = 0 to Array.length d - 1 do + do_bucket (Array.unsafe_get d i) + done + +let fold h init f = + let rec do_bucket b accu = + match b with Empty -> accu | Cons l -> do_bucket l.next (f l.key accu) + in + let d = h.data in + let accu = ref init in + for i = 0 to Array.length d - 1 do + accu := do_bucket (Array.unsafe_get d i) !accu + done; + !accu + +let to_list set = fold set [] List.cons + +let rec small_bucket_mem eq key lst = + match lst with + | Empty -> false + | Cons lst -> ( + eq key lst.key + || + match lst.next with + | Empty -> false + | Cons lst -> ( + eq key lst.key + || + match lst.next with + | Empty -> false + | Cons lst -> eq key lst.key || small_bucket_mem eq key lst.next)) + +let rec remove_bucket (h : _ t) (i : int) key ~(prec : _ bucket) + (buck : _ bucket) eq_key = + match buck with + | Empty -> () + | Cons { key = k; next } -> + if eq_key k key then ( + h.size <- h.size - 1; + match prec with + | Empty -> Array.unsafe_set h.data i next + | Cons c -> c.next <- next) + else remove_bucket h i key ~prec:buck next eq_key + +module type S = sig + type key + + type t + + val create : int -> t + + val clear : t -> unit + + val reset : t -> unit + + (* val copy: t -> t *) + val remove : t -> key -> unit + + val add : t -> key -> unit + + val of_array : key array -> t + + val check_add : t -> key -> bool + + val mem : t -> key -> bool + + val iter : t -> (key -> unit) -> unit + + val fold : t -> 'b -> (key -> 'b -> 'b) -> 'b + + val length : t -> int + + (* val stats: t -> Hashtbl.statistics *) + val to_list : t -> key list +end diff --git a/analysis/vendor/ext/hash_set_ident.mli b/analysis/vendor/ext/hash_set_ident.mli new file mode 100644 index 000000000..5fed77b9b --- /dev/null +++ b/analysis/vendor/ext/hash_set_ident.mli @@ -0,0 +1,26 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + + +include Hash_set_gen.S with type key = Ident.t diff --git a/analysis/vendor/ext/hash_set_ident_mask.ml b/analysis/vendor/ext/hash_set_ident_mask.ml new file mode 100644 index 000000000..8cdc76b77 --- /dev/null +++ b/analysis/vendor/ext/hash_set_ident_mask.ml @@ -0,0 +1,163 @@ + +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(** A speicalized datastructure for scc algorithm *) + +type ident = Ident.t + +type bucket = + | Empty + | Cons of { + ident : ident; + mutable mask : bool; + rest : bucket + } + +type t = { + mutable size : int ; + mutable data : bucket array; + mutable mask_size : int (* mark how many idents are marked *) +} + + + +let key_index_by_ident (h : t) (key : Ident.t) = + (Bs_hash_stubs.hash_string_int key.name key.stamp) land (Array.length h.data - 1) + + + + +let create initial_size = + let s = Ext_util.power_2_above 8 initial_size in + { size = 0; data = Array.make s Empty ; mask_size = 0} + +let iter_and_unmask h f = + let rec iter_bucket buckets = + match buckets with + | Empty -> + () + | Cons k -> + let k_mask = k.mask in + f k.ident k_mask ; + if k_mask then + begin + k.mask <- false ; + (* we can set [h.mask_size] to zero, + however, it would result inconsistent state + once [f] throw + *) + h.mask_size <- h.mask_size - 1 + end; + iter_bucket k.rest + in + let d = h.data in + for i = 0 to Array.length d - 1 do + iter_bucket (Array.unsafe_get d i) + done + + +let rec small_bucket_mem key lst = + match lst with + | Empty -> false + | Cons rst -> + Ext_ident.equal key rst.ident || + match rst.rest with + | Empty -> false + | Cons rst -> + Ext_ident.equal key rst.ident || + match rst.rest with + | Empty -> false + | Cons rst -> + Ext_ident.equal key rst.ident || + small_bucket_mem key rst.rest + +let resize indexfun h = + let odata = h.data in + let osize = Array.length odata in + let nsize = osize * 2 in + if nsize < Sys.max_array_length then begin + let ndata = Array.make nsize Empty in + h.data <- ndata; (* so that indexfun sees the new bucket count *) + let rec insert_bucket = function + Empty -> () + | Cons {ident = key; mask; rest} -> + let nidx = indexfun h key in + Array.unsafe_set + ndata (nidx) + (Cons {ident = key; mask; rest = Array.unsafe_get ndata (nidx)}); + insert_bucket rest + in + for i = 0 to osize - 1 do + insert_bucket (Array.unsafe_get odata i) + done + end + +let add_unmask (h : t) (key : Ident.t) = + let i = key_index_by_ident h key in + let h_data = h.data in + let old_bucket = Array.unsafe_get h_data i in + if not (small_bucket_mem key old_bucket) then + begin + Array.unsafe_set h_data i + (Cons {ident = key; mask = false; rest = old_bucket}); + h.size <- h.size + 1 ; + if h.size > Array.length h_data lsl 1 then resize key_index_by_ident h + end + + + + +let rec small_bucket_mask key lst = + match lst with + | Empty -> false + | Cons rst -> + if Ext_ident.equal key rst.ident then + if rst.mask then false else (rst.mask <- true ; true) + else + match rst.rest with + | Empty -> false + | Cons rst -> + if Ext_ident.equal key rst.ident then + if rst.mask then false else (rst.mask <- true ; true) + else + match rst.rest with + | Empty -> false + | Cons rst -> + if Ext_ident.equal key rst.ident then + if rst.mask then false else (rst.mask <- true ; true) + else + small_bucket_mask key rst.rest + +let mask_and_check_all_hit (h : t) (key : Ident.t) = + if + small_bucket_mask key + (Array.unsafe_get h.data (key_index_by_ident h key )) then + begin + h.mask_size <- h.mask_size + 1 + end; + h.size = h.mask_size + + + diff --git a/analysis/vendor/ext/hash_set_ident_mask.mli b/analysis/vendor/ext/hash_set_ident_mask.mli new file mode 100644 index 000000000..19c60a028 --- /dev/null +++ b/analysis/vendor/ext/hash_set_ident_mask.mli @@ -0,0 +1,38 @@ + + +(** Based on [hash_set] specialized for mask operations *) +type ident = Ident.t + + +type t + +val create: int -> t + + +(* add one ident + ident is unmaksed by default +*) +val add_unmask : t -> ident -> unit + + +(** [check_mask h key] if [key] exists mask it otherwise nothing + return true if all keys are masked otherwise false +*) +val mask_and_check_all_hit : + t -> + ident -> + bool + +(** [iter_and_unmask f h] iterating the collection and mask all idents, + dont consul the collection in function [f] + TODO: what happens if an exception raised in the callback, + would the hashtbl still be in consistent state? +*) +val iter_and_unmask: + t -> + (ident -> bool -> unit) -> + unit + + + + diff --git a/analysis/vendor/ext/hash_set_int.mli b/analysis/vendor/ext/hash_set_int.mli new file mode 100644 index 000000000..9e5cf155e --- /dev/null +++ b/analysis/vendor/ext/hash_set_int.mli @@ -0,0 +1,25 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +include Hash_set_gen.S with type key = int diff --git a/analysis/vendor/ext/hash_set_poly.mli b/analysis/vendor/ext/hash_set_poly.mli new file mode 100644 index 000000000..1539d3f7b --- /dev/null +++ b/analysis/vendor/ext/hash_set_poly.mli @@ -0,0 +1,47 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type 'a t + +val create : int -> 'a t + +val clear : 'a t -> unit + +val reset : 'a t -> unit + +(* val copy : 'a t -> 'a t *) + +val add : 'a t -> 'a -> unit + +val remove : 'a t -> 'a -> unit + +val mem : 'a t -> 'a -> bool + +val iter : 'a t -> ('a -> unit) -> unit + +val to_list : 'a t -> 'a list + +val length : 'a t -> int + +(* val stats: 'a t -> Hashtbl.statistics *) diff --git a/analysis/vendor/ext/hash_set_string.mli b/analysis/vendor/ext/hash_set_string.mli new file mode 100644 index 000000000..0050b66dc --- /dev/null +++ b/analysis/vendor/ext/hash_set_string.mli @@ -0,0 +1,25 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +include Hash_set_gen.S with type key = string diff --git a/analysis/vendor/ext/hash_string.mli b/analysis/vendor/ext/hash_string.mli new file mode 100644 index 000000000..ef6b14450 --- /dev/null +++ b/analysis/vendor/ext/hash_string.mli @@ -0,0 +1,25 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +include Hash_gen.S with type key = string diff --git a/analysis/vendor/compiler-libs-406/ident.ml b/analysis/vendor/ext/ident.ml similarity index 96% rename from analysis/vendor/compiler-libs-406/ident.ml rename to analysis/vendor/ext/ident.ml index 1041fb51c..ca4697332 100644 --- a/analysis/vendor/compiler-libs-406/ident.ml +++ b/analysis/vendor/ext/ident.ml @@ -17,6 +17,7 @@ open Format type t = { stamp: int; name: string; mutable flags: int } +let [@inlnie] max (x:int) y = if x >= y then x else y let global_flag = 1 let predef_exn_flag = 2 @@ -49,13 +50,12 @@ let persistent i = (i.stamp = 0) let equal i1 i2 = i1.name = i2.name -let same i1 i2 = i1 = i2 - (* Possibly more efficient version (with a real compiler, at least): - if i1.stamp <> 0 - then i1.stamp = i2.stamp - else i2.stamp = 0 && i1.name = i2.name *) +let same ({stamp; name } : t) i2 = + if stamp <> 0 + then stamp = i2.stamp + else i2.stamp = 0 && name = i2.name + -let compare i1 i2 = Stdlib.compare i1 i2 let binding_time i = i.stamp diff --git a/analysis/vendor/compiler-libs-406/ident.mli b/analysis/vendor/ext/ident.mli similarity index 100% rename from analysis/vendor/compiler-libs-406/ident.mli rename to analysis/vendor/ext/ident.mli diff --git a/analysis/vendor/compiler-libs-406/identifiable.ml b/analysis/vendor/ext/identifiable.ml similarity index 98% rename from analysis/vendor/compiler-libs-406/identifiable.ml rename to analysis/vendor/ext/identifiable.ml index b0b706f83..6ee0519a9 100644 --- a/analysis/vendor/compiler-libs-406/identifiable.ml +++ b/analysis/vendor/ext/identifiable.ml @@ -43,7 +43,7 @@ module type Map = sig with type key = T.t and type 'a t = 'a Map.Make (T).t - val filter_map : 'a t -> f:(key -> 'a -> 'b option) -> 'b t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t val of_list : (key * 'a) list -> 'a t val disjoint_union : ?eq:('a -> 'a -> bool) -> ?print:(Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t @@ -100,7 +100,7 @@ end module Make_map (T : Thing) = struct include Map.Make (T) - let filter_map t ~f = + let filter_map f t = fold (fun id v map -> match f id v with | None -> map diff --git a/analysis/vendor/compiler-libs-406/identifiable.mli b/analysis/vendor/ext/identifiable.mli similarity index 98% rename from analysis/vendor/compiler-libs-406/identifiable.mli rename to analysis/vendor/ext/identifiable.mli index 50e3ac577..46e145451 100644 --- a/analysis/vendor/compiler-libs-406/identifiable.mli +++ b/analysis/vendor/ext/identifiable.mli @@ -47,7 +47,7 @@ module type Map = sig with type key = T.t and type 'a t = 'a Map.Make (T).t - val filter_map : 'a t -> f:(key -> 'a -> 'b option) -> 'b t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t val of_list : (key * 'a) list -> 'a t (** [disjoint_union m1 m2] contains all bindings from [m1] and diff --git a/analysis/vendor/ext/int_vec_util.ml b/analysis/vendor/ext/int_vec_util.ml new file mode 100644 index 000000000..977adda17 --- /dev/null +++ b/analysis/vendor/ext/int_vec_util.ml @@ -0,0 +1,34 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +let rec unsafe_mem_aux arr i (key : int) bound = + if i <= bound then + if Array.unsafe_get arr i = (key : int) then true + else unsafe_mem_aux arr (i + 1) key bound + else false + +let mem key (x : Vec_int.t) = + let internal_array = Vec_int.unsafe_internal_array x in + let len = Vec_int.length x in + unsafe_mem_aux internal_array 0 key (len - 1) diff --git a/analysis/vendor/ext/int_vec_util.mli b/analysis/vendor/ext/int_vec_util.mli new file mode 100644 index 000000000..407e00bd5 --- /dev/null +++ b/analysis/vendor/ext/int_vec_util.mli @@ -0,0 +1,25 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +val mem : int -> Vec_int.t -> bool diff --git a/analysis/vendor/ext/int_vec_vec.ml b/analysis/vendor/ext/int_vec_vec.ml new file mode 100644 index 000000000..24f472e03 --- /dev/null +++ b/analysis/vendor/ext/int_vec_vec.ml @@ -0,0 +1,29 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +include Vec.Make (struct + type t = Vec_int.t + + let null = Vec_int.empty () +end) diff --git a/analysis/vendor/ext/int_vec_vec.mli b/analysis/vendor/ext/int_vec_vec.mli new file mode 100644 index 000000000..a33bd5ee0 --- /dev/null +++ b/analysis/vendor/ext/int_vec_vec.mli @@ -0,0 +1,25 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +include Vec_gen.S with type elt = Vec_int.t diff --git a/analysis/vendor/ext/js_reserved_map.ml b/analysis/vendor/ext/js_reserved_map.ml new file mode 100644 index 000000000..9b6ccbfcd --- /dev/null +++ b/analysis/vendor/ext/js_reserved_map.ml @@ -0,0 +1,731 @@ + +(* Copyright (C) 2019-Present Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +let sorted_keywords = [| + "AbortController"; + "AbortSignal"; + "ActiveXObject"; + "AnalyserNode"; + "AnimationEvent"; + "Array"; + "ArrayBuffer"; + "Atomics"; + "Attr"; + "Audio"; + "AudioBuffer"; + "AudioBufferSourceNode"; + "AudioContext"; + "AudioDestinationNode"; + "AudioListener"; + "AudioNode"; + "AudioParam"; + "AudioParamMap"; + "AudioProcessingEvent"; + "AudioScheduledSourceNode"; + "AudioWorkletNode"; + "BarProp"; + "BaseAudioContext"; + "BatteryManager"; + "BeforeInstallPromptEvent"; + "BeforeUnloadEvent"; + "BigInt"; + "BigInt64Array"; + "BigUint64Array"; + "BiquadFilterNode"; + "Blob"; + "BlobEvent"; + "BluetoothUUID"; + "Boolean"; + "BroadcastChannel"; + "Buffer"; + "ByteLengthQueuingStrategy"; + "CDATASection"; + "CSS"; + "CSSConditionRule"; + "CSSFontFaceRule"; + "CSSGroupingRule"; + "CSSImageValue"; + "CSSImportRule"; + "CSSKeyframeRule"; + "CSSKeyframesRule"; + "CSSKeywordValue"; + "CSSMathInvert"; + "CSSMathMax"; + "CSSMathMin"; + "CSSMathNegate"; + "CSSMathProduct"; + "CSSMathSum"; + "CSSMathValue"; + "CSSMatrixComponent"; + "CSSMediaRule"; + "CSSNamespaceRule"; + "CSSNumericArray"; + "CSSNumericValue"; + "CSSPageRule"; + "CSSPerspective"; + "CSSPositionValue"; + "CSSRotate"; + "CSSRule"; + "CSSRuleList"; + "CSSScale"; + "CSSSkew"; + "CSSSkewX"; + "CSSSkewY"; + "CSSStyleDeclaration"; + "CSSStyleRule"; + "CSSStyleSheet"; + "CSSStyleValue"; + "CSSSupportsRule"; + "CSSTransformComponent"; + "CSSTransformValue"; + "CSSTranslate"; + "CSSUnitValue"; + "CSSUnparsedValue"; + "CSSVariableReferenceValue"; + "CanvasCaptureMediaStreamTrack"; + "CanvasGradient"; + "CanvasPattern"; + "CanvasRenderingContext2D"; + "ChannelMergerNode"; + "ChannelSplitterNode"; + "CharacterData"; + "ClipboardEvent"; + "CloseEvent"; + "Comment"; + "CompositionEvent"; + "ConstantSourceNode"; + "ConvolverNode"; + "CountQueuingStrategy"; + "Crypto"; + "CryptoKey"; + "CustomElementRegistry"; + "CustomEvent"; + "DOMError"; + "DOMException"; + "DOMImplementation"; + "DOMMatrix"; + "DOMMatrixReadOnly"; + "DOMParser"; + "DOMPoint"; + "DOMPointReadOnly"; + "DOMQuad"; + "DOMRect"; + "DOMRectList"; + "DOMRectReadOnly"; + "DOMStringList"; + "DOMStringMap"; + "DOMTokenList"; + "DataTransfer"; + "DataTransferItem"; + "DataTransferItemList"; + "DataView"; + "Date"; + "DelayNode"; + "DeviceMotionEvent"; + "DeviceOrientationEvent"; + "Document"; + "DocumentFragment"; + "DocumentType"; + "DragEvent"; + "DynamicsCompressorNode"; + "Element"; + "EnterPictureInPictureEvent"; + "Error"; + "ErrorEvent"; + "EvalError"; + "Event"; + "EventSource"; + "EventTarget"; + "File"; + "FileList"; + "FileReader"; + "Float32Array"; + "Float64Array"; + "FocusEvent"; + "FontFace"; + "FontFaceSetLoadEvent"; + "FormData"; + "Function"; + "GainNode"; + "Gamepad"; + "GamepadButton"; + "GamepadEvent"; + "GamepadHapticActuator"; + "HTMLAllCollection"; + "HTMLAnchorElement"; + "HTMLAreaElement"; + "HTMLAudioElement"; + "HTMLBRElement"; + "HTMLBaseElement"; + "HTMLBodyElement"; + "HTMLButtonElement"; + "HTMLCanvasElement"; + "HTMLCollection"; + "HTMLContentElement"; + "HTMLDListElement"; + "HTMLDataElement"; + "HTMLDataListElement"; + "HTMLDetailsElement"; + "HTMLDialogElement"; + "HTMLDirectoryElement"; + "HTMLDivElement"; + "HTMLDocument"; + "HTMLElement"; + "HTMLEmbedElement"; + "HTMLFieldSetElement"; + "HTMLFontElement"; + "HTMLFormControlsCollection"; + "HTMLFormElement"; + "HTMLFrameElement"; + "HTMLFrameSetElement"; + "HTMLHRElement"; + "HTMLHeadElement"; + "HTMLHeadingElement"; + "HTMLHtmlElement"; + "HTMLIFrameElement"; + "HTMLImageElement"; + "HTMLInputElement"; + "HTMLLIElement"; + "HTMLLabelElement"; + "HTMLLegendElement"; + "HTMLLinkElement"; + "HTMLMapElement"; + "HTMLMarqueeElement"; + "HTMLMediaElement"; + "HTMLMenuElement"; + "HTMLMetaElement"; + "HTMLMeterElement"; + "HTMLModElement"; + "HTMLOListElement"; + "HTMLObjectElement"; + "HTMLOptGroupElement"; + "HTMLOptionElement"; + "HTMLOptionsCollection"; + "HTMLOutputElement"; + "HTMLParagraphElement"; + "HTMLParamElement"; + "HTMLPictureElement"; + "HTMLPreElement"; + "HTMLProgressElement"; + "HTMLQuoteElement"; + "HTMLScriptElement"; + "HTMLSelectElement"; + "HTMLShadowElement"; + "HTMLSlotElement"; + "HTMLSourceElement"; + "HTMLSpanElement"; + "HTMLStyleElement"; + "HTMLTableCaptionElement"; + "HTMLTableCellElement"; + "HTMLTableColElement"; + "HTMLTableElement"; + "HTMLTableRowElement"; + "HTMLTableSectionElement"; + "HTMLTemplateElement"; + "HTMLTextAreaElement"; + "HTMLTimeElement"; + "HTMLTitleElement"; + "HTMLTrackElement"; + "HTMLUListElement"; + "HTMLUnknownElement"; + "HTMLVideoElement"; + "HashChangeEvent"; + "Headers"; + "History"; + "IDBCursor"; + "IDBCursorWithValue"; + "IDBDatabase"; + "IDBFactory"; + "IDBIndex"; + "IDBKeyRange"; + "IDBObjectStore"; + "IDBOpenDBRequest"; + "IDBRequest"; + "IDBTransaction"; + "IDBVersionChangeEvent"; + "IIRFilterNode"; + "IdleDeadline"; + "Image"; + "ImageBitmap"; + "ImageBitmapRenderingContext"; + "ImageCapture"; + "ImageData"; + "Infinity"; + "InputDeviceCapabilities"; + "InputDeviceInfo"; + "InputEvent"; + "Int16Array"; + "Int32Array"; + "Int8Array"; + "IntersectionObserver"; + "IntersectionObserverEntry"; + "Intl"; + "JSON"; + "KeyboardEvent"; + "Location"; + "MIDIAccess"; + "MIDIConnectionEvent"; + "MIDIInput"; + "MIDIInputMap"; + "MIDIMessageEvent"; + "MIDIOutput"; + "MIDIOutputMap"; + "MIDIPort"; + "Map"; + "Math"; + "MediaCapabilities"; + "MediaCapabilitiesInfo"; + "MediaDeviceInfo"; + "MediaDevices"; + "MediaElementAudioSourceNode"; + "MediaEncryptedEvent"; + "MediaError"; + "MediaList"; + "MediaQueryList"; + "MediaQueryListEvent"; + "MediaRecorder"; + "MediaSettingsRange"; + "MediaSource"; + "MediaStream"; + "MediaStreamAudioDestinationNode"; + "MediaStreamAudioSourceNode"; + "MediaStreamEvent"; + "MediaStreamTrack"; + "MediaStreamTrackEvent"; + "MessageChannel"; + "MessageEvent"; + "MessagePort"; + "MimeType"; + "MimeTypeArray"; + "MouseEvent"; + "MutationEvent"; + "MutationObserver"; + "MutationRecord"; + "NaN"; + "NamedNodeMap"; + "Navigator"; + "NetworkInformation"; + "Node"; + "NodeFilter"; + "NodeIterator"; + "NodeList"; + "Notification"; + "Number"; + "Object"; + "OfflineAudioCompletionEvent"; + "OfflineAudioContext"; + "OffscreenCanvas"; + "OffscreenCanvasRenderingContext2D"; + "Option"; + "OscillatorNode"; + "OverconstrainedError"; + "PageTransitionEvent"; + "PannerNode"; + "Path2D"; + "PaymentInstruments"; + "PaymentManager"; + "PaymentRequestUpdateEvent"; + "Performance"; + "PerformanceEntry"; + "PerformanceLongTaskTiming"; + "PerformanceMark"; + "PerformanceMeasure"; + "PerformanceNavigation"; + "PerformanceNavigationTiming"; + "PerformanceObserver"; + "PerformanceObserverEntryList"; + "PerformancePaintTiming"; + "PerformanceResourceTiming"; + "PerformanceServerTiming"; + "PerformanceTiming"; + "PeriodicWave"; + "PermissionStatus"; + "Permissions"; + "PhotoCapabilities"; + "PictureInPictureWindow"; + "Plugin"; + "PluginArray"; + "PointerEvent"; + "PopStateEvent"; + "ProcessingInstruction"; + "ProgressEvent"; + "Promise"; + "PromiseRejectionEvent"; + "Proxy"; + "PushManager"; + "PushSubscription"; + "PushSubscriptionOptions"; + "RTCCertificate"; + "RTCDTMFSender"; + "RTCDTMFToneChangeEvent"; + "RTCDataChannel"; + "RTCDataChannelEvent"; + "RTCIceCandidate"; + "RTCPeerConnection"; + "RTCPeerConnectionIceEvent"; + "RTCRtpContributingSource"; + "RTCRtpReceiver"; + "RTCRtpSender"; + "RTCRtpTransceiver"; + "RTCSessionDescription"; + "RTCStatsReport"; + "RTCTrackEvent"; + "RadioNodeList"; + "Range"; + "RangeError"; + "ReadableStream"; + "ReferenceError"; + "Reflect"; + "RegExp"; + "RemotePlayback"; + "ReportingObserver"; + "Request"; + "ResizeObserver"; + "ResizeObserverEntry"; + "Response"; + "SVGAElement"; + "SVGAngle"; + "SVGAnimateElement"; + "SVGAnimateMotionElement"; + "SVGAnimateTransformElement"; + "SVGAnimatedAngle"; + "SVGAnimatedBoolean"; + "SVGAnimatedEnumeration"; + "SVGAnimatedInteger"; + "SVGAnimatedLength"; + "SVGAnimatedLengthList"; + "SVGAnimatedNumber"; + "SVGAnimatedNumberList"; + "SVGAnimatedPreserveAspectRatio"; + "SVGAnimatedRect"; + "SVGAnimatedString"; + "SVGAnimatedTransformList"; + "SVGAnimationElement"; + "SVGCircleElement"; + "SVGClipPathElement"; + "SVGComponentTransferFunctionElement"; + "SVGDefsElement"; + "SVGDescElement"; + "SVGDiscardElement"; + "SVGElement"; + "SVGEllipseElement"; + "SVGFEBlendElement"; + "SVGFEColorMatrixElement"; + "SVGFEComponentTransferElement"; + "SVGFECompositeElement"; + "SVGFEConvolveMatrixElement"; + "SVGFEDiffuseLightingElement"; + "SVGFEDisplacementMapElement"; + "SVGFEDistantLightElement"; + "SVGFEDropShadowElement"; + "SVGFEFloodElement"; + "SVGFEFuncAElement"; + "SVGFEFuncBElement"; + "SVGFEFuncGElement"; + "SVGFEFuncRElement"; + "SVGFEGaussianBlurElement"; + "SVGFEImageElement"; + "SVGFEMergeElement"; + "SVGFEMergeNodeElement"; + "SVGFEMorphologyElement"; + "SVGFEOffsetElement"; + "SVGFEPointLightElement"; + "SVGFESpecularLightingElement"; + "SVGFESpotLightElement"; + "SVGFETileElement"; + "SVGFETurbulenceElement"; + "SVGFilterElement"; + "SVGForeignObjectElement"; + "SVGGElement"; + "SVGGeometryElement"; + "SVGGradientElement"; + "SVGGraphicsElement"; + "SVGImageElement"; + "SVGLength"; + "SVGLengthList"; + "SVGLineElement"; + "SVGLinearGradientElement"; + "SVGMPathElement"; + "SVGMarkerElement"; + "SVGMaskElement"; + "SVGMatrix"; + "SVGMetadataElement"; + "SVGNumber"; + "SVGNumberList"; + "SVGPathElement"; + "SVGPatternElement"; + "SVGPoint"; + "SVGPointList"; + "SVGPolygonElement"; + "SVGPolylineElement"; + "SVGPreserveAspectRatio"; + "SVGRadialGradientElement"; + "SVGRect"; + "SVGRectElement"; + "SVGSVGElement"; + "SVGScriptElement"; + "SVGSetElement"; + "SVGStopElement"; + "SVGStringList"; + "SVGStyleElement"; + "SVGSwitchElement"; + "SVGSymbolElement"; + "SVGTSpanElement"; + "SVGTextContentElement"; + "SVGTextElement"; + "SVGTextPathElement"; + "SVGTextPositioningElement"; + "SVGTitleElement"; + "SVGTransform"; + "SVGTransformList"; + "SVGUnitTypes"; + "SVGUseElement"; + "SVGViewElement"; + "Screen"; + "ScreenOrientation"; + "ScriptProcessorNode"; + "SecurityPolicyViolationEvent"; + "Selection"; + "Set"; + "ShadowRoot"; + "SharedArrayBuffer"; + "SharedWorker"; + "SourceBuffer"; + "SourceBufferList"; + "SpeechSynthesisErrorEvent"; + "SpeechSynthesisEvent"; + "SpeechSynthesisUtterance"; + "StaticRange"; + "StereoPannerNode"; + "Storage"; + "StorageEvent"; + "String"; + "StylePropertyMap"; + "StylePropertyMapReadOnly"; + "StyleSheet"; + "StyleSheetList"; + "SubtleCrypto"; + "Symbol"; + "SyncManager"; + "SyntaxError"; + "TaskAttributionTiming"; + "Text"; + "TextDecoder"; + "TextDecoderStream"; + "TextEncoder"; + "TextEncoderStream"; + "TextEvent"; + "TextMetrics"; + "TextTrack"; + "TextTrackCue"; + "TextTrackCueList"; + "TextTrackList"; + "TimeRanges"; + "Touch"; + "TouchEvent"; + "TouchList"; + "TrackEvent"; + "TransformStream"; + "TransitionEvent"; + "TreeWalker"; + "TypeError"; + "UIEvent"; + "URIError"; + "URL"; + "URLSearchParams"; + "Uint16Array"; + "Uint32Array"; + "Uint8Array"; + "Uint8ClampedArray"; + "UserActivation"; + "VTTCue"; + "ValidityState"; + "VisualViewport"; + "WaveShaperNode"; + "WeakMap"; + "WeakSet"; + "WebAssembly"; + "WebGL2RenderingContext"; + "WebGLActiveInfo"; + "WebGLBuffer"; + "WebGLContextEvent"; + "WebGLFramebuffer"; + "WebGLProgram"; + "WebGLQuery"; + "WebGLRenderbuffer"; + "WebGLRenderingContext"; + "WebGLSampler"; + "WebGLShader"; + "WebGLShaderPrecisionFormat"; + "WebGLSync"; + "WebGLTexture"; + "WebGLTransformFeedback"; + "WebGLUniformLocation"; + "WebGLVertexArrayObject"; + "WebKitCSSMatrix"; + "WebKitMutationObserver"; + "WebSocket"; + "WheelEvent"; + "Window"; + "Worker"; + "WritableStream"; + "XDomainRequest"; + "XMLDocument"; + "XMLHttpRequest"; + "XMLHttpRequestEventTarget"; + "XMLHttpRequestUpload"; + "XMLSerializer"; + "XPathEvaluator"; + "XPathExpression"; + "XPathResult"; + "XSLTProcessor"; + "__dirname"; + "__esModule"; + "__filename"; + "abstract"; + "arguments"; + "await"; + "boolean"; + "break"; + "byte"; + "case"; + "catch"; + "char"; + "class"; + "clearImmediate"; + "clearInterval"; + "clearTimeout"; + "console"; + "const"; + "continue"; + "debugger"; + "decodeURI"; + "decodeURIComponent"; + "default"; + "delete"; + "do"; + "document"; + "double"; + "else"; + "encodeURI"; + "encodeURIComponent"; + "enum"; + "escape"; + "eval"; + "event"; + "export"; + "exports"; + "extends"; + "false"; + "fetch"; + "final"; + "finally"; + "float"; + "for"; + "function"; + "global"; + "goto"; + "if"; + "implements"; + "import"; + "in"; + "instanceof"; + "int"; + "interface"; + "isFinite"; + "isNaN"; + "let"; + "location"; + "long"; + "module"; + "native"; + "navigator"; + "new"; + "null"; + "package"; + "parseFloat"; + "parseInt"; + "private"; + "process"; + "protected"; + "public"; + "require"; + "return"; + "setImmediate"; + "setInterval"; + "setTimeout"; + "short"; + "static"; + "super"; + "switch"; + "synchronized"; + "this"; + "throw"; + "transient"; + "true"; + "try"; + "typeof"; + "undefined"; + "unescape"; + "var"; + "void"; + "volatile"; + "while"; + "window"; + "with"; + "yield"; + |] + + +type element = string + +let rec binarySearchAux (arr : element array) (lo : int) (hi : int) key : bool = + let mid = (lo + hi)/2 in + let midVal = Array.unsafe_get arr mid in + (* let c = cmp key midVal [@bs] in *) + if key = midVal then true + else if key < midVal then (* a[lo] =< key < a[mid] <= a[hi] *) + if hi = mid then + (Array.unsafe_get arr lo) = key + else binarySearchAux arr lo mid key + else (* a[lo] =< a[mid] < key <= a[hi] *) + if lo = mid then + (Array.unsafe_get arr hi) = key + else binarySearchAux arr mid hi key + +let binarySearch (sorted : element array) (key : element) : bool = + let len = Array.length sorted in + if len = 0 then false + else + let lo = Array.unsafe_get sorted 0 in + (* let c = cmp key lo [@bs] in *) + if key < lo then false + else + let hi = Array.unsafe_get sorted (len - 1) in + (* let c2 = cmp key hi [@bs]in *) + if key > hi then false + else binarySearchAux sorted 0 (len - 1) key + +let is_reserved s = binarySearch sorted_keywords s diff --git a/analysis/vendor/ext/js_reserved_map.mli b/analysis/vendor/ext/js_reserved_map.mli new file mode 100644 index 000000000..072737f89 --- /dev/null +++ b/analysis/vendor/ext/js_reserved_map.mli @@ -0,0 +1,25 @@ +(* Copyright (C) 2019-Present Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +val is_reserved : string -> bool diff --git a/analysis/vendor/ext/js_runtime_modules.ml b/analysis/vendor/ext/js_runtime_modules.ml new file mode 100644 index 000000000..a962e1500 --- /dev/null +++ b/analysis/vendor/ext/js_runtime_modules.ml @@ -0,0 +1,70 @@ +(* Copyright (C) 2017 Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +let exceptions = "Caml_exceptions" + +let io = "Caml_io" + +let sys = "Caml_sys" + +let lexer = "Caml_lexer" + +let parser = "Caml_parser" + +let obj_runtime = "Caml_obj" + +let array = "Caml_array" + +let format = "Caml_format" + +let string = "Caml_string" + +let bytes = "Caml_bytes" +let bytes_ = "Bytes" + +let float = "Caml_float" + +let hash_primitive = "Caml_hash_primitive" + +let hash = "Caml_hash" + +let curry = "Curry" + +let caml_primitive = "Caml" + +let int64 = "Caml_int64" + +let md5 = "Caml_md5" + +let int32 = "Caml_int32" + +let option = "Caml_option" + +let module_ = "Caml_module" + +let external_polyfill = "Caml_external_polyfill" + +let caml_js_exceptions = "Caml_js_exceptions" + +let caml_splice_call = "Caml_splice_call" diff --git a/analysis/vendor/ext/literals.ml b/analysis/vendor/ext/literals.ml new file mode 100644 index 000000000..6810267cf --- /dev/null +++ b/analysis/vendor/ext/literals.ml @@ -0,0 +1,181 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +let js_array_ctor = "Array" + +let js_type_number = "number" + +let js_type_string = "string" + +let js_type_object = "object" + +let js_type_boolean = "boolean" + +let js_undefined = "undefined" + +let js_prop_length = "length" + +let prim = "prim" + +let param = "param" + +let partial_arg = "partial_arg" + +let tmp = "tmp" + +let create = "create" (* {!Caml_exceptions.create}*) + +let runtime = "runtime" (* runtime directory *) + +let stdlib = "stdlib" + +let imul = "imul" (* signed int32 mul *) + +let setter_suffix = "#=" + +let setter_suffix_len = String.length setter_suffix + +let debugger = "debugger" + +let fn_run = "fn_run" + +let method_run = "method_run" + +let fn_method = "fn_method" + +let fn_mk = "fn_mk" +(*let js_fn_runmethod = "js_fn_runmethod"*) + +(** nodejs *) +let node_modules = "node_modules" + +let node_modules_length = String.length "node_modules" + +let package_json = "package.json" + +let bsconfig_json = "bsconfig.json" + +let build_ninja = "build.ninja" + +(* Name of the library file created for each external dependency. *) +let library_file = "lib" + +let suffix_a = ".a" + +let suffix_cmj = ".cmj" + +let suffix_cmo = ".cmo" + +let suffix_cma = ".cma" + +let suffix_cmi = ".cmi" + +let suffix_cmx = ".cmx" + +let suffix_cmxa = ".cmxa" + +let suffix_mll = ".mll" + +let suffix_ml = ".ml" + +let suffix_mli = ".mli" + +let suffix_res = ".res" + +let suffix_resi = ".resi" + +let suffix_mlmap = ".mlmap" + +let suffix_cmt = ".cmt" + +let suffix_cmti = ".cmti" + +let suffix_ast = ".ast" + +let suffix_iast = ".iast" + +let suffix_d = ".d" + +let suffix_js = ".js" + +let suffix_bs_js = ".bs.js" + +let suffix_mjs = ".mjs" + +let suffix_bs_mjs = ".bs.mjs" + +let suffix_cjs = ".cjs" + +let suffix_bs_cjs = ".bs.cjs" + +let suffix_gen_js = ".gen.js" + +let suffix_gen_tsx = ".gen.tsx" + +let commonjs = "commonjs" + +let es6 = "es6" + +let es6_global = "es6-global" + +let unused_attribute = "Unused attribute " + +(** Used when produce node compatible paths *) +let node_sep = "/" + +let node_parent = ".." + +let node_current = "." + +let gentype_import1 = "genType.import" +let gentype_import2 = "gentype.import" + +let bsbuild_cache = ".bsbuild" + +let sourcedirs_meta = ".sourcedirs.json" + +(* Note the build system should check the validity of filenames + espeically, it should not contain '-' +*) +let ns_sep_char = '-' + +let ns_sep = "-" + +let exception_id = "RE_EXN_ID" + +let polyvar_hash = "NAME" + +let polyvar_value = "VAL" + +let cons = "::" + +let hd = "hd" + +let tl = "tl" + +let lazy_done = "LAZY_DONE" + +let lazy_val = "VAL" + +let pure = "@__PURE__" diff --git a/analysis/vendor/ext/map.cppo.ml b/analysis/vendor/ext/map.cppo.ml new file mode 100644 index 000000000..a7d4e1d69 --- /dev/null +++ b/analysis/vendor/ext/map.cppo.ml @@ -0,0 +1,217 @@ + +(* we don't create [map_poly], since some operations require raise an exception which carries [key] *) + +#ifdef TYPE_STRING +type key = string +let compare_key = Ext_string.compare +let [@inline] eq_key (x : key) y = x = y +#elif defined TYPE_INT +type key = int +let compare_key = Ext_int.compare +let [@inline] eq_key (x : key) y = x = y +#elif defined TYPE_IDENT +type key = Ident.t +let compare_key = Ext_ident.compare +let [@inline] eq_key (x : key) y = Ident.same x y +#else + [%error "unknown type"] +#endif + (* let [@inline] (=) (a : int) b = a = b *) +type + 'a t = (key,'a) Map_gen.t + +let empty = Map_gen.empty +let is_empty = Map_gen.is_empty +let iter = Map_gen.iter +let fold = Map_gen.fold +let for_all = Map_gen.for_all +let exists = Map_gen.exists +let singleton = Map_gen.singleton +let cardinal = Map_gen.cardinal +let bindings = Map_gen.bindings +let to_sorted_array = Map_gen.to_sorted_array +let to_sorted_array_with_f = Map_gen.to_sorted_array_with_f +let keys = Map_gen.keys + + + +let map = Map_gen.map +let mapi = Map_gen.mapi +let bal = Map_gen.bal +let height = Map_gen.height + + +let rec add (tree : _ Map_gen.t as 'a) x data : 'a = match tree with + | Empty -> + singleton x data + | Leaf {k;v} -> + let c = compare_key x k in + if c = 0 then singleton x data else + if c < 0 then + Map_gen.unsafe_two_elements x data k v + else + Map_gen.unsafe_two_elements k v x data + | Node {l; k ; v ; r; h} -> + let c = compare_key x k in + if c = 0 then + Map_gen.unsafe_node x data l r h (* at least need update data *) + else if c < 0 then + bal (add l x data ) k v r + else + bal l k v (add r x data ) + + +let rec adjust (tree : _ Map_gen.t as 'a) x replace : 'a = + match tree with + | Empty -> + singleton x (replace None) + | Leaf {k ; v} -> + let c = compare_key x k in + if c = 0 then singleton x (replace (Some v)) else + if c < 0 then + Map_gen.unsafe_two_elements x (replace None) k v + else + Map_gen.unsafe_two_elements k v x (replace None) + | Node ({l; k ; r} as tree) -> + let c = compare_key x k in + if c = 0 then + Map_gen.unsafe_node x (replace (Some tree.v)) l r tree.h + else if c < 0 then + bal (adjust l x replace ) k tree.v r + else + bal l k tree.v (adjust r x replace ) + + +let rec find_exn (tree : _ Map_gen.t ) x = match tree with + | Empty -> + raise Not_found + | Leaf leaf -> + if eq_key x leaf.k then leaf.v else raise Not_found + | Node tree -> + let c = compare_key x tree.k in + if c = 0 then tree.v + else find_exn (if c < 0 then tree.l else tree.r) x + +let rec find_opt (tree : _ Map_gen.t ) x = match tree with + | Empty -> None + | Leaf leaf -> + if eq_key x leaf.k then Some leaf.v else None + | Node tree -> + let c = compare_key x tree.k in + if c = 0 then Some tree.v + else find_opt (if c < 0 then tree.l else tree.r) x + +let rec find_default (tree : _ Map_gen.t ) x default = match tree with + | Empty -> default + | Leaf leaf -> + if eq_key x leaf.k then leaf.v else default + | Node tree -> + let c = compare_key x tree.k in + if c = 0 then tree.v + else find_default (if c < 0 then tree.l else tree.r) x default + +let rec mem (tree : _ Map_gen.t ) x= match tree with + | Empty -> + false + | Leaf leaf -> eq_key x leaf.k + | Node{l; k ; r} -> + let c = compare_key x k in + c = 0 || mem (if c < 0 then l else r) x + +let rec remove (tree : _ Map_gen.t as 'a) x : 'a = match tree with + | Empty -> empty + | Leaf leaf -> + if eq_key x leaf.k then empty + else tree + | Node{l; k ; v; r} -> + let c = compare_key x k in + if c = 0 then + Map_gen.merge l r + else if c < 0 then + bal (remove l x) k v r + else + bal l k v (remove r x ) + +type 'a split = + | Yes of {l : (key,'a) Map_gen.t; r : (key,'a)Map_gen.t ; v : 'a} + | No of {l : (key,'a) Map_gen.t; r : (key,'a)Map_gen.t } + + +let rec split (tree : (key,'a) Map_gen.t) x : 'a split = + match tree with + | Empty -> + No {l = empty; r = empty} + | Leaf leaf -> + let c = compare_key x leaf.k in + if c = 0 then Yes {l = empty; v= leaf.v; r = empty} + else if c < 0 then No { l = empty; r = tree } + else No { l = tree; r = empty} + | Node {l; k ; v ; r} -> + let c = compare_key x k in + if c = 0 then Yes {l; v; r} + else if c < 0 then + match split l x with + | Yes result -> Yes {result with r = Map_gen.join result.r k v r } + | No result -> No {result with r = Map_gen.join result.r k v r } + else + match split r x with + | Yes result -> + Yes {result with l = Map_gen.join l k v result.l} + | No result -> + No {result with l = Map_gen.join l k v result.l} + + +let rec disjoint_merge_exn + (s1 : _ Map_gen.t) + (s2 : _ Map_gen.t) + fail : _ Map_gen.t = + match s1 with + | Empty -> s2 + | Leaf ({k } as l1) -> + begin match s2 with + | Empty -> s1 + | Leaf l2 -> + let c = compare_key k l2.k in + if c = 0 then raise_notrace (fail k l1.v l2.v) + else if c < 0 then Map_gen.unsafe_two_elements l1.k l1.v l2.k l2.v + else Map_gen.unsafe_two_elements l2.k l2.v k l1.v + | Node _ -> + adjust s2 k (fun data -> + match data with + | None -> l1.v + | Some s2v -> raise_notrace (fail k l1.v s2v) + ) + end + | Node ({k} as xs1) -> + if xs1.h >= height s2 then + begin match split s2 k with + | No {l; r} -> + Map_gen.join + (disjoint_merge_exn xs1.l l fail) + k + xs1.v + (disjoint_merge_exn xs1.r r fail) + | Yes { v = s2v} -> + raise_notrace (fail k xs1.v s2v) + end + else let [@warning "-8"] (Node ({k} as s2) : _ Map_gen.t) = s2 in + begin match split s1 k with + | No {l; r} -> + Map_gen.join + (disjoint_merge_exn l s2.l fail) k s2.v + (disjoint_merge_exn r s2.r fail) + | Yes { v = s1v} -> + raise_notrace (fail k s1v s2.v) + end + + + + + + +let add_list (xs : _ list ) init = + Ext_list.fold_left xs init (fun acc (k,v) -> add acc k v ) + +let of_list xs = add_list xs empty + +let of_array xs = + Ext_array.fold_left xs empty (fun acc (k,v) -> add acc k v ) diff --git a/analysis/vendor/ext/map_gen.ml b/analysis/vendor/ext/map_gen.ml new file mode 100644 index 000000000..ecd0aa315 --- /dev/null +++ b/analysis/vendor/ext/map_gen.ml @@ -0,0 +1,403 @@ +(***********************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. All rights reserved. This file is distributed *) +(* under the terms of the GNU Library General Public License, with *) +(* the special exception on linking described in file ../LICENSE. *) +(* *) +(***********************************************************************) + +[@@@warnerror "+55"] +(* adapted from stdlib *) + +type ('key, 'a) t0 = + | Empty + | Leaf of { k : 'key; v : 'a } + | Node of { l : ('key, 'a) t0; k : 'key; v : 'a; r : ('key, 'a) t0; h : int } + +type ('key, 'a) parital_node = { + l : ('key, 'a) t0; + k : 'key; + v : 'a; + r : ('key, 'a) t0; + h : int; +} + +external ( ~! ) : ('key, 'a) t0 -> ('key, 'a) parital_node = "%identity" + +let empty = Empty + +let rec map x f = + match x with + | Empty -> Empty + | Leaf { k; v } -> Leaf { k; v = f v } + | Node ({ l; v; r } as x) -> + let l' = map l f in + let d' = f v in + let r' = map r f in + Node { x with l = l'; v = d'; r = r' } + +let rec mapi x f = + match x with + | Empty -> Empty + | Leaf { k; v } -> Leaf { k; v = f k v } + | Node ({ l; k; v; r } as x) -> + let l' = mapi l f in + let v' = f k v in + let r' = mapi r f in + Node { x with l = l'; v = v'; r = r' } + +let[@inline] calc_height a b = (if a >= b then a else b) + 1 + +let[@inline] singleton k v = Leaf { k; v } + +let[@inline] height = function Empty -> 0 | Leaf _ -> 1 | Node { h } -> h + +let[@inline] unsafe_node k v l r h = Node { l; k; v; r; h } + +let[@inline] unsafe_two_elements k1 v1 k2 v2 = + unsafe_node k2 v2 (singleton k1 v1) empty 2 + +let[@inline] unsafe_node_maybe_leaf k v l r h = + if h = 1 then Leaf { k; v } else Node { l; k; v; r; h } + +type ('key, +'a) t = ('key, 'a) t0 = private + | Empty + | Leaf of { k : 'key; v : 'a } + | Node of { l : ('key, 'a) t; k : 'key; v : 'a; r : ('key, 'a) t; h : int } + +let rec cardinal_aux acc = function + | Empty -> acc + | Leaf _ -> acc + 1 + | Node { l; r } -> cardinal_aux (cardinal_aux (acc + 1) r) l + +let cardinal s = cardinal_aux 0 s + +let rec bindings_aux accu = function + | Empty -> accu + | Leaf { k; v } -> (k, v) :: accu + | Node { l; k; v; r } -> bindings_aux ((k, v) :: bindings_aux accu r) l + +let bindings s = bindings_aux [] s + +let rec fill_array_with_f (s : _ t) i arr f : int = + match s with + | Empty -> i + | Leaf { k; v } -> + Array.unsafe_set arr i (f k v); + i + 1 + | Node { l; k; v; r } -> + let inext = fill_array_with_f l i arr f in + Array.unsafe_set arr inext (f k v); + fill_array_with_f r (inext + 1) arr f + +let rec fill_array_aux (s : _ t) i arr : int = + match s with + | Empty -> i + | Leaf { k; v } -> + Array.unsafe_set arr i (k, v); + i + 1 + | Node { l; k; v; r } -> + let inext = fill_array_aux l i arr in + Array.unsafe_set arr inext (k, v); + fill_array_aux r (inext + 1) arr + +let to_sorted_array (s : ('key, 'a) t) : ('key * 'a) array = + match s with + | Empty -> [||] + | Leaf { k; v } -> [| (k, v) |] + | Node { l; k; v; r } -> + let len = cardinal_aux (cardinal_aux 1 r) l in + let arr = Array.make len (k, v) in + ignore (fill_array_aux s 0 arr : int); + arr + +let to_sorted_array_with_f (type key a b) (s : (key, a) t) (f : key -> a -> b) : + b array = + match s with + | Empty -> [||] + | Leaf { k; v } -> [| f k v |] + | Node { l; k; v; r } -> + let len = cardinal_aux (cardinal_aux 1 r) l in + let arr = Array.make len (f k v) in + ignore (fill_array_with_f s 0 arr f : int); + arr + +let rec keys_aux accu = function + | Empty -> accu + | Leaf { k } -> k :: accu + | Node { l; k; r } -> keys_aux (k :: keys_aux accu r) l + +let keys s = keys_aux [] s + +let bal l x d r = + let hl = height l in + let hr = height r in + if hl > hr + 2 then + let { l = ll; r = lr; v = lv; k = lk; h = _ } = ~!l in + let hll = height ll in + let hlr = height lr in + if hll >= hlr then + let hnode = calc_height hlr hr in + unsafe_node lk lv ll + (unsafe_node_maybe_leaf x d lr r hnode) + (calc_height hll hnode) + else + let { l = lrl; r = lrr; k = lrk; v = lrv } = ~!lr in + let hlrl = height lrl in + let hlrr = height lrr in + let hlnode = calc_height hll hlrl in + let hrnode = calc_height hlrr hr in + unsafe_node lrk lrv + (unsafe_node_maybe_leaf lk lv ll lrl hlnode) + (unsafe_node_maybe_leaf x d lrr r hrnode) + (calc_height hlnode hrnode) + else if hr > hl + 2 then + let { l = rl; r = rr; k = rk; v = rv } = ~!r in + let hrr = height rr in + let hrl = height rl in + if hrr >= hrl then + let hnode = calc_height hl hrl in + unsafe_node rk rv + (unsafe_node_maybe_leaf x d l rl hnode) + rr (calc_height hnode hrr) + else + let { l = rll; r = rlr; k = rlk; v = rlv } = ~!rl in + let hrll = height rll in + let hrlr = height rlr in + let hlnode = calc_height hl hrll in + let hrnode = calc_height hrlr hrr in + unsafe_node rlk rlv + (unsafe_node_maybe_leaf x d l rll hlnode) + (unsafe_node_maybe_leaf rk rv rlr rr hrnode) + (calc_height hlnode hrnode) + else unsafe_node_maybe_leaf x d l r (calc_height hl hr) + +let[@inline] is_empty = function Empty -> true | _ -> false + +let rec min_binding_exn = function + | Empty -> raise Not_found + | Leaf { k; v } -> (k, v) + | Node { l; k; v } -> ( + match l with Empty -> (k, v) | Leaf _ | Node _ -> min_binding_exn l) + +let rec remove_min_binding = function + | Empty -> invalid_arg "Map.remove_min_elt" + | Leaf _ -> empty + | Node { l = Empty; r } -> r + | Node { l; k; v; r } -> bal (remove_min_binding l) k v r + +let merge t1 t2 = + match (t1, t2) with + | Empty, t -> t + | t, Empty -> t + | _, _ -> + let x, d = min_binding_exn t2 in + bal t1 x d (remove_min_binding t2) + +let rec iter x f = + match x with + | Empty -> () + | Leaf { k; v } -> (f k v : unit) + | Node { l; k; v; r } -> + iter l f; + f k v; + iter r f + +let rec fold m accu f = + match m with + | Empty -> accu + | Leaf { k; v } -> f k v accu + | Node { l; k; v; r } -> fold r (f k v (fold l accu f)) f + +let rec for_all x p = + match x with + | Empty -> true + | Leaf { k; v } -> p k v + | Node { l; k; v; r } -> p k v && for_all l p && for_all r p + +let rec exists x p = + match x with + | Empty -> false + | Leaf { k; v } -> p k v + | Node { l; k; v; r } -> p k v || exists l p || exists r p + +(* Beware: those two functions assume that the added k is *strictly* + smaller (or bigger) than all the present keys in the tree; it + does not test for equality with the current min (or max) key. + + Indeed, they are only used during the "join" operation which + respects this precondition. +*) + +let rec add_min k v = function + | Empty -> singleton k v + | Leaf l -> unsafe_two_elements k v l.k l.v + | Node tree -> bal (add_min k v tree.l) tree.k tree.v tree.r + +let rec add_max k v = function + | Empty -> singleton k v + | Leaf l -> unsafe_two_elements l.k l.v k v + | Node tree -> bal tree.l tree.k tree.v (add_max k v tree.r) + +(* Same as create and bal, but no assumptions are made on the + relative heights of l and r. *) + +let rec join l v d r = + match l with + | Empty -> add_min v d r + | Leaf leaf -> add_min leaf.k leaf.v (add_min v d r) + | Node xl -> ( + match r with + | Empty -> add_max v d l + | Leaf leaf -> add_max leaf.k leaf.v (add_max v d l) + | Node xr -> + let lh = xl.h in + let rh = xr.h in + if lh > rh + 2 then bal xl.l xl.k xl.v (join xl.r v d r) + else if rh > lh + 2 then bal (join l v d xr.l) xr.k xr.v xr.r + else unsafe_node v d l r (calc_height lh rh)) + +(* Merge two trees l and r into one. + All elements of l must precede the elements of r. + No assumption on the heights of l and r. *) + +let concat t1 t2 = + match (t1, t2) with + | Empty, t -> t + | t, Empty -> t + | _, _ -> + let x, d = min_binding_exn t2 in + join t1 x d (remove_min_binding t2) + +let concat_or_join t1 v d t2 = + match d with Some d -> join t1 v d t2 | None -> concat t1 t2 + +module type S = sig + type key + + type +'a t + + val empty : 'a t + + val compare_key : key -> key -> int + + val is_empty : 'a t -> bool + + val mem : 'a t -> key -> bool + + val to_sorted_array : 'a t -> (key * 'a) array + + val to_sorted_array_with_f : 'a t -> (key -> 'a -> 'b) -> 'b array + + val add : 'a t -> key -> 'a -> 'a t + (** [add x y m] + If [x] was already bound in [m], its previous binding disappears. *) + + val adjust : 'a t -> key -> ('a option -> 'a) -> 'a t + (** [adjust acc k replace ] if not exist [add (replace None ], otherwise + [add k v (replace (Some old))] + *) + + val singleton : key -> 'a -> 'a t + + val remove : 'a t -> key -> 'a t + (** [remove x m] returns a map containing the same bindings as + [m], except for [x] which is unbound in the returned map. *) + + (* val merge: + 'a t -> 'b t -> + (key -> 'a option -> 'b option -> 'c option) -> 'c t *) + (** [merge f m1 m2] computes a map whose keys is a subset of keys of [m1] + and of [m2]. The presence of each such binding, and the corresponding + value, is determined with the function [f]. + @since 3.12.0 + *) + + val disjoint_merge_exn : 'a t -> 'a t -> (key -> 'a -> 'a -> exn) -> 'a t + (* merge two maps, will raise if they have the same key *) + + val iter : 'a t -> (key -> 'a -> unit) -> unit + (** [iter f m] applies [f] to all bindings in map [m]. + The bindings are passed to [f] in increasing order. *) + + val fold : 'a t -> 'b -> (key -> 'a -> 'b -> 'b) -> 'b + (** [fold f m a] computes [(f kN dN ... (f k1 d1 a)...)], + where [k1 ... kN] are the keys of all bindings in [m] + (in increasing order) *) + + val for_all : 'a t -> (key -> 'a -> bool) -> bool + (** [for_all p m] checks if all the bindings of the map. + order unspecified + *) + + val exists : 'a t -> (key -> 'a -> bool) -> bool + (** [exists p m] checks if at least one binding of the map + satisfy the predicate [p]. + order unspecified + *) + + (* val filter: 'a t -> (key -> 'a -> bool) -> 'a t *) + (** [filter p m] returns the map with all the bindings in [m] + that satisfy predicate [p]. + order unspecified + *) + + (* val partition: 'a t -> (key -> 'a -> bool) -> 'a t * 'a t *) + (** [partition p m] returns a pair of maps [(m1, m2)], where + [m1] contains all the bindings of [s] that satisfy the + predicate [p], and [m2] is the map with all the bindings of + [s] that do not satisfy [p]. + *) + + val cardinal : 'a t -> int + (** Return the number of bindings of a map. *) + + val bindings : 'a t -> (key * 'a) list + (** Return the list of all bindings of the given map. + The returned list is sorted in increasing order with respect + to the ordering *) + + val keys : 'a t -> key list + (* Increasing order *) + + (* val split: 'a t -> key -> 'a t * 'a option * 'a t *) + (** [split x m] returns a triple [(l, data, r)], where + [l] is the map with all the bindings of [m] whose key + is strictly less than [x]; + [r] is the map with all the bindings of [m] whose key + is strictly greater than [x]; + [data] is [None] if [m] contains no binding for [x], + or [Some v] if [m] binds [v] to [x]. + @since 3.12.0 + *) + + val find_exn : 'a t -> key -> 'a + (** [find x m] returns the current binding of [x] in [m], + or raises [Not_found] if no such binding exists. *) + + val find_opt : 'a t -> key -> 'a option + + val find_default : 'a t -> key -> 'a -> 'a + + val map : 'a t -> ('a -> 'b) -> 'b t + (** [map f m] returns a map with same domain as [m], where the + associated value [a] of all bindings of [m] has been + replaced by the result of the application of [f] to [a]. + The bindings are passed to [f] in increasing order + with respect to the ordering over the type of the keys. *) + + val mapi : 'a t -> (key -> 'a -> 'b) -> 'b t + (** Same as {!Map.S.map}, but the function receives as arguments both the + key and the associated value for each binding of the map. *) + + val of_list : (key * 'a) list -> 'a t + + val of_array : (key * 'a) array -> 'a t + + val add_list : (key * 'b) list -> 'b t -> 'b t +end diff --git a/analysis/vendor/ext/map_gen.mli b/analysis/vendor/ext/map_gen.mli new file mode 100644 index 000000000..4ecd0070e --- /dev/null +++ b/analysis/vendor/ext/map_gen.mli @@ -0,0 +1,118 @@ +type ('key, +'a) t = private + | Empty + | Leaf of { k : 'key; v : 'a } + | Node of { l : ('key, 'a) t; k : 'key; v : 'a; r : ('key, 'a) t; h : int } + +val cardinal : ('a, 'b) t -> int + +val bindings : ('a, 'b) t -> ('a * 'b) list + +val fill_array_with_f : ('a, 'b) t -> int -> 'c array -> ('a -> 'b -> 'c) -> int + +val fill_array_aux : ('a, 'b) t -> int -> ('a * 'b) array -> int + +val to_sorted_array : ('key, 'a) t -> ('key * 'a) array + +val to_sorted_array_with_f : ('a, 'b) t -> ('a -> 'b -> 'c) -> 'c array + +val keys : ('a, 'b) t -> 'a list + +val height : ('a, 'b) t -> int + +val singleton : 'a -> 'b -> ('a, 'b) t + +val unsafe_node : 'a -> 'b -> ('a, 'b) t -> ('a, 'b) t -> int -> ('a, 'b) t + [@@inline] + +val unsafe_two_elements : 'a -> 'b -> 'a -> 'b -> ('a, 'b) t + [@@inline] +(** smaller comes first *) + +val bal : ('a, 'b) t -> 'a -> 'b -> ('a, 'b) t -> ('a, 'b) t + +val empty : ('a, 'b) t + +val is_empty : ('a, 'b) t -> bool + +val merge : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t + +val iter : ('a, 'b) t -> ('a -> 'b -> unit) -> unit + +val map : ('a, 'b) t -> ('b -> 'c) -> ('a, 'c) t + +val mapi : ('a, 'b) t -> ('a -> 'b -> 'c) -> ('a, 'c) t + +val fold : ('a, 'b) t -> 'c -> ('a -> 'b -> 'c -> 'c) -> 'c + +val for_all : ('a, 'b) t -> ('a -> 'b -> bool) -> bool + +val exists : ('a, 'b) t -> ('a -> 'b -> bool) -> bool + +val join : ('a, 'b) t -> 'a -> 'b -> ('a, 'b) t -> ('a, 'b) t + +val concat : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t + +val concat_or_join : ('a, 'b) t -> 'a -> 'b option -> ('a, 'b) t -> ('a, 'b) t + +module type S = sig + type key + + type +'a t + + val empty : 'a t + + val compare_key : key -> key -> int + + val is_empty : 'a t -> bool + + val mem : 'a t -> key -> bool + + val to_sorted_array : 'a t -> (key * 'a) array + + val to_sorted_array_with_f : 'a t -> (key -> 'a -> 'b) -> 'b array + + val add : 'a t -> key -> 'a -> 'a t + + val adjust : 'a t -> key -> ('a option -> 'a) -> 'a t + + val singleton : key -> 'a -> 'a t + + val remove : 'a t -> key -> 'a t + + (* val merge : + 'a t -> 'b t -> (key -> 'a option -> 'b option -> 'c option) -> 'c t *) + val disjoint_merge_exn : 'a t -> 'a t -> (key -> 'a -> 'a -> exn) -> 'a t + + val iter : 'a t -> (key -> 'a -> unit) -> unit + + val fold : 'a t -> 'b -> (key -> 'a -> 'b -> 'b) -> 'b + + val for_all : 'a t -> (key -> 'a -> bool) -> bool + + val exists : 'a t -> (key -> 'a -> bool) -> bool + + (* val filter : 'a t -> (key -> 'a -> bool) -> 'a t *) + (* val partition : 'a t -> (key -> 'a -> bool) -> 'a t * 'a t *) + val cardinal : 'a t -> int + + val bindings : 'a t -> (key * 'a) list + + val keys : 'a t -> key list + (* val choose : 'a t -> key * 'a *) + + val find_exn : 'a t -> key -> 'a + + val find_opt : 'a t -> key -> 'a option + + val find_default : 'a t -> key -> 'a -> 'a + + val map : 'a t -> ('a -> 'b) -> 'b t + + val mapi : 'a t -> (key -> 'a -> 'b) -> 'b t + + val of_list : (key * 'a) list -> 'a t + + val of_array : (key * 'a) array -> 'a t + + val add_list : (key * 'b) list -> 'b t -> 'b t +end diff --git a/analysis/vendor/ext/map_ident.mli b/analysis/vendor/ext/map_ident.mli new file mode 100644 index 000000000..f4e717e4c --- /dev/null +++ b/analysis/vendor/ext/map_ident.mli @@ -0,0 +1,25 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +include Map_gen.S with type key = Ident.t \ No newline at end of file diff --git a/analysis/vendor/ext/map_int.mli b/analysis/vendor/ext/map_int.mli new file mode 100644 index 000000000..08dd6e304 --- /dev/null +++ b/analysis/vendor/ext/map_int.mli @@ -0,0 +1,25 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +include Map_gen.S with type key = int diff --git a/analysis/vendor/compiler-libs-406/string_map.mli b/analysis/vendor/ext/map_string.mli similarity index 99% rename from analysis/vendor/compiler-libs-406/string_map.mli rename to analysis/vendor/ext/map_string.mli index 58f7236c5..6fd1801bf 100644 --- a/analysis/vendor/compiler-libs-406/string_map.mli +++ b/analysis/vendor/ext/map_string.mli @@ -22,5 +22,4 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) - include Map_gen.S with type key = string diff --git a/analysis/vendor/compiler-libs-406/misc.ml b/analysis/vendor/ext/misc.ml similarity index 98% rename from analysis/vendor/compiler-libs-406/misc.ml rename to analysis/vendor/ext/misc.ml index 76aff7686..eef6e4760 100644 --- a/analysis/vendor/compiler-libs-406/misc.ml +++ b/analysis/vendor/ext/misc.ml @@ -17,6 +17,8 @@ exception Fatal_error + + let fatal_error msg = prerr_string ">> Fatal error: "; prerr_endline msg; raise Fatal_error @@ -271,6 +273,12 @@ let string_of_file ic = (Buffer.add_subbytes b buff 0 n; copy()) in copy() +let output_to_bin_file_directly filename fn = + let oc = open_out_bin filename in + match fn filename oc with + | v -> close_out oc ; v + | exception e -> close_out oc ; raise e + let output_to_file_via_temporary ?(mode = [Open_text]) filename fn = let (temp_filename, oc) = Filename.open_temp_file @@ -537,6 +545,8 @@ module Color = struct | BG of color (* background *) | Bold | Reset + | Dim + let ansi_of_color = function | Black -> "0" @@ -553,6 +563,8 @@ module Color = struct | BG c -> "4" ^ ansi_of_color c | Bold -> "1" | Reset -> "0" + | Dim -> "2" + let ansi_of_style_l l = let s = match l with @@ -584,6 +596,9 @@ module Color = struct | Format.String_tag "error" -> (!cur_styles).error | Format.String_tag "warning" -> (!cur_styles).warning | Format.String_tag "loc" -> (!cur_styles).loc + | Format.String_tag "info" -> [Bold; FG Yellow] + | Format.String_tag "dim" -> [Dim] + | Format.String_tag "filename" -> [FG Cyan] | _ -> raise Not_found let color_enabled = ref true diff --git a/analysis/vendor/compiler-libs-406/misc.mli b/analysis/vendor/ext/misc.mli similarity index 99% rename from analysis/vendor/compiler-libs-406/misc.mli rename to analysis/vendor/ext/misc.mli index 7b9184408..61dfdf0a7 100644 --- a/analysis/vendor/compiler-libs-406/misc.mli +++ b/analysis/vendor/ext/misc.mli @@ -15,6 +15,7 @@ (* Miscellaneous useful types and functions *) + val fatal_error: string -> 'a val fatal_errorf: ('a, Format.formatter, unit, 'b) format4 -> 'a exception Fatal_error @@ -127,6 +128,9 @@ val copy_file_chunk: in_channel -> out_channel -> int -> unit val string_of_file: in_channel -> string (* [string_of_file ic] reads the contents of file [ic] and copies them to a string. It stops when encountering EOF on [ic]. *) + +val output_to_bin_file_directly: string -> (string -> out_channel -> 'a) -> 'a + val output_to_file_via_temporary: ?mode:open_flag list -> string -> (string -> out_channel -> 'a) -> 'a (* Produce output in temporary file, then rename it @@ -277,6 +281,8 @@ module Color : sig | BG of color (* background *) | Bold | Reset + | Dim + val ansi_of_style_l : style list -> string (* ANSI escape sequence for the given style *) diff --git a/analysis/vendor/ext/ordered_hash_map.cppo.ml b/analysis/vendor/ext/ordered_hash_map.cppo.ml new file mode 100644 index 000000000..b44ef6679 --- /dev/null +++ b/analysis/vendor/ext/ordered_hash_map.cppo.ml @@ -0,0 +1,111 @@ +#if defined TYPE_FUNCTOR +module Make(H: Hashtbl.HashedType): (S with type key = H.t) = +struct + type key = H.t + type 'value t = (key,'value) Ordered_hash_map_gen.t + let key_index (h : _ t) key = + (H.hash key) land (Array.length h.data - 1) + let equal_key = H.equal +#elif defined TYPE_LOCAL_IDENT + type key = Ident.t + type 'value t = (key,'value) Ordered_hash_map_gen.t + let key_index (h : _ t) (key : key) = + (Bs_hash_stubs.hash_int key.stamp) land (Array.length h.data - 1) + let equal_key = Ext_ident.equal + +#else + [%error "unknown type"] +#endif + + open Ordered_hash_map_gen + + let create = create + let clear = clear + let reset = reset + + let iter = iter + let fold = fold + let length = length + + let elements = elements + let choose = choose + let to_sorted_array = to_sorted_array + + + + let rec small_bucket_mem key lst = + match lst with + | Empty -> false + | Cons rhs -> + equal_key key rhs.key || + match rhs.next with + | Empty -> false + | Cons rhs -> + equal_key key rhs.key || + match rhs.next with + | Empty -> false + | Cons rhs -> + equal_key key rhs.key || + small_bucket_mem key rhs.next + + let rec small_bucket_rank key lst = + match lst with + | Empty -> -1 + | Cons rhs -> + if equal_key key rhs.key then rhs.ord + else match rhs.next with + | Empty -> -1 + | Cons rhs -> + if equal_key key rhs.key then rhs.ord else + match rhs.next with + | Empty -> -1 + | Cons rhs -> + if equal_key key rhs.key then rhs.ord else + small_bucket_rank key rhs.next + + let rec small_bucket_find_value key (lst : (_,_) bucket) = + match lst with + | Empty -> raise Not_found + | Cons rhs -> + if equal_key key rhs.key then rhs.data + else match rhs.next with + | Empty -> raise Not_found + | Cons rhs -> + if equal_key key rhs.key then rhs.data else + match rhs.next with + | Empty -> raise Not_found + | Cons rhs -> + if equal_key key rhs.key then rhs.data else + small_bucket_find_value key rhs.next + + let add h key value = + let i = key_index h key in + if not (small_bucket_mem key h.data.(i)) then + begin + h.data.(i) <- Cons {key; ord = h.size; data = value; next = h.data.(i)}; + h.size <- h.size + 1 ; + if h.size > Array.length h.data lsl 1 then resize key_index h + end + + let mem h key = + small_bucket_mem key (Array.unsafe_get h.data (key_index h key)) + let rank h key = + small_bucket_rank key(Array.unsafe_get h.data (key_index h key)) + + let find_value h key = + small_bucket_find_value key (Array.unsafe_get h.data (key_index h key)) + + +#if defined TYPE_FUNCTOR +end +#endif + + + + + + + + + + diff --git a/analysis/vendor/ext/ordered_hash_map_gen.ml b/analysis/vendor/ext/ordered_hash_map_gen.ml new file mode 100644 index 000000000..31ad7e6d1 --- /dev/null +++ b/analysis/vendor/ext/ordered_hash_map_gen.ml @@ -0,0 +1,158 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +(** Hash based datastrucure which does not support [remove], + so that the adding order is strict and continous +*) + +module type S = sig + type key + + type 'value t + + val create : int -> 'value t + + val clear : 'vaulue t -> unit + + val reset : 'value t -> unit + + val add : 'value t -> key -> 'value -> unit + + val mem : 'value t -> key -> bool + + val rank : 'value t -> key -> int (* -1 if not found*) + + val find_value : 'value t -> key -> 'value (* raise if not found*) + + val iter : 'value t -> (key -> 'value -> int -> unit) -> unit + + val fold : 'value t -> 'b -> (key -> 'value -> int -> 'b -> 'b) -> 'b + + val length : 'value t -> int + + val elements : 'value t -> key list + + val choose : 'value t -> key + + val to_sorted_array : 'value t -> key array +end + +(* We do dynamic hashing, and resize the table and rehash the elements + when buckets become too long. *) +type ('a, 'b) bucket = + | Empty + | Cons of { key : 'a; ord : int; data : 'b; next : ('a, 'b) bucket } + +type ('a, 'b) t = { + mutable size : int; + (* number of entries *) + mutable data : ('a, 'b) bucket array; + (* the buckets *) + initial_size : int; (* initial array size *) +} + +let create initial_size = + let s = Ext_util.power_2_above 16 initial_size in + { initial_size = s; size = 0; data = Array.make s Empty } + +let clear h = + h.size <- 0; + let len = Array.length h.data in + for i = 0 to len - 1 do + Array.unsafe_set h.data i Empty + done + +let reset h = + h.size <- 0; + h.data <- Array.make h.initial_size Empty + +let length h = h.size + +let resize indexfun h = + let odata = h.data in + let osize = Array.length odata in + let nsize = osize * 2 in + if nsize < Sys.max_array_length then ( + let ndata = Array.make nsize Empty in + h.data <- ndata; + (* so that indexfun sees the new bucket count *) + let rec insert_bucket = function + | Empty -> () + | Cons { key; ord; data; next } -> + let nidx = indexfun h key in + Array.unsafe_set ndata nidx + (Cons { key; ord; data; next = Array.unsafe_get ndata nidx }); + insert_bucket next + in + for i = 0 to osize - 1 do + insert_bucket (Array.unsafe_get odata i) + done) + +let iter h f = + let rec do_bucket = function + | Empty -> () + | Cons { key; ord; data; next } -> + f key data ord; + do_bucket next + in + let d = h.data in + for i = 0 to Array.length d - 1 do + do_bucket (Array.unsafe_get d i) + done + +let choose h = + let rec aux arr offset len = + if offset >= len then raise Not_found + else + match Array.unsafe_get arr offset with + | Empty -> aux arr (offset + 1) len + | Cons { key = k; _ } -> k + in + aux h.data 0 (Array.length h.data) + +let to_sorted_array h = + if h.size = 0 then [||] + else + let v = choose h in + let arr = Array.make h.size v in + iter h (fun k _ i -> Array.unsafe_set arr i k); + arr + +let fold h init f = + let rec do_bucket b accu = + match b with + | Empty -> accu + | Cons { key; ord; data; next } -> do_bucket next (f key data ord accu) + in + let d = h.data in + let accu = ref init in + for i = 0 to Array.length d - 1 do + accu := do_bucket (Array.unsafe_get d i) !accu + done; + !accu + +let elements set = fold set [] (fun k _ _ acc -> k :: acc) + +let rec bucket_length acc (x : _ bucket) = + match x with Empty -> 0 | Cons rhs -> bucket_length (acc + 1) rhs.next diff --git a/analysis/vendor/ext/ordered_hash_map_local_ident.mli b/analysis/vendor/ext/ordered_hash_map_local_ident.mli new file mode 100644 index 000000000..c22d6784a --- /dev/null +++ b/analysis/vendor/ext/ordered_hash_map_local_ident.mli @@ -0,0 +1,30 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + + + +(** Hash algorithm only hash + stamp, this makes sense when all identifiers are local (no global) +*) +include Ordered_hash_map_gen.S with type key = Ident.t diff --git a/analysis/vendor/ext/set.cppo.ml b/analysis/vendor/ext/set.cppo.ml new file mode 100644 index 000000000..e3e3b068f --- /dev/null +++ b/analysis/vendor/ext/set.cppo.ml @@ -0,0 +1,249 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + + +#if defined TYPE_STRING +type elt = string +let compare_elt = Ext_string.compare +let [@inline] eq_elt (x : elt) y = x = y +let print_elt = Format.pp_print_string +#elif defined TYPE_IDENT +type elt = Ident.t +let compare_elt (x : elt) (y : elt) = + let a = Stdlib.compare (x.stamp : int) y.stamp in + if a <> 0 then a + else + let b = Stdlib.compare (x.name : string) y.name in + if b <> 0 then b + else Stdlib.compare (x.flags : int) y.flags +let [@inline] eq_elt (x : elt) y = Ident.same x y +let print_elt = Ident.print +#elif defined TYPE_INT +type elt = int +let compare_elt = Ext_int.compare +let print_elt = Format.pp_print_int +let [@inline] eq_elt (x : elt) y = x = y +#else +[%error "unknown type" ] +#endif + + +(* let (=) (a:int) b = a = b *) + +type ('a ) t0 = 'a Set_gen.t + +type t = elt t0 + +let empty = Set_gen.empty +let is_empty = Set_gen.is_empty +let iter = Set_gen.iter +let fold = Set_gen.fold +let for_all = Set_gen.for_all +let exists = Set_gen.exists +let singleton = Set_gen.singleton +let cardinal = Set_gen.cardinal +let elements = Set_gen.elements +let choose = Set_gen.choose + +let of_sorted_array = Set_gen.of_sorted_array + +let rec mem (tree : t) (x : elt) = match tree with + | Empty -> false + | Leaf v -> eq_elt x v + | Node{l; v; r} -> + let c = compare_elt x v in + c = 0 || mem (if c < 0 then l else r) x + +type split = + | Yes of {l : t ; r : t } + | No of { l : t; r : t} + +let [@inline] split_l (x : split) = + match x with + | Yes {l} | No {l} -> l + +let [@inline] split_r (x : split) = + match x with + | Yes {r} | No {r} -> r + +let [@inline] split_pres (x : split) = match x with | Yes _ -> true | No _ -> false + +let rec split (tree : t) x : split = match tree with + | Empty -> + No {l = empty; r = empty} + | Leaf v -> + let c = compare_elt x v in + if c = 0 then Yes {l = empty; r = empty} + else if c < 0 then + No {l = empty; r = tree} + else + No {l = tree; r = empty} + | Node {l; v; r} -> + let c = compare_elt x v in + if c = 0 then Yes {l; r} + else if c < 0 then + match split l x with + | Yes result -> + Yes { result with r = Set_gen.internal_join result.r v r } + | No result -> + No { result with r= Set_gen.internal_join result.r v r } + else + match split r x with + | Yes result -> + Yes {result with l = Set_gen.internal_join l v result.l} + | No result -> + No {result with l = Set_gen.internal_join l v result.l} + +let rec add (tree : t) x : t = match tree with + | Empty -> singleton x + | Leaf v -> + let c = compare_elt x v in + if c = 0 then tree else + if c < 0 then + Set_gen.unsafe_two_elements x v + else + Set_gen.unsafe_two_elements v x + | Node {l; v; r} as t -> + let c = compare_elt x v in + if c = 0 then t else + if c < 0 then Set_gen.bal (add l x ) v r else Set_gen.bal l v (add r x ) + +let rec union (s1 : t) (s2 : t) : t = + match (s1, s2) with + | (Empty, t) + | (t, Empty) -> t + | Node _, Leaf v2 -> + add s1 v2 + | Leaf v1, Node _ -> + add s2 v1 + | Leaf x, Leaf v -> + let c = compare_elt x v in + if c = 0 then s1 else + if c < 0 then + Set_gen.unsafe_two_elements x v + else + Set_gen.unsafe_two_elements v x + | Node{l=l1; v=v1; r=r1; h=h1}, Node{l=l2; v=v2; r=r2; h=h2} -> + if h1 >= h2 then + let split_result = split s2 v1 in + Set_gen.internal_join + (union l1 (split_l split_result)) v1 + (union r1 (split_r split_result)) + else + let split_result = split s1 v2 in + Set_gen.internal_join + (union (split_l split_result) l2) v2 + (union (split_r split_result) r2) + + +let rec inter (s1 : t) (s2 : t) : t = + match (s1, s2) with + | (Empty, _) + | (_, Empty) -> empty + | Leaf v, _ -> + if mem s2 v then s1 else empty + | Node ({ v } as s1), _ -> + let result = split s2 v in + if split_pres result then + Set_gen.internal_join + (inter s1.l (split_l result)) + v + (inter s1.r (split_r result)) + else + Set_gen.internal_concat + (inter s1.l (split_l result)) + (inter s1.r (split_r result)) + + +let rec diff (s1 : t) (s2 : t) : t = + match (s1, s2) with + | (Empty, _) -> empty + | (t1, Empty) -> t1 + | Leaf v, _-> + if mem s2 v then empty else s1 + | (Node({ v} as s1), _) -> + let result = split s2 v in + if split_pres result then + Set_gen.internal_concat + (diff s1.l (split_l result)) + (diff s1.r (split_r result)) + else + Set_gen.internal_join + (diff s1.l (split_l result)) + v + (diff s1.r (split_r result)) + + + + + + + +let rec remove (tree : t) (x : elt) : t = match tree with + | Empty -> empty (* This case actually would be never reached *) + | Leaf v -> + if eq_elt x v then empty else tree + | Node{l; v; r} -> + let c = compare_elt x v in + if c = 0 then Set_gen.internal_merge l r else + if c < 0 then Set_gen.bal (remove l x) v r else Set_gen.bal l v (remove r x ) + +(* let compare s1 s2 = Set_gen.compare ~cmp:compare_elt s1 s2 *) + + + +let of_list l = + match l with + | [] -> empty + | [x0] -> singleton x0 + | [x0; x1] -> add (singleton x0) x1 + | [x0; x1; x2] -> add (add (singleton x0) x1) x2 + | [x0; x1; x2; x3] -> add (add (add (singleton x0) x1 ) x2 ) x3 + | [x0; x1; x2; x3; x4] -> add (add (add (add (singleton x0) x1) x2 ) x3 ) x4 + | _ -> + let arrs = Array.of_list l in + Array.sort compare_elt arrs ; + of_sorted_array arrs + + + +(* also check order *) +let invariant t = + Set_gen.check t ; + Set_gen.is_ordered ~cmp:compare_elt t + +let print fmt s = + Format.fprintf + fmt "@[{%a}@]@." + (fun fmt s -> + iter s + (fun e -> Format.fprintf fmt "@[%a@],@ " + print_elt e) + ) + s + + + + + diff --git a/analysis/vendor/ext/set_gen.ml b/analysis/vendor/ext/set_gen.ml new file mode 100644 index 000000000..34eb1e09b --- /dev/null +++ b/analysis/vendor/ext/set_gen.ml @@ -0,0 +1,357 @@ +(***********************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. All rights reserved. This file is distributed *) +(* under the terms of the GNU Library General Public License, with *) +(* the special exception on linking described in file ../LICENSE. *) +(* *) +(***********************************************************************) +[@@@warnerror "+55"] + +(* balanced tree based on stdlib distribution *) + +type 'a t0 = + | Empty + | Leaf of 'a + | Node of { l : 'a t0; v : 'a; r : 'a t0; h : int } + +type 'a partial_node = { l : 'a t0; v : 'a; r : 'a t0; h : int } + +external ( ~! ) : 'a t0 -> 'a partial_node = "%identity" + +let empty = Empty + +let[@inline] height = function Empty -> 0 | Leaf _ -> 1 | Node { h } -> h + +let[@inline] calc_height a b = (if a >= b then a else b) + 1 + +(* + Invariants: + 1. {[ l < v < r]} + 2. l and r balanced + 3. [height l] - [height r] <= 2 +*) +let[@inline] unsafe_node v l r h = Node { l; v; r; h } + +let[@inline] unsafe_node_maybe_leaf v l r h = + if h = 1 then Leaf v else Node { l; v; r; h } + +let[@inline] singleton x = Leaf x + +let[@inline] unsafe_two_elements x v = unsafe_node v (singleton x) empty 2 + +type 'a t = 'a t0 = private + | Empty + | Leaf of 'a + | Node of { l : 'a t0; v : 'a; r : 'a t0; h : int } + +(* Smallest and greatest element of a set *) + +let rec min_exn = function + | Empty -> raise Not_found + | Leaf v -> v + | Node { l; v } -> ( match l with Empty -> v | Leaf _ | Node _ -> min_exn l) + +let[@inline] is_empty = function Empty -> true | _ -> false + +let rec cardinal_aux acc = function + | Empty -> acc + | Leaf _ -> acc + 1 + | Node { l; r } -> cardinal_aux (cardinal_aux (acc + 1) r) l + +let cardinal s = cardinal_aux 0 s + +let rec elements_aux accu = function + | Empty -> accu + | Leaf v -> v :: accu + | Node { l; v; r } -> elements_aux (v :: elements_aux accu r) l + +let elements s = elements_aux [] s + +let choose = min_exn + +let rec iter x f = + match x with + | Empty -> () + | Leaf v -> f v + | Node { l; v; r } -> + iter l f; + f v; + iter r f + +let rec fold s accu f = + match s with + | Empty -> accu + | Leaf v -> f v accu + | Node { l; v; r } -> fold r (f v (fold l accu f)) f + +let rec for_all x p = + match x with + | Empty -> true + | Leaf v -> p v + | Node { l; v; r } -> p v && for_all l p && for_all r p + +let rec exists x p = + match x with + | Empty -> false + | Leaf v -> p v + | Node { l; v; r } -> p v || exists l p || exists r p + +exception Height_invariant_broken + +exception Height_diff_borken + +let rec check_height_and_diff = function + | Empty -> 0 + | Leaf _ -> 1 + | Node { l; r; h } -> + let hl = check_height_and_diff l in + let hr = check_height_and_diff r in + if h <> calc_height hl hr then raise Height_invariant_broken + else + let diff = abs (hl - hr) in + if diff > 2 then raise Height_diff_borken else h + +let check tree = ignore (check_height_and_diff tree) + +(* Same as create, but performs one step of rebalancing if necessary. + Invariants: + 1. {[ l < v < r ]} + 2. l and r balanced + 3. | height l - height r | <= 3. + + Proof by indunction + + Lemma: the height of [bal l v r] will bounded by [max l r] + 1 +*) +let bal l v r : _ t = + let hl = height l in + let hr = height r in + if hl > hr + 2 then + let { l = ll; r = lr; v = lv; h = _ } = ~!l in + let hll = height ll in + let hlr = height lr in + if hll >= hlr then + let hnode = calc_height hlr hr in + unsafe_node lv ll + (unsafe_node_maybe_leaf v lr r hnode) + (calc_height hll hnode) + else + let { l = lrl; r = lrr; v = lrv } = ~!lr in + let hlrl = height lrl in + let hlrr = height lrr in + let hlnode = calc_height hll hlrl in + let hrnode = calc_height hlrr hr in + unsafe_node lrv + (unsafe_node_maybe_leaf lv ll lrl hlnode) + (unsafe_node_maybe_leaf v lrr r hrnode) + (calc_height hlnode hrnode) + else if hr > hl + 2 then + let { l = rl; r = rr; v = rv } = ~!r in + let hrr = height rr in + let hrl = height rl in + if hrr >= hrl then + let hnode = calc_height hl hrl in + unsafe_node rv + (unsafe_node_maybe_leaf v l rl hnode) + rr (calc_height hnode hrr) + else + let { l = rll; r = rlr; v = rlv } = ~!rl in + let hrll = height rll in + let hrlr = height rlr in + let hlnode = calc_height hl hrll in + let hrnode = calc_height hrlr hrr in + unsafe_node rlv + (unsafe_node_maybe_leaf v l rll hlnode) + (unsafe_node_maybe_leaf rv rlr rr hrnode) + (calc_height hlnode hrnode) + else unsafe_node_maybe_leaf v l r (calc_height hl hr) + +let rec remove_min_elt = function + | Empty -> invalid_arg "Set.remove_min_elt" + | Leaf _ -> empty + | Node { l = Empty; r } -> r + | Node { l; v; r } -> bal (remove_min_elt l) v r + +(* + All elements of l must precede the elements of r. + Assume | height l - height r | <= 2. + weak form of [concat] +*) + +let internal_merge l r = + match (l, r) with + | Empty, t -> t + | t, Empty -> t + | _, _ -> bal l (min_exn r) (remove_min_elt r) + +(* Beware: those two functions assume that the added v is *strictly* + smaller (or bigger) than all the present elements in the tree; it + does not test for equality with the current min (or max) element. + Indeed, they are only used during the "join" operation which + respects this precondition. +*) + +let rec add_min v = function + | Empty -> singleton v + | Leaf x -> unsafe_two_elements v x + | Node n -> bal (add_min v n.l) n.v n.r + +let rec add_max v = function + | Empty -> singleton v + | Leaf x -> unsafe_two_elements x v + | Node n -> bal n.l n.v (add_max v n.r) + +(** + Invariants: + 1. l < v < r + 2. l and r are balanced + + Proof by induction + The height of output will be ~~ (max (height l) (height r) + 2) + Also use the lemma from [bal] +*) +let rec internal_join l v r = + match (l, r) with + | Empty, _ -> add_min v r + | _, Empty -> add_max v l + | Leaf lv, Node { h = rh } -> + if rh > 3 then add_min lv (add_min v r) (* FIXME: could inlined *) + else unsafe_node v l r (rh + 1) + | Leaf _, Leaf _ -> unsafe_node v l r 2 + | Node { h = lh }, Leaf rv -> + if lh > 3 then add_max rv (add_max v l) else unsafe_node v l r (lh + 1) + | ( Node { l = ll; v = lv; r = lr; h = lh }, + Node { l = rl; v = rv; r = rr; h = rh } ) -> + if lh > rh + 2 then + (* proof by induction: + now [height of ll] is [lh - 1] + *) + bal ll lv (internal_join lr v r) + else if rh > lh + 2 then bal (internal_join l v rl) rv rr + else unsafe_node v l r (calc_height lh rh) + +(* + Required Invariants: + [t1] < [t2] +*) +let internal_concat t1 t2 = + match (t1, t2) with + | Empty, t -> t + | t, Empty -> t + | _, _ -> internal_join t1 (min_exn t2) (remove_min_elt t2) + +let rec partition x p = + match x with + | Empty -> (empty, empty) + | Leaf v -> + let pv = p v in + if pv then (x, empty) else (empty, x) + | Node { l; v; r } -> + (* call [p] in the expected left-to-right order *) + let lt, lf = partition l p in + let pv = p v in + let rt, rf = partition r p in + if pv then (internal_join lt v rt, internal_concat lf rf) + else (internal_concat lt rt, internal_join lf v rf) + +let of_sorted_array l = + let rec sub start n l = + if n = 0 then empty + else if n = 1 then + let x0 = Array.unsafe_get l start in + singleton x0 + else if n = 2 then + let x0 = Array.unsafe_get l start in + let x1 = Array.unsafe_get l (start + 1) in + unsafe_node x1 (singleton x0) empty 2 + else if n = 3 then + let x0 = Array.unsafe_get l start in + let x1 = Array.unsafe_get l (start + 1) in + let x2 = Array.unsafe_get l (start + 2) in + unsafe_node x1 (singleton x0) (singleton x2) 2 + else + let nl = n / 2 in + let left = sub start nl l in + let mid = start + nl in + let v = Array.unsafe_get l mid in + let right = sub (mid + 1) (n - nl - 1) l in + unsafe_node v left right (calc_height (height left) (height right)) + in + sub 0 (Array.length l) l + +let is_ordered ~cmp tree = + let rec is_ordered_min_max tree = + match tree with + | Empty -> `Empty + | Leaf v -> `V (v, v) + | Node { l; v; r } -> ( + match is_ordered_min_max l with + | `No -> `No + | `Empty -> ( + match is_ordered_min_max r with + | `No -> `No + | `Empty -> `V (v, v) + | `V (l, r) -> if cmp v l < 0 then `V (v, r) else `No) + | `V (min_v, max_v) -> ( + match is_ordered_min_max r with + | `No -> `No + | `Empty -> if cmp max_v v < 0 then `V (min_v, v) else `No + | `V (min_v_r, max_v_r) -> + if cmp max_v min_v_r < 0 then `V (min_v, max_v_r) else `No)) + in + is_ordered_min_max tree <> `No + +let invariant ~cmp t = + check t; + is_ordered ~cmp t + +module type S = sig + type elt + + type t + + val empty : t + + val is_empty : t -> bool + + val iter : t -> (elt -> unit) -> unit + + val fold : t -> 'a -> (elt -> 'a -> 'a) -> 'a + + val for_all : t -> (elt -> bool) -> bool + + val exists : t -> (elt -> bool) -> bool + + val singleton : elt -> t + + val cardinal : t -> int + + val elements : t -> elt list + + val choose : t -> elt + + val mem : t -> elt -> bool + + val add : t -> elt -> t + + val remove : t -> elt -> t + + val union : t -> t -> t + + val inter : t -> t -> t + + val diff : t -> t -> t + + val of_list : elt list -> t + + val of_sorted_array : elt array -> t + + val invariant : t -> bool + + val print : Format.formatter -> t -> unit +end diff --git a/analysis/vendor/ext/set_gen.mli b/analysis/vendor/ext/set_gen.mli new file mode 100644 index 000000000..a1c838c55 --- /dev/null +++ b/analysis/vendor/ext/set_gen.mli @@ -0,0 +1,92 @@ +type 'a t = private + | Empty + | Leaf of 'a + | Node of { l : 'a t; v : 'a; r : 'a t; h : int } + +val empty : 'a t + +val is_empty : 'a t -> bool [@@inline] + +val unsafe_two_elements : 'a -> 'a -> 'a t + +val cardinal : 'a t -> int + +val elements : 'a t -> 'a list + +val choose : 'a t -> 'a + +val iter : 'a t -> ('a -> unit) -> unit + +val fold : 'a t -> 'c -> ('a -> 'c -> 'c) -> 'c + +val for_all : 'a t -> ('a -> bool) -> bool + +val exists : 'a t -> ('a -> bool) -> bool + +val check : 'a t -> unit + +val bal : 'a t -> 'a -> 'a t -> 'a t + +val remove_min_elt : 'a t -> 'a t + +val singleton : 'a -> 'a t + +val internal_merge : 'a t -> 'a t -> 'a t + +val internal_join : 'a t -> 'a -> 'a t -> 'a t + +val internal_concat : 'a t -> 'a t -> 'a t + +val partition : 'a t -> ('a -> bool) -> 'a t * 'a t + +val of_sorted_array : 'a array -> 'a t + +val is_ordered : cmp:('a -> 'a -> int) -> 'a t -> bool + +val invariant : cmp:('a -> 'a -> int) -> 'a t -> bool + +module type S = sig + type elt + + type t + + val empty : t + + val is_empty : t -> bool + + val iter : t -> (elt -> unit) -> unit + + val fold : t -> 'a -> (elt -> 'a -> 'a) -> 'a + + val for_all : t -> (elt -> bool) -> bool + + val exists : t -> (elt -> bool) -> bool + + val singleton : elt -> t + + val cardinal : t -> int + + val elements : t -> elt list + + val choose : t -> elt + + val mem : t -> elt -> bool + + val add : t -> elt -> t + + val remove : t -> elt -> t + + val union : t -> t -> t + + val inter : t -> t -> t + + val diff : t -> t -> t + + val of_list : elt list -> t + + val of_sorted_array : elt array -> t + + val invariant : t -> bool + + val print : Format.formatter -> t -> unit +end diff --git a/analysis/vendor/ext/set_ident.mli b/analysis/vendor/ext/set_ident.mli new file mode 100644 index 000000000..2209243e5 --- /dev/null +++ b/analysis/vendor/ext/set_ident.mli @@ -0,0 +1,30 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + + +include Set_gen.S with type elt = Ident.t + + + + diff --git a/analysis/vendor/ext/set_int.mli b/analysis/vendor/ext/set_int.mli new file mode 100644 index 000000000..80b3b6c16 --- /dev/null +++ b/analysis/vendor/ext/set_int.mli @@ -0,0 +1 @@ +include Set_gen.S with type elt = int diff --git a/analysis/vendor/ext/set_string.mli b/analysis/vendor/ext/set_string.mli new file mode 100644 index 000000000..d73485973 --- /dev/null +++ b/analysis/vendor/ext/set_string.mli @@ -0,0 +1,25 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +include Set_gen.S with type elt = string diff --git a/analysis/vendor/ext/string_vec.ml b/analysis/vendor/ext/string_vec.ml new file mode 100644 index 000000000..833ee8e9f --- /dev/null +++ b/analysis/vendor/ext/string_vec.ml @@ -0,0 +1,29 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +include Vec.Make (struct + type t = string + + let null = "" +end) diff --git a/analysis/vendor/ext/string_vec.mli b/analysis/vendor/ext/string_vec.mli new file mode 100644 index 000000000..c1b941146 --- /dev/null +++ b/analysis/vendor/ext/string_vec.mli @@ -0,0 +1,25 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +include Vec_gen.S with type elt = string diff --git a/analysis/vendor/ext/union_find.ml b/analysis/vendor/ext/union_find.ml new file mode 100644 index 000000000..a06b49c31 --- /dev/null +++ b/analysis/vendor/ext/union_find.ml @@ -0,0 +1,64 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type t = { id : int array; sz : int array; mutable components : int } + +let init n = + let id = Array.make n 0 in + for i = 0 to n - 1 do + Array.unsafe_set id i i + done; + { id; sz = Array.make n 1; components = n } + +let rec find_aux id_store p = + let parent = Array.unsafe_get id_store p in + if p <> parent then find_aux id_store parent else p + +let find store p = find_aux store.id p + +let union store p q = + let id_store = store.id in + let p_root = find_aux id_store p in + let q_root = find_aux id_store q in + if p_root <> q_root then + let () = store.components <- store.components - 1 in + let sz_store = store.sz in + let sz_p_root = Array.unsafe_get sz_store p_root in + let sz_q_root = Array.unsafe_get sz_store q_root in + let bigger = sz_p_root + sz_q_root in + (* Smaller root point to larger to make + it more balanced + it will introduce a cost for small root find, + but major will not be impacted + *) + if sz_p_root < sz_q_root then ( + Array.unsafe_set id_store p q_root; + Array.unsafe_set id_store p_root q_root; + Array.unsafe_set sz_store q_root bigger (* little optimization *)) + else ( + Array.unsafe_set id_store q p_root; + Array.unsafe_set id_store q_root p_root; + Array.unsafe_set sz_store p_root bigger (* little optimization *)) + +let count store = store.components diff --git a/analysis/vendor/ext/union_find.mli b/analysis/vendor/ext/union_find.mli new file mode 100644 index 000000000..5638b49cd --- /dev/null +++ b/analysis/vendor/ext/union_find.mli @@ -0,0 +1,33 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type t + +val init : int -> t + +val find : t -> int -> int + +val union : t -> int -> int -> unit + +val count : t -> int diff --git a/analysis/vendor/ext/vec.cppo.ml b/analysis/vendor/ext/vec.cppo.ml new file mode 100644 index 000000000..6e8ba607f --- /dev/null +++ b/analysis/vendor/ext/vec.cppo.ml @@ -0,0 +1,512 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + + +let [@inline] min (x :int) y = if x < y then x else y + +#if defined TYPE_FUNCTOR +external unsafe_blit : + 'a array -> int -> 'a array -> int -> int -> unit = "caml_array_blit" +module Make ( Resize : Vec_gen.ResizeType) = struct + type elt = Resize.t + + let null = Resize.null + +#elif defined TYPE_INT + +type elt = int +let null = 0 (* can be optimized *) +let unsafe_blit = Bs_hash_stubs.int_unsafe_blit +#else +[%error "unknown type"] +#endif + +external unsafe_sub : 'a array -> int -> int -> 'a array = "caml_array_sub" + +type t = { + mutable arr : elt array ; + mutable len : int ; +} + +let length d = d.len + +let compact d = + let d_arr = d.arr in + if d.len <> Array.length d_arr then + begin + let newarr = unsafe_sub d_arr 0 d.len in + d.arr <- newarr + end +let singleton v = + { + len = 1 ; + arr = [|v|] + } + +let empty () = + { + len = 0; + arr = [||]; + } + +let is_empty d = + d.len = 0 + +let reset d = + d.len <- 0; + d.arr <- [||] + + +(* For [to_*] operations, we should be careful to call {!Array.*} function + in case we operate on the whole array +*) +let to_list d = + let rec loop (d_arr : elt array) idx accum = + if idx < 0 then accum else loop d_arr (idx - 1) (Array.unsafe_get d_arr idx :: accum) + in + loop d.arr (d.len - 1) [] + + +let of_list lst = + let arr = Array.of_list lst in + { arr ; len = Array.length arr} + + +let to_array d = + unsafe_sub d.arr 0 d.len + +let of_array src = + { + len = Array.length src; + arr = Array.copy src; + (* okay to call {!Array.copy}*) + } +let of_sub_array arr off len = + { + len = len ; + arr = Array.sub arr off len + } +let unsafe_internal_array v = v.arr +(* we can not call {!Array.copy} *) +let copy src = + let len = src.len in + { + len ; + arr = unsafe_sub src.arr 0 len ; + } + +(* FIXME *) +let reverse_in_place src = + Ext_array.reverse_range src.arr 0 src.len + + + + +(* {!Array.sub} is not enough for error checking, it + may contain some garbage + *) +let sub (src : t) start len = + let src_len = src.len in + if len < 0 || start > src_len - len then invalid_arg "Vec.sub" + else + { len ; + arr = unsafe_sub src.arr start len } + +let iter d f = + let arr = d.arr in + for i = 0 to d.len - 1 do + f (Array.unsafe_get arr i) + done + +let iteri d f = + let arr = d.arr in + for i = 0 to d.len - 1 do + f i (Array.unsafe_get arr i) + done + +let iter_range d ~from ~to_ f = + if from < 0 || to_ >= d.len then invalid_arg "Vec.iter_range" + else + let d_arr = d.arr in + for i = from to to_ do + f (Array.unsafe_get d_arr i) + done + +let iteri_range d ~from ~to_ f = + if from < 0 || to_ >= d.len then invalid_arg "Vec.iteri_range" + else + let d_arr = d.arr in + for i = from to to_ do + f i (Array.unsafe_get d_arr i) + done + +let map_into_array f src = + let src_len = src.len in + let src_arr = src.arr in + if src_len = 0 then [||] + else + let first_one = f (Array.unsafe_get src_arr 0) in + let arr = Array.make src_len first_one in + for i = 1 to src_len - 1 do + Array.unsafe_set arr i (f (Array.unsafe_get src_arr i)) + done; + arr +let map_into_list f src = + let src_len = src.len in + let src_arr = src.arr in + if src_len = 0 then [] + else + let acc = ref [] in + for i = src_len - 1 downto 0 do + acc := f (Array.unsafe_get src_arr i) :: !acc + done; + !acc + +let mapi f src = + let len = src.len in + if len = 0 then { len ; arr = [| |] } + else + let src_arr = src.arr in + let arr = Array.make len (Array.unsafe_get src_arr 0) in + for i = 1 to len - 1 do + Array.unsafe_set arr i (f i (Array.unsafe_get src_arr i)) + done; + { + len ; + arr ; + } + +let fold_left f x a = + let rec loop a_len (a_arr : elt array) idx x = + if idx >= a_len then x else + loop a_len a_arr (idx + 1) (f x (Array.unsafe_get a_arr idx)) + in + loop a.len a.arr 0 x + +let fold_right f a x = + let rec loop (a_arr : elt array) idx x = + if idx < 0 then x + else loop a_arr (idx - 1) (f (Array.unsafe_get a_arr idx) x) + in + loop a.arr (a.len - 1) x + +(** + [filter] and [inplace_filter] +*) +let filter f d = + let new_d = copy d in + let new_d_arr = new_d.arr in + let d_arr = d.arr in + let p = ref 0 in + for i = 0 to d.len - 1 do + let x = Array.unsafe_get d_arr i in + (* TODO: can be optimized for segments blit *) + if f x then + begin + Array.unsafe_set new_d_arr !p x; + incr p; + end; + done; + new_d.len <- !p; + new_d + +let equal eq x y : bool = + if x.len <> y.len then false + else + let rec aux x_arr y_arr i = + if i < 0 then true else + if eq (Array.unsafe_get x_arr i) (Array.unsafe_get y_arr i) then + aux x_arr y_arr (i - 1) + else false in + aux x.arr y.arr (x.len - 1) + +let get d i = + if i < 0 || i >= d.len then invalid_arg "Vec.get" + else Array.unsafe_get d.arr i +let unsafe_get d i = Array.unsafe_get d.arr i +let last d = + if d.len <= 0 then invalid_arg "Vec.last" + else Array.unsafe_get d.arr (d.len - 1) + +let capacity d = Array.length d.arr + +(* Attention can not use {!Array.exists} since the bound is not the same *) +let exists p d = + let a = d.arr in + let n = d.len in + let rec loop i = + if i = n then false + else if p (Array.unsafe_get a i) then true + else loop (succ i) in + loop 0 + +let map f src = + let src_len = src.len in + if src_len = 0 then { len = 0 ; arr = [||]} + (* TODO: we may share the empty array + but sharing mutable state is very challenging, + the tricky part is to avoid mutating the immutable array, + here it looks fine -- + invariant: whenever [.arr] mutated, make sure it is not an empty array + Actually no: since starting from an empty array + {[ + push v (* the address of v should not be changed *) + ]} + *) + else + let src_arr = src.arr in + let first = f (Array.unsafe_get src_arr 0 ) in + let arr = Array.make src_len first in + for i = 1 to src_len - 1 do + Array.unsafe_set arr i (f (Array.unsafe_get src_arr i)) + done; + { + len = src_len; + arr = arr; + } + +let init len f = + if len < 0 then invalid_arg "Vec.init" + else if len = 0 then { len = 0 ; arr = [||] } + else + let first = f 0 in + let arr = Array.make len first in + for i = 1 to len - 1 do + Array.unsafe_set arr i (f i) + done; + { + + len ; + arr + } + + + + let make initsize : t = + if initsize < 0 then invalid_arg "Vec.make" ; + { + + len = 0; + arr = Array.make initsize null ; + } + + + + let reserve (d : t ) s = + let d_len = d.len in + let d_arr = d.arr in + if s < d_len || s < Array.length d_arr then () + else + let new_capacity = min Sys.max_array_length s in + let new_d_arr = Array.make new_capacity null in + unsafe_blit d_arr 0 new_d_arr 0 d_len; + d.arr <- new_d_arr + + let push (d : t) v = + let d_len = d.len in + let d_arr = d.arr in + let d_arr_len = Array.length d_arr in + if d_arr_len = 0 then + begin + d.len <- 1 ; + d.arr <- [| v |] + end + else + begin + if d_len = d_arr_len then + begin + if d_len >= Sys.max_array_length then + failwith "exceeds max_array_length"; + let new_capacity = min Sys.max_array_length d_len * 2 + (* [d_len] can not be zero, so [*2] will enlarge *) + in + let new_d_arr = Array.make new_capacity null in + d.arr <- new_d_arr; + unsafe_blit d_arr 0 new_d_arr 0 d_len ; + end; + d.len <- d_len + 1; + Array.unsafe_set d.arr d_len v + end + +(** delete element at offset [idx], will raise exception when have invalid input *) + let delete (d : t) idx = + let d_len = d.len in + if idx < 0 || idx >= d_len then invalid_arg "Vec.delete" ; + let arr = d.arr in + unsafe_blit arr (idx + 1) arr idx (d_len - idx - 1); + let idx = d_len - 1 in + d.len <- idx +#ifdef TYPE_INT +#else + ; + Array.unsafe_set arr idx null +#endif + +(** pop the last element, a specialized version of [delete] *) + let pop (d : t) = + let idx = d.len - 1 in + if idx < 0 then invalid_arg "Vec.pop"; + d.len <- idx +#ifdef TYPE_INT +#else + ; + Array.unsafe_set d.arr idx null +#endif + +(** pop and return the last element *) + let get_last_and_pop (d : t) = + let idx = d.len - 1 in + if idx < 0 then invalid_arg "Vec.get_last_and_pop"; + let last = Array.unsafe_get d.arr idx in + d.len <- idx +#ifdef TYPE_INT +#else + ; + Array.unsafe_set d.arr idx null +#endif + ; + last + +(** delete elements start from [idx] with length [len] *) + let delete_range (d : t) idx len = + let d_len = d.len in + if len < 0 || idx < 0 || idx + len > d_len then invalid_arg "Vec.delete_range" ; + let arr = d.arr in + unsafe_blit arr (idx + len) arr idx (d_len - idx - len); + d.len <- d_len - len +#ifdef TYPE_INT +#else + ; + for i = d_len - len to d_len - 1 do + Array.unsafe_set arr i null + done +#endif + +(** delete elements from [idx] with length [len] return the deleted elements as a new vec*) + let get_and_delete_range (d : t) idx len : t = + let d_len = d.len in + if len < 0 || idx < 0 || idx + len > d_len then invalid_arg "Vec.get_and_delete_range" ; + let arr = d.arr in + let value = unsafe_sub arr idx len in + unsafe_blit arr (idx + len) arr idx (d_len - idx - len); + d.len <- d_len - len; +#ifdef TYPE_INT +#else + for i = d_len - len to d_len - 1 do + Array.unsafe_set arr i null + done; +#endif + {len = len ; arr = value} + + + (** Below are simple wrapper around normal Array operations *) + + let clear (d : t ) = +#ifdef TYPE_INT +#else + for i = 0 to d.len - 1 do + Array.unsafe_set d.arr i null + done; +#endif + d.len <- 0 + + + + let inplace_filter f (d : t) : unit = + let d_arr = d.arr in + let d_len = d.len in + let p = ref 0 in + for i = 0 to d_len - 1 do + let x = Array.unsafe_get d_arr i in + if f x then + begin + let curr_p = !p in + (if curr_p <> i then + Array.unsafe_set d_arr curr_p x) ; + incr p + end + done ; + let last = !p in +#ifdef TYPE_INT + d.len <- last + (* INT , there is not need to reset it, since it will cause GC behavior *) +#else + delete_range d last (d_len - last) +#endif + + let inplace_filter_from start f (d : t) : unit = + if start < 0 then invalid_arg "Vec.inplace_filter_from"; + let d_arr = d.arr in + let d_len = d.len in + let p = ref start in + for i = start to d_len - 1 do + let x = Array.unsafe_get d_arr i in + if f x then + begin + let curr_p = !p in + (if curr_p <> i then + Array.unsafe_set d_arr curr_p x) ; + incr p + end + done ; + let last = !p in +#ifdef TYPE_INT + d.len <- last +#else + delete_range d last (d_len - last) +#endif + + +(** inplace filter the elements and accumulate the non-filtered elements *) + let inplace_filter_with f ~cb_no acc (d : t) = + let d_arr = d.arr in + let p = ref 0 in + let d_len = d.len in + let acc = ref acc in + for i = 0 to d_len - 1 do + let x = Array.unsafe_get d_arr i in + if f x then + begin + let curr_p = !p in + (if curr_p <> i then + Array.unsafe_set d_arr curr_p x) ; + incr p + end + else + acc := cb_no x !acc + done ; + let last = !p in +#ifdef TYPE_INT + d.len <- last + (* INT , there is not need to reset it, since it will cause GC behavior *) +#else + delete_range d last (d_len - last) +#endif + ; !acc + + + +#ifdef TYPE_FUNCTOR +end +#endif diff --git a/analysis/vendor/ext/vec.mli b/analysis/vendor/ext/vec.mli new file mode 100644 index 000000000..fc5b408b6 --- /dev/null +++ b/analysis/vendor/ext/vec.mli @@ -0,0 +1,25 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +module Make (Resize : Vec_gen.ResizeType) : Vec_gen.S with type elt = Resize.t diff --git a/analysis/vendor/ext/vec_gen.ml b/analysis/vendor/ext/vec_gen.ml new file mode 100644 index 000000000..ca2a4eeb2 --- /dev/null +++ b/analysis/vendor/ext/vec_gen.ml @@ -0,0 +1,130 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +module type ResizeType = sig + type t + + val null : t + (* used to populate new allocated array checkout {!Obj.new_block} for more performance *) +end + +module type S = sig + type elt + + type t + + val length : t -> int + + val compact : t -> unit + + val singleton : elt -> t + + val empty : unit -> t + + val make : int -> t + + val init : int -> (int -> elt) -> t + + val is_empty : t -> bool + + val of_sub_array : elt array -> int -> int -> t + + val unsafe_internal_array : t -> elt array + (** Exposed for some APIs which only take array as input, + when exposed + *) + + val reserve : t -> int -> unit + + val push : t -> elt -> unit + + val delete : t -> int -> unit + + val pop : t -> unit + + val get_last_and_pop : t -> elt + + val delete_range : t -> int -> int -> unit + + val get_and_delete_range : t -> int -> int -> t + + val clear : t -> unit + + val reset : t -> unit + + val to_list : t -> elt list + + val of_list : elt list -> t + + val to_array : t -> elt array + + val of_array : elt array -> t + + val copy : t -> t + + val reverse_in_place : t -> unit + + val iter : t -> (elt -> unit) -> unit + + val iteri : t -> (int -> elt -> unit) -> unit + + val iter_range : t -> from:int -> to_:int -> (elt -> unit) -> unit + + val iteri_range : t -> from:int -> to_:int -> (int -> elt -> unit) -> unit + + val map : (elt -> elt) -> t -> t + + val mapi : (int -> elt -> elt) -> t -> t + + val map_into_array : (elt -> 'f) -> t -> 'f array + + val map_into_list : (elt -> 'f) -> t -> 'f list + + val fold_left : ('f -> elt -> 'f) -> 'f -> t -> 'f + + val fold_right : (elt -> 'g -> 'g) -> t -> 'g -> 'g + + val filter : (elt -> bool) -> t -> t + + val inplace_filter : (elt -> bool) -> t -> unit + + val inplace_filter_with : + (elt -> bool) -> cb_no:(elt -> 'a -> 'a) -> 'a -> t -> 'a + + val inplace_filter_from : int -> (elt -> bool) -> t -> unit + + val equal : (elt -> elt -> bool) -> t -> t -> bool + + val get : t -> int -> elt + + val unsafe_get : t -> int -> elt + + val last : t -> elt + + val capacity : t -> int + + val exists : (elt -> bool) -> t -> bool + + val sub : t -> int -> int -> t +end diff --git a/analysis/vendor/ext/vec_int.mli b/analysis/vendor/ext/vec_int.mli new file mode 100644 index 000000000..3d165c3a3 --- /dev/null +++ b/analysis/vendor/ext/vec_int.mli @@ -0,0 +1,25 @@ +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +include Vec_gen.S with type elt = int diff --git a/analysis/vendor/ext/warnings.ml b/analysis/vendor/ext/warnings.ml new file mode 100644 index 000000000..ba237696e --- /dev/null +++ b/analysis/vendor/ext/warnings.ml @@ -0,0 +1,642 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Pierre Weis && Damien Doligez, INRIA Rocquencourt *) +(* *) +(* Copyright 1998 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +(* When you change this, you need to update the documentation: + - man/ocamlc.m + - man/ocamlopt.m + - manual/manual/cmds/comp.etex + - manual/manual/cmds/native.etex +*) + +type loc = { + loc_start : Lexing.position; + loc_end : Lexing.position; + loc_ghost : bool; +} + +type t = + | Comment_start (* 1 *) + | Comment_not_end (* 2 *) + | Deprecated of string * loc * loc (* 3 *) + | Fragile_match of string (* 4 *) + | Partial_application (* 5 *) + | Method_override of string list (* 7 *) + | Partial_match of string (* 8 *) + | Non_closed_record_pattern of string (* 9 *) + | Statement_type (* 10 *) + | Unused_match (* 11 *) + | Unused_pat (* 12 *) + | Instance_variable_override of string list (* 13 *) + | Illegal_backslash (* 14 *) + | Implicit_public_methods of string list (* 15 *) + | Unerasable_optional_argument (* 16 *) + | Unused_argument (* 20 *) + | Nonreturning_statement (* 21 *) + | Preprocessor of string (* 22 *) + | Useless_record_with (* 23 *) + | Bad_module_name of string (* 24 *) + | All_clauses_guarded (* 8, used to be 25 *) + | Unused_var of string (* 26 *) + | Unused_var_strict of string (* 27 *) + | Wildcard_arg_to_constant_constr (* 28 *) + | Eol_in_string (* 29 *) + | Duplicate_definitions of string * string * string * string (*30 *) + | Unused_value_declaration of string (* 32 *) + | Unused_open of string (* 33 *) + | Unused_type_declaration of string (* 34 *) + | Unused_for_index of string (* 35 *) + | Unused_constructor of string * bool * bool (* 37 *) + | Unused_extension of string * bool * bool * bool (* 38 *) + | Unused_rec_flag (* 39 *) + | Ambiguous_name of string list * string list * bool (* 41 *) + | Nonoptional_label of string (* 43 *) + | Open_shadow_identifier of string * string (* 44 *) + | Open_shadow_label_constructor of string * string (* 45 *) + | Attribute_payload of string * string (* 47 *) + | Eliminated_optional_arguments of string list (* 48 *) + | No_cmi_file of string * string option (* 49 *) + | Bad_docstring of bool (* 50 *) + | Fragile_literal_pattern (* 52 *) + | Misplaced_attribute of string (* 53 *) + | Duplicated_attribute of string (* 54 *) + | Unreachable_case (* 56 *) + | Ambiguous_pattern of string list (* 57 *) + | Unused_module of string (* 60 *) + | Constraint_on_gadt (* 62 *) + | Bs_unused_attribute of string (* 101 *) + | Bs_polymorphic_comparison (* 102 *) + | Bs_ffi_warning of string (* 103 *) + | Bs_derive_warning of string (* 104 *) + | Bs_fragile_external of string (* 105 *) + | Bs_unimplemented_primitive of string (* 106 *) + | Bs_integer_literal_overflow (* 107 *) + | Bs_uninterpreted_delimiters of string (* 108 *) + | Bs_toplevel_expression_unit (* 109 *) + +(* If you remove a warning, leave a hole in the numbering. NEVER change + the numbers of existing warnings. + If you add a new warning, add it at the end with a new number; + do NOT reuse one of the holes. +*) + +let number = function + | Comment_start -> 1 + | Comment_not_end -> 2 + | Deprecated _ -> 3 + | Fragile_match _ -> 4 + | Partial_application -> 5 + | Method_override _ -> 7 + | Partial_match _ -> 8 + | Non_closed_record_pattern _ -> 9 + | Statement_type -> 10 + | Unused_match -> 11 + | Unused_pat -> 12 + | Instance_variable_override _ -> 13 + | Illegal_backslash -> 14 + | Implicit_public_methods _ -> 15 + | Unerasable_optional_argument -> 16 + | Unused_argument -> 20 + | Nonreturning_statement -> 21 + | Preprocessor _ -> 22 + | Useless_record_with -> 23 + | Bad_module_name _ -> 24 + | All_clauses_guarded -> 8 (* used to be 25 *) + | Unused_var _ -> 26 + | Unused_var_strict _ -> 27 + | Wildcard_arg_to_constant_constr -> 28 + | Eol_in_string -> 29 + | Duplicate_definitions _ -> 30 + | Unused_value_declaration _ -> 32 + | Unused_open _ -> 33 + | Unused_type_declaration _ -> 34 + | Unused_for_index _ -> 35 + | Unused_constructor _ -> 37 + | Unused_extension _ -> 38 + | Unused_rec_flag -> 39 + | Ambiguous_name _ -> 41 + | Nonoptional_label _ -> 43 + | Open_shadow_identifier _ -> 44 + | Open_shadow_label_constructor _ -> 45 + | Attribute_payload _ -> 47 + | Eliminated_optional_arguments _ -> 48 + | No_cmi_file _ -> 49 + | Bad_docstring _ -> 50 + | Fragile_literal_pattern -> 52 + | Misplaced_attribute _ -> 53 + | Duplicated_attribute _ -> 54 + | Unreachable_case -> 56 + | Ambiguous_pattern _ -> 57 + | Unused_module _ -> 60 + | Constraint_on_gadt -> 62 + | Bs_unused_attribute _ -> 101 + | Bs_polymorphic_comparison -> 102 + | Bs_ffi_warning _ -> 103 + | Bs_derive_warning _ -> 104 + | Bs_fragile_external _ -> 105 + | Bs_unimplemented_primitive _ -> 106 + | Bs_integer_literal_overflow -> 107 + | Bs_uninterpreted_delimiters _ -> 108 + | Bs_toplevel_expression_unit -> 109 + +let last_warning_number = 110 + +let letter_all = + let rec loop i = if i = 0 then [] else i :: loop (i - 1) in + loop last_warning_number + +(* Must be the max number returned by the [number] function. *) + +let letter = function + | 'a' -> letter_all + | 'b' -> [] + | 'c' -> [ 1; 2 ] + | 'd' -> [ 3 ] + | 'e' -> [ 4 ] + | 'f' -> [ 5 ] + | 'g' -> [] + | 'h' -> [] + | 'i' -> [] + | 'j' -> [] + | 'k' -> [ 32; 33; 34; 35; 36; 37; 38; 39 ] + | 'l' -> [ 6 ] + | 'm' -> [ 7 ] + | 'n' -> [] + | 'o' -> [] + | 'p' -> [ 8 ] + | 'q' -> [] + | 'r' -> [ 9 ] + | 's' -> [ 10 ] + | 't' -> [] + | 'u' -> [ 11; 12 ] + | 'v' -> [ 13 ] + | 'w' -> [] + | 'x' -> [ 14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 30 ] + | 'y' -> [ 26 ] + | 'z' -> [ 27 ] + | _ -> assert false + +type state = { active : bool array; error : bool array } + +let current = + ref + { + active = Array.make (last_warning_number + 1) true; + error = Array.make (last_warning_number + 1) false; + } + +let disabled = ref false + +let without_warnings f = Misc.protect_refs [ Misc.R (disabled, true) ] f + +let backup () = !current + +let restore x = current := x + +let is_active x = (not !disabled) && !current.active.(number x) + +let is_error x = (not !disabled) && !current.error.(number x) + +let mk_lazy f = + let state = backup () in + lazy + (let prev = backup () in + restore state; + try + let r = f () in + restore prev; + r + with exn -> + restore prev; + raise exn) + +let parse_opt error active flags s = + let set i = flags.(i) <- true in + let clear i = flags.(i) <- false in + let set_all i = + active.(i) <- true; + error.(i) <- true + in + let error () = raise (Arg.Bad "Ill-formed list of warnings") in + let rec get_num n i = + if i >= String.length s then (i, n) + else + match s.[i] with + | '0' .. '9' -> + get_num ((10 * n) + Char.code s.[i] - Char.code '0') (i + 1) + | _ -> (i, n) + in + let get_range i = + let i, n1 = get_num 0 i in + if i + 2 < String.length s && s.[i] = '.' && s.[i + 1] = '.' then ( + let i, n2 = get_num 0 (i + 2) in + if n2 < n1 then error (); + (i, n1, n2)) + else (i, n1, n1) + in + let rec loop i = + if i >= String.length s then () + else + match s.[i] with + | 'A' .. 'Z' -> + List.iter set (letter (Char.lowercase_ascii s.[i])); + loop (i + 1) + | 'a' .. 'z' -> + List.iter clear (letter s.[i]); + loop (i + 1) + | '+' -> loop_letter_num set (i + 1) + | '-' -> loop_letter_num clear (i + 1) + | '@' -> loop_letter_num set_all (i + 1) + | _ -> error () + and loop_letter_num myset i = + if i >= String.length s then error () + else + match s.[i] with + | '0' .. '9' -> + let i, n1, n2 = get_range i in + for n = n1 to Ext_pervasives.min_int n2 last_warning_number do + myset n + done; + loop i + | 'A' .. 'Z' -> + List.iter myset (letter (Char.lowercase_ascii s.[i])); + loop (i + 1) + | 'a' .. 'z' -> + List.iter myset (letter s.[i]); + loop (i + 1) + | _ -> error () + in + loop 0 + +let parse_options errflag s = + let error = Array.copy !current.error in + let active = Array.copy !current.active in + parse_opt error active (if errflag then error else active) s; + current := { error; active } + +let reset () = + parse_options false Bsc_warnings.defaults_w; + parse_options true Bsc_warnings.defaults_warn_error + +let () = reset () + +let message = function + | Comment_start -> "this is the start of a comment." + | Comment_not_end -> "this is not the end of a comment." + | Deprecated (s, _, _) -> + (* Reduce \r\n to \n: + - Prevents any \r characters being printed on Unix when processing + Windows sources + - Prevents \r\r\n being generated on Windows, which affects the + testsuite + *) + "deprecated: " ^ Misc.normalise_eol s + | Fragile_match "" -> "this pattern-matching is fragile." + | Fragile_match s -> + "this pattern-matching is fragile.\n\ + It will remain exhaustive when constructors are added to type " ^ s ^ "." + | Partial_application -> + "this function application is partial,\nmaybe some arguments are missing." + | Method_override [ lab ] -> "the method " ^ lab ^ " is overridden." + | Method_override (cname :: slist) -> + String.concat " " + ("the following methods are overridden by the class" :: cname :: ":\n " + :: slist) + | Method_override [] -> assert false + | Partial_match "" -> + "You forgot to handle a possible case here, though we don't have more \ + information on the value." + | Partial_match s -> + "You forgot to handle a possible case here, for example: \n " ^ s + | Non_closed_record_pattern s -> + "the following labels are not bound in this record pattern: " ^ s + ^ "\nEither bind these labels explicitly or add ', _' to the pattern." + | Statement_type -> + "This expression returns a value, but you're not doing anything with it. \ + If this is on purpose, wrap it with `ignore`." + | Unused_match -> "this match case is unused." + | Unused_pat -> "this sub-pattern is unused." + | Instance_variable_override [ lab ] -> + "the instance variable " ^ lab ^ " is overridden.\n" + ^ "The behaviour changed in ocaml 3.10 (previous behaviour was hiding.)" + | Instance_variable_override (cname :: slist) -> + String.concat " " + ("the following instance variables are overridden by the class" :: cname + :: ":\n " :: slist) + ^ "\nThe behaviour changed in ocaml 3.10 (previous behaviour was hiding.)" + | Instance_variable_override [] -> assert false + | Illegal_backslash -> "illegal backslash escape in string." + | Implicit_public_methods l -> + "the following private methods were made public implicitly:\n " + ^ String.concat " " l ^ "." + | Unerasable_optional_argument -> + String.concat "" + [ + "This optional parameter in final position will, in practice, not be \ + optional.\n"; + " Reorder the parameters so that at least one non-optional one is \ + in final position or, if all parameters are optional, insert a \ + final ().\n\n"; + " Explanation: If the final parameter is optional, it'd be unclear \ + whether a function application that omits it should be considered \ + fully applied, or partially applied. Imagine writing `let title = \ + display(\"hello!\")`, only to realize `title` isn't your desired \ + result, but a curried call that takes a final optional argument, \ + e.g. `~showDate`.\n\n"; + " Formal rule: an optional argument is considered intentionally \ + omitted when the 1st positional (i.e. neither labeled nor optional) \ + argument defined after it is passed in."; + ] + | Unused_argument -> "this argument will not be used by the function." + | Nonreturning_statement -> + "this statement never returns (or has an unsound type.)" + | Preprocessor s -> s + | Useless_record_with -> ( + match !Config.syntax_kind with + | `ml -> + "all the fields are explicitly listed in this record:\n\ + the 'with' clause is useless." + | `rescript -> + "All the fields are already explicitly listed in this record. You \ + can remove the `...` spread.") + | Bad_module_name modname -> + "This file's name is potentially invalid. The build systems \ + conventionally turn a file name into a module name by upper-casing the \ + first letter. " ^ modname ^ " isn't a valid module name.\n" + ^ "Note: some build systems might e.g. turn kebab-case into CamelCase \ + module, which is why this isn't a hard error." + | All_clauses_guarded -> + "this pattern-matching is not exhaustive.\n\ + All clauses in this pattern-matching are guarded." + | Unused_var v | Unused_var_strict v -> "unused variable " ^ v ^ "." + | Wildcard_arg_to_constant_constr -> + "wildcard pattern given as argument to a constant constructor" + | Eol_in_string -> + "unescaped end-of-line in a string constant (non-portable code)" + | Duplicate_definitions (kind, cname, tc1, tc2) -> + Printf.sprintf "the %s %s is defined in both types %s and %s." kind cname + tc1 tc2 + | Unused_value_declaration v -> "unused value " ^ v ^ "." + | Unused_open s -> "unused open " ^ s ^ "." + | Unused_type_declaration s -> "unused type " ^ s ^ "." + | Unused_for_index s -> "unused for-loop index " ^ s ^ "." + | Unused_constructor (s, false, false) -> "unused constructor " ^ s ^ "." + | Unused_constructor (s, true, _) -> + "constructor " ^ s + ^ " is never used to build values.\n\ + (However, this constructor appears in patterns.)" + | Unused_constructor (s, false, true) -> + "constructor " ^ s + ^ " is never used to build values.\n\ + Its type is exported as a private type." + | Unused_extension (s, is_exception, cu_pattern, cu_privatize) -> ( + let kind = + if is_exception then "exception" else "extension constructor" + in + let name = kind ^ " " ^ s in + match (cu_pattern, cu_privatize) with + | false, false -> "unused " ^ name + | true, _ -> + name + ^ " is never used to build values.\n\ + (However, this constructor appears in patterns.)" + | false, true -> + name + ^ " is never used to build values.\n\ + It is exported or rebound as a private extension.") + | Unused_rec_flag -> "unused rec flag." + | Ambiguous_name ([ s ], tl, false) -> + s ^ " belongs to several types: " ^ String.concat " " tl + ^ "\nThe first one was selected. Please disambiguate if this is wrong." + | Ambiguous_name (_, _, false) -> assert false + | Ambiguous_name (_slist, tl, true) -> + "these field labels belong to several types: " ^ String.concat " " tl + ^ "\nThe first one was selected. Please disambiguate if this is wrong." + | Nonoptional_label s -> "the label " ^ s ^ " is not optional." + | Open_shadow_identifier (kind, s) -> + Printf.sprintf + "this open statement shadows the %s identifier %s (which is later used)" + kind s + | Open_shadow_label_constructor (kind, s) -> + Printf.sprintf + "this open statement shadows the %s %s (which is later used)" kind s + | Attribute_payload (a, s) -> + Printf.sprintf "illegal payload for attribute '%s'.\n%s" a s + | Eliminated_optional_arguments sl -> + Printf.sprintf "implicit elimination of optional argument%s %s" + (if List.length sl = 1 then "" else "s") + (String.concat ", " sl) + | No_cmi_file (name, None) -> + "no cmi file was found in path for module " ^ name + | No_cmi_file (name, Some msg) -> + Printf.sprintf "no valid cmi file was found in path for module %s. %s" + name msg + | Bad_docstring unattached -> + if unattached then "unattached documentation comment (ignored)" + else "ambiguous documentation comment" + | Fragile_literal_pattern -> + Printf.sprintf + "Code should not depend on the actual values of\n\ + this constructor's arguments. They are only for information\n\ + and may change in future versions. (See manual section 8.5)" + | Unreachable_case -> + "this match case is unreachable.\n\ + Consider replacing it with a refutation case ' -> .'" + | Misplaced_attribute attr_name -> + Printf.sprintf "the %S attribute cannot appear in this context" attr_name + | Duplicated_attribute attr_name -> + Printf.sprintf + "the %S attribute is used more than once on this expression" attr_name + | Ambiguous_pattern vars -> + let msg = + let vars = List.sort String.compare vars in + match vars with + | [] -> assert false + | [ x ] -> "variable " ^ x + | _ :: _ -> "variables " ^ String.concat "," vars + in + Printf.sprintf + "Ambiguous or-pattern variables under guard;\n\ + %s may match different arguments. (See manual section 8.5)" msg + | Unused_module s -> "unused module " ^ s ^ "." + | Constraint_on_gadt -> + "Type constraints do not apply to GADT cases of variant types." + | Bs_unused_attribute s -> + "Unused attribute: " ^ s + ^ "\n\ + This means such annotation is not annotated properly. \n\ + for example, some annotations is only meaningful in externals \n" + | Bs_polymorphic_comparison -> + "Polymorphic comparison introduced (maybe unsafe)" + | Bs_ffi_warning s -> "FFI warning: " ^ s + | Bs_derive_warning s -> "bs.deriving warning: " ^ s + | Bs_fragile_external s -> + s + ^ " : using an empty string as a shorthand to infer the external's name \ + from the value's name is dangerous when refactoring, and therefore \ + deprecated" + | Bs_unimplemented_primitive s -> "Unimplemented primitive used:" ^ s + | Bs_integer_literal_overflow -> + "Integer literal exceeds the range of representable integers of type int" + | Bs_uninterpreted_delimiters s -> "Uninterpreted delimiters " ^ s + | Bs_toplevel_expression_unit -> + "Toplevel expression is expected to have unit type." + +let sub_locs = function + | Deprecated (_, def, use) -> + [ (def, "Definition"); (use, "Expected signature") ] + | _ -> [] + +let has_warnings = ref false + +let nerrors = ref 0 + +type reporting_information = { + number : int; + message : string; + is_error : bool; + sub_locs : (loc * string) list; +} + +let report w = + match is_active w with + | false -> `Inactive + | true -> + has_warnings := true; + if is_error w then incr nerrors; + `Active + { + number = number w; + message = message w; + is_error = is_error w; + sub_locs = sub_locs w; + } + +exception Errors + +let reset_fatal () = nerrors := 0 + +let check_fatal () = + if !nerrors > 0 then ( + nerrors := 0; + raise Errors) + +let descriptions = + [ + (1, "Suspicious-looking start-of-comment mark."); + (2, "Suspicious-looking end-of-comment mark."); + (3, "Deprecated feature."); + ( 4, + "Fragile pattern matching: matching that will remain complete even\n\ + \ if additional constructors are added to one of the variant types\n\ + \ matched." ); + ( 5, + "Partially applied function: expression whose result has function\n\ + \ type and is ignored." ); + (6, "Label omitted in function application."); + (7, "Method overridden."); + (8, "Partial match: missing cases in pattern-matching."); + (9, "Missing fields in a record pattern."); + ( 10, + "Expression on the left-hand side of a sequence that doesn't have type\n\ + \ \"unit\" (and that is not a function, see warning number 5)." ); + (11, "Redundant case in a pattern matching (unused match case)."); + (12, "Redundant sub-pattern in a pattern-matching."); + (13, "Instance variable overridden."); + (14, "Illegal backslash escape in a string constant."); + (15, "Private method made public implicitly."); + (16, "Unerasable optional argument."); + (17, "Undeclared virtual method."); + (18, "Non-principal type."); + (19, "Type without principality."); + (20, "Unused function argument."); + (21, "Non-returning statement."); + (22, "Preprocessor warning."); + (23, "Useless record \"with\" clause."); + ( 24, + "Bad module name: the source file name is not a valid OCaml module name." + ); + (25, "Deprecated: now part of warning 8."); + ( 26, + "Suspicious unused variable: unused variable that is bound\n\ + \ with \"let\" or \"as\", and doesn't start with an underscore (\"_\")\n\ + \ character." ); + ( 27, + "Innocuous unused variable: unused variable that is not bound with\n\ + \ \"let\" nor \"as\", and doesn't start with an underscore (\"_\")\n\ + \ character." ); + (28, "Wildcard pattern given as argument to a constant constructor."); + (29, "Unescaped end-of-line in a string constant (non-portable code)."); + ( 30, + "Two labels or constructors of the same name are defined in two\n\ + \ mutually recursive types." ); + (31, "A module is linked twice in the same executable."); + (32, "Unused value declaration."); + (33, "Unused open statement."); + (34, "Unused type declaration."); + (35, "Unused for-loop index."); + (36, "Unused ancestor variable."); + (37, "Unused constructor."); + (38, "Unused extension constructor."); + (39, "Unused rec flag."); + (41, "Ambiguous constructor or label name."); + (43, "Nonoptional label applied as optional."); + (44, "Open statement shadows an already defined identifier."); + (45, "Open statement shadows an already defined label or constructor."); + (46, "Error in environment variable."); + (47, "Illegal attribute payload."); + (48, "Implicit elimination of optional arguments."); + (49, "Absent cmi file when looking up module alias."); + (50, "Unexpected documentation comment."); + (51, "Warning on non-tail calls if @tailcall present."); + (52, "Fragile constant pattern."); + (53, "Attribute cannot appear in this context"); + (54, "Attribute used more than once on an expression"); + (55, "Inlining impossible"); + (56, "Unreachable case in a pattern-matching (based on type information)."); + (57, "Ambiguous or-pattern variables under guard"); + (59, "Assignment to non-mutable value"); + (60, "Unused module declaration"); + (61, "Unboxable type in primitive declaration"); + (62, "Type constraint on GADT type declaration"); + (101, "Unused bs attributes"); + (102, "Polymorphic comparison introduced (maybe unsafe)"); + (103, "Fragile FFI definitions"); + (104, "bs.deriving warning with customized message "); + ( 105, + "External name is inferred from val name is unsafe from refactoring when \ + changing value name" ); + (106, "Unimplemented primitive used:"); + ( 107, + "Integer literal exceeds the range of representable integers of type int" + ); + (108, "Uninterpreted delimiters (for unicode)"); + (109, "Toplevel expression has unit type"); + (110, "Expression has nested promise type"); + ] + +let help_warnings () = + List.iter (fun (i, s) -> Printf.printf "%3i %s\n" i s) descriptions; + print_endline " A all warnings"; + for i = Char.code 'b' to Char.code 'z' do + let c = Char.chr i in + match letter c with + | [] -> () + | [ n ] -> + Printf.printf " %c Alias for warning %i.\n" (Char.uppercase_ascii c) n + | l -> + Printf.printf " %c warnings %s.\n" (Char.uppercase_ascii c) + (String.concat ", " (List.map string_of_int l)) + done; + exit 0 diff --git a/analysis/vendor/ext/warnings.mli b/analysis/vendor/ext/warnings.mli new file mode 100644 index 000000000..4e36bc00e --- /dev/null +++ b/analysis/vendor/ext/warnings.mli @@ -0,0 +1,124 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Pierre Weis && Damien Doligez, INRIA Rocquencourt *) +(* *) +(* Copyright 1998 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +type loc = { + loc_start : Lexing.position; + loc_end : Lexing.position; + loc_ghost : bool; +} + +type t = + | Comment_start (* 1 *) + | Comment_not_end (* 2 *) + | Deprecated of string * loc * loc (* 3 *) + | Fragile_match of string (* 4 *) + | Partial_application (* 5 *) + | Method_override of string list (* 7 *) + | Partial_match of string (* 8 *) + | Non_closed_record_pattern of string (* 9 *) + | Statement_type (* 10 *) + | Unused_match (* 11 *) + | Unused_pat (* 12 *) + | Instance_variable_override of string list (* 13 *) + | Illegal_backslash (* 14 *) + | Implicit_public_methods of string list (* 15 *) + | Unerasable_optional_argument (* 16 *) + | Unused_argument (* 20 *) + | Nonreturning_statement (* 21 *) + | Preprocessor of string (* 22 *) + | Useless_record_with (* 23 *) + | Bad_module_name of string (* 24 *) + | All_clauses_guarded (* 8, used to be 25 *) + | Unused_var of string (* 26 *) + | Unused_var_strict of string (* 27 *) + | Wildcard_arg_to_constant_constr (* 28 *) + | Eol_in_string (* 29 *) + | Duplicate_definitions of string * string * string * string (* 30 *) + | Unused_value_declaration of string (* 32 *) + | Unused_open of string (* 33 *) + | Unused_type_declaration of string (* 34 *) + | Unused_for_index of string (* 35 *) + | Unused_constructor of string * bool * bool (* 37 *) + | Unused_extension of string * bool * bool * bool (* 38 *) + | Unused_rec_flag (* 39 *) + | Ambiguous_name of string list * string list * bool (* 41 *) + | Nonoptional_label of string (* 43 *) + | Open_shadow_identifier of string * string (* 44 *) + | Open_shadow_label_constructor of string * string (* 45 *) + | Attribute_payload of string * string (* 47 *) + | Eliminated_optional_arguments of string list (* 48 *) + | No_cmi_file of string * string option (* 49 *) + | Bad_docstring of bool (* 50 *) + | Fragile_literal_pattern (* 52 *) + | Misplaced_attribute of string (* 53 *) + | Duplicated_attribute of string (* 54 *) + | Unreachable_case (* 56 *) + | Ambiguous_pattern of string list (* 57 *) + | Unused_module of string (* 60 *) + | Constraint_on_gadt (* 62 *) + | Bs_unused_attribute of string (* 101 *) + | Bs_polymorphic_comparison (* 102 *) + | Bs_ffi_warning of string (* 103 *) + | Bs_derive_warning of string (* 104 *) + | Bs_fragile_external of string (* 105 *) + | Bs_unimplemented_primitive of string (* 106 *) + | Bs_integer_literal_overflow (* 107 *) + | Bs_uninterpreted_delimiters of string (* 108 *) + | Bs_toplevel_expression_unit (* 109 *) + +val parse_options : bool -> string -> unit + +val without_warnings : (unit -> 'a) -> 'a + +val is_active : t -> bool + +val is_error : t -> bool + +type reporting_information = { + number : int; + message : string; + is_error : bool; + sub_locs : (loc * string) list; +} + +val report : t -> [ `Active of reporting_information | `Inactive ] + +exception Errors + +val check_fatal : unit -> unit + +val reset_fatal : unit -> unit + +val help_warnings : unit -> unit + +type state + +val backup : unit -> state + +val restore : state -> unit + +val mk_lazy : (unit -> 'a) -> 'a Lazy.t +(** Like [Lazy.of_fun], but the function is applied with + the warning settings at the time [mk_lazy] is called. *) + +val has_warnings : bool ref + +val nerrors : int ref + +val message : t -> string + +val number : t -> int + +val reset : unit -> unit diff --git a/analysis/vendor/compiler-libs-406/annot.mli b/analysis/vendor/ml/annot.ml similarity index 100% rename from analysis/vendor/compiler-libs-406/annot.mli rename to analysis/vendor/ml/annot.ml diff --git a/analysis/vendor/compiler-libs-406/ast_helper.ml b/analysis/vendor/ml/ast_helper.ml similarity index 97% rename from analysis/vendor/compiler-libs-406/ast_helper.ml rename to analysis/vendor/ml/ast_helper.ml index 2c2849339..80fb40a1c 100644 --- a/analysis/vendor/compiler-libs-406/ast_helper.ml +++ b/analysis/vendor/ml/ast_helper.ml @@ -39,7 +39,7 @@ module Const = struct let int64 ?(suffix='L') i = integer ~suffix (Int64.to_string i) let nativeint ?(suffix='n') i = integer ~suffix (Nativeint.to_string i) let float ?suffix f = Pconst_float (f, suffix) - let char c = Pconst_char c + let char c = Pconst_char (Char.code c) let string ?quotation_delimiter s = Pconst_string (s, quotation_delimiter) end @@ -239,12 +239,12 @@ module Sig = struct let modtype ?loc a = mk ?loc (Psig_modtype a) let open_ ?loc a = mk ?loc (Psig_open a) let include_ ?loc a = mk ?loc (Psig_include a) - let class_ ?loc a = mk ?loc (Psig_class a) + let class_type ?loc a = mk ?loc (Psig_class_type a) let extension ?loc ?(attrs = []) a = mk ?loc (Psig_extension (a, attrs)) let attribute ?loc a = mk ?loc (Psig_attribute a) let text txt = - let f_txt = List.filter (fun ds -> docstring_body ds <> "") txt in + let f_txt = Ext_list.filter txt (fun ds -> docstring_body ds <> "") in List.map (fun ds -> attribute ~loc:(docstring_loc ds) (text_attr ds)) f_txt @@ -263,13 +263,12 @@ module Str = struct let rec_module ?loc a = mk ?loc (Pstr_recmodule a) let modtype ?loc a = mk ?loc (Pstr_modtype a) let open_ ?loc a = mk ?loc (Pstr_open a) - let class_ ?loc a = mk ?loc (Pstr_class a) let class_type ?loc a = mk ?loc (Pstr_class_type a) let include_ ?loc a = mk ?loc (Pstr_include a) let extension ?loc ?(attrs = []) a = mk ?loc (Pstr_extension (a, attrs)) let attribute ?loc a = mk ?loc (Pstr_attribute a) let text txt = - let f_txt = List.filter (fun ds -> docstring_body ds <> "") txt in + let f_txt = Ext_list.filter txt (fun ds -> docstring_body ds <> "") in List.map (fun ds -> attribute ~loc:(docstring_loc ds) (text_attr ds)) f_txt @@ -326,7 +325,7 @@ module Ctf = struct let extension ?loc ?attrs a = mk ?loc ?attrs (Pctf_extension a) let attribute ?loc a = mk ?loc (Pctf_attribute a) let text txt = - let f_txt = List.filter (fun ds -> docstring_body ds <> "") txt in + let f_txt = Ext_list.filter txt (fun ds -> docstring_body ds <> "")in List.map (fun ds -> attribute ~loc:(docstring_loc ds) (text_attr ds)) f_txt @@ -344,7 +343,7 @@ module Cf = struct pcf_attributes = add_docs_attrs docs attrs; } - let inherit_ ?loc ?attrs a b c = mk ?loc ?attrs (Pcf_inherit (a, b, c)) + let val_ ?loc ?attrs a b c = mk ?loc ?attrs (Pcf_val (a, b, c)) let method_ ?loc ?attrs a b c = mk ?loc ?attrs (Pcf_method (a, b, c)) let constraint_ ?loc ?attrs a b = mk ?loc ?attrs (Pcf_constraint (a, b)) @@ -352,7 +351,7 @@ module Cf = struct let extension ?loc ?attrs a = mk ?loc ?attrs (Pcf_extension a) let attribute ?loc a = mk ?loc (Pcf_attribute a) let text txt = - let f_txt = List.filter (fun ds -> docstring_body ds <> "") txt in + let f_txt = Ext_list.filter txt (fun ds -> docstring_body ds <> "")in List.map (fun ds -> attribute ~loc:(docstring_loc ds) (text_attr ds)) f_txt diff --git a/analysis/vendor/compiler-libs-406/ast_helper.mli b/analysis/vendor/ml/ast_helper.mli similarity index 98% rename from analysis/vendor/compiler-libs-406/ast_helper.mli rename to analysis/vendor/ml/ast_helper.mli index efc1dfcad..67f62492c 100644 --- a/analysis/vendor/compiler-libs-406/ast_helper.mli +++ b/analysis/vendor/ml/ast_helper.mli @@ -267,7 +267,6 @@ module Sig: val modtype: ?loc:loc -> module_type_declaration -> signature_item val open_: ?loc:loc -> open_description -> signature_item val include_: ?loc:loc -> include_description -> signature_item - val class_: ?loc:loc -> class_description list -> signature_item val class_type: ?loc:loc -> class_type_declaration list -> signature_item val extension: ?loc:loc -> ?attrs:attrs -> extension -> signature_item val attribute: ?loc:loc -> attribute -> signature_item @@ -289,7 +288,6 @@ module Str: val rec_module: ?loc:loc -> module_binding list -> structure_item val modtype: ?loc:loc -> module_type_declaration -> structure_item val open_: ?loc:loc -> open_description -> structure_item - val class_: ?loc:loc -> class_declaration list -> structure_item val class_type: ?loc:loc -> class_type_declaration list -> structure_item val include_: ?loc:loc -> include_declaration -> structure_item val extension: ?loc:loc -> ?attrs:attrs -> extension -> structure_item @@ -403,8 +401,6 @@ module Cf: class_field val attr: class_field -> attribute -> class_field - val inherit_: ?loc:loc -> ?attrs:attrs -> override_flag -> class_expr -> - str option -> class_field val val_: ?loc:loc -> ?attrs:attrs -> str -> mutable_flag -> class_field_kind -> class_field val method_: ?loc:loc -> ?attrs:attrs -> str -> private_flag -> diff --git a/analysis/vendor/ml/ast_invariants.ml b/analysis/vendor/ml/ast_invariants.ml new file mode 100644 index 000000000..31ee17eb9 --- /dev/null +++ b/analysis/vendor/ml/ast_invariants.ml @@ -0,0 +1,166 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Jeremie Dimino, Jane Street Europe *) +(* *) +(* Copyright 2015 Jane Street Group LLC *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +open Asttypes +open Parsetree +open Ast_iterator + +let err = Syntaxerr.ill_formed_ast + +let empty_record loc = err loc "Records cannot be empty." +let empty_variant loc = err loc "Variant types cannot be empty." +let invalid_tuple loc = err loc "Tuples must have at least 2 components." +let no_args loc = err loc "Function application with no argument." +let empty_let loc = err loc "Let with no bindings." +let empty_type loc = err loc "Type declarations cannot be empty." +let complex_id loc = err loc "Functor application not allowed here." + +let simple_longident id = + let rec is_simple = function + | Longident.Lident _ -> true + | Longident.Ldot (id, _) -> is_simple id + | Longident.Lapply _ -> false + in + if not (is_simple id.txt) then complex_id id.loc + +let iterator = + let super = Ast_iterator.default_iterator in + let type_declaration self td = + super.type_declaration self td; + let loc = td.ptype_loc in + match td.ptype_kind with + | Ptype_record [] -> empty_record loc + | Ptype_variant [] -> empty_variant loc + | _ -> () + in + let typ self ty = + super.typ self ty; + let loc = ty.ptyp_loc in + match ty.ptyp_desc with + | Ptyp_tuple ([] | [_]) -> invalid_tuple loc + | Ptyp_class (id, _) -> simple_longident id + | Ptyp_package (_, cstrs) -> + List.iter (fun (id, _) -> simple_longident id) cstrs + | _ -> () + in + let pat self pat = + begin match pat.ppat_desc with + | Ppat_construct (_, Some ({ppat_desc = Ppat_tuple _} as p)) + when Builtin_attributes.explicit_arity pat.ppat_attributes -> + super.pat self p (* allow unary tuple, see GPR#523. *) + | _ -> + super.pat self pat + end; + let loc = pat.ppat_loc in + match pat.ppat_desc with + | Ppat_tuple ([] | [_]) -> invalid_tuple loc + | Ppat_record ([], _) -> empty_record loc + | Ppat_construct (id, _) -> simple_longident id + | Ppat_record (fields, _) -> + List.iter (fun (id, _) -> simple_longident id) fields + | _ -> () + in + let expr self exp = + begin match exp.pexp_desc with + | Pexp_construct (_, Some ({pexp_desc = Pexp_tuple _} as e)) + when Builtin_attributes.explicit_arity exp.pexp_attributes -> + super.expr self e (* allow unary tuple, see GPR#523. *) + | _ -> + super.expr self exp + end; + let loc = exp.pexp_loc in + match exp.pexp_desc with + | Pexp_tuple ([] | [_]) -> invalid_tuple loc + | Pexp_record ([], _) -> empty_record loc + | Pexp_apply (_, []) -> no_args loc + | Pexp_let (_, [], _) -> empty_let loc + | Pexp_ident id + | Pexp_construct (id, _) + | Pexp_field (_, id) + | Pexp_setfield (_, id, _) + | Pexp_new id + | Pexp_open (_, id, _) -> simple_longident id + | Pexp_record (fields, _) -> + List.iter (fun (id, _) -> simple_longident id) fields + | _ -> () + in + let extension_constructor self ec = + super.extension_constructor self ec; + match ec.pext_kind with + | Pext_rebind id -> simple_longident id + | _ -> () + in + let class_expr self ce = + super.class_expr self ce; + let loc = ce.pcl_loc in + match ce.pcl_desc with + | Pcl_apply (_, []) -> no_args loc + | Pcl_constr (id, _) -> simple_longident id + | _ -> () + in + let module_type self mty = + super.module_type self mty; + match mty.pmty_desc with + | Pmty_alias id -> simple_longident id + | _ -> () + in + let open_description self opn = + super.open_description self opn; + simple_longident opn.popen_lid + in + let with_constraint self wc = + super.with_constraint self wc; + match wc with + | Pwith_type (id, _) + | Pwith_module (id, _) -> simple_longident id + | _ -> () + in + let module_expr self me = + super.module_expr self me; + match me.pmod_desc with + | Pmod_ident id -> simple_longident id + | _ -> () + in + let structure_item self st = + super.structure_item self st; + let loc = st.pstr_loc in + match st.pstr_desc with + | Pstr_type (_, []) -> empty_type loc + | Pstr_value (_, []) -> empty_let loc + | _ -> () + in + let signature_item self sg = + super.signature_item self sg; + let loc = sg.psig_loc in + match sg.psig_desc with + | Psig_type (_, []) -> empty_type loc + | _ -> () + in + { super with + type_declaration + ; typ + ; pat + ; expr + ; extension_constructor + ; class_expr + ; module_expr + ; module_type + ; open_description + ; with_constraint + ; structure_item + ; signature_item + } + +let structure st = iterator.structure iterator st +let signature sg = iterator.signature iterator sg diff --git a/analysis/vendor/compiler-libs-406/camlinternalLazy.mli b/analysis/vendor/ml/ast_invariants.mli similarity index 63% rename from analysis/vendor/compiler-libs-406/camlinternalLazy.mli rename to analysis/vendor/ml/ast_invariants.mli index 101535cd4..51d3f9de9 100644 --- a/analysis/vendor/compiler-libs-406/camlinternalLazy.mli +++ b/analysis/vendor/ml/ast_invariants.mli @@ -2,10 +2,9 @@ (* *) (* OCaml *) (* *) -(* Damien Doligez, projet Para, INRIA Rocquencourt *) +(* Jeremie Dimino, Jane Street Europe *) (* *) -(* Copyright 1997 Institut National de Recherche en Informatique et *) -(* en Automatique. *) +(* Copyright 2015 Jane Street Group LLC *) (* *) (* All rights reserved. This file is distributed under the terms of *) (* the GNU Lesser General Public License version 2.1, with the *) @@ -13,15 +12,7 @@ (* *) (**************************************************************************) -(** Run-time support for lazy values. - All functions in this module are for system use only, not for the - casual user. *) +(** Check AST invariants *) -exception Undefined - -val force_lazy_block : 'a lazy_t -> 'a - -val force_val_lazy_block : 'a lazy_t -> 'a - -val force : 'a lazy_t -> 'a -val force_val : 'a lazy_t -> 'a +val structure : Parsetree.structure -> unit +val signature : Parsetree.signature -> unit diff --git a/analysis/vendor/compiler-libs-406/ast_iterator.ml b/analysis/vendor/ml/ast_iterator.ml similarity index 97% rename from analysis/vendor/compiler-libs-406/ast_iterator.ml rename to analysis/vendor/ml/ast_iterator.ml index aa601e641..f5fa930a9 100755 --- a/analysis/vendor/compiler-libs-406/ast_iterator.ml +++ b/analysis/vendor/ml/ast_iterator.ml @@ -16,7 +16,7 @@ (* A generic Parsetree mapping class *) (* -[@@@ocaml.warning "+9"] +[@@@warning "+9"] (* Ensure that record patterns don't miss any field. *) *) @@ -29,8 +29,6 @@ type iterator = { attributes: iterator -> attribute list -> unit; case: iterator -> case -> unit; cases: iterator -> case list -> unit; - class_declaration: iterator -> class_declaration -> unit; - class_description: iterator -> class_description -> unit; class_expr: iterator -> class_expr -> unit; class_field: iterator -> class_field -> unit; class_signature: iterator -> class_signature -> unit; @@ -250,7 +248,7 @@ module MT = struct | Psig_modtype x -> sub.module_type_declaration sub x | Psig_open x -> sub.open_description sub x | Psig_include x -> sub.include_description sub x - | Psig_class l -> List.iter (sub.class_description sub) l + | Psig_class () -> () | Psig_class_type l -> List.iter (sub.class_type_declaration sub) l | Psig_extension (x, attrs) -> @@ -293,7 +291,7 @@ module M = struct | Pstr_recmodule l -> List.iter (sub.module_binding sub) l | Pstr_modtype x -> sub.module_type_declaration sub x | Pstr_open x -> sub.open_description sub x - | Pstr_class l -> List.iter (sub.class_declaration sub) l + | Pstr_class () -> () | Pstr_class_type l -> List.iter (sub.class_type_declaration sub) l | Pstr_include x -> sub.include_declaration sub x @@ -445,7 +443,7 @@ module CE = struct sub.location sub loc; sub.attributes sub attrs; match desc with - | Pcf_inherit (_o, ce, _s) -> sub.class_expr sub ce + | Pcf_inherit () -> () | Pcf_val (s, _m, k) -> iter_loc sub s; iter_kind sub k | Pcf_method (s, _p, k) -> iter_loc sub s; iter_kind sub k @@ -481,8 +479,6 @@ let default_iterator = signature_item = MT.iter_signature_item; module_type = MT.iter; with_constraint = MT.iter_with_constraint; - class_declaration = - (fun this -> CE.class_infos this (this.class_expr this)); class_expr = CE.iter; class_field = CE.iter_field; class_structure = CE.iter_structure; @@ -491,8 +487,6 @@ let default_iterator = class_signature = CT.iter_signature; class_type_declaration = (fun this -> CE.class_infos this (this.class_type this)); - class_description = - (fun this -> CE.class_infos this (this.class_type this)); type_declaration = T.iter_type_declaration; type_kind = T.iter_type_kind; typ = T.iter; diff --git a/analysis/vendor/compiler-libs-406/ast_iterator.mli b/analysis/vendor/ml/ast_iterator.mli similarity index 96% rename from analysis/vendor/compiler-libs-406/ast_iterator.mli rename to analysis/vendor/ml/ast_iterator.mli index bd8e08168..4f5058f1d 100755 --- a/analysis/vendor/compiler-libs-406/ast_iterator.mli +++ b/analysis/vendor/ml/ast_iterator.mli @@ -26,8 +26,6 @@ type iterator = { attributes: iterator -> attribute list -> unit; case: iterator -> case -> unit; cases: iterator -> case list -> unit; - class_declaration: iterator -> class_declaration -> unit; - class_description: iterator -> class_description -> unit; class_expr: iterator -> class_expr -> unit; class_field: iterator -> class_field -> unit; class_signature: iterator -> class_signature -> unit; diff --git a/analysis/vendor/compiler-libs-406/ast_mapper.ml b/analysis/vendor/ml/ast_mapper.ml similarity index 95% rename from analysis/vendor/compiler-libs-406/ast_mapper.ml rename to analysis/vendor/ml/ast_mapper.ml index 783d0e2ee..5aa10df2f 100644 --- a/analysis/vendor/compiler-libs-406/ast_mapper.ml +++ b/analysis/vendor/ml/ast_mapper.ml @@ -16,7 +16,7 @@ (* A generic Parsetree mapping class *) (* -[@@@ocaml.warning "+9"] +[@@@warning "+9"] (* Ensure that record patterns don't miss any field. *) *) @@ -30,8 +30,6 @@ type mapper = { attributes: mapper -> attribute list -> attribute list; case: mapper -> case -> case; cases: mapper -> case list -> case list; - class_declaration: mapper -> class_declaration -> class_declaration; - class_description: mapper -> class_description -> class_description; class_expr: mapper -> class_expr -> class_expr; class_field: mapper -> class_field -> class_field; class_signature: mapper -> class_signature -> class_signature; @@ -265,7 +263,7 @@ module MT = struct | Psig_modtype x -> modtype ~loc (sub.module_type_declaration sub x) | Psig_open x -> open_ ~loc (sub.open_description sub x) | Psig_include x -> include_ ~loc (sub.include_description sub x) - | Psig_class l -> class_ ~loc (List.map (sub.class_description sub) l) + | Psig_class _ -> assert false | Psig_class_type l -> class_type ~loc (List.map (sub.class_type_declaration sub) l) | Psig_extension (x, attrs) -> @@ -311,7 +309,7 @@ module M = struct | Pstr_recmodule l -> rec_module ~loc (List.map (sub.module_binding sub) l) | Pstr_modtype x -> modtype ~loc (sub.module_type_declaration sub x) | Pstr_open x -> open_ ~loc (sub.open_description sub x) - | Pstr_class l -> class_ ~loc (List.map (sub.class_declaration sub) l) + | Pstr_class () -> {pstr_loc = loc ; pstr_desc = Pstr_class ()} | Pstr_class_type l -> class_type ~loc (List.map (sub.class_type_declaration sub) l) | Pstr_include x -> include_ ~loc (sub.include_declaration sub x) @@ -470,9 +468,8 @@ module CE = struct let loc = sub.location sub loc in let attrs = sub.attributes sub attrs in match desc with - | Pcf_inherit (o, ce, s) -> - inherit_ ~loc ~attrs o (sub.class_expr sub ce) - (map_opt (map_loc sub) s) + | Pcf_inherit () -> + {pcf_desc = desc; pcf_loc = loc; pcf_attributes = attrs} | Pcf_val (s, m, k) -> val_ ~loc ~attrs (map_loc sub s) m (map_kind sub k) | Pcf_method (s, p, k) -> method_ ~loc ~attrs (map_loc sub s) p (map_kind sub k) @@ -512,8 +509,6 @@ let default_mapper = signature_item = MT.map_signature_item; module_type = MT.map; with_constraint = MT.map_with_constraint; - class_declaration = - (fun this -> CE.class_infos this (this.class_expr this)); class_expr = CE.map; class_field = CE.map_field; class_structure = CE.map_structure; @@ -522,8 +517,6 @@ let default_mapper = class_signature = CT.map_signature; class_type_declaration = (fun this -> CE.class_infos this (this.class_type this)); - class_description = - (fun this -> CE.class_infos this (this.class_type this)); type_declaration = T.map_type_declaration; type_kind = T.map_type_kind; typ = T.map; @@ -702,10 +695,6 @@ module PpxContext = struct let make_pair f1 f2 (x1, x2) = Exp.tuple [f1 x1; f2 x2] - let make_option f opt = - match opt with - | Some x -> Exp.construct (lid "Some") (Some (f x)) - | None -> Exp.construct (lid "None") None let get_cookies () = lid "cookies", @@ -723,10 +712,7 @@ module PpxContext = struct lid "include_dirs", make_list make_string !Clflags.include_dirs; lid "load_path", make_list make_string !Config.load_path; lid "open_modules", make_list make_string !Clflags.open_modules; - lid "for_package", make_option make_string !Clflags.for_package; lid "debug", make_bool !Clflags.debug; - lid "use_threads", make_bool !Clflags.use_threads; - lid "use_vmthreads", make_bool !Clflags.use_vmthreads; get_cookies () ] in @@ -770,15 +756,6 @@ module PpxContext = struct (f1 e1, f2 e2) | _ -> raise_errorf "Internal error: invalid [@@@ocaml.ppx.context \ { %s }] pair syntax" name - and get_option elem = function - | { pexp_desc = - Pexp_construct ({ txt = Longident.Lident "Some" }, Some exp) } -> - Some (elem exp) - | { pexp_desc = - Pexp_construct ({ txt = Longident.Lident "None" }, None) } -> - None - | _ -> raise_errorf "Internal error: invalid [@@@ocaml.ppx.context \ - { %s }] option syntax" name in match name with | "tool_name" -> @@ -789,14 +766,8 @@ module PpxContext = struct Config.load_path := get_list get_string payload | "open_modules" -> Clflags.open_modules := get_list get_string payload - | "for_package" -> - Clflags.for_package := get_option get_string payload | "debug" -> Clflags.debug := get_bool payload - | "use_threads" -> - Clflags.use_threads := get_bool payload - | "use_vmthreads" -> - Clflags.use_vmthreads := get_bool payload | "cookies" -> let l = get_list (get_pair get_string (fun x -> x)) payload in cookies := @@ -810,9 +781,8 @@ module PpxContext = struct let update_cookies fields = let fields = - List.filter - (function ({txt=Lident "cookies"}, _) -> false | _ -> true) - fields + Ext_list.filter fields + (function ({txt=Lident "cookies"}, _) -> false | _ -> true) in fields @ [get_cookies ()] end @@ -872,7 +842,7 @@ let apply_lazy ~source ~target mapper = in let rewrite transform = - Location.input_name := input_value ic; + Location.set_input_name @@ input_value ic; let ast = input_value ic in close_in ic; let ast = transform ast in diff --git a/analysis/vendor/compiler-libs-406/ast_mapper.mli b/analysis/vendor/ml/ast_mapper.mli similarity index 98% rename from analysis/vendor/compiler-libs-406/ast_mapper.mli rename to analysis/vendor/ml/ast_mapper.mli index 85b59e9c3..3a4044d4c 100644 --- a/analysis/vendor/compiler-libs-406/ast_mapper.mli +++ b/analysis/vendor/ml/ast_mapper.mli @@ -57,8 +57,6 @@ type mapper = { attributes: mapper -> attribute list -> attribute list; case: mapper -> case -> case; cases: mapper -> case list -> case list; - class_declaration: mapper -> class_declaration -> class_declaration; - class_description: mapper -> class_description -> class_description; class_expr: mapper -> class_expr -> class_expr; class_field: mapper -> class_field -> class_field; class_signature: mapper -> class_signature -> class_signature; diff --git a/analysis/vendor/ml/ast_uncurried.ml b/analysis/vendor/ml/ast_uncurried.ml new file mode 100644 index 000000000..f79e52f6e --- /dev/null +++ b/analysis/vendor/ml/ast_uncurried.ml @@ -0,0 +1,108 @@ +(* Untyped AST *) + + +let encode_arity_string arity = "Has_arity" ^ string_of_int arity +let decode_arity_string arity_s = int_of_string ((String.sub [@doesNotRaise]) arity_s 9 (String.length arity_s - 9)) + +let arityType ~loc arity = + Ast_helper.Typ.variant ~loc + [ Rtag ({ txt = encode_arity_string arity; loc }, [], true, []) ] + Closed None + +let arityFromType (typ : Parsetree.core_type) = + match typ.ptyp_desc with + | Ptyp_variant ([Rtag ({txt}, _, _, _)], _, _) -> decode_arity_string txt + | _ -> assert false + +let uncurriedType ~loc ~arity tArg = + let tArity = arityType ~loc arity in + Ast_helper.Typ.constr ~loc + { txt = Lident "function$"; loc } + [ tArg; tArity ] + +let arity_to_attributes arity = + [ + ( Location.mknoloc "res.arity", + Parsetree.PStr + [ + Ast_helper.Str.eval + (Ast_helper.Exp.constant + (Pconst_integer (string_of_int arity, None))); + ] ); + ] + +let rec attributes_to_arity (attrs : Parsetree.attributes) = + match attrs with + | ( { txt = "res.arity" }, + PStr + [ + { + pstr_desc = + Pstr_eval + ({ pexp_desc = Pexp_constant (Pconst_integer (arity, _)) }, _); + }; + ] ) + :: _ -> + int_of_string arity + | _ :: rest -> attributes_to_arity rest + | _ -> assert false + +let uncurriedFun ~loc ~arity funExpr = + Ast_helper.Exp.construct ~loc + ~attrs:(arity_to_attributes arity) + { txt = Lident "Function$"; loc } + (Some funExpr) + +let exprIsUncurriedFun (expr : Parsetree.expression) = + match expr.pexp_desc with + | Pexp_construct ({ txt = Lident "Function$" }, Some _) -> true + | _ -> false + +let exprExtractUncurriedFun (expr : Parsetree.expression) = + match expr.pexp_desc with + | Pexp_construct ({ txt = Lident "Function$" }, Some e) -> e + | _ -> assert false + +let typeIsUncurriedFun (typ : Parsetree.core_type) = + match typ.ptyp_desc with + | Ptyp_constr ({txt = Lident "function$"}, [{ptyp_desc = Ptyp_arrow _}; _]) -> + true + | _ -> false + +let typeExtractUncurriedFun (typ : Parsetree.core_type) = + match typ.ptyp_desc with + | Ptyp_constr ({txt = Lident "function$"}, [tArg; tArity]) -> + (arityFromType tArity, tArg) + | _ -> assert false + +(* Typed AST *) + +let arity_to_type arity = + let arity_s = encode_arity_string arity in + Ctype.newty + (Tvariant + { + row_fields = [ (arity_s, Rpresent None) ]; + row_more = Ctype.newty Tnil; + row_bound = (); + row_closed = true; + row_fixed = false; + row_name = None; + }) + +let type_to_arity (tArity : Types.type_expr) = + match (Ctype.repr tArity).desc with + | Tvariant { row_fields = [ (label, _) ] } -> decode_arity_string label + | _ -> assert false + +let make_uncurried_type ~env ~arity t = + let typ_arity = arity_to_type arity in + let lid : Longident.t = Lident "function$" in + let path = Env.lookup_type lid env in + Ctype.newconstr path [ t; typ_arity ] + +let uncurried_type_get_arity ~env typ = + match (Ctype.expand_head env typ).desc with + | Tconstr (Pident { name = "function$" }, [ _t; tArity ], _) -> + type_to_arity tArity + | _ -> assert false diff --git a/analysis/vendor/compiler-libs-406/asttypes.mli b/analysis/vendor/ml/asttypes.ml similarity index 86% rename from analysis/vendor/compiler-libs-406/asttypes.mli rename to analysis/vendor/ml/asttypes.ml index 8cab1c6b8..8fefc4528 100644 --- a/analysis/vendor/compiler-libs-406/asttypes.mli +++ b/analysis/vendor/ml/asttypes.ml @@ -17,7 +17,7 @@ type constant = Const_int of int - | Const_char of char + | Const_char of int | Const_string of string * string option | Const_float of string | Const_int32 of int32 @@ -56,3 +56,18 @@ type variance = | Covariant | Contravariant | Invariant + + +let same_arg_label (x : arg_label) y = + match x with + | Nolabel -> y = Nolabel + | Labelled s -> + begin match y with + | Labelled s0 -> s = s0 + | _ -> false + end + | Optional s -> + begin match y with + | Optional s0 -> s = s0 + | _ -> false + end diff --git a/analysis/vendor/compiler-libs-406/btype.ml b/analysis/vendor/ml/btype.ml similarity index 98% rename from analysis/vendor/compiler-libs-406/btype.ml rename to analysis/vendor/ml/btype.ml index d94693b1e..de95c2dfe 100644 --- a/analysis/vendor/compiler-libs-406/btype.ml +++ b/analysis/vendor/ml/btype.ml @@ -329,7 +329,7 @@ let type_iterators = | Sig_typext (_, td, _) -> it.it_extension_constructor it td | Sig_module (_, md, _) -> it.it_module_declaration it md | Sig_modtype (_, mtd) -> it.it_modtype_declaration it mtd - | Sig_class (_, cd, _) -> it.it_class_declaration it cd + | Sig_class () -> assert false | Sig_class_type (_, ctd, _) -> it.it_class_type_declaration it ctd and it_value_description it vd = it.it_type_expr it vd.val_type @@ -622,14 +622,22 @@ let prefixed_label_name = function | Labelled s -> "~" ^ s | Optional s -> "?" ^ s + +type sargs = (Asttypes.arg_label * Parsetree.expression) list + let rec extract_label_aux hd l = function - [] -> raise Not_found + [] -> None | (l',t as p) :: ls -> - if label_name l' = l then (l', t, List.rev hd, ls) + if label_name l' = l then Some (l', t, List.rev_append hd ls) else extract_label_aux (p::hd) l ls -let extract_label l ls = extract_label_aux [] l ls +let extract_label l (ls : sargs) : (arg_label * Parsetree.expression * sargs) option = extract_label_aux [] l ls + +let rec label_assoc x (args : sargs) = + match args with + | [] -> false + | (a, _) :: l -> Asttypes.same_arg_label a x || label_assoc x l (**********************************) (* Utilities for backtracking *) diff --git a/analysis/vendor/compiler-libs-406/btype.mli b/analysis/vendor/ml/btype.mli similarity index 97% rename from analysis/vendor/compiler-libs-406/btype.mli rename to analysis/vendor/ml/btype.mli index aaa426a8a..ca1066cc5 100644 --- a/analysis/vendor/compiler-libs-406/btype.mli +++ b/analysis/vendor/ml/btype.mli @@ -173,11 +173,14 @@ val label_name : arg_label -> label (* Returns the label name with first character '?' or '~' as appropriate. *) val prefixed_label_name : arg_label -> label +type sargs = (arg_label * Parsetree.expression) list + val extract_label : - label -> (arg_label * 'a) list -> - arg_label * 'a * (arg_label * 'a) list * (arg_label * 'a) list - (* actual label, value, before list, after list *) + label -> sargs -> + (arg_label * Parsetree.expression * sargs) option + (* actual label, value, new list with the same order *) +val label_assoc : arg_label -> sargs -> bool (**** Utilities for backtracking ****) type snapshot diff --git a/analysis/vendor/compiler-libs-406/builtin_attributes.ml b/analysis/vendor/ml/builtin_attributes.ml similarity index 98% rename from analysis/vendor/compiler-libs-406/builtin_attributes.ml rename to analysis/vendor/ml/builtin_attributes.ml index 84503189e..391aa890b 100755 --- a/analysis/vendor/compiler-libs-406/builtin_attributes.ml +++ b/analysis/vendor/ml/builtin_attributes.ml @@ -61,7 +61,9 @@ let rec error_of_extension ext = let cat s1 s2 = if s2 = "" then s1 else - s1 ^ "\n" ^ s2 + if Clflags.bs_vscode then s1 ^ " " ^ s2 + (* 2 spaces indentation for the next line *) + else s1 ^ "\n " ^ s2 let rec deprecated_of_attrs = function | [] -> None diff --git a/analysis/vendor/compiler-libs-406/builtin_attributes.mli b/analysis/vendor/ml/builtin_attributes.mli similarity index 100% rename from analysis/vendor/compiler-libs-406/builtin_attributes.mli rename to analysis/vendor/ml/builtin_attributes.mli diff --git a/analysis/vendor/ml/ccomp.ml b/analysis/vendor/ml/ccomp.ml new file mode 100644 index 000000000..ae2fb79fd --- /dev/null +++ b/analysis/vendor/ml/ccomp.ml @@ -0,0 +1,9 @@ + +let command cmdline = + if !Clflags.verbose then begin + prerr_string "+ "; + prerr_string cmdline; + prerr_newline() + end; + Sys.command cmdline + diff --git a/analysis/vendor/ml/ccomp.mli b/analysis/vendor/ml/ccomp.mli new file mode 100644 index 000000000..7ba8b4bfa --- /dev/null +++ b/analysis/vendor/ml/ccomp.mli @@ -0,0 +1,2 @@ + +val command: string -> int diff --git a/analysis/vendor/ml/clflags.ml b/analysis/vendor/ml/clflags.ml new file mode 100644 index 000000000..e4bcd4d23 --- /dev/null +++ b/analysis/vendor/ml/clflags.ml @@ -0,0 +1,71 @@ + + + + +let output_name = ref (None : string option) (* -o *) +and include_dirs = ref ([] : string list)(* -I *) +and debug = ref false (* -g *) +and fast = ref false (* -unsafe *) + +and nopervasives = ref false (* -nopervasives *) +and preprocessor = ref(None : string option) (* -pp *) +and all_ppx = ref ([] : string list) (* -ppx *) +let annotations = ref false (* -annot *) +let binary_annotations = ref false (* -annot *) +and noassert = ref false (* -noassert *) +and verbose = ref false (* -verbose *) +and open_modules = ref [] (* -open *) + +and real_paths = ref true (* -short-paths *) +and applicative_functors = ref true (* -no-app-funct *) +and error_size = ref 500 (* -error-size *) +and transparent_modules = ref false (* -trans-mod *) +let dump_source = ref false (* -dsource *) +let dump_parsetree = ref false (* -dparsetree *) +and dump_typedtree = ref false (* -dtypedtree *) +and dump_rawlambda = ref false (* -drawlambda *) +and dump_lambda = ref false (* -dlambda *) +and only_parse = ref false (* -only-parse *) + +let dont_write_files = ref false (* set to true under ocamldoc *) + + +let reset_dump_state () = begin + dump_source := false; + dump_parsetree := false; + dump_typedtree := false; + dump_rawlambda := false +end + + + + +let keep_docs = ref false (* -keep-docs *) +let keep_locs = ref true (* -keep-locs *) + + + + +let parse_color_setting = function + | "auto" -> Some Misc.Color.Auto + | "always" -> Some Misc.Color.Always + | "never" -> Some Misc.Color.Never + | _ -> None +let color = ref None ;; (* -color *) + +let unboxed_types = ref false + + + + +type mli_status = Mli_exists | Mli_non_exists +let assume_no_mli = ref Mli_non_exists +let bs_vscode = + try ignore @@ Sys.getenv "BS_VSCODE" ; true with _ -> false + (* We get it from environment variable mostly due to + we don't want to rebuild when flip on or off + *) +let dont_record_crc_unit : string option ref = ref None +let bs_gentype = ref false +let no_assert_false = ref false +let dump_location = ref true diff --git a/analysis/vendor/ml/clflags.mli b/analysis/vendor/ml/clflags.mli new file mode 100644 index 000000000..9cee27d4e --- /dev/null +++ b/analysis/vendor/ml/clflags.mli @@ -0,0 +1,45 @@ +val output_name : string option ref +val include_dirs : string list ref + +val debug : bool ref +val fast : bool ref + +val nopervasives : bool ref +val open_modules : string list ref +val preprocessor : string option ref +val all_ppx : string list ref +val annotations : bool ref +val binary_annotations : bool ref +val noassert : bool ref +val verbose : bool ref +val real_paths : bool ref +val applicative_functors : bool ref +val error_size : int ref +val transparent_modules : bool ref +val dump_source : bool ref +val dump_parsetree : bool ref +val dump_typedtree : bool ref +val dump_rawlambda : bool ref +val dump_lambda : bool ref +val dont_write_files : bool ref +val keep_docs : bool ref +val keep_locs : bool ref +val only_parse : bool ref + + +val parse_color_setting : string -> Misc.Color.setting option +val color : Misc.Color.setting option ref + +val unboxed_types : bool ref + +val reset_dump_state: unit -> unit + + +type mli_status = Mli_exists | Mli_non_exists +val assume_no_mli : mli_status ref +val bs_vscode : bool +val dont_record_crc_unit : string option ref +val bs_gentype : bool ref +val no_assert_false : bool ref +val dump_location : bool ref + diff --git a/analysis/vendor/compiler-libs-406/cmi_format.ml b/analysis/vendor/ml/cmi_format.ml similarity index 99% rename from analysis/vendor/compiler-libs-406/cmi_format.ml rename to analysis/vendor/ml/cmi_format.ml index 1b21d3621..ee95e8254 100644 --- a/analysis/vendor/compiler-libs-406/cmi_format.ml +++ b/analysis/vendor/ml/cmi_format.ml @@ -14,10 +14,9 @@ (**************************************************************************) type pers_flags = - | Rectypes | Deprecated of string - | Opaque - | Unsafe_string + + type error = Not_an_interface of string @@ -84,6 +83,7 @@ let output_cmi filename oc cmi = output_value oc cmi.cmi_flags; crc + (* This function is also called by [save_cmt] as cmi_format is subset of cmt_format, so dont close the channel yet *) @@ -115,6 +115,9 @@ let create_cmi ?check_exists filename (cmi : cmi_infos) = output_value oc cmi.cmi_flags; close_out oc; crc + + + (* Error report *) diff --git a/analysis/vendor/compiler-libs-406/cmi_format.mli b/analysis/vendor/ml/cmi_format.mli similarity index 97% rename from analysis/vendor/compiler-libs-406/cmi_format.mli rename to analysis/vendor/ml/cmi_format.mli index 9385deb5b..7aa7f8d8d 100644 --- a/analysis/vendor/compiler-libs-406/cmi_format.mli +++ b/analysis/vendor/ml/cmi_format.mli @@ -14,10 +14,9 @@ (**************************************************************************) type pers_flags = - | Rectypes | Deprecated of string - | Opaque - | Unsafe_string + + type cmi_infos = { cmi_name : string; diff --git a/analysis/vendor/compiler-libs-406/cmt_format.ml b/analysis/vendor/ml/cmt_format.ml similarity index 96% rename from analysis/vendor/compiler-libs-406/cmt_format.ml rename to analysis/vendor/ml/cmt_format.ml index fda1a4a56..815c693ed 100644 --- a/analysis/vendor/compiler-libs-406/cmt_format.ml +++ b/analysis/vendor/ml/cmt_format.ml @@ -40,7 +40,7 @@ and binary_part = | Partial_structure_item of structure_item | Partial_expression of expression | Partial_pattern of pattern -| Partial_class_expr of class_expr +| Partial_class_expr of unit | Partial_signature of signature | Partial_signature_item of signature_item | Partial_module_type of module_type @@ -82,7 +82,7 @@ let clear_part = function Partial_structure_item (cenv.structure_item cenv s) | Partial_expression e -> Partial_expression (cenv.expr cenv e) | Partial_pattern p -> Partial_pattern (cenv.pat cenv p) - | Partial_class_expr ce -> Partial_class_expr (cenv.class_expr cenv ce) + | Partial_class_expr () -> assert false | Partial_signature s -> Partial_signature (cenv.signature cenv s) | Partial_signature_item s -> Partial_signature_item (cenv.signature_item cenv s) @@ -165,9 +165,13 @@ let record_value_dependency vd1 vd2 = value_deps := (vd1, vd2) :: !value_deps let save_cmt filename modname binary_annots sourcefile initial_env cmi = - if !Clflags.binary_annotations && not !Clflags.print_types then begin +#ifdef BROWSER + () +#else + if !Clflags.binary_annotations then begin + (if !Config.bs_only then Misc.output_to_bin_file_directly else Misc.output_to_file_via_temporary - ~mode:[Open_binary] filename + ~mode:[Open_binary] ) filename (fun temp_file_name oc -> let this_crc = match cmi with @@ -194,3 +198,4 @@ let save_cmt filename modname binary_annots sourcefile initial_env cmi = output_cmt oc cmt) end; clear () +#endif \ No newline at end of file diff --git a/analysis/vendor/compiler-libs-406/cmt_format.mli b/analysis/vendor/ml/cmt_format.mli similarity index 99% rename from analysis/vendor/compiler-libs-406/cmt_format.mli rename to analysis/vendor/ml/cmt_format.mli index 617bc1ed8..6daf64339 100644 --- a/analysis/vendor/compiler-libs-406/cmt_format.mli +++ b/analysis/vendor/ml/cmt_format.mli @@ -43,7 +43,7 @@ and binary_part = | Partial_structure_item of structure_item | Partial_expression of expression | Partial_pattern of pattern - | Partial_class_expr of class_expr + | Partial_class_expr of unit | Partial_signature of signature | Partial_signature_item of signature_item | Partial_module_type of module_type diff --git a/analysis/vendor/compiler-libs-406/consistbl.ml b/analysis/vendor/ml/consistbl.ml similarity index 100% rename from analysis/vendor/compiler-libs-406/consistbl.ml rename to analysis/vendor/ml/consistbl.ml diff --git a/analysis/vendor/compiler-libs-406/consistbl.mli b/analysis/vendor/ml/consistbl.mli similarity index 100% rename from analysis/vendor/compiler-libs-406/consistbl.mli rename to analysis/vendor/ml/consistbl.mli diff --git a/analysis/vendor/compiler-libs-406/ctype.ml b/analysis/vendor/ml/ctype.ml similarity index 97% rename from analysis/vendor/compiler-libs-406/ctype.ml rename to analysis/vendor/ml/ctype.ml index df46de1f6..c74fa9f57 100644 --- a/analysis/vendor/compiler-libs-406/ctype.ml +++ b/analysis/vendor/ml/ctype.ml @@ -159,7 +159,7 @@ let wrap_trace_gadt_instances env f x = let simple_abbrevs = ref Mnil let proper_abbrevs path tl abbrev = - if tl <> [] || !trace_gadt_instances || !Clflags.principal || + if tl <> [] || !trace_gadt_instances || is_object_type path then abbrev else simple_abbrevs @@ -205,7 +205,7 @@ type unification_mode = let umode = ref Expression let generate_equations = ref false let assume_injective = ref false - +let variant_is_subtype = ref (fun _env _row _p1 -> false) let set_mode_pattern ~generate ~injective f = let old_unification_mode = !umode and old_gen = !generate_equations @@ -251,7 +251,7 @@ let is_datatype decl= * cty_self must be a Tobject * ... *) - +type fields = (string * Types.field_kind * Types.type_expr) list (**** Object field manipulation. ****) let object_fields ty = @@ -259,8 +259,8 @@ let object_fields ty = Tobject (fields, _) -> fields | _ -> assert false -let flatten_fields ty = - let rec flatten l ty = +let flatten_fields (ty : Types.type_expr) : fields * _ = + let rec flatten (l : fields) ty = let ty = repr ty in match ty.desc with Tfield(s, k, ty1, ty2) -> @@ -275,8 +275,11 @@ let build_fields level = List.fold_right (fun (s, k, ty1) ty2 -> newty2 level (Tfield(s, k, ty1, ty2))) -let associate_fields fields1 fields2 = - let rec associate p s s' = + +let associate_fields + (fields1 : fields ) + (fields2 : fields ) : _ * fields * fields = + let rec associate p s s' : fields * fields -> _ = function (l, []) -> (List.rev p, (List.rev s) @ l, List.rev s') @@ -397,10 +400,11 @@ let rec class_type_arity = (*******************************************) (* Miscellaneous operations on row types *) (*******************************************) +type row_fields = (Asttypes.label * Types.row_field) list +type row_pairs = (Asttypes.label * Types.row_field * Types.row_field) list +let sort_row_fields : row_fields -> row_fields = List.sort (fun (p,_) (q,_) -> compare (p : string) q) -let sort_row_fields = List.sort (fun (p,_) (q,_) -> compare p q) - -let rec merge_rf r1 r2 pairs fi1 fi2 = +let rec merge_rf (r1 : row_fields) (r2 : row_fields) (pairs : row_pairs) (fi1 : row_fields) (fi2 : row_fields) = match fi1, fi2 with (l1,f1 as p1)::fi1', (l2,f2 as p2)::fi2' -> if l1 = l2 then merge_rf r1 r2 ((l1,f1,f2)::pairs) fi1' fi2' else @@ -409,7 +413,7 @@ let rec merge_rf r1 r2 pairs fi1 fi2 = | [], _ -> (List.rev r1, List.rev_append r2 fi2, pairs) | _, [] -> (List.rev_append r1 fi1, List.rev r2, pairs) -let merge_row_fields fi1 fi2 = +let merge_row_fields (fi1 : row_fields) (fi2 : row_fields) : row_fields * row_fields * row_pairs = match fi1, fi2 with [], _ | _, [] -> (fi1, fi2, []) | [p1], _ when not (List.mem_assoc (fst p1) fi2) -> (fi1, fi2, []) @@ -635,28 +639,6 @@ let generalize_structure var_level ty = simple_abbrevs := Mnil; generalize_structure var_level ty -(* Generalize the spine of a function, if the level >= !current_level *) - -let rec generalize_spine ty = - let ty = repr ty in - if ty.level < !current_level || ty.level = generic_level then () else - match ty.desc with - Tarrow (_, ty1, ty2, _) -> - set_level ty generic_level; - generalize_spine ty1; - generalize_spine ty2; - | Tpoly (ty', _) -> - set_level ty generic_level; - generalize_spine ty' - | Ttuple tyl - | Tpackage (_, _, tyl) -> - set_level ty generic_level; - List.iter generalize_spine tyl - | Tconstr (p, tyl, memo) when not (is_object_type p) -> - set_level ty generic_level; - memo := Mnil; - List.iter generalize_spine tyl - | _ -> () let forward_try_expand_once = (* Forward declaration *) ref (fun _env _ty -> raise Cannot_expand) @@ -1031,7 +1013,7 @@ let rec copy ?env ?partial ?keep_names ty = && TypeSet.is_empty (free_univars ty) && not (List.for_all not_reither row.row_fields) then (more', - {row_fields = List.filter not_reither row.row_fields; + {row_fields = Ext_list.filter row.row_fields not_reither; row_more = more'; row_bound = (); row_closed = false; row_fixed = false; row_name = None}) else (more', row) @@ -1422,7 +1404,7 @@ let expand_abbrev_gen kind find_type_expansion env ty = (* For gadts, remember type as non exportable *) (* The ambiguous level registered for ty' should be the highest *) if !trace_gadt_instances then begin - match max lv (Env.gadt_instance_level env ty) with + match Ext_pervasives.max_int_option lv (Env.gadt_instance_level env ty) with None -> () | Some lv -> if level < lv then raise (Unify [(ty, newvar2 level)]); @@ -1631,7 +1613,7 @@ let type_changed = ref false (* trace possible changes to the studied type *) let merge r b = if b then r := true let occur env ty0 ty = - let allow_recursive = !Clflags.recursive_types || !umode = Pattern in + let allow_recursive = (*!Clflags.recursive_types ||*) !umode = Pattern in let old = !type_changed in try while @@ -2027,7 +2009,7 @@ let rec mcomp type_pairs env t1 t2 = match (t1'.desc, t2'.desc) with (Tvar _, Tvar _) -> assert false | (Tarrow (l1, t1, u1, _), Tarrow (l2, t2, u2, _)) - when l1 = l2 || not (is_optional l1 || is_optional l2) -> + when Asttypes.same_arg_label l1 l2 || not (is_optional l1 || is_optional l2) -> mcomp type_pairs env t1 t2; mcomp type_pairs env u1 u2; | (Ttuple tl1, Ttuple tl2) -> @@ -2136,7 +2118,7 @@ and mcomp_type_decl type_pairs env p1 p2 tl1 tl2 = raise (Unify []) else match decl.type_kind, decl'.type_kind with - | Type_record (lst,r), Type_record (lst',r') when r = r' -> + | Type_record (lst,r), Type_record (lst',r') when Types.same_record_representation r r' -> mcomp_list type_pairs env tl1 tl2; mcomp_record_description type_pairs env lst lst' | Type_variant v1, Type_variant v2 -> @@ -2194,16 +2176,6 @@ let mcomp env t1 t2 = (* Real unification *) -let find_lowest_level ty = - let lowest = ref generic_level in - let rec find ty = - let ty = repr ty in - if ty.level >= lowest_level then begin - if ty.level < !lowest then lowest := ty.level; - ty.level <- pivot_level - ty.level; - iter_type_expr find ty - end - in find ty; unmark_type ty; !lowest let find_newtype_level env path = try match (Env.find_type path env).type_newtype_level with @@ -2260,8 +2232,8 @@ let complete_type_list ?(allow_absent=false) env nl1 lv2 mty2 nl2 tl2 = let rec complete nl1 ntl2 = match nl1, ntl2 with [], _ -> ntl2 - | n :: nl, (n2, _ as nt2) :: ntl' when n >= n2 -> - nt2 :: complete (if n = n2 then nl else nl1) ntl' + | n :: nl, (n2, _ as nt2) :: ntl' when Longident.cmp n n2 >= 0 -> + nt2 :: complete (if Longident.cmp n n2 = 0 then nl else nl1) ntl' | n :: nl, _ -> try let path = @@ -2360,6 +2332,8 @@ let rec unify (env:Env.t ref) t1 t2 = && is_newtype !env p1 && is_newtype !env p2 -> (* Do not use local constraints more than necessary *) begin try + let [@local] (<) ((a : int) ,(b : int)) (c,d) = + a < c || (a = c && b < d) in if find_newtype_level !env p1 < find_newtype_level !env p2 then unify env t1 (try_expand_once !env t2) else @@ -2367,6 +2341,9 @@ let rec unify (env:Env.t ref) t1 t2 = with Cannot_expand -> unify2 env t1 t2 end + | (Tconstr (Pident {name="function$"}, [tFun; _], _), Tarrow _) when !Config.use_automatic_curried_application -> + (* subtype: an uncurried function is cast to a curried one *) + unify2 env tFun t2 | _ -> unify2 env t1 t2 end; @@ -2382,7 +2359,7 @@ and unify2 env t1 t2 = ignore (expand_head_unif !env t2); let t1' = expand_head_unif !env t1 in let t2' = expand_head_unif !env t2 in - let lv = min t1'.level t2'.level in + let lv = Ext_pervasives.min_int t1'.level t2'.level in update_level !env lv t2; update_level !env lv t1; if unify_eq t1' t2' then () else @@ -2396,15 +2373,6 @@ and unify2 env t1 t2 = if lv1 > lv2 then Env.add_gadt_instance_chain !env lv1 t2 else if lv2 > lv1 then Env.add_gadt_instance_chain !env lv2 t1 end; - let t1, t2 = - if !Clflags.principal - && (find_lowest_level t1' < lv || find_lowest_level t2' < lv) then - (* Expand abbreviations hiding a lower level *) - (* Should also do it for parameterized types, after unification... *) - (match t1.desc with Tconstr (_, [], _) -> t1' | _ -> t1), - (match t2.desc with Tconstr (_, [], _) -> t2' | _ -> t2) - else (t1, t2) - in if unify_eq t1 t1' || not (unify_eq t2 t2') then unify3 env t1 t1' t2 t2' else @@ -2441,8 +2409,8 @@ and unify3 env t1 t1' t2 t2' = end; try begin match (d1, d2) with - (Tarrow (l1, t1, u1, c1), Tarrow (l2, t2, u2, c2)) when l1 = l2 || - (!Clflags.classic || !umode = Pattern) && + (Tarrow (l1, t1, u1, c1), Tarrow (l2, t2, u2, c2)) when Asttypes.same_arg_label l1 l2 || + (!umode = Pattern) && not (is_optional l1 || is_optional l2) -> unify env t1 t2; unify env u1 u2; begin match commu_repr c1, commu_repr c2 with @@ -2482,6 +2450,9 @@ and unify3 env t1 t1' t2 t2' = Tconstr (path',[],_)) when is_instantiable !env path && is_instantiable !env path' && !generate_equations -> + let [@local] (>) ((a:int),(b:int)) (c,d) = + a > c || (a = c && b > d) + in let source, destination = if find_newtype_level !env path > find_newtype_level !env path' then path , t2' @@ -2590,12 +2561,12 @@ and make_rowvar level use1 rest1 use2 rest2 = if use1 then rest1 else if use2 then rest2 else newvar2 ?name level -and unify_fields env ty1 ty2 = (* Optimization *) +and unify_fields env (ty1 : Types.type_expr) (ty2 : Types.type_expr) = (* Optimization *) let (fields1, rest1) = flatten_fields ty1 and (fields2, rest2) = flatten_fields ty2 in let (pairs, miss1, miss2) = associate_fields fields1 fields2 in let l1 = (repr ty1).level and l2 = (repr ty2).level in - let va = make_rowvar (min l1 l2) (miss2=[]) rest1 (miss1=[]) rest2 in + let va = make_rowvar (Ext_pervasives.min_int l1 l2) (miss2=[]) rest1 (miss1=[]) rest2 in let d1 = rest1.desc and d2 = rest2.desc in try unify env (build_fields l1 miss1 va) rest2; @@ -2630,7 +2601,8 @@ and unify_row env row1 row2 = let rm1 = row_more row1 and rm2 = row_more row2 in if unify_eq rm1 rm2 then () else let r1, r2, pairs = merge_row_fields row1.row_fields row2.row_fields in - if r1 <> [] && r2 <> [] then begin + if not !Config.bs_only && (r1 <> [] && r2 <> []) then begin + (* pairs are the intersection, r1 , r2 should be disjoint *) let ht = Hashtbl.create (List.length r1) in List.iter (fun (l,_) -> Hashtbl.add ht (hash_variant l) l) r1; List.iter @@ -2643,7 +2615,7 @@ and unify_row env row1 row2 = let more = if fixed1 then rm1 else if fixed2 then rm2 else - newty2 (min rm1.level rm2.level) (Tvar None) in + newty2 (Ext_pervasives.min_int rm1.level rm2.level) (Tvar None) in let fixed = fixed1 || fixed2 and closed = row1.row_closed || row2.row_closed in let keep switch = @@ -2869,7 +2841,7 @@ let filter_arrow env t l = link_type t t'; (t1, t2) | Tarrow(l', t1, t2, _) - when l = l' || !Clflags.classic && l = Nolabel && not (is_optional l') -> + when Asttypes.same_arg_label l l' -> (t1, t2) | _ -> raise (Unify []) @@ -2991,8 +2963,8 @@ let rec moregen inst_nongen type_pairs env t1 t2 = (Tvar _, _) when may_instantiate inst_nongen t1' -> moregen_occur env t1'.level t2; link_type t1' t2 - | (Tarrow (l1, t1, u1, _), Tarrow (l2, t2, u2, _)) when l1 = l2 - || !Clflags.classic && not (is_optional l1 || is_optional l2) -> + | (Tarrow (l1, t1, u1, _), Tarrow (l2, t2, u2, _)) when Asttypes.same_arg_label l1 l2 + -> moregen inst_nongen type_pairs env t1 t2; moregen inst_nongen type_pairs env u1 u2 | (Ttuple tl1, Ttuple tl2) -> @@ -3259,8 +3231,8 @@ let rec eqtype rename type_pairs subst env t1 t2 = then raise (Unify []); subst := (t1', t2') :: !subst end - | (Tarrow (l1, t1, u1, _), Tarrow (l2, t2, u2, _)) when l1 = l2 - || !Clflags.classic && not (is_optional l1 || is_optional l2) -> + | (Tarrow (l1, t1, u1, _), Tarrow (l2, t2, u2, _)) when Asttypes.same_arg_label l1 l2 + -> eqtype rename type_pairs subst env t1 t2; eqtype rename type_pairs subst env u1 u2; | (Ttuple tl1, Ttuple tl2) -> @@ -3300,7 +3272,7 @@ and eqtype_list rename type_pairs subst env tl1 tl2 = raise (Unify []); List.iter2 (eqtype rename type_pairs subst env) tl1 tl2 -and eqtype_fields rename type_pairs subst env ty1 ty2 = +and eqtype_fields rename type_pairs subst env ty1 ty2 : unit = let (fields1, rest1) = flatten_fields ty1 in let (fields2, rest2) = flatten_fields ty2 in (* First check if same row => already equal *) @@ -3417,7 +3389,7 @@ let rec moregen_clty trace type_pairs env cty1 cty2 = moregen_clty true type_pairs env cty1 cty2 | _, Cty_constr (_, _, cty2) -> moregen_clty true type_pairs env cty1 cty2 - | Cty_arrow (l1, ty1, cty1'), Cty_arrow (l2, ty2, cty2') when l1 = l2 -> + | Cty_arrow (l1, ty1, cty1'), Cty_arrow (l2, ty2, cty2') when Asttypes.same_arg_label l1 l2 -> begin try moregen true type_pairs env ty1 ty2 with Unify trace -> raise (Failure [CM_Parameter_mismatch (env, expand_trace env trace)]) end; @@ -3552,7 +3524,7 @@ let rec equal_clty trace type_pairs subst env cty1 cty2 = equal_clty true type_pairs subst env cty1 cty2 | _, Cty_constr (_, _, cty2) -> equal_clty true type_pairs subst env cty1 cty2 - | Cty_arrow (l1, ty1, cty1'), Cty_arrow (l2, ty2, cty2') when l1 = l2 -> + | Cty_arrow (l1, ty1, cty1'), Cty_arrow (l2, ty2, cty2') when Asttypes.same_arg_label l1 l2 -> begin try eqtype true type_pairs subst env ty1 ty2 with Unify trace -> raise (Failure [CM_Parameter_mismatch (env, expand_trace env trace)]) end; @@ -3707,7 +3679,10 @@ let warn = ref false (* whether double coercion might do better *) let pred_expand n = if n mod 2 = 0 && n > 0 then pred n else n let pred_enlarge n = if n mod 2 = 1 then pred n else n -type change = Unchanged | Equiv | Changed +type change = Unchanged | Equiv | Changed [@@immediate] + +let [@inline] max (c1:change) (c2 :change)= + (Obj.magic (Ext_pervasives.max_int (Obj.magic c1 : int) (Obj.magic c2 : int)) : change) let collect l = List.fold_left (fun c1 (_, c2) -> max c1 c2) Unchanged l let rec filter_visited = function @@ -3942,8 +3917,8 @@ let rec subtype_rec env trace t1 t2 cstrs = match (t1.desc, t2.desc) with (Tvar _, _) | (_, Tvar _) -> (trace, t1, t2, !univar_pairs)::cstrs - | (Tarrow(l1, t1, u1, _), Tarrow(l2, t2, u2, _)) when l1 = l2 - || !Clflags.classic && not (is_optional l1 || is_optional l2) -> + | (Tarrow(l1, t1, u1, _), Tarrow(l2, t2, u2, _)) when Asttypes.same_arg_label l1 l2 + -> let cstrs = subtype_rec env ((t2, t1)::trace) t2 t1 cstrs in subtype_rec env ((u1, u2)::trace) u1 u2 cstrs | (Ttuple tl1, Ttuple tl2) -> @@ -3990,6 +3965,11 @@ let rec subtype_rec env trace t1 t2 cstrs = with Exit -> (trace, t1, t2, !univar_pairs)::cstrs end + | Tvariant v, _ when + !Config.bs_only && + !variant_is_subtype env (row_repr v) t2 + -> + cstrs | (Tpoly (u1, []), Tpoly (u2, [])) -> subtype_rec env trace u1 u2 cstrs | (Tpoly (u1, tl1), Tpoly (u2, [])) -> @@ -4165,7 +4145,7 @@ let cyclic_abbrev env id ty = let ty = repr ty in match ty.desc with Tconstr (p, _tl, _abbrev) -> - p = Path.Pident id || List.memq ty seen || + (match p with Path.Pident p -> Ident.same p id | _ -> false) || List.memq ty seen || begin try check_cycle (ty :: seen) (expand_abbrev_opt env ty) with @@ -4254,7 +4234,7 @@ let rec normalize_type_rec env visited ty = row.row_fields in let fields = List.sort (fun (p,_) (q,_) -> compare p q) - (List.filter (fun (_,fi) -> fi <> Rabsent) fields) in + (Ext_list.filter fields (fun (_,fi) -> fi <> Rabsent)) in log_type ty; ty.desc <- Tvariant {row with row_fields = fields} | Tobject (fi, nm) -> diff --git a/analysis/vendor/compiler-libs-406/ctype.mli b/analysis/vendor/ml/ctype.mli similarity index 99% rename from analysis/vendor/compiler-libs-406/ctype.mli rename to analysis/vendor/ml/ctype.mli index 00daacd53..7b68649e4 100644 --- a/analysis/vendor/compiler-libs-406/ctype.mli +++ b/analysis/vendor/ml/ctype.mli @@ -101,8 +101,6 @@ val generalize_global: type_expr -> unit to !global_level *) val generalize_structure: type_expr -> unit (* Same, but variables are only lowered to !current_level *) -val generalize_spine: type_expr -> unit - (* Special function to generalize a method during inference *) val correct_levels: type_expr -> type_expr (* Returns a copy with decreasing levels *) val limited_generalize: type_expr -> type_expr -> unit @@ -290,3 +288,6 @@ val maybe_pointer_type : Env.t -> type_expr -> bool val package_subtype : (Env.t -> Path.t -> Longident.t list -> type_expr list -> Path.t -> Longident.t list -> type_expr list -> bool) ref + +val variant_is_subtype: + (Env.t -> Types.row_desc -> Types.type_expr -> bool) ref \ No newline at end of file diff --git a/analysis/vendor/compiler-libs-406/datarepr.ml b/analysis/vendor/ml/datarepr.ml similarity index 83% rename from analysis/vendor/compiler-libs-406/datarepr.ml rename to analysis/vendor/ml/datarepr.ml index bce6ff212..105462df0 100644 --- a/analysis/vendor/compiler-libs-406/datarepr.ml +++ b/analysis/vendor/ml/datarepr.ml @@ -96,6 +96,15 @@ let constructor_args priv cd_args cd_res path rep = [ newgenconstr path type_params ], Some tdecl +let internal_optional = "internal.optional" + +let optional_shape : Parsetree.attribute = + {txt = internal_optional ; loc = Location.none}, Parsetree.PStr [] + +let constructor_has_optional_shape ({cstr_attributes = attrs} : constructor_description) = + List.exists (fun (x,_) -> x.txt = internal_optional) attrs + + let constructor_descrs ty_path decl cstrs = let ty_res = newgenconstr ty_path decl.type_params in let num_consts = ref 0 and num_nonconsts = ref 0 and num_normal = ref 0 in @@ -104,6 +113,7 @@ let constructor_descrs ty_path decl cstrs = if cd_args = Cstr_tuple [] then incr num_consts else incr num_nonconsts; if cd_res = None then incr num_normal) cstrs; + let has_optional attrs = Ext_list.exists attrs (fun ({txt },_) -> txt = "res.optional") in let rec describe_constructors idx_const idx_nonconst = function [] -> [] | {cd_id; cd_args; cd_res; cd_loc; cd_attributes} :: rem -> @@ -122,11 +132,17 @@ let constructor_descrs ty_path decl cstrs = | _ -> (Cstr_block idx_nonconst, describe_constructors idx_const (idx_nonconst+1) rem) in let cstr_name = Ident.name cd_id in + let optional_labels = match cd_args with + | Cstr_tuple _ -> [] + | Cstr_record lbls -> + Ext_list.filter_map lbls (fun ({ld_id;ld_attributes; _}) -> + if has_optional ld_attributes then Some ld_id.name else None) + in let existentials, cstr_args, cstr_inlined = let representation = if decl.type_unboxed.unboxed then Record_unboxed true - else Record_inlined idx_nonconst + else Record_inlined {tag = idx_nonconst; name = cstr_name; num_nonconsts = !num_nonconsts; optional_labels} in constructor_args decl.type_private cd_args cd_res (Path.Pdot (ty_path, cstr_name, Path.nopos)) representation @@ -148,7 +164,27 @@ let constructor_descrs ty_path decl cstrs = cstr_inlined; } in (cd_id, cstr) :: descr_rem in - describe_constructors 0 0 cstrs + let result = describe_constructors 0 0 cstrs in + match result with + | ( + [ ({Ident.name = "None"} as a_id, ({cstr_args = []} as a_descr) ) ; + ({Ident.name = "Some"} as b_id, ({ cstr_args = [_]} as b_descr)) + ] | + [ ({Ident.name = "Some"} as a_id, ({cstr_args = [_]} as a_descr) ) ; + ({Ident.name = "None"} as b_id, ({ cstr_args = []} as b_descr)) + ] + ) + -> + [ + (a_id, {a_descr with + cstr_attributes = + optional_shape :: a_descr.cstr_attributes}); + (b_id, {b_descr with + cstr_attributes = + optional_shape :: b_descr.cstr_attributes + }) + ] + | _ -> result let extension_descr path_ext ext = let ty_res = @@ -213,11 +249,11 @@ let rec find_constr tag num_const num_nonconst = function [] -> raise Constr_not_found | {cd_args = Cstr_tuple []; _} as c :: rem -> - if tag = Cstr_constant num_const + if Types.equal_tag tag (Cstr_constant num_const) then c else find_constr tag (num_const + 1) num_nonconst rem | c :: rem -> - if tag = Cstr_block num_nonconst || tag = Cstr_unboxed + if Types.equal_tag tag (Cstr_block num_nonconst) || tag = Cstr_unboxed then c else find_constr tag num_const (num_nonconst + 1) rem diff --git a/analysis/vendor/compiler-libs-406/datarepr.mli b/analysis/vendor/ml/datarepr.mli similarity index 96% rename from analysis/vendor/compiler-libs-406/datarepr.mli rename to analysis/vendor/ml/datarepr.mli index 30dc1f1f6..f6bc50f08 100644 --- a/analysis/vendor/compiler-libs-406/datarepr.mli +++ b/analysis/vendor/ml/datarepr.mli @@ -18,6 +18,9 @@ open Types +val constructor_has_optional_shape: + Types.constructor_description -> bool + val extension_descr: Path.t -> extension_constructor -> constructor_description diff --git a/analysis/vendor/compiler-libs-406/delayed_checks.ml b/analysis/vendor/ml/delayed_checks.ml similarity index 100% rename from analysis/vendor/compiler-libs-406/delayed_checks.ml rename to analysis/vendor/ml/delayed_checks.ml diff --git a/analysis/vendor/compiler-libs-406/delayed_checks.mli b/analysis/vendor/ml/delayed_checks.mli similarity index 100% rename from analysis/vendor/compiler-libs-406/delayed_checks.mli rename to analysis/vendor/ml/delayed_checks.mli diff --git a/analysis/vendor/ml/depend.ml b/analysis/vendor/ml/depend.ml new file mode 100644 index 000000000..5a4a336a1 --- /dev/null +++ b/analysis/vendor/ml/depend.ml @@ -0,0 +1,501 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +open Asttypes +open Location +open Longident +open Parsetree + +let pp_deps = ref [] + +module StringSet = Set.Make(struct type t = string let compare = compare end) +module StringMap = Map.Make(String) + +(* Module resolution map *) +(* Node (set of imports for this path, map for submodules) *) +type map_tree = Node of StringSet.t * bound_map +and bound_map = map_tree StringMap.t +let bound = Node (StringSet.empty, StringMap.empty) + +(*let get_free (Node (s, _m)) = s*) +let get_map (Node (_s, m)) = m +let make_leaf s = Node (StringSet.singleton s, StringMap.empty) +let make_node m = Node (StringSet.empty, m) +let rec weaken_map s (Node(s0,m0)) = + Node (StringSet.union s s0, StringMap.map (weaken_map s) m0) +let rec collect_free (Node (s, m)) = + StringMap.fold (fun _ n -> StringSet.union (collect_free n)) m s + +(* Returns the imports required to access the structure at path p *) +(* Only raises Not_found if the head of p is not in the toplevel map *) +let rec lookup_free p m = + match p with + [] -> raise Not_found + | s::p -> + let Node (f, m') = StringMap.find s m in + try lookup_free p m' with Not_found -> f + +(* Returns the node corresponding to the structure at path p *) +let rec lookup_map lid m = + match lid with + Lident s -> StringMap.find s m + | Ldot (l, s) -> StringMap.find s (get_map (lookup_map l m)) + | Lapply _ -> raise Not_found + +(* Collect free module identifiers in the a.s.t. *) + +let free_structure_names = ref StringSet.empty + +let add_names s = + free_structure_names := StringSet.union s !free_structure_names + +let rec add_path bv ?(p=[]) = function + | Lident s -> + let free = + try lookup_free (s::p) bv with Not_found -> StringSet.singleton s + in + (*StringSet.iter (fun s -> Printf.eprintf "%s " s) free; + prerr_endline "";*) + add_names free + | Ldot(l, s) -> add_path bv ~p:(s::p) l + | Lapply(l1, l2) -> add_path bv l1; add_path bv l2 + +let open_module bv lid = + match lookup_map lid bv with + | Node (s, m) -> + add_names s; + StringMap.fold StringMap.add m bv + | exception Not_found -> + add_path bv lid; bv + +let add_parent bv lid = + match lid.txt with + Ldot(l, _s) -> add_path bv l + | _ -> () + +let add = add_parent + +let addmodule bv lid = add_path bv lid.txt + +let handle_extension ext = + match (fst ext).txt with + | "error" | "ocaml.error" -> + raise (Location.Error + (Builtin_attributes.error_of_extension ext)) + | _ -> + () + +let rec add_type bv ty = + match ty.ptyp_desc with + Ptyp_any -> () + | Ptyp_var _ -> () + | Ptyp_arrow(_, t1, t2) -> add_type bv t1; add_type bv t2 + | Ptyp_tuple tl -> List.iter (add_type bv) tl + | Ptyp_constr(c, tl) -> add bv c; List.iter (add_type bv) tl + | Ptyp_object (fl, _) -> + List.iter + (function Otag (_, _, t) -> add_type bv t + | Oinherit t -> add_type bv t) fl + | Ptyp_class(c, tl) -> add bv c; List.iter (add_type bv) tl + | Ptyp_alias(t, _) -> add_type bv t + | Ptyp_variant(fl, _, _) -> + List.iter + (function Rtag(_,_,_,stl) -> List.iter (add_type bv) stl + | Rinherit sty -> add_type bv sty) + fl + | Ptyp_poly(_, t) -> add_type bv t + | Ptyp_package pt -> add_package_type bv pt + | Ptyp_extension e -> handle_extension e + +and add_package_type bv (lid, l) = + add bv lid; + List.iter (add_type bv) (List.map (fun (_, e) -> e) l) + +let add_opt add_fn bv = function + None -> () + | Some x -> add_fn bv x + +let add_constructor_arguments bv = function + | Pcstr_tuple l -> List.iter (add_type bv) l + | Pcstr_record l -> List.iter (fun l -> add_type bv l.pld_type) l + +let add_constructor_decl bv pcd = + add_constructor_arguments bv pcd.pcd_args; + Misc.may (add_type bv) pcd.pcd_res + +let add_type_declaration bv td = + List.iter + (fun (ty1, ty2, _) -> add_type bv ty1; add_type bv ty2) + td.ptype_cstrs; + add_opt add_type bv td.ptype_manifest; + let add_tkind = function + Ptype_abstract -> () + | Ptype_variant cstrs -> + List.iter (add_constructor_decl bv) cstrs + | Ptype_record lbls -> + List.iter (fun pld -> add_type bv pld.pld_type) lbls + | Ptype_open -> () in + add_tkind td.ptype_kind + +let add_extension_constructor bv ext = + match ext.pext_kind with + Pext_decl(args, rty) -> + add_constructor_arguments bv args; + Misc.may (add_type bv) rty + | Pext_rebind lid -> add bv lid + +let add_type_extension bv te = + add bv te.ptyext_path; + List.iter (add_extension_constructor bv) te.ptyext_constructors + +let rec add_class_type bv cty = + match cty.pcty_desc with + Pcty_constr(l, tyl) -> + add bv l; List.iter (add_type bv) tyl + | Pcty_signature { pcsig_self = ty; pcsig_fields = fieldl } -> + add_type bv ty; + List.iter (add_class_type_field bv) fieldl + | Pcty_arrow(_, ty1, cty2) -> + add_type bv ty1; add_class_type bv cty2 + | Pcty_extension e -> handle_extension e + | Pcty_open (_ovf, m, e) -> + let bv = open_module bv m.txt in add_class_type bv e + +and add_class_type_field bv pctf = + match pctf.pctf_desc with + Pctf_inherit cty -> add_class_type bv cty + | Pctf_val(_, _, _, ty) -> add_type bv ty + | Pctf_method(_, _, _, ty) -> add_type bv ty + | Pctf_constraint(ty1, ty2) -> add_type bv ty1; add_type bv ty2 + | Pctf_attribute _ -> () + | Pctf_extension e -> handle_extension e + +let add_class_description bv infos = + add_class_type bv infos.pci_expr + +let add_class_type_declaration = add_class_description + +let pattern_bv = ref StringMap.empty + +let rec add_pattern bv pat = + match pat.ppat_desc with + Ppat_any -> () + | Ppat_var _ -> () + | Ppat_alias(p, _) -> add_pattern bv p + | Ppat_interval _ + | Ppat_constant _ -> () + | Ppat_tuple pl -> List.iter (add_pattern bv) pl + | Ppat_construct(c, op) -> add bv c; add_opt add_pattern bv op + | Ppat_record(pl, _) -> + List.iter (fun (lbl, p) -> add bv lbl; add_pattern bv p) pl + | Ppat_array pl -> List.iter (add_pattern bv) pl + | Ppat_or(p1, p2) -> add_pattern bv p1; add_pattern bv p2 + | Ppat_constraint(p, ty) -> add_pattern bv p; add_type bv ty + | Ppat_variant(_, op) -> add_opt add_pattern bv op + | Ppat_type li -> add bv li + | Ppat_lazy p -> add_pattern bv p + | Ppat_unpack id -> pattern_bv := StringMap.add id.txt bound !pattern_bv + | Ppat_open ( m, p) -> let bv = open_module bv m.txt in add_pattern bv p + | Ppat_exception p -> add_pattern bv p + | Ppat_extension e -> handle_extension e + +let add_pattern bv pat = + pattern_bv := bv; + add_pattern bv pat; + !pattern_bv + +let rec add_expr bv exp = + match exp.pexp_desc with + Pexp_ident l -> add bv l + | Pexp_constant _ -> () + | Pexp_let(rf, pel, e) -> + let bv = add_bindings rf bv pel in add_expr bv e + | Pexp_fun (_, opte, p, e) -> + add_opt add_expr bv opte; add_expr (add_pattern bv p) e + | Pexp_function pel -> + add_cases bv pel + | Pexp_apply(e, el) -> + add_expr bv e; List.iter (fun (_,e) -> add_expr bv e) el + | Pexp_match(e, pel) -> add_expr bv e; add_cases bv pel + | Pexp_try(e, pel) -> add_expr bv e; add_cases bv pel + | Pexp_tuple el -> List.iter (add_expr bv) el + | Pexp_construct(c, opte) -> add bv c; add_opt add_expr bv opte + | Pexp_variant(_, opte) -> add_opt add_expr bv opte + | Pexp_record(lblel, opte) -> + List.iter (fun (lbl, e) -> add bv lbl; add_expr bv e) lblel; + add_opt add_expr bv opte + | Pexp_field(e, fld) -> add_expr bv e; add bv fld + | Pexp_setfield(e1, fld, e2) -> add_expr bv e1; add bv fld; add_expr bv e2 + | Pexp_array el -> List.iter (add_expr bv) el + | Pexp_ifthenelse(e1, e2, opte3) -> + add_expr bv e1; add_expr bv e2; add_opt add_expr bv opte3 + | Pexp_sequence(e1, e2) -> add_expr bv e1; add_expr bv e2 + | Pexp_while(e1, e2) -> add_expr bv e1; add_expr bv e2 + | Pexp_for( _, e1, e2, _, e3) -> + add_expr bv e1; add_expr bv e2; add_expr bv e3 + | Pexp_coerce(e1, oty2, ty3) -> + add_expr bv e1; + add_opt add_type bv oty2; + add_type bv ty3 + | Pexp_constraint(e1, ty2) -> + add_expr bv e1; + add_type bv ty2 + | Pexp_send(e, _m) -> add_expr bv e + | Pexp_new li -> add bv li + | Pexp_setinstvar(_v, e) -> add_expr bv e + | Pexp_override sel -> List.iter (fun (_s, e) -> add_expr bv e) sel + | Pexp_letmodule(id, m, e) -> + let b = add_module_binding bv m in + add_expr (StringMap.add id.txt b bv) e + | Pexp_letexception(_, e) -> add_expr bv e + | Pexp_assert (e) -> add_expr bv e + | Pexp_lazy (e) -> add_expr bv e + | Pexp_poly (e, t) -> add_expr bv e; add_opt add_type bv t + | Pexp_object { pcstr_self = pat; pcstr_fields = fieldl } -> + let bv = add_pattern bv pat in List.iter (add_class_field bv) fieldl + | Pexp_newtype (_, e) -> add_expr bv e + | Pexp_pack m -> add_module bv m + | Pexp_open (_ovf, m, e) -> + let bv = open_module bv m.txt in add_expr bv e + | Pexp_extension (({ txt = ("ocaml.extension_constructor"| + "extension_constructor"); _ }, + PStr [item]) as e) -> + begin match item.pstr_desc with + | Pstr_eval ({ pexp_desc = Pexp_construct (c, None) }, _) -> add bv c + | _ -> handle_extension e + end + | Pexp_extension e -> handle_extension e + | Pexp_unreachable -> () + +and add_cases bv cases = + List.iter (add_case bv) cases + +and add_case bv {pc_lhs; pc_guard; pc_rhs} = + let bv = add_pattern bv pc_lhs in + add_opt add_expr bv pc_guard; + add_expr bv pc_rhs + +and add_bindings recf bv pel = + let bv' = List.fold_left (fun bv x -> add_pattern bv x.pvb_pat) bv pel in + let bv = if recf = Recursive then bv' else bv in + List.iter (fun x -> add_expr bv x.pvb_expr) pel; + bv' + +and add_modtype bv mty = + match mty.pmty_desc with + Pmty_ident l -> add bv l + | Pmty_alias l -> addmodule bv l + | Pmty_signature s -> add_signature bv s + | Pmty_functor(id, mty1, mty2) -> + Misc.may (add_modtype bv) mty1; + add_modtype (StringMap.add id.txt bound bv) mty2 + | Pmty_with(mty, cstrl) -> + add_modtype bv mty; + List.iter + (function + | Pwith_type (_, td) -> add_type_declaration bv td + | Pwith_module (_, lid) -> addmodule bv lid + | Pwith_typesubst (_, td) -> add_type_declaration bv td + | Pwith_modsubst (_, lid) -> addmodule bv lid + ) + cstrl + | Pmty_typeof m -> add_module bv m + | Pmty_extension e -> handle_extension e + +and add_module_alias bv l = + try + add_parent bv l; + lookup_map l.txt bv + with Not_found -> + match l.txt with + Lident s -> make_leaf s + | _ -> addmodule bv l; bound (* cannot delay *) + +and add_modtype_binding bv mty = + if not !Clflags.transparent_modules then add_modtype bv mty; + match mty.pmty_desc with + Pmty_alias l -> + add_module_alias bv l + | Pmty_signature s -> + make_node (add_signature_binding bv s) + | Pmty_typeof modl -> + add_module_binding bv modl + | _ -> + if !Clflags.transparent_modules then add_modtype bv mty; bound + +and add_signature bv sg = + ignore (add_signature_binding bv sg) + +and add_signature_binding bv sg = + snd (List.fold_left add_sig_item (bv, StringMap.empty) sg) + +and add_sig_item (bv, m) item = + match item.psig_desc with + Psig_value vd -> + add_type bv vd.pval_type; (bv, m) + | Psig_type (_, dcls) -> + List.iter (add_type_declaration bv) dcls; (bv, m) + | Psig_typext te -> + add_type_extension bv te; (bv, m) + | Psig_exception pext -> + add_extension_constructor bv pext; (bv, m) + | Psig_module pmd -> + let m' = add_modtype_binding bv pmd.pmd_type in + let add = StringMap.add pmd.pmd_name.txt m' in + (add bv, add m) + | Psig_recmodule decls -> + let add = + List.fold_right (fun pmd -> StringMap.add pmd.pmd_name.txt bound) + decls + in + let bv' = add bv and m' = add m in + List.iter (fun pmd -> add_modtype bv' pmd.pmd_type) decls; + (bv', m') + | Psig_modtype x -> + begin match x.pmtd_type with + None -> () + | Some mty -> add_modtype bv mty + end; + (bv, m) + | Psig_open od -> + (open_module bv od.popen_lid.txt, m) + | Psig_include incl -> + let Node (s, m') = add_modtype_binding bv incl.pincl_mod in + add_names s; + let add = StringMap.fold StringMap.add m' in + (add bv, add m) + | Psig_class () -> + (bv, m) + | Psig_class_type cdtl -> + List.iter (add_class_type_declaration bv) cdtl; (bv, m) + | Psig_attribute _ -> (bv, m) + | Psig_extension (e, _) -> + handle_extension e; + (bv, m) + +and add_module_binding bv modl = + if not !Clflags.transparent_modules then add_module bv modl; + match modl.pmod_desc with + Pmod_ident l -> + begin try + add_parent bv l; + lookup_map l.txt bv + with Not_found -> + match l.txt with + Lident s -> make_leaf s + | _ -> addmodule bv l; bound + end + | Pmod_structure s -> + make_node (snd (add_structure_binding bv s)) + | _ -> + if !Clflags.transparent_modules then add_module bv modl; bound + +and add_module bv modl = + match modl.pmod_desc with + Pmod_ident l -> addmodule bv l + | Pmod_structure s -> ignore (add_structure bv s) + | Pmod_functor(id, mty, modl) -> + Misc.may (add_modtype bv) mty; + add_module (StringMap.add id.txt bound bv) modl + | Pmod_apply(mod1, mod2) -> + add_module bv mod1; add_module bv mod2 + | Pmod_constraint(modl, mty) -> + add_module bv modl; add_modtype bv mty + | Pmod_unpack(e) -> + add_expr bv e + | Pmod_extension e -> + handle_extension e + +and add_structure bv item_list = + let (bv, m) = add_structure_binding bv item_list in + add_names (collect_free (make_node m)); + bv + +and add_structure_binding bv item_list = + List.fold_left add_struct_item (bv, StringMap.empty) item_list + +and add_struct_item (bv, m) item : _ StringMap.t * _ StringMap.t = + match item.pstr_desc with + Pstr_eval (e, _attrs) -> + add_expr bv e; (bv, m) + | Pstr_value(rf, pel) -> + let bv = add_bindings rf bv pel in (bv, m) + | Pstr_primitive vd -> + add_type bv vd.pval_type; (bv, m) + | Pstr_type (_, dcls) -> + List.iter (add_type_declaration bv) dcls; (bv, m) + | Pstr_typext te -> + add_type_extension bv te; + (bv, m) + | Pstr_exception pext -> + add_extension_constructor bv pext; (bv, m) + | Pstr_module x -> + let b = add_module_binding bv x.pmb_expr in + let add = StringMap.add x.pmb_name.txt b in + (add bv, add m) + | Pstr_recmodule bindings -> + let add = + List.fold_right (fun x -> StringMap.add x.pmb_name.txt bound) bindings + in + let bv' = add bv and m = add m in + List.iter + (fun x -> add_module bv' x.pmb_expr) + bindings; + (bv', m) + | Pstr_modtype x -> + begin match x.pmtd_type with + None -> () + | Some mty -> add_modtype bv mty + end; + (bv, m) + | Pstr_open od -> + (open_module bv od.popen_lid.txt, m) + | Pstr_class () -> + (bv,m) + | Pstr_class_type cdtl -> + List.iter (add_class_type_declaration bv) cdtl; (bv, m) + | Pstr_include incl -> + let Node (s, m') = add_module_binding bv incl.pincl_mod in + add_names s; + let add = StringMap.fold StringMap.add m' in + (add bv, add m) + | Pstr_attribute _ -> (bv, m) + | Pstr_extension (e, _) -> + handle_extension e; + (bv, m) + + +and add_implementation bv l = + if !Clflags.transparent_modules then + ignore (add_structure_binding bv l) + else ignore (add_structure bv l) + +and add_implementation_binding bv l = + snd (add_structure_binding bv l) + + + +and add_class_field bv pcf = + match pcf.pcf_desc with + Pcf_inherit() -> () + | Pcf_val(_, _, Cfk_concrete (_, e)) + | Pcf_method(_, _, Cfk_concrete (_, e)) -> add_expr bv e + | Pcf_val(_, _, Cfk_virtual ty) + | Pcf_method(_, _, Cfk_virtual ty) -> add_type bv ty + | Pcf_constraint(ty1, ty2) -> add_type bv ty1; add_type bv ty2 + | Pcf_initializer e -> add_expr bv e + | Pcf_attribute _ -> () + | Pcf_extension e -> handle_extension e + diff --git a/analysis/vendor/ml/depend.mli b/analysis/vendor/ml/depend.mli new file mode 100644 index 000000000..23ad60dd1 --- /dev/null +++ b/analysis/vendor/ml/depend.mli @@ -0,0 +1,41 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +(** Module dependencies. *) + +module StringSet : Set.S with type elt = string +module StringMap : Map.S with type key = string + +type map_tree = Node of StringSet.t * bound_map +and bound_map = map_tree StringMap.t +val make_leaf : string -> map_tree +val make_node : bound_map -> map_tree +val weaken_map : StringSet.t -> map_tree -> map_tree + +val free_structure_names : StringSet.t ref + +(* dependencies found by preprocessing tools (plugins) *) +val pp_deps : string list ref + +val open_module : bound_map -> Longident.t -> bound_map + + + +val add_signature : bound_map -> Parsetree.signature -> unit + +val add_implementation : bound_map -> Parsetree.structure -> unit + +val add_implementation_binding : bound_map -> Parsetree.structure -> bound_map +val add_signature_binding : bound_map -> Parsetree.signature -> bound_map diff --git a/analysis/vendor/compiler-libs-406/docstrings.ml b/analysis/vendor/ml/docstrings.ml similarity index 99% rename from analysis/vendor/compiler-libs-406/docstrings.ml rename to analysis/vendor/ml/docstrings.ml index 5de6d4d4f..85c58ad8d 100644 --- a/analysis/vendor/compiler-libs-406/docstrings.ml +++ b/analysis/vendor/ml/docstrings.ml @@ -147,7 +147,7 @@ let text_attr ds = (text_loc, PStr [item]) let add_text_attrs dsl attrs = - let fdsl = List.filter (function {ds_body=""} -> false| _ ->true) dsl in + let fdsl = Ext_list.filter dsl (function {ds_body=""} -> false| _ ->true) in (List.map text_attr fdsl) @ attrs (* Find the first non-info docstring in a list, attach it and return it *) diff --git a/analysis/vendor/compiler-libs-406/docstrings.mli b/analysis/vendor/ml/docstrings.mli similarity index 100% rename from analysis/vendor/compiler-libs-406/docstrings.mli rename to analysis/vendor/ml/docstrings.mli diff --git a/analysis/vendor/ml/dune b/analysis/vendor/ml/dune new file mode 100644 index 000000000..2fcac2099 --- /dev/null +++ b/analysis/vendor/ml/dune @@ -0,0 +1,11 @@ +(library + (name ml) + (preprocess + (action + (run %{bin:cppo} %{env:CPPO_FLAGS=} %{input-file}))) + (flags + (:standard -w +a-4-42-40-41-44-45-9-48-67-70) + (-open Ext)) + (libraries ext)) + +(ocamllex lexer) diff --git a/analysis/vendor/compiler-libs-406/env.ml b/analysis/vendor/ml/env.ml similarity index 94% rename from analysis/vendor/compiler-libs-406/env.ml rename to analysis/vendor/ml/env.ml index 4d51aa9b6..99119bc1a 100644 --- a/analysis/vendor/compiler-libs-406/env.ml +++ b/analysis/vendor/ml/env.ml @@ -24,7 +24,7 @@ open Path open Types open Btype -let add_delayed_check_forward = ref (fun _ -> assert false) + let value_declarations : ((string * Location.t), (unit -> unit)) Hashtbl.t = Hashtbl.create 16 @@ -61,7 +61,6 @@ type error = | Illegal_renaming of string * string * string | Inconsistent_import of string * string * string | Need_recursive_types of string * string - | Depend_on_unsafe_string_unit of string * string | Missing_module of Location.t * Path.t * Path.t | Illegal_value_name of Location.t * string @@ -159,7 +158,7 @@ type summary = | Env_extension of summary * Ident.t * extension_constructor | Env_module of summary * Ident.t * module_declaration | Env_modtype of summary * Ident.t * modtype_declaration - | Env_class of summary * Ident.t * class_declaration + | Env_class of unit | Env_cltype of summary * Ident.t * class_type_declaration | Env_open of summary * Path.t | Env_functor_arg of summary * Ident.t @@ -265,12 +264,11 @@ module TycompTbl = let diff_keys is_local tbl1 tbl2 = let keys2 = local_keys tbl2 [] in - List.filter + Ext_list.filter keys2 (fun id -> is_local (find_same id tbl2) && try ignore (find_same id tbl1); false - with Not_found -> true) - keys2 + with Not_found -> true) end @@ -425,11 +423,10 @@ module IdTbl = let diff_keys tbl1 tbl2 = let keys2 = local_keys tbl2 [] in - List.filter + Ext_list.filter keys2 (fun id -> try ignore (find_same id tbl1); false with Not_found -> true) - keys2 end @@ -481,7 +478,7 @@ and structure_components = { (Subst.t * module_declaration, module_declaration) EnvLazy.t comp_tbl; mutable comp_modtypes: modtype_declaration comp_tbl; mutable comp_components: module_components comp_tbl; - mutable comp_classes: class_declaration comp_tbl; + comp_classes: class_declaration comp_tbl; (* warning -69*) mutable comp_cltypes: class_type_declaration comp_tbl; } @@ -638,7 +635,7 @@ let current_unit = ref "" (* Persistent structure descriptions *) -type pers_struct = +type [@warning "-69"] pers_struct = { ps_name: string; ps_sig: signature Lazy.t; ps_comps: module_components; @@ -661,15 +658,11 @@ let imported_units = ref StringSet.empty let add_import s = imported_units := StringSet.add s !imported_units -let imported_opaque_units = ref StringSet.empty - -let add_imported_opaque s = - imported_opaque_units := StringSet.add s !imported_opaque_units let clear_imports () = Consistbl.clear crc_units; - imported_units := StringSet.empty; - imported_opaque_units := StringSet.empty + imported_units := StringSet.empty + let check_consistency ps = try @@ -689,13 +682,6 @@ let check_consistency ps = let save_pers_struct crc ps = let modname = ps.ps_name in Hashtbl.add persistent_structures modname (Some ps); - List.iter - (function - | Rectypes -> () - | Deprecated _ -> () - | Unsafe_string -> () - | Opaque -> add_imported_opaque modname) - ps.ps_flags; Consistbl.set crc_units modname crc ps.ps_filename; add_import modname @@ -717,7 +703,7 @@ let acknowledge_pers_struct check modname let crcs = cmi.cmi_crcs in let flags = cmi.cmi_flags in let deprecated = - List.fold_left (fun acc -> function Deprecated s -> Some s | _ -> acc) None + List.fold_left (fun _ -> function Deprecated s -> Some s ) None flags in let comps = @@ -735,18 +721,6 @@ let acknowledge_pers_struct check modname } in if ps.ps_name <> modname then error (Illegal_renaming(modname, ps.ps_name, filename)); - - List.iter - (function - | Rectypes -> - if not !Clflags.recursive_types then - error (Need_recursive_types(ps.ps_name, !current_unit)) - | Unsafe_string -> - if Config.safe_string then - error (Depend_on_unsafe_string_unit (ps.ps_name, !current_unit)); - | Deprecated _ -> () - | Opaque -> add_imported_opaque modname) - ps.ps_flags; if check then check_consistency ps; Hashtbl.add persistent_structures modname (Some ps); ps @@ -801,9 +775,6 @@ let check_pers_struct name = Format.sprintf "%s uses recursive types" name - | Depend_on_unsafe_string_unit (name, _) -> - Printf.sprintf "%s uses -unsafe-string" - name | Missing_module _ -> assert false | Illegal_value_name _ -> assert false in @@ -823,7 +794,7 @@ let check_pers_struct name = deterministic. *) add_import name; if (Warnings.is_active (Warnings.No_cmi_file("", None))) then - !add_delayed_check_forward + Delayed_checks.add_delayed_check (fun () -> check_pers_struct name) end @@ -949,10 +920,11 @@ let find_type_full path env = | Functor_comps _ -> assert false in let exts = - List.filter - (function {cstr_tag=Cstr_extension _} -> true | _ -> false) + Ext_list.filter (try Tbl.find_str s comps.comp_constrs - with Not_found -> assert false) + with Not_found -> assert false) + (function {cstr_tag=Cstr_extension _} -> true | _ -> false) + in match exts with | [cstr] -> type_of_cstr path cstr @@ -1005,13 +977,7 @@ let find_module ~alias path env = raise Not_found end -let required_globals = ref [] -let reset_required_globals () = required_globals := [] -let get_required_globals () = !required_globals -let add_required_global id = - if Ident.global id && not !Clflags.transparent_modules - && not (List.exists (Ident.same id) !required_globals) - then required_globals := id :: !required_globals + let rec normalize_path lax env path = let path = @@ -1024,12 +990,7 @@ let rec normalize_path lax env path = in try match find_module ~alias:true path env with {md_type=Mty_alias(_, path1)} -> - let path' = normalize_path lax env path1 in - if lax || !Clflags.transparent_modules then path' else - let id = Path.head path in - if Ident.global id && not (Ident.same id (Path.head path')) - then add_required_global id; - path' + normalize_path lax env path1 | _ -> path with Not_found when lax || (match path with Pident id -> not (Ident.persistent id) | _ -> true) -> @@ -1167,6 +1128,9 @@ and lookup_module ~load ?loc lid env : Path.t = | Mty_ident (Path.Pident id) when Ident.name id = "#recmod#" -> (* see #5965 *) raise Recmodule + | Mty_alias (_, Path.Pident id) -> + if !Config.bs_only && not !Clflags.transparent_modules && Ident.persistent id then + find_pers_struct (Ident.name id) |> ignore | _ -> () end; report_deprecated ?loc p @@ -1234,7 +1198,7 @@ let lookup_all_simple proj1 proj2 shadow ?loc lid env = | [] -> [] | ((x, f) :: xs) -> (x, f) :: - (do_shadow (List.filter (fun (y, _) -> not (shadow x y)) xs)) + (do_shadow (Ext_list.filter xs (fun (y, _) -> not (shadow x y)))) in do_shadow xl | Ldot(l, s) -> @@ -1623,12 +1587,8 @@ let rec prefix_idents root pos sub = function prefix_idents root pos (Subst.add_modtype id (Mty_ident p) sub) rem in (p::pl, final_sub) - | Sig_class(id, _, _) :: rem -> - (* pretend this is a type, cf. PR#6650 *) - let p = Pdot(root, Ident.name id, pos) in - let (pl, final_sub) = - prefix_idents root (pos + 1) (Subst.add_type id p sub) rem in - (p::pl, final_sub) + | Sig_class _ :: _ -> + assert false | Sig_class_type(id, _, _) :: rem -> let p = Pdot(root, Ident.name id, nopos) in let (pl, final_sub) = @@ -1738,11 +1698,7 @@ and components_of_module_maker (env, sub, path, mty) = c.comp_modtypes <- Tbl.add (Ident.name id) (decl', nopos) c.comp_modtypes; env := store_modtype id decl !env - | Sig_class(id, decl, _) -> - let decl' = Subst.class_declaration sub decl in - c.comp_classes <- - Tbl.add (Ident.name id) (decl', !pos) c.comp_classes; - incr pos + | Sig_class () -> assert false | Sig_class_type(id, decl, _) -> let decl' = Subst.cltype_declaration sub decl in c.comp_cltypes <- @@ -1772,7 +1728,7 @@ and check_usage loc id warn tbl = Hashtbl.add tbl key (fun () -> used := true); if not (name = "" || name.[0] = '_' || name.[0] = '#') then - !add_delayed_check_forward + Delayed_checks.add_delayed_check (fun () -> if not !used then Location.prerr_warning loc (warn name)) end; @@ -1780,8 +1736,8 @@ and check_value_name name loc = (* Note: we could also check here general validity of the identifier, to protect against bad identifiers forged by -pp or -ppx preprocessors. *) - - if String.length name > 0 && (name.[0] = '#') then + if name = "|." then raise (Error(Illegal_value_name(loc, name))) + else if String.length name > 0 && (name.[0] = '#') then for i = 1 to String.length name - 1 do if name.[i] = '#' then raise (Error(Illegal_value_name(loc, name))) @@ -1816,7 +1772,7 @@ and store_type ~check id info env = let used = constructor_usages () in Hashtbl.add used_constructors k (add_constructor_usage used); if not (ty = "" || ty.[0] = '_') - then !add_delayed_check_forward + then Delayed_checks.add_delayed_check (fun () -> if not (is_in_signature env) && not used.cu_positive then Location.prerr_warning loc @@ -1863,7 +1819,7 @@ and store_extension ~check id ext env = if not (Hashtbl.mem used_constructors k) then begin let used = constructor_usages () in Hashtbl.add used_constructors k (add_constructor_usage used); - !add_delayed_check_forward + Delayed_checks.add_delayed_check (fun () -> if not (is_in_signature env) && not used.cu_positive then Location.prerr_warning loc @@ -1900,10 +1856,6 @@ and store_modtype id info env = modtypes = IdTbl.add id info env.modtypes; summary = Env_modtype(env.summary, id, info) } -and store_class id desc env = - { env with - classes = IdTbl.add id desc env.classes; - summary = Env_class(env.summary, id, desc) } and store_cltype id desc env = { env with @@ -1955,8 +1907,7 @@ and add_module_declaration ?(arg=false) ~check id md env = and add_modtype id info env = store_modtype id info env -and add_class id ty env = - store_class id ty env + and add_cltype id ty env = store_cltype id ty env @@ -1990,7 +1941,7 @@ and enter_module_declaration ?arg id md env = (* let (id, env) = enter store_module name md env in (id, add_functor_arg ?arg id env) *) and enter_modtype = enter store_modtype -and enter_class = enter store_class + and enter_cltype = enter store_cltype let enter_module ?arg s mty env = @@ -2006,7 +1957,7 @@ let add_item comp env = | Sig_typext(id, ext, _) -> add_extension ~check:false id ext env | Sig_module(id, md, _) -> add_module_declaration ~check:false id md env | Sig_modtype(id, decl) -> add_modtype id decl env - | Sig_class(id, decl, _) -> add_class id decl env + | Sig_class() -> env | Sig_class_type(id, decl, _) -> add_cltype id decl env let rec add_signature sg env = @@ -2088,7 +2039,7 @@ let open_signature || Warnings.is_active (Warnings.Open_shadow_label_constructor ("",""))) then begin let used = used_slot in - !add_delayed_check_forward + Delayed_checks.add_delayed_check (fun () -> if not !used then begin used := true; @@ -2138,27 +2089,25 @@ let crc_of_unit name = (* Return the list of imported interfaces with their CRCs *) let imports () = - Consistbl.extract (StringSet.elements !imported_units) crc_units - -(* Returns true if [s] is an opaque imported module *) -let is_imported_opaque s = - StringSet.mem s !imported_opaque_units + let dont_record_crc_unit = !Clflags.dont_record_crc_unit in + match dont_record_crc_unit with + | None -> Consistbl.extract (StringSet.elements !imported_units) crc_units + | Some x -> + Consistbl.extract + (StringSet.fold + (fun m acc -> if m = x then acc else m::acc) + !imported_units []) crc_units (* Save a signature to a file *) -let save_signature_with_imports ~deprecated sg modname filename imports = +let save_signature_with_imports ?check_exists ~deprecated sg modname filename imports = (*prerr_endline filename; List.iter (fun (name, crc) -> prerr_endline name) imports;*) Btype.cleanup_abbrev (); Subst.reset_for_saving (); let sg = Subst.signature (Subst.for_saving Subst.identity) sg in let flags = - List.concat [ - if !Clflags.recursive_types then [Cmi_format.Rectypes] else []; - if !Clflags.opaque then [Cmi_format.Opaque] else []; - (if !Clflags.unsafe_string then [Cmi_format.Unsafe_string] else []); - (match deprecated with Some s -> [Deprecated s] | None -> []); - ] + (match deprecated with Some s -> [Deprecated s] | None -> []) in try let cmi = { @@ -2168,9 +2117,7 @@ let save_signature_with_imports ~deprecated sg modname filename imports = cmi_flags = flags; } in let crc = - output_to_file_via_temporary (* see MPR#7472, MPR#4991 *) - ~mode: [Open_binary] filename - (fun temp_filename oc -> output_cmi temp_filename oc cmi) in + create_cmi ?check_exists filename cmi in (* Enter signature in persistent table so that imported_unit() will also return its crc *) let comps = @@ -2191,8 +2138,8 @@ let save_signature_with_imports ~deprecated sg modname filename imports = remove_file filename; raise exn -let save_signature ~deprecated sg modname filename = - save_signature_with_imports ~deprecated sg modname filename (imports()) +let save_signature ?check_exists ~deprecated sg modname filename = + save_signature_with_imports ?check_exists ~deprecated sg modname filename (imports()) (* Folding on environments *) @@ -2286,7 +2233,7 @@ and fold_cltypes f = (* Make the initial environment *) -let (initial_safe_string, initial_unsafe_string) = +let initial_safe_string = Predef.build_initial_env (add_type ~check:false) (add_extension ~check:false) @@ -2342,11 +2289,6 @@ let report_error ppf = function fprintf ppf "@[Unit %s imports from %s, which uses recursive types.@ %s@]" export import "The compilation flag -rectypes is required" - | Depend_on_unsafe_string_unit(import, export) -> - fprintf ppf - "@[Unit %s imports from %s, compiled with -unsafe-string.@ %s@]" - export import "This compiler has been configured in strict \ - safe-string mode (-force-safe-string)" | Missing_module(_, path1, path2) -> fprintf ppf "@[@["; if Path.same path1 path2 then diff --git a/analysis/vendor/compiler-libs-406/env.mli b/analysis/vendor/ml/env.mli similarity index 95% rename from analysis/vendor/compiler-libs-406/env.mli rename to analysis/vendor/ml/env.mli index f96c76b7c..dfa1027de 100644 --- a/analysis/vendor/compiler-libs-406/env.mli +++ b/analysis/vendor/ml/env.mli @@ -27,7 +27,7 @@ type summary = | Env_extension of summary * Ident.t * extension_constructor | Env_module of summary * Ident.t * module_declaration | Env_modtype of summary * Ident.t * modtype_declaration - | Env_class of summary * Ident.t * class_declaration + | Env_class of unit | Env_cltype of summary * Ident.t * class_type_declaration | Env_open of summary * Path.t | Env_functor_arg of summary * Ident.t @@ -38,7 +38,7 @@ type t val empty: t val initial_safe_string: t -val initial_unsafe_string: t + val diff: t -> t -> Ident.t list val copy_local: from:t -> t -> t @@ -84,9 +84,9 @@ val normalize_path: Location.t option -> t -> Path.t -> Path.t head as required global. *) val normalize_path_prefix: Location.t option -> t -> Path.t -> Path.t (* Only normalize the prefix part of the path *) -val reset_required_globals: unit -> unit -val get_required_globals: unit -> Ident.t list -val add_required_global: Ident.t -> unit + + + val has_local_constraints: t -> bool val add_gadt_instance_level: int -> t -> t @@ -142,7 +142,7 @@ val add_module: ?arg:bool -> Ident.t -> module_type -> t -> t val add_module_declaration: ?arg:bool -> check:bool -> Ident.t -> module_declaration -> t -> t val add_modtype: Ident.t -> modtype_declaration -> t -> t -val add_class: Ident.t -> class_declaration -> t -> t + val add_cltype: Ident.t -> class_type_declaration -> t -> t val add_local_constraint: Path.t -> type_declaration -> int -> t -> t val add_local_type: Path.t -> type_declaration -> t -> t @@ -173,7 +173,7 @@ val enter_module: ?arg:bool -> string -> module_type -> t -> Ident.t * t val enter_module_declaration: ?arg:bool -> Ident.t -> module_declaration -> t -> t val enter_modtype: string -> modtype_declaration -> t -> Ident.t * t -val enter_class: string -> class_declaration -> t -> Ident.t * t + val enter_cltype: string -> class_type_declaration -> t -> Ident.t * t (* Initialize the cache of in-core module interfaces. *) @@ -191,9 +191,11 @@ val get_unit_name: unit -> string val read_signature: string -> string -> signature (* Arguments: module name, file name. Results: signature. *) val save_signature: + ?check_exists:unit -> deprecated:string option -> signature -> string -> string -> Cmi_format.cmi_infos (* Arguments: signature, module name, file name. *) val save_signature_with_imports: + ?check_exists:unit -> deprecated:string option -> signature -> string -> string -> (string * Digest.t option) list -> Cmi_format.cmi_infos @@ -208,8 +210,7 @@ val crc_of_unit: string -> Digest.t val imports: unit -> (string * Digest.t option) list -(* [is_imported_opaque md] returns true if [md] is an opaque imported module *) -val is_imported_opaque: string -> bool + (* Direct access to the table of imported compilation units with their CRC *) @@ -234,7 +235,6 @@ type error = | Illegal_renaming of string * string * string | Inconsistent_import of string * string * string | Need_recursive_types of string * string - | Depend_on_unsafe_string_unit of string * string | Missing_module of Location.t * Path.t * Path.t | Illegal_value_name of Location.t * string @@ -270,8 +270,7 @@ val set_type_used_callback: (* Forward declaration to break mutual recursion with Includemod. *) val check_modtype_inclusion: (loc:Location.t -> t -> module_type -> Path.t -> module_type -> unit) ref -(* Forward declaration to break mutual recursion with Typecore. *) -val add_delayed_check_forward: ((unit -> unit) -> unit) ref + (* Forward declaration to break mutual recursion with Mtype. *) val strengthen: (aliasable:bool -> t -> module_type -> Path.t -> module_type) ref diff --git a/analysis/vendor/ml/envaux.ml b/analysis/vendor/ml/envaux.ml new file mode 100644 index 000000000..5fd502046 --- /dev/null +++ b/analysis/vendor/ml/envaux.ml @@ -0,0 +1,94 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *) +(* OCaml port by John Malecki and Xavier Leroy *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +open Env + +type error = + Module_not_found of Path.t + +exception Error of error + +let env_cache = + (Hashtbl.create 59 : ((Env.summary * Subst.t), Env.t) Hashtbl.t) + +let reset_cache () = + Hashtbl.clear env_cache; + Env.reset_cache() + +let rec env_from_summary sum subst = + try + Hashtbl.find env_cache (sum, subst) + with Not_found -> + let env = + match sum with + Env_empty -> + Env.empty + | Env_value(s, id, desc) -> + Env.add_value id (Subst.value_description subst desc) + (env_from_summary s subst) + | Env_type(s, id, desc) -> + Env.add_type ~check:false id + (Subst.type_declaration subst desc) + (env_from_summary s subst) + | Env_extension(s, id, desc) -> + Env.add_extension ~check:false id + (Subst.extension_constructor subst desc) + (env_from_summary s subst) + | Env_module(s, id, desc) -> + Env.add_module_declaration ~check:false id + (Subst.module_declaration subst desc) + (env_from_summary s subst) + | Env_modtype(s, id, desc) -> + Env.add_modtype id (Subst.modtype_declaration subst desc) + (env_from_summary s subst) + | Env_cltype (s, id, desc) -> + Env.add_cltype id (Subst.cltype_declaration subst desc) + (env_from_summary s subst) + | Env_open(s, path) -> + let env = env_from_summary s subst in + let path' = Subst.module_path subst path in + begin match Env.open_signature Asttypes.Override path' env with + | Some env -> env + | None -> assert false + end + | Env_functor_arg(Env_module(s, id, desc), id') when Ident.same id id' -> + Env.add_module_declaration ~check:false + id (Subst.module_declaration subst desc) + ~arg:true (env_from_summary s subst) + | Env_class _ + | Env_functor_arg _ -> assert false + | Env_constraints(s, map) -> + PathMap.fold + (fun path info -> + Env.add_local_type (Subst.type_path subst path) + (Subst.type_declaration subst info)) + map (env_from_summary s subst) + | Env_copy_types (s, sl) -> + Env.copy_types sl (env_from_summary s subst) + in + Hashtbl.add env_cache (sum, subst) env; + env + +let env_of_only_summary env = + Env.env_of_only_summary env_from_summary env + +(* Error report *) + +open Format + +let report_error ppf = function + | Module_not_found p -> + fprintf ppf "@[Cannot find module %a@].@." Printtyp.path p diff --git a/analysis/vendor/ml/envaux.mli b/analysis/vendor/ml/envaux.mli new file mode 100644 index 000000000..2869890a1 --- /dev/null +++ b/analysis/vendor/ml/envaux.mli @@ -0,0 +1,36 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *) +(* OCaml port by John Malecki and Xavier Leroy *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +open Format + +(* Convert environment summaries to environments *) + +val env_from_summary : Env.summary -> Subst.t -> Env.t + +(* Empty the environment caches. To be called when load_path changes. *) + +val reset_cache: unit -> unit + +val env_of_only_summary : Env.t -> Env.t + +(* Error report *) + +type error = + Module_not_found of Path.t + +exception Error of error + +val report_error: formatter -> error -> unit diff --git a/analysis/vendor/compiler-libs-406/includeclass.ml b/analysis/vendor/ml/includeclass.ml similarity index 98% rename from analysis/vendor/compiler-libs-406/includeclass.ml rename to analysis/vendor/ml/includeclass.ml index 59e363ca3..7f1b1bdd8 100644 --- a/analysis/vendor/compiler-libs-406/includeclass.ml +++ b/analysis/vendor/ml/includeclass.ml @@ -96,7 +96,7 @@ let include_err ppf = | CM_Missing_value lab -> fprintf ppf "@[The first class type has no instance variable %s@]" lab | CM_Missing_method lab -> - fprintf ppf "@[The first class type has no method %s@]" lab + fprintf ppf "@[The first class type has no field %s@]" lab | CM_Hide_public lab -> fprintf ppf "@[The public method %s cannot be hidden@]" lab | CM_Hide_virtual (k, lab) -> diff --git a/analysis/vendor/compiler-libs-406/includeclass.mli b/analysis/vendor/ml/includeclass.mli similarity index 100% rename from analysis/vendor/compiler-libs-406/includeclass.mli rename to analysis/vendor/ml/includeclass.mli diff --git a/analysis/vendor/compiler-libs-406/includecore.ml b/analysis/vendor/ml/includecore.ml similarity index 90% rename from analysis/vendor/compiler-libs-406/includecore.ml rename to analysis/vendor/ml/includecore.ml index 8569eddaa..8bf9770c9 100644 --- a/analysis/vendor/compiler-libs-406/includecore.ml +++ b/analysis/vendor/ml/includecore.ml @@ -32,14 +32,16 @@ let value_descriptions ~loc env name ~use:vd2.val_loc loc vd1.val_attributes vd2.val_attributes - name; + (Ident.name name); if Ctype.moregeneral env true vd1.val_type vd2.val_type then begin match (vd1.val_kind, vd2.val_kind) with (Val_prim p1, Val_prim p2) -> - if p1 = p2 then Tcoerce_none else raise Dont_match + if !Primitive.coerce p1 p2 then Tcoerce_none else raise Dont_match | (Val_prim p, _) -> let pc = {pc_desc = p; pc_type = vd2.Types.val_type; - pc_env = env; pc_loc = vd1.Types.val_loc; } in + pc_env = env; pc_loc = vd1.Types.val_loc; + pc_id = name; + } in Tcoerce_primitive pc | (_, Val_prim _) -> raise Dont_match | (_, _) -> Tcoerce_none @@ -132,9 +134,9 @@ type type_mismatch = | Field_type of Ident.t | Field_mutable of Ident.t | Field_arity of Ident.t - | Field_names of int * Ident.t * Ident.t + | Field_names of int * string * string | Field_missing of bool * Ident.t - | Record_representation of bool (* true means second one is unboxed float *) + | Record_representation of record_representation * record_representation | Unboxed_representation of bool (* true means second one is unboxed *) | Immediate @@ -155,14 +157,27 @@ let report_type_mismatch0 first second decl ppf err = pr "The arities for field %s differ" (Ident.name s) | Field_names (n, name1, name2) -> pr "Fields number %i have different names, %s and %s" - n (Ident.name name1) (Ident.name name2) + n name1 name2 | Field_missing (b, s) -> pr "The field %s is only present in %s %s" (Ident.name s) (if b then second else first) decl - | Record_representation b -> - pr "Their internal representations differ:@ %s %s %s" - (if b then second else first) decl - "uses unboxed float representation" + | Record_representation (rep1, rep2) -> + let default () = pr "Their internal representations differ" in + ( match rep1, rep2 with + | Record_optional_labels lbls1, Record_optional_labels lbls2 -> + let onlyInLhs = + Ext_list.find_first lbls1 (fun l -> not (Ext_list.mem_string lbls2 l)) in + let onlyInRhs = + Ext_list.find_first lbls2 (fun l -> not (Ext_list.mem_string lbls1 l)) in + (match onlyInLhs, onlyInRhs with + | Some l, _ -> + pr "@optional label %s only in %s" l second + | _, Some l -> + pr "@optional label %s only in %s" l first + | None, None -> default ()) + | _ -> + default () + ) | Unboxed_representation b -> pr "Their internal representations differ:@ %s %s %s" (if b then second else first) decl @@ -196,7 +211,7 @@ and compare_variants ~loc env params1 params2 n | c::_, [] -> [Field_missing (false, c.Types.cd_id)] | cd1::rem1, cd2::rem2 -> if Ident.name cd1.cd_id <> Ident.name cd2.cd_id then - [Field_names (n, cd1.cd_id, cd2.cd_id)] + [Field_names (n, cd1.cd_id.name, cd2.cd_id.name)] else begin Builtin_attributes.check_deprecated_inclusion ~def:cd1.cd_loc @@ -231,7 +246,7 @@ and compare_records ~loc env params1 params2 n | l::_, [] -> [Field_missing (false, l.Types.ld_id)] | ld1::rem1, ld2::rem2 -> if Ident.name ld1.ld_id <> Ident.name ld2.ld_id - then [Field_names (n, ld1.ld_id, ld2.ld_id)] + then [Field_names (n, ld1.ld_id.name, ld2.ld_id.name)] else if ld1.ld_mutable <> ld2.ld_mutable then [Field_mutable ld1.ld_id] else begin Builtin_attributes.check_deprecated_mutable_inclusion ~def:ld1.ld_loc @@ -239,6 +254,12 @@ and compare_records ~loc env params1 params2 n loc ld1.ld_attributes ld2.ld_attributes (Ident.name ld1.ld_id); + let field_mismatch = !Builtin_attributes.check_bs_attributes_inclusion + ld1.ld_attributes ld2.ld_attributes + (Ident.name ld1.ld_id) in + match field_mismatch with + | Some (a,b) -> [Field_names (n,a,b)] + | None -> if Ctype.equal env true (ld1.ld_type::params1)(ld2.ld_type::params2) then (* add arguments to the parameters, cf. PR#7378 *) compare_records ~loc env @@ -306,7 +327,7 @@ let type_declarations ?(equality = false) ~loc env name decl1 id decl2 = let err = compare_records ~loc env decl1.type_params decl2.type_params 1 labels1 labels2 in if err <> [] || rep1 = rep2 then err else - [Record_representation (rep2 = Record_float_unused)] + [Record_representation (rep1, rep2)] | (Type_open, Type_open) -> [] | (_, _) -> [Kind] in diff --git a/analysis/vendor/compiler-libs-406/includecore.mli b/analysis/vendor/ml/includecore.mli similarity index 89% rename from analysis/vendor/compiler-libs-406/includecore.mli rename to analysis/vendor/ml/includecore.mli index e3b8cac10..1f4cffc31 100644 --- a/analysis/vendor/compiler-libs-406/includecore.mli +++ b/analysis/vendor/ml/includecore.mli @@ -30,16 +30,16 @@ type type_mismatch = | Field_type of Ident.t | Field_mutable of Ident.t | Field_arity of Ident.t - | Field_names of int * Ident.t * Ident.t + | Field_names of int * string * string | Field_missing of bool * Ident.t - | Record_representation of bool + | Record_representation of record_representation * record_representation | Unboxed_representation of bool | Immediate val value_descriptions: - loc:Location.t -> Env.t -> string -> - value_description -> value_description -> module_coercion - + loc:Location.t -> Env.t -> Ident.t -> + value_description -> value_description -> module_coercion + val type_declarations: ?equality:bool -> loc:Location.t -> diff --git a/analysis/vendor/compiler-libs-406/includemod.ml b/analysis/vendor/ml/includemod.ml similarity index 92% rename from analysis/vendor/compiler-libs-406/includemod.ml rename to analysis/vendor/ml/includemod.ml index 9b12e7785..0fcfa8a50 100644 --- a/analysis/vendor/compiler-libs-406/includemod.ml +++ b/analysis/vendor/ml/includemod.ml @@ -34,9 +34,6 @@ type symptom = | Class_type_declarations of Ident.t * class_type_declaration * class_type_declaration * Ctype.class_match_failure list - | Class_declarations of - Ident.t * class_declaration * class_declaration * - Ctype.class_match_failure list | Unbound_modtype_path of Path.t | Unbound_module_path of Path.t | Invalid_module_alias of Path.t @@ -58,7 +55,7 @@ let value_descriptions ~loc env cxt subst id vd1 vd2 = Env.mark_value_used env (Ident.name id) vd1; let vd2 = Subst.value_description subst vd2 in try - Includecore.value_descriptions ~loc env (Ident.name id) vd1 vd2 + Includecore.value_descriptions ~loc env id vd1 vd2 with Includecore.Dont_match -> raise(Error[cxt, env, Value_descriptions(id, vd1, vd2)]) @@ -91,12 +88,6 @@ let class_type_declarations ~loc ~old_env env cxt subst id decl1 decl2 = raise(Error[cxt, old_env, Class_type_declarations(id, decl1, decl2, reason)]) -let class_declarations ~old_env env cxt subst id decl1 decl2 = - let decl2 = Subst.class_declaration subst decl2 in - match Includeclass.class_declarations env decl1 decl2 with - [] -> () - | reason -> - raise(Error[cxt, old_env, Class_declarations(id, decl1, decl2, reason)]) (* Expand a module type identifier when possible *) @@ -132,7 +123,6 @@ type field_desc = | Field_typext of string | Field_module of string | Field_modtype of string - | Field_class of string | Field_classtype of string let kind_of_field_desc = function @@ -141,7 +131,6 @@ let kind_of_field_desc = function | Field_typext _ -> "extension constructor" | Field_module _ -> "module" | Field_modtype _ -> "module type" - | Field_class _ -> "class" | Field_classtype _ -> "class type" let item_ident_name = function @@ -150,7 +139,7 @@ let item_ident_name = function | Sig_typext(id, d, _) -> (id, d.ext_loc, Field_typext(Ident.name id)) | Sig_module(id, d, _) -> (id, d.md_loc, Field_module(Ident.name id)) | Sig_modtype(id, d) -> (id, d.mtd_loc, Field_modtype(Ident.name id)) - | Sig_class(id, d, _) -> (id, d.cty_loc, Field_class(Ident.name id)) + | Sig_class () -> assert false | Sig_class_type(id, d, _) -> (id, d.clty_loc, Field_classtype(Ident.name id)) let is_runtime_component = function @@ -161,7 +150,7 @@ let is_runtime_component = function | Sig_value(_,_) | Sig_typext(_,_,_) | Sig_module(_,_,_) - | Sig_class(_, _,_) -> true + | Sig_class() -> true (* Print a coercion *) @@ -176,7 +165,7 @@ let rec print_coercion ppf c = let pr fmt = Format.fprintf ppf fmt in match c with Tcoerce_none -> pr "id" - | Tcoerce_structure (fl, nl) -> + | Tcoerce_structure (fl, nl, _) -> pr "@[<2>struct@ %a@ %a@]" (print_list print_coercion2) fl (print_list print_coercion3) nl @@ -199,7 +188,7 @@ and print_coercion3 ppf (i, n, c) = (* Simplify a structure coercion *) -let simplify_structure_coercion cc id_pos_list = +let simplify_structure_coercion cc id_pos_list runtime_fields = let rec is_identity_coercion pos = function | [] -> true @@ -207,7 +196,7 @@ let simplify_structure_coercion cc id_pos_list = n = pos && c = Tcoerce_none && is_identity_coercion (pos + 1) rem in if is_identity_coercion 0 cc then Tcoerce_none - else Tcoerce_structure (cc, id_pos_list) + else Tcoerce_structure (cc, id_pos_list, runtime_fields) (* Inclusion between module types. Return the restriction that transforms a value of the smaller type @@ -312,11 +301,26 @@ and signatures ~loc env cxt subst sig1 sig2 = (* Keep ids for module aliases *) let (id_pos_list,_) = List.fold_left - (fun (l,pos) -> function + (fun ((l,pos) as id_pos) -> function Sig_module (id, _, _) -> ((id,pos,Tcoerce_none)::l , pos+1) - | item -> (l, if is_runtime_component item then pos+1 else pos)) + | item -> + if is_runtime_component item then (l,pos+1 ) else id_pos + ) ([], 0) sig1 in + + let runtime_fields = + let get_id = function + | Sig_value (i,_) + | Sig_module (i,_,_) + | Sig_typext (i,_,_) + | Sig_modtype(i,_) + | Sig_class_type(i,_,_) + | Sig_type(i,_,_) -> Ident.name i + | Sig_class () -> assert false in + List.fold_right (fun item fields -> + if is_runtime_component item then get_id item :: fields else fields) sig2 [] in + (* Build a table of the components of sig1, along with their positions. The table is indexed by kind and name of component *) let rec build_component_table pos tbl = function @@ -348,9 +352,9 @@ and signatures ~loc env cxt subst sig1 sig2 = (List.rev paired) in if len1 = len2 then (* see PR#5098 *) - simplify_structure_coercion cc id_pos_list + simplify_structure_coercion cc id_pos_list runtime_fields else - Tcoerce_structure (cc, id_pos_list) + Tcoerce_structure (cc, id_pos_list, runtime_fields) | _ -> raise(Error unpaired) end | item2 :: rem -> @@ -364,8 +368,8 @@ and signatures ~loc env cxt subst sig1 sig2 = Field_type (String.sub s 0 (String.length s - 4)), false | _ -> name2, true in - begin try - let (id1, item1, pos1) = Tbl.find name2 comps1 in + begin match Tbl.find name2 comps1 with + | (id1, item1, pos1) -> let new_subst = match item2 with Sig_type _ -> @@ -380,7 +384,7 @@ and signatures ~loc env cxt subst sig1 sig2 = in pair_components new_subst ((item1, item2, pos1) :: paired) unpaired rem - with Not_found -> + | exception Not_found -> let unpaired = if report then (cxt, env, Missing_field (id2, loc, kind_of_field_desc name2)) :: @@ -416,9 +420,7 @@ and signature_components ~loc old_env env cxt subst paired = | (Sig_modtype(id1, info1), Sig_modtype(_id2, info2), _pos) :: rem -> modtype_infos ~loc env cxt subst id1 info1 info2; comps_rec rem - | (Sig_class(id1, decl1, _), Sig_class(_id2, decl2, _), pos) :: rem -> - class_declarations ~old_env env cxt subst id1 decl1 decl2; - (pos, Tcoerce_none) :: comps_rec rem + | (Sig_class _, Sig_class _ , _) :: _ -> assert false | (Sig_class_type(id1, info1, _), Sig_class_type(_id2, info2, _), _pos) :: rem -> class_type_declarations ~loc ~old_env env cxt subst id1 info1 info2; @@ -525,9 +527,7 @@ open Format open Printtyp let show_loc msg ppf loc = - let pos = loc.Location.loc_start in - if List.mem pos.Lexing.pos_fname [""; "_none_"; "//toplevel//"] then () - else fprintf ppf "@\n@[<2>%a:@ %s@]" Location.print_loc loc msg + fprintf ppf "@\n@[<2>%a:@ %s@]" Location.print_loc loc msg let show_locs ppf (loc1, loc2) = show_loc "Expected declaration" ppf loc2; @@ -582,13 +582,6 @@ let include_err ppf = function (Printtyp.cltype_declaration id) d1 (Printtyp.cltype_declaration id) d2 Includeclass.report_error reason - | Class_declarations(id, d1, d2, reason) -> - fprintf ppf - "@[Class declarations do not match:@ \ - %a@;<1 -2>does not match@ %a@]@ %a" - (Printtyp.class_declaration id) d1 - (Printtyp.class_declaration id) d2 - Includeclass.report_error reason | Unbound_modtype_path path -> fprintf ppf "Unbound module type %a" Printtyp.path path | Unbound_module_path path -> @@ -664,11 +657,30 @@ let report_error ppf errs = fprintf ppf "@[%a%a@]" print_errs errs include_err err +let better_candidate_loc (x : error list) = + match x with + | [ (_,_,Interface_mismatch _); (_,_,descr)] + -> + begin match descr with + | Value_descriptions (_,d1,_) -> Some d1.val_loc + | Type_declarations (_,tdcl1,_,_) -> + Some tdcl1.type_loc + | Missing_field (_,loc,_) -> Some loc + | _ -> None + end + | _ -> None + (* We could do a better job to split the individual error items as sub-messages of the main interface mismatch on the whole unit. *) let () = Location.register_error_of_exn (function - | Error err -> Some (Location.error_of_printer_file report_error err) + | Error err -> + begin match better_candidate_loc err with + | None -> + Some (Location.error_of_printer_file report_error err) + | Some loc -> + Some (Location.error_of_printer loc report_error err) + end | _ -> None ) diff --git a/analysis/vendor/compiler-libs-406/includemod.mli b/analysis/vendor/ml/includemod.mli similarity index 95% rename from analysis/vendor/compiler-libs-406/includemod.mli rename to analysis/vendor/ml/includemod.mli index d5d3cbfc4..731baf780 100644 --- a/analysis/vendor/compiler-libs-406/includemod.mli +++ b/analysis/vendor/ml/includemod.mli @@ -48,9 +48,6 @@ type symptom = | Class_type_declarations of Ident.t * class_type_declaration * class_type_declaration * Ctype.class_match_failure list - | Class_declarations of - Ident.t * class_declaration * class_declaration * - Ctype.class_match_failure list | Unbound_modtype_path of Path.t | Unbound_module_path of Path.t | Invalid_module_alias of Path.t diff --git a/analysis/vendor/compiler-libs-406/lambda.ml b/analysis/vendor/ml/lambda.ml similarity index 74% rename from analysis/vendor/compiler-libs-406/lambda.ml rename to analysis/vendor/ml/lambda.ml index 94570d60a..9437253a6 100644 --- a/analysis/vendor/compiler-libs-406/lambda.ml +++ b/analysis/vendor/ml/lambda.ml @@ -13,9 +13,9 @@ (* *) (**************************************************************************) -open Misc -open Path -open Asttypes + + + type compile_time_constant = | Big_endian @@ -34,14 +34,110 @@ type loc_kind = | Loc_LOC | Loc_POS +type record_repr = + | Record_regular + | Record_optional + +type tag_info = + | Blk_constructor of {name : string ; num_nonconst : int ; tag : int } + | Blk_record_inlined of { name : string ; num_nonconst : int; tag : int; optional_labels: string list; fields : string array; mutable_flag : Asttypes.mutable_flag } + | Blk_tuple + | Blk_poly_var of string + | Blk_record of {fields : string array; mutable_flag : Asttypes.mutable_flag; record_repr : record_repr} + | Blk_module of string list + | Blk_module_export of Ident.t list + + | Blk_extension + | Blk_some + | Blk_some_not_nested (* ['a option] where ['a] can not inhabit a non-like value *) + | Blk_record_ext of { fields : string array; mutable_flag : Asttypes.mutable_flag} + | Blk_lazy_general + +let tag_of_tag_info (tag : tag_info ) = + match tag with + | Blk_constructor {tag} + | Blk_record_inlined {tag} -> tag + | Blk_tuple + | Blk_poly_var _ + | Blk_record _ + | Blk_module _ + | Blk_module_export _ + | Blk_extension + | Blk_some (* tag not make sense *) + | Blk_some_not_nested (* tag not make sense *) + | Blk_lazy_general (* tag not make sense 248 *) + | Blk_record_ext _ (* similar to Blk_extension*) + -> 0 + +let mutable_flag_of_tag_info (tag : tag_info) = + match tag with + | Blk_record_inlined {mutable_flag} + | Blk_record {mutable_flag} + | Blk_record_ext {mutable_flag} -> mutable_flag + | Blk_lazy_general -> Mutable + | Blk_tuple + | Blk_constructor _ + | Blk_poly_var _ + | Blk_module _ + | Blk_module_export _ + | Blk_extension + | Blk_some_not_nested + | Blk_some + -> Immutable + + +let blk_record = ref (fun _ _ _ -> + assert false + ) + + +let blk_record_ext = ref (fun fields mutable_flag -> + let all_labels_info = fields |> Array.map (fun (x,_) -> x.Types.lbl_name) in + Blk_record_ext {fields = all_labels_info; mutable_flag } + ) + +let blk_record_inlined = ref (fun fields name num_nonconst optional_labels ~tag mutable_flag -> + let fields = fields |> Array.map (fun (x,_) -> x.Types.lbl_name) in + Blk_record_inlined {fields; name; num_nonconst; tag; mutable_flag; optional_labels} +) + +let ref_tag_info : tag_info = + Blk_record {fields = [| "contents" |]; mutable_flag = Mutable; record_repr = Record_regular} + +type field_dbg_info = + | Fld_record of {name : string; mutable_flag : Asttypes.mutable_flag} + | Fld_module of {name : string } + | Fld_record_inline of { name : string} + | Fld_record_extension of {name : string} + | Fld_tuple + | Fld_poly_var_tag + | Fld_poly_var_content + | Fld_extension + | Fld_variant + | Fld_cons + | Fld_array + +let fld_record = ref (fun (lbl : Types.label_description) -> + Fld_record {name = lbl.lbl_name; mutable_flag = Mutable}) + +let ref_field_info : field_dbg_info = + Fld_record { name = "contents"; mutable_flag = Mutable} + + +type set_field_dbg_info = + | Fld_record_set of string + | Fld_record_inline_set of string + | Fld_record_extension_set of string + +let ref_field_set_info : set_field_dbg_info = Fld_record_set "contents" +let fld_record_set = ref ( fun (lbl : Types.label_description) -> + Fld_record_set lbl.lbl_name ) + type immediate_or_pointer = | Immediate | Pointer -type initialization_or_assignment = - | Assignment - | Heap_initialization - | Root_initialization + type is_safe = | Safe @@ -50,23 +146,20 @@ type is_safe = type primitive = | Pidentity | Pbytes_to_string - | Pbytes_of_string | Pignore | Prevapply | Pdirapply | Ploc of loc_kind (* Globals *) | Pgetglobal of Ident.t - | Psetglobal of Ident.t (* Operations on heap blocks *) - | Pmakeblock of int * mutable_flag * block_shape - | Pfield of int - | Pfield_computed - | Psetfield of int * immediate_or_pointer * initialization_or_assignment - | Psetfield_computed of immediate_or_pointer * initialization_or_assignment - | Pfloatfield of int - | Psetfloatfield of int * initialization_or_assignment - | Pduprecord of Types.record_representation * int + | Pmakeblock of tag_info + | Pfield of int * field_dbg_info + | Psetfield of int * set_field_dbg_info + + + + | Pduprecord (* Force lazy values *) | Plazyforce (* External call *) @@ -92,20 +185,16 @@ type primitive = | Pstringlength | Pstringrefu | Pstringrefs | Pbyteslength | Pbytesrefu | Pbytessetu | Pbytesrefs | Pbytessets (* Array operations *) - | Pmakearray of array_kind * mutable_flag - | Pduparray of array_kind * mutable_flag - | Parraylength of array_kind - | Parrayrefu of array_kind - | Parraysetu of array_kind - | Parrayrefs of array_kind - | Parraysets of array_kind + | Pmakearray of Asttypes.mutable_flag + | Parraylength + | Parrayrefu + | Parraysetu + | Parrayrefs + | Parraysets (* Test if the argument is a block or an immediate integer *) | Pisint (* Test if the (integer) argument is outside an interval *) | Pisout - (* Bitvect operations *) - | Pbittest - (* Operations on boxed integers (Nativeint.t, Int32.t, Int64.t) *) | Pbintofint of boxed_integer | Pintofbint of boxed_integer | Pcvtbint of boxed_integer (*source*) * boxed_integer (*destination*) @@ -122,102 +211,67 @@ type primitive = | Plsrbint of boxed_integer | Pasrbint of boxed_integer | Pbintcomp of boxed_integer * comparison - (* Operations on big arrays: (unsafe, #dimensions, kind, layout) *) - | Pbigarrayref of bool * int * bigarray_kind * bigarray_layout - | Pbigarrayset of bool * int * bigarray_kind * bigarray_layout - (* size of the nth dimension of a big array *) - | Pbigarraydim of int - (* load/set 16,32,64 bits from a string: (unsafe)*) - | Pstring_load_16 of bool - | Pstring_load_32 of bool - | Pstring_load_64 of bool - | Pstring_set_16 of bool - | Pstring_set_32 of bool - | Pstring_set_64 of bool - (* load/set 16,32,64 bits from a - (char, int8_unsigned_elt, c_layout) Bigarray.Array1.t : (unsafe) *) - | Pbigstring_load_16 of bool - | Pbigstring_load_32 of bool - | Pbigstring_load_64 of bool - | Pbigstring_set_16 of bool - | Pbigstring_set_32 of bool - | Pbigstring_set_64 of bool - (* Compile time constants *) | Pctconst of compile_time_constant - (* byte swap *) - | Pbswap16 - | Pbbswap of boxed_integer - (* Integer to external pointer *) - | Pint_as_pointer (* Inhibition of optimisation *) | Popaque - + | Puncurried_apply + | Pcreate_extension of string and comparison = Ceq | Cneq | Clt | Cgt | Cle | Cge and value_kind = - Pgenval | Pfloatval | Pboxedintval of boxed_integer | Pintval + Pgenval -and block_shape = - value_kind list option -and array_kind = - Pgenarray | Paddrarray | Pintarray | Pfloatarray and boxed_integer = Primitive.boxed_integer = Pnativeint | Pint32 | Pint64 -and bigarray_kind = - Pbigarray_unknown - | Pbigarray_float32 | Pbigarray_float64 - | Pbigarray_sint8 | Pbigarray_uint8 - | Pbigarray_sint16 | Pbigarray_uint16 - | Pbigarray_int32 | Pbigarray_int64 - | Pbigarray_caml_int | Pbigarray_native_int - | Pbigarray_complex32 | Pbigarray_complex64 - -and bigarray_layout = - Pbigarray_unknown_layout - | Pbigarray_c_layout - | Pbigarray_fortran_layout and raise_kind = | Raise_regular | Raise_reraise | Raise_notrace +type pointer_info = + | Pt_constructor of {name : string; const : int ; non_const : int } + | Pt_variant of {name : string} + | Pt_module_alias + + | Pt_shape_none + | Pt_assertfalse + + + type structured_constant = - Const_base of constant - | Const_pointer of int - | Const_block of int * structured_constant list + Const_base of Asttypes.constant + | Const_pointer of int * pointer_info + | Const_block of tag_info * structured_constant list | Const_float_array of string list | Const_immstring of string - + | Const_false + | Const_true type inline_attribute = | Always_inline (* [@inline] or [@inline always] *) | Never_inline (* [@inline never] *) - | Unroll of int (* [@unroll x] *) | Default_inline (* no [@inline] attribute *) -type specialise_attribute = - | Always_specialise (* [@specialise] or [@specialise always] *) - | Never_specialise (* [@specialise never] *) - | Default_specialise (* no [@specialise] attribute *) -type function_kind = Curried | Tupled + type let_kind = Strict | Alias | StrictOpt | Variable -type meth_kind = Self | Public | Cached -type shared_code = (int * int) list + type function_attribute = { inline : inline_attribute; - specialise : specialise_attribute; is_a_functor: bool; stub: bool; + return_unit : bool; + async : bool; } +type switch_names = {consts: string array; blocks: string array} type lambda = Lvar of Ident.t @@ -236,14 +290,12 @@ type lambda = | Lifthenelse of lambda * lambda * lambda | Lsequence of lambda * lambda | Lwhile of lambda * lambda - | Lfor of Ident.t * lambda * lambda * direction_flag * lambda + | Lfor of Ident.t * lambda * lambda * Asttypes.direction_flag * lambda | Lassign of Ident.t * lambda - | Lsend of meth_kind * lambda * lambda * lambda list * Location.t - | Levent of lambda * lambda_event - | Lifused of Ident.t * lambda + | Lsend of string * lambda * Location.t and lfunction = - { kind: function_kind; + { params: Ident.t list; body: lambda; attr: function_attribute; (* specified with [@inline] attribute *) @@ -253,45 +305,38 @@ and lambda_apply = { ap_func : lambda; ap_args : lambda list; ap_loc : Location.t; - ap_should_be_tailcall : bool; ap_inlined : inline_attribute; - ap_specialised : specialise_attribute; } + } and lambda_switch = { sw_numconsts: int; sw_consts: (int * lambda) list; sw_numblocks: int; sw_blocks: (int * lambda) list; - sw_failaction : lambda option} + sw_failaction : lambda option; + sw_names: switch_names option } + -and lambda_event = - { lev_loc: Location.t; - lev_kind: lambda_event_kind; - lev_repr: int ref option; - lev_env: Env.summary } -and lambda_event_kind = - Lev_before - | Lev_after of Types.type_expr - | Lev_function - | Lev_pseudo - | Lev_module_definition of Ident.t -type program = - { module_ident : Ident.t; - main_module_block_size : int; - required_globals : Ident.Set.t; - code : lambda } +(* This is actually a dummy value + not necessary "()", it can be used as a place holder for module + alias etc. +*) +let const_unit = Const_pointer(0, Pt_constructor{name = "()"; const = 1; non_const = 0}) -let const_unit = Const_pointer 0 +let lambda_assert_false = Lconst (Const_pointer(0, Pt_assertfalse)) + +let lambda_module_alias = Lconst (Const_pointer(0, Pt_module_alias)) let lambda_unit = Lconst const_unit let default_function_attribute = { inline = Default_inline; - specialise = Default_specialise; is_a_functor = false; stub = false; + return_unit = false; + async = false; } let default_stub_attribute = @@ -299,7 +344,7 @@ let default_stub_attribute = (* Build sharing keys *) (* - Those keys are later compared with Stdlib.compare. + Those keys are later compared with Pervasives.compare. For that reason, they should not include cycles. *) @@ -313,7 +358,7 @@ let make_key e = (* make_key is used for normalizing let-bound variables *) let rec tr_rec env e = incr count ; - if !count > max_raw then raise Not_simple ; (* Too big ! *) + if !count > max_raw then raise_notrace Not_simple ; (* Too big ! *) match e with | Lvar id -> begin @@ -322,7 +367,7 @@ let make_key e = end | Lconst (Const_base (Const_string _)) -> (* Mutable constants are not shared *) - raise Not_simple + raise_notrace Not_simple | Lconst _ -> e | Lapply ap -> Lapply {ap with ap_func = tr_rec env ap.ap_func; @@ -360,15 +405,12 @@ let make_key e = Lsequence (tr_rec env e1,tr_rec env e2) | Lassign (x,e) -> Lassign (x,tr_rec env e) - | Lsend (m,e1,e2,es,_loc) -> - Lsend (m,tr_rec env e1,tr_rec env e2,tr_recs env es,Location.none) - | Lifused (id,e) -> Lifused (id,tr_rec env e) + | Lsend (m,e1,_loc) -> + Lsend (m,tr_rec env e1,Location.none) | Lletrec _|Lfunction _ | Lfor _ | Lwhile _ -(* Beware: (PR#6412) the event argument to Levent - may include cyclic structure of type Type.typexpr *) - | Levent _ -> - raise Not_simple + -> + raise_notrace Not_simple and tr_recs env es = List.map (tr_rec env) es @@ -447,13 +489,8 @@ let iter f = function f e1; f e2; f e3 | Lassign(_, e) -> f e - | Lsend (_k, met, obj, args, _) -> - List.iter f (met::obj::args) - | Levent (lam, _evt) -> - f lam - | Lifused (_v, e) -> - f e - + | Lsend (_k, obj, _) -> + f obj module IdentSet = Set.Make(Ident) @@ -480,14 +517,13 @@ let free_ids get l = | Lvar _ | Lconst _ | Lapply _ | Lprim _ | Lswitch _ | Lstringswitch _ | Lstaticraise _ | Lifthenelse _ | Lsequence _ | Lwhile _ - | Lsend _ | Levent _ | Lifused _ -> () + | Lsend _ + -> () in free l; !fv let free_variables l = free_ids (function Lvar id -> [id] | _ -> []) l -let free_methods l = - free_ids (function Lsend(Self, Lvar meth, _, _, _) -> [meth] | _ -> []) l (* Check if an action has a "when" guard *) let raise_count = ref 0 @@ -508,7 +544,6 @@ let staticfail = Lstaticraise (0,[]) let rec is_guarded = function | Lifthenelse(_cond, _body, Lstaticraise (0,[])) -> true | Llet(_str, _k, _id, _lam, body) -> is_guarded body - | Levent(lam, _ev) -> is_guarded lam | _ -> false let rec patch_guarded patch = function @@ -516,21 +551,19 @@ let rec patch_guarded patch = function Lifthenelse (cond, body, patch) | Llet(str, k, id, lam, body) -> Llet (str, k, id, lam, patch_guarded patch body) - | Levent(lam, ev) -> - Levent (patch_guarded patch lam, ev) - | _ -> fatal_error "Lambda.patch_guarded" + | _ -> assert false (* Translate an access path *) let rec transl_normal_path = function - Pident id -> + Path.Pident id -> if Ident.global id then Lprim(Pgetglobal id, [], Location.none) else Lvar id - | Pdot(p, _s, pos) -> - Lprim(Pfield pos, [transl_normal_path p], Location.none) + | Pdot(p, s, pos) -> + Lprim(Pfield (pos, Fld_module {name = s}), [transl_normal_path p], Location.none) | Papply _ -> - fatal_error "Lambda.transl_path" + assert false (* Translation of identifiers *) @@ -540,12 +573,10 @@ let transl_module_path ?(loc=Location.none) env path = let transl_value_path ?(loc=Location.none) env path = transl_normal_path (Env.normalize_path_prefix (Some loc) env path) -let transl_class_path = transl_value_path + let transl_extension_path = transl_value_path (* compatibility alias, deprecated in the .mli *) -let transl_path = transl_value_path - (* Compile a sequence of expressions *) let rec make_sequence fn = function @@ -568,8 +599,8 @@ let subst_lambda s lam = | Lapply ap -> Lapply{ap with ap_func = subst ap.ap_func; ap_args = List.map subst ap.ap_args} - | Lfunction{kind; params; body; attr; loc} -> - Lfunction{kind; params; body = subst body; attr; loc} + | Lfunction{ params; body; attr; loc} -> + Lfunction{ params; body = subst body; attr; loc} | Llet(str, k, id, arg, body) -> Llet(str, k, id, subst arg, subst body) | Lletrec(decl, body) -> Lletrec(List.map subst_decl decl, subst body) | Lprim(p, args, loc) -> Lprim(p, List.map subst args, loc) @@ -590,10 +621,8 @@ let subst_lambda s lam = | Lwhile(e1, e2) -> Lwhile(subst e1, subst e2) | Lfor(v, e1, e2, dir, e3) -> Lfor(v, subst e1, subst e2, dir, subst e3) | Lassign(id, e) -> Lassign(id, subst e) - | Lsend (k, met, obj, args, loc) -> - Lsend (k, subst met, subst obj, List.map subst args, loc) - | Levent (lam, evt) -> Levent (subst lam, evt) - | Lifused (v, e) -> Lifused (v, subst e) + | Lsend (k, obj, loc) -> + Lsend (k,subst obj, loc) and subst_decl (id, exp) = (id, subst exp) and subst_case (key, case) = (key, subst case) and subst_strcase (key, case) = (key, subst case) @@ -607,18 +636,16 @@ let rec map f lam = match lam with | Lvar _ -> lam | Lconst _ -> lam - | Lapply { ap_func; ap_args; ap_loc; ap_should_be_tailcall; - ap_inlined; ap_specialised } -> + | Lapply { ap_func; ap_args; ap_loc; + ap_inlined; } -> Lapply { ap_func = map f ap_func; ap_args = List.map (map f) ap_args; ap_loc; - ap_should_be_tailcall; ap_inlined; - ap_specialised; } - | Lfunction { kind; params; body; attr; loc; } -> - Lfunction { kind; params; body = map f body; attr; loc; } + | Lfunction { params; body; attr; loc; } -> + Lfunction { params; body = map f body; attr; loc; } | Llet (str, k, v, e1, e2) -> Llet (str, k, v, map f e1, map f e2) | Lletrec (idel, e2) -> @@ -632,6 +659,7 @@ let rec map f lam = sw_numblocks = sw.sw_numblocks; sw_blocks = List.map (fun (n, e) -> (n, map f e)) sw.sw_blocks; sw_failaction = Misc.may_map (map f) sw.sw_failaction; + sw_names = sw.sw_names }, loc) | Lstringswitch (e, sw, default, loc) -> @@ -656,12 +684,8 @@ let rec map f lam = Lfor (v, map f e1, map f e2, dir, map f e3) | Lassign (v, e) -> Lassign (v, map f e) - | Lsend (k, m, o, el, loc) -> - Lsend (k, map f m, map f o, List.map (map f) el, loc) - | Levent (l, ev) -> - Levent (map f l, ev) - | Lifused (v, e) -> - Lifused (v, map f e) + | Lsend (k, o, loc) -> + Lsend (k, map f o, loc) in f lam @@ -690,11 +714,12 @@ let raise_kind = function let lam_of_loc kind loc = let loc_start = loc.Location.loc_start in let (file, lnum, cnum) = Location.get_pos_info loc_start in + let file = Filename.basename file in let enum = loc.Location.loc_end.Lexing.pos_cnum - loc_start.Lexing.pos_cnum + cnum in match kind with | Loc_POS -> - Lconst (Const_block (0, [ + Lconst (Const_block (Blk_tuple, [ Const_immstring file; Const_base (Const_int lnum); Const_base (Const_int cnum); @@ -712,13 +737,6 @@ let lam_of_loc kind loc = Lconst (Const_immstring loc) | Loc_LINE -> Lconst (Const_base (Const_int lnum)) -let merge_inline_attributes attr1 attr2 = - match attr1, attr2 with - | Default_inline, _ -> Some attr2 - | _, Default_inline -> Some attr1 - | _, _ -> - if attr1 = attr2 then Some attr1 - else None let reset () = raise_count := 0 diff --git a/analysis/vendor/compiler-libs-406/lambda.mli b/analysis/vendor/ml/lambda.mli similarity index 65% rename from analysis/vendor/compiler-libs-406/lambda.mli rename to analysis/vendor/ml/lambda.mli index fef608d4a..2be51ec90 100644 --- a/analysis/vendor/compiler-libs-406/lambda.mli +++ b/analysis/vendor/ml/lambda.mli @@ -34,44 +34,131 @@ type loc_kind = | Loc_LOC | Loc_POS +type record_repr = + | Record_regular + | Record_optional + +type tag_info = + | Blk_constructor of {name : string ; num_nonconst : int; tag : int} + | Blk_record_inlined of { name : string ; num_nonconst : int ; tag : int; optional_labels: string list; fields : string array; mutable_flag : mutable_flag } + | Blk_tuple + | Blk_poly_var of string + | Blk_record of {fields : string array; mutable_flag : mutable_flag; record_repr : record_repr } + | Blk_module of string list + | Blk_module_export of Ident.t list + | Blk_extension + (* underlying is the same as tuple, immutable block + {[ + exception A of int * int + ]} + is translated into + {[ + [A, x, y] + ]} + + *) + + | Blk_some + | Blk_some_not_nested (* ['a option] where ['a] can not inhabit a non-like value *) + | Blk_record_ext of {fields : string array; mutable_flag : mutable_flag} + | Blk_lazy_general + +val tag_of_tag_info : tag_info -> int +val mutable_flag_of_tag_info : tag_info -> mutable_flag +val blk_record : + ( + (Types.label_description* Typedtree.record_label_definition) array -> + mutable_flag -> + record_repr -> + tag_info + ) ref + +val blk_record_ext : + ( + (Types.label_description* Typedtree.record_label_definition) array -> + mutable_flag -> + tag_info + ) ref + +val blk_record_inlined : + ( + (Types.label_description* Typedtree.record_label_definition) array -> + string -> + int -> + string list -> + tag:int -> + mutable_flag -> + tag_info + ) ref + + + +val ref_tag_info : tag_info + +type field_dbg_info = + | Fld_record of {name : string; mutable_flag : Asttypes.mutable_flag} + | Fld_module of {name : string} + | Fld_record_inline of {name : string} + | Fld_record_extension of {name : string} + | Fld_tuple + | Fld_poly_var_tag + | Fld_poly_var_content + | Fld_extension + | Fld_variant + | Fld_cons + | Fld_array + +val fld_record : + (Types.label_description -> + field_dbg_info) ref + +val ref_field_info : field_dbg_info + + + +type set_field_dbg_info = + | Fld_record_set of string + | Fld_record_inline_set of string + | Fld_record_extension_set of string + +val ref_field_set_info : set_field_dbg_info + +val fld_record_set : + (Types.label_description -> + set_field_dbg_info) ref + type immediate_or_pointer = | Immediate | Pointer - -type initialization_or_assignment = - | Assignment - (* Initialization of in heap values, like [caml_initialize] C primitive. The - field should not have been read before and initialization should happen - only once. *) - | Heap_initialization - (* Initialization of roots only. Compiles to a simple store. - No checks are done to preserve GC invariants. *) - | Root_initialization - type is_safe = | Safe | Unsafe +type pointer_info = + | Pt_constructor of {name : string; const : int ; non_const : int} + | Pt_variant of {name : string} + | Pt_module_alias + | Pt_shape_none + | Pt_assertfalse + + + type primitive = | Pidentity | Pbytes_to_string - | Pbytes_of_string | Pignore | Prevapply | Pdirapply | Ploc of loc_kind (* Globals *) | Pgetglobal of Ident.t - | Psetglobal of Ident.t (* Operations on heap blocks *) - | Pmakeblock of int * mutable_flag * block_shape - | Pfield of int - | Pfield_computed - | Psetfield of int * immediate_or_pointer * initialization_or_assignment - | Psetfield_computed of immediate_or_pointer * initialization_or_assignment - | Pfloatfield of int - | Psetfloatfield of int * initialization_or_assignment - | Pduprecord of Types.record_representation * int + | Pmakeblock of tag_info + | Pfield of int * field_dbg_info + | Psetfield of int * set_field_dbg_info + + + | Pduprecord (* Force lazy values *) | Plazyforce (* External call *) @@ -97,22 +184,16 @@ type primitive = | Pstringlength | Pstringrefu | Pstringrefs | Pbyteslength | Pbytesrefu | Pbytessetu | Pbytesrefs | Pbytessets (* Array operations *) - | Pmakearray of array_kind * mutable_flag - | Pduparray of array_kind * mutable_flag - (** For [Pduparray], the argument must be an immutable array. - The arguments of [Pduparray] give the kind and mutability of the - array being *produced* by the duplication. *) - | Parraylength of array_kind - | Parrayrefu of array_kind - | Parraysetu of array_kind - | Parrayrefs of array_kind - | Parraysets of array_kind + | Pmakearray of mutable_flag + | Parraylength + | Parrayrefu + | Parraysetu + | Parrayrefs + | Parraysets (* Test if the argument is a block or an immediate integer *) | Pisint (* Test if the (integer) argument is outside an interval *) | Pisout - (* Bitvect operations *) - | Pbittest (* Operations on boxed integers (Nativeint.t, Int32.t, Int64.t) *) | Pbintofint of boxed_integer | Pintofbint of boxed_integer @@ -130,64 +211,22 @@ type primitive = | Plsrbint of boxed_integer | Pasrbint of boxed_integer | Pbintcomp of boxed_integer * comparison - (* Operations on big arrays: (unsafe, #dimensions, kind, layout) *) - | Pbigarrayref of bool * int * bigarray_kind * bigarray_layout - | Pbigarrayset of bool * int * bigarray_kind * bigarray_layout - (* size of the nth dimension of a big array *) - | Pbigarraydim of int - (* load/set 16,32,64 bits from a string: (unsafe)*) - | Pstring_load_16 of bool - | Pstring_load_32 of bool - | Pstring_load_64 of bool - | Pstring_set_16 of bool - | Pstring_set_32 of bool - | Pstring_set_64 of bool - (* load/set 16,32,64 bits from a - (char, int8_unsigned_elt, c_layout) Bigarray.Array1.t : (unsafe) *) - | Pbigstring_load_16 of bool - | Pbigstring_load_32 of bool - | Pbigstring_load_64 of bool - | Pbigstring_set_16 of bool - | Pbigstring_set_32 of bool - | Pbigstring_set_64 of bool - (* Compile time constants *) | Pctconst of compile_time_constant - (* byte swap *) - | Pbswap16 - | Pbbswap of boxed_integer - (* Integer to external pointer *) - | Pint_as_pointer (* Inhibition of optimisation *) | Popaque - + | Puncurried_apply + | Pcreate_extension of string and comparison = Ceq | Cneq | Clt | Cgt | Cle | Cge -and array_kind = - Pgenarray | Paddrarray | Pintarray | Pfloatarray and value_kind = - Pgenval | Pfloatval | Pboxedintval of boxed_integer | Pintval + Pgenval -and block_shape = - value_kind list option and boxed_integer = Primitive.boxed_integer = Pnativeint | Pint32 | Pint64 -and bigarray_kind = - Pbigarray_unknown - | Pbigarray_float32 | Pbigarray_float64 - | Pbigarray_sint8 | Pbigarray_uint8 - | Pbigarray_sint16 | Pbigarray_uint16 - | Pbigarray_int32 | Pbigarray_int64 - | Pbigarray_caml_int | Pbigarray_native_int - | Pbigarray_complex32 | Pbigarray_complex64 - -and bigarray_layout = - Pbigarray_unknown_layout - | Pbigarray_c_layout - | Pbigarray_fortran_layout and raise_kind = | Raise_regular @@ -196,23 +235,20 @@ and raise_kind = type structured_constant = Const_base of constant - | Const_pointer of int - | Const_block of int * structured_constant list + | Const_pointer of int * pointer_info + | Const_block of tag_info * structured_constant list | Const_float_array of string list | Const_immstring of string - + | Const_false + | Const_true + type inline_attribute = | Always_inline (* [@inline] or [@inline always] *) | Never_inline (* [@inline never] *) - | Unroll of int (* [@unroll x] *) | Default_inline (* no [@inline] attribute *) -type specialise_attribute = - | Always_specialise (* [@specialise] or [@specialise always] *) - | Never_specialise (* [@specialise never] *) - | Default_specialise (* no [@specialise] attribute *) -type function_kind = Curried | Tupled + type let_kind = Strict | Alias | StrictOpt | Variable (* Meaning of kinds for let x = e in e': @@ -226,17 +262,20 @@ type let_kind = Strict | Alias | StrictOpt | Variable Variable: the variable x is assigned later in e' *) -type meth_kind = Self | Public | Cached -type shared_code = (int * int) list (* stack size -> code label *) + +(* [true] means yes, [false] may mean unknown *) type function_attribute = { inline : inline_attribute; - specialise : specialise_attribute; is_a_functor: bool; stub: bool; + return_unit : bool; + async : bool; } +type switch_names = {consts: string array; blocks: string array} + type lambda = Lvar of Ident.t | Lconst of structured_constant @@ -258,12 +297,10 @@ type lambda = | Lwhile of lambda * lambda | Lfor of Ident.t * lambda * lambda * direction_flag * lambda | Lassign of Ident.t * lambda - | Lsend of meth_kind * lambda * lambda * lambda list * Location.t - | Levent of lambda * lambda_event - | Lifused of Ident.t * lambda + | Lsend of string * lambda * Location.t and lfunction = - { kind: function_kind; + { params: Ident.t list; body: lambda; attr: function_attribute; (* specified with [@inline] attribute *) @@ -273,35 +310,19 @@ and lambda_apply = { ap_func : lambda; ap_args : lambda list; ap_loc : Location.t; - ap_should_be_tailcall : bool; (* true if [@tailcall] was specified *) ap_inlined : inline_attribute; (* specified with the [@inlined] attribute *) - ap_specialised : specialise_attribute; } + } and lambda_switch = { sw_numconsts: int; (* Number of integer cases *) sw_consts: (int * lambda) list; (* Integer cases *) sw_numblocks: int; (* Number of tag block cases *) sw_blocks: (int * lambda) list; (* Tag block cases *) - sw_failaction : lambda option} (* Action to take if failure *) -and lambda_event = - { lev_loc: Location.t; - lev_kind: lambda_event_kind; - lev_repr: int ref option; - lev_env: Env.summary } - -and lambda_event_kind = - Lev_before - | Lev_after of Types.type_expr - | Lev_function - | Lev_pseudo - | Lev_module_definition of Ident.t - -type program = - { module_ident : Ident.t; - main_module_block_size : int; - required_globals : Ident.Set.t; (* Modules whose initializer side effects - must occur before [code]. *) - code : lambda } + sw_failaction : lambda option; (* Action to take if failure *) + sw_names: switch_names option } + + + (* Lambda code for the middle-end. * In the closure case the code is a sequence of assignments to a preallocated block of size [main_module_block_size] using @@ -318,23 +339,22 @@ type program = val make_key: lambda -> lambda option val const_unit: structured_constant +val lambda_assert_false: lambda val lambda_unit: lambda +val lambda_module_alias : lambda val name_lambda: let_kind -> lambda -> (Ident.t -> lambda) -> lambda val name_lambda_list: lambda list -> (lambda list -> lambda) -> lambda val iter: (lambda -> unit) -> lambda -> unit module IdentSet: Set.S with type elt = Ident.t val free_variables: lambda -> IdentSet.t -val free_methods: lambda -> IdentSet.t val transl_normal_path: Path.t -> lambda (* Path.t is already normal *) -val transl_path: ?loc:Location.t -> Env.t -> Path.t -> lambda -[@@ocaml.deprecated "use transl_{module,value,extension,class}_path instead"] val transl_module_path: ?loc:Location.t -> Env.t -> Path.t -> lambda val transl_value_path: ?loc:Location.t -> Env.t -> Path.t -> lambda val transl_extension_path: ?loc:Location.t -> Env.t -> Path.t -> lambda -val transl_class_path: ?loc:Location.t -> Env.t -> Path.t -> lambda + val make_sequence: ('a -> lambda) -> 'a list -> lambda @@ -369,9 +389,5 @@ val patch_guarded : lambda -> lambda -> lambda val raise_kind: raise_kind -> string val lam_of_loc : loc_kind -> Location.t -> lambda -val merge_inline_attributes - : inline_attribute - -> inline_attribute - -> inline_attribute option val reset: unit -> unit diff --git a/analysis/vendor/compiler-libs-406/lexer.mli b/analysis/vendor/ml/lexer.mli similarity index 95% rename from analysis/vendor/compiler-libs-406/lexer.mli rename to analysis/vendor/ml/lexer.mli index 63617b48d..2388b9b31 100644 --- a/analysis/vendor/compiler-libs-406/lexer.mli +++ b/analysis/vendor/ml/lexer.mli @@ -19,6 +19,7 @@ val init : unit -> unit val token: Lexing.lexbuf -> Parser.token val skip_hash_bang: Lexing.lexbuf -> unit + type error = | Illegal_character of char | Illegal_escape of string @@ -28,14 +29,12 @@ type error = | Keyword_as_label of string | Invalid_literal of string | Invalid_directive of string * string option + ;; exception Error of error * Location.t -open Format -val report_error: formatter -> error -> unit - (* Deprecated. Use Location.{error_of_exn, report_error}. *) val in_comment : unit -> bool;; val in_string : unit -> bool;; @@ -61,3 +60,6 @@ val set_preprocessor : (unit -> unit) -> ((Lexing.lexbuf -> Parser.token) -> Lexing.lexbuf -> Parser.token) -> unit + + + diff --git a/analysis/vendor/ml/lexer.mll b/analysis/vendor/ml/lexer.mll new file mode 100644 index 000000000..279c20705 --- /dev/null +++ b/analysis/vendor/ml/lexer.mll @@ -0,0 +1,792 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +(* The lexer definition *) + +{ +open Lexing +open Misc +open Parser + +type error = + | Illegal_character of char + | Illegal_escape of string + | Unterminated_comment of Location.t + | Unterminated_string + | Unterminated_string_in_comment of Location.t * Location.t + | Keyword_as_label of string + | Invalid_literal of string + | Invalid_directive of string * string option +;; + +exception Error of error * Location.t;; + +(* The table of keywords *) + +let keyword_table = + create_hashtable 149 [ + "and", AND; + "as", AS; + "assert", ASSERT; + "begin", BEGIN; + "class", CLASS; + "constraint", CONSTRAINT; + "do", DO; + "done", DONE; + "downto", DOWNTO; + "else", ELSE; + "end", END; + "exception", EXCEPTION; + "external", EXTERNAL; + "false", FALSE; + "for", FOR; + "fun", FUN; + "function", FUNCTION; + "functor", FUNCTOR; + "if", IF; + "in", IN; + "include", INCLUDE; + "inherit", INHERIT; + "initializer", INITIALIZER; + "lazy", LAZY; + "let", LET; + "match", MATCH; + "method", METHOD; + "module", MODULE; + "mutable", MUTABLE; + "new", NEW; + "nonrec", NONREC; + "object", OBJECT; + "of", OF; + "open", OPEN; + "or", OR; +(* "parser", PARSER; *) + "private", PRIVATE; + "rec", REC; + "sig", SIG; + "struct", STRUCT; + "then", THEN; + "to", TO; + "true", TRUE; + "try", TRY; + "type", TYPE; + "val", VAL; + "virtual", VIRTUAL; + "when", WHEN; + "while", WHILE; + "with", WITH; + + "lor", INFIXOP3("lor"); (* Should be INFIXOP2 *) + "lxor", INFIXOP3("lxor"); (* Should be INFIXOP2 *) + "mod", INFIXOP3("mod"); + "land", INFIXOP3("land"); + "lsl", INFIXOP4("lsl"); + "lsr", INFIXOP4("lsr"); + "asr", INFIXOP4("asr") +] + +(* To buffer string literals *) + +let string_buffer = Buffer.create 256 +let reset_string_buffer () = Buffer.reset string_buffer +let get_stored_string () = Buffer.contents string_buffer + +let store_string_char c = Buffer.add_char string_buffer c +let store_string_utf_8_uchar u = Buffer.add_utf_8_uchar string_buffer u +let store_string s = Buffer.add_string string_buffer s +let store_lexeme lexbuf = store_string (Lexing.lexeme lexbuf) + +(* To store the position of the beginning of a string and comment *) +let string_start_loc = ref Location.none;; +let comment_start_loc = ref [];; +let in_comment () = !comment_start_loc <> [];; +let is_in_string = ref false +let in_string () = !is_in_string +let print_warnings = ref true + +(* Escaped chars are interpreted in strings unless they are in comments. *) +let store_escaped_char lexbuf c = + if in_comment () then store_lexeme lexbuf else store_string_char c + +let store_escaped_uchar lexbuf u = + if in_comment () then store_lexeme lexbuf else store_string_utf_8_uchar u + +let with_comment_buffer comment lexbuf = + let start_loc = Location.curr lexbuf in + comment_start_loc := [start_loc]; + reset_string_buffer (); + let end_loc = comment lexbuf in + let s = get_stored_string () in + reset_string_buffer (); + let loc = { start_loc with Location.loc_end = end_loc.Location.loc_end } in + s, loc + +(* To translate escape sequences *) + +let hex_digit_value d = (* assert (d in '0'..'9' 'a'..'f' 'A'..'F') *) + let d = Char.code d in + if d >= 97 then d - 87 else + if d >= 65 then d - 55 else + d - 48 + +let hex_num_value lexbuf ~first ~last = + let rec loop acc i = match i > last with + | true -> acc + | false -> + let value = hex_digit_value (Lexing.lexeme_char lexbuf i) in + loop (16 * acc + value) (i + 1) + in + loop 0 first + +let char_for_backslash = function + | 'n' -> '\010' + | 'r' -> '\013' + | 'b' -> '\008' + | 't' -> '\009' + | c -> c + +let char_for_decimal_code lexbuf i = + let c = 100 * (Char.code(Lexing.lexeme_char lexbuf i) - 48) + + 10 * (Char.code(Lexing.lexeme_char lexbuf (i+1)) - 48) + + (Char.code(Lexing.lexeme_char lexbuf (i+2)) - 48) in + if not (Uchar.is_valid c ) then + if in_comment () + then 'x' + else raise (Error(Illegal_escape (Lexing.lexeme lexbuf), + Location.curr lexbuf)) + else (Obj.magic (c : int) : char) + +let char_for_octal_code lexbuf i = + let c = 64 * (Char.code(Lexing.lexeme_char lexbuf i) - 48) + + 8 * (Char.code(Lexing.lexeme_char lexbuf (i+1)) - 48) + + (Char.code(Lexing.lexeme_char lexbuf (i+2)) - 48) in + Char.chr c + +let char_for_hexadecimal_code lexbuf i = + let byte = hex_num_value lexbuf ~first:i ~last:(i+1) in + Char.chr byte + +let uchar_for_uchar_escape lexbuf = + let err e = + raise + (Error (Illegal_escape (Lexing.lexeme lexbuf ^ e), Location.curr lexbuf)) + in + let len = Lexing.lexeme_end lexbuf - Lexing.lexeme_start lexbuf in + let first = 3 (* skip opening \u{ *) in + let last = len - 2 (* skip closing } *) in + let digit_count = last - first + 1 in + match digit_count > 6 with + | true -> err ", too many digits, expected 1 to 6 hexadecimal digits" + | false -> + let cp = hex_num_value lexbuf ~first ~last in + if Uchar.is_valid cp then Uchar.unsafe_of_int cp else + err (", " ^ Printf.sprintf "%X" cp ^ " is not a Unicode scalar value") + +(* recover the name from a LABEL or OPTLABEL token *) + +let get_label_name lexbuf = + let s = Lexing.lexeme lexbuf in + let name = String.sub s 1 (String.length s - 2) in + if Hashtbl.mem keyword_table name then + raise (Error(Keyword_as_label name, Location.curr lexbuf)); + name +;; + +(* Update the current location with file name and line number. *) + +let update_loc lexbuf file line absolute chars = + let pos = lexbuf.lex_curr_p in + let new_file = match file with + | None -> pos.pos_fname + | Some s -> s + in + lexbuf.lex_curr_p <- { pos with + pos_fname = new_file; + pos_lnum = if absolute then line else pos.pos_lnum + line; + pos_bol = pos.pos_cnum - chars; + } +;; + +let preprocessor = ref None + +let escaped_newlines = ref false + + +let handle_docstrings = ref true +let comment_list = ref [] + +let add_comment com = + comment_list := com :: !comment_list + +let add_docstring_comment ds = + let com = + ("*" ^ Docstrings.docstring_body ds, Docstrings.docstring_loc ds) + in + add_comment com + +let comments () = List.rev !comment_list + +(* Error report *) + +open Format + +let report_error ppf = function + | Illegal_character c -> + fprintf ppf "Illegal character (%s)" (Char.escaped c) + | Illegal_escape s -> + fprintf ppf "Illegal backslash escape in string or character (%s)" s + | Unterminated_comment _ -> + fprintf ppf "Comment not terminated" + | Unterminated_string -> + fprintf ppf "String literal not terminated" + | Unterminated_string_in_comment (_, loc) -> + fprintf ppf "This comment contains an unterminated string literal@.\ + %aString literal begins here" + Location.print_error loc + | Keyword_as_label kwd -> + fprintf ppf "`%s' is a keyword, it cannot be used as label name" kwd + | Invalid_literal s -> + fprintf ppf "Invalid literal %s" s + | Invalid_directive (dir, explanation) -> + fprintf ppf "Invalid lexer directive %S" dir; + begin match explanation with + | None -> () + | Some expl -> fprintf ppf ": %s" expl + end + +let () = + Location.register_error_of_exn + (function + | Error (err, loc) -> + Some (Location.error_of_printer loc report_error err) + | _ -> + None + ) + +} + +let newline = ('\013'* '\010') +let blank = [' ' '\009' '\012'] +let lowercase = ['a'-'z' '_'] +let uppercase = ['A'-'Z'] +let identchar = ['A'-'Z' 'a'-'z' '_' '\'' '0'-'9'] +let symbolchar = + ['!' '$' '%' '&' '*' '+' '-' '.' '/' ':' '<' '=' '>' '?' '@' '^' '|' '~'] +let dotsymbolchar = + ['!' '$' '%' '&' '*' '+' '-' '/' ':' '=' '>' '?' '@' '^' '|' '~'] +let decimal_literal = + ['0'-'9'] ['0'-'9' '_']* +let hex_digit = + ['0'-'9' 'A'-'F' 'a'-'f'] +let hex_literal = + '0' ['x' 'X'] ['0'-'9' 'A'-'F' 'a'-'f']['0'-'9' 'A'-'F' 'a'-'f' '_']* +let oct_literal = + '0' ['o' 'O'] ['0'-'7'] ['0'-'7' '_']* +let bin_literal = + '0' ['b' 'B'] ['0'-'1'] ['0'-'1' '_']* +let int_literal = + decimal_literal | hex_literal | oct_literal | bin_literal +let float_literal = + ['0'-'9'] ['0'-'9' '_']* + ('.' ['0'-'9' '_']* )? + (['e' 'E'] ['+' '-']? ['0'-'9'] ['0'-'9' '_']* )? +let hex_float_literal = + '0' ['x' 'X'] + ['0'-'9' 'A'-'F' 'a'-'f'] ['0'-'9' 'A'-'F' 'a'-'f' '_']* + ('.' ['0'-'9' 'A'-'F' 'a'-'f' '_']* )? + (['p' 'P'] ['+' '-']? ['0'-'9'] ['0'-'9' '_']* )? +let literal_modifier = ['G'-'Z' 'g'-'z'] + +rule token = parse + | "\\" newline { + if not !escaped_newlines then + raise (Error(Illegal_character (Lexing.lexeme_char lexbuf 0), + Location.curr lexbuf)); + update_loc lexbuf None 1 false 0; + token lexbuf } + | newline + { update_loc lexbuf None 1 false 0; + EOL } + | blank + + { token lexbuf } + | "_" + { UNDERSCORE } + | "~" + { TILDE } + | "~" lowercase identchar * ':' + { LABEL (get_label_name lexbuf) } + | "?" + { QUESTION } + | "?" lowercase identchar * ':' + { OPTLABEL (get_label_name lexbuf) } + | lowercase identchar * + { let s = Lexing.lexeme lexbuf in + try Hashtbl.find keyword_table s + with Not_found -> LIDENT s } + | uppercase identchar * + { UIDENT(Lexing.lexeme lexbuf) } (* No capitalized keywords *) + | int_literal { INT (Lexing.lexeme lexbuf, None) } + | (int_literal as lit) (literal_modifier as modif) + { INT (lit, Some modif) } + | float_literal | hex_float_literal + { FLOAT (Lexing.lexeme lexbuf, None) } + | ((float_literal | hex_float_literal) as lit) (literal_modifier as modif) + { FLOAT (lit, Some modif) } + | (float_literal | hex_float_literal | int_literal) identchar+ + { raise (Error(Invalid_literal (Lexing.lexeme lexbuf), + Location.curr lexbuf)) } + | "\"" + { reset_string_buffer(); + is_in_string := true; + let string_start = lexbuf.lex_start_p in + string_start_loc := Location.curr lexbuf; + string lexbuf; + is_in_string := false; + lexbuf.lex_start_p <- string_start; + STRING (get_stored_string(), None) } + | "{" lowercase* "|" + { reset_string_buffer(); + let delim = Lexing.lexeme lexbuf in + let delim = String.sub delim 1 (String.length delim - 2) in + is_in_string := true; + let string_start = lexbuf.lex_start_p in + string_start_loc := Location.curr lexbuf; + quoted_string delim lexbuf; + is_in_string := false; + lexbuf.lex_start_p <- string_start; + STRING (get_stored_string(), Some delim) } + | "\'" newline "\'" + { update_loc lexbuf None 1 false 1; + CHAR (Lexing.lexeme_char lexbuf 1) } + | "\'" [^ '\\' '\'' '\010' '\013'] "\'" + { CHAR(Lexing.lexeme_char lexbuf 1) } + | "\'\\" ['\\' '\'' '\"' 'n' 't' 'b' 'r' ' '] "\'" + { CHAR(char_for_backslash (Lexing.lexeme_char lexbuf 2)) } + | "\'\\" ['0'-'9'] ['0'-'9'] ['0'-'9'] "\'" + { CHAR(char_for_decimal_code lexbuf 2) } + | "\'\\" 'o' ['0'-'3'] ['0'-'7'] ['0'-'7'] "\'" + { CHAR(char_for_octal_code lexbuf 3) } + | "\'\\" 'x' ['0'-'9' 'a'-'f' 'A'-'F'] ['0'-'9' 'a'-'f' 'A'-'F'] "\'" + { CHAR(char_for_hexadecimal_code lexbuf 3) } + | "\'\\" _ + { let l = Lexing.lexeme lexbuf in + let esc = String.sub l 1 (String.length l - 1) in + raise (Error(Illegal_escape esc, Location.curr lexbuf)) + } + | "(*" + { let s, loc = with_comment_buffer comment lexbuf in + COMMENT (s, loc) } + | "(**" + { let s, loc = with_comment_buffer comment lexbuf in + if !handle_docstrings then + DOCSTRING (Docstrings.docstring s loc) + else + COMMENT ("*" ^ s, loc) + } + | "(**" (('*'+) as stars) + { let s, loc = + with_comment_buffer + (fun lexbuf -> + store_string ("*" ^ stars); + comment lexbuf) + lexbuf + in + COMMENT (s, loc) } + | "(*)" + { if !print_warnings then + Location.prerr_warning (Location.curr lexbuf) Warnings.Comment_start; + let s, loc = with_comment_buffer comment lexbuf in + COMMENT (s, loc) } + | "(*" (('*'*) as stars) "*)" + { if !handle_docstrings && stars="" then + (* (**) is an empty docstring *) + DOCSTRING(Docstrings.docstring "" (Location.curr lexbuf)) + else + COMMENT (stars, Location.curr lexbuf) } + | "*)" + { let loc = Location.curr lexbuf in + Location.prerr_warning loc Warnings.Comment_not_end; + lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_curr_pos - 1; + let curpos = lexbuf.lex_curr_p in + lexbuf.lex_curr_p <- { curpos with pos_cnum = curpos.pos_cnum - 1 }; + STAR + } + | ("#" [' ' '\t']* (['0'-'9']+ as num) [' ' '\t']* + ("\"" ([^ '\010' '\013' '\"' ] * as name) "\"")?) as directive + [^ '\010' '\013'] * newline + { + match int_of_string num with + | exception _ -> + (* PR#7165 *) + let loc = Location.curr lexbuf in + let explanation = "line number out of range" in + let error = Invalid_directive (directive, Some explanation) in + raise (Error (error, loc)) + | line_num -> + (* Documentation says that the line number should be + positive, but we have never guarded against this and it + might have useful hackish uses. *) + update_loc lexbuf name line_num true 0; + token lexbuf + } + | "#" { HASH } + | "&" { AMPERSAND } + | "&&" { AMPERAMPER } + | "`" { BACKQUOTE } + | "\'" { QUOTE } + | "(" { LPAREN } + | ")" { RPAREN } + | "*" { STAR } + | "," { COMMA } + | "->" { MINUSGREATER } + | "." { DOT } + | ".." { DOTDOT } + | "." (dotsymbolchar symbolchar* as s) { DOTOP s } + | ":" { COLON } + | "::" { COLONCOLON } + | ":=" { COLONEQUAL } + | ":>" { COLONGREATER } + | ";" { SEMI } + | ";;" { SEMISEMI } + | "<" { LESS } + | "<-" { LESSMINUS } + | "=" { EQUAL } + | "[" { LBRACKET } + | "[|" { LBRACKETBAR } + | "[<" { LBRACKETLESS } + | "[>" { LBRACKETGREATER } + | "]" { RBRACKET } + | "{" { LBRACE } + | "{<" { LBRACELESS } + | "|" { BAR } + | "||" { BARBAR } + | "|]" { BARRBRACKET } + | ">" { GREATER } + | ">]" { GREATERRBRACKET } + | "}" { RBRACE } + | ">}" { GREATERRBRACE } + | "[@" { LBRACKETAT } + | "[@@" { LBRACKETATAT } + | "[@@@" { LBRACKETATATAT } + | "[%" { LBRACKETPERCENT } + | "[%%" { LBRACKETPERCENTPERCENT } + | "!" { BANG } + | "!=" { INFIXOP0 "!=" } + | "+" { PLUS } + | "+." { PLUSDOT } + | "+=" { PLUSEQ } + | "-" { MINUS } + | "-." { MINUSDOT } + + | "!" symbolchar + + { PREFIXOP(Lexing.lexeme lexbuf) } + | ['~' '?'] symbolchar + + { PREFIXOP(Lexing.lexeme lexbuf) } + | ['=' '<' '>' '|' '&' '$'] symbolchar * + { INFIXOP0(Lexing.lexeme lexbuf) } + | ['@' '^'] symbolchar * + { INFIXOP1(Lexing.lexeme lexbuf) } + | ['+' '-'] symbolchar * + { INFIXOP2(Lexing.lexeme lexbuf) } + | "**" symbolchar * + { INFIXOP4(Lexing.lexeme lexbuf) } + | '%' { PERCENT } + | ['*' '/' '%'] symbolchar * + { INFIXOP3(Lexing.lexeme lexbuf) } + | '#' (symbolchar | '#') + + { HASHOP(Lexing.lexeme lexbuf) } + | eof { Rescript_cpp.eof_check lexbuf; EOF} + | _ + { raise (Error(Illegal_character (Lexing.lexeme_char lexbuf 0), + Location.curr lexbuf)) + } + +and comment = parse + "(*" + { comment_start_loc := (Location.curr lexbuf) :: !comment_start_loc; + store_lexeme lexbuf; + comment lexbuf + } + | "*)" + { match !comment_start_loc with + | [] -> assert false + | [_] -> comment_start_loc := []; Location.curr lexbuf + | _ :: l -> comment_start_loc := l; + store_lexeme lexbuf; + comment lexbuf + } + | "\"" + { + string_start_loc := Location.curr lexbuf; + store_string_char '\"'; + is_in_string := true; + begin try string lexbuf + with Error (Unterminated_string, str_start) -> + match !comment_start_loc with + | [] -> assert false + | loc :: _ -> + let start = List.hd (List.rev !comment_start_loc) in + comment_start_loc := []; + raise (Error (Unterminated_string_in_comment (start, str_start), + loc)) + end; + is_in_string := false; + store_string_char '\"'; + comment lexbuf } + | "{" lowercase* "|" + { + let delim = Lexing.lexeme lexbuf in + let delim = String.sub delim 1 (String.length delim - 2) in + string_start_loc := Location.curr lexbuf; + store_lexeme lexbuf; + is_in_string := true; + begin try quoted_string delim lexbuf + with Error (Unterminated_string, str_start) -> + match !comment_start_loc with + | [] -> assert false + | loc :: _ -> + let start = List.hd (List.rev !comment_start_loc) in + comment_start_loc := []; + raise (Error (Unterminated_string_in_comment (start, str_start), + loc)) + end; + is_in_string := false; + store_string_char '|'; + store_string delim; + store_string_char '}'; + comment lexbuf } + + | "\'\'" + { store_lexeme lexbuf; comment lexbuf } + | "\'" newline "\'" + { update_loc lexbuf None 1 false 1; + store_lexeme lexbuf; + comment lexbuf + } + | "\'" [^ '\\' '\'' '\010' '\013' ] "\'" + { store_lexeme lexbuf; comment lexbuf } + | "\'\\" ['\\' '\"' '\'' 'n' 't' 'b' 'r' ' '] "\'" + { store_lexeme lexbuf; comment lexbuf } + | "\'\\" ['0'-'9'] ['0'-'9'] ['0'-'9'] "\'" + { store_lexeme lexbuf; comment lexbuf } + | "\'\\" 'x' ['0'-'9' 'a'-'f' 'A'-'F'] ['0'-'9' 'a'-'f' 'A'-'F'] "\'" + { store_lexeme lexbuf; comment lexbuf } + | eof + { match !comment_start_loc with + | [] -> assert false + | loc :: _ -> + let start = List.hd (List.rev !comment_start_loc) in + comment_start_loc := []; + raise (Error (Unterminated_comment start, loc)) + } + | newline + { update_loc lexbuf None 1 false 0; + store_lexeme lexbuf; + comment lexbuf + } + | _ + { store_lexeme lexbuf; comment lexbuf } + +and string = parse + '\"' + { () } + | '\\' newline ([' ' '\t'] * as space) + { update_loc lexbuf None 1 false (String.length space); + if in_comment () then store_lexeme lexbuf; + string lexbuf + } + | '\\' ['\\' '\'' '\"' 'n' 't' 'b' 'r' ' '] + { store_escaped_char lexbuf + (char_for_backslash(Lexing.lexeme_char lexbuf 1)); + string lexbuf } + | '\\' ['0'-'9'] ['0'-'9'] ['0'-'9'] + { store_escaped_char lexbuf (char_for_decimal_code lexbuf 1); + string lexbuf } + | '\\' 'o' ['0'-'3'] ['0'-'7'] ['0'-'7'] + { store_escaped_char lexbuf (char_for_octal_code lexbuf 2); + string lexbuf } + | '\\' 'x' ['0'-'9' 'a'-'f' 'A'-'F'] ['0'-'9' 'a'-'f' 'A'-'F'] + { store_escaped_char lexbuf (char_for_hexadecimal_code lexbuf 2); + string lexbuf } + | '\\' 'u' '{' hex_digit+ '}' + { store_escaped_uchar lexbuf (uchar_for_uchar_escape lexbuf); + string lexbuf } + | '\\' _ + { if not (in_comment ()) then begin +(* Should be an error, but we are very lax. + raise (Error (Illegal_escape (Lexing.lexeme lexbuf), + Location.curr lexbuf)) +*) + let loc = Location.curr lexbuf in + Location.prerr_warning loc Warnings.Illegal_backslash; + end; + store_lexeme lexbuf; + string lexbuf + } + | newline + { if not (in_comment ()) then + Location.prerr_warning (Location.curr lexbuf) Warnings.Eol_in_string; + update_loc lexbuf None 1 false 0; + store_lexeme lexbuf; + string lexbuf + } + | eof + { is_in_string := false; + raise (Error (Unterminated_string, !string_start_loc)) } + | _ + { store_string_char(Lexing.lexeme_char lexbuf 0); + string lexbuf } + +and quoted_string delim = parse + | newline + { update_loc lexbuf None 1 false 0; + store_lexeme lexbuf; + quoted_string delim lexbuf + } + | eof + { is_in_string := false; + raise (Error (Unterminated_string, !string_start_loc)) } + | "|" lowercase* "}" + { + let edelim = Lexing.lexeme lexbuf in + let edelim = String.sub edelim 1 (String.length edelim - 2) in + if delim = edelim then () + else (store_lexeme lexbuf; quoted_string delim lexbuf) + } + | _ + { store_string_char(Lexing.lexeme_char lexbuf 0); + quoted_string delim lexbuf } + +and skip_hash_bang = parse + | "#!" [^ '\n']* '\n' [^ '\n']* "\n!#\n" + { update_loc lexbuf None 3 false 0 } + | "#!" [^ '\n']* '\n' + { update_loc lexbuf None 1 false 0 } + | "" { () } + +{ + let token_with_comments lexbuf = + match !preprocessor with + | None -> token lexbuf + | Some (_init, preprocess) -> preprocess token lexbuf + + type newline_state = + | NoLine (* There have been no blank lines yet. *) + | NewLine + (* There have been no blank lines, and the previous + token was a newline. *) + | BlankLine (* There have been blank lines. *) + + type doc_state = + | Initial (* There have been no docstrings yet *) + | After of docstring list + (* There have been docstrings, none of which were + preceded by a blank line *) + | Before of docstring list * docstring list * docstring list + (* There have been docstrings, some of which were + preceded by a blank line *) + + and docstring = Docstrings.docstring + + let token lexbuf = + let post_pos = lexeme_end_p lexbuf in + let attach lines docs pre_pos = + let open Docstrings in + match docs, lines with + | Initial, _ -> () + | After a, (NoLine | NewLine) -> + set_post_docstrings post_pos (List.rev a); + set_pre_docstrings pre_pos a; + | After a, BlankLine -> + set_post_docstrings post_pos (List.rev a); + set_pre_extra_docstrings pre_pos (List.rev a) + | Before(a, f, b), (NoLine | NewLine) -> + set_post_docstrings post_pos (List.rev a); + set_post_extra_docstrings post_pos + (List.rev_append f (List.rev b)); + set_floating_docstrings pre_pos (List.rev f); + set_pre_extra_docstrings pre_pos (List.rev a); + set_pre_docstrings pre_pos b + | Before(a, f, b), BlankLine -> + set_post_docstrings post_pos (List.rev a); + set_post_extra_docstrings post_pos + (List.rev_append f (List.rev b)); + set_floating_docstrings pre_pos + (List.rev_append f (List.rev b)); + set_pre_extra_docstrings pre_pos (List.rev a) + in + let rec loop lines docs lexbuf = + match token_with_comments lexbuf with + | COMMENT (s, loc) -> + add_comment (s, loc); + let lines' = + match lines with + | NoLine -> NoLine + | NewLine -> NoLine + | BlankLine -> BlankLine + in + loop lines' docs lexbuf + | EOL -> + let lines' = + match lines with + | NoLine -> NewLine + | NewLine -> BlankLine + | BlankLine -> BlankLine + in + loop lines' docs lexbuf + | HASH when Rescript_cpp.at_bol lexbuf -> + Rescript_cpp.interpret_directive lexbuf + ~cont:(fun lexbuf -> loop lines docs lexbuf) + ~token_with_comments + | DOCSTRING doc -> + Docstrings.register doc; + add_docstring_comment doc; + let docs' = + if Docstrings.docstring_body doc = "/*" then + match docs with + | Initial -> Before([], [doc], []) + | After a -> Before (a, [doc], []) + | Before(a, f, b) -> Before(a, doc :: b @ f, []) + else + match docs, lines with + | Initial, (NoLine | NewLine) -> After [doc] + | Initial, BlankLine -> Before([], [], [doc]) + | After a, (NoLine | NewLine) -> After (doc :: a) + | After a, BlankLine -> Before (a, [], [doc]) + | Before(a, f, b), (NoLine | NewLine) -> Before(a, f, doc :: b) + | Before(a, f, b), BlankLine -> Before(a, b @ f, [doc]) + in + loop NoLine docs' lexbuf + | tok -> + attach lines docs (lexeme_start_p lexbuf); + tok + in + Rescript_cpp.check_sharp_look_ahead (fun _ -> loop NoLine Initial lexbuf) + + let init () = + Rescript_cpp.init (); + is_in_string := false; + comment_start_loc := []; + comment_list := []; + match !preprocessor with + | None -> () + | Some (init, _preprocess) -> init () + + + let set_preprocessor init preprocess = + escaped_newlines := true; + preprocessor := Some (init, preprocess) + +} diff --git a/analysis/vendor/compiler-libs-406/location.ml b/analysis/vendor/ml/location.ml similarity index 97% rename from analysis/vendor/compiler-libs-406/location.ml rename to analysis/vendor/ml/location.ml index 9578b071a..416cc23d2 100644 --- a/analysis/vendor/compiler-libs-406/location.ml +++ b/analysis/vendor/ml/location.ml @@ -120,10 +120,7 @@ let print_loc ppf loc = let (file, line, startchar) = get_pos_info loc.loc_start in let startchar = startchar + 1 in let endchar = loc.loc_end.pos_cnum - loc.loc_start.pos_cnum + startchar in - if file = "//toplevel//" then begin - fprintf ppf "Characters %i-%i" - loc.loc_start.pos_cnum loc.loc_end.pos_cnum - end else begin + begin fprintf ppf "%s@{%a%s%i" msg_file print_filename file msg_line line; if startchar >= 0 then fprintf ppf "%s%i%s%i" msg_chars startchar msg_to endchar; @@ -327,4 +324,4 @@ let raise_errorf ?(loc = none) ?(sub = []) ?(if_highlight = "") = (fun msg -> raise (Error ({loc; msg; sub; if_highlight}))) let deprecated ?(def = none) ?(use = none) loc msg = - prerr_warning loc (Warnings.Deprecated (msg, def, use)) \ No newline at end of file + prerr_warning loc (Warnings.Deprecated (msg, def, use)) diff --git a/analysis/vendor/ml/location.mli b/analysis/vendor/ml/location.mli new file mode 100644 index 000000000..73b7daacd --- /dev/null +++ b/analysis/vendor/ml/location.mli @@ -0,0 +1,149 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +(** Source code locations (ranges of positions), used in parsetree. *) + +open Format + +type t = Warnings.loc = { + loc_start: Lexing.position; + loc_end: Lexing.position; + loc_ghost: bool; +} + +(** Note on the use of Lexing.position in this module. + If [pos_fname = ""], then use [!input_name] instead. + If [pos_lnum = -1], then [pos_bol = 0]. Use [pos_cnum] and + re-parse the file to get the line and character numbers. + Else all fields are correct. +*) + +val none : t +(** An arbitrary value of type [t]; describes an empty ghost range. *) + +val in_file : string -> t +(** Return an empty ghost range located in a given file. *) + +val init : Lexing.lexbuf -> string -> unit +(** Set the file name and line number of the [lexbuf] to be the start + of the named file. *) + +val curr : Lexing.lexbuf -> t +(** Get the location of the current token from the [lexbuf]. *) + +val symbol_rloc: unit -> t +val symbol_gloc: unit -> t + +(** [rhs_loc n] returns the location of the symbol at position [n], starting + at 1, in the current parser rule. *) +val rhs_loc: int -> t + +val input_name: string ref +val set_input_name: string -> unit +val input_lexbuf: Lexing.lexbuf option ref + +val get_pos_info: Lexing.position -> string * int * int (* file, line, char *) +val print_loc: formatter -> t -> unit +val print_error: formatter -> t -> unit +val print_error_cur_file: formatter -> unit -> unit + +val prerr_warning: t -> Warnings.t -> unit +val echo_eof: unit -> unit +val reset: unit -> unit + +val default_printer : formatter -> t -> unit +val printer : (formatter -> t -> unit) ref + +val warning_printer : (t -> formatter -> Warnings.t -> unit) ref +(** Hook for intercepting warnings. *) + +val formatter_for_warnings : formatter ref + +val default_warning_printer : t -> formatter -> Warnings.t -> unit +(** Original warning printer for use in hooks. *) + +type 'a loc = { + txt : 'a; + loc : t; +} + +val mknoloc : 'a -> 'a loc +val mkloc : 'a -> t -> 'a loc + +val print: formatter -> t -> unit +val print_compact: formatter -> t -> unit +val print_filename: formatter -> string -> unit + +val absolute_path: string -> string + +val show_filename: string -> string + (** In -absname mode, return the absolute path for this filename. + Otherwise, returns the filename unchanged. *) + + +val absname: bool ref + +(** Support for located errors *) + +type error = + { + loc: t; + msg: string; + sub: error list; + if_highlight: string; (* alternative message if locations are highlighted *) + } + +exception Already_displayed_error +exception Error of error + +val error: ?loc:t -> ?sub:error list -> ?if_highlight:string -> string -> error + + +val print_error_prefix : Format.formatter -> unit +val pp_ksprintf : ?before:(formatter -> unit) -> (string -> 'a) -> ('b, formatter, unit, 'a) format4 -> 'b + + +val errorf: ?loc:t -> ?sub:error list -> ?if_highlight:string + -> ('a, Format.formatter, unit, error) format4 -> 'a + +val raise_errorf: ?loc:t -> ?sub:error list -> ?if_highlight:string + -> ('a, Format.formatter, unit, 'b) format4 -> 'a + +val error_of_printer: t -> (formatter -> 'a -> unit) -> 'a -> error + +val error_of_printer_file: (formatter -> 'a -> unit) -> 'a -> error + +val error_of_exn: exn -> [ `Ok of error | `Already_displayed ] option + +val register_error_of_exn: (exn -> error option) -> unit +(** Each compiler module which defines a custom type of exception + which can surface as a user-visible error should register + a "printer" for this exception using [register_error_of_exn]. + The result of the printer is an [error] value containing + a location, a message, and optionally sub-messages (each of them + being located as well). *) + +val report_error: formatter -> error -> unit + +val error_reporter : (formatter -> error -> unit) ref +(** Hook for intercepting error reports. *) + +val default_error_reporter : formatter -> error -> unit +(** Original error reporter for use in hooks. *) + +val report_exception: formatter -> exn -> unit +(** Reraise the exception if it is unknown. *) + +val deprecated: ?def:t -> ?use:t -> t -> string -> unit diff --git a/analysis/vendor/compiler-libs-406/longident.ml b/analysis/vendor/ml/longident.ml similarity index 83% rename from analysis/vendor/compiler-libs-406/longident.ml rename to analysis/vendor/ml/longident.ml index 6f5d53983..acae9a6d3 100644 --- a/analysis/vendor/compiler-libs-406/longident.ml +++ b/analysis/vendor/ml/longident.ml @@ -17,6 +17,20 @@ type t = Lident of string | Ldot of t * string | Lapply of t * t +let rec cmp : t -> t -> int = + fun a b -> + if a == b then 0 + else + match (a, b) with + | Lident a, Lident b -> compare a b + | Lident _, _ -> -1 + | _, Lident _ -> 1 + | Ldot (a, b), Ldot (c, d) -> ( + match cmp a c with 0 -> compare b d | n -> n) + | Ldot _, _ -> -1 + | _, Ldot _ -> 1 + | Lapply (a, b), Lapply (c, d) -> ( + match cmp a c with 0 -> cmp b d | n -> n) let rec flat accu = function Lident s -> s :: accu diff --git a/analysis/vendor/compiler-libs-406/longident.mli b/analysis/vendor/ml/longident.mli similarity index 97% rename from analysis/vendor/compiler-libs-406/longident.mli rename to analysis/vendor/ml/longident.mli index 5ffb16a81..4c65fa647 100644 --- a/analysis/vendor/compiler-libs-406/longident.mli +++ b/analysis/vendor/ml/longident.mli @@ -20,6 +20,7 @@ type t = | Ldot of t * string | Lapply of t * t +val cmp : t -> t -> int val flatten: t -> string list val unflatten: string list -> t option val last: t -> string diff --git a/analysis/vendor/ml/matching.ml b/analysis/vendor/ml/matching.ml new file mode 100644 index 000000000..4802a3dbf --- /dev/null +++ b/analysis/vendor/ml/matching.ml @@ -0,0 +1,3235 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +(* Compilation of pattern matching *) + +open Misc +open Asttypes +open Types +open Typedtree +open Lambda +open Parmatch +open Printf + + +let dbg = false + +(* See Peyton-Jones, ``The Implementation of functional programming + languages'', chapter 5. *) +(* + Well, it was true at the beginning of the world. + Now, see Lefessant-Maranget ``Optimizing Pattern-Matching'' ICFP'2001 +*) + +(* + Compatibility predicate that considers potential rebindings of constructors + of an extension type. + + "may_compat p q" returns false when p and q never admit a common instance; + returns true when they may have a common instance. +*) + +module MayCompat = + Parmatch.Compat (struct let equal = Types.may_equal_constr end) +let may_compat = MayCompat.compat +and may_compats = MayCompat.compats + +(* + Many functions on the various data structures of the algorithm : + - Pattern matrices. + - Default environments: mapping from matrices to exit numbers. + - Contexts: matrices whose column are partitioned into + left and right. + - Jump summaries: mapping from exit numbers to contexts +*) + + +let string_of_lam lam = + Printlambda.lambda Format.str_formatter lam ; + Format.flush_str_formatter () + +type matrix = pattern list list + +let add_omega_column pss = List.map (fun ps -> omega::ps) pss + +type ctx = {left:pattern list ; right:pattern list} + +let pretty_ctx ctx = + List.iter + (fun {left=left ; right=right} -> + prerr_string "LEFT:" ; + pretty_line left ; + prerr_string " RIGHT:" ; + pretty_line right ; + prerr_endline "") + ctx + +let le_ctx c1 c2 = + le_pats c1.left c2.left && + le_pats c1.right c2.right + +let lshift {left=left ; right=right} = match right with +| x::xs -> {left=x::left ; right=xs} +| _ -> assert false + +let lforget {left=left ; right=right} = match right with +| _::xs -> {left=omega::left ; right=xs} +| _ -> assert false + +let rec small_enough n = function + | [] -> true + | _::rem -> + if n <= 0 then false + else small_enough (n-1) rem + +let ctx_lshift ctx = + if small_enough 31 ctx then + List.map lshift ctx + else (* Context pruning *) begin + get_mins le_ctx (List.map lforget ctx) + end + +let rshift {left=left ; right=right} = match left with +| p::ps -> {left=ps ; right=p::right} +| _ -> assert false + +let ctx_rshift ctx = List.map rshift ctx + +let rec nchars n ps = + if n <= 0 then [],ps + else match ps with + | p::rem -> + let chars, cdrs = nchars (n-1) rem in + p::chars,cdrs + | _ -> assert false + +let rshift_num n {left=left ; right=right} = + let shifted,left = nchars n left in + {left=left ; right = shifted@right} + +let ctx_rshift_num n ctx = List.map (rshift_num n) ctx + +(* Recombination of contexts (eg: (_,_)::p1::p2::rem -> (p1,p2)::rem) + All mutable fields are replaced by '_', since side-effects in + guards can alter these fields *) + +let combine {left=left ; right=right} = match left with +| p::ps -> {left=ps ; right=set_args_erase_mutable p right} +| _ -> assert false + +let ctx_combine ctx = List.map combine ctx + +let ncols = function + | [] -> 0 + | ps::_ -> List.length ps + + +exception NoMatch +exception OrPat + +let filter_matrix matcher pss = + + let rec filter_rec = function + | (p::ps)::rem -> + begin match p.pat_desc with + | Tpat_alias (p,_,_) -> + filter_rec ((p::ps)::rem) + | Tpat_var _ -> + filter_rec ((omega::ps)::rem) + | _ -> + begin + let rem = filter_rec rem in + try + matcher p ps::rem + with + | NoMatch -> rem + | OrPat -> + match p.pat_desc with + | Tpat_or (p1,p2,_) -> filter_rec [(p1::ps) ;(p2::ps)]@rem + | _ -> assert false + end + end + | [] -> [] + | _ -> + pretty_matrix pss ; + fatal_error "Matching.filter_matrix" in + filter_rec pss + +let make_default matcher env = + let rec make_rec = function + | [] -> [] + | ([[]],i)::_ -> [[[]],i] + | (pss,i)::rem -> + let rem = make_rec rem in + match filter_matrix matcher pss with + | [] -> rem + | ([]::_) -> ([[]],i)::rem + | pss -> (pss,i)::rem in + make_rec env + +let ctx_matcher p = + let p = normalize_pat p in + match p.pat_desc with + | Tpat_construct (_, cstr,omegas) -> + (fun q rem -> match q.pat_desc with + | Tpat_construct (_, cstr',args) +(* NB: may_constr_equal considers (potential) constructor rebinding *) + when Types.may_equal_constr cstr cstr' -> + p,args@rem + | Tpat_any -> p,omegas @ rem + | _ -> raise NoMatch) + | Tpat_constant cst -> + (fun q rem -> match q.pat_desc with + | Tpat_constant cst' when const_compare cst cst' = 0 -> + p,rem + | Tpat_any -> p,rem + | _ -> raise NoMatch) + | Tpat_variant (lab,Some omega,_) -> + (fun q rem -> match q.pat_desc with + | Tpat_variant (lab',Some arg,_) when lab=lab' -> + p,arg::rem + | Tpat_any -> p,omega::rem + | _ -> raise NoMatch) + | Tpat_variant (lab,None,_) -> + (fun q rem -> match q.pat_desc with + | Tpat_variant (lab',None,_) when lab=lab' -> + p,rem + | Tpat_any -> p,rem + | _ -> raise NoMatch) + | Tpat_array omegas -> + let len = List.length omegas in + (fun q rem -> match q.pat_desc with + | Tpat_array args when List.length args = len -> p,args @ rem + | Tpat_any -> p, omegas @ rem + | _ -> raise NoMatch) + | Tpat_tuple omegas -> + let len = List.length omegas in + (fun q rem -> match q.pat_desc with + | Tpat_tuple args when List.length args = len -> p,args @ rem + | Tpat_any -> p, omegas @ rem + | _ -> raise NoMatch) + | Tpat_record (((_, lbl, _) :: _) as l,_) -> (* Records are normalized *) + let len = Array.length lbl.lbl_all in + (fun q rem -> match q.pat_desc with + | Tpat_record (((_, lbl', _) :: _) as l',_) + when Array.length lbl'.lbl_all = len -> + let l' = all_record_args l' in + p, List.fold_right (fun (_, _,p) r -> p::r) l' rem + | Tpat_any -> p,List.fold_right (fun (_, _,p) r -> p::r) l rem + | _ -> raise NoMatch) + | Tpat_lazy omega -> + (fun q rem -> match q.pat_desc with + | Tpat_lazy arg -> p, (arg::rem) + | Tpat_any -> p, (omega::rem) + | _ -> raise NoMatch) + | _ -> fatal_error "Matching.ctx_matcher" + + + + +let filter_ctx q ctx = + + let matcher = ctx_matcher q in + + let rec filter_rec = function + | ({right=p::ps} as l)::rem -> + begin match p.pat_desc with + | Tpat_or (p1,p2,_) -> + filter_rec ({l with right=p1::ps}::{l with right=p2::ps}::rem) + | Tpat_alias (p,_,_) -> + filter_rec ({l with right=p::ps}::rem) + | Tpat_var _ -> + filter_rec ({l with right=omega::ps}::rem) + | _ -> + begin let rem = filter_rec rem in + try + let to_left, right = matcher p ps in + {left=to_left::l.left ; right=right}::rem + with + | NoMatch -> rem + end + end + | [] -> [] + | _ -> fatal_error "Matching.filter_ctx" in + + filter_rec ctx + +let select_columns pss ctx = + let n = ncols pss in + List.fold_right + (fun ps r -> + List.fold_right + (fun {left=left ; right=right} r -> + let transfert, right = nchars n right in + try + {left = lubs transfert ps @ left ; right=right}::r + with + | Empty -> r) + ctx r) + pss [] + +let ctx_lub p ctx = + List.fold_right + (fun {left=left ; right=right} r -> + match right with + | q::rem -> + begin try + {left=left ; right = lub p q::rem}::r + with + | Empty -> r + end + | _ -> fatal_error "Matching.ctx_lub") + ctx [] + +let ctx_match ctx pss = + List.exists + (fun {right=qs} -> List.exists (fun ps -> may_compats qs ps) pss) + ctx + +type jumps = (int * ctx list) list + +let pretty_jumps (env : jumps) = match env with +| [] -> () +| _ -> + List.iter + (fun (i,ctx) -> + Printf.fprintf stderr "jump for %d\n" i ; + pretty_ctx ctx) + env + + +let rec jumps_extract (i : int) = function + | [] -> [],[] + | (j,pss) as x::rem as all -> + if i=j then pss,rem + else if j < i then [],all + else + let r,rem = jumps_extract i rem in + r,(x::rem) + +let rec jumps_remove (i:int) = function + | [] -> [] + | (j,_)::rem when i=j -> rem + | x::rem -> x::jumps_remove i rem + +let jumps_empty = [] +and jumps_is_empty = function + | [] -> true + | _ -> false + +let jumps_singleton i = function + | [] -> [] + | ctx -> [i,ctx] + +let jumps_add i pss jumps = match pss with +| [] -> jumps +| _ -> + let rec add = function + | [] -> [i,pss] + | (j,qss) as x::rem as all -> + if (j:int) > i then x::add rem + else if j < i then (i,pss)::all + else (i,(get_mins le_ctx (pss@qss)))::rem in + add jumps + + +let rec jumps_union (env1:(int*ctx list)list) env2 = match env1,env2 with +| [],_ -> env2 +| _,[] -> env1 +| ((i1,pss1) as x1::rem1), ((i2,pss2) as x2::rem2) -> + if i1=i2 then + (i1,get_mins le_ctx (pss1@pss2))::jumps_union rem1 rem2 + else if i1 > i2 then + x1::jumps_union rem1 env2 + else + x2::jumps_union env1 rem2 + + +let rec merge = function + | env1::env2::rem -> jumps_union env1 env2::merge rem + | envs -> envs + +let rec jumps_unions envs = match envs with + | [] -> [] + | [env] -> env + | _ -> jumps_unions (merge envs) + +let jumps_map f env = + List.map + (fun (i,pss) -> i,f pss) + env + +(* Pattern matching before any compilation *) + +type pattern_matching = + { mutable cases : (pattern list * lambda) list; + args : (lambda * let_kind) list ; + default : (matrix * int) list} + +(* Pattern matching after application of both the or-pat rule and the + mixture rule *) + +type pm_or_compiled = + {body : pattern_matching ; + handlers : (matrix * int * Ident.t list * pattern_matching) list ; + or_matrix : matrix ; } + +type pm_half_compiled = + | PmOr of pm_or_compiled + | PmVar of pm_var_compiled + | Pm of pattern_matching + +and pm_var_compiled = + {inside : pm_half_compiled ; var_arg : lambda ; } + +type pm_half_compiled_info = + {me : pm_half_compiled ; + matrix : matrix ; + top_default : (matrix * int) list ; } + +let pretty_cases cases = + List.iter + (fun (ps,_l) -> + List.iter + (fun p -> + Parmatch.top_pretty Format.str_formatter p ; + prerr_string " " ; + prerr_string (Format.flush_str_formatter ())) + ps ; +(* + prerr_string " -> " ; + Printlambda.lambda Format.str_formatter l ; + prerr_string (Format.flush_str_formatter ()) ; +*) + prerr_endline "") + cases + +let pretty_def def = + prerr_endline "+++++ Defaults +++++" ; + List.iter + (fun (pss,i) -> + Printf.fprintf stderr "Matrix for %d\n" i ; + pretty_matrix pss) + def ; + prerr_endline "+++++++++++++++++++++" + +let pretty_pm pm = + pretty_cases pm.cases ; + if pm.default <> [] then + pretty_def pm.default + + +let rec pretty_precompiled = function + | Pm pm -> + prerr_endline "++++ PM ++++" ; + pretty_pm pm + | PmVar x -> + prerr_endline "++++ VAR ++++" ; + pretty_precompiled x.inside + | PmOr x -> + prerr_endline "++++ OR ++++" ; + pretty_pm x.body ; + pretty_matrix x.or_matrix ; + List.iter + (fun (_,i,_,pm) -> + eprintf "++ Handler %d ++\n" i ; + pretty_pm pm) + x.handlers + +let pretty_precompiled_res first nexts = + pretty_precompiled first ; + List.iter + (fun (e, pmh) -> + eprintf "** DEFAULT %d **\n" e ; + pretty_precompiled pmh) + nexts + + + +(* Identifying some semantically equivalent lambda-expressions, + Our goal here is also to + find alpha-equivalent (simple) terms *) + +(* However, as shown by PR#6359 such sharing may hinders the + lambda-code invariant that all bound idents are unique, + when switches are compiled to test sequences. + The definitive fix is the systematic introduction of exit/catch + in case action sharing is present. +*) + + +module StoreExp = + Switch.Store + (struct + type t = lambda + type key = lambda + let compare_key = compare + let make_key = Lambda.make_key + end) + + +let make_exit i = Lstaticraise (i,[]) + +(* Introduce a catch, if worth it *) +let make_catch d k = match d with +| Lstaticraise (_,[]) -> k d +| _ -> + let e = next_raise_count () in + Lstaticcatch (k (make_exit e),(e,[]),d) + +(* Introduce a catch, if worth it, delayed version *) +let rec as_simple_exit = function + | Lstaticraise (i,[]) -> Some i + | Llet (Alias,_k,_,_,e) -> as_simple_exit e + | _ -> None + + +let make_catch_delayed handler = match as_simple_exit handler with +| Some i -> i,(fun act -> act) +| None -> + let i = next_raise_count () in +(* + Printf.eprintf "SHARE LAMBDA: %i\n%s\n" i (string_of_lam handler); +*) + i, + (fun body -> match body with + | Lstaticraise (j,_) -> + if i=j then handler else body + | _ -> Lstaticcatch (body,(i,[]),handler)) + + +let raw_action l = + match make_key l with | Some l -> l | None -> l + + +let tr_raw act = match make_key act with +| Some act -> act +| None -> raise Exit + +let same_actions = function + | [] -> None + | [_,act] -> Some act + | (_,act0) :: rem -> + try + let raw_act0 = tr_raw act0 in + let rec s_rec = function + | [] -> Some act0 + | (_,act)::rem -> + if raw_act0 = tr_raw act then + s_rec rem + else + None in + s_rec rem + with + | Exit -> None + + +(* Test for swapping two clauses *) + +let up_ok_action act1 act2 = + try + let raw1 = tr_raw act1 + and raw2 = tr_raw act2 in + raw1 = raw2 + with + | Exit -> false + +let up_ok (ps,act_p) l = + List.for_all + (fun (qs,act_q) -> + up_ok_action act_p act_q || not (may_compats ps qs)) + l + +(* + The simplify function normalizes the first column of the match + - records are expanded so that they possess all fields + - aliases are removed and replaced by bindings in actions. + However or-patterns are simplified differently, + - aliases are not removed + - or-patterns (_|p) are changed into _ +*) + +exception Var of pattern + +let simplify_or p = + let rec simpl_rec p = match p with + | {pat_desc = Tpat_any|Tpat_var _} -> raise (Var p) + | {pat_desc = Tpat_alias (q,id,s)} -> + begin try + {p with pat_desc = Tpat_alias (simpl_rec q,id,s)} + with + | Var q -> raise (Var {p with pat_desc = Tpat_alias (q,id,s)}) + end + | {pat_desc = Tpat_or (p1,p2,o)} -> + let q1 = simpl_rec p1 in + begin try + let q2 = simpl_rec p2 in + {p with pat_desc = Tpat_or (q1, q2, o)} + with + | Var q2 -> raise (Var {p with pat_desc = Tpat_or (q1, q2, o)}) + end + | {pat_desc = Tpat_record (lbls,closed)} -> + let all_lbls = all_record_args lbls in + {p with pat_desc=Tpat_record (all_lbls, closed)} + | _ -> p in + try + simpl_rec p + with + | Var p -> p + +let simplify_cases args cls = match args with +| [] -> assert false +| (arg,_)::_ -> + let rec simplify = function + | [] -> [] + | ((pat :: patl, action) as cl) :: rem -> + begin match pat.pat_desc with + | Tpat_var (id, _) -> + (omega :: patl, bind Alias id arg action) :: + simplify rem + | Tpat_any -> + cl :: simplify rem + | Tpat_alias(p, id,_) -> + simplify ((p :: patl, bind Alias id arg action) :: rem) + | Tpat_record ([],_) -> + (omega :: patl, action):: + simplify rem + | Tpat_record (lbls, closed) -> + let all_lbls = all_record_args lbls in + let full_pat = + {pat with pat_desc=Tpat_record (all_lbls, closed)} in + (full_pat::patl,action):: + simplify rem + | Tpat_or _ -> + let pat_simple = simplify_or pat in + begin match pat_simple.pat_desc with + | Tpat_or _ -> + (pat_simple :: patl, action) :: + simplify rem + | _ -> + simplify ((pat_simple::patl,action) :: rem) + end + | _ -> cl :: simplify rem + end + | _ -> assert false in + + simplify cls + + + +(* Once matchings are simplified one can easily find + their nature *) + +let rec what_is_cases cases = match cases with +| ({pat_desc=Tpat_any} :: _, _) :: rem -> what_is_cases rem +| (({pat_desc=(Tpat_var _|Tpat_or (_,_,_)|Tpat_alias (_,_,_))}::_),_)::_ + -> assert false (* applies to simplified matchings only *) +| (p::_,_)::_ -> p +| [] -> omega +| _ -> assert false + + + +(* A few operations on default environments *) +let as_matrix cases = get_mins le_pats (List.map (fun (ps,_) -> ps) cases) + +let cons_default matrix raise_num default = + match matrix with + | [] -> default + | _ -> (matrix,raise_num)::default + +let default_compat p def = + List.fold_right + (fun (pss,i) r -> + let qss = + List.fold_right + (fun qs r -> match qs with + | q::rem when may_compat p q -> rem::r + | _ -> r) + pss [] in + match qss with + | [] -> r + | _ -> (qss,i)::r) + def [] + +(* Or-pattern expansion, variables are a complication w.r.t. the article *) +let rec extract_vars r p = match p.pat_desc with +| Tpat_var (id, _) -> IdentSet.add id r +| Tpat_alias (p, id,_ ) -> + extract_vars (IdentSet.add id r) p +| Tpat_tuple pats -> + List.fold_left extract_vars r pats +| Tpat_record (lpats,_) -> + List.fold_left + (fun r (_, _, p) -> extract_vars r p) + r lpats +| Tpat_construct (_, _, pats) -> + List.fold_left extract_vars r pats +| Tpat_array pats -> + List.fold_left extract_vars r pats +| Tpat_variant (_,Some p, _) -> extract_vars r p +| Tpat_lazy p -> extract_vars r p +| Tpat_or (p,_,_) -> extract_vars r p +| Tpat_constant _|Tpat_any|Tpat_variant (_,None,_) -> r + +exception Cannot_flatten + +let mk_alpha_env arg aliases ids = + List.map + (fun id -> id, + if List.mem id aliases then + match arg with + | Some v -> v + | _ -> raise Cannot_flatten + else + Ident.create (Ident.name id)) + ids + +let rec explode_or_pat arg patl mk_action rem vars aliases = function + | {pat_desc = Tpat_or (p1,p2,_)} -> + explode_or_pat + arg patl mk_action + (explode_or_pat arg patl mk_action rem vars aliases p2) + vars aliases p1 + | {pat_desc = Tpat_alias (p,id, _)} -> + explode_or_pat arg patl mk_action rem vars (id::aliases) p + | {pat_desc = Tpat_var (x, _)} -> + let env = mk_alpha_env arg (x::aliases) vars in + (omega::patl,mk_action (List.map snd env))::rem + | p -> + let env = mk_alpha_env arg aliases vars in + (alpha_pat env p::patl,mk_action (List.map snd env))::rem + +let pm_free_variables {cases=cases} = + List.fold_right + (fun (_,act) r -> IdentSet.union (free_variables act) r) + cases IdentSet.empty + + +(* Basic grouping predicates *) +let pat_as_constr = function + | {pat_desc=Tpat_construct (_, cstr,_)} -> cstr + | _ -> fatal_error "Matching.pat_as_constr" + +let group_constant = function + | {pat_desc= Tpat_constant _} -> true + | _ -> false + +and group_constructor = function + | {pat_desc = Tpat_construct (_,_,_)} -> true + | _ -> false + +and group_variant = function + | {pat_desc = Tpat_variant (_, _, _)} -> true + | _ -> false + +and group_var = function + | {pat_desc=Tpat_any} -> true + | _ -> false + +and group_tuple = function + | {pat_desc = (Tpat_tuple _|Tpat_any)} -> true + | _ -> false + +and group_record = function + | {pat_desc = (Tpat_record _|Tpat_any)} -> true + | _ -> false + +and group_array = function + | {pat_desc=Tpat_array _} -> true + | _ -> false + +and group_lazy = function + | {pat_desc = Tpat_lazy _} -> true + | _ -> false + +let get_group p = match p.pat_desc with +| Tpat_any -> group_var +| Tpat_constant _ -> group_constant +| Tpat_construct _ -> group_constructor +| Tpat_tuple _ -> group_tuple +| Tpat_record _ -> group_record +| Tpat_array _ -> group_array +| Tpat_variant (_,_,_) -> group_variant +| Tpat_lazy _ -> group_lazy +| _ -> fatal_error "Matching.get_group" + + + +let is_or p = match p.pat_desc with +| Tpat_or _ -> true +| _ -> false + +(* Conditions for appending to the Or matrix *) +let conda p q = not (may_compat p q) +and condb act ps qs = not (is_guarded act) && Parmatch.le_pats qs ps + +let or_ok p ps l = + List.for_all + (function + | ({pat_desc=Tpat_or _} as q::qs,act) -> + conda p q || condb act ps qs + | _ -> true) + l + +(* Insert or append a pattern in the Or matrix *) + +let equiv_pat p q = le_pat p q && le_pat q p + +let rec get_equiv p l = match l with + | (q::_,_) as cl::rem -> + if equiv_pat p q then + let others,rem = get_equiv p rem in + cl::others,rem + else + [],l + | _ -> [],l + + +let insert_or_append p ps act ors no = + let rec attempt seen = function + | (q::qs,act_q) as cl::rem -> + if is_or q then begin + if may_compat p q then + if + IdentSet.is_empty (extract_vars IdentSet.empty p) && + IdentSet.is_empty (extract_vars IdentSet.empty q) && + equiv_pat p q + then (* attempt insert, for equivalent orpats with no variables *) + let _, not_e = get_equiv q rem in + if + or_ok p ps not_e && (* check append condition for head of O *) + List.for_all (* check insert condition for tail of O *) + (fun cl -> match cl with + | (q::_,_) -> not (may_compat p q) + | _ -> assert false) + seen + then (* insert *) + List.rev_append seen ((p::ps,act)::cl::rem), no + else (* fail to insert or append *) + ors,(p::ps,act)::no + else if condb act_q ps qs then (* check condition (b) for append *) + attempt (cl::seen) rem + else + ors,(p::ps,act)::no + else (* p # q, go on with append/insert *) + attempt (cl::seen) rem + end else (* q is not an or-pat, go on with append/insert *) + attempt (cl::seen) rem + | _ -> (* [] in fact *) + (p::ps,act)::ors,no in (* success in appending *) + attempt [] ors + +(* Reconstruct default information from half_compiled pm list *) + +let rec rebuild_matrix pmh = match pmh with + | Pm pm -> as_matrix pm.cases + | PmOr {or_matrix=m} -> m + | PmVar x -> add_omega_column (rebuild_matrix x.inside) + +let rec rebuild_default nexts def = match nexts with +| [] -> def +| (e, pmh)::rem -> + (add_omega_column (rebuild_matrix pmh), e):: + rebuild_default rem def + +let rebuild_nexts arg nexts k = + List.fold_right + (fun (e, pm) k -> (e, PmVar {inside=pm ; var_arg=arg})::k) + nexts k + + +(* + Split a matching. + Splitting is first directed by or-patterns, then by + tests (e.g. constructors)/variable transitions. + + The approach is greedy, every split function attempts to + raise rows as much as possible in the top matrix, + then splitting applies again to the remaining rows. + + Some precompilation of or-patterns and + variable pattern occurs. Mostly this means that bindings + are performed now, being replaced by let-bindings + in actions (cf. simplify_cases). + + Additionally, if the match argument is a variable, matchings whose + first column is made of variables only are splitted further + (cf. precompile_var). + +*) + + +let rec split_or argo cls args def = + + let cls = simplify_cases args cls in + + let rec do_split before ors no = function + | [] -> + cons_next + (List.rev before) (List.rev ors) (List.rev no) + | ((p::ps,act) as cl)::rem -> + if up_ok cl no then + if is_or p then + let ors, no = insert_or_append p ps act ors no in + do_split before ors no rem + else begin + if up_ok cl ors then + do_split (cl::before) ors no rem + else if or_ok p ps ors then + do_split before (cl::ors) no rem + else + do_split before ors (cl::no) rem + end + else + do_split before ors (cl::no) rem + | _ -> assert false + + and cons_next yes yesor = function + | [] -> + precompile_or argo yes yesor args def [] + | rem -> + let {me=next ; matrix=matrix ; top_default=def},nexts = + do_split [] [] [] rem in + let idef = next_raise_count () in + precompile_or + argo yes yesor args + (cons_default matrix idef def) + ((idef,next)::nexts) in + + do_split [] [] [] cls + +(* Ultra-naive splitting, close to semantics, used for extension, + as potential rebind prevents any kind of optimisation *) + +and split_naive cls args def k = + + let rec split_exc cstr0 yes = function + | [] -> + let yes = List.rev yes in + { me = Pm {cases=yes; args=args; default=def;} ; + matrix = as_matrix yes ; + top_default=def}, + k + | (p::_,_ as cl)::rem -> + if group_constructor p then + let cstr = pat_as_constr p in + if cstr = cstr0 then split_exc cstr0 (cl::yes) rem + else + let yes = List.rev yes in + let {me=next ; matrix=matrix ; top_default=def}, nexts = + split_exc cstr [cl] rem in + let idef = next_raise_count () in + let def = cons_default matrix idef def in + { me = Pm {cases=yes; args=args; default=def} ; + matrix = as_matrix yes ; + top_default = def; }, + (idef,next)::nexts + else + let yes = List.rev yes in + let {me=next ; matrix=matrix ; top_default=def}, nexts = + split_noexc [cl] rem in + let idef = next_raise_count () in + let def = cons_default matrix idef def in + { me = Pm {cases=yes; args=args; default=def} ; + matrix = as_matrix yes ; + top_default = def; }, + (idef,next)::nexts + | _ -> assert false + + and split_noexc yes = function + | [] -> precompile_var args (List.rev yes) def k + | (p::_,_ as cl)::rem -> + if group_constructor p then + let yes= List.rev yes in + let {me=next; matrix=matrix; top_default=def;},nexts = + split_exc (pat_as_constr p) [cl] rem in + let idef = next_raise_count () in + precompile_var + args yes + (cons_default matrix idef def) + ((idef,next)::nexts) + else split_noexc (cl::yes) rem + | _ -> assert false in + + match cls with + | [] -> assert false + | (p::_,_ as cl)::rem -> + if group_constructor p then + split_exc (pat_as_constr p) [cl] rem + else + split_noexc [cl] rem + | _ -> assert false + +and split_constr cls args def k = + let ex_pat = what_is_cases cls in + match ex_pat.pat_desc with + | Tpat_any -> precompile_var args cls def k + | Tpat_construct (_,{cstr_tag=Cstr_extension _},_) -> + split_naive cls args def k + | _ -> + + let group = get_group ex_pat in + + let rec split_ex yes no = function + | [] -> + let yes = List.rev yes and no = List.rev no in + begin match no with + | [] -> + {me = Pm {cases=yes ; args=args ; default=def} ; + matrix = as_matrix yes ; + top_default = def}, + k + | cl::rem -> + begin match yes with + | [] -> + (* Could not success in raising up a constr matching up *) + split_noex [cl] [] rem + | _ -> + let {me=next ; matrix=matrix ; top_default=def}, nexts = + split_noex [cl] [] rem in + let idef = next_raise_count () in + let def = cons_default matrix idef def in + {me = Pm {cases=yes ; args=args ; default=def} ; + matrix = as_matrix yes ; + top_default = def }, + (idef, next)::nexts + end + end + | (p::_,_) as cl::rem -> + if group p && up_ok cl no then + split_ex (cl::yes) no rem + else + split_ex yes (cl::no) rem + | _ -> assert false + + and split_noex yes no = function + | [] -> + let yes = List.rev yes and no = List.rev no in + begin match no with + | [] -> precompile_var args yes def k + | cl::rem -> + let {me=next ; matrix=matrix ; top_default=def}, nexts = + split_ex [cl] [] rem in + let idef = next_raise_count () in + precompile_var + args yes + (cons_default matrix idef def) + ((idef,next)::nexts) + end + | [ps,_ as cl] + when List.for_all group_var ps && yes <> [] -> + (* This enables an extra division in some frequent cases : + last row is made of variables only *) + split_noex yes (cl::no) [] + | (p::_,_) as cl::rem -> + if not (group p) && up_ok cl no then + split_noex (cl::yes) no rem + else + split_noex yes (cl::no) rem + | _ -> assert false in + + match cls with + | ((p::_,_) as cl)::rem -> + if group p then split_ex [cl] [] rem + else split_noex [cl] [] rem + | _ -> assert false + +and precompile_var args cls def k = match args with +| [] -> assert false +| _::((Lvar v as av,_) as arg)::rargs -> + begin match cls with + | [_] -> (* as splitted as it can *) + dont_precompile_var args cls def k + | _ -> +(* Precompile *) + let var_cls = + List.map + (fun (ps,act) -> match ps with + | _::ps -> ps,act | _ -> assert false) + cls + and var_def = make_default (fun _ rem -> rem) def in + let {me=first ; matrix=matrix}, nexts = + split_or (Some v) var_cls (arg::rargs) var_def in + +(* Compute top information *) + match nexts with + | [] -> (* If you need *) + dont_precompile_var args cls def k + | _ -> + let rfirst = + {me = PmVar {inside=first ; var_arg = av} ; + matrix = add_omega_column matrix ; + top_default = rebuild_default nexts def ; } + and rnexts = rebuild_nexts av nexts k in + rfirst, rnexts + end +| _ -> + dont_precompile_var args cls def k + +and dont_precompile_var args cls def k = + {me = Pm {cases = cls ; args = args ; default = def } ; + matrix=as_matrix cls ; + top_default=def},k + +and precompile_or argo cls ors args def k = match ors with +| [] -> split_constr cls args def k +| _ -> + let rec do_cases = function + | ({pat_desc=Tpat_or _} as orp::patl, action)::rem -> + let others,rem = get_equiv orp rem in + let orpm = + {cases = + (patl, action):: + List.map + (function + | (_::ps,action) -> ps,action + | _ -> assert false) + others ; + args = (match args with _::r -> r | _ -> assert false) ; + default = default_compat orp def} in + let vars = + IdentSet.elements + (IdentSet.inter + (extract_vars IdentSet.empty orp) + (pm_free_variables orpm)) in + let or_num = next_raise_count () in + let new_patl = Parmatch.omega_list patl in + + let mk_new_action vs = + Lstaticraise + (or_num, List.map (fun v -> Lvar v) vs) in + + let body,handlers = do_cases rem in + explode_or_pat + argo new_patl mk_new_action body vars [] orp, + let mat = [[orp]] in + ((mat, or_num, vars , orpm):: handlers) + | cl::rem -> + let new_ord,new_to_catch = do_cases rem in + cl::new_ord,new_to_catch + | [] -> [],[] in + + let end_body, handlers = do_cases ors in + let matrix = as_matrix (cls@ors) + and body = {cases=cls@end_body ; args=args ; default=def} in + {me = PmOr {body=body ; handlers=handlers ; or_matrix=matrix} ; + matrix=matrix ; + top_default=def}, + k + +let split_precompile argo pm = + let {me=next}, nexts = split_or argo pm.cases pm.args pm.default in + if dbg && (nexts <> [] || (match next with PmOr _ -> true | _ -> false)) + then begin + prerr_endline "** SPLIT **" ; + pretty_pm pm ; + pretty_precompiled_res next nexts + end ; + next, nexts + + +(* General divide functions *) + +let add_line patl_action pm = pm.cases <- patl_action :: pm.cases; pm + +type cell = + {pm : pattern_matching ; + ctx : ctx list ; + pat : pattern} + +let add make_matching_fun division eq_key key patl_action args = + try + let (_,cell) = List.find (fun (k,_) -> eq_key key k) division in + cell.pm.cases <- patl_action :: cell.pm.cases; + division + with Not_found -> + let cell = make_matching_fun args in + cell.pm.cases <- [patl_action] ; + (key, cell) :: division + + +let divide make eq_key get_key get_args ctx pm = + + let rec divide_rec = function + | (p::patl,action) :: rem -> + let this_match = divide_rec rem in + add + (make p pm.default ctx) + this_match eq_key (get_key p) (get_args p patl,action) pm.args + | _ -> [] in + + divide_rec pm.cases + + +let divide_line make_ctx make get_args pat ctx pm = + let rec divide_rec = function + | (p::patl,action) :: rem -> + let this_match = divide_rec rem in + add_line (get_args p patl, action) this_match + | _ -> make pm.default pm.args in + + {pm = divide_rec pm.cases ; + ctx=make_ctx ctx ; + pat=pat} + + + +(* Then come various functions, + There is one set of functions per matching style + (constants, constructors etc.) + + - matcher functions are arguments to make_default (for default handlers) + They may raise NoMatch or OrPat and perform the full + matching (selection + arguments). + + + - get_args and get_key are for the compiled matrices, note that + selection and getting arguments are separated. + + - make_ _matching combines the previous functions for producing + new ``pattern_matching'' records. +*) + + + +let rec matcher_const cst p rem = match p.pat_desc with +| Tpat_or (p1,p2,_) -> + begin try + matcher_const cst p1 rem with + | NoMatch -> matcher_const cst p2 rem + end +| Tpat_constant c1 when const_compare c1 cst = 0 -> rem +| Tpat_any -> rem +| _ -> raise NoMatch + +let get_key_constant caller = function + | {pat_desc= Tpat_constant cst} -> cst + | p -> + prerr_endline ("BAD: "^caller) ; + pretty_pat p ; + assert false + +let get_args_constant _ rem = rem + +let make_constant_matching p def ctx = function + [] -> fatal_error "Matching.make_constant_matching" + | (_ :: argl) -> + let def = + make_default + (matcher_const (get_key_constant "make" p)) def + and ctx = + filter_ctx p ctx in + {pm = {cases = []; args = argl ; default = def} ; + ctx = ctx ; + pat = normalize_pat p} + + + + +let divide_constant ctx m = + divide + make_constant_matching + (fun c d -> const_compare c d = 0) (get_key_constant "divide") + get_args_constant + ctx m + +(* Matching against a constructor *) + + +let make_field_args ~fld_info loc binding_kind arg first_pos last_pos argl = + let rec make_args pos = + if pos > last_pos + then argl + else (Lprim(Pfield (pos, fld_info), [arg], loc), binding_kind) :: make_args (pos + 1) + in make_args first_pos + +let get_key_constr = function + | {pat_desc=Tpat_construct (_, cstr,_)} -> cstr.cstr_tag + | _ -> assert false + +let get_args_constr p rem = match p with +| {pat_desc=Tpat_construct (_, _, args)} -> args @ rem +| _ -> assert false + +(* NB: matcher_constr applies to default matrices. + + In that context, matching by constructors of extensible + types degrades to arity checking, due to potential rebinding. + This comparison is performed by Types.may_equal_constr. +*) + +let matcher_constr cstr = match cstr.cstr_arity with +| 0 -> + let rec matcher_rec q rem = match q.pat_desc with + | Tpat_or (p1,p2,_) -> + begin + try matcher_rec p1 rem + with NoMatch -> matcher_rec p2 rem + end + | Tpat_construct (_, cstr',[]) + when Types.may_equal_constr cstr cstr' -> rem + | Tpat_any -> rem + | _ -> raise NoMatch in + matcher_rec +| 1 -> + let rec matcher_rec q rem = match q.pat_desc with + | Tpat_or (p1,p2,_) -> + let r1 = try Some (matcher_rec p1 rem) with NoMatch -> None + and r2 = try Some (matcher_rec p2 rem) with NoMatch -> None in + begin match r1,r2 with + | None, None -> raise NoMatch + | Some r1, None -> r1 + | None, Some r2 -> r2 + | Some (a1::_), Some (a2::_) -> + {a1 with + pat_loc = Location.none ; + pat_desc = Tpat_or (a1, a2, None)}:: + rem + | _, _ -> assert false + end + | Tpat_construct (_, cstr', [arg]) + when Types.may_equal_constr cstr cstr' -> arg::rem + | Tpat_any -> omega::rem + | _ -> raise NoMatch in + matcher_rec +| _ -> + fun q rem -> match q.pat_desc with + | Tpat_or (_,_,_) -> raise OrPat + | Tpat_construct (_,cstr',args) + when Types.may_equal_constr cstr cstr' -> args @ rem + | Tpat_any -> Parmatch.omegas cstr.cstr_arity @ rem + | _ -> raise NoMatch + +let is_not_none_bs_primitve : Lambda.primitive = + Pccall + (Primitive.simple ~name:"#is_not_none" ~arity:1 ~alloc:false) + +let val_from_option_bs_primitive : Lambda.primitive = + Pccall + (Primitive.simple ~name:"#val_from_option" ~arity:1 ~alloc:true) + +let val_from_unnest_option_bs_primitive : Lambda.primitive = + Pccall + (Primitive.simple ~name:"#val_from_unnest_option" ~arity:1 ~alloc:true) + +let make_constr_matching p def ctx = function + [] -> fatal_error "Matching.make_constr_matching" + | ((arg, _mut) :: argl) -> + let cstr = pat_as_constr p in + let newargs = + if cstr.cstr_inlined <> None then + (arg, Alias) :: argl + else match cstr.cstr_tag with + | Cstr_block _ when + !Config.bs_only && + Datarepr.constructor_has_optional_shape cstr + -> + begin + let from_option = + match p.pat_desc with + | Tpat_construct(_, _, + [ { + pat_type ; pat_env + } ]) + when Typeopt.cannot_inhabit_none_like_value pat_type pat_env + -> val_from_unnest_option_bs_primitive + | _ -> val_from_option_bs_primitive in + (Lprim (from_option, [arg], p.pat_loc), Alias) :: argl + end + | Cstr_constant _ + | Cstr_block _ -> + make_field_args p.pat_loc Alias arg 0 (cstr.cstr_arity - 1) argl + ~fld_info:(if cstr.cstr_name = "::" then Fld_cons else Fld_variant) + | Cstr_unboxed -> (arg, Alias) :: argl + | Cstr_extension _ -> + make_field_args p.pat_loc Alias arg 1 cstr.cstr_arity argl + ~fld_info:Fld_extension + in + {pm= + {cases = []; args = newargs; + default = make_default (matcher_constr cstr) def} ; + ctx = filter_ctx p ctx ; + pat=normalize_pat p} + + +let divide_constructor ctx pm = + divide + make_constr_matching + Types.equal_tag get_key_constr get_args_constr + ctx pm + +(* Matching against a variant *) + +let rec matcher_variant_const lab p rem = match p.pat_desc with +| Tpat_or (p1, p2, _) -> + begin + try + matcher_variant_const lab p1 rem + with + | NoMatch -> matcher_variant_const lab p2 rem + end +| Tpat_variant (lab1,_,_) when lab1=lab -> rem +| Tpat_any -> rem +| _ -> raise NoMatch + + +let make_variant_matching_constant p lab def ctx = function + [] -> fatal_error "Matching.make_variant_matching_constant" + | (_ :: argl) -> + let def = make_default (matcher_variant_const lab) def + and ctx = filter_ctx p ctx in + {pm={ cases = []; args = argl ; default=def} ; + ctx=ctx ; + pat = normalize_pat p} + +let matcher_variant_nonconst lab p rem = match p.pat_desc with +| Tpat_or (_,_,_) -> raise OrPat +| Tpat_variant (lab1,Some arg,_) when lab1=lab -> arg::rem +| Tpat_any -> omega::rem +| _ -> raise NoMatch + + +let make_variant_matching_nonconst p lab def ctx = function + [] -> fatal_error "Matching.make_variant_matching_nonconst" + | ((arg, _mut) :: argl) -> + let def = make_default (matcher_variant_nonconst lab) def + and ctx = filter_ctx p ctx in + {pm= + {cases = []; args = (Lprim(Pfield (1, Fld_poly_var_content), [arg], p.pat_loc), Alias) :: argl; + default=def} ; + ctx=ctx ; + pat = normalize_pat p} + +let divide_variant row ctx {cases = cl; args = al; default=def} = + let row = Btype.row_repr row in + let rec divide = function + ({pat_desc = Tpat_variant(lab, pato, _)} as p:: patl, action) :: rem -> + let variants = divide rem in + if try Btype.row_field_repr (List.assoc lab row.row_fields) = Rabsent + with Not_found -> true + then + variants + else begin + let tag = Btype.hash_variant lab in + let (=) ((a:string),(b:Types.constructor_tag)) (c,d) = + a = c && Types.equal_tag b d + in + match pato with + None -> + add (make_variant_matching_constant p lab def ctx) variants + (=) (lab,Cstr_constant tag) (patl, action) al + | Some pat -> + add (make_variant_matching_nonconst p lab def ctx) variants + (=) (lab,Cstr_block tag) (pat :: patl, action) al + end + | _ -> [] + in + divide cl + +(* + Three ``no-test'' cases + *) + +(* Matching against a variable *) + +let get_args_var _ rem = rem + + +let make_var_matching def = function + | [] -> fatal_error "Matching.make_var_matching" + | _::argl -> + {cases=[] ; + args = argl ; + default= make_default get_args_var def} + +let divide_var ctx pm = + divide_line ctx_lshift make_var_matching get_args_var omega ctx pm + +(* Matching and forcing a lazy value *) + +let get_arg_lazy p rem = match p with +| {pat_desc = Tpat_any} -> omega :: rem +| {pat_desc = Tpat_lazy arg} -> arg :: rem +| _ -> assert false + +let matcher_lazy p rem = match p.pat_desc with +| Tpat_or (_,_,_) -> raise OrPat +| Tpat_any +| Tpat_var _ -> omega :: rem +| Tpat_lazy arg -> arg :: rem +| _ -> raise NoMatch + +(* Inlining the tag tests before calling the primitive that works on + lazy blocks. This is also used in translcore.ml. + No other call than Obj.tag when the value has been forced before. +*) + + +let get_mod_field modname field = + lazy ( + try + let mod_ident = Ident.create_persistent modname in + let env = Env.open_pers_signature modname Env.initial_safe_string in + let p = try + match Env.lookup_value (Longident.Lident field) env with + | (Path.Pdot(_,_,i), _) -> i + | _ -> fatal_error ("Primitive "^modname^"."^field^" not found.") + with Not_found -> + fatal_error ("Primitive "^modname^"."^field^" not found.") + in + Lprim(Pfield (p, Fld_module {name = field}), + [Lprim(Pgetglobal mod_ident, [], Location.none)], + Location.none) + with Not_found -> fatal_error ("Module "^modname^" unavailable.") + ) + + +let code_force = + get_mod_field "CamlinternalLazy" "force" +;; + +(* inline_lazy_force inlines the beginning of the code of Lazy.force. When + the value argument is tagged as: + - forward, take field 0 + - lazy, call the primitive that forces (without testing again the tag) + - anything else, return it + + Using Lswitch below relies on the fact that the GC does not shortcut + Forward(val_out_of_heap). +*) + + +let inline_lazy_force arg loc = + Lapply { ap_func = Lazy.force code_force; ap_inlined = Default_inline; ap_args = [arg]; ap_loc = loc} +let make_lazy_matching def = function + [] -> fatal_error "Matching.make_lazy_matching" + | (arg,_mut) :: argl -> + { cases = []; + args = + (inline_lazy_force arg Location.none, Strict) :: argl; + default = make_default matcher_lazy def } + +let divide_lazy p ctx pm = + divide_line + (filter_ctx p) + make_lazy_matching + get_arg_lazy + p ctx pm + +(* Matching against a tuple pattern *) + + +let get_args_tuple arity p rem = match p with +| {pat_desc = Tpat_any} -> omegas arity @ rem +| {pat_desc = Tpat_tuple args} -> + args @ rem +| _ -> assert false + +let matcher_tuple arity p rem = match p.pat_desc with +| Tpat_or (_,_,_) -> raise OrPat +| Tpat_any +| Tpat_var _ -> omegas arity @ rem +| Tpat_tuple args when List.length args = arity -> args @ rem +| _ -> raise NoMatch + +let make_tuple_matching loc arity def = function + [] -> fatal_error "Matching.make_tuple_matching" + | (arg, _mut) :: argl -> + let rec make_args pos = + if pos >= arity + then argl + else (Lprim(Pfield (pos, Fld_tuple), [arg], loc), Alias) :: make_args (pos + 1) in + {cases = []; args = make_args 0 ; + default=make_default (matcher_tuple arity) def} + + +let divide_tuple arity p ctx pm = + divide_line + (filter_ctx p) + (make_tuple_matching p.pat_loc arity) + (get_args_tuple arity) p ctx pm + +(* Matching against a record pattern *) + + +let record_matching_line num_fields lbl_pat_list = + let patv = Array.make num_fields omega in + List.iter (fun (_, lbl, pat) -> patv.(lbl.lbl_pos) <- pat) lbl_pat_list; + Array.to_list patv + +let get_args_record num_fields p rem = match p with +| {pat_desc=Tpat_any} -> + record_matching_line num_fields [] @ rem +| {pat_desc=Tpat_record (lbl_pat_list,_)} -> + record_matching_line num_fields lbl_pat_list @ rem +| _ -> assert false + +let matcher_record num_fields p rem = match p.pat_desc with +| Tpat_or (_,_,_) -> raise OrPat +| Tpat_any +| Tpat_var _ -> + record_matching_line num_fields [] @ rem +| Tpat_record ([], _) when num_fields = 0 -> rem +| Tpat_record ((_, lbl, _) :: _ as lbl_pat_list, _) + when Array.length lbl.lbl_all = num_fields -> + record_matching_line num_fields lbl_pat_list @ rem +| _ -> raise NoMatch + +let make_record_matching loc all_labels def = function + [] -> fatal_error "Matching.make_record_matching" + | ((arg, _mut) :: argl) -> + let rec make_args pos = + if pos >= Array.length all_labels then argl else begin + let lbl = all_labels.(pos) in + let access = + match lbl.lbl_repres with + | Record_float_unused -> assert false + | Record_regular | Record_optional_labels _ -> + Lprim (Pfield (lbl.lbl_pos, !Lambda.fld_record lbl), [arg], loc) + | Record_inlined _ -> + Lprim (Pfield (lbl.lbl_pos, Fld_record_inline {name = lbl.lbl_name}), [arg], loc) + | Record_unboxed _ -> arg + | Record_extension -> Lprim (Pfield (lbl.lbl_pos + 1, Fld_record_extension {name = lbl.lbl_name}), [arg], loc) + in + let str = + match lbl.lbl_mut with + Immutable -> Alias + | Mutable -> StrictOpt in + (access, str) :: make_args(pos + 1) + end in + let nfields = Array.length all_labels in + let def= make_default (matcher_record nfields) def in + {cases = []; args = make_args 0 ; default = def} + + +let divide_record all_labels p ctx pm = + let get_args = get_args_record (Array.length all_labels) in + divide_line + (filter_ctx p) + (make_record_matching p.pat_loc all_labels) + get_args + p ctx pm + +(* Matching against an array pattern *) + +let get_key_array = function + | {pat_desc=Tpat_array patl} -> List.length patl + | _ -> assert false + +let get_args_array p rem = match p with +| {pat_desc=Tpat_array patl} -> patl@rem +| _ -> assert false + +let matcher_array len p rem = match p.pat_desc with +| Tpat_or (_,_,_) -> raise OrPat +| Tpat_array args when List.length args=len -> args @ rem +| Tpat_any -> Parmatch.omegas len @ rem +| _ -> raise NoMatch + +let make_array_matching p def ctx = function + | [] -> fatal_error "Matching.make_array_matching" + | ((arg, _mut) :: argl) -> + let len = get_key_array p in + let rec make_args pos = + if pos >= len + then argl + else (Lprim(Parrayrefu , + [arg; Lconst(Const_base(Const_int pos))], + p.pat_loc), + StrictOpt) :: make_args (pos + 1) in + let def = make_default (matcher_array len) def + and ctx = filter_ctx p ctx in + {pm={cases = []; args = make_args 0 ; default = def} ; + ctx=ctx ; + pat = normalize_pat p} + +let divide_array ctx pm = + divide + make_array_matching + (=) get_key_array get_args_array ctx pm + + +(* + Specific string test sequence + Will be called by the bytecode compiler, from bytegen.ml. + The strategy is first dichotomic search (we perform 3-way tests + with compare_string), then sequence of equality tests + when there are less then T=strings_test_threshold static strings to match. + + Increasing T entails (slightly) less code, decreasing T + (slightly) favors runtime speed. + T=8 looks a decent tradeoff. +*) + +(* Utilities *) + +let strings_test_threshold = 8 + +let prim_string_notequal = + Pccall(Primitive.simple + ~name:"caml_string_notequal" + ~arity:2 + ~alloc:false) + +let prim_string_compare = + Pccall(Primitive.simple + ~name:"caml_string_compare" + ~arity:2 + ~alloc:false) + +let bind_sw arg k = match arg with +| Lvar _ -> k arg +| _ -> + let id = Ident.create "switch" in + Llet (Strict,Pgenval,id,arg,k (Lvar id)) + + +(* Sequential equality tests *) + +let make_string_test_sequence loc arg sw d = + let d,sw = match d with + | None -> + begin match sw with + | (_,d)::sw -> d,sw + | [] -> assert false + end + | Some d -> d,sw in + bind_sw arg + (fun arg -> + List.fold_right + (fun (s,lam) k -> + Lifthenelse + (Lprim + (prim_string_notequal, + [arg; Lconst (Const_immstring s)], loc), + k,lam)) + sw d) + +let rec split k xs = match xs with +| [] -> assert false +| x0::xs -> + if k <= 1 then [],x0,xs + else + let xs,y0,ys = split (k-2) xs in + x0::xs,y0,ys + +let zero_lam = Lconst (Const_base (Const_int 0)) + +let tree_way_test loc arg lt eq gt = + Lifthenelse + (Lprim (Pintcomp Clt,[arg;zero_lam], loc),lt, + Lifthenelse(Lprim (Pintcomp Clt,[zero_lam;arg], loc),gt,eq)) + +(* Dichotomic tree *) + + +let rec do_make_string_test_tree loc arg sw delta d = + let len = List.length sw in + if len <= strings_test_threshold+delta then + make_string_test_sequence loc arg sw d + else + let lt,(s,act),gt = split len sw in + bind_sw + (Lprim + (prim_string_compare, + [arg; Lconst (Const_immstring s)], loc)) + (fun r -> + tree_way_test loc r + (do_make_string_test_tree loc arg lt delta d) + act + (do_make_string_test_tree loc arg gt delta d)) + +(* Entry point *) +let expand_stringswitch loc arg sw d = match d with +| None -> + bind_sw arg + (fun arg -> do_make_string_test_tree loc arg sw 0 None) +| Some e -> + bind_sw arg + (fun arg -> + make_catch e + (fun d -> do_make_string_test_tree loc arg sw 1 (Some d))) + +(**********************) +(* Generic test trees *) +(**********************) + +(* Sharing *) + +(* Add handler, if shared *) +let handle_shared () = + let hs = ref (fun x -> x) in + let handle_shared act = match act with + | Switch.Single act -> act + | Switch.Shared act -> + let i,h = make_catch_delayed act in + let ohs = !hs in + hs := (fun act -> h (ohs act)) ; + make_exit i in + hs,handle_shared + + +let share_actions_tree sw d = + let store = StoreExp.mk_store () in +(* Default action is always shared *) + let d = + match d with + | None -> None + | Some d -> Some (store.Switch.act_store_shared d) in +(* Store all other actions *) + let sw = + List.map (fun (cst,act) -> cst,store.Switch.act_store act) sw in + +(* Retrieve all actions, including potential default *) + let acts = store.Switch.act_get_shared () in + +(* Array of actual actions *) + let hs,handle_shared = handle_shared () in + let acts = Array.map handle_shared acts in + +(* Reconstruct default and switch list *) + let d = match d with + | None -> None + | Some d -> Some (acts.(d)) in + let sw = List.map (fun (cst,j) -> cst,acts.(j)) sw in + !hs,sw,d + +(* Note: dichotomic search requires sorted input with no duplicates *) +let rec uniq_lambda_list sw = match sw with + | []|[_] -> sw + | (c1,_ as p1)::((c2,_)::sw2 as sw1) -> + if const_compare c1 c2 = 0 then uniq_lambda_list (p1::sw2) + else p1::uniq_lambda_list sw1 + +let sort_lambda_list l = + let l = + List.stable_sort (fun (x,_) (y,_) -> const_compare x y) l in + uniq_lambda_list l + +let rec cut n l = + if n = 0 then [],l + else match l with + [] -> raise (Invalid_argument "cut") + | a::l -> let l1,l2 = cut (n-1) l in a::l1, l2 + +let rec do_tests_fail loc fail tst arg = function + | [] -> fail + | (c, act)::rem -> + Lifthenelse + (Lprim (tst, [arg ; Lconst (Const_base c)], loc), + do_tests_fail loc fail tst arg rem, + act) + +let rec do_tests_nofail loc tst arg = function + | [] -> fatal_error "Matching.do_tests_nofail" + | [_,act] -> act + | (c,act)::rem -> + Lifthenelse + (Lprim (tst, [arg ; Lconst (Const_base c)], loc), + do_tests_nofail loc tst arg rem, + act) + +let make_test_sequence loc fail tst lt_tst arg const_lambda_list = + let const_lambda_list = sort_lambda_list const_lambda_list in + let hs,const_lambda_list,fail = + share_actions_tree const_lambda_list fail in + + let rec make_test_sequence const_lambda_list = + if List.length const_lambda_list >= 4 && lt_tst <> Pignore then + split_sequence const_lambda_list + else match fail with + | None -> do_tests_nofail loc tst arg const_lambda_list + | Some fail -> do_tests_fail loc fail tst arg const_lambda_list + + and split_sequence const_lambda_list = + let list1, list2 = + cut (List.length const_lambda_list / 2) const_lambda_list in + Lifthenelse(Lprim(lt_tst, + [arg; Lconst(Const_base (fst(List.hd list2)))], + loc), + make_test_sequence list1, make_test_sequence list2) + in + hs (make_test_sequence const_lambda_list) + + +module SArg = struct + type primitive = Lambda.primitive + + let eqint = Pintcomp Ceq + let neint = Pintcomp Cneq + let leint = Pintcomp Cle + let ltint = Pintcomp Clt + let geint = Pintcomp Cge + let gtint = Pintcomp Cgt + + type act = Lambda.lambda + + let make_prim p args = Lprim (p,args,Location.none) + let make_offset arg n = match n with + | 0 -> arg + | _ -> Lprim (Poffsetint n,[arg],Location.none) + + let bind arg body = + let newvar,newarg = match arg with + | Lvar v -> v,arg + | _ -> + let newvar = Ident.create "switcher" in + newvar,Lvar newvar in + bind Alias newvar arg (body newarg) + let make_const i = Lconst (Const_base (Const_int i)) + let make_isout h arg = Lprim (Pisout, [h ; arg],Location.none) + let make_isin h arg = Lprim (Pnot,[make_isout h arg],Location.none) + let make_if cond ifso ifnot = Lifthenelse (cond, ifso, ifnot) + let make_switch loc arg cases acts ~offset sw_names = + let l = ref [] in + for i = Array.length cases-1 downto 0 do + l := (offset + i,acts.(cases.(i))) :: !l + done ; + Lswitch(arg, + {sw_numconsts = Array.length cases ; sw_consts = !l ; + sw_numblocks = 0 ; sw_blocks = [] ; + sw_failaction = None; + sw_names}, loc) + let make_catch = make_catch_delayed + let make_exit = make_exit + +end + +(* Action sharing for Lswitch argument *) +let share_actions_sw sw = +(* Attempt sharing on all actions *) + let store = StoreExp.mk_store () in + let fail = match sw.sw_failaction with + | None -> None + | Some fail -> + (* Fail is translated to exit, whatever happens *) + Some (store.Switch.act_store_shared fail) in + let consts = + List.map + (fun (i,e) -> i,store.Switch.act_store e) + sw.sw_consts + and blocks = + List.map + (fun (i,e) -> i,store.Switch.act_store e) + sw.sw_blocks in + let acts = store.Switch.act_get_shared () in + let hs,handle_shared = handle_shared () in + let acts = Array.map handle_shared acts in + let fail = match fail with + | None -> None + | Some fail -> Some (acts.(fail)) in + !hs, + { sw with + sw_consts = List.map (fun (i,j) -> i,acts.(j)) consts ; + sw_blocks = List.map (fun (i,j) -> i,acts.(j)) blocks ; + sw_failaction = fail; } + +(* Reintroduce fail action in switch argument, + for the sake of avoiding carrying over huge switches *) + +let reintroduce_fail sw = match sw.sw_failaction with +| None -> + let t = Hashtbl.create 17 in + let seen (_,l) = match as_simple_exit l with + | Some i -> + let old = try Hashtbl.find t i with Not_found -> 0 in + Hashtbl.replace t i (old+1) + | None -> () in + List.iter seen sw.sw_consts ; + List.iter seen sw.sw_blocks ; + let i_max = ref (-1) + and max = ref (-1) in + Hashtbl.iter + (fun i c -> + if c > !max then begin + i_max := i ; + max := c + end) t ; + if !max >= 3 then + let default = !i_max in + let remove ls = + Ext_list.filter ls + (fun (_,lam) -> match as_simple_exit lam with + | Some j -> j <> default + | None -> true) in + {sw with + sw_consts = remove sw.sw_consts ; + sw_blocks = remove sw.sw_blocks ; + sw_failaction = Some (make_exit default)} + else sw +| Some _ -> sw + + +module Switcher = Switch.Make(SArg) +open Switch + +let rec last def = function + | [] -> def + | [x,_] -> x + | _::rem -> last def rem + +let get_edges low high l = match l with +| [] -> low, high +| (x,_)::_ -> x, last high l + + +let as_interval_canfail fail low high l = + let store = StoreExp.mk_store () in + + let do_store _tag act = + + let i = store.act_store act in +(* + eprintf "STORE [%s] %i %s\n" tag i (string_of_lam act) ; +*) + i in + + let rec nofail_rec cur_low cur_high cur_act = function + | [] -> + if cur_high = high then + [cur_low,cur_high,cur_act] + else + [(cur_low,cur_high,cur_act) ; (cur_high+1,high, 0)] + | ((i,act_i)::rem) as all -> + let act_index = do_store "NO" act_i in + if cur_high+1= i then + if act_index=cur_act then + nofail_rec cur_low i cur_act rem + else if act_index=0 then + (cur_low,i-1, cur_act)::fail_rec i i rem + else + (cur_low, i-1, cur_act)::nofail_rec i i act_index rem + else if act_index = 0 then + (cur_low, cur_high, cur_act):: + fail_rec (cur_high+1) (cur_high+1) all + else + (cur_low, cur_high, cur_act):: + (cur_high+1,i-1,0):: + nofail_rec i i act_index rem + + and fail_rec cur_low cur_high = function + | [] -> [(cur_low, cur_high, 0)] + | (i,act_i)::rem -> + let index = do_store "YES" act_i in + if index=0 then fail_rec cur_low i rem + else + (cur_low,i-1,0):: + nofail_rec i i index rem in + + let init_rec = function + | [] -> [low,high,0] + | (i,act_i)::rem -> + let index = do_store "INIT" act_i in + if index=0 then + fail_rec low i rem + else + if low < i then + (low,i-1,0)::nofail_rec i i index rem + else + nofail_rec i i index rem in + + assert (do_store "FAIL" fail = 0) ; (* fail has action index 0 *) + let r = init_rec l in + Array.of_list r, store + +let as_interval_nofail l = + let store = StoreExp.mk_store () in + let rec some_hole = function + | []|[_] -> false + | (i,_)::((j,_)::_ as rem) -> + j > i+1 || some_hole rem in + let rec i_rec cur_low cur_high cur_act = function + | [] -> + [cur_low, cur_high, cur_act] + | (i,act)::rem -> + let act_index = store.act_store act in + if act_index = cur_act then + i_rec cur_low i cur_act rem + else + (cur_low, cur_high, cur_act):: + i_rec i i act_index rem in + let inters = match l with + | (i,act)::rem -> + let act_index = + (* In case there is some hole and that a switch is emitted, + action 0 will be used as the action of unreachable + cases (cf. switch.ml, make_switch). + Hence, this action will be shared *) + if some_hole rem then + store.act_store_shared act + else + store.act_store act in + assert (act_index = 0) ; + i_rec i i act_index rem + | _ -> assert false in + + Array.of_list inters, store + + +let sort_int_lambda_list l = + List.sort + (fun (i1,_) (i2,_) -> + if i1 < i2 then -1 + else if i2 < i1 then 1 + else 0) + l + +let as_interval fail low high l = + let l = sort_int_lambda_list l in + get_edges low high l, + (match fail with + | None -> as_interval_nofail l + | Some act -> as_interval_canfail act low high l) + +let call_switcher loc fail arg low high int_lambda_list sw_names = + let edges, (cases, actions) = + as_interval fail low high int_lambda_list in + Switcher.zyva loc edges arg cases actions sw_names + + +let rec list_as_pat = function + | [] -> fatal_error "Matching.list_as_pat" + | [pat] -> pat + | pat::rem -> + {pat with pat_desc = Tpat_or (pat,list_as_pat rem,None)} + + +let complete_pats_constrs = function + | p::_ as pats -> + List.map + (pat_of_constr p) + (complete_constrs p (List.map get_key_constr pats)) + | _ -> assert false + + +(* + Following two ``failaction'' function compute n, the trap handler + to jump to in case of failure of elementary tests +*) + +let mk_failaction_neg partial ctx def = match partial with +| Partial -> + begin match def with + | (_,idef)::_ -> + Some (Lstaticraise (idef,[])),jumps_singleton idef ctx + | [] -> + (* Act as Total, this means + If no appropriate default matrix exists, + then this switch cannot fail *) + None, jumps_empty + end +| Total -> + None, jumps_empty + + + +(* In line with the article and simpler than before *) +let mk_failaction_pos partial seen ctx defs = + if dbg then begin + prerr_endline "**POS**" ; + pretty_def defs ; + () + end ; + let rec scan_def env to_test defs = match to_test,defs with + | ([],_)|(_,[]) -> + List.fold_left + (fun (klist,jumps) (pats,i)-> + let action = Lstaticraise (i,[]) in + let klist = + List.fold_right + (fun pat r -> (get_key_constr pat,action)::r) + pats klist + and jumps = + jumps_add i (ctx_lub (list_as_pat pats) ctx) jumps in + klist,jumps) + ([],jumps_empty) env + | _,(pss,idef)::rem -> + let now, later = + List.partition + (fun (_p,p_ctx) -> ctx_match p_ctx pss) to_test in + match now with + | [] -> scan_def env to_test rem + | _ -> scan_def ((List.map fst now,idef)::env) later rem in + + let fail_pats = complete_pats_constrs seen in + if List.length fail_pats < 32 then begin + let fail,jmps = + scan_def + [] + (List.map + (fun pat -> pat, ctx_lub pat ctx) + fail_pats) + defs in + if dbg then begin + eprintf "POSITIVE JUMPS [%i]:\n" (List.length fail_pats); + pretty_jumps jmps + end ; + None,fail,jmps + end else begin (* Too many non-matched constructors -> reduced information *) + if dbg then eprintf "POS->NEG!!!\n%!" ; + let fail,jumps = mk_failaction_neg partial ctx defs in + if dbg then + eprintf "FAIL: %s\n" + (match fail with + | None -> "" + | Some lam -> string_of_lam lam) ; + fail,[],jumps + end + +let combine_constant names loc arg cst partial ctx def + (const_lambda_list, total, _pats) = + let fail, local_jumps = + mk_failaction_neg partial ctx def in + let lambda1 = + match cst with + | Const_int _ -> + let int_lambda_list = + List.map (function Const_int n, l -> n,l | _ -> assert false) + const_lambda_list in + call_switcher loc fail arg min_int max_int int_lambda_list names + | Const_char _ -> + let int_lambda_list = + List.map (function Const_char c, l -> (c, l) + | _ -> assert false) + const_lambda_list in + call_switcher loc fail arg 0 max_int int_lambda_list names + | Const_string _ -> +(* Note as the bytecode compiler may resort to dichotomic search, + the clauses of stringswitch are sorted with duplicates removed. + This partly applies to the native code compiler, which requires + no duplicates *) + let const_lambda_list = sort_lambda_list const_lambda_list in + let sw = + List.map + (fun (c,act) -> match c with + | Const_string (s,_) -> s,act + | _ -> assert false) + const_lambda_list in + let hs,sw,fail = share_actions_tree sw fail in + hs (Lstringswitch (arg,sw,fail,loc)) + | Const_float _ -> + make_test_sequence loc + fail + (Pfloatcomp Cneq) (Pfloatcomp Clt) + arg const_lambda_list + | Const_int32 _ -> + make_test_sequence loc + fail + (Pbintcomp(Pint32, Cneq)) (Pbintcomp(Pint32, Clt)) + arg const_lambda_list + | Const_int64 _ -> + make_test_sequence loc + fail + (Pbintcomp(Pint64, Cneq)) (Pbintcomp(Pint64, Clt)) + arg const_lambda_list + | Const_nativeint _ -> + make_test_sequence loc + fail + (Pbintcomp(Pnativeint, Cneq)) (Pbintcomp(Pnativeint, Clt)) + arg const_lambda_list + in lambda1,jumps_union local_jumps total + + + +let split_cases tag_lambda_list = + let rec split_rec = function + [] -> ([], []) + | (cstr, act) :: rem -> + let (consts, nonconsts) = split_rec rem in + match cstr with + Cstr_constant n -> ((n, act) :: consts, nonconsts) + | Cstr_block n -> (consts, (n, act) :: nonconsts) + | Cstr_unboxed -> (consts, (0, act) :: nonconsts) + | Cstr_extension _ -> assert false in + let const, nonconst = split_rec tag_lambda_list in + sort_int_lambda_list const, + sort_int_lambda_list nonconst + +(* refine [split_cases] and [split_variant_cases] *) +let split_variant_cases tag_lambda_list = + let rec split_rec = function + [] -> ([], []) + | ((name,cstr), act) :: rem -> + let (consts, nonconsts) = split_rec rem in + match cstr with + Cstr_constant n -> ((n, (name, act)) :: consts, nonconsts) + | Cstr_block n -> (consts, (n, (name, act)) :: nonconsts) + | Cstr_unboxed -> assert false + | Cstr_extension _ -> assert false in + let const, nonconst = split_rec tag_lambda_list in + sort_int_lambda_list const, + sort_int_lambda_list nonconst + +let split_extension_cases tag_lambda_list = + let rec split_rec = function + [] -> ([], []) + | (cstr, act) :: rem -> + let (consts, nonconsts) = split_rec rem in + match cstr with + Cstr_extension(path, true) when not !Config.bs_only -> ((path, act) :: consts, nonconsts) + | Cstr_extension(path, _) -> (consts, (path, act) :: nonconsts) + | _ -> assert false in + split_rec tag_lambda_list + + +let extension_slot_eq = + Pccall (Primitive.simple ~name:"#extension_slot_eq" ~arity:2 ~alloc:false) +let combine_constructor sw_names loc arg ex_pat cstr partial ctx def + (tag_lambda_list, total1, pats) = + if cstr.cstr_consts < 0 then begin + (* Special cases for extensions *) + let fail, local_jumps = + mk_failaction_neg partial ctx def in + let lambda1 = + let consts, nonconsts = split_extension_cases tag_lambda_list in + let default, consts, nonconsts = + match fail with + | None -> + begin match consts, nonconsts with + | _, (_, act)::rem -> act, consts, rem + | (_, act)::rem, _ -> act, rem, nonconsts + | _ -> assert false + end + | Some fail -> fail, consts, nonconsts in + let nonconst_lambda = + match nonconsts with + [] -> default + | _ -> + let tag = Ident.create "tag" in + let tests = + List.fold_right + (fun (path, act) rem -> + let ext = transl_extension_path ex_pat.pat_env path in + Lifthenelse(Lprim(extension_slot_eq , [Lvar tag; ext], loc), + act, rem)) + nonconsts + default + in + Llet(Alias, Pgenval,tag, arg, tests) + in + List.fold_right + (fun (path, act) rem -> + let ext = transl_extension_path ex_pat.pat_env path in + Lifthenelse(Lprim(extension_slot_eq , [arg; ext], loc), + act, rem)) + consts + nonconst_lambda + in + lambda1, jumps_union local_jumps total1 + end else begin + (* Regular concrete type *) + let ncases = List.length tag_lambda_list + and nconstrs = cstr.cstr_consts + cstr.cstr_nonconsts in + let sig_complete = ncases = nconstrs in + let fail_opt,fails,local_jumps = + if sig_complete then None,[],jumps_empty + else + mk_failaction_pos partial pats ctx def in + + let tag_lambda_list = fails @ tag_lambda_list in + let (consts, nonconsts) = split_cases tag_lambda_list in + let lambda1 = + match fail_opt,same_actions tag_lambda_list with + | None,Some act -> act (* Identical actions, no failure *) + | _ -> + match + (cstr.cstr_consts, cstr.cstr_nonconsts, consts, nonconsts) + with + | (1, 1, [0, act1], [0, act2]) -> + (* Typically, match on lists, will avoid isint primitive in that + case *) + let arg = + if !Config.bs_only && Datarepr.constructor_has_optional_shape cstr then + Lprim(is_not_none_bs_primitve , [arg], loc) + else arg + in + Lifthenelse(arg, act2, act1) + | (2,0, [(i1,act1); (_,act2)],[]) -> + if i1 = 0 then Lifthenelse(arg, act2, act1) + else Lifthenelse (arg,act1,act2) + | (n,0,_,[]) -> (* The type defines constant constructors only *) + call_switcher loc fail_opt arg 0 (n-1) consts sw_names + | (n, _, _, _) -> + let act0 = + (* = Some act when all non-const constructors match to act *) + match fail_opt,nonconsts with + | Some a,[] -> Some a + | Some _,_ -> + if List.length nonconsts = cstr.cstr_nonconsts then + same_actions nonconsts + else None + | None,_ -> same_actions nonconsts in + match act0 with + | Some act -> + Lifthenelse + (Lprim (Pisint, [arg], loc), + call_switcher loc + fail_opt arg + 0 (n-1) consts sw_names, + act) +(* Emit a switch, as bytecode implements this sophisticated instruction *) + | None -> + let sw = + {sw_numconsts = cstr.cstr_consts; sw_consts = consts; + sw_numblocks = cstr.cstr_nonconsts; sw_blocks = nonconsts; + sw_failaction = fail_opt; + sw_names} in + let hs,sw = share_actions_sw sw in + let sw = reintroduce_fail sw in + hs (Lswitch (arg,sw,loc)) in + lambda1, jumps_union local_jumps total1 + end + +let make_test_sequence_variant_constant fail arg int_lambda_list = + let _, (cases, actions) = + as_interval fail min_int max_int (List.map (fun (a,(_,c)) -> (a,c)) int_lambda_list) in + Switcher.test_sequence arg cases actions + +let call_switcher_variant_constant loc fail arg int_lambda_list names = + call_switcher loc fail arg min_int max_int (List.map (fun (a,(_,c)) -> (a,c)) int_lambda_list) names + + +let call_switcher_variant_constr loc fail arg int_lambda_list names = + let v = Ident.create "variant" in + Llet(Alias, Pgenval, v, Lprim(Pfield (0, Fld_poly_var_tag), [arg], loc), + call_switcher loc + fail (Lvar v) min_int max_int (List.map (fun (a,(_,c)) -> (a,c)) int_lambda_list) names) + +let call_switcher_variant_constant : + (Location.t -> + Lambda.lambda option -> + Lambda.lambda -> + (int * (string * Lambda.lambda)) list -> + Lambda.switch_names option -> + Lambda.lambda) + ref= ref call_switcher_variant_constant + +let call_switcher_variant_constr : + (Location.t -> + Lambda.lambda option -> + Lambda.lambda -> + (int * (string * Lambda.lambda)) list -> + Lambda.switch_names option -> + Lambda.lambda) + ref + = ref call_switcher_variant_constr + +let make_test_sequence_variant_constant : + (Lambda.lambda option -> + Lambda.lambda -> + (int * (string * Lambda.lambda)) list -> + Lambda.lambda) + ref + = ref make_test_sequence_variant_constant + +let combine_variant names loc row arg partial ctx def + (tag_lambda_list, total1, _pats) = + let row = Btype.row_repr row in + let num_constr = ref 0 in + if row.row_closed then + List.iter + (fun (_, f) -> + match Btype.row_field_repr f with + Rabsent | Reither(true, _::_, _, _) -> () + | _ -> incr num_constr) + row.row_fields + else + num_constr := max_int; + let test_int_or_block arg if_int if_block = + if !Config.bs_only then + Lifthenelse(Lprim (Pccall(Primitive.simple ~name:"#is_poly_var_block" ~arity:1 ~alloc:false), [arg], loc), if_block, if_int) + else + Lifthenelse(Lprim (Pisint, [arg], loc), if_int, if_block) in + let sig_complete = List.length tag_lambda_list = !num_constr + and one_action = same_actions tag_lambda_list in (* reduandant work under bs context *) + let fail, local_jumps = + if + sig_complete || (match partial with Total -> true | _ -> false) + then + None, jumps_empty + else + mk_failaction_neg partial ctx def in + let (consts, nonconsts) = split_variant_cases tag_lambda_list in + let lambda1 = match fail, one_action with + | None, Some act -> act + | _,_ -> + match (consts, nonconsts) with + | ([_, (_,act1)], [_, (_,act2)]) when fail=None -> + test_int_or_block arg act1 act2 + | (_, []) -> (* One can compare integers and pointers *) + !make_test_sequence_variant_constant fail arg consts + | ([], _) -> + let lam = !call_switcher_variant_constr loc + fail arg nonconsts names in + (* One must not dereference integers *) + begin match fail with + | None -> lam + | Some fail -> test_int_or_block arg fail lam + end + | (_, _) -> + let lam_const = + !call_switcher_variant_constant loc + fail arg consts names + and lam_nonconst = + !call_switcher_variant_constr loc + fail arg nonconsts names in + test_int_or_block arg lam_const lam_nonconst + in + lambda1, jumps_union local_jumps total1 + + +let combine_array names loc arg partial ctx def + (len_lambda_list, total1, _pats) = + let fail, local_jumps = mk_failaction_neg partial ctx def in + let lambda1 = + let newvar = Ident.create "len" in + let switch = + call_switcher loc + fail (Lvar newvar) + 0 max_int len_lambda_list names in + bind + Alias newvar (Lprim(Parraylength , [arg], loc)) switch in + lambda1, jumps_union local_jumps total1 + +(* Insertion of debugging events *) + +let [@inline] event_branch _repr lam = lam + + +(* + This exception is raised when the compiler cannot produce code + because control cannot reach the compiled clause, + + Unused is raised initially in compile_test. + + compile_list (for compiling switch results) catch Unused + + comp_match_handlers (for compiling splitted matches) + may reraise Unused + + +*) + +exception Unused + +let compile_list compile_fun division = + + let rec c_rec totals = function + | [] -> [], jumps_unions totals, [] + | (key, cell) :: rem -> + begin match cell.ctx with + | [] -> c_rec totals rem + | _ -> + try + let (lambda1, total1) = compile_fun cell.ctx cell.pm in + let c_rem, total, new_pats = + c_rec + (jumps_map ctx_combine total1::totals) rem in + ((key,lambda1)::c_rem), total, (cell.pat::new_pats) + with + | Unused -> c_rec totals rem + end in + c_rec [] division + + +let compile_orhandlers compile_fun lambda1 total1 ctx to_catch = + let rec do_rec r total_r = function + | [] -> r,total_r + | (mat,i,vars,pm)::rem -> + begin try + let ctx = select_columns mat ctx in + let handler_i, total_i = + compile_fun ctx pm in + match raw_action r with + | Lstaticraise (j,args) -> + if i=j then + List.fold_right2 (bind Alias) vars args handler_i, + jumps_map (ctx_rshift_num (ncols mat)) total_i + else + do_rec r total_r rem + | _ -> + do_rec + (Lstaticcatch (r,(i,vars), handler_i)) + (jumps_union + (jumps_remove i total_r) + (jumps_map (ctx_rshift_num (ncols mat)) total_i)) + rem + with + | Unused -> + do_rec (Lstaticcatch (r, (i,vars), lambda_unit)) total_r rem + end in + do_rec lambda1 total1 to_catch + + +let compile_test compile_fun partial divide combine ctx to_match = + let division = divide ctx to_match in + let c_div = compile_list compile_fun division in + match c_div with + | [],_,_ -> + begin match mk_failaction_neg partial ctx to_match.default with + | None,_ -> raise Unused + | Some l,total -> l,total + end + | _ -> + combine ctx to_match.default c_div + +(* Attempt to avoid some useless bindings by lowering them *) + +(* Approximation of v present in lam *) +let rec approx_present v = function + | Lconst _ -> false + | Lstaticraise (_,args) -> + List.exists (fun lam -> approx_present v lam) args + | Lprim (_,args,_) -> + List.exists (fun lam -> approx_present v lam) args + | Llet (Alias, _k, _, l1, l2) -> + approx_present v l1 || approx_present v l2 + | Lvar vv -> Ident.same v vv + | _ -> true + +let rec lower_bind v arg lam = match lam with +| Lifthenelse (cond, ifso, ifnot) -> + let pcond = approx_present v cond + and pso = approx_present v ifso + and pnot = approx_present v ifnot in + begin match pcond, pso, pnot with + | false, false, false -> lam + | false, true, false -> + Lifthenelse (cond, lower_bind v arg ifso, ifnot) + | false, false, true -> + Lifthenelse (cond, ifso, lower_bind v arg ifnot) + | _,_,_ -> bind Alias v arg lam + end +| Lswitch (ls,({sw_consts=[i,act] ; sw_blocks = []} as sw), loc) + when not (approx_present v ls) -> + Lswitch (ls, {sw with sw_consts = [i,lower_bind v arg act]}, loc) +| Lswitch (ls,({sw_consts=[] ; sw_blocks = [i,act]} as sw), loc) + when not (approx_present v ls) -> + Lswitch (ls, {sw with sw_blocks = [i,lower_bind v arg act]}, loc) +| Llet (Alias, k, vv, lv, l) -> + if approx_present v lv then + bind Alias v arg lam + else + Llet (Alias, k, vv, lv, lower_bind v arg l) +| Lvar u when Ident.same u v && Ident.name u = "*sth*" -> + arg (* eliminate let *sth* = from_option x in *sth* *) +| _ -> + bind Alias v arg lam + +let bind_check str v arg lam = match str,arg with +| _, Lvar _ ->bind str v arg lam +| Alias,_ -> lower_bind v arg lam +| _,_ -> bind str v arg lam + +let comp_exit ctx m = match m.default with +| (_,i)::_ -> Lstaticraise (i,[]), jumps_singleton i ctx +| _ -> fatal_error "Matching.comp_exit" + + + +let rec comp_match_handlers comp_fun partial ctx arg first_match next_matchs = + match next_matchs with + | [] -> comp_fun partial ctx arg first_match + | rem -> + let rec c_rec body total_body = function + | [] -> body, total_body + (* Hum, -1 means never taken + | (-1,pm)::rem -> c_rec body total_body rem *) + | (i,pm)::rem -> + let ctx_i,total_rem = jumps_extract i total_body in + begin match ctx_i with + | [] -> c_rec body total_body rem + | _ -> + try + let li,total_i = + comp_fun + (match rem with [] -> partial | _ -> Partial) + ctx_i arg pm in + c_rec + (Lstaticcatch (body,(i,[]),li)) + (jumps_union total_i total_rem) + rem + with + | Unused -> + c_rec (Lstaticcatch (body,(i,[]),lambda_unit)) + total_rem rem + end in + try + let first_lam,total = comp_fun Partial ctx arg first_match in + c_rec first_lam total rem + with Unused -> match next_matchs with + | [] -> raise Unused + | (_,x)::xs -> comp_match_handlers comp_fun partial ctx arg x xs + +(* To find reasonable names for variables *) + +let rec name_pattern default = function + (pat :: _, _) :: rem -> + begin match Typecore.id_of_pattern pat with + | Some id -> id + | None -> name_pattern default rem + end + | _ -> Ident.create default + +let arg_to_var arg cls = match arg with +| Lvar v -> v,arg +| _ -> + let v = name_pattern "match" cls in + v,Lvar v + +(* To be set by Lam_compile *) +let names_from_construct_pattern : (pattern -> switch_names option) ref = + ref (fun _ -> None) + +(* + The main compilation function. + Input: + repr=used for inserting debug events + partial=exhaustiveness information from Parmatch + ctx=a context + m=a pattern matching + + Output: a lambda term, a jump summary {..., exit number -> context, .. } +*) + +let rec compile_match repr partial ctx m = match m with +| { cases = []; args = [] } -> comp_exit ctx m +| { cases = ([], action) :: rem } -> + if is_guarded action then begin + let (lambda, total) = + compile_match None partial ctx { m with cases = rem } in + event_branch repr (patch_guarded lambda action), total + end else + (event_branch repr action, jumps_empty) +| { args = (arg, str)::argl } -> + let v,newarg = arg_to_var arg m.cases in + let first_match,rem = + split_precompile (Some v) + { m with args = (newarg, Alias) :: argl } in + let (lam, total) = + comp_match_handlers + ((if dbg then do_compile_matching_pr else do_compile_matching) repr) + partial ctx newarg first_match rem in + bind_check str v arg lam, total +| _ -> assert false + + +(* verbose version of do_compile_matching, for debug *) + +and do_compile_matching_pr repr partial ctx arg x = + prerr_string "COMPILE: " ; + prerr_endline (match partial with Partial -> "Partial" | Total -> "Total") ; + prerr_endline "MATCH" ; + pretty_precompiled x ; + prerr_endline "CTX" ; + pretty_ctx ctx ; + let (_, jumps) as r = do_compile_matching repr partial ctx arg x in + prerr_endline "JUMPS" ; + pretty_jumps jumps ; + r + +and do_compile_matching repr partial ctx arg pmh = match pmh with +| Pm pm -> + let pat = what_is_cases pm.cases in + begin match pat.pat_desc with + | Tpat_any -> + compile_no_test + divide_var ctx_rshift repr partial ctx pm + | Tpat_tuple patl -> + compile_no_test + (divide_tuple (List.length patl) (normalize_pat pat)) ctx_combine + repr partial ctx pm + | Tpat_record ((_, lbl,_)::_,_) -> + compile_no_test + (divide_record lbl.lbl_all (normalize_pat pat)) + ctx_combine repr partial ctx pm + | Tpat_constant cst -> + let names = None in + compile_test + (compile_match repr partial) partial + divide_constant + (combine_constant names pat.pat_loc arg cst partial) + ctx pm + | Tpat_construct (_, cstr, _) -> + let sw_names = !names_from_construct_pattern pat in + compile_test + (compile_match repr partial) partial + divide_constructor + (combine_constructor sw_names pat.pat_loc arg pat cstr partial) + ctx pm + | Tpat_array _ -> + let names = None in + compile_test (compile_match repr partial) partial + divide_array (combine_array names pat.pat_loc arg partial) + ctx pm + | Tpat_lazy _ -> + compile_no_test + (divide_lazy (normalize_pat pat)) + ctx_combine repr partial ctx pm + | Tpat_variant(_, _, row) -> + let names = None in + compile_test (compile_match repr partial) partial + (divide_variant !row) + (combine_variant names pat.pat_loc !row arg partial) + ctx pm + | _ -> assert false + end +| PmVar {inside=pmh ; var_arg=arg} -> + let lam, total = + do_compile_matching repr partial (ctx_lshift ctx) arg pmh in + lam, jumps_map ctx_rshift total +| PmOr {body=body ; handlers=handlers} -> + let lam, total = compile_match repr partial ctx body in + compile_orhandlers (compile_match repr partial) lam total ctx handlers + +and compile_no_test divide up_ctx repr partial ctx to_match = + let {pm=this_match ; ctx=this_ctx } = divide ctx to_match in + let lambda,total = compile_match repr partial this_ctx this_match in + lambda, jumps_map up_ctx total + + + + +(* The entry points *) + +(* + If there is a guard in a matching or a lazy pattern, + then set exhaustiveness info to Partial. + (because of side effects, assume the worst). + + Notice that exhaustiveness information is trusted by the compiler, + that is, a match flagged as Total should not fail at runtime. + More specifically, for instance if match y with x::_ -> x is flagged + total (as it happens during JoCaml compilation) then y cannot be [] + at runtime. As a consequence, the static Total exhaustiveness information + have to be downgraded to Partial, in the dubious cases where guards + or lazy pattern execute arbitrary code that may perform side effects + and change the subject values. +LM: + Lazy pattern was PR#5992, initial patch by lpw25. + I have generalized the patch, so as to also find mutable fields. +*) + +let find_in_pat pred = + let rec find_rec p = + pred p.pat_desc || + begin match p.pat_desc with + | Tpat_alias (p,_,_) | Tpat_variant (_,Some p,_) | Tpat_lazy p -> + find_rec p + | Tpat_tuple ps|Tpat_construct (_,_,ps) | Tpat_array ps -> + List.exists find_rec ps + | Tpat_record (lpats,_) -> + List.exists + (fun (_, _, p) -> find_rec p) + lpats + | Tpat_or (p,q,_) -> + find_rec p || find_rec q + | Tpat_constant _ | Tpat_var _ + | Tpat_any | Tpat_variant (_,None,_) -> false + end in + find_rec + +let is_lazy_pat = function + | Tpat_lazy _ -> true + | Tpat_alias _ | Tpat_variant _ | Tpat_record _ + | Tpat_tuple _|Tpat_construct _ | Tpat_array _ + | Tpat_or _ | Tpat_constant _ | Tpat_var _ | Tpat_any + -> false + +let is_lazy p = find_in_pat is_lazy_pat p + +let have_mutable_field p = match p with +| Tpat_record (lps,_) -> + List.exists + (fun (_,lbl,_) -> + match lbl.Types.lbl_mut with + | Mutable -> true + | Immutable -> false) + lps +| Tpat_alias _ | Tpat_variant _ | Tpat_lazy _ +| Tpat_tuple _|Tpat_construct _ | Tpat_array _ +| Tpat_or _ +| Tpat_constant _ | Tpat_var _ | Tpat_any + -> false + +let is_mutable p = find_in_pat have_mutable_field p + +(* Downgrade Total when + 1. Matching accesses some mutable fields; + 2. And there are guards or lazy patterns. +*) + +let check_partial is_mutable is_lazy pat_act_list = function + | Partial -> Partial + | Total -> + if + pat_act_list = [] || (* allow empty case list *) + List.exists + (fun (pats, lam) -> + is_mutable pats && (is_guarded lam || is_lazy pats)) + pat_act_list + then Partial + else Total + +let check_partial_list = + check_partial (List.exists is_mutable) (List.exists is_lazy) +let check_partial = check_partial is_mutable is_lazy + +(* have toplevel handler when appropriate *) + +let start_ctx n = [{left=[] ; right = omegas n}] + +let check_total total lambda i handler_fun = + if jumps_is_empty total then + lambda + else begin + Lstaticcatch(lambda, (i,[]), handler_fun()) + end + +let compile_matching repr handler_fun arg pat_act_list partial = + let partial = check_partial pat_act_list partial in + match partial with + | Partial -> + let raise_num = next_raise_count () in + let pm = + { cases = List.map (fun (pat, act) -> ([pat], act)) pat_act_list; + args = [arg, Strict] ; + default = [[[omega]],raise_num]} in + begin try + let (lambda, total) = compile_match repr partial (start_ctx 1) pm in + check_total total lambda raise_num handler_fun + with + | Unused -> assert false (* ; handler_fun() *) + end + | Total -> + let pm = + { cases = List.map (fun (pat, act) -> ([pat], act)) pat_act_list; + args = [arg, Strict] ; + default = []} in + let (lambda, total) = compile_match repr partial (start_ctx 1) pm in + assert (jumps_is_empty total) ; + lambda + + +let partial_function loc () = + (* [Location.get_pos_info] is too expensive *) + let (fname, line, char) = Location.get_pos_info loc.Location.loc_start in + let fname = + Filename.basename fname + in + Lprim(Praise Raise_regular, [Lprim(Pmakeblock(Blk_extension), + [transl_normal_path Predef.path_match_failure; + Lconst(Const_block(Blk_tuple, + [Const_base(Const_string (fname, None)); + Const_base(Const_int line); + Const_base(Const_int char)]))], loc)], loc) + +let for_function loc repr param pat_act_list partial = + compile_matching repr (partial_function loc) param pat_act_list partial + +(* In the following two cases, exhaustiveness info is not available! *) +let for_trywith param pat_act_list = + compile_matching None + (fun () -> Lprim(Praise Raise_reraise, [param], Location.none)) + param pat_act_list Partial + +let simple_for_let loc param pat body = + compile_matching None (partial_function loc) param [pat, body] Partial + + +(* Optimize binding of immediate tuples + + The goal of the implementation of 'for_let' below, which replaces + 'simple_for_let', is to avoid tuple allocation in cases such as + this one: + + let (x,y) = + let foo = ... in + if foo then (1, 2) else (3,4) + in bar + + The compiler easily optimizes the simple `let (x,y) = (1,2) in ...` + case (call to Matching.for_multiple_match from Translcore), but + didn't optimize situations where the rhs tuples are hidden under + a more complex context. + + The idea comes from Alain Frisch who suggested and implemented + the following compilation method, based on Lassign: + + let x = dummy in let y = dummy in + begin + let foo = ... in + if foo then + (let x1 = 1 in let y1 = 2 in x <- x1; y <- y1) + else + (let x2 = 3 in let y2 = 4 in x <- x2; y <- y2) + end; + bar + + The current implementation from Gabriel Scherer uses Lstaticcatch / + Lstaticraise instead: + + catch + let foo = ... in + if foo then + (let x1 = 1 in let y1 = 2 in exit x1 y1) + else + (let x2 = 3 in let y2 = 4 in exit x2 y2) + with x y -> + bar + + The catch/exit is used to avoid duplication of the let body ('bar' + in the example), on 'if' branches for example; it is useless for + linear contexts such as 'let', but we don't need to be careful to + generate nice code because Simplif will remove such useless + catch/exit. +*) + +let rec map_return f = function + | Llet (str, k, id, l1, l2) -> Llet (str, k, id, l1, map_return f l2) + | Lletrec (l1, l2) -> Lletrec (l1, map_return f l2) + | Lifthenelse (lcond, lthen, lelse) -> + Lifthenelse (lcond, map_return f lthen, map_return f lelse) + | Lsequence (l1, l2) -> Lsequence (l1, map_return f l2) + | Ltrywith (l1, id, l2) -> Ltrywith (map_return f l1, id, map_return f l2) + | Lstaticcatch (l1, b, l2) -> + Lstaticcatch (map_return f l1, b, map_return f l2) + | Lstaticraise _ | Lprim(Praise _, _, _) as l -> l + | l -> f l + +(* The 'opt' reference indicates if the optimization is worthy. + + It is shared by the different calls to 'assign_pat' performed from + 'map_return'. For example with the code + let (x, y) = if foo then z else (1,2) + the else-branch will activate the optimization for both branches. + + That means that the optimization is activated if *there exists* an + interesting tuple in one hole of the let-rhs context. We could + choose to activate it only if *all* holes are interesting. We made + that choice because being optimistic is extremely cheap (one static + exit/catch overhead in the "wrong cases"), while being pessimistic + can be costly (one unnecessary tuple allocation). +*) + +let assign_pat opt nraise catch_ids loc pat lam = + let rec collect acc pat lam = match pat.pat_desc, lam with + | Tpat_tuple patl, Lprim(Pmakeblock _, lams, _) -> + opt := true; + List.fold_left2 collect acc patl lams + | Tpat_tuple patl, Lconst(Const_block( _, scl)) -> + opt := true; + let collect_const acc pat sc = collect acc pat (Lconst sc) in + List.fold_left2 collect_const acc patl scl + | _ -> + (* pattern idents will be bound in staticcatch (let body), so we + refresh them here to guarantee binders uniqueness *) + let pat_ids = pat_bound_idents pat in + let fresh_ids = List.map (fun id -> id, Ident.rename id) pat_ids in + (fresh_ids, alpha_pat fresh_ids pat, lam) :: acc + in + + (* sublets were accumulated by 'collect' with the leftmost tuple + pattern at the bottom of the list; to respect right-to-left + evaluation order for tuples, we must evaluate sublets + top-to-bottom. To preserve tail-rec, we will fold_left the + reversed list. *) + let rev_sublets = List.rev (collect [] pat lam) in + let exit = + (* build an Ident.tbl to avoid quadratic refreshing costs *) + let add t (id, fresh_id) = Ident.add id fresh_id t in + let add_ids acc (ids, _pat, _lam) = List.fold_left add acc ids in + let tbl = List.fold_left add_ids Ident.empty rev_sublets in + let fresh_var id = Lvar (Ident.find_same id tbl) in + Lstaticraise(nraise, List.map fresh_var catch_ids) + in + let push_sublet code (_ids, pat, lam) = simple_for_let loc lam pat code in + List.fold_left push_sublet exit rev_sublets + +let for_let loc param pat body = + match pat.pat_desc with + | Tpat_any -> + (* This eliminates a useless variable (and stack slot in bytecode) + for "let _ = ...". See #6865. *) + Lsequence(param, body) + | Tpat_var (id, _) -> + (* fast path, and keep track of simple bindings to unboxable numbers *) + Llet(Strict, Pgenval, id, param, body) + | _ -> + (* Turn off such optimization to reduce diff in the beginning - FIXME*) + if !Config.bs_only then simple_for_let loc param pat body + else + let opt = ref false in + let nraise = next_raise_count () in + let catch_ids = pat_bound_idents pat in + let bind = map_return (assign_pat opt nraise catch_ids loc pat) param in + if !opt then Lstaticcatch(bind, (nraise, catch_ids), body) + else simple_for_let loc param pat body + +(* Handling of tupled functions and matchings *) + +(* Easy case since variables are available *) +let for_tupled_function loc paraml pats_act_list partial = + let partial = check_partial_list pats_act_list partial in + let raise_num = next_raise_count () in + let omegas = [List.map (fun _ -> omega) paraml] in + let pm = + { cases = pats_act_list; + args = List.map (fun id -> (Lvar id, Strict)) paraml ; + default = [omegas,raise_num] + } in + try + let (lambda, total) = compile_match None partial + (start_ctx (List.length paraml)) pm in + check_total total lambda raise_num (partial_function loc) + with + | Unused -> partial_function loc () + + + +let flatten_pattern size p = match p.pat_desc with +| Tpat_tuple args -> args +| Tpat_any -> omegas size +| _ -> raise Cannot_flatten + +let rec flatten_pat_line size p k = match p.pat_desc with +| Tpat_any -> omegas size::k +| Tpat_tuple args -> args::k +| Tpat_or (p1,p2,_) -> flatten_pat_line size p1 (flatten_pat_line size p2 k) +| Tpat_alias (p,_,_) -> (* Note: if this 'as' pat is here, then this is a + useless binding, solves PR#3780 *) + flatten_pat_line size p k +| _ -> fatal_error "Matching.flatten_pat_line" + +let flatten_cases size cases = + List.map + (fun (ps,action) -> match ps with + | [p] -> flatten_pattern size p,action + | _ -> fatal_error "Matching.flatten_case") + cases + +let flatten_matrix size pss = + List.fold_right + (fun ps r -> match ps with + | [p] -> flatten_pat_line size p r + | _ -> fatal_error "Matching.flatten_matrix") + pss [] + +let flatten_def size def = + List.map + (fun (pss,i) -> flatten_matrix size pss,i) + def + +let flatten_pm size args pm = + {args = args ; cases = flatten_cases size pm.cases ; + default = flatten_def size pm.default} + + +let flatten_precompiled size args pmh = match pmh with +| Pm pm -> Pm (flatten_pm size args pm) +| PmOr {body=b ; handlers=hs ; or_matrix=m} -> + PmOr + {body=flatten_pm size args b ; + handlers= + List.map + (fun (mat,i,vars,pm) -> flatten_matrix size mat,i,vars,pm) + hs ; + or_matrix=flatten_matrix size m ;} +| PmVar _ -> assert false + +(* + compiled_flattened is a ``comp_fun'' argument to comp_match_handlers. + Hence it needs a fourth argument, which it ignores +*) + +let compile_flattened repr partial ctx _ pmh = match pmh with +| Pm pm -> compile_match repr partial ctx pm +| PmOr {body=b ; handlers=hs} -> + let lam, total = compile_match repr partial ctx b in + compile_orhandlers (compile_match repr partial) lam total ctx hs +| PmVar _ -> assert false + +let do_for_multiple_match loc paraml pat_act_list partial = + let repr = None in + let partial = check_partial pat_act_list partial in + let raise_num,pm1 = + match partial with + | Partial -> + let raise_num = next_raise_count () in + raise_num, + { cases = List.map (fun (pat, act) -> ([pat], act)) pat_act_list; + args = [Lprim(Pmakeblock( Blk_tuple), paraml, loc), Strict]; + default = [[[omega]],raise_num] } + | _ -> + -1, + { cases = List.map (fun (pat, act) -> ([pat], act)) pat_act_list; + args = [Lprim(Pmakeblock( Blk_tuple), paraml, loc), Strict]; + default = [] } in + + try + try +(* Once for checking that compilation is possible *) + let next, nexts = split_precompile None pm1 in + + let size = List.length paraml + and idl = List.map (fun _ -> Ident.create "match") paraml in + let args = List.map (fun id -> Lvar id, Alias) idl in + + let flat_next = flatten_precompiled size args next + and flat_nexts = + List.map + (fun (e,pm) -> e,flatten_precompiled size args pm) + nexts in + + let lam, total = + comp_match_handlers + (compile_flattened repr) + partial (start_ctx size) () flat_next flat_nexts in + List.fold_right2 (bind Strict) idl paraml + (match partial with + | Partial -> + check_total total lam raise_num (partial_function loc) + | Total -> + assert (jumps_is_empty total) ; + lam) + with Cannot_flatten -> + let (lambda, total) = compile_match None partial (start_ctx 1) pm1 in + begin match partial with + | Partial -> + check_total total lambda raise_num (partial_function loc) + | Total -> + assert (jumps_is_empty total) ; + lambda + end + with Unused -> + assert false (* ; partial_function loc () *) + +(* PR#4828: Believe it or not, the 'paraml' argument below + may not be side effect free. *) + +let param_to_var param = match param with +| Lvar v -> v,None +| _ -> Ident.create "match",Some param + +let bind_opt (v,eo) k = match eo with +| None -> k +| Some e -> Lambda.bind Strict v e k + +let for_multiple_match loc paraml pat_act_list partial = + let v_paraml = List.map param_to_var paraml in + let paraml = List.map (fun (v,_) -> Lvar v) v_paraml in + List.fold_right bind_opt v_paraml + (do_for_multiple_match loc paraml pat_act_list partial) diff --git a/analysis/vendor/ml/matching.mli b/analysis/vendor/ml/matching.mli new file mode 100644 index 000000000..136a4b565 --- /dev/null +++ b/analysis/vendor/ml/matching.mli @@ -0,0 +1,73 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +(* Compilation of pattern-matching *) + +open Typedtree +open Lambda + +val call_switcher_variant_constant : + (Location.t -> + Lambda.lambda option -> + Lambda.lambda -> + (int * (string * Lambda.lambda)) list -> + Lambda.switch_names option -> + Lambda.lambda) + ref + +val call_switcher_variant_constr : + (Location.t -> + Lambda.lambda option -> + Lambda.lambda -> + (int * (string * Lambda.lambda)) list -> + Lambda.switch_names option -> + Lambda.lambda) + ref + +val make_test_sequence_variant_constant : + (Lambda.lambda option -> + Lambda.lambda -> + (int * (string * Lambda.lambda)) list -> + Lambda.lambda) + ref + +(* Entry points to match compiler *) +val for_function: + Location.t -> int ref option -> lambda -> (pattern * lambda) list -> + partial -> lambda +val for_trywith: + lambda -> (pattern * lambda) list -> lambda +val for_let: + Location.t -> lambda -> pattern -> lambda -> lambda +val for_multiple_match: + Location.t -> lambda list -> (pattern * lambda) list -> partial -> + lambda + +val for_tupled_function: + Location.t -> Ident.t list -> (pattern list * lambda) list -> + partial -> lambda + +exception Cannot_flatten + +val flatten_pattern: int -> pattern -> pattern list + +(* Expand stringswitch to string test tree *) +val expand_stringswitch: + Location.t -> lambda -> (string * lambda) list -> lambda option -> lambda + +val inline_lazy_force : lambda -> Location.t -> lambda + +(* To be set by Lam_compile *) +val names_from_construct_pattern : (pattern -> switch_names option) ref diff --git a/analysis/vendor/compiler-libs-406/mtype.ml b/analysis/vendor/ml/mtype.ml similarity index 98% rename from analysis/vendor/compiler-libs-406/mtype.ml rename to analysis/vendor/ml/mtype.ml index 479f12e33..74aaeddde 100644 --- a/analysis/vendor/compiler-libs-406/mtype.ml +++ b/analysis/vendor/ml/mtype.ml @@ -162,9 +162,7 @@ let nondep_supertype env mid mty = mtd_attributes=[]}) :: rem' | _ -> raise Not_found end - | Sig_class(id, d, rs) -> - Sig_class(id, Ctype.nondep_class_declaration env mid d, rs) - :: rem' + | Sig_class _ -> assert false | Sig_class_type(id, d, rs) -> Sig_class_type(id, Ctype.nondep_cltype_declaration env mid d, rs) :: rem' @@ -374,7 +372,7 @@ let rec remove_aliases env excl mty = Mty_signature (remove_aliases_sig env excl sg) | Mty_alias _ -> let mty' = Env.scrape_alias env mty in - if mty' = mty then mty else + if mty' = mty then mty else (* nested polymorphic comparison *) remove_aliases env excl mty' | mty -> mty diff --git a/analysis/vendor/compiler-libs-406/mtype.mli b/analysis/vendor/ml/mtype.mli similarity index 100% rename from analysis/vendor/compiler-libs-406/mtype.mli rename to analysis/vendor/ml/mtype.mli diff --git a/analysis/vendor/compiler-libs-406/oprint.ml b/analysis/vendor/ml/oprint.ml similarity index 100% rename from analysis/vendor/compiler-libs-406/oprint.ml rename to analysis/vendor/ml/oprint.ml diff --git a/analysis/vendor/compiler-libs-406/oprint.mli b/analysis/vendor/ml/oprint.mli similarity index 99% rename from analysis/vendor/compiler-libs-406/oprint.mli rename to analysis/vendor/ml/oprint.mli index cf594d164..7c53634f7 100644 --- a/analysis/vendor/compiler-libs-406/oprint.mli +++ b/analysis/vendor/ml/oprint.mli @@ -16,8 +16,10 @@ open Format open Outcometree + val out_ident : (formatter -> string -> unit) ref val map_primitive_name : (string -> string) ref + val out_value : (formatter -> out_value -> unit) ref val out_type : (formatter -> out_type -> unit) ref val out_class_type : (formatter -> out_class_type -> unit) ref diff --git a/analysis/vendor/compiler-libs-406/outcometree.mli b/analysis/vendor/ml/outcometree.ml similarity index 100% rename from analysis/vendor/compiler-libs-406/outcometree.mli rename to analysis/vendor/ml/outcometree.ml diff --git a/analysis/vendor/compiler-libs-406/parmatch.ml b/analysis/vendor/ml/parmatch.ml similarity index 97% rename from analysis/vendor/compiler-libs-406/parmatch.ml rename to analysis/vendor/ml/parmatch.ml index 063ea7a3d..e06991290 100644 --- a/analysis/vendor/compiler-libs-406/parmatch.ml +++ b/analysis/vendor/ml/parmatch.ml @@ -367,6 +367,9 @@ let get_type_path ty tenv = (* Values as patterns pretty printer *) (*************************************) +let print_res_pat: (Typedtree.pattern -> string) ref = + ref (fun _ -> assert false) + open Format ;; @@ -376,7 +379,7 @@ let is_cons = function let pretty_const c = match c with | Const_int i -> Printf.sprintf "%d" i -| Const_char c -> Printf.sprintf "%C" c +| Const_char i -> Printf.sprintf "%s" (Pprintast.string_of_int_as_char i) | Const_string (s, _) -> Printf.sprintf "%S" s | Const_float f -> Printf.sprintf "%s" f | Const_int32 i -> Printf.sprintf "%ldl" i @@ -406,7 +409,7 @@ let rec pretty_val ppf v = | Tpat_construct (_, cstr, []) -> fprintf ppf "%s" cstr.cstr_name | Tpat_construct (_, cstr, [w]) -> - fprintf ppf "@[<2>%s@ %a@]" cstr.cstr_name pretty_arg w + fprintf ppf "@[<2>%s(%a)@]" cstr.cstr_name pretty_arg w | Tpat_construct (_, cstr, vs) -> let name = cstr.cstr_name in begin match (name, vs) with @@ -416,33 +419,29 @@ let rec pretty_val ppf v = fprintf ppf "@[<2>%s@ @[(%a)@]@]" name (pretty_vals ",") vs end | Tpat_variant (l, None, _) -> - fprintf ppf "`%s" l + fprintf ppf "#%s" l | Tpat_variant (l, Some w, _) -> - fprintf ppf "@[<2>`%s@ %a@]" l pretty_arg w + fprintf ppf "@[<2>#%s(%a)@]" l pretty_arg w | Tpat_record (lvs,_) -> - let filtered_lvs = List.filter + let filtered_lvs = Ext_list.filter lvs (function | (_,_,{pat_desc=Tpat_any}) -> false (* do not show lbl=_ *) - | _ -> true) lvs in + | _ -> true) in begin match filtered_lvs with | [] -> fprintf ppf "_" - | (_, lbl, _) :: q -> - let elision_mark ppf = - (* we assume that there is no label repetitions here *) - if Array.length lbl.lbl_all > 1 + List.length q then - fprintf ppf ";@ _@ " - else () in + | (_, _lbl, _) :: _q -> + let elision_mark _ = () in fprintf ppf "@[{%a%t}@]" pretty_lvals filtered_lvs elision_mark end | Tpat_array vs -> - fprintf ppf "@[[| %a |]@]" (pretty_vals " ;") vs + fprintf ppf "@[[%a]@]" (pretty_vals ",") vs | Tpat_lazy v -> fprintf ppf "@[<2>lazy@ %a@]" pretty_arg v | Tpat_alias (v, x,_) -> fprintf ppf "@[(%a@ as %a)@]" pretty_val v Ident.print x | Tpat_or (v,w,_) -> - fprintf ppf "@[(%a|@,%a)@]" pretty_or v pretty_or w + fprintf ppf "@[%a | @,%a@]" pretty_or v pretty_or w and pretty_car ppf v = match v.pat_desc with | Tpat_construct (_,cstr, [_ ; _]) @@ -463,7 +462,7 @@ and pretty_arg ppf v = match v.pat_desc with and pretty_or ppf v = match v.pat_desc with | Tpat_or (v,w,_) -> - fprintf ppf "%a|@,%a" pretty_or v pretty_or w + fprintf ppf "%a | @,%a" pretty_or v pretty_or w | _ -> pretty_val ppf v and pretty_vals sep ppf = function @@ -475,9 +474,9 @@ and pretty_vals sep ppf = function and pretty_lvals ppf = function | [] -> () | [_,lbl,v] -> - fprintf ppf "%s=%a" lbl.lbl_name pretty_val v + fprintf ppf "%s: %a" lbl.lbl_name pretty_val v | (_, lbl,v)::rest -> - fprintf ppf "%s=%a;@ %a" + fprintf ppf "%s: %a,@ %a" lbl.lbl_name pretty_val v pretty_lvals rest let top_pretty ppf v = @@ -881,8 +880,6 @@ let full_match closing env = match env with (fun (tag,f) -> Btype.row_field_repr f = Rabsent || List.mem tag fields) row.row_fields -| ({pat_desc = Tpat_constant(Const_char _)},_) :: _ -> - List.length env = 256 | ({pat_desc = Tpat_constant(_)},_) :: _ -> false | ({pat_desc = Tpat_tuple(_)},_) :: _ -> true | ({pat_desc = Tpat_record(_)},_) :: _ -> true @@ -1006,9 +1003,9 @@ let complete_constrs p all_tags = let not_tags = complete_tags c.cstr_consts c.cstr_nonconsts all_tags in let constrs = get_variant_constructors p.pat_env c.cstr_res in let others = - List.filter + Ext_list.filter constrs (fun cnstr -> ConstructorTagHashtbl.mem not_tags cnstr.cstr_tag) - constrs in + in let const, nonconst = List.partition (fun cnstr -> cnstr.cstr_arity = 0) others in const @ nonconst @@ -1040,7 +1037,7 @@ let build_other_constant proj make first next p env = let some_other_tag = "" -let build_other ext env = match env with +let build_other ext env : Typedtree.pattern = match env with | ({pat_desc = Tpat_construct (lid, {cstr_tag=Cstr_extension _},_)},_) :: _ -> (* let c = {c with cstr_name = "*extension*"} in *) (* PR#7330 *) make_pat (Tpat_var (Ident.create "*extension*", @@ -1082,39 +1079,19 @@ let build_other ext env = match env with make_pat (Tpat_or (pat, p_res, None)) p.pat_type p.pat_env) pat other_pats end -| ({pat_desc = Tpat_constant(Const_char _)} as p,_) :: _ -> - let all_chars = - List.map - (fun (p,_) -> match p.pat_desc with - | Tpat_constant (Const_char c) -> c - | _ -> assert false) - env in - - let rec find_other i imax = - if i > imax then raise Not_found - else - let ci = Char.chr i in - if List.mem ci all_chars then - find_other (i+1) imax - else - make_pat (Tpat_constant (Const_char ci)) p.pat_type p.pat_env in - let rec try_chars = function - | [] -> omega - | (c1,c2) :: rest -> - try - find_other (Char.code c1) (Char.code c2) - with - | Not_found -> try_chars rest in - - try_chars - [ 'a', 'z' ; 'A', 'Z' ; '0', '9' ; - ' ', '~' ; Char.chr 0 , Char.chr 255] - -| ({pat_desc=(Tpat_constant (Const_int _))} as p,_) :: _ -> +| ({pat_desc=(Tpat_constant (Const_int _ ))} as p,_) :: _ -> build_other_constant - (function Tpat_constant(Const_int i) -> i | _ -> assert false) + (function Tpat_constant(Const_int i) -> i + | _ -> assert false) (function i -> Tpat_constant(Const_int i)) 0 succ p env +| ({pat_desc=(Tpat_constant (Const_char _ ))} as p,_) :: _ -> + build_other_constant + (function + | Tpat_constant (Const_char i) -> i + | _ -> assert false) + (function i -> Tpat_constant(Const_char i)) + 0 succ p env | ({pat_desc=(Tpat_constant (Const_int32 _))} as p,_) :: _ -> build_other_constant (function Tpat_constant(Const_int32 i) -> i | _ -> assert false) @@ -1819,7 +1796,7 @@ let rec le_pat p q = let ps,qs = records_args l1 l2 in le_pats ps qs | Tpat_array(ps), Tpat_array(qs) -> - List.length ps = List.length qs && le_pats ps qs + Ext_list.same_length ps qs && le_pats ps qs (* In all other cases, enumeration is performed *) | _,_ -> not (satisfiable [[p]] [q]) @@ -2122,8 +2099,7 @@ let do_check_partial ?pred exhaust loc casel pss = match pss with let errmsg = try let buf = Buffer.create 16 in - let fmt = formatter_of_buffer buf in - top_pretty fmt v; + Buffer.add_string buf (!print_res_pat v); begin match check_partial_all v casel with | None -> () | Some _ -> @@ -2144,7 +2120,7 @@ let do_check_partial ?pred exhaust loc casel pss = match pss with with _ -> "" in - Location.prerr_warning loc (Warnings.Partial_match errmsg) + Location.prerr_warning loc (Warnings.Partial_match errmsg) end; Partial end @@ -2248,7 +2224,7 @@ let check_unused pred casel = let qs = [q] in begin try let pss = - get_mins le_pats (List.filter (compats qs) pref) in + get_mins le_pats (Ext_list.filter pref (compats qs)) in (* First look for redundant or partially redundant patterns *) let r = every_satisfiables (make_rows pss) (make_row qs) in let refute = (c_rhs.exp_desc = Texp_unreachable) in @@ -2314,7 +2290,7 @@ let inactive ~partial pat = true | Tpat_constant c -> begin match c with - | Const_string _ -> Config.safe_string + | Const_string _ -> true (*Config.safe_string*) | Const_int _ | Const_char _ | Const_float _ | Const_int32 _ | Const_int64 _ | Const_nativeint _ -> true end diff --git a/analysis/vendor/compiler-libs-406/parmatch.mli b/analysis/vendor/ml/parmatch.mli similarity index 97% rename from analysis/vendor/compiler-libs-406/parmatch.mli rename to analysis/vendor/ml/parmatch.mli index feecb0c5b..e44fb78a7 100644 --- a/analysis/vendor/compiler-libs-406/parmatch.mli +++ b/analysis/vendor/ml/parmatch.mli @@ -24,6 +24,8 @@ val pretty_pat : pattern -> unit val pretty_line : pattern list -> unit val pretty_matrix : pattern list list -> unit +val print_res_pat: (Typedtree.pattern -> string) ref + val omega : pattern val omegas : int -> pattern list val omega_list : 'a list -> pattern list @@ -37,7 +39,7 @@ val le_pat : pattern -> pattern -> bool val le_pats : pattern list -> pattern list -> bool (* Exported compatibility functor, abstracted over constructor equality *) -module Compat : +module [@warning "-67"] Compat : functor (Constr: sig val equal : diff --git a/analysis/vendor/compiler-libs-406/stack.ml b/analysis/vendor/ml/parse.ml similarity index 64% rename from analysis/vendor/compiler-libs-406/stack.ml rename to analysis/vendor/ml/parse.ml index 21dad3e84..7de593c2a 100644 --- a/analysis/vendor/compiler-libs-406/stack.ml +++ b/analysis/vendor/ml/parse.ml @@ -13,32 +13,24 @@ (* *) (**************************************************************************) -type 'a t = { mutable c : 'a list; mutable len : int; } - -exception Empty - -let create () = { c = []; len = 0; } - -let clear s = s.c <- []; s.len <- 0 - -let copy s = { c = s.c; len = s.len; } - -let push x s = s.c <- x :: s.c; s.len <- s.len + 1 - -let pop s = - match s.c with - | hd::tl -> s.c <- tl; s.len <- s.len - 1; hd - | [] -> raise Empty - -let top s = - match s.c with - | hd::_ -> hd - | [] -> raise Empty - -let is_empty s = (s.c = []) - -let length s = s.len - -let iter f s = List.iter f s.c - -let fold f acc s = List.fold_left f acc s.c +(* Entry points in the parser *) + + +let wrap parsing_fun lexbuf = + try + Docstrings.init (); + Lexer.init (); + let ast = parsing_fun Lexer.token lexbuf in + Parsing.clear_parser(); + Docstrings.warn_bad_docstrings (); + ast + with + | Parsing.Parse_error | Syntaxerr.Escape_error -> + let loc = Location.curr lexbuf in + raise(Syntaxerr.Error(Syntaxerr.Other loc)) + +let implementation = wrap Parser.implementation +and interface = wrap Parser.interface +and core_type = wrap Parser.parse_core_type +and expression = wrap Parser.parse_expression +and pattern = wrap Parser.parse_pattern diff --git a/analysis/vendor/compiler-libs-406/parse.mli b/analysis/vendor/ml/parse.mli similarity index 91% rename from analysis/vendor/compiler-libs-406/parse.mli rename to analysis/vendor/ml/parse.mli index 8e6eb4544..a35feb8a7 100644 --- a/analysis/vendor/compiler-libs-406/parse.mli +++ b/analysis/vendor/ml/parse.mli @@ -17,8 +17,6 @@ val implementation : Lexing.lexbuf -> Parsetree.structure val interface : Lexing.lexbuf -> Parsetree.signature -val toplevel_phrase : Lexing.lexbuf -> Parsetree.toplevel_phrase -val use_file : Lexing.lexbuf -> Parsetree.toplevel_phrase list val core_type : Lexing.lexbuf -> Parsetree.core_type val expression : Lexing.lexbuf -> Parsetree.expression val pattern : Lexing.lexbuf -> Parsetree.pattern diff --git a/analysis/vendor/ml/parser.ml b/analysis/vendor/ml/parser.ml new file mode 100644 index 000000000..31527ccc9 --- /dev/null +++ b/analysis/vendor/ml/parser.ml @@ -0,0 +1,12169 @@ +type token = + | AMPERAMPER + | AMPERSAND + | AND + | AS + | ASSERT + | BACKQUOTE + | BANG + | BAR + | BARBAR + | BARRBRACKET + | BEGIN + | CHAR of (char) + | CLASS + | COLON + | COLONCOLON + | COLONEQUAL + | COLONGREATER + | COMMA + | CONSTRAINT + | DO + | DONE + | DOT + | DOTDOT + | DOWNTO + | ELSE + | END + | EOF + | EQUAL + | EXCEPTION + | EXTERNAL + | FALSE + | FLOAT of (string * char option) + | FOR + | FUN + | FUNCTION + | FUNCTOR + | GREATER + | GREATERRBRACE + | GREATERRBRACKET + | IF + | IN + | INCLUDE + | INFIXOP0 of (string) + | INFIXOP1 of (string) + | INFIXOP2 of (string) + | INFIXOP3 of (string) + | INFIXOP4 of (string) + | DOTOP of (string) + | INHERIT + | INITIALIZER + | INT of (string * char option) + | LABEL of (string) + | LAZY + | LBRACE + | LBRACELESS + | LBRACKET + | LBRACKETBAR + | LBRACKETLESS + | LBRACKETGREATER + | LBRACKETPERCENT + | LBRACKETPERCENTPERCENT + | LESS + | LESSMINUS + | LET + | LIDENT of (string) + | LPAREN + | LBRACKETAT + | LBRACKETATAT + | LBRACKETATATAT + | MATCH + | METHOD + | MINUS + | MINUSDOT + | MINUSGREATER + | MODULE + | MUTABLE + | NEW + | NONREC + | OBJECT + | OF + | OPEN + | OPTLABEL of (string) + | OR + | PERCENT + | PLUS + | PLUSDOT + | PLUSEQ + | PREFIXOP of (string) + | PRIVATE + | QUESTION + | QUOTE + | RBRACE + | RBRACKET + | REC + | RPAREN + | SEMI + | SEMISEMI + | HASH + | HASHOP of (string) + | SIG + | STAR + | STRING of (string * string option) + | STRUCT + | THEN + | TILDE + | TO + | TRUE + | TRY + | TYPE + | UIDENT of (string) + | UNDERSCORE + | VAL + | VIRTUAL + | WHEN + | WHILE + | WITH + | COMMENT of (string * Location.t) + | DOCSTRING of (Docstrings.docstring) + | EOL + +open Parsing;; +let _ = parse_error;; +# 19 "ml/parser.mly" +open Location +open Asttypes +open Longident +open Parsetree +open Ast_helper +open Docstrings + +let mktyp d = Typ.mk ~loc:(symbol_rloc()) d +let mkpat d = Pat.mk ~loc:(symbol_rloc()) d +let mkexp d = Exp.mk ~loc:(symbol_rloc()) d +let mkmty ?attrs d = Mty.mk ~loc:(symbol_rloc()) ?attrs d +let mksig d = Sig.mk ~loc:(symbol_rloc()) d +let mkmod ?attrs d = Mod.mk ~loc:(symbol_rloc()) ?attrs d +let mkstr d = Str.mk ~loc:(symbol_rloc()) d +let mkcty ?attrs d = Cty.mk ~loc:(symbol_rloc()) ?attrs d +let mkctf ?attrs ?docs d = + Ctf.mk ~loc:(symbol_rloc()) ?attrs ?docs d +let mkcf ?attrs ?docs d = + Cf.mk ~loc:(symbol_rloc()) ?attrs ?docs d + +let mkrhs rhs pos = mkloc rhs (rhs_loc pos) + +let reloc_pat x = { x with ppat_loc = symbol_rloc () };; +let reloc_exp x = { x with pexp_loc = symbol_rloc () };; + +let mkoperator name pos = + let loc = rhs_loc pos in + Exp.mk ~loc (Pexp_ident(mkloc (Lident name) loc)) + +let mkpatvar name pos = + Pat.mk ~loc:(rhs_loc pos) (Ppat_var (mkrhs name pos)) + +(* + Ghost expressions and patterns: + expressions and patterns that do not appear explicitly in the + source file they have the loc_ghost flag set to true. + Then the profiler will not try to instrument them and the + -annot option will not try to display their type. + + Every grammar rule that generates an element with a location must + make at most one non-ghost element, the topmost one. + + How to tell whether your location must be ghost: + A location corresponds to a range of characters in the source file. + If the location contains a piece of code that is syntactically + valid (according to the documentation), and corresponds to the + AST node, then the location must be real; in all other cases, + it must be ghost. +*) +let ghexp d = Exp.mk ~loc:(symbol_gloc ()) d +let ghpat d = Pat.mk ~loc:(symbol_gloc ()) d +let ghtyp d = Typ.mk ~loc:(symbol_gloc ()) d +let ghloc d = { txt = d; loc = symbol_gloc () } +let ghstr d = Str.mk ~loc:(symbol_gloc()) d +let ghsig d = Sig.mk ~loc:(symbol_gloc()) d + +let mkinfix arg1 name arg2 = + mkexp(Pexp_apply(mkoperator name 2, [Nolabel, arg1; Nolabel, arg2])) + +let neg_string f = + if String.length f > 0 && f.[0] = '-' + then String.sub f 1 (String.length f - 1) + else "-" ^ f + +let mkuminus name arg = + match name, arg.pexp_desc with + | "-", Pexp_constant(Pconst_integer (n,m)) -> + mkexp(Pexp_constant(Pconst_integer(neg_string n,m))) + | ("-" | "-."), Pexp_constant(Pconst_float (f, m)) -> + mkexp(Pexp_constant(Pconst_float(neg_string f, m))) + | _ -> + mkexp(Pexp_apply(mkoperator ("~" ^ name) 1, [Nolabel, arg])) + +let mkuplus name arg = + let desc = arg.pexp_desc in + match name, desc with + | "+", Pexp_constant(Pconst_integer _) + | ("+" | "+."), Pexp_constant(Pconst_float _) -> mkexp desc + | _ -> + mkexp(Pexp_apply(mkoperator ("~" ^ name) 1, [Nolabel, arg])) + +let mkexp_cons consloc args loc = + Exp.mk ~loc (Pexp_construct(mkloc (Lident "::") consloc, Some args)) + +let mkpat_cons consloc args loc = + Pat.mk ~loc (Ppat_construct(mkloc (Lident "::") consloc, Some args)) + +let rec mktailexp nilloc = function + [] -> + let loc = { nilloc with loc_ghost = true } in + let nil = { txt = Lident "[]"; loc = loc } in + Exp.mk ~loc (Pexp_construct (nil, None)) + | e1 :: el -> + let exp_el = mktailexp nilloc el in + let loc = {loc_start = e1.pexp_loc.loc_start; + loc_end = exp_el.pexp_loc.loc_end; + loc_ghost = true} + in + let arg = Exp.mk ~loc (Pexp_tuple [e1; exp_el]) in + mkexp_cons {loc with loc_ghost = true} arg loc + +let rec mktailpat nilloc = function + [] -> + let loc = { nilloc with loc_ghost = true } in + let nil = { txt = Lident "[]"; loc = loc } in + Pat.mk ~loc (Ppat_construct (nil, None)) + | p1 :: pl -> + let pat_pl = mktailpat nilloc pl in + let loc = {loc_start = p1.ppat_loc.loc_start; + loc_end = pat_pl.ppat_loc.loc_end; + loc_ghost = true} + in + let arg = Pat.mk ~loc (Ppat_tuple [p1; pat_pl]) in + mkpat_cons {loc with loc_ghost = true} arg loc + +let mkstrexp e attrs = + { pstr_desc = Pstr_eval (e, attrs); pstr_loc = e.pexp_loc } + +let mkexp_constraint e (t1, t2) = + match t1, t2 with + | Some t, None -> ghexp(Pexp_constraint(e, t)) + | _, Some t -> ghexp(Pexp_coerce(e, t1, t)) + | None, None -> assert false + +let mkexp_opt_constraint e = function + | None -> e + | Some constraint_ -> mkexp_constraint e constraint_ + +let mkpat_opt_constraint p = function + | None -> p + | Some typ -> mkpat (Ppat_constraint(p, typ)) + +let array_function str name = + ghloc (Ldot(Lident str, (if !Clflags.fast then "unsafe_" ^ name else name))) + +let syntax_error () = + raise Syntaxerr.Escape_error + +let unclosed opening_name opening_num closing_name closing_num = + raise(Syntaxerr.Error(Syntaxerr.Unclosed(rhs_loc opening_num, opening_name, + rhs_loc closing_num, closing_name))) + +let expecting pos nonterm = + raise Syntaxerr.(Error(Expecting(rhs_loc pos, nonterm))) + +let not_expecting pos nonterm = + raise Syntaxerr.(Error(Not_expecting(rhs_loc pos, nonterm))) + + +let lapply p1 p2 = + if !Clflags.applicative_functors + then Lapply(p1, p2) + else raise (Syntaxerr.Error(Syntaxerr.Applicative_path (symbol_rloc()))) + +let exp_of_label lbl pos = + mkexp (Pexp_ident(mkrhs (Lident(Longident.last lbl)) pos)) + +let pat_of_label lbl pos = + mkpat (Ppat_var (mkrhs (Longident.last lbl) pos)) + +let mk_newtypes newtypes exp = + List.fold_right (fun newtype exp -> mkexp (Pexp_newtype (newtype, exp))) + newtypes exp + +let wrap_type_annotation newtypes core_type body = + let exp = mkexp(Pexp_constraint(body,core_type)) in + let exp = mk_newtypes newtypes exp in + (exp, ghtyp(Ptyp_poly(newtypes, Typ.varify_constructors newtypes core_type))) + +let wrap_exp_attrs body (ext, attrs) = + (* todo: keep exact location for the entire attribute *) + let body = {body with pexp_attributes = attrs @ body.pexp_attributes} in + match ext with + | None -> body + | Some id -> ghexp(Pexp_extension (id, PStr [mkstrexp body []])) + +let mkexp_attrs d attrs = + wrap_exp_attrs (mkexp d) attrs + +let wrap_typ_attrs typ (ext, attrs) = + (* todo: keep exact location for the entire attribute *) + let typ = {typ with ptyp_attributes = attrs @ typ.ptyp_attributes} in + match ext with + | None -> typ + | Some id -> ghtyp(Ptyp_extension (id, PTyp typ)) + +let mktyp_attrs d attrs = + wrap_typ_attrs (mktyp d) attrs + +let wrap_pat_attrs pat (ext, attrs) = + (* todo: keep exact location for the entire attribute *) + let pat = {pat with ppat_attributes = attrs @ pat.ppat_attributes} in + match ext with + | None -> pat + | Some id -> ghpat(Ppat_extension (id, PPat (pat, None))) + +let mkpat_attrs d attrs = + wrap_pat_attrs (mkpat d) attrs + +let wrap_class_type_attrs body attrs = + {body with pcty_attributes = attrs @ body.pcty_attributes} +let wrap_mod_attrs body attrs = + {body with pmod_attributes = attrs @ body.pmod_attributes} +let wrap_mty_attrs body attrs = + {body with pmty_attributes = attrs @ body.pmty_attributes} + +let wrap_str_ext body ext = + match ext with + | None -> body + | Some id -> ghstr(Pstr_extension ((id, PStr [body]), [])) + +let mkstr_ext d ext = + wrap_str_ext (mkstr d) ext + +let wrap_sig_ext body ext = + match ext with + | None -> body + | Some id -> ghsig(Psig_extension ((id, PSig [body]), [])) + +let mksig_ext d ext = + wrap_sig_ext (mksig d) ext + +let text_str pos = Str.text (rhs_text pos) +let text_sig pos = Sig.text (rhs_text pos) +let text_cstr pos = Cf.text (rhs_text pos) +let text_csig pos = Ctf.text (rhs_text pos) + + +let extra_text text pos items = + let pre_extras = rhs_pre_extra_text pos in + let post_extras = rhs_post_extra_text pos in + text pre_extras @ items @ text post_extras + +let extra_str pos items = extra_text Str.text pos items +let extra_sig pos items = extra_text Sig.text pos items +let extra_cstr pos items = extra_text Cf.text pos items +let extra_csig pos items = extra_text Ctf.text pos items + +let extra_rhs_core_type ct ~pos = + let docs = rhs_info pos in + { ct with ptyp_attributes = add_info_attrs docs ct.ptyp_attributes } + +type let_binding = + { lb_pattern: pattern; + lb_expression: expression; + lb_attributes: attributes; + lb_docs: docs Lazy.t; + lb_text: text Lazy.t; + lb_loc: Location.t; } + +type [@warning "-69"] let_bindings = + { lbs_bindings: let_binding list; + lbs_rec: rec_flag; + lbs_extension: string Asttypes.loc option; + lbs_loc: Location.t } + +let mklb first (p, e) attrs = + { lb_pattern = p; + lb_expression = e; + lb_attributes = attrs; + lb_docs = symbol_docs_lazy (); + lb_text = if first then empty_text_lazy + else symbol_text_lazy (); + lb_loc = symbol_rloc (); } + +let mklbs ext rf lb = + { lbs_bindings = [lb]; + lbs_rec = rf; + lbs_extension = ext ; + lbs_loc = symbol_rloc (); } + +let addlb lbs lb = + { lbs with lbs_bindings = lb :: lbs.lbs_bindings } + +let val_of_let_bindings lbs = + let bindings = + List.map + (fun lb -> + Vb.mk ~loc:lb.lb_loc ~attrs:lb.lb_attributes + ~docs:(Lazy.force lb.lb_docs) + ~text:(Lazy.force lb.lb_text) + lb.lb_pattern lb.lb_expression) + lbs.lbs_bindings + in + let str = mkstr(Pstr_value(lbs.lbs_rec, List.rev bindings)) in + match lbs.lbs_extension with + | None -> str + | Some id -> ghstr (Pstr_extension((id, PStr [str]), [])) + +let expr_of_let_bindings lbs body = + let bindings = + List.map + (fun lb -> + Vb.mk ~loc:lb.lb_loc ~attrs:lb.lb_attributes + lb.lb_pattern lb.lb_expression) + lbs.lbs_bindings + in + mkexp_attrs (Pexp_let(lbs.lbs_rec, List.rev bindings, body)) + (lbs.lbs_extension, []) + + + +(* Alternatively, we could keep the generic module type in the Parsetree + and extract the package type during type-checking. In that case, + the assertions below should be turned into explicit checks. *) +let package_type_of_module_type pmty = + let err loc s = + raise (Syntaxerr.Error (Syntaxerr.Invalid_package_type (loc, s))) + in + let map_cstr = function + | Pwith_type (lid, ptyp) -> + let loc = ptyp.ptype_loc in + if ptyp.ptype_params <> [] then + err loc "parametrized types are not supported"; + if ptyp.ptype_cstrs <> [] then + err loc "constrained types are not supported"; + if ptyp.ptype_private <> Public then + err loc "private types are not supported"; + + (* restrictions below are checked by the 'with_constraint' rule *) + assert (ptyp.ptype_kind = Ptype_abstract); + assert (ptyp.ptype_attributes = []); + let ty = + match ptyp.ptype_manifest with + | Some ty -> ty + | None -> assert false + in + (lid, ty) + | _ -> + err pmty.pmty_loc "only 'with type t =' constraints are supported" + in + match pmty with + | {pmty_desc = Pmty_ident lid} -> (lid, []) + | {pmty_desc = Pmty_with({pmty_desc = Pmty_ident lid}, cstrs)} -> + (lid, List.map map_cstr cstrs) + | _ -> + err pmty.pmty_loc + "only module type identifier and 'with type' constraints are supported" + + +# 466 "ml/parser.ml" +let yytransl_const = [| + 257 (* AMPERAMPER *); + 258 (* AMPERSAND *); + 259 (* AND *); + 260 (* AS *); + 261 (* ASSERT *); + 262 (* BACKQUOTE *); + 263 (* BANG *); + 264 (* BAR *); + 265 (* BARBAR *); + 266 (* BARRBRACKET *); + 267 (* BEGIN *); + 269 (* CLASS *); + 270 (* COLON *); + 271 (* COLONCOLON *); + 272 (* COLONEQUAL *); + 273 (* COLONGREATER *); + 274 (* COMMA *); + 275 (* CONSTRAINT *); + 276 (* DO *); + 277 (* DONE *); + 278 (* DOT *); + 279 (* DOTDOT *); + 280 (* DOWNTO *); + 281 (* ELSE *); + 282 (* END *); + 0 (* EOF *); + 283 (* EQUAL *); + 284 (* EXCEPTION *); + 285 (* EXTERNAL *); + 286 (* FALSE *); + 288 (* FOR *); + 289 (* FUN *); + 290 (* FUNCTION *); + 291 (* FUNCTOR *); + 292 (* GREATER *); + 293 (* GREATERRBRACE *); + 294 (* GREATERRBRACKET *); + 295 (* IF *); + 296 (* IN *); + 297 (* INCLUDE *); + 304 (* INHERIT *); + 305 (* INITIALIZER *); + 308 (* LAZY *); + 309 (* LBRACE *); + 310 (* LBRACELESS *); + 311 (* LBRACKET *); + 312 (* LBRACKETBAR *); + 313 (* LBRACKETLESS *); + 314 (* LBRACKETGREATER *); + 315 (* LBRACKETPERCENT *); + 316 (* LBRACKETPERCENTPERCENT *); + 317 (* LESS *); + 318 (* LESSMINUS *); + 319 (* LET *); + 321 (* LPAREN *); + 322 (* LBRACKETAT *); + 323 (* LBRACKETATAT *); + 324 (* LBRACKETATATAT *); + 325 (* MATCH *); + 326 (* METHOD *); + 327 (* MINUS *); + 328 (* MINUSDOT *); + 329 (* MINUSGREATER *); + 330 (* MODULE *); + 331 (* MUTABLE *); + 332 (* NEW *); + 333 (* NONREC *); + 334 (* OBJECT *); + 335 (* OF *); + 336 (* OPEN *); + 338 (* OR *); + 339 (* PERCENT *); + 340 (* PLUS *); + 341 (* PLUSDOT *); + 342 (* PLUSEQ *); + 344 (* PRIVATE *); + 345 (* QUESTION *); + 346 (* QUOTE *); + 347 (* RBRACE *); + 348 (* RBRACKET *); + 349 (* REC *); + 350 (* RPAREN *); + 351 (* SEMI *); + 352 (* SEMISEMI *); + 353 (* HASH *); + 355 (* SIG *); + 356 (* STAR *); + 358 (* STRUCT *); + 359 (* THEN *); + 360 (* TILDE *); + 361 (* TO *); + 362 (* TRUE *); + 363 (* TRY *); + 364 (* TYPE *); + 366 (* UNDERSCORE *); + 367 (* VAL *); + 368 (* VIRTUAL *); + 369 (* WHEN *); + 370 (* WHILE *); + 371 (* WITH *); + 374 (* EOL *); + 0|] + +let yytransl_block = [| + 268 (* CHAR *); + 287 (* FLOAT *); + 298 (* INFIXOP0 *); + 299 (* INFIXOP1 *); + 300 (* INFIXOP2 *); + 301 (* INFIXOP3 *); + 302 (* INFIXOP4 *); + 303 (* DOTOP *); + 306 (* INT *); + 307 (* LABEL *); + 320 (* LIDENT *); + 337 (* OPTLABEL *); + 343 (* PREFIXOP *); + 354 (* HASHOP *); + 357 (* STRING *); + 365 (* UIDENT *); + 372 (* COMMENT *); + 373 (* DOCSTRING *); + 0|] + +let yylhs = "\255\255\ +\001\000\002\000\003\000\004\000\005\000\011\000\011\000\012\000\ +\012\000\014\000\014\000\015\000\015\000\015\000\015\000\015\000\ +\015\000\015\000\015\000\015\000\018\000\018\000\018\000\018\000\ +\018\000\018\000\018\000\018\000\018\000\018\000\018\000\006\000\ +\006\000\024\000\024\000\024\000\025\000\025\000\025\000\025\000\ +\025\000\025\000\025\000\025\000\025\000\025\000\025\000\025\000\ +\025\000\025\000\037\000\041\000\041\000\041\000\032\000\033\000\ +\033\000\042\000\043\000\013\000\013\000\013\000\013\000\013\000\ +\013\000\013\000\013\000\013\000\013\000\013\000\007\000\007\000\ +\007\000\046\000\046\000\046\000\046\000\046\000\046\000\046\000\ +\046\000\046\000\046\000\046\000\046\000\046\000\046\000\035\000\ +\052\000\054\000\054\000\054\000\049\000\050\000\051\000\051\000\ +\055\000\056\000\057\000\057\000\034\000\059\000\059\000\061\000\ +\062\000\062\000\062\000\063\000\063\000\064\000\064\000\064\000\ +\064\000\064\000\064\000\065\000\065\000\065\000\065\000\066\000\ +\066\000\066\000\066\000\066\000\075\000\075\000\075\000\075\000\ +\075\000\075\000\075\000\078\000\079\000\079\000\080\000\080\000\ +\081\000\081\000\081\000\081\000\081\000\081\000\082\000\082\000\ +\082\000\085\000\067\000\036\000\036\000\086\000\087\000\009\000\ +\009\000\009\000\009\000\089\000\089\000\089\000\089\000\089\000\ +\089\000\089\000\089\000\094\000\094\000\091\000\091\000\090\000\ +\090\000\092\000\093\000\093\000\021\000\021\000\021\000\021\000\ +\021\000\021\000\021\000\021\000\021\000\021\000\021\000\021\000\ +\021\000\021\000\021\000\021\000\021\000\021\000\021\000\021\000\ +\021\000\021\000\021\000\021\000\021\000\021\000\021\000\021\000\ +\021\000\021\000\021\000\021\000\021\000\021\000\021\000\021\000\ +\021\000\021\000\021\000\021\000\021\000\021\000\021\000\021\000\ +\021\000\021\000\021\000\021\000\021\000\021\000\021\000\021\000\ +\021\000\021\000\021\000\021\000\021\000\021\000\096\000\096\000\ +\096\000\096\000\096\000\096\000\096\000\096\000\096\000\096\000\ +\096\000\096\000\096\000\096\000\096\000\096\000\096\000\096\000\ +\096\000\096\000\096\000\096\000\096\000\096\000\096\000\096\000\ +\096\000\096\000\096\000\096\000\096\000\096\000\096\000\096\000\ +\096\000\096\000\096\000\096\000\096\000\096\000\096\000\096\000\ +\096\000\096\000\096\000\096\000\096\000\096\000\096\000\096\000\ +\096\000\096\000\096\000\096\000\096\000\096\000\096\000\096\000\ +\096\000\096\000\096\000\096\000\097\000\097\000\115\000\115\000\ +\116\000\116\000\116\000\116\000\117\000\074\000\074\000\118\000\ +\118\000\118\000\118\000\118\000\118\000\026\000\026\000\123\000\ +\124\000\126\000\126\000\073\000\073\000\073\000\100\000\100\000\ +\127\000\127\000\127\000\101\000\101\000\101\000\101\000\102\000\ +\102\000\111\000\111\000\129\000\129\000\129\000\130\000\130\000\ +\114\000\114\000\132\000\132\000\112\000\112\000\070\000\070\000\ +\070\000\070\000\070\000\131\000\131\000\010\000\010\000\010\000\ +\010\000\010\000\010\000\010\000\010\000\010\000\010\000\121\000\ +\121\000\121\000\121\000\121\000\121\000\121\000\121\000\121\000\ +\134\000\134\000\134\000\134\000\095\000\095\000\122\000\122\000\ +\122\000\122\000\122\000\122\000\122\000\122\000\122\000\122\000\ +\122\000\122\000\122\000\122\000\122\000\122\000\122\000\122\000\ +\122\000\122\000\122\000\122\000\138\000\138\000\138\000\138\000\ +\138\000\138\000\138\000\133\000\133\000\133\000\135\000\135\000\ +\135\000\140\000\140\000\139\000\139\000\139\000\139\000\141\000\ +\141\000\142\000\142\000\028\000\143\000\143\000\027\000\029\000\ +\029\000\144\000\145\000\149\000\149\000\148\000\148\000\148\000\ +\148\000\148\000\148\000\148\000\148\000\148\000\148\000\148\000\ +\147\000\147\000\147\000\152\000\153\000\153\000\155\000\155\000\ +\156\000\154\000\154\000\154\000\157\000\060\000\060\000\150\000\ +\150\000\150\000\158\000\159\000\031\000\031\000\048\000\098\000\ +\161\000\161\000\161\000\161\000\162\000\162\000\151\000\151\000\ +\151\000\164\000\165\000\030\000\047\000\167\000\167\000\167\000\ +\167\000\167\000\167\000\168\000\168\000\168\000\169\000\170\000\ +\171\000\172\000\045\000\045\000\173\000\173\000\173\000\173\000\ +\174\000\174\000\120\000\120\000\071\000\071\000\166\000\166\000\ +\008\000\008\000\175\000\175\000\177\000\177\000\177\000\177\000\ +\177\000\128\000\128\000\179\000\179\000\179\000\179\000\179\000\ +\179\000\179\000\179\000\179\000\179\000\179\000\179\000\179\000\ +\179\000\179\000\179\000\179\000\179\000\179\000\022\000\183\000\ +\183\000\184\000\184\000\182\000\182\000\186\000\186\000\187\000\ +\187\000\185\000\185\000\178\000\178\000\076\000\076\000\163\000\ +\163\000\180\000\180\000\180\000\180\000\180\000\180\000\180\000\ +\190\000\188\000\189\000\068\000\110\000\110\000\110\000\110\000\ +\136\000\136\000\136\000\136\000\136\000\058\000\058\000\119\000\ +\119\000\119\000\119\000\119\000\191\000\191\000\191\000\191\000\ +\191\000\191\000\191\000\191\000\191\000\191\000\191\000\191\000\ +\191\000\191\000\191\000\191\000\191\000\191\000\191\000\191\000\ +\191\000\191\000\191\000\191\000\191\000\191\000\191\000\191\000\ +\191\000\160\000\160\000\160\000\160\000\160\000\160\000\109\000\ +\109\000\103\000\103\000\103\000\103\000\103\000\103\000\103\000\ +\108\000\108\000\137\000\137\000\016\000\016\000\176\000\176\000\ +\176\000\044\000\044\000\077\000\077\000\181\000\181\000\104\000\ +\125\000\125\000\146\000\146\000\105\000\105\000\072\000\072\000\ +\069\000\069\000\084\000\084\000\083\000\083\000\083\000\083\000\ +\083\000\053\000\053\000\099\000\099\000\113\000\113\000\106\000\ +\106\000\107\000\107\000\192\000\192\000\192\000\192\000\192\000\ +\192\000\192\000\192\000\192\000\192\000\192\000\192\000\192\000\ +\192\000\192\000\192\000\192\000\192\000\192\000\192\000\192\000\ +\192\000\192\000\192\000\192\000\192\000\192\000\192\000\192\000\ +\192\000\192\000\192\000\192\000\192\000\192\000\192\000\192\000\ +\192\000\192\000\192\000\192\000\192\000\192\000\192\000\192\000\ +\192\000\192\000\192\000\192\000\192\000\192\000\088\000\088\000\ +\019\000\194\000\039\000\023\000\023\000\017\000\017\000\040\000\ +\040\000\040\000\020\000\038\000\193\000\193\000\193\000\193\000\ +\193\000\000\000\000\000\000\000\000\000\000\000" + +let yylen = "\002\000\ +\002\000\002\000\002\000\002\000\002\000\002\000\005\000\001\000\ +\001\000\002\000\001\000\001\000\004\000\004\000\005\000\002\000\ +\003\000\001\000\002\000\001\000\005\000\005\000\003\000\003\000\ +\005\000\007\000\009\000\007\000\006\000\006\000\005\000\003\000\ +\001\000\000\000\002\000\002\000\001\000\001\000\001\000\001\000\ +\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ +\002\000\001\000\004\000\002\000\004\000\002\000\005\000\001\000\ +\002\000\006\000\005\000\001\000\004\000\004\000\005\000\003\000\ +\003\000\005\000\003\000\003\000\001\000\002\000\000\000\002\000\ +\002\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ +\001\000\001\000\001\000\001\000\001\000\002\000\001\000\005\000\ +\004\000\002\000\006\000\003\000\005\000\006\000\001\000\002\000\ +\007\000\006\000\000\000\002\000\006\000\000\000\003\000\002\000\ +\003\000\005\000\000\000\000\000\002\000\003\000\003\000\004\000\ +\004\000\002\000\001\000\007\000\007\000\006\000\007\000\007\000\ +\007\000\005\000\008\000\011\000\004\000\001\000\004\000\004\000\ +\002\000\001\000\007\000\002\000\003\000\000\000\000\000\002\000\ +\004\000\004\000\007\000\004\000\002\000\001\000\005\000\005\000\ +\003\000\003\000\003\000\001\000\002\000\009\000\008\000\001\000\ +\002\000\003\000\005\000\005\000\002\000\005\000\002\000\004\000\ +\002\000\002\000\001\000\001\000\001\000\000\000\002\000\001\000\ +\003\000\001\000\001\000\003\000\001\000\002\000\003\000\007\000\ +\006\000\007\000\004\000\004\000\007\000\006\000\006\000\005\000\ +\001\000\002\000\002\000\007\000\005\000\006\000\010\000\003\000\ +\003\000\003\000\003\000\003\000\003\000\003\000\003\000\003\000\ +\003\000\003\000\003\000\003\000\003\000\003\000\003\000\003\000\ +\003\000\003\000\003\000\003\000\002\000\002\000\005\000\007\000\ +\007\000\007\000\007\000\007\000\009\000\009\000\009\000\003\000\ +\003\000\003\000\004\000\004\000\002\000\001\000\001\000\001\000\ +\001\000\001\000\003\000\003\000\004\000\003\000\004\000\004\000\ +\003\000\005\000\004\000\005\000\005\000\005\000\005\000\005\000\ +\005\000\005\000\005\000\005\000\005\000\005\000\007\000\007\000\ +\007\000\007\000\007\000\007\000\005\000\003\000\003\000\005\000\ +\005\000\004\000\004\000\002\000\006\000\004\000\006\000\004\000\ +\004\000\006\000\004\000\006\000\002\000\002\000\003\000\003\000\ +\002\000\005\000\004\000\005\000\003\000\003\000\005\000\007\000\ +\006\000\009\000\008\000\001\000\001\000\002\000\001\000\001\000\ +\002\000\002\000\002\000\002\000\001\000\001\000\002\000\002\000\ +\004\000\007\000\008\000\003\000\005\000\001\000\002\000\005\000\ +\004\000\001\000\003\000\002\000\002\000\005\000\001\000\003\000\ +\003\000\005\000\003\000\002\000\004\000\002\000\005\000\003\000\ +\003\000\003\000\001\000\001\000\003\000\002\000\004\000\002\000\ +\002\000\003\000\003\000\001\000\001\000\003\000\002\000\004\000\ +\002\000\002\000\002\000\001\000\000\000\003\000\003\000\001\000\ +\003\000\003\000\003\000\003\000\003\000\002\000\001\000\003\000\ +\003\000\001\000\003\000\003\000\003\000\003\000\002\000\001\000\ +\001\000\002\000\002\000\003\000\001\000\001\000\001\000\001\000\ +\003\000\001\000\001\000\002\000\001\000\003\000\004\000\004\000\ +\005\000\005\000\004\000\003\000\003\000\005\000\005\000\004\000\ +\005\000\007\000\007\000\001\000\003\000\003\000\004\000\004\000\ +\004\000\002\000\004\000\003\000\003\000\003\000\003\000\003\000\ +\003\000\001\000\003\000\001\000\002\000\004\000\003\000\004\000\ +\002\000\002\000\000\000\006\000\001\000\002\000\008\000\001\000\ +\002\000\008\000\007\000\003\000\000\000\000\000\002\000\003\000\ +\002\000\003\000\002\000\003\000\005\000\005\000\005\000\007\000\ +\000\000\001\000\003\000\002\000\001\000\003\000\002\000\001\000\ +\002\000\000\000\001\000\001\000\002\000\001\000\003\000\001\000\ +\001\000\002\000\003\000\004\000\001\000\007\000\006\000\003\000\ +\000\000\002\000\004\000\002\000\001\000\003\000\001\000\001\000\ +\002\000\005\000\007\000\009\000\009\000\001\000\001\000\001\000\ +\001\000\002\000\002\000\001\000\001\000\002\000\003\000\004\000\ +\004\000\005\000\001\000\003\000\006\000\005\000\004\000\004\000\ +\001\000\002\000\002\000\003\000\001\000\003\000\001\000\003\000\ +\001\000\002\000\001\000\004\000\001\000\006\000\004\000\005\000\ +\003\000\001\000\003\000\002\000\001\000\001\000\002\000\004\000\ +\003\000\002\000\002\000\003\000\005\000\003\000\004\000\005\000\ +\004\000\002\000\004\000\006\000\005\000\001\000\001\000\001\000\ +\003\000\001\000\001\000\005\000\002\000\001\000\000\000\001\000\ +\003\000\001\000\002\000\001\000\003\000\001\000\003\000\001\000\ +\003\000\002\000\002\000\001\000\001\000\001\000\001\000\001\000\ +\004\000\006\000\002\000\001\000\001\000\001\000\001\000\001\000\ +\001\000\002\000\002\000\002\000\002\000\001\000\001\000\001\000\ +\003\000\003\000\002\000\003\000\001\000\001\000\001\000\001\000\ +\001\000\001\000\003\000\004\000\003\000\004\000\003\000\004\000\ +\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ +\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ +\001\000\001\000\002\000\002\000\003\000\001\000\001\000\001\000\ +\003\000\001\000\005\000\002\000\002\000\003\000\001\000\001\000\ +\001\000\003\000\001\000\003\000\001\000\003\000\001\000\003\000\ +\004\000\001\000\003\000\001\000\003\000\001\000\003\000\002\000\ +\000\000\001\000\000\000\001\000\001\000\001\000\000\000\001\000\ +\000\000\001\000\000\000\001\000\000\000\001\000\001\000\002\000\ +\002\000\000\000\001\000\000\000\001\000\000\000\001\000\001\000\ +\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ +\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ +\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ +\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ +\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ +\001\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ +\001\000\001\000\001\000\001\000\001\000\001\000\001\000\003\000\ +\004\000\004\000\004\000\000\000\002\000\000\000\002\000\000\000\ +\002\000\003\000\004\000\004\000\001\000\002\000\002\000\002\000\ +\004\000\002\000\002\000\002\000\002\000\002\000" + +let yydefred = "\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\054\002\000\000\000\000\000\000\111\002\056\002\ +\000\000\000\000\000\000\000\000\000\000\053\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\152\002\153\002\000\000\000\000\000\000\154\002\ +\155\002\000\000\000\000\055\002\112\002\000\000\000\000\117\002\ +\230\000\000\000\000\000\226\002\000\000\000\000\000\000\036\001\ +\000\000\033\000\000\000\000\000\038\000\039\000\000\000\041\000\ +\042\000\043\000\000\000\045\000\046\000\000\000\048\000\000\000\ +\050\000\056\000\205\001\000\000\148\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\231\000\232\000\104\002\054\001\168\001\ +\000\000\000\000\000\000\000\000\000\000\227\002\000\000\075\000\ +\074\000\000\000\082\000\083\000\000\000\000\000\087\000\000\000\ +\077\000\078\000\079\000\080\000\000\000\084\000\095\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\119\002\005\002\228\002\000\000\022\002\000\000\006\002\ +\249\001\000\000\000\000\253\001\000\000\229\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\064\002\000\000\000\000\ +\000\000\000\000\119\001\230\002\000\000\000\000\140\001\113\001\ +\000\000\000\000\057\002\117\001\118\001\000\000\103\001\000\000\ +\125\001\000\000\000\000\000\000\000\000\063\002\062\002\128\002\ +\022\001\233\000\234\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\075\001\000\000\025\001\052\002\000\000\000\000\ +\000\000\108\002\000\000\000\000\012\001\000\000\158\002\159\002\ +\160\002\161\002\162\002\163\002\164\002\165\002\166\002\167\002\ +\168\002\169\002\170\002\171\002\172\002\173\002\174\002\175\002\ +\176\002\177\002\178\002\179\002\180\002\181\002\182\002\156\002\ +\183\002\184\002\185\002\186\002\187\002\188\002\189\002\190\002\ +\191\002\192\002\193\002\194\002\195\002\196\002\197\002\198\002\ +\199\002\200\002\201\002\157\002\202\002\203\002\204\002\205\002\ +\206\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\067\002\094\002\093\002\000\000\092\002\000\000\095\002\088\002\ +\090\002\070\002\071\002\072\002\073\002\074\002\000\000\089\002\ +\000\000\000\000\000\000\091\002\097\002\000\000\000\000\096\002\ +\000\000\109\002\081\002\087\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\147\002\000\000\021\001\035\000\000\000\ +\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\229\000\ +\000\000\036\000\000\000\000\000\000\000\055\001\000\000\169\001\ +\000\000\057\000\000\000\149\000\049\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\037\001\040\001\000\000\000\000\000\000\213\000\214\000\000\000\ +\000\000\000\000\072\000\000\000\002\000\086\000\073\000\000\000\ +\096\000\000\000\115\002\000\000\027\002\000\000\000\000\149\002\ +\000\000\018\002\000\000\048\002\010\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\045\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\004\002\126\002\000\000\011\002\003\000\250\001\ +\000\000\000\000\000\000\000\000\000\000\000\000\007\002\004\000\ +\000\000\000\000\113\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\146\001\000\000\082\002\000\000\086\002\000\000\000\000\ +\084\002\069\002\000\000\059\002\058\002\061\002\060\002\124\001\ +\000\000\000\000\000\000\000\000\005\000\102\001\000\000\114\001\ +\115\001\000\000\000\000\000\000\000\000\217\002\000\000\000\000\ +\000\000\000\000\238\000\000\000\000\000\102\002\000\000\000\000\ +\103\002\098\002\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\163\000\122\001\123\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\018\000\020\000\ +\000\000\000\000\000\000\000\000\000\000\092\001\000\000\007\001\ +\006\001\000\000\000\000\024\001\023\001\000\000\081\001\000\000\ +\000\000\000\000\000\000\000\000\221\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\130\002\000\000\110\002\000\000\000\000\ +\000\000\068\002\000\000\236\000\235\000\000\000\066\002\065\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\108\000\ +\000\000\000\000\132\002\000\000\000\000\000\000\000\000\032\000\ +\213\002\000\000\000\000\000\000\000\000\000\000\118\002\105\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\154\000\000\000\ +\000\000\175\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\045\001\043\001\029\001\000\000\042\001\038\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\069\000\060\000\ +\122\002\000\000\000\000\000\000\000\000\000\000\026\002\000\000\ +\024\002\000\000\029\002\014\002\000\000\000\000\000\000\000\000\ +\051\002\009\002\042\002\043\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\040\002\000\000\116\002\120\002\000\000\ +\000\000\000\000\012\002\101\001\116\001\000\000\000\000\000\000\ +\142\001\141\001\000\000\000\000\000\000\000\000\000\000\133\001\ +\000\000\132\001\095\001\094\001\100\001\000\000\098\001\000\000\ +\150\001\000\000\000\000\000\000\126\001\000\000\121\001\000\000\ +\218\002\215\002\000\000\000\000\000\000\241\000\000\000\000\000\ +\000\000\239\000\237\000\140\002\000\000\099\002\000\000\100\002\ +\000\000\000\000\000\000\000\000\085\002\000\000\083\002\000\000\ +\000\000\162\000\000\000\164\000\000\000\165\000\159\000\170\000\ +\000\000\157\000\000\000\161\000\000\000\000\000\000\000\000\000\ +\180\000\000\000\000\000\063\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\016\000\019\000\051\000\000\000\000\000\074\001\ +\090\001\000\000\091\001\000\000\000\000\077\001\000\000\082\001\ +\000\000\017\001\016\001\011\001\010\001\222\002\000\000\000\000\ +\219\002\208\002\220\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\112\001\000\000\000\000\000\000\000\000\ +\000\000\240\000\211\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\228\000\227\000\000\000\000\000\ +\000\000\000\000\196\001\195\001\000\000\186\001\000\000\000\000\ +\000\000\000\000\000\000\027\001\000\000\019\001\000\000\014\001\ +\000\000\000\000\000\000\243\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\070\000\089\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\015\002\030\002\000\000\000\000\ +\000\000\019\002\017\002\000\000\000\000\000\000\247\001\000\000\ +\000\000\000\000\000\000\000\000\008\002\000\000\000\000\127\002\ +\000\000\000\000\121\002\252\001\114\002\000\000\000\000\000\000\ +\159\001\000\000\144\001\143\001\147\001\145\001\000\000\136\001\ +\000\000\127\001\131\001\128\001\000\000\209\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\101\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\210\001\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\068\001\070\001\000\000\000\000\ +\000\000\000\000\011\000\000\000\000\000\024\000\000\000\023\000\ +\000\000\017\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\056\001\000\000\000\000\000\000\000\000\048\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\111\001\000\000\000\000\ +\080\002\078\002\076\002\000\000\031\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\006\000\008\000\009\000\000\000\054\000\ +\055\000\000\000\105\000\000\000\000\000\000\000\000\000\000\000\ +\115\000\109\000\088\000\184\000\000\000\189\001\000\000\000\000\ +\000\000\000\000\192\001\188\001\000\000\000\000\210\002\009\001\ +\008\001\028\001\026\001\000\000\000\000\107\002\000\000\244\000\ +\242\000\155\000\057\001\000\000\000\000\000\000\005\001\248\000\ +\000\000\246\000\000\000\000\000\000\000\000\000\000\000\254\000\ +\000\000\250\000\000\000\252\000\000\000\000\000\068\000\067\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\235\001\000\000\ +\123\002\000\000\000\000\000\000\000\000\000\000\093\000\000\000\ +\000\000\025\002\032\002\000\000\016\002\034\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\021\002\013\002\000\000\041\002\ +\000\000\151\002\158\001\000\000\137\001\135\001\134\001\130\001\ +\129\001\247\000\245\000\000\000\000\000\000\000\253\000\249\000\ +\251\000\000\000\000\000\198\001\000\000\138\002\000\000\000\000\ +\215\001\000\000\000\000\000\000\000\000\207\001\000\000\134\002\ +\133\002\000\000\047\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\160\000\000\000\000\000\067\001\065\001\000\000\064\001\ +\000\000\000\000\010\000\000\000\000\000\014\000\013\000\000\000\ +\225\002\177\000\208\001\000\000\000\000\000\000\000\000\060\001\ +\000\000\000\000\000\000\058\001\061\001\105\001\104\001\110\001\ +\000\000\108\001\000\000\153\001\000\000\052\001\000\000\000\000\ +\033\001\000\000\000\000\000\000\101\000\058\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\114\000\ +\000\000\000\000\187\001\000\000\173\001\000\000\191\001\164\001\ +\190\000\020\001\018\001\015\001\013\001\000\000\173\001\059\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\062\000\061\000\000\000\000\000\000\000\ +\000\000\094\000\092\000\000\000\000\000\000\000\000\000\028\002\ +\020\002\035\002\248\001\244\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\103\000\000\000\193\001\000\000\000\000\ +\214\001\217\001\211\001\000\000\206\001\000\000\000\000\000\000\ +\181\000\000\000\167\000\158\000\156\000\000\000\069\001\000\000\ +\000\000\000\000\000\000\031\000\000\000\000\000\025\000\022\000\ +\021\000\176\000\178\000\000\000\000\000\000\000\049\001\000\000\ +\000\000\032\001\000\000\000\000\106\000\000\000\000\000\000\000\ +\000\000\111\000\000\000\110\000\190\001\000\000\179\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\200\001\201\001\ +\000\000\000\000\136\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\004\001\000\000\000\001\000\000\002\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\236\001\ +\097\000\000\000\000\000\098\000\033\002\050\002\139\001\138\001\ +\003\001\255\000\001\001\199\001\197\001\000\000\000\000\124\002\ +\000\000\130\000\000\000\126\000\000\000\000\000\166\001\167\001\ +\000\000\071\001\066\001\029\000\000\000\030\000\000\000\000\000\ +\000\000\000\000\059\001\053\001\007\000\000\000\112\000\113\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\180\001\ +\000\000\000\000\000\000\000\000\202\001\000\000\000\000\170\001\ +\000\000\000\000\000\000\222\001\223\001\224\001\225\001\035\001\ +\000\000\171\001\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\228\001\ +\229\001\000\000\000\000\000\000\129\000\150\000\000\000\000\000\ +\000\000\000\000\026\000\028\000\000\000\000\000\062\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\203\001\000\000\172\001\000\000\000\000\000\000\220\001\ +\226\001\227\001\034\001\151\000\000\000\000\000\000\000\238\001\ +\242\001\173\001\091\000\000\000\221\001\230\001\000\000\000\000\ +\000\000\000\000\135\000\125\002\000\000\191\000\000\000\000\000\ +\050\001\000\000\000\000\000\000\122\000\000\000\000\000\000\000\ +\000\000\204\001\183\001\000\000\000\000\181\001\000\000\000\000\ +\000\000\000\000\231\001\000\000\125\000\000\000\000\000\128\000\ +\127\000\000\000\000\000\027\000\051\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\118\000\000\000\000\000\ +\000\000\000\000\232\001\233\001\000\000\133\000\000\000\000\000\ +\000\000\000\000\000\000\142\000\136\000\219\001\120\000\121\000\ +\000\000\000\000\000\000\000\000\000\000\119\000\184\001\234\001\ +\000\000\000\000\000\000\000\000\000\000\141\000\000\000\123\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\140\000\137\000\144\002\145\002\ +\000\000\000\000\000\000\000\000\138\000\000\000\000\000\000\000\ +\000\000\000\000\124\000\000\000\000\000\000\000\139\000\000\000\ +\000\000" + +let yydgoto = "\006\000\ +\052\000\094\000\124\000\134\000\148\000\245\001\095\000\153\005\ +\054\000\171\001\250\002\175\003\065\003\132\003\200\002\055\000\ +\190\001\223\001\072\001\056\000\057\000\066\003\046\001\058\000\ +\059\000\136\000\061\000\062\000\063\000\064\000\065\000\066\000\ +\067\000\068\000\069\000\070\000\071\000\072\000\073\000\000\001\ +\251\002\074\000\082\001\088\002\238\003\104\000\105\000\075\000\ +\107\000\108\000\109\000\110\000\037\001\049\003\111\000\113\001\ +\168\003\089\002\102\003\026\004\015\002\016\002\255\002\186\003\ +\103\004\101\004\199\004\076\000\031\004\075\004\154\005\213\004\ +\076\004\117\003\003\005\136\001\004\005\114\005\115\005\146\005\ +\173\005\203\005\199\005\165\002\092\005\077\000\084\001\250\000\ +\192\002\120\003\047\004\121\003\119\003\183\002\152\000\078\000\ +\096\001\228\002\121\001\195\002\193\002\079\000\080\000\081\000\ +\042\004\082\000\083\000\185\000\084\000\085\000\186\000\196\000\ +\239\001\192\000\097\001\098\001\074\002\232\002\086\000\155\005\ +\234\002\157\000\087\000\078\001\253\001\077\004\196\002\127\000\ +\187\000\188\000\231\001\193\000\158\000\159\000\237\002\160\000\ +\128\000\161\000\158\001\161\001\159\001\128\002\167\004\088\000\ +\080\001\020\002\005\003\109\004\218\004\214\004\032\004\006\003\ +\191\003\007\003\196\003\028\004\158\004\215\004\216\004\217\004\ +\172\002\106\003\107\003\033\004\034\004\062\003\043\005\063\005\ +\044\005\045\005\046\005\047\005\239\003\059\005\129\000\130\000\ +\131\000\132\000\133\000\129\001\142\001\095\002\096\002\097\002\ +\255\003\055\003\252\003\130\001\131\001\132\001\030\001\251\000\ +\246\001\047\001" + +let yysindex = "\180\007\ +\119\061\200\008\016\047\124\064\160\067\000\000\076\004\241\002\ +\244\009\076\004\000\000\236\254\076\004\076\004\000\000\000\000\ +\076\004\076\004\076\004\076\004\076\004\000\000\076\004\044\067\ +\174\002\205\061\037\062\122\057\122\057\068\003\000\000\232\054\ +\122\057\076\004\000\000\000\000\036\004\076\004\106\000\000\000\ +\000\000\244\009\119\061\000\000\000\000\076\004\076\004\000\000\ +\000\000\076\004\076\004\000\000\254\000\102\000\157\000\000\000\ +\225\072\000\000\222\005\236\255\000\000\000\000\241\000\000\000\ +\000\000\000\000\017\001\000\000\000\000\024\002\000\000\102\000\ +\000\000\000\000\000\000\089\001\000\000\034\069\015\002\244\009\ +\244\009\124\064\124\064\000\000\000\000\000\000\000\000\000\000\ +\076\004\076\004\036\004\200\008\076\004\000\000\140\003\000\000\ +\000\000\241\000\000\000\000\000\024\002\102\000\000\000\200\008\ +\000\000\000\000\000\000\000\000\113\002\000\000\000\000\145\007\ +\220\002\050\255\122\009\044\003\165\016\016\047\054\003\241\002\ +\021\003\000\000\000\000\000\000\038\000\000\000\023\003\000\000\ +\000\000\115\001\232\000\000\000\061\002\000\000\216\004\236\255\ +\076\004\076\004\035\003\163\066\226\066\000\000\088\059\018\004\ +\129\004\086\003\000\000\000\000\067\000\251\003\000\000\000\000\ +\160\067\160\067\000\000\000\000\000\000\039\004\000\000\107\004\ +\000\000\122\057\122\057\033\004\244\009\000\000\000\000\000\000\ +\000\000\000\000\000\000\122\062\076\004\041\002\097\005\160\067\ +\040\066\220\002\124\064\019\002\244\009\000\000\188\004\113\001\ +\212\002\117\255\000\000\127\004\000\000\000\000\246\004\165\002\ +\224\004\000\000\073\073\248\004\000\000\248\004\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\032\061\080\005\032\061\076\004\076\004\106\000\022\005\ +\000\000\000\000\000\000\244\009\000\000\036\005\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\083\005\000\000\ +\000\000\000\000\165\000\000\000\000\000\000\000\000\000\000\000\ +\244\009\000\000\000\000\000\000\184\255\130\255\032\061\124\064\ +\076\004\160\255\070\005\000\000\076\004\000\000\000\000\124\064\ +\069\005\097\005\124\064\000\000\122\057\222\005\102\000\225\004\ +\124\064\124\064\124\064\124\064\124\064\124\064\124\064\124\064\ +\124\064\124\064\124\064\124\064\124\064\124\064\124\064\124\064\ +\124\064\124\064\124\064\124\064\124\064\207\062\124\064\000\000\ +\076\004\000\000\173\005\033\004\124\064\000\000\033\004\000\000\ +\033\004\000\000\033\004\000\000\000\000\124\064\104\003\099\005\ +\244\009\244\009\150\005\157\005\244\009\150\005\119\002\041\069\ +\000\000\000\000\124\064\119\002\119\002\000\000\000\000\041\002\ +\219\003\168\004\000\000\069\005\000\000\000\000\000\000\033\004\ +\000\000\174\004\000\000\017\255\000\000\138\005\235\005\000\000\ +\174\004\000\000\174\004\000\000\000\000\000\000\233\005\163\005\ +\231\005\043\017\043\017\000\000\016\047\076\004\033\004\183\000\ +\198\005\004\006\000\000\000\000\255\005\000\000\000\000\000\000\ +\090\008\094\003\170\005\194\005\016\047\021\003\000\000\000\000\ +\160\067\168\068\000\000\010\006\034\006\203\255\224\005\037\004\ +\236\005\000\000\236\005\000\000\018\004\000\000\165\000\129\004\ +\000\000\000\000\076\001\000\000\000\000\000\000\000\000\000\000\ +\053\002\152\013\239\059\044\060\000\000\000\000\144\003\000\000\ +\000\000\160\067\076\003\032\061\033\004\000\000\033\004\119\002\ +\189\004\102\005\000\000\205\001\227\005\000\000\251\005\158\000\ +\000\000\000\000\009\002\006\070\077\006\128\003\168\068\011\058\ +\104\002\136\005\205\005\188\065\000\000\000\000\000\000\160\067\ +\241\005\033\004\141\001\033\004\115\005\072\006\000\000\000\000\ +\119\002\143\005\035\003\070\006\214\007\000\000\078\006\000\000\ +\000\000\035\003\124\064\000\000\000\000\157\005\000\000\124\064\ +\118\255\051\003\200\073\160\067\000\000\020\006\122\057\023\006\ +\041\002\009\006\076\004\000\000\229\050\000\000\022\006\028\006\ +\029\006\000\000\019\002\000\000\000\000\038\006\000\000\000\000\ +\041\006\027\006\241\002\037\006\178\002\160\067\232\002\000\000\ +\043\006\032\006\000\000\029\005\122\006\123\006\032\061\000\000\ +\000\000\044\067\116\003\036\063\124\063\087\055\000\000\000\000\ +\166\073\166\073\134\073\247\007\073\073\134\073\239\009\239\009\ +\239\009\239\009\089\002\104\006\104\006\239\009\089\002\089\002\ +\134\073\104\006\089\002\089\002\089\002\122\057\000\000\104\006\ +\229\050\000\000\029\005\044\006\227\005\073\073\124\064\124\064\ +\124\064\170\004\092\006\124\064\124\064\124\064\119\002\119\002\ +\000\000\000\000\000\000\218\004\000\000\000\000\134\073\027\001\ +\033\004\219\003\048\006\033\004\000\000\211\002\000\000\000\000\ +\000\000\123\002\055\006\186\002\029\005\057\006\000\000\199\255\ +\000\000\155\006\000\000\000\000\174\004\091\001\211\255\062\048\ +\000\000\000\000\000\000\000\000\096\006\219\003\016\047\159\002\ +\016\047\016\047\119\003\000\000\071\006\000\000\000\000\021\001\ +\241\002\097\006\000\000\000\000\000\000\121\003\016\047\148\006\ +\000\000\000\000\053\003\160\067\029\000\108\005\067\006\000\000\ +\097\011\000\000\000\000\000\000\000\000\179\002\000\000\162\006\ +\000\000\173\000\031\067\178\059\000\000\173\000\000\000\094\006\ +\000\000\000\000\124\064\124\064\235\004\000\000\124\064\124\064\ +\124\064\000\000\000\000\000\000\132\006\000\000\095\006\000\000\ +\019\015\074\002\019\015\033\004\000\000\188\006\000\000\016\047\ +\124\064\000\000\126\006\000\000\160\067\000\000\000\000\000\000\ +\127\006\000\000\127\006\000\000\090\008\122\058\124\064\188\065\ +\000\000\108\000\184\006\000\000\124\064\130\006\033\004\073\001\ +\119\061\155\001\000\000\000\000\000\000\087\006\000\000\000\000\ +\000\000\161\000\000\000\033\004\124\064\000\000\073\073\000\000\ +\073\073\000\000\000\000\000\000\000\000\000\000\033\004\243\000\ +\000\000\000\000\000\000\157\006\027\001\178\002\043\006\102\000\ +\100\065\068\005\190\006\000\000\187\006\146\006\149\006\153\006\ +\021\002\000\000\000\000\220\002\191\006\178\002\219\003\019\002\ +\078\003\178\002\102\000\007\002\000\000\000\000\169\001\201\003\ +\091\005\103\004\000\000\000\000\176\003\000\000\244\254\016\047\ +\124\064\125\006\221\255\000\000\255\002\000\000\248\004\000\000\ +\248\004\128\006\165\000\000\000\165\255\124\064\102\000\156\006\ +\178\002\132\006\073\073\038\005\063\000\190\255\162\005\124\064\ +\085\070\117\070\195\070\130\006\094\255\145\006\200\008\219\003\ +\129\002\000\000\000\000\186\003\212\006\219\003\043\006\214\004\ +\102\000\176\003\214\006\174\004\000\000\000\000\016\047\057\000\ +\224\006\000\000\000\000\241\002\057\255\033\004\000\000\016\047\ +\180\001\137\006\033\004\021\003\000\000\097\006\159\006\000\000\ +\090\008\124\006\000\000\000\000\000\000\033\004\160\067\142\006\ +\000\000\037\004\000\000\000\000\000\000\000\000\149\000\000\000\ +\223\255\000\000\000\000\000\000\208\001\000\000\098\000\245\255\ +\181\005\227\070\049\071\081\071\103\004\174\006\000\000\164\006\ +\000\000\172\006\071\006\158\006\169\000\225\006\033\004\000\000\ +\102\000\144\000\182\255\126\006\154\006\125\005\226\006\226\006\ +\237\006\166\006\179\006\126\006\000\000\000\000\210\063\124\064\ +\160\067\041\073\000\000\044\005\124\064\000\000\219\003\000\000\ +\030\003\000\000\016\047\073\073\124\064\124\064\033\004\216\006\ +\060\255\000\000\028\009\124\064\233\058\234\006\000\000\161\065\ +\059\002\105\060\166\060\227\060\124\064\000\000\016\047\160\067\ +\000\000\000\000\000\000\015\000\000\000\160\067\219\003\102\000\ +\102\000\175\001\226\005\000\000\000\000\000\000\248\006\000\000\ +\000\000\016\047\000\000\033\004\033\004\106\000\106\000\102\000\ +\000\000\000\000\000\000\000\000\160\067\000\000\217\000\236\006\ +\180\006\241\002\000\000\000\000\234\005\244\006\000\000\000\000\ +\000\000\000\000\000\000\110\000\122\005\000\000\019\002\000\000\ +\000\000\000\000\000\000\236\006\102\000\203\006\000\000\000\000\ +\206\006\000\000\210\006\124\064\124\064\124\064\073\073\000\000\ +\211\006\000\000\217\006\000\000\223\006\199\005\000\000\000\000\ +\033\004\120\004\180\001\043\006\029\005\015\007\000\000\000\000\ +\000\000\219\003\180\001\201\003\061\001\008\007\000\000\200\006\ +\219\003\000\000\000\000\087\001\000\000\000\000\074\255\000\000\ +\016\047\241\002\193\006\097\006\000\000\000\000\016\047\000\000\ +\037\004\000\000\000\000\219\003\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\124\064\124\064\124\064\000\000\000\000\ +\000\000\228\255\201\006\000\000\007\007\000\000\157\005\208\006\ +\000\000\164\006\090\008\184\000\102\000\000\000\204\006\000\000\ +\000\000\124\064\000\000\188\065\016\047\124\064\209\006\215\006\ +\016\047\000\000\124\064\218\006\000\000\000\000\219\006\000\000\ +\124\064\019\002\000\000\174\069\097\255\000\000\000\000\033\004\ +\000\000\000\000\000\000\124\064\124\064\126\006\046\001\000\000\ +\126\006\124\064\019\007\000\000\000\000\000\000\000\000\000\000\ +\179\002\000\000\162\006\000\000\173\000\000\000\088\003\173\000\ +\000\000\227\006\184\006\180\001\000\000\000\000\019\002\219\003\ +\255\254\016\047\124\064\033\004\102\000\033\004\102\000\000\000\ +\184\006\103\004\000\000\162\011\000\000\229\006\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\108\002\000\000\000\000\ +\036\007\124\064\124\064\168\071\200\071\022\072\124\064\124\064\ +\124\064\219\003\019\002\000\000\000\000\202\005\035\003\129\002\ +\211\002\000\000\000\000\219\003\229\006\211\002\016\047\000\000\ +\000\000\000\000\000\000\000\000\033\004\097\006\001\000\054\072\ +\132\072\164\072\103\004\000\000\241\002\000\000\131\005\053\007\ +\000\000\000\000\000\000\055\007\000\000\204\006\102\000\048\007\ +\000\000\033\004\000\000\000\000\000\000\033\004\000\000\188\065\ +\124\064\073\073\226\005\000\000\094\000\082\001\000\000\000\000\ +\000\000\000\000\000\000\049\007\016\047\239\006\000\000\124\064\ +\124\064\000\000\226\005\161\003\000\000\125\003\102\000\102\000\ +\174\255\000\000\187\003\000\000\000\000\041\002\000\000\249\006\ +\222\069\229\045\000\000\222\003\021\007\070\007\000\000\000\000\ +\027\001\054\255\000\000\252\000\015\003\054\255\131\005\073\073\ +\073\073\000\000\018\007\000\000\022\007\000\000\024\007\073\073\ +\073\073\073\073\180\001\226\005\170\005\170\005\046\005\000\000\ +\000\000\105\004\048\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\016\047\001\007\000\000\ +\033\004\000\000\234\005\000\000\254\002\062\048\000\000\000\000\ +\124\064\000\000\000\000\000\000\202\000\000\000\250\006\016\047\ +\238\003\161\065\000\000\000\000\000\000\016\047\000\000\000\000\ +\233\006\229\006\157\005\235\006\164\006\157\005\027\001\000\000\ +\033\004\070\007\229\006\164\006\000\000\033\004\016\047\000\000\ +\041\002\030\002\193\001\000\000\000\000\000\000\000\000\000\000\ +\254\006\000\000\234\005\124\064\124\064\124\064\007\003\007\003\ +\016\047\005\007\016\047\061\001\041\002\027\001\008\002\000\000\ +\000\000\099\000\106\000\029\007\000\000\000\000\194\003\033\004\ +\079\007\219\003\000\000\000\000\065\004\124\064\000\000\033\004\ +\157\005\157\005\013\066\157\005\157\005\110\005\033\004\093\255\ +\010\007\000\000\090\004\000\000\106\002\074\002\033\004\000\000\ +\000\000\000\000\000\000\000\000\073\073\073\073\073\073\000\000\ +\000\000\000\000\000\000\027\001\000\000\000\000\213\003\033\004\ +\016\047\135\004\000\000\000\000\009\007\000\000\011\007\124\064\ +\000\000\092\007\093\007\060\017\000\000\094\007\097\007\124\064\ +\085\007\000\000\000\000\164\006\070\007\000\000\016\047\074\002\ +\033\004\033\004\000\000\096\007\000\000\043\006\083\001\000\000\ +\000\000\037\002\033\004\000\000\000\000\062\048\062\048\126\006\ +\033\004\086\007\075\001\016\047\016\047\000\000\124\064\025\007\ +\033\004\033\004\000\000\000\000\039\005\000\000\033\004\033\004\ +\033\004\033\004\102\000\000\000\000\000\000\000\000\000\000\000\ +\095\007\124\064\016\047\033\004\033\004\000\000\000\000\000\000\ +\131\005\016\047\131\005\139\001\009\003\000\000\016\047\000\000\ +\033\004\033\004\102\000\234\005\006\007\032\007\157\005\227\005\ +\164\006\107\007\102\000\091\004\000\000\000\000\000\000\000\000\ +\109\007\157\005\157\005\016\047\000\000\124\064\062\048\110\007\ +\111\007\033\004\000\000\102\000\016\047\016\047\000\000\033\004\ +\033\004" + +let yyrindex = "\000\000\ +\126\008\127\008\000\000\000\000\000\000\000\000\106\069\000\000\ +\000\000\039\064\000\000\000\000\214\002\242\005\000\000\000\000\ +\221\067\101\066\099\067\209\064\139\003\000\000\106\069\000\000\ +\000\000\000\000\000\000\000\000\000\000\248\067\193\017\000\000\ +\000\000\209\064\000\000\000\000\200\004\096\000\042\004\000\000\ +\000\000\000\000\060\000\000\000\000\000\209\064\225\007\000\000\ +\000\000\242\005\209\064\000\000\000\000\021\043\103\016\000\000\ +\136\044\000\000\060\000\120\043\000\000\000\000\067\044\000\000\ +\000\000\000\000\081\053\000\000\000\000\102\053\000\000\021\043\ +\000\000\000\000\000\000\000\000\000\000\035\025\221\027\058\024\ +\174\024\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\214\002\099\004\200\004\062\000\225\007\000\000\000\000\000\000\ +\000\000\218\012\000\000\000\000\111\053\146\053\000\000\062\000\ +\000\000\000\000\000\000\000\000\167\053\000\000\000\000\000\000\ +\113\005\113\005\000\000\188\012\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\240\016\000\000\ +\000\000\000\000\151\015\000\000\163\014\000\000\000\000\000\000\ +\221\067\229\068\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\014\049\000\000\000\000\ +\255\001\098\003\000\000\000\000\000\000\050\005\000\000\125\049\ +\000\000\000\000\000\000\117\054\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\221\001\000\000\000\000\000\000\ +\000\000\053\068\000\000\000\000\000\000\135\255\016\002\000\000\ +\214\255\000\000\000\000\076\000\000\000\000\000\069\255\000\000\ +\040\004\000\000\215\255\131\000\000\000\245\005\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\038\007\004\054\038\007\214\002\026\007\042\004\080\068\ +\000\000\000\000\000\000\012\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\028\056\114\056\139\003\000\000\000\000\200\056\030\057\000\000\ +\014\000\000\000\000\000\000\000\000\000\000\000\038\007\000\000\ +\217\003\000\000\008\003\000\000\026\007\000\000\000\000\000\000\ +\084\006\000\000\000\000\000\000\000\000\060\000\132\050\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\057\034\000\000\000\000\ +\248\067\000\000\120\043\141\068\000\000\000\000\041\005\000\000\ +\031\007\000\000\055\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\221\022\151\025\ +\000\000\000\000\000\000\011\026\128\026\000\000\000\000\000\000\ +\000\000\000\000\000\000\084\006\000\000\000\000\000\000\031\007\ +\000\000\000\000\000\000\125\001\000\000\120\007\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\147\255\000\000\098\007\ +\000\000\102\007\116\007\000\000\000\000\099\004\180\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\045\000\000\000\194\000\090\000\ +\131\000\000\000\245\005\000\000\066\000\000\000\026\007\101\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\038\007\117\054\000\000\155\048\244\026\ +\000\000\000\000\000\000\000\000\164\005\000\000\000\000\000\000\ +\000\000\000\000\068\017\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\066\007\000\000\198\055\021\043\207\002\000\000\000\000\ +\104\027\000\000\000\000\000\000\000\000\000\000\085\255\000\000\ +\000\000\196\000\000\000\000\000\000\000\069\004\000\000\162\000\ +\000\000\000\000\041\007\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\026\007\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\001\003\000\000\000\000\038\007\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\096\037\205\037\053\038\174\034\208\039\157\038\034\035\150\035\ +\011\036\127\036\127\031\081\028\197\028\243\036\244\031\104\032\ +\005\039\058\029\220\032\081\033\197\033\000\000\000\000\174\029\ +\000\000\000\000\111\003\000\000\164\005\051\040\000\000\000\000\ +\000\000\000\000\082\018\000\000\000\000\000\000\081\023\198\023\ +\000\000\000\000\000\000\105\022\000\000\000\000\109\039\025\053\ +\066\007\000\000\000\000\005\004\030\006\146\053\000\000\000\000\ +\000\000\000\000\000\000\000\000\001\003\000\000\000\000\000\000\ +\000\000\193\049\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\246\044\ +\000\000\000\000\000\000\000\000\205\045\000\000\000\000\000\000\ +\000\000\048\046\000\000\000\000\000\000\000\000\000\000\102\255\ +\000\000\000\000\222\000\162\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\202\006\000\000\093\005\ +\000\000\225\003\000\000\000\000\000\000\165\005\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\090\007\000\000\000\000\000\000\ +\000\000\000\000\000\000\238\039\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\034\030\000\000\000\000\000\000\038\065\000\000\ +\169\004\000\000\000\000\000\000\000\000\000\000\025\001\000\000\ +\000\000\084\255\000\000\169\255\000\000\000\000\185\255\000\000\ +\097\000\000\000\000\000\000\000\000\000\000\000\064\007\065\007\ +\000\000\000\000\000\000\000\000\136\003\000\000\000\000\213\005\ +\182\004\000\000\074\006\000\000\191\002\105\000\139\000\143\000\ +\000\000\000\000\000\000\053\068\185\040\000\000\000\000\000\000\ +\000\000\000\000\021\043\000\000\000\000\000\000\234\004\021\043\ +\053\068\228\001\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\131\000\000\000\ +\245\005\000\000\139\003\000\000\000\000\000\000\213\005\000\000\ +\000\000\090\007\000\000\198\006\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\018\005\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\146\053\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\047\002\000\000\000\000\ +\087\255\000\000\210\000\000\000\000\000\147\046\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\197\000\000\000\229\000\ +\000\000\125\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\068\007\000\000\000\000\099\007\ +\012\050\000\000\074\050\000\000\000\000\040\011\238\039\000\000\ +\021\043\000\000\000\000\174\001\000\000\049\255\073\007\073\007\ +\068\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\089\045\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\136\255\000\000\000\000\122\007\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\021\043\ +\028\041\000\000\127\010\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\050\038\065\139\004\225\002\136\004\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\163\051\ +\000\000\000\000\000\000\000\000\021\043\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\016\052\028\041\000\000\000\000\000\000\ +\198\018\000\000\058\019\000\000\000\000\000\000\155\040\000\000\ +\175\019\000\000\035\020\000\000\151\020\000\000\000\000\000\000\ +\235\003\000\000\162\050\000\000\001\003\240\047\000\000\119\007\ +\000\000\000\000\191\047\146\053\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\125\001\000\000\000\000\000\000\190\057\ +\000\000\000\000\128\007\248\046\000\000\000\000\000\000\000\000\ +\186\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\048\004\000\000\000\000\021\043\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\220\255\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\012\005\000\000\125\004\000\000\203\004\000\000\000\000\062\005\ +\000\000\000\000\151\030\231\041\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\120\003\136\004\058\003\136\004\000\000\ +\011\031\228\001\000\000\115\007\000\000\063\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\069\007\000\000\000\000\000\000\063\001\069\007\000\000\000\000\ +\000\000\000\000\000\000\000\000\229\015\091\047\000\000\000\000\ +\000\000\000\000\068\007\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\074\042\021\043\000\000\ +\000\000\103\001\000\000\000\000\000\000\148\001\000\000\000\000\ +\000\000\254\040\175\008\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\026\012\000\000\000\000\000\000\136\004\136\004\ +\108\007\000\000\099\007\000\000\000\000\000\000\000\000\000\000\ +\000\000\118\007\199\049\069\052\000\000\122\052\000\000\000\000\ +\249\050\028\041\000\000\000\000\000\000\028\041\000\000\097\041\ +\201\041\000\000\012\021\000\000\128\021\000\000\244\021\044\042\ +\143\042\247\042\049\051\042\048\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\044\001\000\000\028\041\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\112\007\108\007\000\000\114\007\099\007\000\000\249\050\000\000\ +\178\052\208\052\056\006\099\007\000\000\219\051\000\000\000\000\ +\000\000\092\052\021\043\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\028\041\000\000\000\000\000\000\106\010\238\013\ +\000\000\156\050\000\000\000\000\000\000\028\015\146\053\000\000\ +\000\000\000\000\115\003\193\002\000\000\000\000\000\000\249\004\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\111\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\219\051\000\000\ +\000\000\000\000\000\000\000\000\092\052\000\000\139\039\000\000\ +\000\000\000\000\000\000\000\000\090\043\189\043\037\044\000\000\ +\000\000\000\000\000\000\028\015\000\000\000\000\000\000\031\007\ +\000\000\000\000\000\000\000\000\082\007\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\099\007\008\053\000\000\000\000\000\000\ +\139\039\139\039\000\000\241\015\000\000\000\000\000\000\000\000\ +\000\000\019\005\161\004\000\000\000\000\000\000\000\000\000\000\ +\168\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\181\047\139\039\000\000\000\000\000\000\000\000\000\050\021\006\ +\120\003\058\003\243\004\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\032\002\071\003\000\000\000\000\000\000\ +\000\000\000\000\000\000\117\007\000\000\000\000\000\000\000\000\ +\182\002\105\051\243\004\243\004\125\007\126\007\000\000\130\007\ +\099\007\000\000\243\004\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\196\003\000\000\243\004\000\000\000\000\000\000\212\003\ +\237\004" + +let yygindex = "\000\000\ +\000\000\000\000\000\000\000\000\000\000\020\000\183\255\037\000\ +\168\000\184\005\119\253\000\000\166\254\147\005\096\255\145\008\ +\232\012\061\254\077\005\253\255\063\014\144\252\036\003\247\255\ +\000\000\046\000\016\000\021\000\027\000\000\000\000\000\000\000\ +\000\000\030\000\035\000\040\000\000\000\255\255\003\000\093\009\ +\084\002\000\000\000\000\000\000\000\000\000\000\000\000\041\000\ +\000\000\000\000\000\000\000\000\010\255\059\252\000\000\000\000\ +\000\000\004\000\148\005\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\010\003\056\000\112\251\081\255\136\253\214\251\ +\048\253\185\252\087\251\199\003\087\003\000\000\000\000\000\000\ +\000\000\000\000\000\000\211\253\000\000\000\000\000\000\042\000\ +\082\255\014\006\085\005\100\005\000\000\000\000\083\255\048\000\ +\000\000\000\000\170\255\035\002\103\253\160\006\187\010\173\011\ +\000\000\000\000\000\000\131\255\000\000\006\013\182\006\006\000\ +\104\255\048\003\121\007\000\000\124\007\165\006\244\010\176\253\ +\000\000\218\000\000\000\000\000\000\000\198\003\090\005\152\255\ +\254\004\000\000\000\000\000\000\000\000\227\000\000\000\034\007\ +\145\255\042\007\081\006\083\008\000\000\000\000\060\004\000\000\ +\000\000\129\007\233\253\016\005\193\251\101\251\000\252\028\253\ +\000\000\204\252\000\000\074\004\000\000\000\000\119\251\088\255\ +\101\253\062\006\091\007\000\000\000\000\232\003\000\000\000\000\ +\253\003\243\252\000\000\200\003\108\004\000\000\179\253\135\002\ +\155\255\000\000\000\000\192\005\147\254\157\255\199\254\151\255\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\055\255\000\000" + +let yytablesize = 19255 +let yytable = "\126\000\ +\102\000\151\000\212\001\213\001\103\000\203\001\119\001\117\001\ +\251\001\230\001\128\001\168\000\118\001\157\001\086\002\026\003\ +\137\001\096\000\107\001\221\001\053\000\151\001\097\000\061\003\ +\151\003\203\002\063\003\123\001\098\000\190\003\111\001\099\000\ +\198\000\162\004\176\001\024\003\100\000\143\001\126\003\125\000\ +\123\002\101\000\106\000\241\001\043\004\242\001\060\000\139\004\ +\027\004\074\001\248\001\090\004\052\004\051\005\034\005\222\004\ +\169\000\120\001\030\005\034\000\131\003\071\000\039\001\102\002\ +\162\000\103\002\181\001\220\004\084\001\050\003\252\000\184\000\ +\039\005\143\003\031\001\171\000\037\005\194\003\001\004\008\000\ +\191\000\206\002\162\000\087\001\080\001\009\002\023\002\173\000\ +\060\000\038\001\102\000\216\001\197\004\231\003\103\000\098\002\ +\184\004\195\003\243\004\069\004\206\004\161\001\102\000\023\002\ +\075\001\084\001\103\000\096\000\126\000\006\002\087\001\126\000\ +\097\000\126\000\126\000\131\005\232\001\218\002\098\000\096\000\ +\045\001\099\000\198\001\139\001\097\000\095\001\100\000\100\001\ +\101\001\007\002\098\000\101\000\106\000\099\000\113\002\079\001\ +\151\000\151\000\100\000\151\000\085\005\122\001\171\000\101\000\ +\106\000\132\005\002\004\199\001\113\002\151\000\151\000\113\002\ +\037\005\135\001\131\003\151\004\064\002\200\001\027\005\162\000\ +\052\002\113\002\162\000\084\001\208\003\145\004\040\003\245\001\ +\089\001\040\003\127\001\135\000\151\000\151\000\087\001\080\001\ +\224\001\087\001\087\001\080\001\023\002\064\002\115\002\004\002\ +\083\001\160\001\245\001\232\003\133\005\218\003\185\004\080\002\ +\161\001\245\001\245\001\089\001\161\001\228\001\201\001\029\001\ +\229\001\202\001\129\002\188\001\189\001\040\004\052\003\233\001\ +\041\003\219\002\115\002\041\003\192\001\093\001\085\001\245\001\ +\245\001\067\002\052\003\088\001\200\003\083\001\014\004\008\002\ +\085\001\113\002\079\001\245\001\225\001\113\002\079\001\064\002\ +\064\002\251\003\245\001\245\001\125\002\245\001\076\001\082\005\ +\093\001\115\002\152\002\115\002\218\003\155\004\088\001\037\003\ +\088\005\064\002\059\004\037\005\012\002\044\001\188\004\115\002\ +\247\004\190\004\209\003\089\001\203\002\025\005\089\001\089\001\ +\133\002\117\001\134\002\082\002\013\002\069\002\089\004\194\005\ +\117\001\196\005\117\001\077\001\160\001\005\002\245\001\083\001\ +\160\001\128\001\128\001\219\003\083\003\026\005\041\004\109\002\ +\162\000\178\002\053\003\089\005\024\002\130\002\213\001\060\000\ +\116\002\060\000\140\005\056\003\163\001\203\002\059\003\122\002\ +\093\001\081\002\085\001\169\000\093\001\085\001\088\001\201\003\ +\211\005\088\001\088\001\034\000\015\004\071\000\216\003\156\004\ +\052\003\085\002\071\004\158\002\013\005\015\005\177\001\163\001\ +\038\001\028\000\178\001\076\001\060\000\010\003\166\000\082\002\ +\229\002\179\001\019\004\196\001\180\001\034\000\023\002\071\000\ +\083\002\154\001\217\001\075\001\059\004\012\005\248\004\216\002\ +\086\001\216\003\241\002\154\001\083\002\087\002\027\004\162\000\ +\079\002\082\002\086\001\069\002\049\005\114\004\126\000\177\001\ +\036\001\084\002\216\002\178\001\111\002\126\000\107\005\126\000\ +\084\003\216\002\179\001\085\002\155\001\180\001\126\000\126\000\ +\081\002\126\000\150\002\160\005\162\000\205\004\155\001\163\001\ +\071\002\072\002\077\002\163\001\076\002\126\000\075\002\095\001\ +\216\002\126\000\169\004\075\002\253\003\151\000\151\000\034\000\ +\028\000\071\000\217\003\216\002\170\003\166\000\082\002\085\002\ +\216\002\151\002\012\004\216\002\002\002\216\002\076\001\083\002\ +\045\001\222\002\039\004\151\002\167\002\162\000\151\000\151\000\ +\151\000\139\003\048\001\147\004\127\003\154\001\151\000\006\001\ +\154\001\127\001\127\001\179\001\086\001\018\004\111\005\086\001\ +\084\002\156\001\083\002\078\001\162\001\038\002\079\002\010\002\ +\111\002\115\004\085\002\151\000\151\000\235\003\216\002\018\002\ +\151\000\162\000\022\002\243\003\151\000\135\004\006\004\224\001\ +\155\001\119\005\074\005\155\001\128\003\157\001\150\002\162\001\ +\126\000\126\000\162\000\039\002\150\002\065\005\162\000\203\002\ +\077\002\060\000\106\004\148\001\075\002\055\002\162\000\126\000\ +\151\000\102\000\013\004\079\001\058\002\103\000\177\001\163\000\ +\164\004\151\000\178\001\168\002\117\001\151\002\122\001\224\001\ +\069\003\179\001\096\000\041\005\180\001\157\001\026\001\097\000\ +\210\002\212\002\151\000\070\003\071\003\098\000\245\002\038\002\ +\099\000\038\002\213\001\081\001\112\002\100\000\010\005\223\002\ +\114\002\198\001\101\000\106\000\156\001\097\005\078\001\162\001\ +\226\002\015\003\017\003\162\001\031\002\191\000\114\002\075\005\ +\169\002\114\002\074\003\214\002\061\004\039\002\064\002\039\002\ +\149\001\110\005\199\001\114\002\162\000\151\000\107\004\061\005\ +\157\001\150\003\152\003\213\001\200\001\038\005\214\002\150\002\ +\105\003\245\004\116\002\189\004\060\000\214\002\135\002\064\002\ +\134\003\184\000\046\003\136\002\092\004\198\001\087\002\177\001\ +\177\005\014\005\191\000\178\001\123\003\147\001\135\003\171\003\ +\143\004\137\002\179\001\214\002\135\002\180\001\168\000\022\003\ +\179\005\126\000\052\003\141\003\126\000\201\001\199\001\214\002\ +\202\001\171\002\087\002\126\000\214\002\126\000\126\000\214\002\ +\200\001\214\002\075\003\114\002\081\002\135\002\204\003\114\002\ +\205\003\064\002\064\002\126\000\076\003\048\003\057\003\135\002\ +\151\000\172\000\125\005\087\005\214\002\126\000\193\001\002\004\ +\146\001\202\002\162\000\064\002\028\000\162\000\095\005\151\000\ +\151\000\166\000\082\002\067\003\162\000\193\003\086\001\137\004\ +\162\000\201\001\214\002\083\002\202\001\166\003\142\004\194\001\ +\214\002\168\000\095\005\078\003\002\004\126\000\136\003\126\000\ +\135\002\138\002\189\003\135\002\126\000\089\003\169\000\218\001\ +\166\005\151\000\203\002\147\001\084\002\061\003\058\003\011\004\ +\063\003\126\000\151\000\180\003\151\000\218\001\085\002\100\004\ +\102\004\137\005\248\003\046\001\172\000\021\003\224\001\028\000\ +\041\005\095\004\250\003\117\001\162\002\219\001\012\000\016\004\ +\137\005\092\001\093\001\177\001\114\003\028\000\235\002\178\001\ +\214\002\181\003\004\004\219\001\137\003\234\003\179\001\236\002\ +\008\004\180\001\197\005\227\001\029\000\151\000\163\002\029\003\ +\030\003\152\003\213\001\104\005\033\000\106\005\182\003\203\002\ +\162\000\169\000\220\001\087\002\224\001\162\000\060\000\040\003\ +\138\003\048\000\198\005\199\002\040\003\184\003\122\001\203\002\ +\220\001\185\003\122\001\045\001\126\000\196\004\122\001\048\000\ +\122\001\199\002\177\001\046\001\122\001\122\001\178\001\061\005\ +\122\001\162\000\235\002\216\002\178\003\179\001\169\002\183\003\ +\180\001\122\001\083\001\236\002\216\002\175\005\176\005\116\000\ +\099\001\041\003\164\003\170\002\087\002\102\000\041\003\235\004\ +\203\002\103\000\087\002\169\002\197\003\017\004\118\004\241\003\ +\126\000\242\004\116\000\126\000\139\002\218\001\096\000\167\005\ +\094\005\116\000\078\004\097\000\126\000\194\001\106\002\000\004\ +\122\001\098\000\095\003\096\003\099\000\126\000\198\001\122\001\ +\162\000\100\000\045\001\151\000\216\002\028\000\101\000\106\000\ +\116\000\194\001\214\002\219\001\168\005\202\002\162\000\171\002\ +\115\003\122\001\122\001\116\000\122\001\122\001\220\005\199\001\ +\029\000\123\001\116\000\116\000\179\003\116\000\125\003\015\000\ +\033\000\200\001\169\005\085\001\171\002\214\002\147\000\122\001\ +\106\002\106\002\165\003\112\001\142\000\204\001\214\002\169\002\ +\220\001\221\004\142\000\204\001\115\001\151\000\213\001\048\000\ +\108\003\147\000\106\002\087\002\136\005\060\001\061\001\126\000\ +\147\000\110\001\109\003\109\001\193\001\214\002\116\000\126\000\ +\044\003\151\000\201\001\170\005\151\000\202\001\151\000\151\000\ +\151\000\179\004\210\005\126\000\151\000\150\001\147\000\147\000\ +\087\002\150\004\151\000\087\002\236\001\194\001\214\002\180\002\ +\181\002\122\000\147\000\066\001\202\002\162\000\126\000\064\004\ +\198\003\147\000\147\000\045\000\147\000\246\001\048\000\210\002\ +\171\002\151\000\163\004\147\001\071\001\210\003\195\004\247\002\ +\134\000\179\001\106\001\087\004\180\001\111\004\106\001\046\003\ +\246\001\237\001\236\003\224\001\248\002\106\001\012\000\246\001\ +\246\001\012\000\189\000\134\000\047\003\182\002\097\004\092\001\ +\093\001\106\001\134\000\012\000\012\000\147\000\115\001\012\000\ +\149\001\228\001\236\004\120\001\229\001\246\001\246\001\253\002\ +\012\000\012\000\012\000\012\000\237\003\190\000\087\002\090\002\ +\134\000\246\001\249\002\216\002\162\000\087\002\012\000\012\000\ +\246\001\246\001\048\003\246\001\134\000\126\000\202\003\068\003\ +\106\001\254\002\213\001\126\000\134\000\148\004\134\000\107\000\ +\087\002\239\004\012\000\122\000\216\002\012\000\048\005\012\000\ +\012\000\012\000\012\000\071\005\162\000\045\001\216\002\012\000\ +\012\000\120\002\107\000\040\003\074\003\062\004\012\000\126\000\ +\146\002\107\000\146\002\203\003\246\001\031\005\054\004\055\004\ +\151\000\126\000\012\000\146\002\012\000\126\000\012\000\134\000\ +\166\000\081\002\220\002\042\005\065\004\066\004\224\001\063\004\ +\107\000\133\001\012\000\072\004\221\002\012\000\147\001\216\002\ +\185\001\012\000\216\002\107\000\086\004\041\003\117\000\147\001\ +\190\000\028\000\062\005\107\000\112\005\107\000\166\000\082\002\ +\146\002\170\004\025\002\200\005\140\001\174\004\160\004\011\000\ +\083\002\117\000\194\001\224\001\087\002\167\000\126\000\253\000\ +\117\000\123\001\155\001\152\003\213\001\123\001\119\001\117\001\ +\126\000\123\001\016\000\123\001\118\001\185\001\194\001\123\001\ +\123\001\084\002\193\004\123\001\155\001\138\001\107\000\117\000\ +\201\005\214\002\145\001\085\002\123\001\022\000\087\002\224\001\ +\093\005\048\000\117\000\177\001\214\002\162\000\198\004\178\001\ +\087\002\117\000\117\000\126\000\117\000\254\000\179\001\048\000\ +\212\004\180\001\144\000\255\000\108\005\115\001\163\000\022\005\ +\012\003\162\000\177\002\002\005\063\002\118\002\064\002\145\000\ +\253\004\048\000\080\003\123\001\152\003\213\001\129\005\155\001\ +\065\002\214\002\123\001\172\003\151\000\216\002\185\001\209\001\ +\044\000\087\002\087\002\190\000\146\002\117\000\072\003\214\002\ +\077\003\126\000\173\003\174\003\123\001\123\001\162\000\123\001\ +\123\001\162\000\122\000\145\000\139\000\216\002\147\002\141\000\ +\194\001\209\001\119\002\216\002\126\000\126\000\126\000\214\002\ +\148\002\168\004\123\001\144\000\048\000\171\004\145\000\152\001\ +\090\002\087\002\175\004\002\005\194\001\145\000\206\002\146\002\ +\149\001\017\005\162\000\031\002\149\001\031\002\144\000\214\002\ +\149\001\040\003\149\001\186\004\187\004\144\000\149\001\192\003\ +\216\002\191\004\149\001\145\000\090\002\135\001\033\005\216\002\ +\035\005\166\000\126\000\149\001\031\002\081\002\021\005\145\000\ +\205\002\116\005\126\000\144\000\214\002\028\005\145\000\145\000\ +\078\005\145\000\200\004\045\001\126\000\214\002\151\000\144\000\ +\183\001\214\002\126\000\041\003\000\005\028\000\144\000\144\000\ +\216\002\144\000\166\000\082\002\122\000\216\002\214\002\162\000\ +\214\002\214\002\135\001\126\000\083\002\214\002\240\003\150\002\ +\177\001\149\001\029\005\214\002\178\001\214\002\119\002\162\000\ +\172\001\096\001\145\000\179\001\077\005\126\000\180\001\126\000\ +\186\001\144\003\080\005\149\001\149\001\084\002\149\001\149\001\ +\214\002\122\000\144\000\173\001\151\002\216\002\087\002\085\002\ +\214\002\169\003\013\003\091\005\150\002\176\003\214\002\151\000\ +\214\002\149\001\083\005\164\000\214\002\086\005\164\000\214\002\ +\011\005\164\000\164\000\120\005\097\001\164\000\164\000\164\000\ +\164\000\164\000\162\000\164\000\214\002\162\000\162\000\019\005\ +\020\005\151\002\164\000\146\002\213\003\126\000\164\000\137\002\ +\214\002\164\000\164\000\214\002\135\005\214\005\163\000\132\004\ +\126\000\043\003\164\000\164\000\146\002\090\002\164\000\164\000\ +\107\001\187\001\162\000\126\000\107\001\216\002\144\005\212\002\ +\122\005\123\005\216\001\126\005\127\005\162\000\107\001\033\001\ +\171\005\133\004\126\000\126\000\172\005\143\005\146\002\107\001\ +\126\000\126\000\212\002\162\000\162\000\216\002\163\000\174\001\ +\145\005\212\002\216\002\216\002\148\001\164\000\164\000\164\000\ +\034\000\164\000\162\000\161\005\216\002\003\003\090\002\126\000\ +\073\005\040\003\175\001\008\000\090\002\002\005\126\000\002\005\ +\212\002\117\001\004\003\126\000\149\000\117\001\107\001\126\002\ +\180\005\181\005\034\000\212\002\117\001\216\002\060\005\117\001\ +\091\004\144\001\146\002\212\002\146\002\212\002\152\001\216\002\ +\126\000\226\001\152\001\126\000\212\002\164\000\164\000\193\005\ +\031\003\126\000\126\000\041\003\152\001\234\001\198\004\105\004\ +\214\002\182\001\146\002\204\005\112\000\152\001\113\000\114\000\ +\028\000\104\000\115\000\214\002\143\000\115\001\117\000\193\001\ +\191\001\063\002\212\002\155\002\202\005\121\005\212\002\117\001\ +\218\005\164\000\146\002\214\002\155\001\156\002\209\005\143\000\ +\126\002\224\005\225\005\104\000\091\002\212\002\143\000\120\000\ +\194\001\216\005\217\005\146\003\212\002\090\002\121\000\109\001\ +\235\001\071\000\132\000\109\001\092\002\026\002\027\002\028\002\ +\029\002\097\003\122\000\123\000\143\000\062\002\177\003\149\005\ +\142\000\030\002\212\002\187\003\216\002\215\003\109\001\158\005\ +\143\000\048\000\090\002\071\000\132\000\090\002\212\002\143\000\ +\143\000\096\001\143\000\245\003\216\002\096\001\212\002\099\001\ +\212\002\096\001\211\003\096\001\206\002\057\005\238\001\096\001\ +\096\001\151\001\246\003\160\001\160\001\151\001\182\005\153\003\ +\058\005\164\000\164\000\154\003\096\001\031\002\185\005\151\001\ +\184\001\185\001\155\003\214\002\247\003\156\003\240\001\214\002\ +\151\001\192\005\188\003\143\000\097\001\002\003\157\003\164\000\ +\097\001\212\002\120\001\003\003\097\001\247\001\097\001\206\001\ +\214\002\214\002\097\001\085\003\249\002\164\000\097\001\214\002\ +\004\003\164\000\252\001\096\001\058\004\086\003\148\002\097\001\ +\090\002\116\004\096\001\228\001\214\002\219\005\229\001\090\002\ +\177\001\254\001\214\002\117\004\178\001\162\000\014\002\255\001\ +\128\005\000\002\045\004\179\001\096\001\096\001\180\001\096\001\ +\096\001\019\002\090\002\001\002\038\004\164\000\214\002\068\002\ +\191\001\069\002\159\002\191\001\160\002\191\001\097\001\191\001\ +\142\000\204\001\096\001\070\002\148\001\097\001\161\002\148\002\ +\148\001\148\002\148\002\148\002\148\001\148\002\148\001\076\001\ +\148\002\148\002\148\001\202\002\162\000\045\001\148\001\097\001\ +\097\001\254\004\097\001\097\001\191\001\028\000\162\000\148\001\ +\191\001\255\004\000\005\026\002\027\002\028\002\029\002\184\002\ +\185\002\099\001\148\002\093\004\094\004\097\001\207\002\030\002\ +\001\005\148\002\164\000\144\001\212\002\073\002\220\003\212\002\ +\221\003\237\004\139\002\104\004\190\000\148\002\148\002\206\002\ +\208\002\212\002\222\003\139\002\238\004\100\002\090\002\214\002\ +\112\004\020\004\012\000\021\004\182\001\148\001\212\002\122\000\ +\212\002\212\002\101\002\164\000\150\002\022\004\104\002\182\001\ +\120\004\013\000\014\000\031\002\212\002\212\002\150\002\148\001\ +\148\001\105\002\148\001\148\001\182\001\182\001\021\000\249\002\ +\090\002\191\001\106\002\191\001\184\002\187\002\113\002\130\004\ +\212\002\114\002\090\002\212\002\115\002\148\001\122\000\138\004\ +\212\002\029\000\182\001\121\002\073\001\062\002\212\002\126\002\ +\062\002\033\000\202\002\162\000\212\002\005\005\191\001\037\000\ +\191\001\204\002\062\002\162\000\045\001\039\000\062\002\127\002\ +\212\002\216\002\216\002\119\002\212\002\186\002\188\002\062\002\ +\062\002\062\002\062\002\090\002\090\002\043\000\131\002\135\002\ +\212\002\107\002\108\002\212\002\212\002\209\002\062\002\164\000\ +\165\004\047\000\132\002\214\002\050\000\118\001\135\002\214\002\ +\124\002\118\001\164\002\214\002\214\002\135\002\166\002\197\002\ +\118\001\062\002\176\002\118\001\062\002\206\002\119\002\062\002\ +\062\002\062\002\214\002\090\002\118\001\005\005\062\002\062\002\ +\213\002\142\002\144\002\146\002\135\002\062\002\135\002\225\002\ +\238\002\150\002\227\002\055\005\056\005\230\002\062\002\239\002\ +\135\002\062\002\240\002\062\002\112\000\062\002\113\000\114\000\ +\028\000\214\002\115\000\242\002\243\002\116\000\117\000\008\003\ +\202\004\062\002\204\004\118\001\062\002\244\002\009\003\194\002\ +\062\002\246\002\001\003\131\002\131\002\061\001\118\000\048\000\ +\025\003\032\003\131\002\038\003\054\003\191\001\119\000\120\000\ +\191\001\135\002\042\003\045\003\135\002\051\003\121\000\131\002\ +\064\003\149\001\073\003\224\002\241\004\131\002\079\003\087\003\ +\179\001\244\004\122\000\123\000\001\000\002\000\003\000\004\000\ +\005\000\094\003\101\003\002\002\103\003\116\003\184\002\129\003\ +\131\002\131\002\249\002\031\002\142\003\252\002\185\000\185\000\ +\182\001\099\001\008\005\159\003\160\003\099\001\185\000\161\003\ +\090\002\099\001\162\003\099\001\185\000\185\000\163\003\099\001\ +\199\003\167\003\182\001\212\003\182\001\206\003\182\001\233\003\ +\185\000\242\003\182\001\249\003\099\001\008\000\005\004\007\004\ +\119\002\185\000\023\005\024\005\010\004\029\004\030\004\185\000\ +\185\000\185\000\185\000\185\000\035\004\005\005\036\004\044\004\ +\191\001\194\000\049\004\051\004\046\004\040\005\008\000\068\004\ +\114\001\050\005\185\000\050\004\074\004\096\004\108\004\185\000\ +\113\004\110\004\121\004\122\004\185\000\185\000\182\001\123\004\ +\127\004\136\004\099\001\191\001\204\002\140\004\128\004\185\000\ +\185\000\185\000\185\000\185\000\129\004\141\004\144\001\149\004\ +\144\001\159\004\157\004\177\004\099\001\099\001\070\005\099\001\ +\099\001\185\000\161\004\144\001\182\001\192\004\172\004\112\000\ +\166\004\113\000\114\000\028\000\173\004\115\000\158\003\176\004\ +\115\001\117\000\099\001\082\003\219\004\204\002\223\004\005\005\ +\194\004\005\005\006\005\009\005\212\002\018\003\016\005\212\002\ +\182\001\036\005\160\001\093\003\018\005\206\004\096\005\052\005\ +\067\005\212\002\120\000\053\005\166\002\054\005\100\005\076\005\ +\081\005\121\000\084\005\099\005\105\005\113\005\212\002\164\000\ +\212\002\212\002\109\005\118\005\134\005\122\000\123\000\147\005\ +\148\005\150\005\151\005\156\005\118\003\212\002\157\005\159\005\ +\178\005\042\003\039\005\183\005\191\005\207\005\062\002\208\005\ +\212\005\062\002\215\005\221\005\222\005\034\000\071\000\026\002\ +\212\002\034\000\214\002\062\002\071\000\047\002\216\002\062\002\ +\212\002\044\002\191\001\214\002\120\002\042\003\212\002\144\001\ +\062\002\062\002\062\002\062\002\212\002\150\000\008\000\046\002\ +\114\001\102\000\144\001\223\002\224\002\194\001\182\001\062\002\ +\212\002\214\002\137\002\049\002\212\002\144\001\166\000\135\002\ +\183\000\182\001\136\002\135\002\218\001\214\003\015\000\136\002\ +\212\002\138\002\062\002\212\002\141\002\062\002\230\003\120\002\ +\062\002\062\002\062\002\191\001\142\002\143\002\144\001\062\002\ +\062\002\139\002\182\001\195\005\066\005\141\005\062\002\112\000\ +\122\003\113\000\114\000\028\000\048\004\115\000\190\005\011\003\ +\115\001\117\000\062\002\081\003\062\002\211\002\062\002\079\005\ +\078\002\077\002\056\004\191\001\151\002\023\003\028\003\163\001\ +\149\002\007\005\062\002\119\004\252\004\062\002\205\005\206\005\ +\112\003\062\002\120\000\117\002\093\002\072\005\213\005\064\005\ +\000\000\121\000\098\005\240\004\000\000\000\000\042\003\204\002\ +\000\000\000\000\000\000\000\000\000\000\122\000\123\000\223\005\ +\191\001\191\001\000\000\000\000\000\000\052\001\009\004\000\000\ +\000\000\141\001\000\000\000\000\112\000\000\000\113\000\114\000\ +\028\000\144\001\115\000\000\000\000\000\116\000\117\000\000\000\ +\000\000\000\000\000\000\156\001\150\000\150\000\000\000\150\000\ +\216\002\216\002\059\001\060\001\061\001\000\000\118\000\216\002\ +\000\000\150\000\150\000\000\000\000\000\216\002\119\000\120\000\ +\000\000\000\000\000\000\000\000\216\002\191\001\121\000\042\003\ +\194\002\000\000\216\002\000\000\000\000\063\001\064\001\042\003\ +\150\000\150\000\122\000\123\000\222\001\000\000\000\000\000\000\ +\191\001\066\001\067\001\068\001\069\001\216\002\216\002\000\000\ +\000\000\081\004\083\004\085\004\000\000\182\001\000\000\088\004\ +\000\000\000\000\071\001\000\000\000\000\194\002\000\000\000\000\ +\000\000\000\000\000\000\165\000\000\000\000\000\172\000\000\000\ +\000\000\174\000\175\000\000\000\000\000\176\000\177\000\178\000\ +\179\000\180\000\000\000\181\000\194\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\032\001\000\000\ +\000\000\034\001\035\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\042\003\040\001\041\001\144\001\000\000\042\001\043\001\ +\112\000\000\000\113\000\114\000\028\000\000\000\115\000\000\000\ +\000\000\115\001\117\000\000\000\000\000\182\001\000\000\182\001\ +\000\000\182\001\000\000\144\001\182\001\000\000\000\000\000\000\ +\042\003\000\000\000\000\000\000\000\000\144\001\015\000\000\000\ +\191\001\015\000\191\001\120\000\000\000\104\001\105\001\106\001\ +\000\000\108\001\121\000\015\000\015\000\000\000\000\000\015\000\ +\000\000\000\000\204\002\000\000\000\000\000\000\122\000\123\000\ +\015\000\015\000\015\000\015\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\012\000\042\003\015\000\015\000\ +\000\000\000\000\042\003\000\000\000\000\000\000\000\000\000\000\ +\000\000\191\001\000\000\089\000\014\000\153\001\154\001\066\002\ +\000\000\000\000\015\000\000\000\000\000\015\000\000\000\000\000\ +\090\000\015\000\015\000\000\000\000\000\000\000\144\001\015\000\ +\015\000\000\000\144\001\000\000\000\000\000\000\015\000\204\002\ +\000\000\000\000\000\000\029\000\000\000\000\000\000\000\000\000\ +\000\000\197\001\015\000\033\000\015\000\000\000\015\000\204\002\ +\042\003\091\000\144\001\000\000\000\000\000\000\000\000\039\000\ +\000\000\000\000\015\000\209\002\000\000\015\000\000\000\000\000\ +\144\001\015\000\000\000\000\000\000\000\000\000\141\001\092\000\ +\000\000\150\000\150\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\093\000\000\000\000\000\050\000\042\003\ +\204\002\000\000\000\000\000\000\000\000\000\000\042\003\000\000\ +\000\000\000\000\150\000\150\000\150\000\000\000\000\000\000\000\ +\000\000\000\000\150\000\000\000\000\000\191\001\000\000\069\005\ +\000\000\157\002\112\000\000\000\113\000\114\000\028\000\000\000\ +\115\000\249\001\250\001\116\000\117\000\144\001\000\000\150\000\ +\150\000\000\000\000\000\000\000\150\000\000\000\000\000\000\000\ +\150\000\240\001\000\000\222\001\118\000\144\001\000\000\003\002\ +\000\000\000\000\191\001\156\001\119\000\060\003\000\000\000\000\ +\000\000\000\000\156\001\000\000\121\000\011\002\052\000\069\005\ +\000\000\017\002\000\000\000\000\150\000\000\000\000\000\070\004\ +\122\000\123\000\000\000\000\000\000\000\150\000\000\000\000\000\ +\124\001\000\000\000\000\222\001\191\001\000\000\000\000\000\000\ +\000\000\144\001\000\000\000\000\144\001\125\001\150\000\000\000\ +\000\000\000\003\000\000\191\001\000\000\000\000\000\000\144\001\ +\000\000\000\000\183\000\191\001\000\000\000\000\000\000\000\000\ +\112\000\000\000\113\000\114\000\028\000\000\000\115\000\000\000\ +\000\000\126\001\117\000\000\000\191\001\000\000\000\000\153\000\ +\000\000\000\000\000\000\170\000\000\000\000\000\000\000\000\000\ +\000\000\150\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\170\000\120\000\000\000\191\001\191\001\000\000\ +\000\000\000\000\121\000\144\001\000\000\000\000\000\000\191\001\ +\000\000\000\000\110\002\000\000\170\000\144\001\122\000\123\000\ +\000\000\000\000\000\000\000\000\000\000\144\001\191\001\000\000\ +\000\000\000\000\000\000\191\001\191\001\191\001\191\001\000\000\ +\156\000\008\000\009\000\000\000\000\000\052\001\010\000\011\000\ +\144\001\144\001\000\000\135\002\000\000\000\000\000\000\000\000\ +\170\000\000\000\170\000\170\000\000\000\144\001\069\005\000\000\ +\069\005\015\000\016\000\156\001\150\000\000\000\000\000\000\000\ +\144\001\058\001\059\001\060\001\061\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\150\000\150\000\022\000\144\001\106\002\ +\024\000\025\000\026\000\027\000\144\001\144\001\028\000\000\000\ +\162\000\000\000\000\000\142\000\032\000\063\001\064\001\000\000\ +\000\000\000\000\110\003\000\000\000\000\000\000\000\000\000\000\ +\000\000\066\001\067\001\068\001\069\001\150\000\153\000\153\000\ +\000\000\153\000\042\000\000\000\000\000\000\000\150\000\000\000\ +\150\000\000\000\071\001\153\000\153\000\000\000\000\000\231\002\ +\044\000\000\000\222\001\000\000\000\000\045\000\000\000\170\000\ +\048\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\240\001\153\000\214\001\240\001\000\000\000\000\170\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\240\001\145\003\ +\000\000\150\000\240\001\000\000\000\000\000\000\052\000\156\000\ +\156\000\052\000\156\000\240\001\240\001\240\001\240\001\000\000\ +\222\001\000\000\000\000\052\000\156\000\156\000\000\000\000\000\ +\000\000\000\000\240\001\000\000\000\000\000\000\000\000\000\000\ +\052\000\000\000\052\000\052\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\205\001\156\000\156\000\240\001\052\000\052\000\ +\240\001\000\000\000\000\240\001\240\001\240\001\000\000\000\000\ +\000\000\154\000\240\001\240\001\000\000\171\000\000\000\000\000\ +\000\000\240\001\052\000\000\000\000\000\052\000\170\000\244\003\ +\000\000\052\000\052\000\000\000\171\000\240\001\000\000\240\001\ +\052\000\240\001\000\000\000\000\000\000\000\000\052\000\000\000\ +\000\000\000\000\000\000\170\000\141\001\240\001\171\000\000\000\ +\240\001\000\000\052\000\000\000\240\001\000\000\052\000\150\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\052\000\000\000\000\000\052\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\171\000\000\000\171\000\171\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\150\000\000\000\170\000\170\000\000\000\000\000\170\000\ +\000\000\053\000\170\000\000\000\116\001\021\002\000\000\000\000\ +\000\000\000\000\000\000\032\002\000\000\150\000\000\000\106\002\ +\150\000\000\000\150\000\150\000\150\000\000\000\000\000\106\002\ +\150\000\000\000\000\000\000\000\106\002\000\000\150\000\000\000\ +\154\000\154\000\000\000\154\000\000\000\000\000\000\000\000\000\ +\000\000\106\002\000\000\106\002\106\002\154\000\154\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\150\000\000\000\000\000\ +\106\002\171\000\000\000\153\000\214\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\154\000\215\001\000\000\222\001\ +\088\003\171\000\000\000\106\002\000\000\000\000\106\002\000\000\ +\000\000\106\002\106\002\106\002\153\000\153\000\153\000\207\003\ +\000\000\106\002\000\000\000\000\153\000\000\000\000\000\106\002\ +\000\000\000\000\000\000\000\000\134\004\000\000\000\000\000\000\ +\000\000\000\000\000\000\106\002\000\000\000\000\000\000\106\002\ +\000\000\214\001\153\000\000\000\156\000\156\000\214\001\000\000\ +\000\000\000\000\153\000\106\002\000\000\000\000\106\002\112\000\ +\000\000\113\000\114\000\028\000\000\000\115\000\000\000\000\000\ +\116\000\117\000\000\000\000\000\140\002\156\000\156\000\156\000\ +\000\000\206\004\000\000\000\000\000\000\156\000\153\000\000\000\ +\171\000\118\000\000\000\000\000\000\000\000\000\000\000\153\000\ +\207\004\119\000\120\000\115\002\150\000\000\000\000\000\198\001\ +\000\000\121\000\156\000\156\000\000\000\171\000\000\000\156\000\ +\153\000\000\000\222\001\156\000\000\000\122\000\123\000\000\000\ +\000\000\000\000\000\000\000\000\170\000\032\002\000\000\000\000\ +\208\004\076\000\113\000\114\000\028\000\000\000\115\000\000\000\ +\000\000\116\000\209\004\000\000\000\000\000\000\000\000\156\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\222\001\ +\233\002\000\000\118\000\153\000\000\000\000\000\000\000\000\000\ +\000\000\210\004\119\000\120\000\000\000\000\000\000\000\000\000\ +\000\000\156\000\121\000\000\000\000\000\171\000\171\000\000\000\ +\000\000\171\000\155\000\201\001\171\000\000\000\211\004\123\000\ +\000\000\000\000\000\000\222\001\000\000\000\000\000\000\156\001\ +\000\000\053\000\000\000\000\000\053\000\000\000\116\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\116\001\053\000\116\001\ +\000\000\000\000\000\000\000\000\233\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\053\000\000\000\053\000\053\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\153\000\000\000\ +\150\000\053\000\053\000\000\000\000\000\154\000\215\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\153\000\153\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\053\000\000\000\000\000\ +\053\000\000\000\000\000\000\000\053\000\053\000\154\000\154\000\ +\154\000\000\000\000\000\053\000\111\003\000\000\154\000\000\000\ +\000\000\053\000\000\000\000\000\000\000\000\000\000\000\153\000\ +\000\000\000\000\000\000\000\000\000\000\053\000\000\000\156\000\ +\153\000\053\000\214\001\215\001\154\000\000\000\000\000\000\000\ +\215\001\000\000\000\000\000\000\154\000\053\000\156\000\156\000\ +\053\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\155\000\155\000\000\000\155\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\155\000\155\000\ +\154\000\000\000\150\000\214\001\000\000\000\000\000\000\000\000\ +\156\000\154\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\156\000\000\000\156\000\000\000\155\000\155\000\000\000\ +\000\000\000\000\154\000\115\002\000\000\115\002\115\002\115\002\ +\000\000\000\000\000\000\115\002\000\000\000\000\171\000\000\000\ +\115\002\000\000\000\000\000\000\115\002\115\002\115\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\115\002\115\002\115\002\ +\115\002\076\000\000\000\000\000\156\000\000\000\000\000\115\002\ +\000\000\000\000\000\000\150\000\115\002\154\000\076\000\000\000\ +\000\000\000\000\000\000\115\002\115\002\239\001\110\003\000\000\ +\000\000\000\000\000\000\076\000\000\000\076\000\076\000\115\002\ +\000\000\000\000\115\002\115\002\000\000\115\002\115\002\115\002\ +\000\000\115\002\076\000\000\000\115\002\115\002\000\000\000\000\ +\000\000\153\000\000\000\115\002\000\000\000\000\000\000\000\000\ +\000\000\116\001\000\000\000\000\000\000\076\000\115\002\115\002\ +\110\003\115\002\115\002\115\002\115\002\076\000\165\005\115\002\ +\000\000\000\000\000\000\076\000\000\000\000\000\000\000\115\002\ +\115\002\076\000\115\002\000\000\000\000\000\000\115\002\000\000\ +\154\000\000\000\000\000\057\002\000\000\076\000\059\002\000\000\ +\060\002\076\000\061\002\153\000\000\000\000\000\000\000\154\000\ +\154\000\000\000\156\000\000\000\000\000\076\000\000\000\000\000\ +\076\000\000\000\000\000\000\000\000\000\000\000\000\000\153\000\ +\000\000\000\000\214\001\000\000\153\000\153\000\153\000\094\002\ +\195\000\195\000\153\000\099\002\000\000\000\000\000\000\000\000\ +\153\000\154\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\154\000\000\000\215\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\156\000\000\000\000\000\153\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\156\000\000\000\000\000\156\000\079\004\156\000\156\000\156\000\ +\102\001\103\001\000\000\156\000\000\000\215\001\000\000\141\002\ +\000\000\156\000\000\000\000\000\000\000\008\000\155\000\155\000\ +\000\000\000\000\002\002\011\000\153\002\000\000\154\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\156\000\000\000\000\000\137\000\000\000\015\000\016\000\155\000\ +\155\000\155\000\000\000\000\000\000\000\000\000\000\000\155\000\ +\155\000\198\002\000\000\201\002\000\000\000\000\000\000\000\000\ +\000\000\022\000\000\000\138\000\139\000\000\000\140\000\141\000\ +\000\000\000\000\028\000\000\000\155\000\155\000\000\000\142\000\ +\143\000\155\000\000\000\000\000\000\000\155\000\144\000\000\000\ +\116\001\000\000\000\000\000\000\000\000\254\003\214\001\000\000\ +\000\000\000\000\000\000\145\000\000\000\239\001\000\000\000\000\ +\239\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\146\000\155\000\239\001\154\000\044\000\000\000\239\001\000\000\ +\000\000\045\000\155\000\000\000\048\000\147\000\000\000\239\001\ +\239\001\239\001\239\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\155\000\000\000\000\000\239\001\000\000\ +\000\000\000\000\000\000\209\001\000\000\000\000\000\000\156\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\239\001\000\000\000\000\239\001\154\000\000\000\239\001\ +\239\001\239\001\000\000\000\000\000\000\000\000\239\001\239\001\ +\036\003\000\000\000\000\039\003\000\000\239\001\155\000\000\000\ +\000\000\154\000\000\000\000\000\215\001\000\000\154\000\154\000\ +\154\000\239\001\000\000\239\001\154\000\239\001\000\000\000\000\ +\000\000\000\000\154\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\239\001\000\000\000\000\239\001\000\000\000\000\000\000\ +\239\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\154\000\214\001\000\000\000\000\000\000\000\000\033\002\ +\034\002\035\002\036\002\037\002\038\002\039\002\040\002\041\002\ +\042\002\043\002\044\002\045\002\046\002\047\002\048\002\049\002\ +\050\002\051\002\052\002\053\002\000\000\056\002\000\000\000\000\ +\000\000\155\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\113\003\062\002\000\000\251\001\000\000\ +\155\000\155\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\079\002\002\002\156\000\002\002\002\002\002\002\000\000\ +\000\000\000\000\002\002\146\004\000\000\000\000\133\003\002\002\ +\000\000\000\000\000\000\002\002\002\002\002\002\000\000\000\000\ +\000\000\000\000\155\000\000\000\002\002\002\002\002\002\002\002\ +\000\000\000\000\000\000\155\000\000\000\155\000\002\002\000\000\ +\000\000\000\000\002\002\002\002\214\001\000\000\000\000\000\000\ +\000\000\000\000\002\002\002\002\000\000\000\000\000\000\000\000\ +\215\001\000\000\000\000\000\000\000\000\000\000\002\002\000\000\ +\000\000\002\002\000\000\000\000\002\002\002\002\002\002\000\000\ +\002\002\000\000\000\000\002\002\002\002\000\000\155\000\000\000\ +\237\001\000\000\002\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\002\002\002\002\000\000\ +\002\002\002\002\002\002\000\000\000\000\156\000\002\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\214\001\002\002\000\000\ +\000\000\002\002\000\000\000\000\000\000\002\002\000\000\000\000\ +\138\005\000\000\000\000\209\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\209\001\000\000\003\004\000\000\000\000\ +\209\001\215\002\000\000\000\000\000\000\000\000\217\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\209\001\000\000\209\001\ +\209\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\162\005\000\000\209\001\000\000\156\000\104\003\ +\000\000\112\000\000\000\113\000\114\000\028\000\000\000\115\000\ +\000\000\000\000\115\001\117\000\155\000\000\000\037\004\209\001\ +\000\000\000\000\195\000\195\000\215\001\209\001\209\001\209\001\ +\000\000\000\000\000\000\000\000\000\000\209\001\106\002\000\000\ +\000\000\000\000\000\000\209\001\120\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\121\000\000\000\000\000\067\004\209\001\ +\000\000\000\000\000\000\209\001\116\001\027\003\000\000\122\000\ +\123\000\000\000\033\003\034\003\035\003\000\000\155\000\209\001\ +\000\000\000\000\209\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\251\001\000\000\ +\251\001\251\001\155\000\098\004\099\004\155\000\251\001\155\000\ +\155\000\155\000\000\000\251\001\000\000\155\000\000\000\251\001\ +\251\001\251\001\000\000\155\000\000\000\000\000\000\000\000\000\ +\251\001\251\001\251\001\251\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\251\001\000\000\000\000\000\000\215\001\251\001\ +\000\000\000\000\155\000\000\000\000\000\000\000\251\001\251\001\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\131\004\000\000\251\001\000\000\000\000\251\001\000\000\000\000\ +\251\001\251\001\251\001\000\000\251\001\098\003\099\003\100\003\ +\251\001\000\000\000\000\144\004\000\000\000\000\251\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\036\002\ +\237\001\251\001\251\001\237\001\251\001\251\001\251\001\000\000\ +\000\000\000\000\000\000\214\002\000\000\237\001\000\000\215\001\ +\000\000\237\001\251\001\130\003\000\000\251\001\000\000\000\000\ +\214\002\251\001\237\001\237\001\237\001\237\001\000\000\000\000\ +\000\000\000\000\000\000\140\003\000\000\000\000\000\000\000\000\ +\000\000\237\001\000\000\214\002\000\000\214\002\214\002\214\002\ +\000\000\214\002\000\000\000\000\214\002\214\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\237\001\000\000\000\000\237\001\ +\000\000\155\000\237\001\237\001\237\001\000\000\000\000\000\000\ +\000\000\237\001\237\001\000\000\000\000\000\000\214\002\000\000\ +\237\001\000\000\000\000\209\001\000\000\214\002\000\000\000\000\ +\000\000\000\000\000\000\201\004\237\001\203\004\237\001\000\000\ +\237\001\214\002\214\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\237\001\000\000\223\003\237\001\ +\000\000\000\000\000\000\237\001\000\000\000\000\106\002\106\002\ +\106\002\106\002\000\000\000\000\106\002\106\002\106\002\106\002\ +\106\002\106\002\106\002\106\002\106\002\106\002\106\002\106\002\ +\106\002\106\002\106\002\106\002\246\004\000\000\106\002\106\002\ +\106\002\106\002\106\002\106\002\106\002\106\002\000\000\000\000\ +\000\000\000\000\106\002\106\002\000\000\000\000\106\002\106\002\ +\106\002\106\002\106\002\106\002\106\002\106\002\000\000\106\002\ +\106\002\106\002\000\000\106\002\106\002\106\002\106\002\000\000\ +\000\000\106\002\106\002\106\002\000\000\106\002\106\002\106\002\ +\106\002\106\002\106\002\000\000\106\002\106\002\106\002\106\002\ +\106\002\000\000\000\000\000\000\000\000\155\000\106\002\106\002\ +\106\002\106\002\106\002\106\002\106\002\106\002\000\000\106\002\ +\064\002\106\002\106\002\060\004\106\002\106\002\106\002\106\002\ +\106\002\000\000\106\002\106\002\000\000\106\002\106\002\106\002\ +\106\002\000\000\106\002\106\002\000\000\106\002\000\000\000\000\ +\000\000\106\002\000\000\112\000\000\000\113\000\114\000\028\000\ +\000\000\115\000\000\000\000\000\116\000\117\000\000\000\000\000\ +\068\005\000\000\000\000\000\000\000\000\000\000\134\001\036\002\ +\000\000\036\002\036\002\036\002\000\000\118\000\000\000\036\002\ +\000\000\000\000\000\000\000\000\036\002\119\000\120\000\000\000\ +\036\002\036\002\036\002\000\000\000\000\121\000\000\000\000\000\ +\000\000\036\002\036\002\036\002\036\002\090\005\000\000\000\000\ +\000\000\122\000\123\000\036\002\000\000\000\000\000\000\155\000\ +\036\002\000\000\124\004\125\004\126\004\000\000\000\000\036\002\ +\036\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\036\002\000\000\000\000\036\002\117\005\ +\000\000\036\002\036\002\036\002\000\000\036\002\000\000\000\000\ +\036\002\036\002\000\000\000\000\000\000\000\000\130\005\036\002\ +\000\000\124\001\000\000\209\001\000\000\000\000\139\005\000\000\ +\000\000\000\000\036\002\036\002\000\000\036\002\036\002\036\002\ +\209\001\241\000\152\004\153\004\154\004\000\000\000\000\142\005\ +\155\000\000\000\000\000\036\002\000\000\209\001\036\002\209\001\ +\209\001\112\000\036\002\113\000\114\000\028\000\000\000\115\000\ +\000\000\000\000\126\001\117\000\209\001\000\000\000\000\000\000\ +\163\005\164\005\112\000\000\000\113\000\114\000\028\000\178\004\ +\115\000\000\000\174\005\116\000\117\000\000\000\000\000\209\001\ +\000\000\000\000\209\001\000\000\120\000\209\001\209\001\209\001\ +\000\000\184\005\000\000\121\000\118\000\209\001\186\005\187\005\ +\188\005\189\005\000\000\209\001\119\000\060\003\000\000\122\000\ +\123\000\000\000\000\000\000\000\121\000\000\000\000\000\209\001\ +\000\000\000\000\000\000\209\001\000\000\000\000\000\000\152\005\ +\122\000\123\000\000\000\000\000\000\000\000\000\000\000\209\001\ +\000\000\000\000\209\001\000\000\000\000\000\000\000\000\000\000\ +\224\004\225\004\000\000\000\000\000\000\232\004\233\004\234\004\ +\064\002\064\002\064\002\064\002\000\000\247\000\064\002\064\002\ +\064\002\064\002\064\002\064\002\064\002\064\002\064\002\064\002\ +\064\002\064\002\064\002\064\002\064\002\064\002\064\002\000\000\ +\064\002\064\002\064\002\064\002\064\002\064\002\064\002\064\002\ +\000\000\000\000\000\000\000\000\064\002\064\002\000\000\000\000\ +\064\002\064\002\064\002\064\002\064\002\064\002\064\002\064\002\ +\000\000\064\002\064\002\064\002\000\000\064\002\064\002\064\002\ +\064\002\000\000\000\000\064\002\064\002\064\002\052\002\064\002\ +\064\002\064\002\064\002\064\002\064\002\000\000\064\002\064\002\ +\064\002\064\002\064\002\000\000\000\000\000\000\000\000\000\000\ +\064\002\064\002\064\002\064\002\064\002\064\002\064\002\064\002\ +\000\000\064\002\000\000\064\002\064\002\000\000\064\002\064\002\ +\064\002\064\002\064\002\000\000\064\002\064\002\000\000\064\002\ +\064\002\064\002\064\002\000\000\064\002\064\002\000\000\064\002\ +\000\000\000\000\000\000\064\002\000\000\000\000\000\000\000\000\ +\000\000\245\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\241\000\241\000\241\000\241\000\000\000\000\000\241\000\ +\241\000\241\000\241\000\241\000\241\000\241\000\241\000\241\000\ +\241\000\241\000\241\000\241\000\241\000\241\000\241\000\241\000\ +\000\000\241\000\241\000\241\000\241\000\241\000\241\000\241\000\ +\241\000\000\000\101\005\102\005\103\005\241\000\241\000\000\000\ +\000\000\241\000\241\000\241\000\241\000\241\000\241\000\241\000\ +\241\000\000\000\241\000\241\000\241\000\000\000\241\000\241\000\ +\241\000\241\000\000\000\000\000\241\000\241\000\241\000\000\000\ +\241\000\241\000\241\000\241\000\241\000\241\000\000\000\241\000\ +\241\000\241\000\241\000\241\000\000\000\000\000\000\000\000\000\ +\000\000\241\000\241\000\241\000\241\000\241\000\241\000\241\000\ +\241\000\000\000\241\000\000\000\241\000\241\000\253\000\241\000\ +\241\000\241\000\241\000\241\000\000\000\241\000\241\000\000\000\ +\241\000\241\000\241\000\241\000\000\000\241\000\241\000\000\000\ +\241\000\000\000\000\000\000\000\241\000\247\000\247\000\247\000\ +\247\000\000\000\000\000\247\000\247\000\247\000\247\000\247\000\ +\247\000\247\000\247\000\247\000\247\000\247\000\247\000\247\000\ +\247\000\247\000\247\000\247\000\000\000\247\000\247\000\247\000\ +\247\000\247\000\247\000\247\000\247\000\000\000\000\000\000\000\ +\000\000\247\000\247\000\000\000\000\000\247\000\247\000\247\000\ +\247\000\247\000\247\000\247\000\247\000\000\000\247\000\247\000\ +\247\000\000\000\247\000\247\000\247\000\247\000\000\000\000\000\ +\247\000\247\000\247\000\000\000\247\000\247\000\247\000\247\000\ +\247\000\247\000\000\000\247\000\247\000\247\000\247\000\247\000\ +\000\000\000\000\000\000\000\000\000\000\247\000\247\000\247\000\ +\247\000\247\000\247\000\247\000\247\000\000\000\247\000\000\000\ +\247\000\247\000\249\000\247\000\247\000\247\000\247\000\247\000\ +\000\000\247\000\247\000\000\000\247\000\247\000\247\000\247\000\ +\000\000\247\000\247\000\000\000\247\000\000\000\000\000\000\000\ +\247\000\245\000\245\000\245\000\245\000\000\000\000\000\245\000\ +\245\000\245\000\245\000\245\000\245\000\245\000\245\000\245\000\ +\245\000\245\000\245\000\245\000\245\000\245\000\245\000\245\000\ +\000\000\245\000\245\000\245\000\245\000\245\000\245\000\245\000\ +\245\000\000\000\000\000\000\000\000\000\245\000\245\000\000\000\ +\000\000\245\000\245\000\245\000\245\000\245\000\245\000\245\000\ +\245\000\000\000\245\000\245\000\245\000\000\000\245\000\245\000\ +\245\000\245\000\000\000\000\000\245\000\245\000\245\000\000\000\ +\245\000\245\000\245\000\245\000\245\000\245\000\000\000\245\000\ +\245\000\245\000\245\000\245\000\000\000\000\000\000\000\000\000\ +\000\000\245\000\245\000\245\000\245\000\245\000\245\000\245\000\ +\245\000\000\000\245\000\000\000\245\000\245\000\251\000\245\000\ +\245\000\245\000\245\000\245\000\000\000\245\000\245\000\000\000\ +\245\000\245\000\245\000\245\000\000\000\245\000\245\000\000\000\ +\245\000\000\000\000\000\000\000\245\000\000\000\253\000\253\000\ +\253\000\253\000\000\000\000\000\253\000\253\000\253\000\253\000\ +\253\000\253\000\253\000\253\000\253\000\253\000\253\000\253\000\ +\253\000\253\000\253\000\253\000\253\000\000\000\253\000\253\000\ +\253\000\253\000\253\000\253\000\253\000\253\000\000\000\000\000\ +\000\000\000\000\253\000\253\000\000\000\000\000\253\000\253\000\ +\253\000\253\000\253\000\253\000\253\000\253\000\000\000\253\000\ +\253\000\253\000\000\000\253\000\253\000\253\000\253\000\000\000\ +\000\000\253\000\253\000\253\000\000\000\253\000\253\000\253\000\ +\253\000\253\000\253\000\000\000\253\000\253\000\253\000\253\000\ +\253\000\000\000\000\000\000\000\000\000\000\000\253\000\253\000\ +\253\000\253\000\253\000\253\000\253\000\253\000\000\000\253\000\ +\000\000\253\000\253\000\003\001\253\000\253\000\253\000\253\000\ +\253\000\000\000\253\000\253\000\000\000\253\000\253\000\253\000\ +\253\000\000\000\253\000\253\000\000\000\253\000\000\000\000\000\ +\000\000\253\000\249\000\249\000\249\000\249\000\000\000\000\000\ +\249\000\249\000\249\000\249\000\249\000\249\000\249\000\249\000\ +\249\000\249\000\249\000\249\000\249\000\249\000\249\000\249\000\ +\249\000\000\000\249\000\249\000\249\000\249\000\249\000\249\000\ +\249\000\249\000\000\000\000\000\000\000\000\000\249\000\249\000\ +\000\000\000\000\249\000\249\000\249\000\249\000\249\000\249\000\ +\249\000\249\000\000\000\249\000\249\000\249\000\000\000\249\000\ +\249\000\249\000\249\000\000\000\000\000\249\000\249\000\249\000\ +\000\000\249\000\249\000\249\000\249\000\249\000\249\000\000\000\ +\249\000\249\000\249\000\249\000\249\000\000\000\000\000\000\000\ +\000\000\000\000\249\000\249\000\249\000\249\000\249\000\249\000\ +\249\000\249\000\000\000\249\000\000\000\249\000\249\000\255\000\ +\249\000\249\000\249\000\249\000\249\000\000\000\249\000\249\000\ +\000\000\249\000\249\000\249\000\249\000\000\000\249\000\249\000\ +\000\000\249\000\000\000\000\000\000\000\249\000\251\000\251\000\ +\251\000\251\000\000\000\000\000\251\000\251\000\251\000\251\000\ +\251\000\251\000\251\000\251\000\251\000\251\000\251\000\251\000\ +\251\000\251\000\251\000\251\000\251\000\000\000\251\000\251\000\ +\251\000\251\000\251\000\251\000\251\000\251\000\000\000\000\000\ +\000\000\000\000\251\000\251\000\000\000\000\000\251\000\251\000\ +\251\000\251\000\251\000\251\000\251\000\251\000\000\000\251\000\ +\251\000\251\000\000\000\251\000\251\000\251\000\251\000\000\000\ +\000\000\251\000\251\000\251\000\000\000\251\000\251\000\251\000\ +\251\000\251\000\251\000\000\000\251\000\251\000\251\000\251\000\ +\251\000\000\000\000\000\000\000\000\000\000\000\251\000\251\000\ +\251\000\251\000\251\000\251\000\251\000\251\000\000\000\251\000\ +\000\000\251\000\251\000\001\001\251\000\251\000\251\000\251\000\ +\251\000\000\000\251\000\251\000\000\000\251\000\251\000\251\000\ +\251\000\000\000\251\000\251\000\000\000\251\000\000\000\000\000\ +\000\000\251\000\000\000\003\001\003\001\003\001\003\001\000\000\ +\000\000\003\001\003\001\003\001\003\001\003\001\003\001\003\001\ +\003\001\003\001\003\001\003\001\003\001\003\001\003\001\003\001\ +\003\001\003\001\000\000\003\001\003\001\003\001\003\001\003\001\ +\003\001\003\001\003\001\000\000\000\000\000\000\000\000\003\001\ +\003\001\000\000\000\000\003\001\003\001\003\001\003\001\003\001\ +\003\001\003\001\003\001\000\000\003\001\003\001\003\001\000\000\ +\003\001\003\001\003\001\003\001\000\000\000\000\003\001\003\001\ +\003\001\000\000\003\001\003\001\003\001\003\001\003\001\003\001\ +\000\000\003\001\003\001\003\001\003\001\003\001\000\000\000\000\ +\000\000\000\000\000\000\003\001\003\001\003\001\003\001\003\001\ +\003\001\003\001\003\001\000\000\003\001\000\000\003\001\003\001\ +\030\001\003\001\003\001\003\001\003\001\003\001\000\000\003\001\ +\003\001\000\000\003\001\003\001\003\001\003\001\000\000\003\001\ +\003\001\000\000\003\001\000\000\000\000\000\000\003\001\255\000\ +\255\000\255\000\255\000\000\000\000\000\255\000\255\000\255\000\ +\255\000\255\000\255\000\255\000\255\000\255\000\255\000\255\000\ +\255\000\255\000\255\000\255\000\255\000\255\000\000\000\255\000\ +\255\000\255\000\255\000\255\000\255\000\255\000\255\000\000\000\ +\000\000\000\000\000\000\255\000\255\000\000\000\000\000\255\000\ +\255\000\255\000\255\000\255\000\255\000\255\000\255\000\000\000\ +\255\000\255\000\255\000\000\000\255\000\255\000\255\000\255\000\ +\000\000\000\000\255\000\255\000\255\000\000\000\255\000\255\000\ +\255\000\255\000\255\000\255\000\000\000\255\000\255\000\255\000\ +\255\000\255\000\000\000\000\000\000\000\000\000\000\000\255\000\ +\255\000\255\000\255\000\255\000\255\000\255\000\255\000\000\000\ +\255\000\000\000\255\000\255\000\039\001\255\000\255\000\255\000\ +\255\000\255\000\000\000\255\000\255\000\000\000\255\000\255\000\ +\255\000\255\000\000\000\255\000\255\000\000\000\255\000\000\000\ +\000\000\000\000\255\000\001\001\001\001\001\001\001\001\000\000\ +\000\000\001\001\001\001\001\001\001\001\001\001\001\001\001\001\ +\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\ +\001\001\001\001\000\000\001\001\001\001\001\001\001\001\001\001\ +\001\001\001\001\001\001\000\000\000\000\000\000\000\000\001\001\ +\001\001\000\000\000\000\001\001\001\001\001\001\001\001\001\001\ +\001\001\001\001\001\001\000\000\001\001\001\001\001\001\000\000\ +\001\001\001\001\001\001\001\001\000\000\000\000\001\001\001\001\ +\001\001\000\000\001\001\001\001\001\001\001\001\001\001\001\001\ +\000\000\001\001\001\001\001\001\001\001\001\001\000\000\000\000\ +\000\000\000\000\000\000\001\001\001\001\001\001\001\001\001\001\ +\001\001\001\001\001\001\000\000\001\001\000\000\001\001\001\001\ +\041\001\001\001\001\001\001\001\001\001\001\001\000\000\001\001\ +\001\001\000\000\001\001\001\001\001\001\001\001\000\000\001\001\ +\001\001\000\000\001\001\000\000\000\000\000\000\001\001\000\000\ +\030\001\030\001\030\001\030\001\000\000\000\000\030\001\030\001\ +\030\001\030\001\030\001\030\001\030\001\030\001\030\001\030\001\ +\030\001\030\001\030\001\030\001\030\001\030\001\000\000\000\000\ +\030\001\030\001\030\001\030\001\030\001\030\001\030\001\030\001\ +\000\000\000\000\000\000\000\000\030\001\030\001\000\000\000\000\ +\030\001\030\001\030\001\030\001\030\001\030\001\030\001\000\000\ +\000\000\030\001\030\001\030\001\000\000\030\001\030\001\030\001\ +\030\001\000\000\000\000\030\001\030\001\030\001\000\000\030\001\ +\030\001\030\001\030\001\030\001\030\001\000\000\030\001\030\001\ +\030\001\030\001\030\001\000\000\000\000\000\000\000\000\000\000\ +\030\001\030\001\030\001\030\001\030\001\030\001\030\001\030\001\ +\000\000\030\001\000\000\030\001\030\001\044\001\030\001\030\001\ +\030\001\030\001\030\001\000\000\030\001\030\001\000\000\030\001\ +\030\001\030\001\030\001\000\000\030\001\030\001\000\000\030\001\ +\000\000\000\000\000\000\030\001\039\001\039\001\039\001\039\001\ +\000\000\000\000\039\001\039\001\039\001\039\001\039\001\039\001\ +\039\001\039\001\039\001\039\001\039\001\039\001\039\001\039\001\ +\039\001\039\001\000\000\000\000\039\001\039\001\039\001\039\001\ +\039\001\039\001\039\001\039\001\000\000\000\000\000\000\000\000\ +\039\001\039\001\000\000\000\000\039\001\039\001\039\001\039\001\ +\039\001\039\001\039\001\000\000\000\000\039\001\039\001\039\001\ +\000\000\039\001\039\001\039\001\039\001\000\000\000\000\039\001\ +\039\001\039\001\000\000\039\001\039\001\039\001\039\001\039\001\ +\039\001\000\000\039\001\039\001\039\001\039\001\039\001\000\000\ +\000\000\000\000\000\000\000\000\039\001\039\001\039\001\039\001\ +\039\001\039\001\039\001\039\001\000\000\039\001\000\000\039\001\ +\039\001\233\000\039\001\039\001\039\001\000\000\000\000\000\000\ +\039\001\039\001\000\000\039\001\039\001\039\001\039\001\000\000\ +\039\001\039\001\000\000\039\001\000\000\000\000\000\000\039\001\ +\041\001\041\001\041\001\041\001\000\000\000\000\041\001\041\001\ +\041\001\041\001\041\001\041\001\041\001\041\001\041\001\041\001\ +\041\001\041\001\041\001\041\001\041\001\041\001\000\000\000\000\ +\041\001\041\001\041\001\041\001\041\001\041\001\041\001\041\001\ +\000\000\000\000\000\000\000\000\041\001\041\001\000\000\000\000\ +\041\001\041\001\041\001\041\001\041\001\041\001\041\001\000\000\ +\000\000\041\001\041\001\041\001\000\000\041\001\041\001\041\001\ +\041\001\000\000\000\000\041\001\041\001\041\001\000\000\041\001\ +\041\001\041\001\041\001\041\001\041\001\000\000\041\001\041\001\ +\041\001\041\001\041\001\000\000\000\000\000\000\000\000\000\000\ +\041\001\041\001\041\001\041\001\041\001\041\001\041\001\041\001\ +\000\000\041\001\000\000\041\001\041\001\234\000\041\001\041\001\ +\041\001\000\000\000\000\000\000\041\001\041\001\000\000\041\001\ +\041\001\041\001\041\001\000\000\041\001\041\001\000\000\041\001\ +\000\000\000\000\000\000\041\001\000\000\044\001\044\001\044\001\ +\044\001\000\000\000\000\044\001\044\001\044\001\044\001\044\001\ +\044\001\044\001\044\001\044\001\044\001\044\001\044\001\044\001\ +\044\001\044\001\044\001\000\000\000\000\044\001\044\001\044\001\ +\044\001\044\001\044\001\044\001\044\001\000\000\000\000\000\000\ +\000\000\044\001\044\001\000\000\000\000\044\001\044\001\044\001\ +\044\001\044\001\044\001\044\001\000\000\000\000\044\001\044\001\ +\044\001\000\000\044\001\044\001\044\001\044\001\000\000\000\000\ +\044\001\044\001\044\001\000\000\044\001\044\001\044\001\044\001\ +\044\001\044\001\000\000\044\001\044\001\044\001\044\001\044\001\ +\000\000\000\000\000\000\000\000\000\000\044\001\044\001\044\001\ +\044\001\044\001\044\001\044\001\044\001\000\000\044\001\000\000\ +\044\001\044\001\173\000\044\001\044\001\044\001\000\000\000\000\ +\000\000\044\001\044\001\000\000\044\001\044\001\044\001\044\001\ +\000\000\044\001\044\001\000\000\044\001\000\000\000\000\000\000\ +\044\001\233\000\233\000\233\000\233\000\000\000\000\000\000\000\ +\000\000\233\000\233\000\233\000\000\000\000\000\233\000\233\000\ +\233\000\233\000\233\000\233\000\233\000\233\000\233\000\233\000\ +\000\000\233\000\233\000\233\000\233\000\233\000\233\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\233\000\233\000\000\000\ +\000\000\233\000\233\000\233\000\233\000\233\000\233\000\233\000\ +\233\000\000\000\233\000\000\000\233\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\233\000\233\000\000\000\ +\233\000\000\000\000\000\233\000\233\000\233\000\000\000\233\000\ +\233\000\233\000\233\000\233\000\000\000\000\000\000\000\000\000\ +\000\000\233\000\233\000\233\000\233\000\233\000\233\000\233\000\ +\000\000\000\000\233\000\000\000\233\000\233\000\174\000\233\000\ +\233\000\233\000\233\000\233\000\000\000\233\000\000\000\000\000\ +\233\000\233\000\233\000\000\000\000\000\233\000\000\000\000\000\ +\233\000\000\000\000\000\000\000\233\000\234\000\234\000\234\000\ +\234\000\000\000\000\000\000\000\000\000\234\000\234\000\234\000\ +\000\000\000\000\234\000\234\000\234\000\234\000\234\000\234\000\ +\234\000\234\000\234\000\234\000\000\000\234\000\234\000\234\000\ +\234\000\234\000\234\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\234\000\234\000\000\000\000\000\234\000\234\000\234\000\ +\234\000\234\000\234\000\234\000\234\000\000\000\234\000\000\000\ +\234\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\234\000\234\000\000\000\234\000\000\000\000\000\234\000\ +\234\000\234\000\000\000\234\000\234\000\234\000\234\000\234\000\ +\000\000\000\000\000\000\000\000\000\000\234\000\234\000\234\000\ +\234\000\234\000\234\000\234\000\000\000\000\000\234\000\000\000\ +\234\000\234\000\186\000\234\000\234\000\234\000\234\000\234\000\ +\000\000\234\000\000\000\000\000\234\000\234\000\234\000\000\000\ +\000\000\234\000\000\000\000\000\234\000\000\000\000\000\000\000\ +\234\000\000\000\173\000\173\000\173\000\173\000\000\000\000\000\ +\000\000\000\000\173\000\173\000\173\000\000\000\000\000\173\000\ +\173\000\173\000\173\000\173\000\173\000\173\000\173\000\173\000\ +\000\000\000\000\173\000\173\000\173\000\173\000\173\000\173\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\173\000\173\000\ +\000\000\000\000\173\000\173\000\173\000\173\000\173\000\173\000\ +\173\000\000\000\000\000\173\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\173\000\173\000\ +\000\000\173\000\000\000\000\000\173\000\173\000\173\000\000\000\ +\173\000\173\000\173\000\173\000\173\000\000\000\000\000\000\000\ +\000\000\000\000\173\000\000\000\173\000\173\000\173\000\173\000\ +\173\000\000\000\000\000\000\000\000\000\173\000\173\000\187\000\ +\173\000\173\000\173\000\000\000\000\000\000\000\173\000\000\000\ +\000\000\173\000\000\000\173\000\000\000\000\000\173\000\000\000\ +\000\000\173\000\000\000\000\000\000\000\173\000\174\000\174\000\ +\174\000\174\000\000\000\000\000\000\000\000\000\174\000\174\000\ +\174\000\000\000\000\000\174\000\174\000\174\000\174\000\174\000\ +\174\000\174\000\174\000\174\000\000\000\000\000\174\000\174\000\ +\174\000\174\000\174\000\174\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\174\000\174\000\000\000\000\000\174\000\174\000\ +\174\000\174\000\174\000\174\000\174\000\000\000\000\000\174\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\174\000\174\000\000\000\174\000\000\000\000\000\ +\174\000\174\000\174\000\000\000\174\000\174\000\174\000\174\000\ +\174\000\000\000\000\000\000\000\000\000\000\000\174\000\000\000\ +\174\000\174\000\174\000\174\000\174\000\000\000\000\000\000\000\ +\000\000\174\000\174\000\225\000\174\000\174\000\174\000\000\000\ +\000\000\000\000\174\000\000\000\000\000\174\000\000\000\174\000\ +\000\000\000\000\174\000\000\000\000\000\174\000\000\000\000\000\ +\000\000\174\000\186\000\186\000\186\000\186\000\000\000\000\000\ +\000\000\000\000\186\000\186\000\186\000\000\000\000\000\186\000\ +\186\000\186\000\186\000\186\000\186\000\186\000\186\000\186\000\ +\000\000\000\000\186\000\186\000\186\000\186\000\186\000\186\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\186\000\186\000\ +\000\000\000\000\186\000\186\000\186\000\186\000\186\000\186\000\ +\186\000\000\000\000\000\186\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\186\000\186\000\ +\000\000\186\000\000\000\000\000\186\000\186\000\186\000\000\000\ +\186\000\186\000\186\000\186\000\186\000\000\000\000\000\000\000\ +\000\000\000\000\186\000\000\000\186\000\186\000\186\000\186\000\ +\186\000\000\000\000\000\000\000\000\000\186\000\186\000\226\000\ +\186\000\186\000\186\000\000\000\000\000\000\000\186\000\000\000\ +\000\000\186\000\000\000\186\000\000\000\000\000\186\000\000\000\ +\000\000\186\000\000\000\000\000\000\000\186\000\000\000\187\000\ +\187\000\187\000\187\000\000\000\000\000\000\000\000\000\187\000\ +\187\000\187\000\000\000\000\000\187\000\187\000\187\000\187\000\ +\187\000\187\000\187\000\187\000\187\000\000\000\000\000\187\000\ +\187\000\187\000\187\000\187\000\187\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\187\000\187\000\000\000\000\000\187\000\ +\187\000\187\000\187\000\187\000\187\000\187\000\000\000\000\000\ +\187\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\187\000\187\000\000\000\187\000\000\000\ +\000\000\187\000\187\000\187\000\000\000\187\000\187\000\187\000\ +\187\000\187\000\000\000\000\000\000\000\000\000\000\000\187\000\ +\000\000\187\000\187\000\187\000\187\000\187\000\000\000\000\000\ +\000\000\000\000\187\000\187\000\185\000\187\000\187\000\187\000\ +\000\000\000\000\000\000\187\000\000\000\000\000\187\000\000\000\ +\187\000\000\000\000\000\187\000\000\000\000\000\187\000\000\000\ +\000\000\000\000\187\000\225\000\225\000\225\000\225\000\000\000\ +\000\000\000\000\000\000\225\000\225\000\225\000\000\000\000\000\ +\225\000\225\000\225\000\225\000\225\000\225\000\225\000\225\000\ +\225\000\000\000\000\000\225\000\225\000\225\000\225\000\225\000\ +\225\000\000\000\000\000\000\000\000\000\000\000\000\000\225\000\ +\225\000\000\000\000\000\225\000\225\000\225\000\225\000\225\000\ +\225\000\225\000\000\000\000\000\225\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\225\000\ +\225\000\000\000\225\000\000\000\000\000\225\000\225\000\225\000\ +\000\000\225\000\225\000\225\000\225\000\225\000\000\000\000\000\ +\000\000\000\000\000\000\225\000\000\000\225\000\225\000\225\000\ +\225\000\225\000\000\000\000\000\000\000\000\000\225\000\225\000\ +\196\000\225\000\225\000\225\000\000\000\000\000\000\000\225\000\ +\000\000\000\000\225\000\000\000\225\000\000\000\000\000\225\000\ +\000\000\000\000\225\000\000\000\000\000\000\000\225\000\226\000\ +\226\000\226\000\226\000\000\000\000\000\000\000\000\000\226\000\ +\226\000\226\000\000\000\000\000\226\000\226\000\226\000\226\000\ +\226\000\226\000\226\000\226\000\226\000\000\000\000\000\226\000\ +\226\000\226\000\226\000\226\000\226\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\226\000\226\000\000\000\000\000\226\000\ +\226\000\226\000\226\000\226\000\226\000\226\000\000\000\000\000\ +\226\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\226\000\226\000\000\000\226\000\000\000\ +\000\000\226\000\226\000\226\000\000\000\226\000\226\000\226\000\ +\226\000\226\000\000\000\000\000\000\000\000\000\000\000\226\000\ +\000\000\226\000\226\000\226\000\226\000\226\000\000\000\000\000\ +\000\000\000\000\226\000\226\000\197\000\226\000\226\000\226\000\ +\000\000\000\000\000\000\226\000\000\000\000\000\226\000\000\000\ +\226\000\000\000\000\000\226\000\000\000\000\000\226\000\000\000\ +\000\000\000\000\226\000\000\000\185\000\185\000\185\000\185\000\ +\000\000\000\000\000\000\000\000\185\000\185\000\185\000\000\000\ +\000\000\185\000\185\000\185\000\185\000\185\000\000\000\185\000\ +\185\000\185\000\000\000\000\000\185\000\185\000\185\000\185\000\ +\185\000\185\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\185\000\185\000\000\000\000\000\185\000\185\000\185\000\185\000\ +\185\000\185\000\185\000\000\000\000\000\185\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\185\000\185\000\000\000\185\000\000\000\000\000\185\000\185\000\ +\185\000\000\000\185\000\185\000\185\000\185\000\185\000\000\000\ +\000\000\000\000\000\000\000\000\185\000\000\000\185\000\185\000\ +\185\000\185\000\185\000\000\000\000\000\000\000\000\000\185\000\ +\185\000\204\000\185\000\185\000\185\000\000\000\000\000\000\000\ +\185\000\000\000\000\000\185\000\000\000\185\000\000\000\000\000\ +\185\000\000\000\000\000\185\000\000\000\000\000\000\000\185\000\ +\196\000\196\000\196\000\196\000\000\000\000\000\000\000\000\000\ +\196\000\196\000\196\000\000\000\000\000\196\000\196\000\196\000\ +\196\000\196\000\196\000\196\000\196\000\196\000\000\000\000\000\ +\196\000\196\000\196\000\196\000\196\000\196\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\196\000\196\000\000\000\000\000\ +\196\000\196\000\196\000\196\000\196\000\196\000\000\000\000\000\ +\000\000\196\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\196\000\196\000\000\000\196\000\ +\000\000\000\000\196\000\196\000\196\000\000\000\196\000\196\000\ +\196\000\196\000\196\000\000\000\000\000\000\000\000\000\000\000\ +\196\000\000\000\196\000\196\000\196\000\196\000\196\000\000\000\ +\000\000\000\000\000\000\196\000\196\000\203\000\196\000\196\000\ +\196\000\000\000\000\000\000\000\196\000\000\000\000\000\196\000\ +\000\000\196\000\000\000\000\000\196\000\000\000\000\000\196\000\ +\000\000\000\000\000\000\196\000\197\000\197\000\197\000\197\000\ +\000\000\000\000\000\000\000\000\197\000\197\000\197\000\000\000\ +\000\000\197\000\197\000\197\000\197\000\197\000\197\000\197\000\ +\197\000\197\000\000\000\000\000\197\000\197\000\197\000\197\000\ +\197\000\197\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\197\000\197\000\000\000\000\000\197\000\197\000\197\000\197\000\ +\197\000\197\000\000\000\000\000\000\000\197\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\197\000\197\000\000\000\197\000\000\000\000\000\197\000\197\000\ +\197\000\000\000\197\000\197\000\197\000\197\000\197\000\000\000\ +\000\000\000\000\000\000\000\000\197\000\000\000\197\000\197\000\ +\197\000\197\000\197\000\000\000\000\000\000\000\000\000\197\000\ +\197\000\179\000\197\000\197\000\197\000\000\000\000\000\000\000\ +\197\000\000\000\000\000\197\000\000\000\197\000\000\000\000\000\ +\197\000\000\000\000\000\197\000\000\000\000\000\000\000\197\000\ +\000\000\204\000\204\000\204\000\204\000\000\000\000\000\000\000\ +\000\000\204\000\204\000\204\000\000\000\000\000\204\000\204\000\ +\204\000\204\000\204\000\204\000\204\000\204\000\204\000\000\000\ +\000\000\204\000\204\000\204\000\204\000\204\000\204\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\204\000\204\000\000\000\ +\000\000\204\000\204\000\204\000\204\000\204\000\204\000\000\000\ +\000\000\000\000\204\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\204\000\204\000\000\000\ +\204\000\000\000\000\000\204\000\204\000\204\000\000\000\204\000\ +\204\000\204\000\204\000\204\000\000\000\000\000\000\000\000\000\ +\000\000\204\000\000\000\204\000\204\000\204\000\204\000\204\000\ +\000\000\000\000\000\000\000\000\204\000\204\000\182\000\204\000\ +\204\000\204\000\000\000\000\000\000\000\204\000\000\000\000\000\ +\204\000\000\000\204\000\000\000\000\000\204\000\000\000\000\000\ +\204\000\000\000\000\000\000\000\204\000\203\000\203\000\203\000\ +\203\000\000\000\000\000\000\000\000\000\203\000\203\000\203\000\ +\000\000\000\000\203\000\203\000\203\000\203\000\203\000\203\000\ +\203\000\203\000\203\000\000\000\000\000\203\000\203\000\203\000\ +\203\000\203\000\203\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\203\000\203\000\000\000\000\000\203\000\203\000\203\000\ +\203\000\203\000\203\000\000\000\000\000\000\000\203\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\203\000\203\000\000\000\203\000\000\000\000\000\203\000\ +\203\000\203\000\000\000\203\000\203\000\203\000\203\000\203\000\ +\000\000\000\000\000\000\000\000\000\000\203\000\000\000\203\000\ +\203\000\203\000\203\000\203\000\000\000\000\000\000\000\000\000\ +\203\000\203\000\183\000\203\000\203\000\203\000\000\000\000\000\ +\000\000\203\000\000\000\000\000\203\000\000\000\203\000\000\000\ +\000\000\203\000\000\000\000\000\203\000\000\000\000\000\000\000\ +\203\000\179\000\179\000\179\000\179\000\000\000\000\000\000\000\ +\000\000\000\000\179\000\179\000\000\000\000\000\179\000\179\000\ +\179\000\179\000\179\000\179\000\179\000\179\000\179\000\000\000\ +\000\000\179\000\179\000\179\000\179\000\179\000\179\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\179\000\179\000\000\000\ +\000\000\179\000\179\000\179\000\179\000\179\000\179\000\179\000\ +\000\000\000\000\179\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\179\000\179\000\000\000\ +\179\000\000\000\000\000\179\000\179\000\179\000\000\000\179\000\ +\179\000\179\000\179\000\179\000\000\000\000\000\000\000\000\000\ +\000\000\179\000\000\000\179\000\179\000\179\000\179\000\179\000\ +\000\000\000\000\000\000\000\000\179\000\179\000\195\000\179\000\ +\179\000\179\000\000\000\000\000\000\000\179\000\000\000\000\000\ +\179\000\000\000\179\000\000\000\000\000\179\000\000\000\000\000\ +\179\000\000\000\000\000\000\000\179\000\000\000\182\000\182\000\ +\182\000\182\000\000\000\000\000\000\000\000\000\000\000\182\000\ +\182\000\000\000\000\000\182\000\182\000\182\000\182\000\182\000\ +\182\000\182\000\182\000\182\000\000\000\000\000\182\000\182\000\ +\182\000\182\000\182\000\182\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\182\000\182\000\000\000\000\000\182\000\182\000\ +\182\000\182\000\182\000\182\000\182\000\000\000\000\000\182\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\182\000\182\000\000\000\182\000\000\000\000\000\ +\182\000\182\000\182\000\000\000\182\000\182\000\182\000\182\000\ +\182\000\000\000\000\000\000\000\000\000\000\000\182\000\000\000\ +\182\000\182\000\182\000\182\000\182\000\000\000\000\000\000\000\ +\000\000\182\000\182\000\201\000\182\000\182\000\182\000\000\000\ +\000\000\000\000\182\000\000\000\000\000\182\000\000\000\182\000\ +\000\000\000\000\182\000\000\000\000\000\182\000\000\000\000\000\ +\000\000\182\000\183\000\183\000\183\000\183\000\000\000\000\000\ +\000\000\000\000\000\000\183\000\183\000\000\000\000\000\183\000\ +\183\000\183\000\183\000\183\000\183\000\183\000\183\000\183\000\ +\000\000\000\000\183\000\183\000\183\000\183\000\183\000\183\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\183\000\183\000\ +\000\000\000\000\183\000\183\000\183\000\183\000\183\000\183\000\ +\183\000\000\000\000\000\183\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\183\000\183\000\ +\000\000\183\000\000\000\000\000\183\000\183\000\183\000\000\000\ +\183\000\183\000\183\000\183\000\183\000\000\000\000\000\000\000\ +\000\000\000\000\183\000\000\000\183\000\183\000\183\000\183\000\ +\183\000\000\000\000\000\000\000\000\000\183\000\183\000\202\000\ +\183\000\183\000\183\000\000\000\000\000\000\000\183\000\000\000\ +\000\000\183\000\000\000\183\000\000\000\000\000\183\000\000\000\ +\000\000\183\000\000\000\000\000\000\000\183\000\195\000\195\000\ +\195\000\195\000\000\000\000\000\000\000\000\000\195\000\195\000\ +\195\000\000\000\000\000\195\000\195\000\195\000\195\000\195\000\ +\195\000\195\000\195\000\195\000\000\000\000\000\195\000\195\000\ +\195\000\195\000\195\000\195\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\195\000\195\000\000\000\000\000\195\000\195\000\ +\195\000\195\000\195\000\000\000\000\000\000\000\000\000\195\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\195\000\195\000\000\000\195\000\000\000\000\000\ +\195\000\195\000\195\000\000\000\195\000\195\000\195\000\195\000\ +\195\000\000\000\000\000\000\000\000\000\000\000\195\000\000\000\ +\195\000\000\000\195\000\195\000\195\000\000\000\000\000\000\000\ +\000\000\195\000\195\000\198\000\195\000\195\000\195\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\195\000\000\000\195\000\ +\000\000\000\000\195\000\000\000\000\000\195\000\000\000\000\000\ +\000\000\195\000\000\000\201\000\201\000\201\000\201\000\000\000\ +\000\000\000\000\000\000\201\000\201\000\201\000\000\000\000\000\ +\201\000\201\000\201\000\201\000\201\000\201\000\201\000\201\000\ +\201\000\000\000\000\000\201\000\201\000\201\000\201\000\201\000\ +\201\000\000\000\000\000\000\000\000\000\000\000\000\000\201\000\ +\201\000\000\000\000\000\201\000\201\000\201\000\201\000\201\000\ +\000\000\000\000\000\000\000\000\201\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\201\000\ +\201\000\000\000\201\000\000\000\000\000\201\000\201\000\201\000\ +\000\000\201\000\201\000\201\000\201\000\201\000\000\000\000\000\ +\000\000\000\000\000\000\201\000\000\000\201\000\000\000\201\000\ +\201\000\201\000\000\000\000\000\000\000\000\000\201\000\201\000\ +\199\000\201\000\201\000\201\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\201\000\000\000\201\000\000\000\000\000\201\000\ +\000\000\000\000\201\000\000\000\000\000\000\000\201\000\202\000\ +\202\000\202\000\202\000\000\000\000\000\000\000\000\000\202\000\ +\202\000\202\000\000\000\000\000\202\000\202\000\202\000\202\000\ +\202\000\202\000\202\000\202\000\202\000\000\000\000\000\202\000\ +\202\000\202\000\202\000\202\000\202\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\202\000\202\000\000\000\000\000\202\000\ +\202\000\202\000\202\000\202\000\000\000\000\000\000\000\000\000\ +\202\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\202\000\202\000\000\000\202\000\000\000\ +\000\000\202\000\202\000\202\000\000\000\202\000\202\000\202\000\ +\202\000\202\000\000\000\000\000\000\000\000\000\000\000\202\000\ +\000\000\202\000\000\000\202\000\202\000\202\000\000\000\000\000\ +\000\000\000\000\202\000\202\000\200\000\202\000\202\000\202\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\202\000\000\000\ +\202\000\000\000\000\000\202\000\000\000\000\000\202\000\000\000\ +\000\000\000\000\202\000\198\000\198\000\198\000\198\000\000\000\ +\000\000\000\000\000\000\198\000\198\000\198\000\000\000\000\000\ +\198\000\198\000\198\000\198\000\198\000\198\000\198\000\198\000\ +\198\000\000\000\000\000\198\000\198\000\198\000\198\000\198\000\ +\198\000\000\000\000\000\000\000\000\000\000\000\000\000\198\000\ +\198\000\000\000\000\000\198\000\198\000\198\000\198\000\198\000\ +\000\000\000\000\000\000\000\000\198\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\198\000\ +\198\000\000\000\198\000\000\000\000\000\198\000\198\000\198\000\ +\000\000\198\000\198\000\198\000\198\000\198\000\000\000\000\000\ +\000\000\000\000\000\000\198\000\000\000\198\000\000\000\198\000\ +\198\000\198\000\000\000\000\000\000\000\000\000\198\000\198\000\ +\153\000\198\000\198\000\198\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\198\000\000\000\198\000\000\000\000\000\198\000\ +\000\000\000\000\198\000\000\000\000\000\000\000\198\000\000\000\ +\199\000\199\000\199\000\199\000\000\000\000\000\000\000\000\000\ +\199\000\199\000\199\000\000\000\000\000\199\000\199\000\199\000\ +\199\000\199\000\199\000\199\000\199\000\199\000\000\000\000\000\ +\199\000\199\000\199\000\199\000\199\000\199\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\199\000\199\000\000\000\000\000\ +\199\000\199\000\199\000\199\000\199\000\000\000\000\000\000\000\ +\000\000\199\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\199\000\199\000\000\000\199\000\ +\000\000\000\000\199\000\199\000\199\000\000\000\199\000\199\000\ +\199\000\199\000\199\000\000\000\000\000\000\000\000\000\000\000\ +\199\000\000\000\199\000\000\000\199\000\199\000\199\000\000\000\ +\000\000\000\000\000\000\199\000\199\000\192\000\199\000\199\000\ +\199\000\000\000\000\000\000\000\000\000\000\000\000\000\199\000\ +\000\000\199\000\000\000\000\000\199\000\000\000\000\000\199\000\ +\000\000\000\000\000\000\199\000\200\000\200\000\200\000\200\000\ +\000\000\000\000\000\000\000\000\200\000\200\000\200\000\000\000\ +\000\000\200\000\200\000\200\000\200\000\200\000\200\000\200\000\ +\200\000\200\000\000\000\000\000\200\000\200\000\200\000\200\000\ +\200\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\200\000\200\000\000\000\000\000\200\000\200\000\200\000\200\000\ +\200\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\200\000\200\000\000\000\200\000\000\000\000\000\200\000\200\000\ +\200\000\000\000\200\000\200\000\200\000\200\000\200\000\000\000\ +\000\000\000\000\000\000\000\000\200\000\000\000\200\000\000\000\ +\200\000\200\000\200\000\000\000\000\000\000\000\000\000\200\000\ +\200\000\205\000\200\000\200\000\200\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\200\000\000\000\200\000\000\000\000\000\ +\200\000\000\000\000\000\200\000\000\000\000\000\000\000\200\000\ +\153\000\153\000\153\000\153\000\000\000\000\000\000\000\000\000\ +\153\000\153\000\153\000\000\000\000\000\153\000\153\000\153\000\ +\153\000\153\000\153\000\153\000\153\000\153\000\000\000\000\000\ +\153\000\153\000\153\000\153\000\153\000\153\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\153\000\153\000\000\000\000\000\ +\153\000\153\000\153\000\153\000\153\000\153\000\153\000\000\000\ +\000\000\153\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\153\000\153\000\000\000\000\000\ +\000\000\000\000\153\000\153\000\153\000\000\000\153\000\000\000\ +\000\000\153\000\153\000\000\000\000\000\000\000\000\000\000\000\ +\153\000\000\000\153\000\000\000\000\000\000\000\153\000\000\000\ +\000\000\000\000\000\000\153\000\153\000\207\000\153\000\153\000\ +\153\000\000\000\000\000\000\000\153\000\000\000\000\000\153\000\ +\000\000\153\000\000\000\000\000\153\000\000\000\000\000\153\000\ +\000\000\000\000\000\000\153\000\000\000\192\000\192\000\192\000\ +\192\000\000\000\000\000\000\000\000\000\192\000\192\000\192\000\ +\000\000\000\000\192\000\192\000\000\000\192\000\192\000\192\000\ +\192\000\192\000\192\000\000\000\000\000\192\000\192\000\192\000\ +\192\000\192\000\192\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\192\000\192\000\000\000\000\000\192\000\192\000\192\000\ +\192\000\000\000\000\000\000\000\000\000\000\000\192\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\192\000\192\000\000\000\192\000\000\000\000\000\192\000\ +\192\000\192\000\000\000\192\000\000\000\000\000\192\000\192\000\ +\000\000\000\000\000\000\000\000\000\000\192\000\000\000\192\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\192\000\192\000\193\000\192\000\192\000\192\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\192\000\000\000\192\000\000\000\ +\000\000\192\000\000\000\000\000\192\000\000\000\000\000\000\000\ +\192\000\205\000\205\000\205\000\205\000\000\000\000\000\000\000\ +\000\000\205\000\205\000\205\000\000\000\000\000\205\000\205\000\ +\000\000\205\000\205\000\205\000\205\000\205\000\205\000\000\000\ +\000\000\205\000\205\000\205\000\205\000\205\000\205\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\205\000\205\000\000\000\ +\000\000\205\000\205\000\205\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\205\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\205\000\205\000\000\000\ +\205\000\000\000\000\000\000\000\205\000\205\000\000\000\205\000\ +\000\000\000\000\205\000\205\000\000\000\000\000\000\000\000\000\ +\000\000\205\000\000\000\205\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\205\000\205\000\194\000\205\000\ +\205\000\205\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\205\000\000\000\205\000\000\000\000\000\205\000\000\000\000\000\ +\205\000\000\000\000\000\000\000\205\000\207\000\207\000\207\000\ +\207\000\000\000\000\000\000\000\000\000\207\000\207\000\207\000\ +\000\000\000\000\207\000\207\000\000\000\207\000\207\000\207\000\ +\207\000\207\000\207\000\000\000\000\000\207\000\207\000\207\000\ +\207\000\207\000\207\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\207\000\207\000\000\000\000\000\207\000\207\000\207\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\207\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\207\000\207\000\000\000\207\000\000\000\000\000\000\000\ +\207\000\207\000\000\000\207\000\000\000\000\000\207\000\207\000\ +\000\000\000\000\000\000\000\000\000\000\207\000\000\000\207\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\207\000\207\000\206\000\207\000\207\000\207\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\207\000\000\000\207\000\000\000\ +\000\000\207\000\000\000\000\000\207\000\000\000\000\000\000\000\ +\207\000\000\000\193\000\193\000\193\000\193\000\000\000\000\000\ +\000\000\000\000\193\000\193\000\193\000\000\000\000\000\193\000\ +\193\000\000\000\193\000\193\000\193\000\193\000\193\000\193\000\ +\000\000\000\000\193\000\193\000\193\000\193\000\193\000\193\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\193\000\193\000\ +\000\000\000\000\193\000\193\000\193\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\193\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\193\000\193\000\ +\000\000\193\000\000\000\000\000\000\000\193\000\193\000\000\000\ +\193\000\000\000\000\000\193\000\193\000\000\000\000\000\000\000\ +\000\000\000\000\193\000\000\000\193\000\000\000\000\000\211\000\ +\000\000\000\000\000\000\000\000\000\000\193\000\193\000\000\000\ +\193\000\193\000\193\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\193\000\000\000\193\000\000\000\000\000\193\000\000\000\ +\000\000\193\000\000\000\000\000\000\000\193\000\194\000\194\000\ +\194\000\194\000\000\000\000\000\000\000\000\000\194\000\194\000\ +\194\000\000\000\000\000\194\000\194\000\000\000\194\000\194\000\ +\194\000\194\000\194\000\194\000\000\000\000\000\194\000\194\000\ +\194\000\194\000\194\000\194\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\194\000\194\000\000\000\000\000\194\000\194\000\ +\194\000\000\000\000\000\000\000\000\000\000\000\000\000\194\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\194\000\194\000\000\000\194\000\000\000\000\000\ +\000\000\194\000\194\000\000\000\194\000\000\000\000\000\194\000\ +\194\000\000\000\000\000\000\000\210\000\000\000\194\000\000\000\ +\194\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\194\000\194\000\000\000\194\000\194\000\194\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\194\000\000\000\194\000\ +\000\000\000\000\194\000\000\000\000\000\194\000\000\000\000\000\ +\000\000\194\000\206\000\206\000\206\000\206\000\000\000\000\000\ +\000\000\000\000\206\000\206\000\206\000\000\000\000\000\206\000\ +\206\000\000\000\206\000\206\000\206\000\206\000\206\000\206\000\ +\000\000\000\000\206\000\206\000\206\000\206\000\206\000\206\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\206\000\206\000\ +\000\000\000\000\206\000\206\000\206\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\206\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\206\000\206\000\ +\000\000\206\000\000\000\000\000\209\000\206\000\206\000\000\000\ +\206\000\000\000\000\000\206\000\206\000\000\000\000\000\000\000\ +\000\000\000\000\206\000\000\000\206\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\206\000\206\000\000\000\ +\206\000\206\000\206\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\206\000\000\000\206\000\000\000\000\000\206\000\211\000\ +\000\000\206\000\211\000\000\000\000\000\206\000\000\000\211\000\ +\211\000\211\000\000\000\000\000\211\000\211\000\000\000\211\000\ +\211\000\211\000\211\000\211\000\211\000\000\000\000\000\211\000\ +\211\000\211\000\000\000\211\000\211\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\211\000\000\000\000\000\211\000\ +\211\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\211\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\211\000\073\001\000\000\211\000\000\000\ +\000\000\000\000\211\000\211\000\000\000\211\000\000\000\000\000\ +\211\000\211\000\000\000\000\000\000\000\000\000\000\000\211\000\ +\000\000\211\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\211\000\211\000\000\000\211\000\211\000\211\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\211\000\000\000\ +\211\000\000\000\000\000\211\000\210\000\000\000\211\000\210\000\ +\000\000\000\000\211\000\000\000\210\000\210\000\210\000\000\000\ +\000\000\210\000\210\000\000\000\210\000\210\000\210\000\210\000\ +\210\000\210\000\000\000\000\000\210\000\210\000\210\000\000\000\ +\210\000\210\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\210\000\000\000\000\000\210\000\210\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\210\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\208\000\000\000\000\000\000\000\ +\210\000\000\000\000\000\210\000\000\000\000\000\000\000\210\000\ +\210\000\000\000\210\000\000\000\000\000\210\000\210\000\000\000\ +\000\000\000\000\000\000\000\000\210\000\000\000\210\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\210\000\ +\210\000\000\000\210\000\210\000\210\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\210\000\209\000\210\000\000\000\209\000\ +\210\000\000\000\000\000\210\000\209\000\000\000\209\000\210\000\ +\000\000\209\000\209\000\000\000\209\000\209\000\209\000\209\000\ +\209\000\209\000\000\000\000\000\209\000\209\000\209\000\000\000\ +\209\000\209\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\209\000\000\000\000\000\209\000\209\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\209\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\072\001\000\000\000\000\000\000\ +\209\000\000\000\000\000\209\000\000\000\000\000\000\000\209\000\ +\209\000\000\000\209\000\000\000\000\000\209\000\209\000\000\000\ +\000\000\000\000\000\000\000\000\209\000\000\000\000\000\000\000\ +\000\000\000\000\214\002\000\000\000\000\000\000\000\000\209\000\ +\209\000\000\000\209\000\209\000\209\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\209\000\073\001\209\000\000\000\073\001\ +\209\000\000\000\000\000\209\000\073\001\000\000\073\001\209\000\ +\000\000\073\001\073\001\000\000\073\001\073\001\073\001\073\001\ +\073\001\073\001\000\000\000\000\073\001\073\001\073\001\000\000\ +\073\001\073\001\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\073\001\000\000\000\000\073\001\073\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\073\001\000\000\212\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\073\001\000\000\000\000\073\001\000\000\000\000\000\000\073\001\ +\073\001\000\000\073\001\000\000\000\000\073\001\073\001\000\000\ +\000\000\000\000\000\000\000\000\073\001\214\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\073\001\ +\073\001\000\000\073\001\073\001\073\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\073\001\208\000\073\001\000\000\208\000\ +\073\001\000\000\000\000\073\001\208\000\000\000\208\000\073\001\ +\000\000\208\000\208\000\000\000\208\000\208\000\208\000\208\000\ +\208\000\208\000\000\000\000\000\208\000\208\000\208\000\000\000\ +\208\000\208\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\208\000\000\000\000\000\208\000\208\000\000\000\000\000\ +\000\000\000\000\224\000\000\000\000\000\208\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\208\000\000\000\000\000\208\000\000\000\000\000\000\000\208\000\ +\208\000\000\000\208\000\000\000\000\000\208\000\208\000\000\000\ +\000\000\000\000\000\000\000\000\208\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\208\000\ +\208\000\000\000\208\000\208\000\208\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\208\000\072\001\208\000\000\000\072\001\ +\208\000\000\000\000\000\208\000\072\001\000\000\072\001\208\000\ +\000\000\072\001\072\001\000\000\072\001\072\001\072\001\072\001\ +\072\001\072\001\000\000\000\000\072\001\072\001\072\001\000\000\ +\072\001\072\001\214\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\072\001\214\002\000\000\072\001\072\001\000\000\214\002\ +\000\000\000\000\215\000\000\000\000\000\072\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\214\002\000\000\214\002\214\002\ +\072\001\000\000\000\000\072\001\000\000\000\000\000\000\072\001\ +\072\001\000\000\072\001\214\002\000\000\072\001\072\001\000\000\ +\099\000\000\000\000\000\000\000\072\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\214\002\072\001\ +\072\001\214\002\072\001\072\001\072\001\214\002\214\002\212\000\ +\000\000\000\000\212\000\072\001\214\002\072\001\000\000\212\000\ +\072\001\212\000\214\002\072\001\212\000\212\000\000\000\072\001\ +\212\000\000\000\212\000\212\000\212\000\000\000\214\002\212\000\ +\212\000\212\000\214\002\212\000\212\000\214\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\212\000\000\000\214\002\212\000\ +\212\000\214\002\214\002\000\000\000\000\188\000\000\000\000\000\ +\212\000\000\000\000\000\000\000\000\000\000\000\000\000\214\002\ +\000\000\214\002\214\002\212\000\000\000\000\000\212\000\000\000\ +\000\000\000\000\212\000\212\000\000\000\212\000\214\002\000\000\ +\212\000\212\000\000\000\212\002\000\000\000\000\000\000\212\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\214\002\212\000\212\000\214\002\212\000\212\000\212\000\ +\214\002\214\002\224\000\000\000\000\000\224\000\212\000\214\002\ +\212\000\000\000\224\000\212\000\224\000\214\002\212\000\224\000\ +\224\000\000\000\212\000\224\000\000\000\224\000\224\000\224\000\ +\000\000\214\002\224\000\224\000\224\000\214\002\224\000\224\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\224\000\ +\000\000\214\002\224\000\224\000\214\002\000\000\000\000\000\000\ +\217\000\000\000\000\000\224\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\224\000\000\000\ +\000\000\224\000\000\000\000\000\000\000\224\000\224\000\000\000\ +\224\000\000\000\000\000\224\000\224\000\000\000\000\000\000\000\ +\000\000\000\000\224\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\224\000\224\000\000\000\ +\224\000\224\000\224\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\224\000\215\000\224\000\000\000\215\000\224\000\000\000\ +\000\000\224\000\215\000\000\000\215\000\224\000\000\000\215\000\ +\215\000\000\000\000\000\215\000\000\000\215\000\215\000\215\000\ +\000\000\000\000\215\000\215\000\215\000\000\000\215\000\215\000\ +\099\000\000\000\000\000\000\000\000\000\000\000\000\000\215\000\ +\000\000\000\000\215\000\215\000\000\000\099\000\000\000\000\000\ +\216\000\000\000\000\000\215\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\099\000\000\000\099\000\099\000\215\000\000\000\ +\000\000\215\000\000\000\000\000\000\000\215\000\215\000\000\000\ +\215\000\099\000\000\000\215\000\215\000\000\000\100\000\000\000\ +\000\000\000\000\215\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\099\000\215\000\215\000\099\000\ +\215\000\215\000\215\000\099\000\099\000\188\000\000\000\000\000\ +\188\000\215\000\099\000\215\000\000\000\188\000\215\000\188\000\ +\099\000\215\000\188\000\188\000\000\000\215\000\188\000\000\000\ +\188\000\188\000\188\000\000\000\099\000\188\000\188\000\188\000\ +\099\000\188\000\188\000\212\002\000\000\000\000\212\002\000\000\ +\000\000\000\000\188\000\000\000\099\000\188\000\188\000\099\000\ +\212\002\000\000\000\000\220\000\000\000\000\000\188\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\212\002\000\000\212\002\ +\212\002\188\000\000\000\000\000\188\000\000\000\000\000\000\000\ +\188\000\188\000\000\000\188\000\212\002\000\000\188\000\188\000\ +\000\000\165\001\000\000\000\000\000\000\188\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\212\002\ +\188\000\188\000\212\002\188\000\188\000\188\000\000\000\212\002\ +\217\000\000\000\000\000\217\000\188\000\212\002\188\000\000\000\ +\217\000\188\000\217\000\212\002\188\000\217\000\217\000\000\000\ +\188\000\217\000\000\000\217\000\217\000\217\000\000\000\212\002\ +\217\000\217\000\217\000\212\002\217\000\217\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\217\000\000\000\212\002\ +\217\000\217\000\212\002\000\000\000\000\000\000\218\000\000\000\ +\000\000\217\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\217\000\000\000\000\000\217\000\ +\000\000\000\000\000\000\217\000\217\000\000\000\217\000\000\000\ +\000\000\217\000\217\000\000\000\000\000\000\000\000\000\000\000\ +\217\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\217\000\217\000\000\000\217\000\217\000\ +\217\000\000\000\000\000\000\000\000\000\000\000\000\000\217\000\ +\216\000\217\000\000\000\216\000\217\000\000\000\000\000\217\000\ +\216\000\000\000\216\000\217\000\000\000\216\000\216\000\000\000\ +\000\000\216\000\000\000\216\000\216\000\216\000\000\000\000\000\ +\216\000\216\000\216\000\000\000\216\000\216\000\100\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\216\000\000\000\000\000\ +\216\000\216\000\000\000\100\000\000\000\000\000\219\000\000\000\ +\000\000\216\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\100\000\000\000\100\000\100\000\216\000\000\000\000\000\216\000\ +\000\000\000\000\000\000\216\000\216\000\000\000\216\000\100\000\ +\000\000\216\000\216\000\000\000\212\002\000\000\000\000\000\000\ +\216\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\100\000\216\000\216\000\100\000\216\000\216\000\ +\216\000\100\000\100\000\220\000\000\000\000\000\220\000\216\000\ +\100\000\216\000\000\000\220\000\216\000\220\000\100\000\216\000\ +\220\000\220\000\000\000\216\000\220\000\000\000\220\000\220\000\ +\220\000\000\000\100\000\220\000\220\000\220\000\100\000\220\000\ +\220\000\165\001\000\000\000\000\000\000\000\000\000\000\000\000\ +\220\000\000\000\100\000\220\000\220\000\100\000\165\001\000\000\ +\000\000\223\000\000\000\000\000\220\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\165\001\000\000\165\001\165\001\220\000\ +\000\000\000\000\220\000\000\000\000\000\000\000\220\000\220\000\ +\000\000\220\000\165\001\000\000\220\000\220\000\000\000\037\000\ +\000\000\000\000\000\000\220\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\165\001\220\000\220\000\ +\165\001\220\000\220\000\220\000\165\001\165\001\218\000\000\000\ +\000\000\218\000\220\000\165\001\220\000\000\000\218\000\220\000\ +\218\000\165\001\220\000\218\000\218\000\000\000\220\000\218\000\ +\000\000\218\000\218\000\218\000\000\000\165\001\218\000\218\000\ +\218\000\165\001\218\000\218\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\218\000\000\000\165\001\218\000\218\000\ +\165\001\000\000\000\000\000\000\221\000\000\000\000\000\218\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\218\000\000\000\000\000\218\000\000\000\000\000\ +\000\000\218\000\218\000\000\000\218\000\000\000\000\000\218\000\ +\218\000\000\000\000\000\000\000\000\000\000\000\218\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\218\000\218\000\000\000\218\000\218\000\218\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\218\000\219\000\218\000\ +\000\000\219\000\218\000\000\000\000\000\218\000\219\000\000\000\ +\219\000\218\000\000\000\219\000\219\000\000\000\000\000\219\000\ +\000\000\219\000\219\000\219\000\000\000\000\000\219\000\219\000\ +\219\000\000\000\219\000\219\000\212\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\219\000\000\000\000\000\219\000\219\000\ +\000\000\212\002\000\000\000\000\222\000\000\000\000\000\219\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\212\002\000\000\ +\212\002\212\002\219\000\000\000\000\000\219\000\000\000\000\000\ +\000\000\219\000\219\000\000\000\219\000\212\002\000\000\219\000\ +\219\000\000\000\040\000\000\000\000\000\000\000\219\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\212\002\219\000\219\000\212\002\219\000\219\000\219\000\000\000\ +\212\002\223\000\000\000\000\000\223\000\219\000\212\002\219\000\ +\000\000\223\000\219\000\223\000\212\002\219\000\223\000\223\000\ +\000\000\219\000\223\000\000\000\223\000\223\000\223\000\000\000\ +\212\002\223\000\223\000\223\000\212\002\223\000\223\000\037\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\223\000\000\000\ +\212\002\223\000\223\000\212\002\037\000\000\000\000\000\152\000\ +\000\000\000\000\223\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\037\000\000\000\037\000\037\000\223\000\000\000\000\000\ +\223\000\000\000\000\000\000\000\223\000\223\000\000\000\223\000\ +\037\000\000\000\223\000\223\000\000\000\000\000\000\000\000\000\ +\000\000\223\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\037\000\223\000\223\000\037\000\223\000\ +\223\000\223\000\000\000\037\000\221\000\000\000\000\000\221\000\ +\223\000\037\000\223\000\000\000\221\000\223\000\221\000\037\000\ +\223\000\221\000\221\000\000\000\223\000\221\000\000\000\221\000\ +\221\000\221\000\000\000\037\000\221\000\221\000\221\000\037\000\ +\221\000\221\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\221\000\000\000\037\000\221\000\221\000\037\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\221\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\003\002\000\000\000\000\ +\221\000\000\000\000\000\221\000\000\000\000\000\000\000\221\000\ +\221\000\000\000\221\000\000\000\000\000\221\000\221\000\000\000\ +\000\000\000\000\000\000\000\000\221\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\221\000\ +\221\000\000\000\221\000\221\000\221\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\221\000\222\000\221\000\000\000\222\000\ +\221\000\000\000\000\000\221\000\222\000\000\000\222\000\221\000\ +\000\000\222\000\222\000\000\000\000\000\222\000\000\000\222\000\ +\222\000\222\000\000\000\000\000\222\000\222\000\222\000\000\000\ +\222\000\222\000\040\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\222\000\000\000\000\000\222\000\222\000\000\000\040\000\ +\000\000\000\000\000\000\000\000\000\000\222\000\000\000\000\000\ +\189\000\000\000\000\000\000\000\040\000\000\000\040\000\040\000\ +\222\000\000\000\000\000\222\000\000\000\000\000\000\000\222\000\ +\222\000\000\000\222\000\040\000\000\000\222\000\222\000\000\000\ +\000\000\000\000\000\000\000\000\222\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\040\000\222\000\ +\222\000\040\000\222\000\222\000\222\000\000\000\040\000\152\000\ +\000\000\000\000\152\000\222\000\040\000\222\000\000\000\152\000\ +\222\000\152\000\040\000\222\000\152\000\152\000\000\000\222\000\ +\152\000\000\000\152\000\152\000\152\000\000\000\040\000\152\000\ +\152\000\152\000\040\000\152\000\152\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\152\000\000\000\040\000\152\000\ +\152\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\152\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\152\000\000\000\000\000\152\000\000\000\ +\000\000\000\000\152\000\152\000\037\002\152\000\000\000\000\000\ +\152\000\152\000\000\000\000\000\000\000\000\000\000\000\152\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\152\000\152\000\000\000\152\000\000\000\152\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\152\000\000\000\ +\152\000\000\000\000\000\152\000\000\000\003\002\152\000\003\002\ +\003\002\003\002\152\000\000\000\000\000\003\002\000\000\000\000\ +\000\000\000\000\003\002\000\000\000\000\000\000\003\002\003\002\ +\003\002\000\000\000\000\000\000\000\000\000\000\000\000\003\002\ +\003\002\003\002\003\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\003\002\000\000\000\000\000\000\003\002\003\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\003\002\003\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001\002\ +\000\000\003\002\000\000\000\000\003\002\000\000\000\000\003\002\ +\003\002\003\002\000\000\003\002\000\000\000\000\003\002\003\002\ +\000\000\000\000\000\000\000\000\000\000\003\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\003\002\003\002\000\000\003\002\003\002\003\002\000\000\000\000\ +\189\000\003\002\000\000\189\000\000\000\000\000\000\000\000\000\ +\189\000\003\002\189\000\000\000\003\002\189\000\189\000\000\000\ +\003\002\189\000\000\000\189\000\189\000\189\000\000\000\000\000\ +\189\000\000\000\189\000\000\000\189\000\189\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\189\000\000\000\000\000\ +\189\000\189\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\189\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\255\001\000\000\189\000\000\000\000\000\189\000\ +\000\000\000\000\000\000\189\000\189\000\000\000\189\000\000\000\ +\000\000\189\000\189\000\000\000\000\000\000\000\000\000\000\000\ +\189\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\189\000\189\000\000\000\189\000\189\000\ +\189\000\000\000\000\000\000\000\000\000\000\000\000\000\189\000\ +\000\000\189\000\000\000\000\000\189\000\000\000\000\000\189\000\ +\000\000\000\000\000\000\189\000\037\002\000\000\037\002\037\002\ +\037\002\000\000\000\000\000\000\037\002\000\000\000\000\000\000\ +\000\000\037\002\000\000\000\000\000\000\037\002\037\002\037\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\037\002\037\002\ +\037\002\037\002\000\000\000\000\206\004\000\000\000\000\000\000\ +\037\002\000\000\000\000\000\000\000\000\037\002\000\000\000\002\ +\000\000\000\000\000\000\032\005\037\002\037\002\000\000\000\000\ +\000\000\000\000\198\001\000\000\000\000\000\000\000\000\000\000\ +\037\002\000\000\000\000\037\002\000\000\000\000\037\002\037\002\ +\037\002\000\000\037\002\000\000\000\000\037\002\037\002\000\000\ +\000\000\000\000\000\000\208\004\037\002\113\000\114\000\028\000\ +\000\000\115\000\000\000\000\000\116\000\209\004\000\000\037\002\ +\037\002\000\000\037\002\037\002\037\002\000\000\000\000\001\002\ +\000\000\001\002\001\002\001\002\000\000\118\000\000\000\001\002\ +\037\002\000\000\000\000\037\002\001\002\119\000\120\000\037\002\ +\001\002\001\002\001\002\000\000\000\000\121\000\000\000\000\000\ +\000\000\001\002\001\002\001\002\001\002\000\000\201\001\000\000\ +\000\000\211\004\123\000\001\002\000\000\000\000\000\000\000\000\ +\001\002\000\000\254\001\000\000\000\000\000\000\000\000\001\002\ +\001\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\001\002\000\000\000\000\001\002\000\000\ +\000\000\001\002\001\002\001\002\000\000\001\002\000\000\000\000\ +\000\000\001\002\000\000\000\000\000\000\000\000\000\000\001\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\001\002\001\002\000\000\001\002\001\002\001\002\ +\000\000\000\000\255\001\000\000\255\001\255\001\255\001\000\000\ +\000\000\000\000\255\001\001\002\000\000\000\000\001\002\255\001\ +\000\000\000\000\001\002\255\001\255\001\255\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\255\001\255\001\255\001\255\001\ +\000\000\000\000\000\000\000\000\146\000\000\000\255\001\000\000\ +\000\000\000\000\000\000\255\001\000\000\000\000\090\000\000\000\ +\000\000\000\000\255\001\255\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\255\001\000\000\ +\000\000\255\001\000\000\000\000\255\001\255\001\255\001\000\000\ +\255\001\000\000\000\000\000\000\255\001\000\000\000\000\000\000\ +\000\000\000\000\255\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\255\001\255\001\065\000\ +\255\001\255\001\255\001\000\000\000\000\000\000\000\000\000\002\ +\000\000\000\002\000\002\000\002\000\000\000\000\255\001\000\002\ +\000\000\255\001\000\000\000\000\000\002\255\001\000\000\000\000\ +\000\002\000\002\000\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\002\000\002\000\002\000\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\ +\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\002\ +\000\002\066\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\002\000\000\000\000\000\002\000\000\ +\000\000\000\002\000\002\000\002\000\000\000\002\000\000\000\000\ +\000\000\000\002\000\000\000\000\000\000\000\000\112\000\000\002\ +\113\000\114\000\028\000\000\000\115\000\000\000\000\000\116\000\ +\117\000\000\000\000\002\000\002\000\000\000\002\000\002\000\002\ +\000\000\000\000\254\001\000\000\254\001\254\001\254\001\000\000\ +\118\000\000\000\254\001\000\002\000\000\000\000\000\002\254\001\ +\119\000\120\000\000\002\254\001\254\001\254\001\000\000\000\000\ +\121\000\000\000\000\000\000\000\254\001\254\001\254\001\254\001\ +\000\000\000\000\000\000\000\000\122\000\123\000\254\001\000\000\ +\000\000\000\000\000\000\254\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\254\001\254\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\254\001\000\000\ +\000\000\254\001\214\002\000\000\254\001\254\001\254\001\000\000\ +\254\001\000\000\000\000\000\000\254\001\000\000\000\000\000\000\ +\000\000\000\000\254\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\146\000\254\001\254\001\146\000\ +\254\001\254\001\254\001\000\000\000\000\000\000\090\000\000\000\ +\000\000\146\000\000\000\000\000\000\000\146\000\254\001\146\000\ +\000\000\254\001\000\000\090\000\000\000\254\001\146\000\146\000\ +\146\000\146\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\090\000\000\000\090\000\090\000\000\000\146\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\090\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\065\000\ +\146\000\000\000\000\000\146\000\000\000\000\000\000\000\146\000\ +\146\000\000\000\090\000\000\000\065\000\146\000\146\000\000\000\ +\065\000\090\000\090\000\000\000\146\000\000\000\000\000\000\000\ +\090\000\065\000\065\000\065\000\065\000\106\002\090\000\000\000\ +\146\000\000\000\146\000\000\000\146\000\000\000\000\000\000\000\ +\065\000\000\000\090\000\000\000\000\000\000\000\090\000\000\000\ +\146\000\000\000\000\000\146\000\000\000\000\000\000\000\146\000\ +\000\000\066\000\090\000\065\000\066\000\090\000\065\000\000\000\ +\000\000\065\000\065\000\065\000\000\000\000\000\066\000\000\000\ +\065\000\065\000\066\000\000\000\000\000\000\000\000\000\065\000\ +\000\000\000\000\000\000\066\000\066\000\066\000\066\000\000\000\ +\000\000\000\000\000\000\065\000\000\000\065\000\000\000\065\000\ +\000\000\000\000\066\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\065\000\000\000\000\000\065\000\000\000\ +\000\000\000\000\065\000\000\000\000\000\066\000\000\000\000\000\ +\066\000\000\000\000\000\000\000\066\000\066\000\000\000\000\000\ +\000\000\000\000\066\000\066\000\112\000\000\000\113\000\114\000\ +\028\000\066\000\115\000\000\000\120\001\116\000\117\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\066\000\000\000\066\000\ +\000\000\066\000\000\000\000\000\000\000\000\000\118\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\066\000\119\000\060\003\ +\066\000\000\000\214\002\000\000\066\000\214\002\121\000\214\002\ +\214\002\214\002\214\002\000\000\000\000\214\002\214\002\214\002\ +\000\000\000\000\122\000\123\000\000\000\214\002\000\000\000\000\ +\000\000\214\002\000\000\000\000\214\002\000\000\214\002\214\002\ +\214\002\214\002\214\002\214\002\214\002\214\002\214\002\000\000\ +\000\000\214\002\214\002\214\002\000\000\000\000\098\002\000\000\ +\000\000\000\000\214\002\214\002\214\002\214\002\214\002\214\002\ +\214\002\214\002\214\002\214\002\214\002\214\002\214\002\214\002\ +\000\000\214\002\214\002\214\002\000\000\214\002\214\002\214\002\ +\214\002\214\002\214\002\000\000\214\002\214\002\000\000\214\002\ +\214\002\000\000\214\002\214\002\000\000\000\000\214\002\214\002\ +\000\000\214\002\214\002\214\002\214\002\214\002\214\002\214\002\ +\000\000\214\002\214\002\214\002\000\000\214\002\000\000\214\002\ +\214\002\000\000\214\002\000\000\214\002\214\002\214\002\214\002\ +\214\002\214\002\214\002\212\001\214\002\106\002\000\000\000\000\ +\000\000\106\002\000\000\106\002\000\000\106\002\000\000\106\002\ +\000\000\106\002\000\000\106\002\106\002\000\000\106\002\106\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\106\002\106\002\000\000\106\002\106\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\106\002\ +\106\002\106\002\106\002\000\000\106\002\106\002\000\000\000\000\ +\106\002\213\001\000\000\000\000\000\000\106\002\106\002\106\002\ +\000\000\000\000\000\000\000\000\106\002\000\000\106\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\106\002\000\000\ +\000\000\106\002\000\000\000\000\000\000\000\000\106\002\000\000\ +\106\002\106\002\000\000\106\002\106\002\000\000\106\002\000\000\ +\000\000\000\000\106\002\000\000\000\000\106\002\000\000\106\002\ +\000\000\000\000\106\002\106\002\120\001\000\000\106\002\000\000\ +\120\001\000\000\120\001\212\002\120\001\000\000\120\001\000\000\ +\120\001\000\000\120\001\120\001\000\000\120\001\120\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\120\001\ +\000\000\000\000\120\001\120\001\000\000\000\000\000\000\000\000\ +\000\000\064\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\120\001\120\001\ +\000\000\120\001\000\000\120\001\120\001\000\000\000\000\120\001\ +\000\000\000\000\000\000\000\000\120\001\120\001\120\001\000\000\ +\000\000\000\000\000\000\120\001\000\000\120\001\098\002\000\000\ +\000\000\098\002\000\000\000\000\000\000\120\001\098\002\000\000\ +\120\001\000\000\000\000\098\002\098\002\120\001\000\000\120\001\ +\120\001\098\002\120\001\120\001\119\002\120\001\000\000\000\000\ +\098\002\120\001\098\002\098\002\120\001\000\000\120\001\000\000\ +\000\000\120\001\120\001\000\000\000\000\120\001\000\000\098\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\031\002\ +\209\001\031\002\031\002\031\002\000\000\031\002\000\000\000\000\ +\031\002\031\002\098\002\000\000\000\000\098\002\000\000\119\002\ +\098\002\098\002\098\002\212\001\000\000\000\000\212\001\000\000\ +\098\002\031\002\000\000\212\001\000\000\098\002\098\002\000\000\ +\212\001\031\002\031\002\000\000\000\000\000\000\212\001\000\000\ +\000\000\031\002\098\002\000\000\000\000\212\001\098\002\212\001\ +\212\001\000\000\000\000\000\000\000\000\031\002\031\002\000\000\ +\063\000\000\000\098\002\212\001\212\001\098\002\214\002\000\000\ +\214\002\214\002\214\002\000\000\214\002\000\000\000\000\214\002\ +\214\002\000\000\000\000\000\000\000\000\000\000\000\000\212\001\ +\000\000\213\001\212\001\000\000\213\001\212\001\212\001\212\001\ +\214\002\213\001\000\000\000\000\040\002\212\001\213\001\000\000\ +\214\002\214\002\000\000\212\001\213\001\000\000\000\000\000\000\ +\214\002\000\000\000\000\213\001\000\000\213\001\213\001\212\001\ +\131\000\000\000\000\000\212\001\214\002\214\002\000\000\040\002\ +\000\000\213\001\213\001\000\000\000\000\000\000\000\000\212\001\ +\000\000\000\000\212\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\212\002\000\000\213\001\212\002\000\000\ +\213\001\000\000\000\000\213\001\213\001\213\001\000\000\000\000\ +\212\002\000\000\213\001\213\001\000\000\000\000\212\002\000\000\ +\000\000\213\001\000\000\000\000\000\000\212\002\000\000\212\002\ +\212\002\064\000\174\001\000\000\064\000\213\001\000\000\000\000\ +\000\000\213\001\000\000\212\002\212\002\000\000\064\000\000\000\ +\000\000\000\000\064\000\212\002\212\002\213\001\000\000\000\000\ +\213\001\000\000\000\000\064\000\064\000\064\000\064\000\212\002\ +\000\000\000\000\212\002\000\000\000\000\000\000\000\000\212\002\ +\000\000\212\002\064\000\000\000\000\000\212\002\000\000\000\000\ +\000\000\000\000\241\001\212\002\241\001\241\001\241\001\000\000\ +\241\001\000\000\214\002\241\001\241\001\064\000\000\000\212\002\ +\064\000\000\000\000\000\212\002\064\000\064\000\000\000\000\000\ +\000\000\000\000\008\000\064\000\241\001\000\000\000\000\212\002\ +\011\000\064\000\212\002\000\000\241\001\241\001\000\000\000\000\ +\209\001\000\000\000\000\209\001\241\001\064\000\000\000\064\000\ +\209\001\064\000\015\000\016\000\000\000\209\001\000\000\000\000\ +\241\001\241\001\000\000\209\001\000\000\064\000\000\000\174\001\ +\064\000\000\000\209\001\000\000\209\001\209\001\022\000\000\000\ +\138\000\139\000\000\000\140\000\141\000\000\000\000\000\028\000\ +\000\000\209\001\000\000\000\000\142\000\143\000\000\000\000\000\ +\000\000\000\000\000\000\144\000\000\000\000\000\000\000\000\000\ +\063\000\000\000\000\000\063\000\209\001\000\000\000\000\209\001\ +\145\000\000\000\209\001\209\001\209\001\063\000\000\000\000\000\ +\000\000\063\000\209\001\000\000\175\001\146\000\000\000\000\000\ +\209\001\044\000\063\000\063\000\063\000\063\000\045\000\000\000\ +\000\000\048\000\147\000\000\000\209\001\000\000\000\000\000\000\ +\209\001\063\000\000\000\209\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\209\001\000\000\000\000\209\001\ +\131\000\000\000\000\000\131\000\063\000\000\000\000\000\063\000\ +\000\000\000\000\000\000\063\000\063\000\131\000\000\000\000\000\ +\000\000\177\001\063\000\131\000\000\000\000\000\000\000\000\000\ +\063\000\000\000\131\000\000\000\131\000\131\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\063\000\000\000\063\000\000\000\ +\063\000\131\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\131\000\000\000\000\000\000\000\063\000\000\000\000\000\063\000\ +\000\000\000\000\174\001\000\000\131\000\174\001\000\000\131\000\ +\000\000\000\000\000\000\131\000\131\000\000\000\131\000\174\001\ +\000\000\176\001\131\000\000\000\000\000\174\001\000\000\000\000\ +\131\000\000\000\000\000\000\000\174\001\000\000\174\001\174\001\ +\000\000\000\000\000\000\000\000\131\000\000\000\000\000\000\000\ +\131\000\000\000\000\000\174\001\000\000\000\000\000\000\178\001\ +\000\000\000\000\000\000\000\000\131\000\000\000\000\000\131\000\ +\000\000\000\000\214\002\000\000\000\000\214\002\174\001\000\000\ +\000\000\174\001\214\002\000\000\000\000\174\001\174\001\214\002\ +\000\000\000\000\000\000\000\000\174\001\214\002\000\000\000\000\ +\000\000\000\000\174\001\000\000\214\002\000\000\214\002\214\002\ +\115\002\000\000\000\000\000\000\000\000\000\000\174\001\000\000\ +\000\000\000\000\174\001\214\002\000\000\000\000\000\000\182\001\ +\000\000\000\000\000\000\000\000\000\000\000\000\174\001\174\001\ +\000\000\174\001\174\001\000\000\000\000\000\000\214\002\000\000\ +\209\001\214\002\000\000\000\000\174\001\214\002\214\002\000\000\ +\000\000\000\000\174\001\000\000\214\002\000\000\000\000\000\000\ +\000\000\174\001\214\002\174\001\174\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\214\002\000\000\ +\174\001\000\000\214\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\175\001\000\000\214\002\175\001\ +\000\000\214\002\000\000\174\001\000\000\000\000\174\001\000\000\ +\044\000\175\001\174\001\174\001\000\000\000\000\000\000\175\001\ +\000\000\174\001\000\000\209\001\000\000\000\000\175\001\174\001\ +\175\001\175\001\000\000\209\001\000\000\047\000\000\000\000\000\ +\209\001\000\000\000\000\174\001\000\000\175\001\085\000\174\001\ +\000\000\000\000\000\000\000\000\000\000\209\001\000\000\209\001\ +\209\001\177\001\000\000\174\001\177\001\000\000\174\001\000\000\ +\175\001\000\000\000\000\175\001\209\001\000\000\177\001\175\001\ +\175\001\000\000\000\000\000\000\177\001\000\000\175\001\000\000\ +\000\000\212\002\000\000\177\001\175\001\177\001\177\001\209\001\ +\000\000\000\000\209\001\000\000\000\000\209\001\209\001\209\001\ +\175\001\000\000\177\001\000\000\175\001\209\001\081\000\000\000\ +\000\000\000\000\000\000\209\001\000\000\000\000\000\000\000\000\ +\175\001\176\001\000\000\175\001\176\001\177\001\000\000\209\001\ +\177\001\000\000\000\000\209\001\177\001\177\001\176\001\000\000\ +\000\000\000\000\000\000\177\001\176\001\000\000\000\000\209\001\ +\000\000\177\001\209\001\176\001\000\000\176\001\176\001\178\001\ +\000\000\000\000\178\001\000\000\000\000\177\001\000\000\000\000\ +\000\000\177\001\176\001\000\000\178\001\000\000\000\000\000\000\ +\000\000\000\000\178\001\000\000\000\000\177\001\000\000\000\000\ +\177\001\178\001\000\000\178\001\178\001\176\001\000\000\000\000\ +\176\001\000\000\000\000\000\000\176\001\176\001\000\000\000\000\ +\178\001\000\000\000\000\176\001\000\000\000\000\000\000\000\000\ +\000\000\176\001\000\000\000\000\000\000\000\000\000\000\182\001\ +\000\000\000\000\182\001\178\001\000\000\176\001\178\001\000\000\ +\000\000\176\001\178\001\178\001\182\001\000\000\000\000\000\000\ +\209\001\178\001\182\001\000\000\000\000\176\001\000\000\178\001\ +\176\001\182\001\000\000\182\001\182\001\209\001\000\000\000\000\ +\000\000\000\000\000\000\178\001\000\000\000\000\000\000\178\001\ +\182\001\000\000\209\001\000\000\209\001\209\001\000\000\000\000\ +\000\000\000\000\000\000\178\001\000\000\000\000\178\001\000\000\ +\000\000\209\001\000\000\182\001\000\000\000\000\182\001\000\000\ +\000\000\000\000\182\001\182\001\000\000\000\000\000\000\000\000\ +\044\000\182\001\000\000\000\000\209\001\000\000\000\000\182\001\ +\000\000\000\000\209\001\209\001\209\001\044\000\000\000\000\000\ +\000\000\000\000\209\001\182\001\000\000\047\000\000\000\182\001\ +\209\001\000\000\044\000\000\000\044\000\044\000\085\000\000\000\ +\000\000\000\000\047\000\182\001\209\001\000\000\182\001\000\000\ +\209\001\044\000\000\000\085\000\000\000\000\000\000\000\047\000\ +\000\000\047\000\047\000\000\000\209\001\000\000\000\000\209\001\ +\085\000\000\000\085\000\085\000\044\000\000\000\047\000\044\000\ +\000\000\212\002\000\000\000\000\044\000\000\000\000\000\085\000\ +\000\000\000\000\044\000\000\000\000\000\000\000\212\002\000\000\ +\044\000\047\000\000\000\000\000\047\000\000\000\081\000\000\000\ +\000\000\047\000\085\000\212\002\044\000\212\002\212\002\047\000\ +\044\000\000\000\085\000\081\000\000\000\047\000\000\000\000\000\ +\085\000\000\000\212\002\000\000\044\000\000\000\085\000\044\000\ +\081\000\047\000\081\000\081\000\000\000\047\000\000\000\000\000\ +\000\000\000\000\085\000\000\000\000\000\212\002\085\000\081\000\ +\000\000\047\000\000\000\000\000\047\000\212\002\000\000\000\000\ +\000\000\000\000\085\000\212\002\000\000\085\000\000\000\000\000\ +\000\000\212\002\081\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\081\000\000\000\000\000\212\002\000\000\000\000\ +\081\000\212\002\000\000\000\000\000\000\000\000\081\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\212\002\000\000\000\000\ +\212\002\000\000\081\000\207\002\000\000\000\000\081\000\000\000\ +\207\002\207\002\207\002\207\002\000\000\000\000\207\002\207\002\ +\207\002\207\002\081\000\000\000\000\000\081\000\207\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\207\002\000\000\207\002\ +\207\002\207\002\207\002\207\002\207\002\207\002\207\002\000\000\ +\000\000\000\000\207\002\000\000\207\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\207\002\207\002\207\002\207\002\ +\207\002\207\002\207\002\207\002\000\000\000\000\207\002\207\002\ +\000\000\000\000\207\002\207\002\207\002\207\002\000\000\207\002\ +\207\002\207\002\207\002\207\002\000\000\207\002\000\000\000\000\ +\207\002\207\002\000\000\207\002\207\002\000\000\000\000\207\002\ +\207\002\000\000\207\002\000\000\207\002\207\002\000\000\207\002\ +\207\002\000\000\000\000\207\002\207\002\000\000\207\002\000\000\ +\207\002\207\002\000\000\207\002\000\000\207\002\207\002\207\002\ +\207\002\207\002\207\002\207\002\214\002\207\002\000\000\000\000\ +\000\000\214\002\214\002\214\002\214\002\000\000\000\000\214\002\ +\214\002\000\000\000\000\000\000\000\000\000\000\000\000\214\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\214\002\000\000\ +\214\002\000\000\214\002\214\002\214\002\214\002\214\002\214\002\ +\000\000\000\000\000\000\214\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\214\002\214\002\214\002\ +\214\002\214\002\214\002\214\002\214\002\000\000\000\000\214\002\ +\214\002\000\000\000\000\214\002\214\002\214\002\000\000\000\000\ +\214\002\214\002\214\002\214\002\214\002\000\000\214\002\000\000\ +\000\000\214\002\214\002\000\000\000\000\214\002\000\000\000\000\ +\214\002\214\002\000\000\214\002\000\000\214\002\214\002\000\000\ +\000\000\214\002\000\000\000\000\000\000\214\002\000\000\214\002\ +\000\000\214\002\214\002\000\000\214\002\000\000\214\002\214\002\ +\000\000\214\002\214\002\214\002\214\002\000\000\214\002\001\001\ +\002\001\003\001\000\000\000\000\007\000\008\000\004\001\000\000\ +\005\001\000\000\010\000\011\000\000\000\000\000\006\001\007\001\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\008\001\000\000\000\000\015\000\016\000\017\000\ +\018\000\019\000\000\000\009\001\000\000\000\000\020\000\000\000\ +\000\000\010\001\011\001\012\001\013\001\014\001\015\001\000\000\ +\000\000\022\000\000\000\023\000\024\000\025\000\026\000\027\000\ +\000\000\000\000\028\000\000\000\016\001\000\000\030\000\031\000\ +\032\000\000\000\000\000\000\000\034\000\000\000\017\001\018\001\ +\000\000\019\001\000\000\000\000\000\000\038\000\000\000\000\000\ +\000\000\020\001\021\001\022\001\023\001\024\001\025\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\026\001\000\000\000\000\ +\000\000\027\001\000\000\028\001\044\000\000\000\000\000\000\000\ +\000\000\045\000\046\000\000\000\048\000\049\000\001\001\002\001\ +\003\001\051\000\000\000\007\000\008\000\004\001\000\000\005\001\ +\000\000\010\000\011\000\000\000\000\000\018\003\007\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\008\001\000\000\000\000\015\000\016\000\017\000\018\000\ +\019\000\000\000\009\001\000\000\000\000\020\000\000\000\000\000\ +\010\001\011\001\012\001\013\001\014\001\015\001\000\000\000\000\ +\022\000\000\000\023\000\024\000\025\000\026\000\027\000\000\000\ +\000\000\028\000\000\000\016\001\000\000\030\000\031\000\032\000\ +\000\000\000\000\000\000\034\000\000\000\017\001\018\001\000\000\ +\019\003\000\000\000\000\000\000\038\000\000\000\000\000\000\000\ +\020\001\021\001\022\001\023\001\024\001\025\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\020\003\000\000\000\000\000\000\ +\027\001\000\000\028\001\044\000\000\000\000\000\000\000\000\000\ +\045\000\046\000\000\000\048\000\049\000\214\002\000\000\000\000\ +\051\000\000\000\214\002\214\002\214\002\000\000\000\000\000\000\ +\214\002\214\002\214\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\214\002\ +\000\000\214\002\214\002\214\002\214\002\214\002\214\002\214\002\ +\000\000\000\000\000\000\000\000\214\002\000\000\214\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\214\002\ +\000\000\214\002\214\002\214\002\214\002\214\002\000\000\000\000\ +\214\002\214\002\000\000\000\000\214\002\214\002\214\002\000\000\ +\000\000\214\002\214\002\000\000\214\002\214\002\000\000\214\002\ +\000\000\000\000\000\000\214\002\000\000\214\002\000\000\000\000\ +\000\000\214\002\214\002\085\002\214\002\000\000\000\000\000\000\ +\152\002\152\002\152\002\000\000\000\000\214\002\152\002\152\002\ +\000\000\000\000\214\002\000\000\000\000\000\000\000\000\214\002\ +\214\002\214\002\214\002\214\002\214\002\000\000\000\000\214\002\ +\000\000\152\002\152\002\152\002\152\002\152\002\000\000\000\000\ +\000\000\000\000\152\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\152\002\000\000\152\002\ +\152\002\152\002\152\002\152\002\000\000\000\000\152\002\000\000\ +\000\000\000\000\152\002\152\002\152\002\000\000\000\000\000\000\ +\152\002\000\000\152\002\152\002\000\000\000\000\000\000\000\000\ +\000\000\152\002\000\000\000\000\000\000\000\000\000\000\152\002\ +\152\002\086\002\152\002\000\000\000\000\000\000\153\002\153\002\ +\153\002\085\002\000\000\000\000\153\002\153\002\000\000\000\000\ +\152\002\000\000\000\000\000\000\000\000\152\002\152\002\000\000\ +\152\002\152\002\000\000\000\000\000\000\152\002\000\000\153\002\ +\153\002\153\002\153\002\153\002\000\000\000\000\000\000\000\000\ +\153\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\153\002\000\000\153\002\153\002\153\002\ +\153\002\153\002\000\000\000\000\153\002\000\000\000\000\000\000\ +\153\002\153\002\153\002\000\000\000\000\000\000\153\002\000\000\ +\153\002\153\002\000\000\000\000\000\000\000\000\000\000\153\002\ +\000\000\000\000\000\000\000\000\000\000\153\002\153\002\083\002\ +\153\002\000\000\000\000\000\000\154\002\154\002\154\002\086\002\ +\000\000\000\000\154\002\154\002\000\000\000\000\153\002\000\000\ +\000\000\000\000\000\000\153\002\153\002\000\000\153\002\153\002\ +\000\000\000\000\000\000\153\002\000\000\154\002\154\002\154\002\ +\154\002\154\002\000\000\000\000\000\000\000\000\154\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\154\002\000\000\154\002\154\002\154\002\154\002\154\002\ +\000\000\000\000\154\002\000\000\000\000\000\000\154\002\154\002\ +\154\002\000\000\000\000\000\000\154\002\000\000\154\002\154\002\ +\000\000\000\000\000\000\000\000\000\000\154\002\000\000\000\000\ +\000\000\000\000\000\000\154\002\154\002\084\002\154\002\000\000\ +\000\000\000\000\155\002\155\002\155\002\083\002\000\000\000\000\ +\155\002\155\002\000\000\000\000\154\002\000\000\000\000\000\000\ +\000\000\154\002\154\002\000\000\154\002\154\002\000\000\000\000\ +\000\000\154\002\000\000\155\002\155\002\155\002\155\002\155\002\ +\000\000\000\000\000\000\000\000\155\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\155\002\ +\000\000\155\002\155\002\155\002\155\002\155\002\000\000\000\000\ +\155\002\000\000\000\000\000\000\155\002\155\002\155\002\000\000\ +\000\000\000\000\155\002\000\000\155\002\155\002\000\000\000\000\ +\000\000\000\000\000\000\155\002\000\000\000\000\000\000\000\000\ +\000\000\155\002\155\002\000\000\155\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\084\002\199\000\200\000\201\000\000\000\ +\000\000\000\000\155\002\000\000\202\000\000\000\203\000\155\002\ +\155\002\000\000\155\002\155\002\204\000\205\000\206\000\155\002\ +\000\000\207\000\208\000\209\000\000\000\210\000\211\000\212\000\ +\000\000\213\000\214\000\215\000\216\000\000\000\000\000\000\000\ +\217\000\218\000\219\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\220\000\221\000\000\000\000\000\222\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\223\000\224\000\000\000\000\000\000\000\004\002\225\000\226\000\ +\000\000\004\002\000\000\227\000\228\000\229\000\230\000\231\000\ +\232\000\233\000\000\000\234\000\000\000\000\000\004\002\000\000\ +\004\002\235\000\000\000\243\001\000\000\000\000\236\000\004\002\ +\004\002\000\000\000\000\000\000\237\000\000\000\000\000\238\000\ +\239\000\004\002\240\000\241\000\242\000\243\000\244\000\000\000\ +\245\000\246\000\247\000\248\000\249\000\004\002\004\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\004\002\000\000\000\000\000\000\004\002\000\000\004\002\ +\004\002\004\002\000\000\004\002\000\000\000\000\004\002\000\000\ +\000\000\000\000\001\001\002\001\003\001\000\000\000\000\000\000\ +\008\000\164\001\000\000\005\001\000\000\000\000\011\000\243\001\ +\004\002\006\001\007\001\000\000\004\002\000\000\004\002\000\000\ +\000\000\004\002\000\000\000\000\000\000\008\001\137\000\000\000\ +\015\000\016\000\004\002\000\000\004\002\000\000\009\001\000\000\ +\000\000\000\000\000\000\000\000\010\001\011\001\012\001\013\001\ +\014\001\015\001\000\000\000\000\022\000\000\000\138\000\139\000\ +\000\000\140\000\141\000\000\000\000\000\028\000\000\000\016\001\ +\000\000\000\000\142\000\143\000\000\000\000\000\000\000\000\000\ +\000\000\165\001\166\001\000\000\167\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\020\001\021\001\168\001\169\001\ +\024\001\170\001\000\000\000\000\000\000\000\000\000\000\000\000\ +\026\001\000\000\000\000\146\000\027\001\000\000\028\001\044\000\ +\000\000\000\000\000\000\000\000\045\000\000\000\179\002\048\000\ +\147\000\001\001\002\001\003\001\000\000\000\000\000\000\008\000\ +\164\001\000\000\005\001\000\000\000\000\011\000\000\000\000\000\ +\006\001\007\001\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\008\001\137\000\000\000\015\000\ +\016\000\000\000\000\000\000\000\000\000\009\001\000\000\000\000\ +\000\000\000\000\000\000\010\001\011\001\012\001\013\001\014\001\ +\015\001\000\000\000\000\022\000\000\000\138\000\139\000\000\000\ +\140\000\141\000\000\000\000\000\028\000\000\000\016\001\000\000\ +\000\000\142\000\143\000\000\000\000\000\000\000\000\000\000\000\ +\165\001\166\001\000\000\167\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\020\001\021\001\168\001\169\001\024\001\ +\170\001\000\000\000\000\000\000\000\000\000\000\000\000\026\001\ +\000\000\000\000\146\000\027\001\000\000\028\001\044\000\000\000\ +\000\000\000\000\000\000\045\000\000\000\124\003\048\000\147\000\ +\001\001\002\001\003\001\000\000\000\000\000\000\008\000\164\001\ +\000\000\005\001\000\000\000\000\011\000\000\000\000\000\006\001\ +\007\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\008\001\137\000\000\000\015\000\016\000\ +\000\000\000\000\000\000\000\000\009\001\000\000\000\000\000\000\ +\000\000\000\000\010\001\011\001\012\001\013\001\014\001\015\001\ +\000\000\000\000\022\000\000\000\138\000\139\000\000\000\140\000\ +\141\000\000\000\000\000\028\000\000\000\016\001\000\000\000\000\ +\142\000\143\000\000\000\000\000\000\000\000\000\000\000\165\001\ +\166\001\000\000\167\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\020\001\021\001\168\001\169\001\024\001\170\001\ +\000\000\000\000\000\000\000\000\000\000\000\000\026\001\000\000\ +\000\000\146\000\027\001\000\000\028\001\044\000\000\000\000\000\ +\000\000\000\000\045\000\000\000\073\004\048\000\147\000\001\001\ +\002\001\003\001\000\000\000\000\000\000\008\000\164\001\000\000\ +\005\001\000\000\000\000\011\000\000\000\000\000\006\001\007\001\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\008\001\137\000\000\000\015\000\016\000\000\000\ +\000\000\000\000\000\000\009\001\000\000\000\000\000\000\000\000\ +\000\000\010\001\011\001\012\001\013\001\014\001\015\001\000\000\ +\000\000\022\000\000\000\138\000\139\000\000\000\140\000\141\000\ +\000\000\000\000\028\000\000\000\016\001\000\000\000\000\142\000\ +\143\000\000\000\000\000\000\000\000\000\000\000\165\001\166\001\ +\000\000\167\001\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\020\001\021\001\168\001\169\001\024\001\170\001\000\000\ +\000\000\091\003\000\000\000\000\000\000\026\001\000\000\008\000\ +\146\000\027\001\000\000\028\001\044\000\011\000\000\000\000\000\ +\018\003\045\000\000\000\000\000\048\000\147\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\137\000\000\000\015\000\ +\016\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\022\000\000\000\138\000\139\000\000\000\ +\140\000\141\000\000\000\000\000\028\000\000\000\143\002\000\000\ +\000\000\142\000\143\000\000\000\008\000\000\000\000\000\000\000\ +\144\000\000\000\011\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\145\000\000\000\000\000\ +\000\000\000\000\137\000\000\000\015\000\016\000\000\000\092\003\ +\000\000\000\000\146\000\000\000\000\000\000\000\044\000\000\000\ +\000\000\000\000\000\000\045\000\000\000\000\000\048\000\147\000\ +\022\000\000\000\138\000\139\000\000\000\140\000\141\000\000\000\ +\000\000\028\000\000\000\145\002\000\000\000\000\142\000\143\000\ +\000\000\008\000\000\000\000\000\000\000\144\000\000\000\011\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\145\000\000\000\000\000\000\000\000\000\137\000\ +\000\000\015\000\016\000\000\000\000\000\000\000\000\000\146\000\ +\000\000\000\000\000\000\044\000\000\000\000\000\000\000\000\000\ +\045\000\000\000\000\000\048\000\147\000\022\000\000\000\138\000\ +\139\000\000\000\140\000\141\000\000\000\000\000\028\000\000\000\ +\080\004\000\000\000\000\142\000\143\000\000\000\008\000\000\000\ +\000\000\000\000\144\000\000\000\011\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\145\000\ +\000\000\000\000\000\000\000\000\137\000\000\000\015\000\016\000\ +\000\000\000\000\000\000\000\000\146\000\000\000\000\000\000\000\ +\044\000\000\000\000\000\000\000\000\000\045\000\000\000\000\000\ +\048\000\147\000\022\000\000\000\138\000\139\000\000\000\140\000\ +\141\000\000\000\000\000\028\000\000\000\082\004\000\000\000\000\ +\142\000\143\000\000\000\008\000\000\000\000\000\000\000\144\000\ +\000\000\011\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\145\000\000\000\000\000\000\000\ +\000\000\137\000\000\000\015\000\016\000\000\000\000\000\000\000\ +\000\000\146\000\000\000\000\000\000\000\044\000\000\000\000\000\ +\000\000\000\000\045\000\000\000\000\000\048\000\147\000\022\000\ +\000\000\138\000\139\000\000\000\140\000\141\000\000\000\000\000\ +\028\000\000\000\084\004\000\000\000\000\142\000\143\000\000\000\ +\008\000\000\000\000\000\000\000\144\000\000\000\011\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\145\000\000\000\000\000\000\000\000\000\137\000\000\000\ +\015\000\016\000\000\000\000\000\000\000\000\000\146\000\000\000\ +\000\000\000\000\044\000\000\000\000\000\000\000\000\000\045\000\ +\000\000\000\000\048\000\147\000\022\000\000\000\138\000\139\000\ +\000\000\140\000\141\000\000\000\000\000\028\000\000\000\000\000\ +\000\000\000\000\142\000\143\000\007\000\008\000\009\000\000\000\ +\000\000\144\000\010\000\011\000\012\000\243\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\145\000\000\000\ +\000\000\000\000\000\000\013\000\014\000\015\000\016\000\017\000\ +\018\000\019\000\000\000\146\000\000\000\000\000\020\000\044\000\ +\021\000\000\000\000\000\000\000\045\000\000\000\000\000\048\000\ +\147\000\022\000\000\000\023\000\024\000\025\000\026\000\027\000\ +\000\000\000\000\028\000\029\000\000\000\000\000\030\000\031\000\ +\032\000\000\000\000\000\033\000\034\000\000\000\035\000\036\000\ +\000\000\037\000\000\000\000\000\000\000\038\000\000\000\039\000\ +\000\000\000\000\000\000\040\000\041\000\000\000\042\000\000\000\ +\244\001\000\000\000\000\007\000\008\000\009\000\000\000\043\000\ +\000\000\010\000\011\000\012\000\044\000\000\000\000\000\000\000\ +\000\000\045\000\046\000\047\000\048\000\049\000\050\000\000\000\ +\000\000\051\000\013\000\014\000\015\000\016\000\017\000\018\000\ +\019\000\000\000\000\000\000\000\000\000\020\000\000\000\021\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\022\000\000\000\023\000\024\000\025\000\026\000\027\000\000\000\ +\000\000\028\000\029\000\000\000\000\000\030\000\031\000\032\000\ +\000\000\000\000\033\000\034\000\000\000\035\000\036\000\000\000\ +\037\000\000\000\000\000\000\000\038\000\000\000\039\000\000\000\ +\000\000\000\000\040\000\041\000\000\000\042\000\000\000\000\000\ +\000\000\007\000\008\000\009\000\000\000\000\000\043\000\010\000\ +\011\000\000\000\000\000\044\000\000\000\000\000\000\000\000\000\ +\045\000\046\000\047\000\048\000\049\000\050\000\000\000\000\000\ +\051\000\000\000\015\000\016\000\017\000\018\000\019\000\000\000\ +\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\022\000\000\000\ +\023\000\024\000\025\000\026\000\027\000\000\000\000\000\028\000\ +\000\000\000\000\000\000\030\000\031\000\032\000\000\000\000\000\ +\000\000\034\000\000\000\035\000\036\000\000\000\000\000\000\000\ +\000\000\000\000\038\000\000\000\000\000\000\000\000\000\000\000\ +\040\000\041\000\000\000\042\000\000\000\000\000\000\000\000\000\ +\194\000\007\000\008\000\009\000\000\000\000\000\197\000\010\000\ +\011\000\044\000\000\000\000\000\000\000\000\000\045\000\046\000\ +\000\000\048\000\049\000\000\000\000\000\000\000\051\000\000\000\ +\000\000\000\000\015\000\016\000\017\000\018\000\019\000\000\000\ +\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\022\000\000\000\ +\023\000\024\000\025\000\026\000\027\000\000\000\000\000\028\000\ +\000\000\000\000\000\000\030\000\031\000\032\000\000\000\000\000\ +\000\000\034\000\000\000\035\000\036\000\000\000\000\000\000\000\ +\000\000\000\000\038\000\000\000\000\000\000\000\000\000\000\000\ +\040\000\041\000\000\000\042\000\000\000\000\000\007\000\008\000\ +\009\000\000\000\000\000\000\000\010\000\011\000\000\000\000\000\ +\000\000\044\000\000\000\000\000\000\000\000\000\045\000\046\000\ +\000\000\048\000\049\000\195\001\000\000\000\000\051\000\015\000\ +\016\000\017\000\018\000\019\000\000\000\000\000\000\000\000\000\ +\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\022\000\000\000\023\000\024\000\025\000\ +\026\000\027\000\000\000\000\000\028\000\000\000\000\000\000\000\ +\030\000\031\000\032\000\000\000\000\000\000\000\034\000\000\000\ +\035\000\036\000\000\000\000\000\000\000\000\000\000\000\038\000\ +\000\000\000\000\000\000\000\000\000\000\040\000\041\000\000\000\ +\042\000\000\000\000\000\007\000\008\000\009\000\000\000\000\000\ +\000\000\010\000\011\000\000\000\000\000\000\000\044\000\000\000\ +\000\000\000\000\000\000\045\000\046\000\000\000\048\000\049\000\ +\000\000\000\000\000\000\051\000\015\000\016\000\017\000\018\000\ +\019\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\022\000\000\000\023\000\024\000\025\000\026\000\027\000\000\000\ +\000\000\028\000\000\000\000\000\000\000\030\000\031\000\032\000\ +\000\000\000\000\000\000\034\000\000\000\035\000\036\000\000\000\ +\000\000\000\000\000\000\000\000\038\000\000\000\000\000\000\000\ +\000\000\054\002\040\000\041\000\000\000\042\000\000\000\000\000\ +\007\000\008\000\009\000\000\000\000\000\000\000\010\000\011\000\ +\000\000\000\000\000\000\044\000\000\000\000\000\000\000\000\000\ +\045\000\046\000\000\000\048\000\049\000\000\000\000\000\000\000\ +\051\000\015\000\016\000\017\000\018\000\019\000\000\000\000\000\ +\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\022\000\000\000\023\000\ +\024\000\025\000\026\000\027\000\000\000\000\000\028\000\000\000\ +\000\000\000\000\030\000\031\000\032\000\000\000\000\000\000\000\ +\034\000\000\000\035\000\036\000\000\000\000\000\000\000\000\000\ +\000\000\038\000\000\000\000\000\000\000\000\000\000\000\040\000\ +\041\000\000\000\042\000\000\000\000\000\000\000\000\000\014\003\ +\007\000\008\000\009\000\000\000\000\000\016\003\010\000\011\000\ +\044\000\000\000\000\000\000\000\000\000\045\000\046\000\000\000\ +\048\000\049\000\000\000\000\000\000\000\051\000\000\000\000\000\ +\000\000\015\000\016\000\017\000\018\000\019\000\000\000\000\000\ +\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\022\000\000\000\023\000\ +\024\000\025\000\026\000\027\000\000\000\000\000\028\000\000\000\ +\000\000\000\000\030\000\031\000\032\000\000\000\000\000\000\000\ +\034\000\000\000\035\000\036\000\000\000\000\000\000\000\000\000\ +\000\000\038\000\000\000\000\000\000\000\000\000\000\000\040\000\ +\041\000\000\000\042\000\000\000\000\000\000\000\007\000\008\000\ +\009\000\000\000\000\000\000\000\010\000\011\000\000\000\000\000\ +\044\000\000\000\000\000\000\000\000\000\045\000\046\000\053\004\ +\048\000\049\000\000\000\000\000\000\000\051\000\000\000\015\000\ +\016\000\017\000\018\000\019\000\000\000\000\000\000\000\000\000\ +\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\022\000\000\000\023\000\024\000\025\000\ +\026\000\027\000\000\000\000\000\028\000\000\000\000\000\000\000\ +\030\000\031\000\032\000\000\000\000\000\000\000\034\000\000\000\ +\035\000\036\000\000\000\000\000\000\000\000\000\000\000\038\000\ +\000\000\000\000\000\000\000\000\000\000\040\000\041\000\000\000\ +\042\000\000\000\000\000\216\002\216\002\216\002\000\000\000\000\ +\000\000\216\002\216\002\000\000\000\000\000\000\044\000\000\000\ +\000\000\000\000\000\000\045\000\046\000\000\000\048\000\049\000\ +\216\002\000\000\000\000\051\000\216\002\216\002\216\002\216\002\ +\216\002\000\000\000\000\000\000\000\000\216\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\216\002\000\000\216\002\216\002\216\002\216\002\216\002\000\000\ +\000\000\216\002\000\000\000\000\000\000\216\002\216\002\216\002\ +\000\000\000\000\000\000\216\002\000\000\216\002\216\002\000\000\ +\000\000\000\000\000\000\000\000\216\002\000\000\000\000\000\000\ +\000\000\000\000\216\002\216\002\000\000\216\002\000\000\000\000\ +\007\000\008\000\009\000\000\000\000\000\000\000\010\000\011\000\ +\000\000\000\000\000\000\216\002\000\000\000\000\000\000\000\000\ +\216\002\216\002\000\000\216\002\216\002\000\000\000\000\000\000\ +\216\002\015\000\016\000\017\000\018\000\019\000\000\000\000\000\ +\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\022\000\000\000\023\000\ +\024\000\025\000\026\000\027\000\000\000\000\000\028\000\000\000\ +\000\000\000\000\030\000\031\000\032\000\000\000\000\000\000\000\ +\034\000\000\000\035\000\036\000\000\000\000\000\000\000\000\000\ +\000\000\038\000\000\000\000\000\000\000\000\000\000\000\040\000\ +\041\000\000\000\042\000\000\000\000\000\216\002\216\002\216\002\ +\000\000\000\000\000\000\216\002\216\002\000\000\000\000\000\000\ +\044\000\000\000\000\000\000\000\000\000\045\000\046\000\000\000\ +\048\000\049\000\000\000\000\000\000\000\051\000\216\002\216\002\ +\216\002\216\002\216\002\000\000\000\000\000\000\000\000\216\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\216\002\000\000\216\002\216\002\216\002\216\002\ +\216\002\000\000\000\000\216\002\000\000\000\000\000\000\216\002\ +\216\002\216\002\000\000\000\000\000\000\216\002\000\000\216\002\ +\216\002\000\000\000\000\000\000\000\000\000\000\216\002\000\000\ +\000\000\000\000\000\000\000\000\216\002\216\002\000\000\216\002\ +\000\000\000\000\214\002\214\002\214\002\000\000\000\000\000\000\ +\214\002\214\002\000\000\000\000\000\000\216\002\000\000\000\000\ +\000\000\000\000\216\002\216\002\000\000\216\002\216\002\000\000\ +\000\000\000\000\216\002\214\002\214\002\214\002\214\002\214\002\ +\000\000\000\000\000\000\000\000\214\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\214\002\ +\000\000\214\002\214\002\214\002\214\002\214\002\000\000\000\000\ +\214\002\000\000\000\000\000\000\214\002\214\002\214\002\000\000\ +\000\000\008\000\214\002\000\000\214\002\214\002\000\000\011\000\ +\000\000\147\003\000\000\214\002\229\001\000\000\000\000\000\000\ +\000\000\214\002\214\002\000\000\214\002\000\000\148\003\000\000\ +\000\000\015\000\016\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\214\002\000\000\000\000\000\000\000\000\214\002\ +\214\002\000\000\214\002\214\002\000\000\022\000\207\001\214\002\ +\139\000\000\000\140\000\141\000\000\000\000\000\028\000\000\000\ +\000\000\000\000\000\000\142\000\149\003\000\000\008\000\000\000\ +\000\000\000\000\144\000\000\000\011\000\000\000\228\001\000\000\ +\000\000\229\001\000\000\000\000\209\001\000\000\000\000\145\000\ +\000\000\000\000\000\000\148\003\210\001\000\000\015\000\016\000\ +\000\000\008\000\000\000\000\000\146\000\000\000\000\000\011\000\ +\044\000\189\002\000\000\211\001\000\000\045\000\000\000\000\000\ +\048\000\147\000\022\000\207\001\000\000\139\000\000\000\140\000\ +\141\000\015\000\016\000\028\000\000\000\000\000\000\000\000\000\ +\142\000\149\003\000\000\000\000\000\000\000\000\000\000\144\000\ +\000\000\000\000\000\000\000\000\000\000\022\000\207\001\000\000\ +\139\000\209\001\140\000\141\000\145\000\000\000\028\000\000\000\ +\000\000\210\001\000\000\142\000\190\002\000\000\000\000\000\000\ +\000\000\146\000\144\000\000\000\191\002\044\000\000\000\000\000\ +\211\001\000\000\045\000\000\000\209\001\048\000\147\000\145\000\ +\000\000\000\000\008\000\000\000\210\001\000\000\000\000\000\000\ +\011\000\000\000\124\005\000\000\146\000\000\000\000\000\000\000\ +\044\000\000\000\000\000\211\001\000\000\045\000\000\000\148\003\ +\048\000\147\000\015\000\016\000\000\000\008\000\000\000\000\000\ +\000\000\000\000\000\000\011\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\022\000\207\001\ +\000\000\139\000\000\000\140\000\141\000\015\000\016\000\028\000\ +\000\000\000\000\000\000\000\000\142\000\149\003\000\000\000\000\ +\000\000\000\000\000\000\144\000\000\000\000\000\000\000\000\000\ +\000\000\022\000\207\001\000\000\139\000\209\001\140\000\141\000\ +\145\000\000\000\028\000\000\000\000\000\210\001\000\000\142\000\ +\208\001\000\000\216\002\000\000\000\000\146\000\144\000\000\000\ +\216\002\044\000\000\000\000\000\211\001\000\000\045\000\000\000\ +\209\001\048\000\147\000\145\000\000\000\000\000\000\000\000\000\ +\210\001\000\000\216\002\216\002\000\000\000\000\000\000\000\000\ +\146\000\000\000\000\000\000\000\044\000\000\000\000\000\211\001\ +\000\000\045\000\000\000\000\000\048\000\147\000\216\002\216\002\ +\000\000\216\002\000\000\216\002\216\002\000\000\000\000\216\002\ +\000\000\000\000\000\000\000\000\216\002\216\002\000\000\000\000\ +\008\000\000\000\000\000\216\002\000\000\000\000\011\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\216\002\000\000\000\000\ +\216\002\000\000\000\000\000\000\000\000\216\002\137\000\000\000\ +\015\000\016\000\000\000\000\000\000\000\216\002\000\000\000\000\ +\000\000\216\002\000\000\000\000\216\002\000\000\216\002\000\000\ +\000\000\216\002\216\002\000\000\022\000\000\000\138\000\139\000\ +\000\000\140\000\141\000\000\000\000\000\028\000\000\000\000\000\ +\000\000\000\000\142\000\143\000\000\000\000\000\000\000\008\000\ +\000\000\144\000\000\000\162\001\000\000\011\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\145\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\137\000\194\000\015\000\ +\016\000\000\000\000\000\146\000\000\000\000\000\000\000\044\000\ +\000\000\000\000\000\000\000\000\045\000\000\000\000\000\048\000\ +\147\000\000\000\000\000\022\000\000\000\138\000\139\000\000\000\ +\140\000\141\000\000\000\000\000\028\000\000\000\000\000\000\000\ +\000\000\142\000\143\000\000\000\008\000\000\000\000\000\000\000\ +\144\000\000\000\011\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\008\000\009\000\000\000\000\000\145\000\010\000\011\000\ +\000\000\000\000\137\000\000\000\015\000\016\000\000\000\000\000\ +\000\000\000\000\146\000\000\000\000\000\000\000\044\000\000\000\ +\000\000\015\000\016\000\045\000\000\000\000\000\048\000\147\000\ +\022\000\000\000\138\000\139\000\000\000\140\000\141\000\000\000\ +\000\000\028\000\000\000\000\000\000\000\022\000\142\000\143\000\ +\024\000\025\000\026\000\027\000\000\000\144\000\028\000\000\000\ +\216\002\000\000\216\002\182\000\032\000\000\000\216\002\000\000\ +\000\000\000\000\145\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\090\003\000\000\000\000\000\000\216\002\146\000\ +\216\002\216\002\042\000\044\000\000\000\000\000\000\000\000\000\ +\045\000\000\000\000\000\048\000\147\000\000\000\000\000\000\000\ +\044\000\000\000\000\000\000\000\216\002\045\000\216\002\216\002\ +\048\000\216\002\216\002\000\000\000\000\216\002\000\000\000\000\ +\000\000\000\000\216\002\216\002\000\000\008\000\000\000\000\000\ +\000\000\216\002\000\000\011\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\216\002\000\000\ +\000\000\000\000\000\000\137\000\000\000\015\000\016\000\000\000\ +\000\000\000\000\000\000\216\002\000\000\000\000\000\000\216\002\ +\000\000\000\000\000\000\000\000\216\002\000\000\000\000\216\002\ +\216\002\022\000\000\000\138\000\139\000\000\000\140\000\141\000\ +\000\000\000\000\028\000\000\000\000\000\000\000\000\000\142\000\ +\143\000\000\000\216\002\000\000\000\000\000\000\144\000\000\000\ +\216\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\145\000\000\000\000\000\000\000\000\000\ +\216\002\000\000\216\002\216\002\000\000\216\002\000\000\000\000\ +\146\000\000\000\000\000\216\002\044\000\000\000\000\000\000\000\ +\000\000\045\000\000\000\000\000\048\000\147\000\216\002\000\000\ +\216\002\216\002\000\000\216\002\216\002\216\002\216\002\216\002\ +\000\000\000\000\000\000\000\000\216\002\216\002\000\000\000\000\ +\000\000\000\000\000\000\216\002\000\000\000\000\000\000\000\000\ +\000\000\216\002\000\000\216\002\216\002\000\000\216\002\216\002\ +\216\002\000\000\216\002\000\000\000\000\000\000\000\000\216\002\ +\216\002\000\000\148\002\000\000\000\000\216\002\216\002\000\000\ +\148\002\216\002\000\000\000\000\000\000\000\000\216\002\000\000\ +\000\000\216\002\216\002\216\002\000\000\000\000\000\000\000\000\ +\148\002\000\000\148\002\148\002\216\002\129\002\000\000\000\000\ +\216\002\000\000\000\000\129\002\216\002\000\000\000\000\000\000\ +\000\000\216\002\000\000\000\000\216\002\216\002\148\002\000\000\ +\148\002\148\002\000\000\148\002\148\002\129\002\129\002\148\002\ +\000\000\000\000\000\000\000\000\148\002\148\002\000\000\000\000\ +\000\000\000\000\000\000\148\002\000\000\000\000\000\000\000\000\ +\000\000\129\002\000\000\129\002\129\002\000\000\129\002\129\002\ +\148\002\000\000\129\002\000\000\000\000\000\000\000\000\129\002\ +\129\002\000\000\214\002\000\000\000\000\148\002\129\002\000\000\ +\214\002\148\002\000\000\000\000\000\000\000\000\148\002\000\000\ +\000\000\148\002\148\002\129\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\214\002\214\002\000\000\008\000\000\000\000\000\ +\129\002\000\000\000\000\011\000\129\002\000\000\000\000\000\000\ +\000\000\129\002\000\000\000\000\129\002\129\002\214\002\000\000\ +\214\002\214\002\000\000\214\002\214\002\015\000\016\000\214\002\ +\000\000\000\000\000\000\000\000\214\002\214\002\000\000\000\000\ +\000\000\000\000\000\000\214\002\000\000\000\000\000\000\000\000\ +\000\000\022\000\000\000\000\000\139\000\000\000\140\000\141\000\ +\214\002\000\000\028\000\000\000\000\000\000\000\000\000\142\000\ +\143\000\000\000\216\002\000\000\000\000\214\002\144\000\000\000\ +\216\002\214\002\000\000\000\000\000\000\000\000\214\002\000\000\ +\000\000\214\002\214\002\145\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\216\002\216\002\000\000\000\000\000\000\000\000\ +\146\000\000\000\000\000\000\000\044\000\000\000\000\000\000\000\ +\000\000\045\000\000\000\000\000\048\000\147\000\216\002\000\000\ +\000\000\216\002\000\000\216\002\216\002\000\000\000\000\216\002\ +\000\000\000\000\000\000\000\000\216\002\216\002\000\000\008\000\ +\009\000\000\000\000\000\216\002\010\000\011\000\008\000\009\000\ +\000\000\000\000\000\000\010\000\011\000\000\000\000\000\087\001\ +\216\002\000\000\000\000\000\000\000\000\000\000\000\000\015\000\ +\016\000\000\000\000\000\000\000\000\000\216\002\015\000\016\000\ +\000\000\216\002\000\000\000\000\000\000\000\000\216\002\000\000\ +\088\001\216\002\216\002\022\000\089\001\000\000\024\000\025\000\ +\026\000\027\000\022\000\089\001\028\000\024\000\025\000\026\000\ +\027\000\142\000\032\000\028\000\000\000\000\000\000\000\000\000\ +\142\000\032\000\000\000\000\000\000\000\000\000\000\000\216\002\ +\216\002\000\000\090\001\000\000\216\002\216\002\000\000\000\000\ +\042\000\090\001\091\001\000\000\000\000\000\000\000\000\042\000\ +\000\000\091\001\092\001\093\001\000\000\000\000\044\000\216\002\ +\216\002\094\001\000\000\045\000\000\000\044\000\048\000\000\000\ +\094\001\000\000\045\000\000\000\000\000\048\000\000\000\000\000\ +\000\000\000\000\000\000\216\002\000\000\000\000\216\002\216\002\ +\216\002\216\002\000\000\000\000\216\002\000\000\000\000\000\000\ +\000\000\216\002\216\002\000\000\000\000\180\004\049\001\050\001\ +\000\000\000\000\000\000\000\000\000\000\000\000\051\001\000\000\ +\000\000\000\000\000\000\181\004\052\001\053\001\182\004\054\001\ +\216\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\055\001\000\000\000\000\000\000\000\000\000\000\216\002\000\000\ +\000\000\056\001\000\000\216\002\000\000\000\000\216\002\057\001\ +\058\001\059\001\060\001\061\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\062\001\000\000\167\002\000\000\000\000\162\000\ +\000\000\000\000\000\000\000\000\063\001\064\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\065\001\ +\066\001\067\001\068\001\069\001\000\000\001\001\002\001\003\001\ +\000\000\000\000\000\000\183\004\164\001\000\000\005\001\000\000\ +\000\000\071\001\000\000\000\000\112\000\007\001\113\000\114\000\ +\028\000\000\000\115\000\000\000\000\000\116\000\117\000\000\000\ +\008\001\000\000\000\000\000\000\000\000\000\000\000\000\134\001\ +\000\000\009\001\000\000\000\000\000\000\000\000\118\000\010\001\ +\011\001\012\001\013\001\014\001\015\001\000\000\119\000\120\000\ +\000\000\000\000\000\000\168\002\000\000\000\000\121\000\000\000\ +\000\000\000\000\016\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\122\000\123\000\173\002\166\001\000\000\174\002\ +\000\000\000\000\000\000\000\000\224\003\049\001\050\001\020\001\ +\021\001\175\002\169\001\024\001\170\001\051\001\000\000\000\000\ +\000\000\000\000\000\000\052\001\053\001\000\000\054\001\027\001\ +\000\000\028\001\000\000\000\000\000\000\000\000\000\000\055\001\ +\000\000\000\000\000\000\000\000\226\003\049\001\050\001\000\000\ +\056\001\000\000\000\000\000\000\000\000\051\001\057\001\058\001\ +\059\001\060\001\061\001\052\001\053\001\000\000\054\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\055\001\ +\000\000\062\001\000\000\000\000\000\000\000\000\162\000\000\000\ +\056\001\000\000\000\000\063\001\064\001\000\000\057\001\058\001\ +\059\001\060\001\061\001\000\000\000\000\000\000\065\001\066\001\ +\067\001\068\001\069\001\000\000\000\000\000\000\000\000\225\003\ +\000\000\062\001\000\000\000\000\000\000\000\000\162\000\000\000\ +\071\001\000\000\000\000\063\001\064\001\000\000\000\000\000\000\ +\000\000\000\000\228\003\049\001\050\001\000\000\065\001\066\001\ +\067\001\068\001\069\001\051\001\000\000\000\000\000\000\000\000\ +\227\003\052\001\053\001\000\000\054\001\000\000\000\000\000\000\ +\071\001\000\000\000\000\000\000\000\000\055\001\000\000\000\000\ +\000\000\000\000\224\003\049\001\050\001\000\000\056\001\000\000\ +\000\000\000\000\000\000\051\001\057\001\058\001\059\001\060\001\ +\061\001\052\001\053\001\000\000\054\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\055\001\000\000\062\001\ +\000\000\000\000\000\000\000\000\162\000\000\000\056\001\000\000\ +\000\000\063\001\064\001\000\000\057\001\058\001\059\001\060\001\ +\061\001\000\000\000\000\000\000\065\001\066\001\067\001\068\001\ +\069\001\000\000\000\000\000\000\000\000\000\000\000\000\062\001\ +\229\003\000\000\000\000\000\000\162\000\000\000\071\001\000\000\ +\000\000\063\001\064\001\000\000\000\000\000\000\000\000\000\000\ +\226\003\049\001\050\001\000\000\065\001\066\001\067\001\068\001\ +\069\001\051\001\000\000\000\000\000\000\023\004\000\000\052\001\ +\053\001\000\000\054\001\000\000\000\000\000\000\071\001\000\000\ +\000\000\000\000\000\000\055\001\000\000\000\000\000\000\000\000\ +\228\003\049\001\050\001\000\000\056\001\000\000\000\000\000\000\ +\000\000\051\001\057\001\058\001\059\001\060\001\061\001\052\001\ +\053\001\000\000\054\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\055\001\000\000\062\001\000\000\000\000\ +\000\000\000\000\162\000\000\000\056\001\000\000\000\000\063\001\ +\064\001\000\000\057\001\058\001\059\001\060\001\061\001\000\000\ +\000\000\000\000\065\001\066\001\067\001\068\001\069\001\000\000\ +\000\000\000\000\000\000\000\000\024\004\062\001\000\000\000\000\ +\000\000\000\000\162\000\000\000\071\001\000\000\000\000\063\001\ +\064\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\065\001\066\001\067\001\068\001\069\001\226\004\ +\049\001\050\001\000\000\000\000\000\000\000\000\025\004\000\000\ +\051\001\000\000\000\000\000\000\071\001\000\000\052\001\053\001\ +\000\000\054\001\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\055\001\000\000\000\000\000\000\000\000\228\004\ +\049\001\050\001\000\000\056\001\000\000\000\000\000\000\000\000\ +\051\001\057\001\058\001\059\001\060\001\061\001\052\001\053\001\ +\000\000\054\001\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\055\001\000\000\062\001\000\000\000\000\000\000\ +\000\000\162\000\000\000\056\001\000\000\000\000\063\001\064\001\ +\000\000\057\001\058\001\059\001\060\001\061\001\000\000\000\000\ +\000\000\065\001\066\001\067\001\068\001\069\001\000\000\000\000\ +\000\000\000\000\227\004\000\000\062\001\000\000\000\000\000\000\ +\000\000\162\000\000\000\071\001\000\000\000\000\063\001\064\001\ +\000\000\000\000\000\000\000\000\000\000\230\004\049\001\050\001\ +\000\000\065\001\066\001\067\001\068\001\069\001\051\001\000\000\ +\000\000\000\000\000\000\229\004\052\001\053\001\000\000\054\001\ +\000\000\000\000\000\000\071\001\000\000\000\000\000\000\000\000\ +\055\001\000\000\000\000\000\000\000\000\226\004\049\001\050\001\ +\000\000\056\001\000\000\000\000\000\000\000\000\051\001\057\001\ +\058\001\059\001\060\001\061\001\052\001\053\001\000\000\054\001\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\055\001\000\000\062\001\000\000\000\000\000\000\000\000\162\000\ +\000\000\056\001\000\000\000\000\063\001\064\001\000\000\057\001\ +\058\001\059\001\060\001\061\001\000\000\000\000\000\000\065\001\ +\066\001\067\001\068\001\069\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\062\001\231\004\000\000\000\000\000\000\162\000\ +\000\000\071\001\000\000\000\000\063\001\064\001\000\000\000\000\ +\000\000\000\000\000\000\228\004\049\001\050\001\000\000\065\001\ +\066\001\067\001\068\001\069\001\051\001\000\000\000\000\000\000\ +\249\004\000\000\052\001\053\001\000\000\054\001\000\000\000\000\ +\000\000\071\001\000\000\000\000\000\000\000\000\055\001\000\000\ +\000\000\000\000\000\000\230\004\049\001\050\001\000\000\056\001\ +\000\000\000\000\000\000\000\000\051\001\057\001\058\001\059\001\ +\060\001\061\001\052\001\053\001\000\000\054\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\055\001\000\000\ +\062\001\000\000\000\000\000\000\000\000\162\000\000\000\056\001\ +\000\000\000\000\063\001\064\001\000\000\057\001\058\001\059\001\ +\060\001\061\001\000\000\000\000\000\000\065\001\066\001\067\001\ +\068\001\069\001\000\000\000\000\000\000\000\000\000\000\250\004\ +\062\001\049\001\050\001\000\000\000\000\162\000\000\000\071\001\ +\000\000\051\001\063\001\064\001\000\000\000\000\000\000\052\001\ +\053\001\000\000\054\001\000\000\000\000\065\001\066\001\067\001\ +\068\001\069\001\000\000\055\001\000\000\000\000\000\000\000\000\ +\000\000\251\004\000\000\000\000\056\001\000\000\000\000\071\001\ +\000\000\000\000\057\001\058\001\059\001\060\001\061\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\062\001\000\000\000\000\ +\000\000\000\000\162\000\000\000\000\000\000\000\000\000\063\001\ +\064\001\049\001\050\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\051\001\065\001\066\001\067\001\068\001\069\001\052\001\ +\053\001\000\000\054\001\000\000\000\000\000\000\000\000\070\001\ +\000\000\057\004\000\000\055\001\071\001\000\000\000\000\000\000\ +\000\000\049\001\050\001\000\000\056\001\000\000\000\000\000\000\ +\000\000\051\001\057\001\058\001\059\001\060\001\061\001\052\001\ +\053\001\000\000\054\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\055\001\000\000\062\001\000\000\000\000\ +\000\000\000\000\162\000\000\000\056\001\000\000\000\000\063\001\ +\064\001\000\000\057\001\058\001\059\001\060\001\061\001\000\000\ +\000\000\000\000\065\001\066\001\067\001\068\001\069\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\062\001\049\001\050\001\ +\000\000\000\000\162\000\000\000\071\001\000\000\051\001\063\001\ +\064\001\000\000\000\000\000\000\052\001\000\000\000\000\000\000\ +\000\000\000\000\065\001\066\001\067\001\068\001\069\001\000\000\ +\055\001\000\000\000\000\000\000\000\000\000\000\049\001\050\001\ +\000\000\056\001\000\000\000\000\071\001\000\000\000\000\057\001\ +\058\001\059\001\060\001\061\001\052\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\055\001\000\000\062\001\000\000\000\000\000\000\000\000\162\000\ +\000\000\056\001\000\000\000\000\063\001\064\001\000\000\057\001\ +\058\001\059\001\060\001\061\001\012\000\000\000\000\000\065\001\ +\066\001\067\001\068\001\069\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\062\001\089\000\014\000\000\000\000\000\162\000\ +\000\000\071\001\000\000\000\000\063\001\064\001\000\000\000\000\ +\090\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\066\001\067\001\068\001\069\001\000\000\000\000\112\000\000\000\ +\113\000\114\000\028\000\029\000\115\000\000\000\000\000\116\000\ +\117\000\071\001\000\000\033\000\000\000\000\000\000\000\000\000\ +\000\000\091\000\000\000\000\000\000\000\000\000\000\000\039\000\ +\118\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\119\000\120\000\000\000\000\000\000\000\000\000\000\000\092\000\ +\121\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\093\000\122\000\123\000\050\000" + +let yycheck = "\003\000\ +\002\000\005\000\177\000\177\000\002\000\174\000\112\000\112\000\ +\255\000\185\000\115\000\008\000\112\000\139\000\105\001\061\002\ +\118\000\002\000\092\000\180\000\001\000\133\000\002\000\104\002\ +\233\002\221\001\104\002\114\000\002\000\002\003\104\000\002\000\ +\027\000\034\004\146\000\059\002\002\000\000\000\192\002\003\000\ +\150\001\002\000\002\000\196\000\116\003\198\000\001\000\245\003\ +\101\003\059\000\252\000\164\003\124\003\223\004\210\004\119\004\ +\009\000\008\001\203\004\000\000\198\002\000\000\043\000\121\001\ +\066\001\123\001\000\000\110\004\000\001\093\002\029\000\024\000\ +\019\001\229\002\033\000\027\001\214\004\090\001\022\001\006\001\ +\025\000\022\001\066\001\000\001\000\001\031\001\000\001\108\001\ +\043\000\042\000\092\000\178\000\094\001\000\001\092\000\079\001\ +\000\001\110\001\141\004\040\001\008\001\000\001\104\000\017\001\ +\059\000\037\001\104\000\092\000\112\000\029\001\027\001\115\000\ +\092\000\117\000\118\000\023\001\000\001\000\001\092\000\104\000\ +\067\001\092\000\030\001\120\000\104\000\078\000\092\000\080\000\ +\081\000\000\001\104\000\092\000\092\000\104\000\000\001\000\001\ +\140\000\141\000\104\000\143\000\029\005\092\001\094\001\104\000\ +\104\000\053\001\090\001\055\001\014\001\153\000\154\000\017\001\ +\034\005\117\000\036\003\012\004\022\001\065\001\201\004\066\001\ +\014\001\027\001\066\001\095\001\000\001\092\001\073\001\000\001\ +\000\001\073\001\115\000\004\000\176\000\177\000\091\001\091\001\ +\180\000\094\001\095\001\095\001\094\001\047\001\036\001\000\001\ +\000\001\000\001\019\001\094\001\088\005\000\001\094\001\104\001\ +\091\001\026\001\027\001\027\001\095\001\014\001\106\001\032\000\ +\017\001\109\001\000\001\162\000\163\000\024\001\008\001\091\001\ +\115\001\092\001\064\001\115\001\165\000\000\001\000\001\048\001\ +\049\001\087\001\008\001\000\001\000\001\037\001\000\001\094\001\ +\010\001\091\001\091\001\060\001\181\000\095\001\095\001\097\001\ +\098\001\055\003\067\001\068\001\154\001\070\001\003\001\026\005\ +\027\001\095\001\188\001\097\001\000\001\018\001\027\001\082\002\ +\035\005\115\001\132\003\133\005\093\001\000\000\070\004\109\001\ +\000\001\073\004\094\001\091\001\200\002\088\001\094\001\095\001\ +\161\001\114\001\163\001\000\001\109\001\000\001\000\001\185\005\ +\121\001\187\005\123\001\040\001\091\001\094\001\111\001\095\001\ +\095\001\130\001\131\001\094\001\000\001\112\001\105\001\133\001\ +\066\001\207\001\092\001\036\005\046\001\091\001\212\001\250\000\ +\145\001\252\000\106\005\101\002\000\001\241\002\092\001\149\001\ +\091\001\035\001\092\001\004\001\095\001\095\001\091\001\091\001\ +\201\005\094\001\095\001\000\001\094\001\000\001\000\001\092\001\ +\008\001\000\001\147\003\193\001\181\004\182\004\004\001\027\001\ +\025\001\059\001\008\001\000\001\031\001\023\002\064\001\065\001\ +\249\001\015\001\094\001\172\000\018\001\026\001\045\001\026\001\ +\074\001\000\001\179\000\046\001\230\003\000\001\094\001\000\001\ +\000\001\000\001\003\002\010\001\000\001\105\001\155\004\066\001\ +\000\001\094\001\010\001\094\001\221\004\000\001\114\001\004\001\ +\007\001\099\001\019\001\008\001\018\001\121\001\060\005\123\001\ +\092\001\026\001\015\001\109\001\000\001\018\001\130\001\131\001\ +\035\001\133\001\000\001\132\005\066\001\106\004\010\001\091\001\ +\089\001\090\001\000\001\095\001\093\001\145\001\000\001\096\001\ +\049\001\149\001\044\004\092\001\092\001\153\001\154\001\092\001\ +\059\001\092\001\092\001\060\001\247\002\064\001\065\001\094\001\ +\065\001\000\001\014\001\068\001\000\001\070\001\091\001\074\001\ +\067\001\243\001\027\001\010\001\015\001\066\001\178\001\179\001\ +\180\001\017\001\022\001\001\004\073\001\092\001\186\001\015\001\ +\095\001\130\001\131\001\015\001\092\001\092\001\092\001\095\001\ +\099\001\000\001\094\001\000\001\000\001\018\001\094\001\032\001\ +\018\001\092\001\109\001\207\001\208\001\040\003\111\001\040\001\ +\212\001\066\001\043\001\046\003\216\001\237\003\068\003\219\001\ +\092\001\074\005\017\001\095\001\113\001\000\001\092\001\027\001\ +\228\001\229\001\066\001\018\001\000\001\243\004\066\001\171\003\ +\094\001\188\001\018\001\004\001\094\001\070\001\066\001\243\001\ +\244\001\243\001\094\001\003\001\077\001\243\001\004\001\083\001\ +\065\001\253\001\008\001\094\001\101\002\092\001\000\000\003\002\ +\112\002\015\001\243\001\008\001\018\001\131\002\094\001\243\001\ +\228\001\229\001\014\002\113\002\114\002\243\001\011\002\092\001\ +\243\001\094\001\192\002\003\001\094\001\243\001\176\004\243\001\ +\000\001\030\001\243\001\243\001\091\001\043\005\091\001\091\001\ +\247\001\028\002\029\002\095\001\109\001\238\001\014\001\094\001\ +\014\001\017\001\022\001\000\001\135\003\092\001\022\001\094\001\ +\073\001\063\005\055\001\027\001\066\001\057\002\094\001\008\001\ +\091\001\233\002\233\002\233\002\065\001\217\004\019\001\091\001\ +\169\002\143\004\171\002\022\001\023\002\026\001\008\001\047\001\ +\000\001\026\002\014\001\000\001\167\003\030\001\082\002\004\001\ +\152\005\000\001\027\002\008\001\189\002\065\001\014\001\248\002\ +\002\001\014\001\015\001\048\001\030\001\018\001\027\001\054\002\ +\022\001\101\002\008\001\113\001\104\002\106\001\055\001\060\001\ +\109\001\079\001\110\002\111\002\065\001\113\002\114\002\068\001\ +\065\001\070\001\094\001\091\001\035\001\055\001\015\003\095\001\ +\017\003\097\001\098\001\127\002\121\002\065\001\036\001\065\001\ +\132\002\027\001\083\005\031\005\008\001\137\002\022\001\090\001\ +\022\001\065\001\066\001\115\001\059\001\066\001\042\005\147\002\ +\148\002\064\001\065\001\111\002\066\001\005\003\062\001\242\003\ +\066\001\106\001\111\001\074\001\109\001\244\002\249\003\047\001\ +\036\001\094\001\062\005\127\002\090\001\169\002\094\001\171\002\ +\106\001\094\001\001\003\109\001\176\002\137\002\027\001\035\001\ +\094\001\181\002\118\004\065\001\099\001\006\005\092\001\080\003\ +\006\005\189\002\190\002\019\001\192\002\035\001\109\001\182\003\ +\183\003\093\005\050\003\022\001\094\001\030\002\202\002\059\001\ +\008\001\027\001\052\003\052\003\000\001\065\001\000\000\000\001\ +\108\005\097\001\098\001\004\001\176\002\059\001\253\001\008\001\ +\092\001\049\001\064\003\065\001\201\002\039\003\015\001\253\001\ +\073\003\018\001\088\001\115\001\060\001\233\002\026\001\064\002\ +\065\002\152\003\152\003\057\005\068\001\059\005\070\001\179\004\ +\066\001\094\001\102\001\247\002\248\002\066\001\201\002\073\001\ +\094\001\109\001\112\001\111\001\073\001\255\002\000\001\195\004\ +\102\001\255\002\004\001\067\001\008\003\096\004\008\001\109\001\ +\010\001\111\001\004\001\094\001\014\001\015\001\008\001\008\001\ +\018\001\066\001\057\002\055\001\014\001\015\001\014\001\111\001\ +\018\001\027\001\003\001\057\002\064\001\150\005\151\005\000\001\ +\018\001\115\001\014\001\027\001\040\003\039\003\115\001\130\004\ +\236\004\039\003\046\003\014\001\008\003\094\001\207\003\044\003\ +\052\003\140\004\019\001\055\003\000\001\035\001\039\003\019\001\ +\027\001\026\001\000\001\039\003\064\003\090\001\047\001\060\003\ +\066\001\039\003\155\002\156\002\039\003\073\003\030\001\073\001\ +\066\001\039\003\067\001\079\003\112\001\059\001\039\003\039\003\ +\049\001\110\001\036\001\065\001\048\001\065\001\066\001\079\001\ +\177\002\091\001\092\001\060\001\094\001\095\001\215\005\055\001\ +\060\001\000\000\067\001\068\001\094\001\070\001\191\002\030\001\ +\068\001\065\001\070\001\072\000\079\001\055\001\000\001\113\001\ +\097\001\098\001\094\001\003\001\064\001\065\001\064\001\014\001\ +\102\001\014\001\064\001\065\001\064\001\129\003\044\004\109\001\ +\055\001\019\001\115\001\135\003\027\001\045\001\046\001\139\003\ +\026\001\102\000\065\001\000\000\022\001\095\001\111\001\147\003\ +\022\001\149\003\106\001\111\001\152\003\109\001\154\003\155\003\ +\156\003\058\004\200\005\159\003\160\003\097\001\048\001\049\001\ +\164\003\007\004\166\003\167\003\000\001\047\001\112\001\064\001\ +\065\001\109\001\060\001\083\001\065\001\066\001\178\003\139\003\ +\009\003\067\001\068\001\106\001\070\001\000\001\109\001\147\003\ +\079\001\189\003\035\004\065\001\100\001\022\003\095\004\014\001\ +\000\001\015\001\004\001\159\003\018\001\194\003\008\001\014\001\ +\019\001\037\001\074\001\207\003\027\001\015\001\000\001\026\001\ +\027\001\003\001\037\001\019\001\027\001\110\001\178\003\097\001\ +\098\001\027\001\026\001\013\001\014\001\111\001\064\001\017\001\ +\000\000\014\001\131\004\008\001\017\001\048\001\049\001\000\001\ +\026\001\027\001\028\001\029\001\108\001\064\001\242\003\105\001\ +\048\001\060\001\065\001\030\001\066\001\249\003\040\001\041\001\ +\067\001\068\001\065\001\070\001\060\001\001\004\000\001\097\001\ +\066\001\026\001\176\004\007\004\068\001\002\004\070\001\000\001\ +\012\004\135\004\060\001\109\001\055\001\063\001\000\001\065\001\ +\066\001\067\001\068\001\022\001\066\001\067\001\065\001\073\001\ +\074\001\147\001\019\001\073\001\022\001\000\001\080\001\035\004\ +\064\001\026\001\066\001\037\001\111\001\206\004\127\003\128\003\ +\044\004\045\004\092\001\075\001\094\001\049\004\096\001\111\001\ +\064\001\035\001\000\001\220\004\141\003\142\003\058\004\026\001\ +\049\001\014\001\108\001\148\003\010\001\111\001\065\001\106\001\ +\064\001\115\001\109\001\060\001\157\003\115\001\000\001\065\001\ +\064\001\059\001\243\004\068\001\067\005\070\001\064\001\065\001\ +\112\001\045\004\047\001\075\001\064\001\049\004\031\004\012\001\ +\074\001\019\001\090\001\095\004\096\004\109\001\098\004\028\001\ +\026\001\000\001\064\001\018\005\018\005\004\001\208\004\208\004\ +\108\004\008\001\031\001\010\001\208\004\109\001\110\001\014\001\ +\015\001\099\001\027\001\018\001\064\001\064\001\111\001\049\001\ +\112\001\064\001\100\001\109\001\027\001\050\001\130\004\131\004\ +\041\005\109\001\060\001\004\001\075\001\066\001\098\004\008\001\ +\140\004\067\001\068\001\143\004\070\001\074\001\015\001\109\001\ +\108\004\018\001\071\001\080\001\061\005\064\001\083\001\027\001\ +\037\001\066\001\027\001\159\004\053\001\064\001\055\001\084\001\ +\157\004\109\001\110\001\066\001\083\005\083\005\086\005\064\001\ +\065\001\112\001\073\001\094\001\176\004\035\001\064\001\040\001\ +\101\001\181\004\182\004\064\001\066\001\111\001\064\001\064\001\ +\064\001\189\004\109\001\110\001\091\001\092\001\066\001\094\001\ +\095\001\066\001\109\001\000\001\053\001\059\001\055\001\056\001\ +\090\001\066\001\109\001\065\001\208\004\209\004\210\004\088\001\ +\065\001\042\004\113\001\000\001\109\001\046\004\019\001\000\000\ +\082\002\221\004\051\004\223\004\110\001\026\001\022\001\109\001\ +\000\001\189\004\066\001\109\001\004\001\109\001\019\001\112\001\ +\008\001\073\001\010\001\068\004\069\004\026\001\014\001\064\001\ +\102\001\074\004\018\001\048\001\110\002\209\004\210\004\109\001\ +\027\001\064\001\254\004\027\001\109\001\035\001\094\001\060\001\ +\221\001\064\001\006\005\048\001\000\001\075\001\067\001\068\001\ +\027\001\070\001\099\004\067\001\016\005\035\001\018\005\060\001\ +\022\001\013\001\022\005\115\001\064\001\059\001\067\001\068\001\ +\064\001\070\001\064\001\065\001\109\001\238\001\026\001\066\001\ +\028\001\029\001\254\004\039\005\074\001\059\001\109\001\000\001\ +\004\001\073\001\112\001\065\001\008\001\041\001\109\001\066\001\ +\031\001\000\000\111\001\015\001\016\005\057\005\018\001\059\005\ +\018\001\230\002\022\005\091\001\092\001\099\001\094\001\095\001\ +\060\001\109\001\111\001\050\001\000\001\109\001\074\005\109\001\ +\068\001\246\002\027\002\039\005\037\001\250\002\074\001\083\005\ +\102\001\113\001\027\005\007\000\080\001\030\005\010\000\109\001\ +\177\004\013\000\014\000\027\001\000\000\017\000\018\000\019\000\ +\020\000\021\000\066\001\023\000\096\001\066\001\066\001\192\004\ +\193\004\037\001\030\000\066\001\025\003\113\005\034\000\064\001\ +\108\001\037\000\038\000\111\001\027\001\027\001\083\001\000\001\ +\124\005\086\002\046\000\047\000\083\001\247\002\050\000\051\000\ +\004\001\023\001\066\001\135\005\008\001\035\001\000\001\000\001\ +\081\005\082\005\091\001\084\005\085\005\066\001\018\001\108\001\ +\146\005\026\001\150\005\151\005\146\005\113\005\109\001\027\001\ +\156\005\157\005\019\001\066\001\066\001\059\001\083\001\031\001\ +\026\001\026\001\064\001\065\001\000\000\089\000\090\000\091\000\ +\000\001\093\000\066\001\135\005\074\001\071\001\040\003\179\005\ +\009\005\073\001\050\001\006\001\046\003\185\005\186\005\187\005\ +\049\001\004\001\084\001\191\005\005\000\008\001\066\001\022\001\ +\156\005\157\005\026\001\060\001\015\001\099\001\094\001\018\001\ +\166\003\125\000\064\001\068\001\066\001\070\001\004\001\109\001\ +\212\005\022\001\008\001\215\005\000\000\137\000\138\000\179\005\ +\047\001\221\005\222\005\115\001\018\001\095\001\186\005\189\003\ +\064\001\149\000\088\001\191\005\055\001\027\001\057\001\058\001\ +\059\001\000\001\061\001\075\001\000\001\064\001\065\001\022\001\ +\164\000\053\001\000\001\055\001\189\005\078\005\111\001\066\001\ +\212\005\173\000\112\001\091\001\064\001\065\001\199\005\019\001\ +\022\001\221\005\222\005\026\001\093\001\019\001\026\001\090\001\ +\047\001\210\005\211\005\232\002\026\001\135\003\097\001\004\001\ +\027\001\000\001\000\001\008\001\109\001\053\001\054\001\055\001\ +\056\001\047\001\109\001\110\001\048\001\000\000\251\002\120\005\ +\064\001\065\001\048\001\000\003\093\001\000\001\027\001\128\005\ +\060\001\109\001\164\003\026\001\026\001\167\003\060\001\067\001\ +\068\001\000\001\070\001\094\001\109\001\004\001\068\001\018\001\ +\070\001\008\001\023\003\010\001\022\001\016\001\095\001\014\001\ +\015\001\004\001\109\001\140\000\141\000\008\001\159\005\004\001\ +\027\001\253\000\254\000\008\001\027\001\109\001\040\001\018\001\ +\153\000\154\000\015\001\091\001\049\003\018\001\095\001\095\001\ +\027\001\178\005\000\001\111\001\000\001\065\001\027\001\019\001\ +\004\001\111\001\008\001\071\001\008\001\022\001\010\001\176\000\ +\064\001\065\001\014\001\000\001\065\001\033\001\018\001\071\001\ +\084\001\037\001\093\001\066\001\073\001\010\001\006\001\027\001\ +\242\003\000\001\073\001\014\001\084\001\214\005\017\001\249\003\ +\004\001\094\001\090\001\010\001\008\001\066\001\065\001\053\001\ +\027\001\055\001\014\001\015\001\091\001\092\001\018\001\094\001\ +\095\001\077\001\012\004\065\001\113\003\073\001\110\001\053\001\ +\076\001\055\001\053\001\079\001\055\001\081\001\066\001\083\001\ +\064\001\065\001\113\001\065\001\000\001\073\001\065\001\055\001\ +\004\001\057\001\058\001\059\001\008\001\061\001\010\001\003\001\ +\064\001\065\001\014\001\065\001\066\001\067\001\018\001\091\001\ +\092\001\055\001\094\001\095\001\112\001\059\001\066\001\027\001\ +\116\001\063\001\064\001\053\001\054\001\055\001\056\001\064\001\ +\065\001\000\000\090\001\168\003\169\003\113\001\064\001\065\001\ +\078\001\097\001\134\001\135\001\000\001\064\001\053\001\003\001\ +\055\001\016\001\055\001\184\003\064\001\109\001\110\001\022\001\ +\227\001\013\001\065\001\064\001\027\001\092\001\096\004\234\001\ +\197\003\053\001\013\001\055\001\160\001\073\001\026\001\109\001\ +\028\001\029\001\008\001\167\001\000\001\065\001\014\001\171\001\ +\213\003\028\001\029\001\109\001\040\001\041\001\010\001\091\001\ +\092\001\095\001\094\001\095\001\184\001\185\001\041\001\065\001\ +\130\004\189\001\036\001\191\001\064\001\065\001\073\001\073\001\ +\060\001\014\001\140\004\063\001\022\001\113\001\109\001\244\003\ +\068\001\060\001\206\001\090\001\063\001\000\001\074\001\022\001\ +\003\001\068\001\065\001\066\001\080\001\159\004\218\001\074\001\ +\220\001\221\001\013\001\066\001\067\001\080\001\017\001\014\001\ +\092\001\064\001\065\001\022\001\096\001\210\001\211\001\026\001\ +\027\001\028\001\029\001\181\004\182\004\096\001\095\001\008\001\ +\108\001\130\001\131\001\111\001\000\000\000\001\041\001\251\001\ +\037\004\108\001\095\001\055\001\111\001\004\001\023\001\059\001\ +\153\001\008\001\112\001\063\001\064\001\030\001\092\001\103\001\ +\015\001\060\001\014\001\018\001\063\001\022\001\065\001\066\001\ +\067\001\068\001\078\001\221\004\027\001\223\004\073\001\074\001\ +\027\001\178\001\179\001\180\001\053\001\080\001\055\001\092\001\ +\091\001\186\001\092\001\237\004\238\004\109\001\000\000\092\001\ +\065\001\092\001\094\001\094\001\055\001\096\001\057\001\058\001\ +\059\001\109\001\061\001\094\001\092\001\064\001\065\001\014\001\ +\101\004\108\001\103\004\066\001\111\001\115\001\020\001\216\001\ +\115\001\109\001\115\001\064\001\065\001\046\001\081\001\109\001\ +\109\001\062\001\071\001\108\001\002\001\081\002\089\001\090\001\ +\084\002\106\001\086\002\109\001\109\001\109\001\097\001\084\001\ +\073\001\073\001\100\001\244\001\137\004\090\001\027\001\109\001\ +\015\001\142\004\109\001\110\001\001\000\002\000\003\000\004\000\ +\005\000\092\001\055\001\000\001\094\001\064\001\064\001\008\001\ +\109\001\110\001\065\001\109\001\040\001\014\002\001\001\002\001\ +\124\002\000\001\167\004\014\001\018\001\004\001\009\001\062\001\ +\074\005\008\001\062\001\010\001\015\001\016\001\062\001\014\001\ +\092\001\027\001\142\002\064\001\144\002\094\001\146\002\079\001\ +\027\001\014\001\150\002\014\001\027\001\006\001\094\001\073\001\ +\109\001\036\001\199\004\200\004\095\001\064\001\075\001\042\001\ +\043\001\044\001\045\001\046\001\073\001\111\005\022\001\094\001\ +\172\002\092\001\014\001\073\001\027\001\218\004\006\001\040\001\ +\008\001\222\004\061\001\094\001\027\001\014\001\027\001\066\001\ +\021\001\086\001\064\001\062\001\071\001\072\001\194\002\062\001\ +\062\001\003\001\073\001\199\002\200\002\014\001\062\001\082\001\ +\083\001\084\001\085\001\086\001\062\001\086\001\210\002\095\001\ +\212\002\027\001\090\001\073\001\091\001\092\001\003\005\094\001\ +\095\001\100\001\091\001\223\002\224\002\027\001\094\001\055\001\ +\101\001\057\001\058\001\059\001\094\001\061\001\234\002\094\001\ +\064\001\065\001\113\001\132\002\088\001\241\002\027\001\185\005\ +\094\001\187\005\014\001\020\001\000\001\015\001\022\001\003\001\ +\252\002\053\001\147\002\148\002\094\001\008\001\043\005\062\001\ +\080\001\013\001\090\001\062\001\092\001\062\001\051\005\094\001\ +\112\001\097\001\112\001\094\001\088\001\065\001\026\001\019\003\ +\028\001\029\001\063\005\021\001\091\001\109\001\110\001\095\001\ +\094\001\014\001\014\001\014\001\181\002\041\001\014\001\027\001\ +\027\001\037\003\019\001\091\001\022\001\112\001\000\001\088\001\ +\014\001\003\001\014\001\014\001\014\001\000\000\000\000\008\001\ +\060\001\092\001\065\001\013\001\092\001\036\001\109\001\017\001\ +\068\001\036\001\062\003\109\001\022\001\065\003\074\001\067\003\ +\026\001\027\001\028\001\029\001\080\001\005\000\006\001\036\001\ +\008\001\064\001\078\003\092\001\092\001\090\001\082\003\041\001\ +\092\001\040\001\064\001\036\001\096\001\089\003\094\001\053\001\ +\024\000\093\003\053\001\064\001\091\001\026\003\000\000\064\001\ +\108\001\064\001\060\001\111\001\064\001\063\001\036\003\065\001\ +\066\001\067\001\068\001\111\003\064\001\064\001\114\003\073\001\ +\074\001\064\001\118\003\186\005\254\004\111\005\080\001\055\001\ +\187\002\057\001\058\001\059\001\120\003\061\001\171\005\026\002\ +\064\001\065\001\092\001\131\002\094\001\000\001\096\001\018\005\ +\096\001\094\001\129\003\143\003\187\001\057\002\063\002\141\000\ +\183\001\166\004\108\001\212\003\155\004\111\001\195\005\196\005\ +\171\002\115\001\090\001\145\001\108\001\006\005\203\005\243\004\ +\255\255\097\001\043\005\136\004\255\255\255\255\170\003\171\003\ +\255\255\255\255\255\255\255\255\255\255\109\001\110\001\220\005\ +\180\003\181\003\255\255\255\255\255\255\015\001\079\003\255\255\ +\255\255\121\000\255\255\255\255\055\001\255\255\057\001\058\001\ +\059\001\197\003\061\001\255\255\255\255\064\001\065\001\255\255\ +\255\255\255\255\255\255\139\000\140\000\141\000\255\255\143\000\ +\064\001\065\001\044\001\045\001\046\001\255\255\081\001\071\001\ +\255\255\153\000\154\000\255\255\255\255\077\001\089\001\090\001\ +\255\255\255\255\255\255\255\255\084\001\233\003\097\001\235\003\ +\129\003\255\255\090\001\255\255\255\255\071\001\072\001\243\003\ +\176\000\177\000\109\001\110\001\180\000\255\255\255\255\255\255\ +\252\003\083\001\084\001\085\001\086\001\109\001\110\001\255\255\ +\255\255\154\003\155\003\156\003\255\255\009\004\255\255\160\003\ +\255\255\255\255\100\001\255\255\255\255\166\003\255\255\255\255\ +\255\255\255\255\255\255\007\000\255\255\255\255\010\000\255\255\ +\255\255\013\000\014\000\255\255\255\255\017\000\018\000\019\000\ +\020\000\021\000\255\255\023\000\189\003\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\034\000\255\255\ +\255\255\037\000\038\000\255\255\255\255\255\255\255\255\255\255\ +\255\255\061\004\046\000\047\000\064\004\255\255\050\000\051\000\ +\055\001\255\255\057\001\058\001\059\001\255\255\061\001\255\255\ +\255\255\064\001\065\001\255\255\255\255\081\004\255\255\083\004\ +\255\255\085\004\255\255\087\004\088\004\255\255\255\255\255\255\ +\092\004\255\255\255\255\255\255\255\255\097\004\000\001\255\255\ +\100\004\003\001\102\004\090\001\255\255\089\000\090\000\091\000\ +\255\255\093\000\097\001\013\001\014\001\255\255\255\255\017\001\ +\255\255\255\255\118\004\255\255\255\255\255\255\109\001\110\001\ +\026\001\027\001\028\001\029\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\013\001\137\004\040\001\041\001\ +\255\255\255\255\142\004\255\255\255\255\255\255\255\255\255\255\ +\255\255\149\004\255\255\028\001\029\001\137\000\138\000\087\001\ +\255\255\255\255\060\001\255\255\255\255\063\001\255\255\255\255\ +\041\001\067\001\068\001\255\255\255\255\255\255\170\004\073\001\ +\074\001\255\255\174\004\255\255\255\255\255\255\080\001\179\004\ +\255\255\255\255\255\255\060\001\255\255\255\255\255\255\255\255\ +\255\255\173\000\092\001\068\001\094\001\255\255\096\001\195\004\ +\196\004\074\001\198\004\255\255\255\255\255\255\255\255\080\001\ +\255\255\255\255\108\001\000\001\255\255\111\001\255\255\255\255\ +\212\004\115\001\255\255\255\255\255\255\255\255\150\001\096\001\ +\255\255\153\001\154\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\108\001\255\255\255\255\111\001\235\004\ +\236\004\255\255\255\255\255\255\255\255\255\255\242\004\255\255\ +\255\255\255\255\178\001\179\001\180\001\255\255\255\255\255\255\ +\255\255\255\255\186\001\255\255\255\255\001\005\255\255\003\005\ +\255\255\193\001\055\001\255\255\057\001\058\001\059\001\255\255\ +\061\001\253\000\254\000\064\001\065\001\017\005\255\255\207\001\ +\208\001\255\255\255\255\255\255\212\001\255\255\255\255\255\255\ +\216\001\000\000\255\255\219\001\081\001\033\005\255\255\019\001\ +\255\255\255\255\038\005\227\001\089\001\090\001\255\255\255\255\ +\255\255\255\255\234\001\255\255\097\001\033\001\000\000\051\005\ +\255\255\037\001\255\255\255\255\244\001\255\255\255\255\108\001\ +\109\001\110\001\255\255\255\255\255\255\253\001\255\255\255\255\ +\023\001\255\255\255\255\003\002\072\005\255\255\255\255\255\255\ +\255\255\077\005\255\255\255\255\080\005\036\001\014\002\255\255\ +\255\255\017\002\255\255\087\005\255\255\255\255\255\255\091\005\ +\255\255\255\255\026\002\095\005\255\255\255\255\255\255\255\255\ +\055\001\255\255\057\001\058\001\059\001\255\255\061\001\255\255\ +\255\255\064\001\065\001\255\255\112\005\255\255\255\255\005\000\ +\255\255\255\255\255\255\009\000\255\255\255\255\255\255\255\255\ +\255\255\057\002\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\024\000\090\001\255\255\137\005\138\005\255\255\ +\255\255\255\255\097\001\143\005\255\255\255\255\255\255\147\005\ +\255\255\255\255\134\001\255\255\042\000\153\005\109\001\110\001\ +\255\255\255\255\255\255\255\255\255\255\161\005\162\005\255\255\ +\255\255\255\255\255\255\167\005\168\005\169\005\170\005\255\255\ +\005\000\006\001\007\001\255\255\255\255\015\001\011\001\012\001\ +\180\005\181\005\255\255\167\001\255\255\255\255\255\255\255\255\ +\078\000\255\255\080\000\081\000\255\255\193\005\194\005\255\255\ +\196\005\030\001\031\001\131\002\132\002\255\255\255\255\255\255\ +\204\005\043\001\044\001\045\001\046\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\147\002\148\002\050\001\218\005\000\000\ +\053\001\054\001\055\001\056\001\224\005\225\005\059\001\255\255\ +\066\001\255\255\255\255\064\001\065\001\071\001\072\001\255\255\ +\255\255\255\255\170\002\255\255\255\255\255\255\255\255\255\255\ +\255\255\083\001\084\001\085\001\086\001\181\002\140\000\141\000\ +\255\255\143\000\087\001\255\255\255\255\255\255\190\002\255\255\ +\192\002\255\255\100\001\153\000\154\000\255\255\255\255\251\001\ +\101\001\255\255\202\002\255\255\255\255\106\001\255\255\165\000\ +\109\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\000\001\176\000\177\000\003\001\255\255\255\255\181\000\ +\255\255\255\255\255\255\255\255\255\255\255\255\013\001\231\002\ +\255\255\233\002\017\001\255\255\255\255\255\255\000\001\140\000\ +\141\000\003\001\143\000\026\001\027\001\028\001\029\001\255\255\ +\248\002\255\255\255\255\013\001\153\000\154\000\255\255\255\255\ +\255\255\255\255\041\001\255\255\255\255\255\255\255\255\255\255\ +\026\001\255\255\028\001\029\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\175\000\176\000\177\000\060\001\040\001\041\001\ +\063\001\255\255\255\255\066\001\067\001\068\001\255\255\255\255\ +\255\255\005\000\073\001\074\001\255\255\009\000\255\255\255\255\ +\255\255\080\001\060\001\255\255\255\255\063\001\004\001\047\003\ +\255\255\067\001\068\001\255\255\024\000\092\001\255\255\094\001\ +\074\001\096\001\255\255\255\255\255\255\255\255\080\001\255\255\ +\255\255\255\255\255\255\025\001\068\003\108\001\042\000\255\255\ +\111\001\255\255\092\001\255\255\115\001\255\255\096\001\079\003\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\108\001\255\255\255\255\111\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\078\000\255\255\080\000\081\000\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\129\003\255\255\089\001\090\001\255\255\255\255\093\001\ +\255\255\000\000\096\001\255\255\112\000\042\001\255\255\255\255\ +\255\255\255\255\255\255\048\001\255\255\149\003\255\255\000\001\ +\152\003\255\255\154\003\155\003\156\003\255\255\255\255\008\001\ +\160\003\255\255\255\255\255\255\013\001\255\255\166\003\255\255\ +\140\000\141\000\255\255\143\000\255\255\255\255\255\255\255\255\ +\255\255\026\001\255\255\028\001\029\001\153\000\154\000\255\255\ +\255\255\255\255\255\255\255\255\255\255\189\003\255\255\255\255\ +\041\001\165\000\255\255\153\001\154\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\176\000\177\000\255\255\207\003\ +\000\001\181\000\255\255\060\001\255\255\255\255\063\001\255\255\ +\255\255\066\001\067\001\068\001\178\001\179\001\180\001\019\003\ +\255\255\074\001\255\255\255\255\186\001\255\255\255\255\080\001\ +\255\255\255\255\255\255\255\255\236\003\255\255\255\255\255\255\ +\255\255\255\255\255\255\092\001\255\255\255\255\255\255\096\001\ +\255\255\207\001\208\001\255\255\153\001\154\001\212\001\255\255\ +\255\255\255\255\216\001\108\001\255\255\255\255\111\001\055\001\ +\255\255\057\001\058\001\059\001\255\255\061\001\255\255\255\255\ +\064\001\065\001\255\255\255\255\177\001\178\001\179\001\180\001\ +\255\255\008\001\255\255\255\255\255\255\186\001\244\001\255\255\ +\004\001\081\001\255\255\255\255\255\255\255\255\255\255\253\001\ +\023\001\089\001\090\001\000\000\044\004\255\255\255\255\030\001\ +\255\255\097\001\207\001\208\001\255\255\025\001\255\255\212\001\ +\014\002\255\255\058\004\216\001\255\255\109\001\110\001\255\255\ +\255\255\255\255\255\255\255\255\026\002\226\001\255\255\255\255\ +\055\001\000\000\057\001\058\001\059\001\255\255\061\001\255\255\ +\255\255\064\001\065\001\255\255\255\255\255\255\255\255\244\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\095\004\ +\253\001\255\255\081\001\057\002\255\255\255\255\255\255\255\255\ +\255\255\088\001\089\001\090\001\255\255\255\255\255\255\255\255\ +\255\255\014\002\097\001\255\255\255\255\089\001\090\001\255\255\ +\255\255\093\001\005\000\106\001\096\001\255\255\109\001\110\001\ +\255\255\255\255\255\255\131\004\255\255\255\255\255\255\135\004\ +\255\255\000\001\255\255\255\255\003\001\255\255\114\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\121\001\013\001\123\001\ +\255\255\255\255\255\255\255\255\057\002\255\255\255\255\255\255\ +\255\255\255\255\255\255\026\001\255\255\028\001\029\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\132\002\255\255\ +\176\004\040\001\041\001\255\255\255\255\153\001\154\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\147\002\148\002\255\255\ +\255\255\255\255\255\255\255\255\255\255\060\001\255\255\255\255\ +\063\001\255\255\255\255\255\255\067\001\068\001\178\001\179\001\ +\180\001\255\255\255\255\074\001\170\002\255\255\186\001\255\255\ +\255\255\080\001\255\255\255\255\255\255\255\255\255\255\181\002\ +\255\255\255\255\255\255\255\255\255\255\092\001\255\255\132\002\ +\190\002\096\001\192\002\207\001\208\001\255\255\255\255\255\255\ +\212\001\255\255\255\255\255\255\216\001\108\001\147\002\148\002\ +\111\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\140\000\141\000\255\255\143\000\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\153\000\154\000\ +\244\001\255\255\018\005\233\002\255\255\255\255\255\255\255\255\ +\181\002\253\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\190\002\255\255\192\002\255\255\176\000\177\000\255\255\ +\255\255\255\255\014\002\000\001\255\255\002\001\003\001\004\001\ +\255\255\255\255\255\255\008\001\255\255\255\255\026\002\255\255\ +\013\001\255\255\255\255\255\255\017\001\018\001\019\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\026\001\027\001\028\001\ +\029\001\000\001\255\255\255\255\233\002\255\255\255\255\036\001\ +\255\255\255\255\255\255\083\005\041\001\057\002\013\001\255\255\ +\255\255\255\255\255\255\048\001\049\001\000\000\094\005\255\255\ +\255\255\255\255\255\255\026\001\255\255\028\001\029\001\060\001\ +\255\255\255\255\063\001\064\001\255\255\066\001\067\001\068\001\ +\255\255\070\001\041\001\255\255\073\001\074\001\255\255\255\255\ +\255\255\079\003\255\255\080\001\255\255\255\255\255\255\255\255\ +\255\255\101\002\255\255\255\255\255\255\060\001\091\001\092\001\ +\136\005\094\001\095\001\096\001\097\001\068\001\142\005\100\001\ +\255\255\255\255\255\255\074\001\255\255\255\255\255\255\108\001\ +\109\001\080\001\111\001\255\255\255\255\255\255\115\001\255\255\ +\132\002\255\255\255\255\076\001\255\255\092\001\079\001\255\255\ +\081\001\096\001\083\001\129\003\255\255\255\255\255\255\147\002\ +\148\002\255\255\079\003\255\255\255\255\108\001\255\255\255\255\ +\111\001\255\255\255\255\255\255\255\255\255\255\255\255\149\003\ +\255\255\255\255\152\003\255\255\154\003\155\003\156\003\112\001\ +\026\000\027\000\160\003\116\001\255\255\255\255\255\255\255\255\ +\166\003\181\002\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\190\002\255\255\192\002\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\129\003\255\255\255\255\189\003\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\149\003\255\255\255\255\152\003\153\003\154\003\155\003\156\003\ +\082\000\083\000\255\255\160\003\255\255\233\002\255\255\000\001\ +\255\255\166\003\255\255\255\255\255\255\006\001\153\001\154\001\ +\255\255\255\255\000\000\012\001\189\001\255\255\191\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\189\003\255\255\255\255\028\001\255\255\030\001\031\001\178\001\ +\179\001\180\001\255\255\255\255\255\255\255\255\255\255\186\001\ +\187\001\218\001\255\255\220\001\255\255\255\255\255\255\255\255\ +\255\255\050\001\255\255\052\001\053\001\255\255\055\001\056\001\ +\255\255\255\255\059\001\255\255\207\001\208\001\255\255\064\001\ +\065\001\212\001\255\255\255\255\255\255\216\001\071\001\255\255\ +\052\003\255\255\255\255\255\255\255\255\057\003\044\004\255\255\ +\255\255\255\255\255\255\084\001\255\255\000\001\255\255\255\255\ +\003\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\097\001\244\001\013\001\079\003\101\001\255\255\017\001\255\255\ +\255\255\106\001\253\001\255\255\109\001\110\001\255\255\026\001\ +\027\001\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\014\002\255\255\255\255\041\001\255\255\ +\255\255\255\255\255\255\000\000\255\255\255\255\255\255\044\004\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\060\001\255\255\255\255\063\001\129\003\255\255\066\001\ +\067\001\068\001\255\255\255\255\255\255\255\255\073\001\074\001\ +\081\002\255\255\255\255\084\002\255\255\080\001\057\002\255\255\ +\255\255\149\003\255\255\255\255\152\003\255\255\154\003\155\003\ +\156\003\092\001\255\255\094\001\160\003\096\001\255\255\255\255\ +\255\255\255\255\166\003\255\255\255\255\255\255\255\255\255\255\ +\255\255\108\001\255\255\255\255\111\001\255\255\255\255\255\255\ +\115\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\189\003\176\004\255\255\255\255\255\255\255\255\049\001\ +\050\001\051\001\052\001\053\001\054\001\055\001\056\001\057\001\ +\058\001\059\001\060\001\061\001\062\001\063\001\064\001\065\001\ +\066\001\067\001\068\001\069\001\255\255\071\001\255\255\255\255\ +\255\255\132\002\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\172\002\086\001\255\255\000\000\255\255\ +\147\002\148\002\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\099\001\000\001\176\004\002\001\003\001\004\001\255\255\ +\255\255\255\255\008\001\255\003\255\255\255\255\199\002\013\001\ +\255\255\255\255\255\255\017\001\018\001\019\001\255\255\255\255\ +\255\255\255\255\181\002\255\255\026\001\027\001\028\001\029\001\ +\255\255\255\255\255\255\190\002\255\255\192\002\036\001\255\255\ +\255\255\255\255\040\001\041\001\018\005\255\255\255\255\255\255\ +\255\255\255\255\048\001\049\001\255\255\255\255\255\255\255\255\ +\044\004\255\255\255\255\255\255\255\255\255\255\060\001\255\255\ +\255\255\063\001\255\255\255\255\066\001\067\001\068\001\255\255\ +\070\001\255\255\255\255\073\001\074\001\255\255\233\002\255\255\ +\000\000\255\255\080\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\091\001\092\001\255\255\ +\094\001\095\001\096\001\255\255\255\255\018\005\100\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\083\005\108\001\255\255\ +\255\255\111\001\255\255\255\255\255\255\115\001\255\255\255\255\ +\094\005\255\255\255\255\000\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\008\001\255\255\062\003\255\255\255\255\ +\013\001\235\001\255\255\255\255\255\255\255\255\240\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\026\001\255\255\028\001\ +\029\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\136\005\255\255\041\001\255\255\083\005\053\001\ +\255\255\055\001\255\255\057\001\058\001\059\001\255\255\061\001\ +\255\255\255\255\064\001\065\001\079\003\255\255\111\003\060\001\ +\255\255\255\255\028\002\029\002\176\004\066\001\067\001\068\001\ +\255\255\255\255\255\255\255\255\255\255\074\001\000\000\255\255\ +\255\255\255\255\255\255\080\001\090\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\097\001\255\255\255\255\143\003\092\001\ +\255\255\255\255\255\255\096\001\208\004\063\002\255\255\109\001\ +\110\001\255\255\068\002\069\002\070\002\255\255\129\003\108\001\ +\255\255\255\255\111\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\000\001\255\255\ +\002\001\003\001\149\003\180\003\181\003\152\003\008\001\154\003\ +\155\003\156\003\255\255\013\001\255\255\160\003\255\255\017\001\ +\018\001\019\001\255\255\166\003\255\255\255\255\255\255\255\255\ +\026\001\027\001\028\001\029\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\036\001\255\255\255\255\255\255\018\005\041\001\ +\255\255\255\255\189\003\255\255\255\255\255\255\048\001\049\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\233\003\255\255\060\001\255\255\255\255\063\001\255\255\255\255\ +\066\001\067\001\068\001\255\255\070\001\159\002\160\002\161\002\ +\074\001\255\255\255\255\252\003\255\255\255\255\080\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\000\000\ +\000\001\091\001\092\001\003\001\094\001\095\001\096\001\255\255\ +\255\255\255\255\255\255\023\001\255\255\013\001\255\255\083\005\ +\255\255\017\001\108\001\197\002\255\255\111\001\255\255\255\255\ +\036\001\115\001\026\001\027\001\028\001\029\001\255\255\255\255\ +\255\255\255\255\255\255\213\002\255\255\255\255\255\255\255\255\ +\255\255\041\001\255\255\055\001\255\255\057\001\058\001\059\001\ +\255\255\061\001\255\255\255\255\064\001\065\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\060\001\255\255\255\255\063\001\ +\255\255\044\004\066\001\067\001\068\001\255\255\255\255\255\255\ +\255\255\073\001\074\001\255\255\255\255\255\255\090\001\255\255\ +\080\001\255\255\255\255\000\000\255\255\097\001\255\255\255\255\ +\255\255\255\255\255\255\100\004\092\001\102\004\094\001\255\255\ +\096\001\109\001\110\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\108\001\255\255\032\003\111\001\ +\255\255\255\255\255\255\115\001\255\255\255\255\000\001\001\001\ +\002\001\003\001\255\255\255\255\006\001\007\001\008\001\009\001\ +\010\001\011\001\012\001\013\001\014\001\015\001\016\001\017\001\ +\018\001\019\001\020\001\021\001\149\004\255\255\024\001\025\001\ +\026\001\027\001\028\001\029\001\030\001\031\001\255\255\255\255\ +\255\255\255\255\036\001\037\001\255\255\255\255\040\001\041\001\ +\042\001\043\001\044\001\045\001\046\001\047\001\255\255\049\001\ +\050\001\051\001\255\255\053\001\054\001\055\001\056\001\255\255\ +\255\255\059\001\060\001\061\001\255\255\063\001\064\001\065\001\ +\066\001\067\001\068\001\255\255\070\001\071\001\072\001\073\001\ +\074\001\255\255\255\255\255\255\255\255\176\004\080\001\081\001\ +\082\001\083\001\084\001\085\001\086\001\087\001\255\255\089\001\ +\000\000\091\001\092\001\133\003\094\001\095\001\096\001\097\001\ +\098\001\255\255\100\001\101\001\255\255\103\001\104\001\105\001\ +\106\001\255\255\108\001\109\001\255\255\111\001\255\255\255\255\ +\255\255\115\001\255\255\055\001\255\255\057\001\058\001\059\001\ +\255\255\061\001\255\255\255\255\064\001\065\001\255\255\255\255\ +\001\005\255\255\255\255\255\255\255\255\255\255\074\001\000\001\ +\255\255\002\001\003\001\004\001\255\255\081\001\255\255\008\001\ +\255\255\255\255\255\255\255\255\013\001\089\001\090\001\255\255\ +\017\001\018\001\019\001\255\255\255\255\097\001\255\255\255\255\ +\255\255\026\001\027\001\028\001\029\001\038\005\255\255\255\255\ +\255\255\109\001\110\001\036\001\255\255\255\255\255\255\018\005\ +\041\001\255\255\220\003\221\003\222\003\255\255\255\255\048\001\ +\049\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\060\001\255\255\255\255\063\001\072\005\ +\255\255\066\001\067\001\068\001\255\255\070\001\255\255\255\255\ +\073\001\074\001\255\255\255\255\255\255\255\255\087\005\080\001\ +\255\255\023\001\255\255\000\001\255\255\255\255\095\005\255\255\ +\255\255\255\255\091\001\092\001\255\255\094\001\095\001\096\001\ +\013\001\000\000\020\004\021\004\022\004\255\255\255\255\112\005\ +\083\005\255\255\255\255\108\001\255\255\026\001\111\001\028\001\ +\029\001\055\001\115\001\057\001\058\001\059\001\255\255\061\001\ +\255\255\255\255\064\001\065\001\041\001\255\255\255\255\255\255\ +\137\005\138\005\055\001\255\255\057\001\058\001\059\001\057\004\ +\061\001\255\255\147\005\064\001\065\001\255\255\255\255\060\001\ +\255\255\255\255\063\001\255\255\090\001\066\001\067\001\068\001\ +\255\255\162\005\255\255\097\001\081\001\074\001\167\005\168\005\ +\169\005\170\005\255\255\080\001\089\001\090\001\255\255\109\001\ +\110\001\255\255\255\255\255\255\097\001\255\255\255\255\092\001\ +\255\255\255\255\255\255\096\001\255\255\255\255\255\255\108\001\ +\109\001\110\001\255\255\255\255\255\255\255\255\255\255\108\001\ +\255\255\255\255\111\001\255\255\255\255\255\255\255\255\255\255\ +\122\004\123\004\255\255\255\255\255\255\127\004\128\004\129\004\ +\000\001\001\001\002\001\003\001\255\255\000\000\006\001\007\001\ +\008\001\009\001\010\001\011\001\012\001\013\001\014\001\015\001\ +\016\001\017\001\018\001\019\001\020\001\021\001\022\001\255\255\ +\024\001\025\001\026\001\027\001\028\001\029\001\030\001\031\001\ +\255\255\255\255\255\255\255\255\036\001\037\001\255\255\255\255\ +\040\001\041\001\042\001\043\001\044\001\045\001\046\001\047\001\ +\255\255\049\001\050\001\051\001\255\255\053\001\054\001\055\001\ +\056\001\255\255\255\255\059\001\060\001\061\001\062\001\063\001\ +\064\001\065\001\066\001\067\001\068\001\255\255\070\001\071\001\ +\072\001\073\001\074\001\255\255\255\255\255\255\255\255\255\255\ +\080\001\081\001\082\001\083\001\084\001\085\001\086\001\087\001\ +\255\255\089\001\255\255\091\001\092\001\255\255\094\001\095\001\ +\096\001\097\001\098\001\255\255\100\001\101\001\255\255\103\001\ +\104\001\105\001\106\001\255\255\108\001\109\001\255\255\111\001\ +\255\255\255\255\255\255\115\001\255\255\255\255\255\255\255\255\ +\255\255\000\000\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\000\001\001\001\002\001\003\001\255\255\255\255\006\001\ +\007\001\008\001\009\001\010\001\011\001\012\001\013\001\014\001\ +\015\001\016\001\017\001\018\001\019\001\020\001\021\001\022\001\ +\255\255\024\001\025\001\026\001\027\001\028\001\029\001\030\001\ +\031\001\255\255\052\005\053\005\054\005\036\001\037\001\255\255\ +\255\255\040\001\041\001\042\001\043\001\044\001\045\001\046\001\ +\047\001\255\255\049\001\050\001\051\001\255\255\053\001\054\001\ +\055\001\056\001\255\255\255\255\059\001\060\001\061\001\255\255\ +\063\001\064\001\065\001\066\001\067\001\068\001\255\255\070\001\ +\071\001\072\001\073\001\074\001\255\255\255\255\255\255\255\255\ +\255\255\080\001\081\001\082\001\083\001\084\001\085\001\086\001\ +\087\001\255\255\089\001\255\255\091\001\092\001\000\000\094\001\ +\095\001\096\001\097\001\098\001\255\255\100\001\101\001\255\255\ +\103\001\104\001\105\001\106\001\255\255\108\001\109\001\255\255\ +\111\001\255\255\255\255\255\255\115\001\000\001\001\001\002\001\ +\003\001\255\255\255\255\006\001\007\001\008\001\009\001\010\001\ +\011\001\012\001\013\001\014\001\015\001\016\001\017\001\018\001\ +\019\001\020\001\021\001\022\001\255\255\024\001\025\001\026\001\ +\027\001\028\001\029\001\030\001\031\001\255\255\255\255\255\255\ +\255\255\036\001\037\001\255\255\255\255\040\001\041\001\042\001\ +\043\001\044\001\045\001\046\001\047\001\255\255\049\001\050\001\ +\051\001\255\255\053\001\054\001\055\001\056\001\255\255\255\255\ +\059\001\060\001\061\001\255\255\063\001\064\001\065\001\066\001\ +\067\001\068\001\255\255\070\001\071\001\072\001\073\001\074\001\ +\255\255\255\255\255\255\255\255\255\255\080\001\081\001\082\001\ +\083\001\084\001\085\001\086\001\087\001\255\255\089\001\255\255\ +\091\001\092\001\000\000\094\001\095\001\096\001\097\001\098\001\ +\255\255\100\001\101\001\255\255\103\001\104\001\105\001\106\001\ +\255\255\108\001\109\001\255\255\111\001\255\255\255\255\255\255\ +\115\001\000\001\001\001\002\001\003\001\255\255\255\255\006\001\ +\007\001\008\001\009\001\010\001\011\001\012\001\013\001\014\001\ +\015\001\016\001\017\001\018\001\019\001\020\001\021\001\022\001\ +\255\255\024\001\025\001\026\001\027\001\028\001\029\001\030\001\ +\031\001\255\255\255\255\255\255\255\255\036\001\037\001\255\255\ +\255\255\040\001\041\001\042\001\043\001\044\001\045\001\046\001\ +\047\001\255\255\049\001\050\001\051\001\255\255\053\001\054\001\ +\055\001\056\001\255\255\255\255\059\001\060\001\061\001\255\255\ +\063\001\064\001\065\001\066\001\067\001\068\001\255\255\070\001\ +\071\001\072\001\073\001\074\001\255\255\255\255\255\255\255\255\ +\255\255\080\001\081\001\082\001\083\001\084\001\085\001\086\001\ +\087\001\255\255\089\001\255\255\091\001\092\001\000\000\094\001\ +\095\001\096\001\097\001\098\001\255\255\100\001\101\001\255\255\ +\103\001\104\001\105\001\106\001\255\255\108\001\109\001\255\255\ +\111\001\255\255\255\255\255\255\115\001\255\255\000\001\001\001\ +\002\001\003\001\255\255\255\255\006\001\007\001\008\001\009\001\ +\010\001\011\001\012\001\013\001\014\001\015\001\016\001\017\001\ +\018\001\019\001\020\001\021\001\022\001\255\255\024\001\025\001\ +\026\001\027\001\028\001\029\001\030\001\031\001\255\255\255\255\ +\255\255\255\255\036\001\037\001\255\255\255\255\040\001\041\001\ +\042\001\043\001\044\001\045\001\046\001\047\001\255\255\049\001\ +\050\001\051\001\255\255\053\001\054\001\055\001\056\001\255\255\ +\255\255\059\001\060\001\061\001\255\255\063\001\064\001\065\001\ +\066\001\067\001\068\001\255\255\070\001\071\001\072\001\073\001\ +\074\001\255\255\255\255\255\255\255\255\255\255\080\001\081\001\ +\082\001\083\001\084\001\085\001\086\001\087\001\255\255\089\001\ +\255\255\091\001\092\001\000\000\094\001\095\001\096\001\097\001\ +\098\001\255\255\100\001\101\001\255\255\103\001\104\001\105\001\ +\106\001\255\255\108\001\109\001\255\255\111\001\255\255\255\255\ +\255\255\115\001\000\001\001\001\002\001\003\001\255\255\255\255\ +\006\001\007\001\008\001\009\001\010\001\011\001\012\001\013\001\ +\014\001\015\001\016\001\017\001\018\001\019\001\020\001\021\001\ +\022\001\255\255\024\001\025\001\026\001\027\001\028\001\029\001\ +\030\001\031\001\255\255\255\255\255\255\255\255\036\001\037\001\ +\255\255\255\255\040\001\041\001\042\001\043\001\044\001\045\001\ +\046\001\047\001\255\255\049\001\050\001\051\001\255\255\053\001\ +\054\001\055\001\056\001\255\255\255\255\059\001\060\001\061\001\ +\255\255\063\001\064\001\065\001\066\001\067\001\068\001\255\255\ +\070\001\071\001\072\001\073\001\074\001\255\255\255\255\255\255\ +\255\255\255\255\080\001\081\001\082\001\083\001\084\001\085\001\ +\086\001\087\001\255\255\089\001\255\255\091\001\092\001\000\000\ +\094\001\095\001\096\001\097\001\098\001\255\255\100\001\101\001\ +\255\255\103\001\104\001\105\001\106\001\255\255\108\001\109\001\ +\255\255\111\001\255\255\255\255\255\255\115\001\000\001\001\001\ +\002\001\003\001\255\255\255\255\006\001\007\001\008\001\009\001\ +\010\001\011\001\012\001\013\001\014\001\015\001\016\001\017\001\ +\018\001\019\001\020\001\021\001\022\001\255\255\024\001\025\001\ +\026\001\027\001\028\001\029\001\030\001\031\001\255\255\255\255\ +\255\255\255\255\036\001\037\001\255\255\255\255\040\001\041\001\ +\042\001\043\001\044\001\045\001\046\001\047\001\255\255\049\001\ +\050\001\051\001\255\255\053\001\054\001\055\001\056\001\255\255\ +\255\255\059\001\060\001\061\001\255\255\063\001\064\001\065\001\ +\066\001\067\001\068\001\255\255\070\001\071\001\072\001\073\001\ +\074\001\255\255\255\255\255\255\255\255\255\255\080\001\081\001\ +\082\001\083\001\084\001\085\001\086\001\087\001\255\255\089\001\ +\255\255\091\001\092\001\000\000\094\001\095\001\096\001\097\001\ +\098\001\255\255\100\001\101\001\255\255\103\001\104\001\105\001\ +\106\001\255\255\108\001\109\001\255\255\111\001\255\255\255\255\ +\255\255\115\001\255\255\000\001\001\001\002\001\003\001\255\255\ +\255\255\006\001\007\001\008\001\009\001\010\001\011\001\012\001\ +\013\001\014\001\015\001\016\001\017\001\018\001\019\001\020\001\ +\021\001\022\001\255\255\024\001\025\001\026\001\027\001\028\001\ +\029\001\030\001\031\001\255\255\255\255\255\255\255\255\036\001\ +\037\001\255\255\255\255\040\001\041\001\042\001\043\001\044\001\ +\045\001\046\001\047\001\255\255\049\001\050\001\051\001\255\255\ +\053\001\054\001\055\001\056\001\255\255\255\255\059\001\060\001\ +\061\001\255\255\063\001\064\001\065\001\066\001\067\001\068\001\ +\255\255\070\001\071\001\072\001\073\001\074\001\255\255\255\255\ +\255\255\255\255\255\255\080\001\081\001\082\001\083\001\084\001\ +\085\001\086\001\087\001\255\255\089\001\255\255\091\001\092\001\ +\000\000\094\001\095\001\096\001\097\001\098\001\255\255\100\001\ +\101\001\255\255\103\001\104\001\105\001\106\001\255\255\108\001\ +\109\001\255\255\111\001\255\255\255\255\255\255\115\001\000\001\ +\001\001\002\001\003\001\255\255\255\255\006\001\007\001\008\001\ +\009\001\010\001\011\001\012\001\013\001\014\001\015\001\016\001\ +\017\001\018\001\019\001\020\001\021\001\022\001\255\255\024\001\ +\025\001\026\001\027\001\028\001\029\001\030\001\031\001\255\255\ +\255\255\255\255\255\255\036\001\037\001\255\255\255\255\040\001\ +\041\001\042\001\043\001\044\001\045\001\046\001\047\001\255\255\ +\049\001\050\001\051\001\255\255\053\001\054\001\055\001\056\001\ +\255\255\255\255\059\001\060\001\061\001\255\255\063\001\064\001\ +\065\001\066\001\067\001\068\001\255\255\070\001\071\001\072\001\ +\073\001\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ +\081\001\082\001\083\001\084\001\085\001\086\001\087\001\255\255\ +\089\001\255\255\091\001\092\001\000\000\094\001\095\001\096\001\ +\097\001\098\001\255\255\100\001\101\001\255\255\103\001\104\001\ +\105\001\106\001\255\255\108\001\109\001\255\255\111\001\255\255\ +\255\255\255\255\115\001\000\001\001\001\002\001\003\001\255\255\ +\255\255\006\001\007\001\008\001\009\001\010\001\011\001\012\001\ +\013\001\014\001\015\001\016\001\017\001\018\001\019\001\020\001\ +\021\001\022\001\255\255\024\001\025\001\026\001\027\001\028\001\ +\029\001\030\001\031\001\255\255\255\255\255\255\255\255\036\001\ +\037\001\255\255\255\255\040\001\041\001\042\001\043\001\044\001\ +\045\001\046\001\047\001\255\255\049\001\050\001\051\001\255\255\ +\053\001\054\001\055\001\056\001\255\255\255\255\059\001\060\001\ +\061\001\255\255\063\001\064\001\065\001\066\001\067\001\068\001\ +\255\255\070\001\071\001\072\001\073\001\074\001\255\255\255\255\ +\255\255\255\255\255\255\080\001\081\001\082\001\083\001\084\001\ +\085\001\086\001\087\001\255\255\089\001\255\255\091\001\092\001\ +\000\000\094\001\095\001\096\001\097\001\098\001\255\255\100\001\ +\101\001\255\255\103\001\104\001\105\001\106\001\255\255\108\001\ +\109\001\255\255\111\001\255\255\255\255\255\255\115\001\255\255\ +\000\001\001\001\002\001\003\001\255\255\255\255\006\001\007\001\ +\008\001\009\001\010\001\011\001\012\001\013\001\014\001\015\001\ +\016\001\017\001\018\001\019\001\020\001\021\001\255\255\255\255\ +\024\001\025\001\026\001\027\001\028\001\029\001\030\001\031\001\ +\255\255\255\255\255\255\255\255\036\001\037\001\255\255\255\255\ +\040\001\041\001\042\001\043\001\044\001\045\001\046\001\255\255\ +\255\255\049\001\050\001\051\001\255\255\053\001\054\001\055\001\ +\056\001\255\255\255\255\059\001\060\001\061\001\255\255\063\001\ +\064\001\065\001\066\001\067\001\068\001\255\255\070\001\071\001\ +\072\001\073\001\074\001\255\255\255\255\255\255\255\255\255\255\ +\080\001\081\001\082\001\083\001\084\001\085\001\086\001\087\001\ +\255\255\089\001\255\255\091\001\092\001\000\000\094\001\095\001\ +\096\001\097\001\098\001\255\255\100\001\101\001\255\255\103\001\ +\104\001\105\001\106\001\255\255\108\001\109\001\255\255\111\001\ +\255\255\255\255\255\255\115\001\000\001\001\001\002\001\003\001\ +\255\255\255\255\006\001\007\001\008\001\009\001\010\001\011\001\ +\012\001\013\001\014\001\015\001\016\001\017\001\018\001\019\001\ +\020\001\021\001\255\255\255\255\024\001\025\001\026\001\027\001\ +\028\001\029\001\030\001\031\001\255\255\255\255\255\255\255\255\ +\036\001\037\001\255\255\255\255\040\001\041\001\042\001\043\001\ +\044\001\045\001\046\001\255\255\255\255\049\001\050\001\051\001\ +\255\255\053\001\054\001\055\001\056\001\255\255\255\255\059\001\ +\060\001\061\001\255\255\063\001\064\001\065\001\066\001\067\001\ +\068\001\255\255\070\001\071\001\072\001\073\001\074\001\255\255\ +\255\255\255\255\255\255\255\255\080\001\081\001\082\001\083\001\ +\084\001\085\001\086\001\087\001\255\255\089\001\255\255\091\001\ +\092\001\000\000\094\001\095\001\096\001\255\255\255\255\255\255\ +\100\001\101\001\255\255\103\001\104\001\105\001\106\001\255\255\ +\108\001\109\001\255\255\111\001\255\255\255\255\255\255\115\001\ +\000\001\001\001\002\001\003\001\255\255\255\255\006\001\007\001\ +\008\001\009\001\010\001\011\001\012\001\013\001\014\001\015\001\ +\016\001\017\001\018\001\019\001\020\001\021\001\255\255\255\255\ +\024\001\025\001\026\001\027\001\028\001\029\001\030\001\031\001\ +\255\255\255\255\255\255\255\255\036\001\037\001\255\255\255\255\ +\040\001\041\001\042\001\043\001\044\001\045\001\046\001\255\255\ +\255\255\049\001\050\001\051\001\255\255\053\001\054\001\055\001\ +\056\001\255\255\255\255\059\001\060\001\061\001\255\255\063\001\ +\064\001\065\001\066\001\067\001\068\001\255\255\070\001\071\001\ +\072\001\073\001\074\001\255\255\255\255\255\255\255\255\255\255\ +\080\001\081\001\082\001\083\001\084\001\085\001\086\001\087\001\ +\255\255\089\001\255\255\091\001\092\001\000\000\094\001\095\001\ +\096\001\255\255\255\255\255\255\100\001\101\001\255\255\103\001\ +\104\001\105\001\106\001\255\255\108\001\109\001\255\255\111\001\ +\255\255\255\255\255\255\115\001\255\255\000\001\001\001\002\001\ +\003\001\255\255\255\255\006\001\007\001\008\001\009\001\010\001\ +\011\001\012\001\013\001\014\001\015\001\016\001\017\001\018\001\ +\019\001\020\001\021\001\255\255\255\255\024\001\025\001\026\001\ +\027\001\028\001\029\001\030\001\031\001\255\255\255\255\255\255\ +\255\255\036\001\037\001\255\255\255\255\040\001\041\001\042\001\ +\043\001\044\001\045\001\046\001\255\255\255\255\049\001\050\001\ +\051\001\255\255\053\001\054\001\055\001\056\001\255\255\255\255\ +\059\001\060\001\061\001\255\255\063\001\064\001\065\001\066\001\ +\067\001\068\001\255\255\070\001\071\001\072\001\073\001\074\001\ +\255\255\255\255\255\255\255\255\255\255\080\001\081\001\082\001\ +\083\001\084\001\085\001\086\001\087\001\255\255\089\001\255\255\ +\091\001\092\001\000\000\094\001\095\001\096\001\255\255\255\255\ +\255\255\100\001\101\001\255\255\103\001\104\001\105\001\106\001\ +\255\255\108\001\109\001\255\255\111\001\255\255\255\255\255\255\ +\115\001\000\001\001\001\002\001\003\001\255\255\255\255\255\255\ +\255\255\008\001\009\001\010\001\255\255\255\255\013\001\014\001\ +\015\001\016\001\017\001\018\001\019\001\020\001\021\001\022\001\ +\255\255\024\001\025\001\026\001\027\001\028\001\029\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\036\001\037\001\255\255\ +\255\255\040\001\041\001\042\001\043\001\044\001\045\001\046\001\ +\047\001\255\255\049\001\255\255\051\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\060\001\061\001\255\255\ +\063\001\255\255\255\255\066\001\067\001\068\001\255\255\070\001\ +\071\001\072\001\073\001\074\001\255\255\255\255\255\255\255\255\ +\255\255\080\001\081\001\082\001\083\001\084\001\085\001\086\001\ +\255\255\255\255\089\001\255\255\091\001\092\001\000\000\094\001\ +\095\001\096\001\097\001\098\001\255\255\100\001\255\255\255\255\ +\103\001\104\001\105\001\255\255\255\255\108\001\255\255\255\255\ +\111\001\255\255\255\255\255\255\115\001\000\001\001\001\002\001\ +\003\001\255\255\255\255\255\255\255\255\008\001\009\001\010\001\ +\255\255\255\255\013\001\014\001\015\001\016\001\017\001\018\001\ +\019\001\020\001\021\001\022\001\255\255\024\001\025\001\026\001\ +\027\001\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\036\001\037\001\255\255\255\255\040\001\041\001\042\001\ +\043\001\044\001\045\001\046\001\047\001\255\255\049\001\255\255\ +\051\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\060\001\061\001\255\255\063\001\255\255\255\255\066\001\ +\067\001\068\001\255\255\070\001\071\001\072\001\073\001\074\001\ +\255\255\255\255\255\255\255\255\255\255\080\001\081\001\082\001\ +\083\001\084\001\085\001\086\001\255\255\255\255\089\001\255\255\ +\091\001\092\001\000\000\094\001\095\001\096\001\097\001\098\001\ +\255\255\100\001\255\255\255\255\103\001\104\001\105\001\255\255\ +\255\255\108\001\255\255\255\255\111\001\255\255\255\255\255\255\ +\115\001\255\255\000\001\001\001\002\001\003\001\255\255\255\255\ +\255\255\255\255\008\001\009\001\010\001\255\255\255\255\013\001\ +\014\001\015\001\016\001\017\001\018\001\019\001\020\001\021\001\ +\255\255\255\255\024\001\025\001\026\001\027\001\028\001\029\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\036\001\037\001\ +\255\255\255\255\040\001\041\001\042\001\043\001\044\001\045\001\ +\046\001\255\255\255\255\049\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\060\001\061\001\ +\255\255\063\001\255\255\255\255\066\001\067\001\068\001\255\255\ +\070\001\071\001\072\001\073\001\074\001\255\255\255\255\255\255\ +\255\255\255\255\080\001\255\255\082\001\083\001\084\001\085\001\ +\086\001\255\255\255\255\255\255\255\255\091\001\092\001\000\000\ +\094\001\095\001\096\001\255\255\255\255\255\255\100\001\255\255\ +\255\255\103\001\255\255\105\001\255\255\255\255\108\001\255\255\ +\255\255\111\001\255\255\255\255\255\255\115\001\000\001\001\001\ +\002\001\003\001\255\255\255\255\255\255\255\255\008\001\009\001\ +\010\001\255\255\255\255\013\001\014\001\015\001\016\001\017\001\ +\018\001\019\001\020\001\021\001\255\255\255\255\024\001\025\001\ +\026\001\027\001\028\001\029\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\036\001\037\001\255\255\255\255\040\001\041\001\ +\042\001\043\001\044\001\045\001\046\001\255\255\255\255\049\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\060\001\061\001\255\255\063\001\255\255\255\255\ +\066\001\067\001\068\001\255\255\070\001\071\001\072\001\073\001\ +\074\001\255\255\255\255\255\255\255\255\255\255\080\001\255\255\ +\082\001\083\001\084\001\085\001\086\001\255\255\255\255\255\255\ +\255\255\091\001\092\001\000\000\094\001\095\001\096\001\255\255\ +\255\255\255\255\100\001\255\255\255\255\103\001\255\255\105\001\ +\255\255\255\255\108\001\255\255\255\255\111\001\255\255\255\255\ +\255\255\115\001\000\001\001\001\002\001\003\001\255\255\255\255\ +\255\255\255\255\008\001\009\001\010\001\255\255\255\255\013\001\ +\014\001\015\001\016\001\017\001\018\001\019\001\020\001\021\001\ +\255\255\255\255\024\001\025\001\026\001\027\001\028\001\029\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\036\001\037\001\ +\255\255\255\255\040\001\041\001\042\001\043\001\044\001\045\001\ +\046\001\255\255\255\255\049\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\060\001\061\001\ +\255\255\063\001\255\255\255\255\066\001\067\001\068\001\255\255\ +\070\001\071\001\072\001\073\001\074\001\255\255\255\255\255\255\ +\255\255\255\255\080\001\255\255\082\001\083\001\084\001\085\001\ +\086\001\255\255\255\255\255\255\255\255\091\001\092\001\000\000\ +\094\001\095\001\096\001\255\255\255\255\255\255\100\001\255\255\ +\255\255\103\001\255\255\105\001\255\255\255\255\108\001\255\255\ +\255\255\111\001\255\255\255\255\255\255\115\001\255\255\000\001\ +\001\001\002\001\003\001\255\255\255\255\255\255\255\255\008\001\ +\009\001\010\001\255\255\255\255\013\001\014\001\015\001\016\001\ +\017\001\018\001\019\001\020\001\021\001\255\255\255\255\024\001\ +\025\001\026\001\027\001\028\001\029\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\036\001\037\001\255\255\255\255\040\001\ +\041\001\042\001\043\001\044\001\045\001\046\001\255\255\255\255\ +\049\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\060\001\061\001\255\255\063\001\255\255\ +\255\255\066\001\067\001\068\001\255\255\070\001\071\001\072\001\ +\073\001\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ +\255\255\082\001\083\001\084\001\085\001\086\001\255\255\255\255\ +\255\255\255\255\091\001\092\001\000\000\094\001\095\001\096\001\ +\255\255\255\255\255\255\100\001\255\255\255\255\103\001\255\255\ +\105\001\255\255\255\255\108\001\255\255\255\255\111\001\255\255\ +\255\255\255\255\115\001\000\001\001\001\002\001\003\001\255\255\ +\255\255\255\255\255\255\008\001\009\001\010\001\255\255\255\255\ +\013\001\014\001\015\001\016\001\017\001\018\001\019\001\020\001\ +\021\001\255\255\255\255\024\001\025\001\026\001\027\001\028\001\ +\029\001\255\255\255\255\255\255\255\255\255\255\255\255\036\001\ +\037\001\255\255\255\255\040\001\041\001\042\001\043\001\044\001\ +\045\001\046\001\255\255\255\255\049\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\060\001\ +\061\001\255\255\063\001\255\255\255\255\066\001\067\001\068\001\ +\255\255\070\001\071\001\072\001\073\001\074\001\255\255\255\255\ +\255\255\255\255\255\255\080\001\255\255\082\001\083\001\084\001\ +\085\001\086\001\255\255\255\255\255\255\255\255\091\001\092\001\ +\000\000\094\001\095\001\096\001\255\255\255\255\255\255\100\001\ +\255\255\255\255\103\001\255\255\105\001\255\255\255\255\108\001\ +\255\255\255\255\111\001\255\255\255\255\255\255\115\001\000\001\ +\001\001\002\001\003\001\255\255\255\255\255\255\255\255\008\001\ +\009\001\010\001\255\255\255\255\013\001\014\001\015\001\016\001\ +\017\001\018\001\019\001\020\001\021\001\255\255\255\255\024\001\ +\025\001\026\001\027\001\028\001\029\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\036\001\037\001\255\255\255\255\040\001\ +\041\001\042\001\043\001\044\001\045\001\046\001\255\255\255\255\ +\049\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\060\001\061\001\255\255\063\001\255\255\ +\255\255\066\001\067\001\068\001\255\255\070\001\071\001\072\001\ +\073\001\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ +\255\255\082\001\083\001\084\001\085\001\086\001\255\255\255\255\ +\255\255\255\255\091\001\092\001\000\000\094\001\095\001\096\001\ +\255\255\255\255\255\255\100\001\255\255\255\255\103\001\255\255\ +\105\001\255\255\255\255\108\001\255\255\255\255\111\001\255\255\ +\255\255\255\255\115\001\255\255\000\001\001\001\002\001\003\001\ +\255\255\255\255\255\255\255\255\008\001\009\001\010\001\255\255\ +\255\255\013\001\014\001\015\001\016\001\017\001\255\255\019\001\ +\020\001\021\001\255\255\255\255\024\001\025\001\026\001\027\001\ +\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\036\001\037\001\255\255\255\255\040\001\041\001\042\001\043\001\ +\044\001\045\001\046\001\255\255\255\255\049\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\060\001\061\001\255\255\063\001\255\255\255\255\066\001\067\001\ +\068\001\255\255\070\001\071\001\072\001\073\001\074\001\255\255\ +\255\255\255\255\255\255\255\255\080\001\255\255\082\001\083\001\ +\084\001\085\001\086\001\255\255\255\255\255\255\255\255\091\001\ +\092\001\000\000\094\001\095\001\096\001\255\255\255\255\255\255\ +\100\001\255\255\255\255\103\001\255\255\105\001\255\255\255\255\ +\108\001\255\255\255\255\111\001\255\255\255\255\255\255\115\001\ +\000\001\001\001\002\001\003\001\255\255\255\255\255\255\255\255\ +\008\001\009\001\010\001\255\255\255\255\013\001\014\001\015\001\ +\016\001\017\001\018\001\019\001\020\001\021\001\255\255\255\255\ +\024\001\025\001\026\001\027\001\028\001\029\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\036\001\037\001\255\255\255\255\ +\040\001\041\001\042\001\043\001\044\001\045\001\255\255\255\255\ +\255\255\049\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\060\001\061\001\255\255\063\001\ +\255\255\255\255\066\001\067\001\068\001\255\255\070\001\071\001\ +\072\001\073\001\074\001\255\255\255\255\255\255\255\255\255\255\ +\080\001\255\255\082\001\083\001\084\001\085\001\086\001\255\255\ +\255\255\255\255\255\255\091\001\092\001\000\000\094\001\095\001\ +\096\001\255\255\255\255\255\255\100\001\255\255\255\255\103\001\ +\255\255\105\001\255\255\255\255\108\001\255\255\255\255\111\001\ +\255\255\255\255\255\255\115\001\000\001\001\001\002\001\003\001\ +\255\255\255\255\255\255\255\255\008\001\009\001\010\001\255\255\ +\255\255\013\001\014\001\015\001\016\001\017\001\018\001\019\001\ +\020\001\021\001\255\255\255\255\024\001\025\001\026\001\027\001\ +\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\036\001\037\001\255\255\255\255\040\001\041\001\042\001\043\001\ +\044\001\045\001\255\255\255\255\255\255\049\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\060\001\061\001\255\255\063\001\255\255\255\255\066\001\067\001\ +\068\001\255\255\070\001\071\001\072\001\073\001\074\001\255\255\ +\255\255\255\255\255\255\255\255\080\001\255\255\082\001\083\001\ +\084\001\085\001\086\001\255\255\255\255\255\255\255\255\091\001\ +\092\001\000\000\094\001\095\001\096\001\255\255\255\255\255\255\ +\100\001\255\255\255\255\103\001\255\255\105\001\255\255\255\255\ +\108\001\255\255\255\255\111\001\255\255\255\255\255\255\115\001\ +\255\255\000\001\001\001\002\001\003\001\255\255\255\255\255\255\ +\255\255\008\001\009\001\010\001\255\255\255\255\013\001\014\001\ +\015\001\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ +\255\255\024\001\025\001\026\001\027\001\028\001\029\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\036\001\037\001\255\255\ +\255\255\040\001\041\001\042\001\043\001\044\001\045\001\255\255\ +\255\255\255\255\049\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\060\001\061\001\255\255\ +\063\001\255\255\255\255\066\001\067\001\068\001\255\255\070\001\ +\071\001\072\001\073\001\074\001\255\255\255\255\255\255\255\255\ +\255\255\080\001\255\255\082\001\083\001\084\001\085\001\086\001\ +\255\255\255\255\255\255\255\255\091\001\092\001\000\000\094\001\ +\095\001\096\001\255\255\255\255\255\255\100\001\255\255\255\255\ +\103\001\255\255\105\001\255\255\255\255\108\001\255\255\255\255\ +\111\001\255\255\255\255\255\255\115\001\000\001\001\001\002\001\ +\003\001\255\255\255\255\255\255\255\255\008\001\009\001\010\001\ +\255\255\255\255\013\001\014\001\015\001\016\001\017\001\018\001\ +\019\001\020\001\021\001\255\255\255\255\024\001\025\001\026\001\ +\027\001\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\036\001\037\001\255\255\255\255\040\001\041\001\042\001\ +\043\001\044\001\045\001\255\255\255\255\255\255\049\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\060\001\061\001\255\255\063\001\255\255\255\255\066\001\ +\067\001\068\001\255\255\070\001\071\001\072\001\073\001\074\001\ +\255\255\255\255\255\255\255\255\255\255\080\001\255\255\082\001\ +\083\001\084\001\085\001\086\001\255\255\255\255\255\255\255\255\ +\091\001\092\001\000\000\094\001\095\001\096\001\255\255\255\255\ +\255\255\100\001\255\255\255\255\103\001\255\255\105\001\255\255\ +\255\255\108\001\255\255\255\255\111\001\255\255\255\255\255\255\ +\115\001\000\001\001\001\002\001\003\001\255\255\255\255\255\255\ +\255\255\255\255\009\001\010\001\255\255\255\255\013\001\014\001\ +\015\001\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ +\255\255\024\001\025\001\026\001\027\001\028\001\029\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\036\001\037\001\255\255\ +\255\255\040\001\041\001\042\001\043\001\044\001\045\001\046\001\ +\255\255\255\255\049\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\060\001\061\001\255\255\ +\063\001\255\255\255\255\066\001\067\001\068\001\255\255\070\001\ +\071\001\072\001\073\001\074\001\255\255\255\255\255\255\255\255\ +\255\255\080\001\255\255\082\001\083\001\084\001\085\001\086\001\ +\255\255\255\255\255\255\255\255\091\001\092\001\000\000\094\001\ +\095\001\096\001\255\255\255\255\255\255\100\001\255\255\255\255\ +\103\001\255\255\105\001\255\255\255\255\108\001\255\255\255\255\ +\111\001\255\255\255\255\255\255\115\001\255\255\000\001\001\001\ +\002\001\003\001\255\255\255\255\255\255\255\255\255\255\009\001\ +\010\001\255\255\255\255\013\001\014\001\015\001\016\001\017\001\ +\018\001\019\001\020\001\021\001\255\255\255\255\024\001\025\001\ +\026\001\027\001\028\001\029\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\036\001\037\001\255\255\255\255\040\001\041\001\ +\042\001\043\001\044\001\045\001\046\001\255\255\255\255\049\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\060\001\061\001\255\255\063\001\255\255\255\255\ +\066\001\067\001\068\001\255\255\070\001\071\001\072\001\073\001\ +\074\001\255\255\255\255\255\255\255\255\255\255\080\001\255\255\ +\082\001\083\001\084\001\085\001\086\001\255\255\255\255\255\255\ +\255\255\091\001\092\001\000\000\094\001\095\001\096\001\255\255\ +\255\255\255\255\100\001\255\255\255\255\103\001\255\255\105\001\ +\255\255\255\255\108\001\255\255\255\255\111\001\255\255\255\255\ +\255\255\115\001\000\001\001\001\002\001\003\001\255\255\255\255\ +\255\255\255\255\255\255\009\001\010\001\255\255\255\255\013\001\ +\014\001\015\001\016\001\017\001\018\001\019\001\020\001\021\001\ +\255\255\255\255\024\001\025\001\026\001\027\001\028\001\029\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\036\001\037\001\ +\255\255\255\255\040\001\041\001\042\001\043\001\044\001\045\001\ +\046\001\255\255\255\255\049\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\060\001\061\001\ +\255\255\063\001\255\255\255\255\066\001\067\001\068\001\255\255\ +\070\001\071\001\072\001\073\001\074\001\255\255\255\255\255\255\ +\255\255\255\255\080\001\255\255\082\001\083\001\084\001\085\001\ +\086\001\255\255\255\255\255\255\255\255\091\001\092\001\000\000\ +\094\001\095\001\096\001\255\255\255\255\255\255\100\001\255\255\ +\255\255\103\001\255\255\105\001\255\255\255\255\108\001\255\255\ +\255\255\111\001\255\255\255\255\255\255\115\001\000\001\001\001\ +\002\001\003\001\255\255\255\255\255\255\255\255\008\001\009\001\ +\010\001\255\255\255\255\013\001\014\001\015\001\016\001\017\001\ +\018\001\019\001\020\001\021\001\255\255\255\255\024\001\025\001\ +\026\001\027\001\028\001\029\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\036\001\037\001\255\255\255\255\040\001\041\001\ +\042\001\043\001\044\001\255\255\255\255\255\255\255\255\049\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\060\001\061\001\255\255\063\001\255\255\255\255\ +\066\001\067\001\068\001\255\255\070\001\071\001\072\001\073\001\ +\074\001\255\255\255\255\255\255\255\255\255\255\080\001\255\255\ +\082\001\255\255\084\001\085\001\086\001\255\255\255\255\255\255\ +\255\255\091\001\092\001\000\000\094\001\095\001\096\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\103\001\255\255\105\001\ +\255\255\255\255\108\001\255\255\255\255\111\001\255\255\255\255\ +\255\255\115\001\255\255\000\001\001\001\002\001\003\001\255\255\ +\255\255\255\255\255\255\008\001\009\001\010\001\255\255\255\255\ +\013\001\014\001\015\001\016\001\017\001\018\001\019\001\020\001\ +\021\001\255\255\255\255\024\001\025\001\026\001\027\001\028\001\ +\029\001\255\255\255\255\255\255\255\255\255\255\255\255\036\001\ +\037\001\255\255\255\255\040\001\041\001\042\001\043\001\044\001\ +\255\255\255\255\255\255\255\255\049\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\060\001\ +\061\001\255\255\063\001\255\255\255\255\066\001\067\001\068\001\ +\255\255\070\001\071\001\072\001\073\001\074\001\255\255\255\255\ +\255\255\255\255\255\255\080\001\255\255\082\001\255\255\084\001\ +\085\001\086\001\255\255\255\255\255\255\255\255\091\001\092\001\ +\000\000\094\001\095\001\096\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\103\001\255\255\105\001\255\255\255\255\108\001\ +\255\255\255\255\111\001\255\255\255\255\255\255\115\001\000\001\ +\001\001\002\001\003\001\255\255\255\255\255\255\255\255\008\001\ +\009\001\010\001\255\255\255\255\013\001\014\001\015\001\016\001\ +\017\001\018\001\019\001\020\001\021\001\255\255\255\255\024\001\ +\025\001\026\001\027\001\028\001\029\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\036\001\037\001\255\255\255\255\040\001\ +\041\001\042\001\043\001\044\001\255\255\255\255\255\255\255\255\ +\049\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\060\001\061\001\255\255\063\001\255\255\ +\255\255\066\001\067\001\068\001\255\255\070\001\071\001\072\001\ +\073\001\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ +\255\255\082\001\255\255\084\001\085\001\086\001\255\255\255\255\ +\255\255\255\255\091\001\092\001\000\000\094\001\095\001\096\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\103\001\255\255\ +\105\001\255\255\255\255\108\001\255\255\255\255\111\001\255\255\ +\255\255\255\255\115\001\000\001\001\001\002\001\003\001\255\255\ +\255\255\255\255\255\255\008\001\009\001\010\001\255\255\255\255\ +\013\001\014\001\015\001\016\001\017\001\018\001\019\001\020\001\ +\021\001\255\255\255\255\024\001\025\001\026\001\027\001\028\001\ +\029\001\255\255\255\255\255\255\255\255\255\255\255\255\036\001\ +\037\001\255\255\255\255\040\001\041\001\042\001\043\001\044\001\ +\255\255\255\255\255\255\255\255\049\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\060\001\ +\061\001\255\255\063\001\255\255\255\255\066\001\067\001\068\001\ +\255\255\070\001\071\001\072\001\073\001\074\001\255\255\255\255\ +\255\255\255\255\255\255\080\001\255\255\082\001\255\255\084\001\ +\085\001\086\001\255\255\255\255\255\255\255\255\091\001\092\001\ +\000\000\094\001\095\001\096\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\103\001\255\255\105\001\255\255\255\255\108\001\ +\255\255\255\255\111\001\255\255\255\255\255\255\115\001\255\255\ +\000\001\001\001\002\001\003\001\255\255\255\255\255\255\255\255\ +\008\001\009\001\010\001\255\255\255\255\013\001\014\001\015\001\ +\016\001\017\001\018\001\019\001\020\001\021\001\255\255\255\255\ +\024\001\025\001\026\001\027\001\028\001\029\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\036\001\037\001\255\255\255\255\ +\040\001\041\001\042\001\043\001\044\001\255\255\255\255\255\255\ +\255\255\049\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\060\001\061\001\255\255\063\001\ +\255\255\255\255\066\001\067\001\068\001\255\255\070\001\071\001\ +\072\001\073\001\074\001\255\255\255\255\255\255\255\255\255\255\ +\080\001\255\255\082\001\255\255\084\001\085\001\086\001\255\255\ +\255\255\255\255\255\255\091\001\092\001\000\000\094\001\095\001\ +\096\001\255\255\255\255\255\255\255\255\255\255\255\255\103\001\ +\255\255\105\001\255\255\255\255\108\001\255\255\255\255\111\001\ +\255\255\255\255\255\255\115\001\000\001\001\001\002\001\003\001\ +\255\255\255\255\255\255\255\255\008\001\009\001\010\001\255\255\ +\255\255\013\001\014\001\015\001\016\001\017\001\018\001\019\001\ +\020\001\021\001\255\255\255\255\024\001\025\001\026\001\027\001\ +\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\036\001\037\001\255\255\255\255\040\001\041\001\042\001\043\001\ +\044\001\255\255\255\255\255\255\255\255\049\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\060\001\061\001\255\255\063\001\255\255\255\255\066\001\067\001\ +\068\001\255\255\070\001\071\001\072\001\073\001\074\001\255\255\ +\255\255\255\255\255\255\255\255\080\001\255\255\082\001\255\255\ +\084\001\085\001\086\001\255\255\255\255\255\255\255\255\091\001\ +\092\001\000\000\094\001\095\001\096\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\103\001\255\255\105\001\255\255\255\255\ +\108\001\255\255\255\255\111\001\255\255\255\255\255\255\115\001\ +\000\001\001\001\002\001\003\001\255\255\255\255\255\255\255\255\ +\008\001\009\001\010\001\255\255\255\255\013\001\014\001\015\001\ +\016\001\017\001\018\001\019\001\020\001\021\001\255\255\255\255\ +\024\001\025\001\026\001\027\001\028\001\029\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\036\001\037\001\255\255\255\255\ +\040\001\041\001\042\001\043\001\044\001\045\001\046\001\255\255\ +\255\255\049\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\060\001\061\001\255\255\255\255\ +\255\255\255\255\066\001\067\001\068\001\255\255\070\001\255\255\ +\255\255\073\001\074\001\255\255\255\255\255\255\255\255\255\255\ +\080\001\255\255\082\001\255\255\255\255\255\255\086\001\255\255\ +\255\255\255\255\255\255\091\001\092\001\000\000\094\001\095\001\ +\096\001\255\255\255\255\255\255\100\001\255\255\255\255\103\001\ +\255\255\105\001\255\255\255\255\108\001\255\255\255\255\111\001\ +\255\255\255\255\255\255\115\001\255\255\000\001\001\001\002\001\ +\003\001\255\255\255\255\255\255\255\255\008\001\009\001\010\001\ +\255\255\255\255\013\001\014\001\255\255\016\001\017\001\018\001\ +\019\001\020\001\021\001\255\255\255\255\024\001\025\001\026\001\ +\027\001\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\036\001\037\001\255\255\255\255\040\001\041\001\042\001\ +\043\001\255\255\255\255\255\255\255\255\255\255\049\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\060\001\061\001\255\255\063\001\255\255\255\255\066\001\ +\067\001\068\001\255\255\070\001\255\255\255\255\073\001\074\001\ +\255\255\255\255\255\255\255\255\255\255\080\001\255\255\082\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\091\001\092\001\000\000\094\001\095\001\096\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\103\001\255\255\105\001\255\255\ +\255\255\108\001\255\255\255\255\111\001\255\255\255\255\255\255\ +\115\001\000\001\001\001\002\001\003\001\255\255\255\255\255\255\ +\255\255\008\001\009\001\010\001\255\255\255\255\013\001\014\001\ +\255\255\016\001\017\001\018\001\019\001\020\001\021\001\255\255\ +\255\255\024\001\025\001\026\001\027\001\028\001\029\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\036\001\037\001\255\255\ +\255\255\040\001\041\001\042\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\049\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\060\001\061\001\255\255\ +\063\001\255\255\255\255\255\255\067\001\068\001\255\255\070\001\ +\255\255\255\255\073\001\074\001\255\255\255\255\255\255\255\255\ +\255\255\080\001\255\255\082\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\091\001\092\001\000\000\094\001\ +\095\001\096\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\103\001\255\255\105\001\255\255\255\255\108\001\255\255\255\255\ +\111\001\255\255\255\255\255\255\115\001\000\001\001\001\002\001\ +\003\001\255\255\255\255\255\255\255\255\008\001\009\001\010\001\ +\255\255\255\255\013\001\014\001\255\255\016\001\017\001\018\001\ +\019\001\020\001\021\001\255\255\255\255\024\001\025\001\026\001\ +\027\001\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\036\001\037\001\255\255\255\255\040\001\041\001\042\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\049\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\060\001\061\001\255\255\063\001\255\255\255\255\255\255\ +\067\001\068\001\255\255\070\001\255\255\255\255\073\001\074\001\ +\255\255\255\255\255\255\255\255\255\255\080\001\255\255\082\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\091\001\092\001\000\000\094\001\095\001\096\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\103\001\255\255\105\001\255\255\ +\255\255\108\001\255\255\255\255\111\001\255\255\255\255\255\255\ +\115\001\255\255\000\001\001\001\002\001\003\001\255\255\255\255\ +\255\255\255\255\008\001\009\001\010\001\255\255\255\255\013\001\ +\014\001\255\255\016\001\017\001\018\001\019\001\020\001\021\001\ +\255\255\255\255\024\001\025\001\026\001\027\001\028\001\029\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\036\001\037\001\ +\255\255\255\255\040\001\041\001\042\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\049\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\060\001\061\001\ +\255\255\063\001\255\255\255\255\255\255\067\001\068\001\255\255\ +\070\001\255\255\255\255\073\001\074\001\255\255\255\255\255\255\ +\255\255\255\255\080\001\255\255\082\001\255\255\255\255\000\000\ +\255\255\255\255\255\255\255\255\255\255\091\001\092\001\255\255\ +\094\001\095\001\096\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\103\001\255\255\105\001\255\255\255\255\108\001\255\255\ +\255\255\111\001\255\255\255\255\255\255\115\001\000\001\001\001\ +\002\001\003\001\255\255\255\255\255\255\255\255\008\001\009\001\ +\010\001\255\255\255\255\013\001\014\001\255\255\016\001\017\001\ +\018\001\019\001\020\001\021\001\255\255\255\255\024\001\025\001\ +\026\001\027\001\028\001\029\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\036\001\037\001\255\255\255\255\040\001\041\001\ +\042\001\255\255\255\255\255\255\255\255\255\255\255\255\049\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\060\001\061\001\255\255\063\001\255\255\255\255\ +\255\255\067\001\068\001\255\255\070\001\255\255\255\255\073\001\ +\074\001\255\255\255\255\255\255\000\000\255\255\080\001\255\255\ +\082\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\091\001\092\001\255\255\094\001\095\001\096\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\103\001\255\255\105\001\ +\255\255\255\255\108\001\255\255\255\255\111\001\255\255\255\255\ +\255\255\115\001\000\001\001\001\002\001\003\001\255\255\255\255\ +\255\255\255\255\008\001\009\001\010\001\255\255\255\255\013\001\ +\014\001\255\255\016\001\017\001\018\001\019\001\020\001\021\001\ +\255\255\255\255\024\001\025\001\026\001\027\001\028\001\029\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\036\001\037\001\ +\255\255\255\255\040\001\041\001\042\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\049\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\060\001\061\001\ +\255\255\063\001\255\255\255\255\000\000\067\001\068\001\255\255\ +\070\001\255\255\255\255\073\001\074\001\255\255\255\255\255\255\ +\255\255\255\255\080\001\255\255\082\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\091\001\092\001\255\255\ +\094\001\095\001\096\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\103\001\255\255\105\001\255\255\255\255\108\001\000\001\ +\255\255\111\001\003\001\255\255\255\255\115\001\255\255\008\001\ +\009\001\010\001\255\255\255\255\013\001\014\001\255\255\016\001\ +\017\001\018\001\019\001\020\001\021\001\255\255\255\255\024\001\ +\025\001\026\001\255\255\028\001\029\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\037\001\255\255\255\255\040\001\ +\041\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\049\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\060\001\000\000\255\255\063\001\255\255\ +\255\255\255\255\067\001\068\001\255\255\070\001\255\255\255\255\ +\073\001\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ +\255\255\082\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\091\001\092\001\255\255\094\001\095\001\096\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\103\001\255\255\ +\105\001\255\255\255\255\108\001\000\001\255\255\111\001\003\001\ +\255\255\255\255\115\001\255\255\008\001\009\001\010\001\255\255\ +\255\255\013\001\014\001\255\255\016\001\017\001\018\001\019\001\ +\020\001\021\001\255\255\255\255\024\001\025\001\026\001\255\255\ +\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\037\001\255\255\255\255\040\001\041\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\049\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\000\000\255\255\255\255\255\255\ +\060\001\255\255\255\255\063\001\255\255\255\255\255\255\067\001\ +\068\001\255\255\070\001\255\255\255\255\073\001\074\001\255\255\ +\255\255\255\255\255\255\255\255\080\001\255\255\082\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\091\001\ +\092\001\255\255\094\001\095\001\096\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\103\001\000\001\105\001\255\255\003\001\ +\108\001\255\255\255\255\111\001\008\001\255\255\010\001\115\001\ +\255\255\013\001\014\001\255\255\016\001\017\001\018\001\019\001\ +\020\001\021\001\255\255\255\255\024\001\025\001\026\001\255\255\ +\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\037\001\255\255\255\255\040\001\041\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\049\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\000\000\255\255\255\255\255\255\ +\060\001\255\255\255\255\063\001\255\255\255\255\255\255\067\001\ +\068\001\255\255\070\001\255\255\255\255\073\001\074\001\255\255\ +\255\255\255\255\255\255\255\255\080\001\255\255\255\255\255\255\ +\255\255\255\255\000\000\255\255\255\255\255\255\255\255\091\001\ +\092\001\255\255\094\001\095\001\096\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\103\001\000\001\105\001\255\255\003\001\ +\108\001\255\255\255\255\111\001\008\001\255\255\010\001\115\001\ +\255\255\013\001\014\001\255\255\016\001\017\001\018\001\019\001\ +\020\001\021\001\255\255\255\255\024\001\025\001\026\001\255\255\ +\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\037\001\255\255\255\255\040\001\041\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\049\001\255\255\000\000\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\060\001\255\255\255\255\063\001\255\255\255\255\255\255\067\001\ +\068\001\255\255\070\001\255\255\255\255\073\001\074\001\255\255\ +\255\255\255\255\255\255\255\255\080\001\000\000\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\091\001\ +\092\001\255\255\094\001\095\001\096\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\103\001\000\001\105\001\255\255\003\001\ +\108\001\255\255\255\255\111\001\008\001\255\255\010\001\115\001\ +\255\255\013\001\014\001\255\255\016\001\017\001\018\001\019\001\ +\020\001\021\001\255\255\255\255\024\001\025\001\026\001\255\255\ +\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\037\001\255\255\255\255\040\001\041\001\255\255\255\255\ +\255\255\255\255\000\000\255\255\255\255\049\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\060\001\255\255\255\255\063\001\255\255\255\255\255\255\067\001\ +\068\001\255\255\070\001\255\255\255\255\073\001\074\001\255\255\ +\255\255\255\255\255\255\255\255\080\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\091\001\ +\092\001\255\255\094\001\095\001\096\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\103\001\000\001\105\001\255\255\003\001\ +\108\001\255\255\255\255\111\001\008\001\255\255\010\001\115\001\ +\255\255\013\001\014\001\255\255\016\001\017\001\018\001\019\001\ +\020\001\021\001\255\255\255\255\024\001\025\001\026\001\255\255\ +\028\001\029\001\000\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\037\001\008\001\255\255\040\001\041\001\255\255\013\001\ +\255\255\255\255\000\000\255\255\255\255\049\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\026\001\255\255\028\001\029\001\ +\060\001\255\255\255\255\063\001\255\255\255\255\255\255\067\001\ +\068\001\255\255\070\001\041\001\255\255\073\001\074\001\255\255\ +\000\000\255\255\255\255\255\255\080\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\060\001\091\001\ +\092\001\063\001\094\001\095\001\096\001\067\001\068\001\000\001\ +\255\255\255\255\003\001\103\001\074\001\105\001\255\255\008\001\ +\108\001\010\001\080\001\111\001\013\001\014\001\255\255\115\001\ +\017\001\255\255\019\001\020\001\021\001\255\255\092\001\024\001\ +\025\001\026\001\096\001\028\001\029\001\000\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\037\001\255\255\108\001\040\001\ +\041\001\111\001\013\001\255\255\255\255\000\000\255\255\255\255\ +\049\001\255\255\255\255\255\255\255\255\255\255\255\255\026\001\ +\255\255\028\001\029\001\060\001\255\255\255\255\063\001\255\255\ +\255\255\255\255\067\001\068\001\255\255\070\001\041\001\255\255\ +\073\001\074\001\255\255\000\000\255\255\255\255\255\255\080\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\060\001\091\001\092\001\063\001\094\001\095\001\096\001\ +\067\001\068\001\000\001\255\255\255\255\003\001\103\001\074\001\ +\105\001\255\255\008\001\108\001\010\001\080\001\111\001\013\001\ +\014\001\255\255\115\001\017\001\255\255\019\001\020\001\021\001\ +\255\255\092\001\024\001\025\001\026\001\096\001\028\001\029\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\037\001\ +\255\255\108\001\040\001\041\001\111\001\255\255\255\255\255\255\ +\000\000\255\255\255\255\049\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\060\001\255\255\ +\255\255\063\001\255\255\255\255\255\255\067\001\068\001\255\255\ +\070\001\255\255\255\255\073\001\074\001\255\255\255\255\255\255\ +\255\255\255\255\080\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\091\001\092\001\255\255\ +\094\001\095\001\096\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\103\001\000\001\105\001\255\255\003\001\108\001\255\255\ +\255\255\111\001\008\001\255\255\010\001\115\001\255\255\013\001\ +\014\001\255\255\255\255\017\001\255\255\019\001\020\001\021\001\ +\255\255\255\255\024\001\025\001\026\001\255\255\028\001\029\001\ +\000\001\255\255\255\255\255\255\255\255\255\255\255\255\037\001\ +\255\255\255\255\040\001\041\001\255\255\013\001\255\255\255\255\ +\000\000\255\255\255\255\049\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\026\001\255\255\028\001\029\001\060\001\255\255\ +\255\255\063\001\255\255\255\255\255\255\067\001\068\001\255\255\ +\070\001\041\001\255\255\073\001\074\001\255\255\000\000\255\255\ +\255\255\255\255\080\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\060\001\091\001\092\001\063\001\ +\094\001\095\001\096\001\067\001\068\001\000\001\255\255\255\255\ +\003\001\103\001\074\001\105\001\255\255\008\001\108\001\010\001\ +\080\001\111\001\013\001\014\001\255\255\115\001\017\001\255\255\ +\019\001\020\001\021\001\255\255\092\001\024\001\025\001\026\001\ +\096\001\028\001\029\001\000\001\255\255\255\255\003\001\255\255\ +\255\255\255\255\037\001\255\255\108\001\040\001\041\001\111\001\ +\013\001\255\255\255\255\000\000\255\255\255\255\049\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\026\001\255\255\028\001\ +\029\001\060\001\255\255\255\255\063\001\255\255\255\255\255\255\ +\067\001\068\001\255\255\070\001\041\001\255\255\073\001\074\001\ +\255\255\000\000\255\255\255\255\255\255\080\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\060\001\ +\091\001\092\001\063\001\094\001\095\001\096\001\255\255\068\001\ +\000\001\255\255\255\255\003\001\103\001\074\001\105\001\255\255\ +\008\001\108\001\010\001\080\001\111\001\013\001\014\001\255\255\ +\115\001\017\001\255\255\019\001\020\001\021\001\255\255\092\001\ +\024\001\025\001\026\001\096\001\028\001\029\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\037\001\255\255\108\001\ +\040\001\041\001\111\001\255\255\255\255\255\255\000\000\255\255\ +\255\255\049\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\060\001\255\255\255\255\063\001\ +\255\255\255\255\255\255\067\001\068\001\255\255\070\001\255\255\ +\255\255\073\001\074\001\255\255\255\255\255\255\255\255\255\255\ +\080\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\091\001\092\001\255\255\094\001\095\001\ +\096\001\255\255\255\255\255\255\255\255\255\255\255\255\103\001\ +\000\001\105\001\255\255\003\001\108\001\255\255\255\255\111\001\ +\008\001\255\255\010\001\115\001\255\255\013\001\014\001\255\255\ +\255\255\017\001\255\255\019\001\020\001\021\001\255\255\255\255\ +\024\001\025\001\026\001\255\255\028\001\029\001\000\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\037\001\255\255\255\255\ +\040\001\041\001\255\255\013\001\255\255\255\255\000\000\255\255\ +\255\255\049\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\026\001\255\255\028\001\029\001\060\001\255\255\255\255\063\001\ +\255\255\255\255\255\255\067\001\068\001\255\255\070\001\041\001\ +\255\255\073\001\074\001\255\255\000\000\255\255\255\255\255\255\ +\080\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\060\001\091\001\092\001\063\001\094\001\095\001\ +\096\001\067\001\068\001\000\001\255\255\255\255\003\001\103\001\ +\074\001\105\001\255\255\008\001\108\001\010\001\080\001\111\001\ +\013\001\014\001\255\255\115\001\017\001\255\255\019\001\020\001\ +\021\001\255\255\092\001\024\001\025\001\026\001\096\001\028\001\ +\029\001\000\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\037\001\255\255\108\001\040\001\041\001\111\001\013\001\255\255\ +\255\255\000\000\255\255\255\255\049\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\026\001\255\255\028\001\029\001\060\001\ +\255\255\255\255\063\001\255\255\255\255\255\255\067\001\068\001\ +\255\255\070\001\041\001\255\255\073\001\074\001\255\255\000\000\ +\255\255\255\255\255\255\080\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\060\001\091\001\092\001\ +\063\001\094\001\095\001\096\001\067\001\068\001\000\001\255\255\ +\255\255\003\001\103\001\074\001\105\001\255\255\008\001\108\001\ +\010\001\080\001\111\001\013\001\014\001\255\255\115\001\017\001\ +\255\255\019\001\020\001\021\001\255\255\092\001\024\001\025\001\ +\026\001\096\001\028\001\029\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\037\001\255\255\108\001\040\001\041\001\ +\111\001\255\255\255\255\255\255\000\000\255\255\255\255\049\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\060\001\255\255\255\255\063\001\255\255\255\255\ +\255\255\067\001\068\001\255\255\070\001\255\255\255\255\073\001\ +\074\001\255\255\255\255\255\255\255\255\255\255\080\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\091\001\092\001\255\255\094\001\095\001\096\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\103\001\000\001\105\001\ +\255\255\003\001\108\001\255\255\255\255\111\001\008\001\255\255\ +\010\001\115\001\255\255\013\001\014\001\255\255\255\255\017\001\ +\255\255\019\001\020\001\021\001\255\255\255\255\024\001\025\001\ +\026\001\255\255\028\001\029\001\000\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\037\001\255\255\255\255\040\001\041\001\ +\255\255\013\001\255\255\255\255\000\000\255\255\255\255\049\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\026\001\255\255\ +\028\001\029\001\060\001\255\255\255\255\063\001\255\255\255\255\ +\255\255\067\001\068\001\255\255\070\001\041\001\255\255\073\001\ +\074\001\255\255\000\000\255\255\255\255\255\255\080\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\060\001\091\001\092\001\063\001\094\001\095\001\096\001\255\255\ +\068\001\000\001\255\255\255\255\003\001\103\001\074\001\105\001\ +\255\255\008\001\108\001\010\001\080\001\111\001\013\001\014\001\ +\255\255\115\001\017\001\255\255\019\001\020\001\021\001\255\255\ +\092\001\024\001\025\001\026\001\096\001\028\001\029\001\000\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\037\001\255\255\ +\108\001\040\001\041\001\111\001\013\001\255\255\255\255\000\000\ +\255\255\255\255\049\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\026\001\255\255\028\001\029\001\060\001\255\255\255\255\ +\063\001\255\255\255\255\255\255\067\001\068\001\255\255\070\001\ +\041\001\255\255\073\001\074\001\255\255\255\255\255\255\255\255\ +\255\255\080\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\060\001\091\001\092\001\063\001\094\001\ +\095\001\096\001\255\255\068\001\000\001\255\255\255\255\003\001\ +\103\001\074\001\105\001\255\255\008\001\108\001\010\001\080\001\ +\111\001\013\001\014\001\255\255\115\001\017\001\255\255\019\001\ +\020\001\021\001\255\255\092\001\024\001\025\001\026\001\096\001\ +\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\037\001\255\255\108\001\040\001\041\001\111\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\049\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\000\000\255\255\255\255\ +\060\001\255\255\255\255\063\001\255\255\255\255\255\255\067\001\ +\068\001\255\255\070\001\255\255\255\255\073\001\074\001\255\255\ +\255\255\255\255\255\255\255\255\080\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\091\001\ +\092\001\255\255\094\001\095\001\096\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\103\001\000\001\105\001\255\255\003\001\ +\108\001\255\255\255\255\111\001\008\001\255\255\010\001\115\001\ +\255\255\013\001\014\001\255\255\255\255\017\001\255\255\019\001\ +\020\001\021\001\255\255\255\255\024\001\025\001\026\001\255\255\ +\028\001\029\001\000\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\037\001\255\255\255\255\040\001\041\001\255\255\013\001\ +\255\255\255\255\255\255\255\255\255\255\049\001\255\255\255\255\ +\000\000\255\255\255\255\255\255\026\001\255\255\028\001\029\001\ +\060\001\255\255\255\255\063\001\255\255\255\255\255\255\067\001\ +\068\001\255\255\070\001\041\001\255\255\073\001\074\001\255\255\ +\255\255\255\255\255\255\255\255\080\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\060\001\091\001\ +\092\001\063\001\094\001\095\001\096\001\255\255\068\001\000\001\ +\255\255\255\255\003\001\103\001\074\001\105\001\255\255\008\001\ +\108\001\010\001\080\001\111\001\013\001\014\001\255\255\115\001\ +\017\001\255\255\019\001\020\001\021\001\255\255\092\001\024\001\ +\025\001\026\001\096\001\028\001\029\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\037\001\255\255\108\001\040\001\ +\041\001\111\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\049\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\060\001\255\255\255\255\063\001\255\255\ +\255\255\255\255\067\001\068\001\000\000\070\001\255\255\255\255\ +\073\001\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\091\001\092\001\255\255\094\001\255\255\096\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\103\001\255\255\ +\105\001\255\255\255\255\108\001\255\255\000\001\111\001\002\001\ +\003\001\004\001\115\001\255\255\255\255\008\001\255\255\255\255\ +\255\255\255\255\013\001\255\255\255\255\255\255\017\001\018\001\ +\019\001\255\255\255\255\255\255\255\255\255\255\255\255\026\001\ +\027\001\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\036\001\255\255\255\255\255\255\040\001\041\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\048\001\049\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\000\000\ +\255\255\060\001\255\255\255\255\063\001\255\255\255\255\066\001\ +\067\001\068\001\255\255\070\001\255\255\255\255\073\001\074\001\ +\255\255\255\255\255\255\255\255\255\255\080\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\091\001\092\001\255\255\094\001\095\001\096\001\255\255\255\255\ +\000\001\100\001\255\255\003\001\255\255\255\255\255\255\255\255\ +\008\001\108\001\010\001\255\255\111\001\013\001\014\001\255\255\ +\115\001\017\001\255\255\019\001\020\001\021\001\255\255\255\255\ +\024\001\255\255\026\001\255\255\028\001\029\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\037\001\255\255\255\255\ +\040\001\041\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\049\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\000\000\255\255\060\001\255\255\255\255\063\001\ +\255\255\255\255\255\255\067\001\068\001\255\255\070\001\255\255\ +\255\255\073\001\074\001\255\255\255\255\255\255\255\255\255\255\ +\080\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\091\001\092\001\255\255\094\001\095\001\ +\096\001\255\255\255\255\255\255\255\255\255\255\255\255\103\001\ +\255\255\105\001\255\255\255\255\108\001\255\255\255\255\111\001\ +\255\255\255\255\255\255\115\001\000\001\255\255\002\001\003\001\ +\004\001\255\255\255\255\255\255\008\001\255\255\255\255\255\255\ +\255\255\013\001\255\255\255\255\255\255\017\001\018\001\019\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\026\001\027\001\ +\028\001\029\001\255\255\255\255\008\001\255\255\255\255\255\255\ +\036\001\255\255\255\255\255\255\255\255\041\001\255\255\000\000\ +\255\255\255\255\255\255\023\001\048\001\049\001\255\255\255\255\ +\255\255\255\255\030\001\255\255\255\255\255\255\255\255\255\255\ +\060\001\255\255\255\255\063\001\255\255\255\255\066\001\067\001\ +\068\001\255\255\070\001\255\255\255\255\073\001\074\001\255\255\ +\255\255\255\255\255\255\055\001\080\001\057\001\058\001\059\001\ +\255\255\061\001\255\255\255\255\064\001\065\001\255\255\091\001\ +\092\001\255\255\094\001\095\001\096\001\255\255\255\255\000\001\ +\255\255\002\001\003\001\004\001\255\255\081\001\255\255\008\001\ +\108\001\255\255\255\255\111\001\013\001\089\001\090\001\115\001\ +\017\001\018\001\019\001\255\255\255\255\097\001\255\255\255\255\ +\255\255\026\001\027\001\028\001\029\001\255\255\106\001\255\255\ +\255\255\109\001\110\001\036\001\255\255\255\255\255\255\255\255\ +\041\001\255\255\000\000\255\255\255\255\255\255\255\255\048\001\ +\049\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\060\001\255\255\255\255\063\001\255\255\ +\255\255\066\001\067\001\068\001\255\255\070\001\255\255\255\255\ +\255\255\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\091\001\092\001\255\255\094\001\095\001\096\001\ +\255\255\255\255\000\001\255\255\002\001\003\001\004\001\255\255\ +\255\255\255\255\008\001\108\001\255\255\255\255\111\001\013\001\ +\255\255\255\255\115\001\017\001\018\001\019\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\026\001\027\001\028\001\029\001\ +\255\255\255\255\255\255\255\255\000\000\255\255\036\001\255\255\ +\255\255\255\255\255\255\041\001\255\255\255\255\000\000\255\255\ +\255\255\255\255\048\001\049\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\060\001\255\255\ +\255\255\063\001\255\255\255\255\066\001\067\001\068\001\255\255\ +\070\001\255\255\255\255\255\255\074\001\255\255\255\255\255\255\ +\255\255\255\255\080\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\091\001\092\001\000\000\ +\094\001\095\001\096\001\255\255\255\255\255\255\255\255\000\001\ +\255\255\002\001\003\001\004\001\255\255\255\255\108\001\008\001\ +\255\255\111\001\255\255\255\255\013\001\115\001\255\255\255\255\ +\017\001\018\001\019\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\026\001\027\001\028\001\029\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\036\001\255\255\255\255\255\255\255\255\ +\041\001\255\255\255\255\255\255\255\255\255\255\255\255\048\001\ +\049\001\000\000\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\060\001\255\255\255\255\063\001\255\255\ +\255\255\066\001\067\001\068\001\255\255\070\001\255\255\255\255\ +\255\255\074\001\255\255\255\255\255\255\255\255\055\001\080\001\ +\057\001\058\001\059\001\255\255\061\001\255\255\255\255\064\001\ +\065\001\255\255\091\001\092\001\255\255\094\001\095\001\096\001\ +\255\255\255\255\000\001\255\255\002\001\003\001\004\001\255\255\ +\081\001\255\255\008\001\108\001\255\255\255\255\111\001\013\001\ +\089\001\090\001\115\001\017\001\018\001\019\001\255\255\255\255\ +\097\001\255\255\255\255\255\255\026\001\027\001\028\001\029\001\ +\255\255\255\255\255\255\255\255\109\001\110\001\036\001\255\255\ +\255\255\255\255\255\255\041\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\048\001\049\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\060\001\255\255\ +\255\255\063\001\000\000\255\255\066\001\067\001\068\001\255\255\ +\070\001\255\255\255\255\255\255\074\001\255\255\255\255\255\255\ +\255\255\255\255\080\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\000\001\091\001\092\001\003\001\ +\094\001\095\001\096\001\255\255\255\255\255\255\000\001\255\255\ +\255\255\013\001\255\255\255\255\255\255\017\001\108\001\019\001\ +\255\255\111\001\255\255\013\001\255\255\115\001\026\001\027\001\ +\028\001\029\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\026\001\255\255\028\001\029\001\255\255\041\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\041\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\000\001\ +\060\001\255\255\255\255\063\001\255\255\255\255\255\255\067\001\ +\068\001\255\255\060\001\255\255\013\001\073\001\074\001\255\255\ +\017\001\067\001\068\001\255\255\080\001\255\255\255\255\255\255\ +\074\001\026\001\027\001\028\001\029\001\000\000\080\001\255\255\ +\092\001\255\255\094\001\255\255\096\001\255\255\255\255\255\255\ +\041\001\255\255\092\001\255\255\255\255\255\255\096\001\255\255\ +\108\001\255\255\255\255\111\001\255\255\255\255\255\255\115\001\ +\255\255\000\001\108\001\060\001\003\001\111\001\063\001\255\255\ +\255\255\066\001\067\001\068\001\255\255\255\255\013\001\255\255\ +\073\001\074\001\017\001\255\255\255\255\255\255\255\255\080\001\ +\255\255\255\255\255\255\026\001\027\001\028\001\029\001\255\255\ +\255\255\255\255\255\255\092\001\255\255\094\001\255\255\096\001\ +\255\255\255\255\041\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\108\001\255\255\255\255\111\001\255\255\ +\255\255\255\255\115\001\255\255\255\255\060\001\255\255\255\255\ +\063\001\255\255\255\255\255\255\067\001\068\001\255\255\255\255\ +\255\255\255\255\073\001\074\001\055\001\255\255\057\001\058\001\ +\059\001\080\001\061\001\255\255\000\000\064\001\065\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\092\001\255\255\094\001\ +\255\255\096\001\255\255\255\255\255\255\255\255\081\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\108\001\089\001\090\001\ +\111\001\255\255\000\001\255\255\115\001\003\001\097\001\005\001\ +\006\001\007\001\008\001\255\255\255\255\011\001\012\001\013\001\ +\255\255\255\255\109\001\110\001\255\255\019\001\255\255\255\255\ +\255\255\023\001\255\255\255\255\026\001\255\255\028\001\029\001\ +\030\001\031\001\032\001\033\001\034\001\035\001\036\001\255\255\ +\255\255\039\001\040\001\041\001\255\255\255\255\000\000\255\255\ +\255\255\255\255\048\001\049\001\050\001\051\001\052\001\053\001\ +\054\001\055\001\056\001\057\001\058\001\059\001\060\001\061\001\ +\255\255\063\001\064\001\065\001\255\255\067\001\068\001\069\001\ +\070\001\071\001\072\001\255\255\074\001\075\001\255\255\077\001\ +\078\001\255\255\080\001\081\001\255\255\255\255\084\001\085\001\ +\255\255\087\001\088\001\089\001\090\001\091\001\092\001\093\001\ +\255\255\095\001\096\001\097\001\255\255\099\001\255\255\101\001\ +\102\001\255\255\104\001\255\255\106\001\107\001\108\001\109\001\ +\110\001\111\001\112\001\000\000\114\001\000\001\255\255\255\255\ +\255\255\004\001\255\255\006\001\255\255\008\001\255\255\010\001\ +\255\255\012\001\255\255\014\001\015\001\255\255\017\001\018\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\027\001\028\001\255\255\030\001\031\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\050\001\ +\051\001\052\001\053\001\255\255\055\001\056\001\255\255\255\255\ +\059\001\000\000\255\255\255\255\255\255\064\001\065\001\066\001\ +\255\255\255\255\255\255\255\255\071\001\255\255\073\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\081\001\255\255\ +\255\255\084\001\255\255\255\255\255\255\255\255\089\001\255\255\ +\091\001\092\001\255\255\094\001\095\001\255\255\097\001\255\255\ +\255\255\255\255\101\001\255\255\255\255\104\001\255\255\106\001\ +\255\255\255\255\109\001\110\001\000\001\255\255\113\001\255\255\ +\004\001\255\255\006\001\000\000\008\001\255\255\010\001\255\255\ +\012\001\255\255\014\001\015\001\255\255\017\001\018\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\027\001\ +\255\255\255\255\030\001\031\001\255\255\255\255\255\255\255\255\ +\255\255\000\000\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\050\001\051\001\ +\255\255\053\001\255\255\055\001\056\001\255\255\255\255\059\001\ +\255\255\255\255\255\255\255\255\064\001\065\001\066\001\255\255\ +\255\255\255\255\255\255\071\001\255\255\073\001\000\001\255\255\ +\255\255\003\001\255\255\255\255\255\255\081\001\008\001\255\255\ +\084\001\255\255\255\255\013\001\014\001\089\001\255\255\091\001\ +\092\001\019\001\094\001\095\001\022\001\097\001\255\255\255\255\ +\026\001\101\001\028\001\029\001\104\001\255\255\106\001\255\255\ +\255\255\109\001\110\001\255\255\255\255\113\001\255\255\041\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\055\001\ +\000\000\057\001\058\001\059\001\255\255\061\001\255\255\255\255\ +\064\001\065\001\060\001\255\255\255\255\063\001\255\255\065\001\ +\066\001\067\001\068\001\000\001\255\255\255\255\003\001\255\255\ +\074\001\081\001\255\255\008\001\255\255\079\001\080\001\255\255\ +\013\001\089\001\090\001\255\255\255\255\255\255\019\001\255\255\ +\255\255\097\001\092\001\255\255\255\255\026\001\096\001\028\001\ +\029\001\255\255\255\255\255\255\255\255\109\001\110\001\255\255\ +\000\000\255\255\108\001\040\001\041\001\111\001\055\001\255\255\ +\057\001\058\001\059\001\255\255\061\001\255\255\255\255\064\001\ +\065\001\255\255\255\255\255\255\255\255\255\255\255\255\060\001\ +\255\255\000\001\063\001\255\255\003\001\066\001\067\001\068\001\ +\081\001\008\001\255\255\255\255\073\001\074\001\013\001\255\255\ +\089\001\090\001\255\255\080\001\019\001\255\255\255\255\255\255\ +\097\001\255\255\255\255\026\001\255\255\028\001\029\001\092\001\ +\000\000\255\255\255\255\096\001\109\001\110\001\255\255\100\001\ +\255\255\040\001\041\001\255\255\255\255\255\255\255\255\108\001\ +\255\255\255\255\111\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\000\001\255\255\060\001\003\001\255\255\ +\063\001\255\255\255\255\066\001\067\001\068\001\255\255\255\255\ +\013\001\255\255\073\001\074\001\255\255\255\255\019\001\255\255\ +\255\255\080\001\255\255\255\255\255\255\026\001\255\255\028\001\ +\029\001\000\001\000\000\255\255\003\001\092\001\255\255\255\255\ +\255\255\096\001\255\255\040\001\041\001\255\255\013\001\255\255\ +\255\255\255\255\017\001\048\001\049\001\108\001\255\255\255\255\ +\111\001\255\255\255\255\026\001\027\001\028\001\029\001\060\001\ +\255\255\255\255\063\001\255\255\255\255\255\255\255\255\068\001\ +\255\255\070\001\041\001\255\255\255\255\074\001\255\255\255\255\ +\255\255\255\255\055\001\080\001\057\001\058\001\059\001\255\255\ +\061\001\255\255\000\000\064\001\065\001\060\001\255\255\092\001\ +\063\001\255\255\255\255\096\001\067\001\068\001\255\255\255\255\ +\255\255\255\255\006\001\074\001\081\001\255\255\255\255\108\001\ +\012\001\080\001\111\001\255\255\089\001\090\001\255\255\255\255\ +\000\001\255\255\255\255\003\001\097\001\092\001\255\255\094\001\ +\008\001\096\001\030\001\031\001\255\255\013\001\255\255\255\255\ +\109\001\110\001\255\255\019\001\255\255\108\001\255\255\000\000\ +\111\001\255\255\026\001\255\255\028\001\029\001\050\001\255\255\ +\052\001\053\001\255\255\055\001\056\001\255\255\255\255\059\001\ +\255\255\041\001\255\255\255\255\064\001\065\001\255\255\255\255\ +\255\255\255\255\255\255\071\001\255\255\255\255\255\255\255\255\ +\000\001\255\255\255\255\003\001\060\001\255\255\255\255\063\001\ +\084\001\255\255\066\001\067\001\068\001\013\001\255\255\255\255\ +\255\255\017\001\074\001\255\255\000\000\097\001\255\255\255\255\ +\080\001\101\001\026\001\027\001\028\001\029\001\106\001\255\255\ +\255\255\109\001\110\001\255\255\092\001\255\255\255\255\255\255\ +\096\001\041\001\255\255\000\000\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\108\001\255\255\255\255\111\001\ +\000\001\255\255\255\255\003\001\060\001\255\255\255\255\063\001\ +\255\255\255\255\255\255\067\001\068\001\013\001\255\255\255\255\ +\255\255\000\000\074\001\019\001\255\255\255\255\255\255\255\255\ +\080\001\255\255\026\001\255\255\028\001\029\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\092\001\255\255\094\001\255\255\ +\096\001\041\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\048\001\255\255\255\255\255\255\108\001\255\255\255\255\111\001\ +\255\255\255\255\000\001\255\255\060\001\003\001\255\255\063\001\ +\255\255\255\255\255\255\067\001\068\001\255\255\070\001\013\001\ +\255\255\000\000\074\001\255\255\255\255\019\001\255\255\255\255\ +\080\001\255\255\255\255\255\255\026\001\255\255\028\001\029\001\ +\255\255\255\255\255\255\255\255\092\001\255\255\255\255\255\255\ +\096\001\255\255\255\255\041\001\255\255\255\255\255\255\000\000\ +\255\255\255\255\255\255\255\255\108\001\255\255\255\255\111\001\ +\255\255\255\255\000\001\255\255\255\255\003\001\060\001\255\255\ +\255\255\063\001\008\001\255\255\255\255\067\001\068\001\013\001\ +\255\255\255\255\255\255\255\255\074\001\019\001\255\255\255\255\ +\255\255\255\255\080\001\255\255\026\001\255\255\028\001\029\001\ +\086\001\255\255\255\255\255\255\255\255\255\255\092\001\255\255\ +\255\255\255\255\096\001\041\001\255\255\255\255\255\255\000\000\ +\255\255\255\255\255\255\255\255\255\255\255\255\108\001\000\001\ +\255\255\111\001\003\001\255\255\255\255\255\255\060\001\255\255\ +\000\000\063\001\255\255\255\255\013\001\067\001\068\001\255\255\ +\255\255\255\255\019\001\255\255\074\001\255\255\255\255\255\255\ +\255\255\026\001\080\001\028\001\029\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\092\001\255\255\ +\041\001\255\255\096\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\000\001\255\255\108\001\003\001\ +\255\255\111\001\255\255\060\001\255\255\255\255\063\001\255\255\ +\000\000\013\001\067\001\068\001\255\255\255\255\255\255\019\001\ +\255\255\074\001\255\255\000\001\255\255\255\255\026\001\080\001\ +\028\001\029\001\255\255\008\001\255\255\000\000\255\255\255\255\ +\013\001\255\255\255\255\092\001\255\255\041\001\000\000\096\001\ +\255\255\255\255\255\255\255\255\255\255\026\001\255\255\028\001\ +\029\001\000\001\255\255\108\001\003\001\255\255\111\001\255\255\ +\060\001\255\255\255\255\063\001\041\001\255\255\013\001\067\001\ +\068\001\255\255\255\255\255\255\019\001\255\255\074\001\255\255\ +\255\255\000\000\255\255\026\001\080\001\028\001\029\001\060\001\ +\255\255\255\255\063\001\255\255\255\255\066\001\067\001\068\001\ +\092\001\255\255\041\001\255\255\096\001\074\001\000\000\255\255\ +\255\255\255\255\255\255\080\001\255\255\255\255\255\255\255\255\ +\108\001\000\001\255\255\111\001\003\001\060\001\255\255\092\001\ +\063\001\255\255\255\255\096\001\067\001\068\001\013\001\255\255\ +\255\255\255\255\255\255\074\001\019\001\255\255\255\255\108\001\ +\255\255\080\001\111\001\026\001\255\255\028\001\029\001\000\001\ +\255\255\255\255\003\001\255\255\255\255\092\001\255\255\255\255\ +\255\255\096\001\041\001\255\255\013\001\255\255\255\255\255\255\ +\255\255\255\255\019\001\255\255\255\255\108\001\255\255\255\255\ +\111\001\026\001\255\255\028\001\029\001\060\001\255\255\255\255\ +\063\001\255\255\255\255\255\255\067\001\068\001\255\255\255\255\ +\041\001\255\255\255\255\074\001\255\255\255\255\255\255\255\255\ +\255\255\080\001\255\255\255\255\255\255\255\255\255\255\000\001\ +\255\255\255\255\003\001\060\001\255\255\092\001\063\001\255\255\ +\255\255\096\001\067\001\068\001\013\001\255\255\255\255\255\255\ +\000\001\074\001\019\001\255\255\255\255\108\001\255\255\080\001\ +\111\001\026\001\255\255\028\001\029\001\013\001\255\255\255\255\ +\255\255\255\255\255\255\092\001\255\255\255\255\255\255\096\001\ +\041\001\255\255\026\001\255\255\028\001\029\001\255\255\255\255\ +\255\255\255\255\255\255\108\001\255\255\255\255\111\001\255\255\ +\255\255\041\001\255\255\060\001\255\255\255\255\063\001\255\255\ +\255\255\255\255\067\001\068\001\255\255\255\255\255\255\255\255\ +\000\001\074\001\255\255\255\255\060\001\255\255\255\255\080\001\ +\255\255\255\255\066\001\067\001\068\001\013\001\255\255\255\255\ +\255\255\255\255\074\001\092\001\255\255\000\001\255\255\096\001\ +\080\001\255\255\026\001\255\255\028\001\029\001\000\001\255\255\ +\255\255\255\255\013\001\108\001\092\001\255\255\111\001\255\255\ +\096\001\041\001\255\255\013\001\255\255\255\255\255\255\026\001\ +\255\255\028\001\029\001\255\255\108\001\255\255\255\255\111\001\ +\026\001\255\255\028\001\029\001\060\001\255\255\041\001\063\001\ +\255\255\000\001\255\255\255\255\068\001\255\255\255\255\041\001\ +\255\255\255\255\074\001\255\255\255\255\255\255\013\001\255\255\ +\080\001\060\001\255\255\255\255\063\001\255\255\000\001\255\255\ +\255\255\068\001\060\001\026\001\092\001\028\001\029\001\074\001\ +\096\001\255\255\068\001\013\001\255\255\080\001\255\255\255\255\ +\074\001\255\255\041\001\255\255\108\001\255\255\080\001\111\001\ +\026\001\092\001\028\001\029\001\255\255\096\001\255\255\255\255\ +\255\255\255\255\092\001\255\255\255\255\060\001\096\001\041\001\ +\255\255\108\001\255\255\255\255\111\001\068\001\255\255\255\255\ +\255\255\255\255\108\001\074\001\255\255\111\001\255\255\255\255\ +\255\255\080\001\060\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\068\001\255\255\255\255\092\001\255\255\255\255\ +\074\001\096\001\255\255\255\255\255\255\255\255\080\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\108\001\255\255\255\255\ +\111\001\255\255\092\001\000\001\255\255\255\255\096\001\255\255\ +\005\001\006\001\007\001\008\001\255\255\255\255\011\001\012\001\ +\013\001\014\001\108\001\255\255\255\255\111\001\019\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\026\001\255\255\028\001\ +\029\001\030\001\031\001\032\001\033\001\034\001\035\001\255\255\ +\255\255\255\255\039\001\255\255\041\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\049\001\050\001\051\001\052\001\ +\053\001\054\001\055\001\056\001\255\255\255\255\059\001\060\001\ +\255\255\255\255\063\001\064\001\065\001\066\001\255\255\068\001\ +\069\001\070\001\071\001\072\001\255\255\074\001\255\255\255\255\ +\077\001\078\001\255\255\080\001\081\001\255\255\255\255\084\001\ +\085\001\255\255\087\001\255\255\089\001\090\001\255\255\092\001\ +\093\001\255\255\255\255\096\001\097\001\255\255\099\001\255\255\ +\101\001\102\001\255\255\104\001\255\255\106\001\107\001\108\001\ +\109\001\110\001\111\001\112\001\000\001\114\001\255\255\255\255\ +\255\255\005\001\006\001\007\001\008\001\255\255\255\255\011\001\ +\012\001\255\255\255\255\255\255\255\255\255\255\255\255\019\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\026\001\255\255\ +\028\001\255\255\030\001\031\001\032\001\033\001\034\001\035\001\ +\255\255\255\255\255\255\039\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\049\001\050\001\051\001\ +\052\001\053\001\054\001\055\001\056\001\255\255\255\255\059\001\ +\060\001\255\255\255\255\063\001\064\001\065\001\255\255\255\255\ +\068\001\069\001\070\001\071\001\072\001\255\255\074\001\255\255\ +\255\255\077\001\078\001\255\255\255\255\081\001\255\255\255\255\ +\084\001\085\001\255\255\087\001\255\255\089\001\090\001\255\255\ +\255\255\093\001\255\255\255\255\255\255\097\001\255\255\099\001\ +\255\255\101\001\102\001\255\255\104\001\255\255\106\001\107\001\ +\255\255\109\001\110\001\111\001\112\001\255\255\114\001\000\001\ +\001\001\002\001\255\255\255\255\005\001\006\001\007\001\255\255\ +\009\001\255\255\011\001\012\001\255\255\255\255\015\001\016\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\027\001\255\255\255\255\030\001\031\001\032\001\ +\033\001\034\001\255\255\036\001\255\255\255\255\039\001\255\255\ +\255\255\042\001\043\001\044\001\045\001\046\001\047\001\255\255\ +\255\255\050\001\255\255\052\001\053\001\054\001\055\001\056\001\ +\255\255\255\255\059\001\255\255\061\001\255\255\063\001\064\001\ +\065\001\255\255\255\255\255\255\069\001\255\255\071\001\072\001\ +\255\255\074\001\255\255\255\255\255\255\078\001\255\255\255\255\ +\255\255\082\001\083\001\084\001\085\001\086\001\087\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\094\001\255\255\255\255\ +\255\255\098\001\255\255\100\001\101\001\255\255\255\255\255\255\ +\255\255\106\001\107\001\255\255\109\001\110\001\000\001\001\001\ +\002\001\114\001\255\255\005\001\006\001\007\001\255\255\009\001\ +\255\255\011\001\012\001\255\255\255\255\015\001\016\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\027\001\255\255\255\255\030\001\031\001\032\001\033\001\ +\034\001\255\255\036\001\255\255\255\255\039\001\255\255\255\255\ +\042\001\043\001\044\001\045\001\046\001\047\001\255\255\255\255\ +\050\001\255\255\052\001\053\001\054\001\055\001\056\001\255\255\ +\255\255\059\001\255\255\061\001\255\255\063\001\064\001\065\001\ +\255\255\255\255\255\255\069\001\255\255\071\001\072\001\255\255\ +\074\001\255\255\255\255\255\255\078\001\255\255\255\255\255\255\ +\082\001\083\001\084\001\085\001\086\001\087\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\094\001\255\255\255\255\255\255\ +\098\001\255\255\100\001\101\001\255\255\255\255\255\255\255\255\ +\106\001\107\001\255\255\109\001\110\001\000\001\255\255\255\255\ +\114\001\255\255\005\001\006\001\007\001\255\255\255\255\255\255\ +\011\001\012\001\013\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\026\001\ +\255\255\028\001\029\001\030\001\031\001\032\001\033\001\034\001\ +\255\255\255\255\255\255\255\255\039\001\255\255\041\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\050\001\ +\255\255\052\001\053\001\054\001\055\001\056\001\255\255\255\255\ +\059\001\060\001\255\255\255\255\063\001\064\001\065\001\255\255\ +\255\255\068\001\069\001\255\255\071\001\072\001\255\255\074\001\ +\255\255\255\255\255\255\078\001\255\255\080\001\255\255\255\255\ +\255\255\084\001\085\001\000\001\087\001\255\255\255\255\255\255\ +\005\001\006\001\007\001\255\255\255\255\096\001\011\001\012\001\ +\255\255\255\255\101\001\255\255\255\255\255\255\255\255\106\001\ +\107\001\108\001\109\001\110\001\111\001\255\255\255\255\114\001\ +\255\255\030\001\031\001\032\001\033\001\034\001\255\255\255\255\ +\255\255\255\255\039\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\050\001\255\255\052\001\ +\053\001\054\001\055\001\056\001\255\255\255\255\059\001\255\255\ +\255\255\255\255\063\001\064\001\065\001\255\255\255\255\255\255\ +\069\001\255\255\071\001\072\001\255\255\255\255\255\255\255\255\ +\255\255\078\001\255\255\255\255\255\255\255\255\255\255\084\001\ +\085\001\000\001\087\001\255\255\255\255\255\255\005\001\006\001\ +\007\001\094\001\255\255\255\255\011\001\012\001\255\255\255\255\ +\101\001\255\255\255\255\255\255\255\255\106\001\107\001\255\255\ +\109\001\110\001\255\255\255\255\255\255\114\001\255\255\030\001\ +\031\001\032\001\033\001\034\001\255\255\255\255\255\255\255\255\ +\039\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\050\001\255\255\052\001\053\001\054\001\ +\055\001\056\001\255\255\255\255\059\001\255\255\255\255\255\255\ +\063\001\064\001\065\001\255\255\255\255\255\255\069\001\255\255\ +\071\001\072\001\255\255\255\255\255\255\255\255\255\255\078\001\ +\255\255\255\255\255\255\255\255\255\255\084\001\085\001\000\001\ +\087\001\255\255\255\255\255\255\005\001\006\001\007\001\094\001\ +\255\255\255\255\011\001\012\001\255\255\255\255\101\001\255\255\ +\255\255\255\255\255\255\106\001\107\001\255\255\109\001\110\001\ +\255\255\255\255\255\255\114\001\255\255\030\001\031\001\032\001\ +\033\001\034\001\255\255\255\255\255\255\255\255\039\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\050\001\255\255\052\001\053\001\054\001\055\001\056\001\ +\255\255\255\255\059\001\255\255\255\255\255\255\063\001\064\001\ +\065\001\255\255\255\255\255\255\069\001\255\255\071\001\072\001\ +\255\255\255\255\255\255\255\255\255\255\078\001\255\255\255\255\ +\255\255\255\255\255\255\084\001\085\001\000\001\087\001\255\255\ +\255\255\255\255\005\001\006\001\007\001\094\001\255\255\255\255\ +\011\001\012\001\255\255\255\255\101\001\255\255\255\255\255\255\ +\255\255\106\001\107\001\255\255\109\001\110\001\255\255\255\255\ +\255\255\114\001\255\255\030\001\031\001\032\001\033\001\034\001\ +\255\255\255\255\255\255\255\255\039\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\050\001\ +\255\255\052\001\053\001\054\001\055\001\056\001\255\255\255\255\ +\059\001\255\255\255\255\255\255\063\001\064\001\065\001\255\255\ +\255\255\255\255\069\001\255\255\071\001\072\001\255\255\255\255\ +\255\255\255\255\255\255\078\001\255\255\255\255\255\255\255\255\ +\255\255\084\001\085\001\255\255\087\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\094\001\003\001\004\001\005\001\255\255\ +\255\255\255\255\101\001\255\255\011\001\255\255\013\001\106\001\ +\107\001\255\255\109\001\110\001\019\001\020\001\021\001\114\001\ +\255\255\024\001\025\001\026\001\255\255\028\001\029\001\030\001\ +\255\255\032\001\033\001\034\001\035\001\255\255\255\255\255\255\ +\039\001\040\001\041\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\048\001\049\001\255\255\255\255\052\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\063\001\064\001\255\255\255\255\255\255\000\001\069\001\070\001\ +\255\255\004\001\255\255\074\001\075\001\076\001\077\001\078\001\ +\079\001\080\001\255\255\082\001\255\255\255\255\017\001\255\255\ +\019\001\088\001\255\255\022\001\255\255\255\255\093\001\026\001\ +\027\001\255\255\255\255\255\255\099\001\255\255\255\255\102\001\ +\103\001\036\001\105\001\106\001\107\001\108\001\109\001\255\255\ +\111\001\112\001\113\001\114\001\115\001\048\001\049\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\060\001\255\255\255\255\255\255\064\001\255\255\066\001\ +\067\001\068\001\255\255\070\001\255\255\255\255\073\001\255\255\ +\255\255\255\255\000\001\001\001\002\001\255\255\255\255\255\255\ +\006\001\007\001\255\255\009\001\255\255\255\255\012\001\090\001\ +\091\001\015\001\016\001\255\255\095\001\255\255\097\001\255\255\ +\255\255\100\001\255\255\255\255\255\255\027\001\028\001\255\255\ +\030\001\031\001\109\001\255\255\111\001\255\255\036\001\255\255\ +\255\255\255\255\255\255\255\255\042\001\043\001\044\001\045\001\ +\046\001\047\001\255\255\255\255\050\001\255\255\052\001\053\001\ +\255\255\055\001\056\001\255\255\255\255\059\001\255\255\061\001\ +\255\255\255\255\064\001\065\001\255\255\255\255\255\255\255\255\ +\255\255\071\001\072\001\255\255\074\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\082\001\083\001\084\001\085\001\ +\086\001\087\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\094\001\255\255\255\255\097\001\098\001\255\255\100\001\101\001\ +\255\255\255\255\255\255\255\255\106\001\255\255\108\001\109\001\ +\110\001\000\001\001\001\002\001\255\255\255\255\255\255\006\001\ +\007\001\255\255\009\001\255\255\255\255\012\001\255\255\255\255\ +\015\001\016\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\027\001\028\001\255\255\030\001\ +\031\001\255\255\255\255\255\255\255\255\036\001\255\255\255\255\ +\255\255\255\255\255\255\042\001\043\001\044\001\045\001\046\001\ +\047\001\255\255\255\255\050\001\255\255\052\001\053\001\255\255\ +\055\001\056\001\255\255\255\255\059\001\255\255\061\001\255\255\ +\255\255\064\001\065\001\255\255\255\255\255\255\255\255\255\255\ +\071\001\072\001\255\255\074\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\082\001\083\001\084\001\085\001\086\001\ +\087\001\255\255\255\255\255\255\255\255\255\255\255\255\094\001\ +\255\255\255\255\097\001\098\001\255\255\100\001\101\001\255\255\ +\255\255\255\255\255\255\106\001\255\255\108\001\109\001\110\001\ +\000\001\001\001\002\001\255\255\255\255\255\255\006\001\007\001\ +\255\255\009\001\255\255\255\255\012\001\255\255\255\255\015\001\ +\016\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\027\001\028\001\255\255\030\001\031\001\ +\255\255\255\255\255\255\255\255\036\001\255\255\255\255\255\255\ +\255\255\255\255\042\001\043\001\044\001\045\001\046\001\047\001\ +\255\255\255\255\050\001\255\255\052\001\053\001\255\255\055\001\ +\056\001\255\255\255\255\059\001\255\255\061\001\255\255\255\255\ +\064\001\065\001\255\255\255\255\255\255\255\255\255\255\071\001\ +\072\001\255\255\074\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\082\001\083\001\084\001\085\001\086\001\087\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\094\001\255\255\ +\255\255\097\001\098\001\255\255\100\001\101\001\255\255\255\255\ +\255\255\255\255\106\001\255\255\108\001\109\001\110\001\000\001\ +\001\001\002\001\255\255\255\255\255\255\006\001\007\001\255\255\ +\009\001\255\255\255\255\012\001\255\255\255\255\015\001\016\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\027\001\028\001\255\255\030\001\031\001\255\255\ +\255\255\255\255\255\255\036\001\255\255\255\255\255\255\255\255\ +\255\255\042\001\043\001\044\001\045\001\046\001\047\001\255\255\ +\255\255\050\001\255\255\052\001\053\001\255\255\055\001\056\001\ +\255\255\255\255\059\001\255\255\061\001\255\255\255\255\064\001\ +\065\001\255\255\255\255\255\255\255\255\255\255\071\001\072\001\ +\255\255\074\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\082\001\083\001\084\001\085\001\086\001\087\001\255\255\ +\255\255\000\001\255\255\255\255\255\255\094\001\255\255\006\001\ +\097\001\098\001\255\255\100\001\101\001\012\001\255\255\255\255\ +\015\001\106\001\255\255\255\255\109\001\110\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\028\001\255\255\030\001\ +\031\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\050\001\255\255\052\001\053\001\255\255\ +\055\001\056\001\255\255\255\255\059\001\255\255\000\001\255\255\ +\255\255\064\001\065\001\255\255\006\001\255\255\255\255\255\255\ +\071\001\255\255\012\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\084\001\255\255\255\255\ +\255\255\255\255\028\001\255\255\030\001\031\001\255\255\094\001\ +\255\255\255\255\097\001\255\255\255\255\255\255\101\001\255\255\ +\255\255\255\255\255\255\106\001\255\255\255\255\109\001\110\001\ +\050\001\255\255\052\001\053\001\255\255\055\001\056\001\255\255\ +\255\255\059\001\255\255\000\001\255\255\255\255\064\001\065\001\ +\255\255\006\001\255\255\255\255\255\255\071\001\255\255\012\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\084\001\255\255\255\255\255\255\255\255\028\001\ +\255\255\030\001\031\001\255\255\255\255\255\255\255\255\097\001\ +\255\255\255\255\255\255\101\001\255\255\255\255\255\255\255\255\ +\106\001\255\255\255\255\109\001\110\001\050\001\255\255\052\001\ +\053\001\255\255\055\001\056\001\255\255\255\255\059\001\255\255\ +\000\001\255\255\255\255\064\001\065\001\255\255\006\001\255\255\ +\255\255\255\255\071\001\255\255\012\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\084\001\ +\255\255\255\255\255\255\255\255\028\001\255\255\030\001\031\001\ +\255\255\255\255\255\255\255\255\097\001\255\255\255\255\255\255\ +\101\001\255\255\255\255\255\255\255\255\106\001\255\255\255\255\ +\109\001\110\001\050\001\255\255\052\001\053\001\255\255\055\001\ +\056\001\255\255\255\255\059\001\255\255\000\001\255\255\255\255\ +\064\001\065\001\255\255\006\001\255\255\255\255\255\255\071\001\ +\255\255\012\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\084\001\255\255\255\255\255\255\ +\255\255\028\001\255\255\030\001\031\001\255\255\255\255\255\255\ +\255\255\097\001\255\255\255\255\255\255\101\001\255\255\255\255\ +\255\255\255\255\106\001\255\255\255\255\109\001\110\001\050\001\ +\255\255\052\001\053\001\255\255\055\001\056\001\255\255\255\255\ +\059\001\255\255\000\001\255\255\255\255\064\001\065\001\255\255\ +\006\001\255\255\255\255\255\255\071\001\255\255\012\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\084\001\255\255\255\255\255\255\255\255\028\001\255\255\ +\030\001\031\001\255\255\255\255\255\255\255\255\097\001\255\255\ +\255\255\255\255\101\001\255\255\255\255\255\255\255\255\106\001\ +\255\255\255\255\109\001\110\001\050\001\255\255\052\001\053\001\ +\255\255\055\001\056\001\255\255\255\255\059\001\255\255\255\255\ +\255\255\255\255\064\001\065\001\005\001\006\001\007\001\255\255\ +\255\255\071\001\011\001\012\001\013\001\014\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\084\001\255\255\ +\255\255\255\255\255\255\028\001\029\001\030\001\031\001\032\001\ +\033\001\034\001\255\255\097\001\255\255\255\255\039\001\101\001\ +\041\001\255\255\255\255\255\255\106\001\255\255\255\255\109\001\ +\110\001\050\001\255\255\052\001\053\001\054\001\055\001\056\001\ +\255\255\255\255\059\001\060\001\255\255\255\255\063\001\064\001\ +\065\001\255\255\255\255\068\001\069\001\255\255\071\001\072\001\ +\255\255\074\001\255\255\255\255\255\255\078\001\255\255\080\001\ +\255\255\255\255\255\255\084\001\085\001\255\255\087\001\255\255\ +\089\001\255\255\255\255\005\001\006\001\007\001\255\255\096\001\ +\255\255\011\001\012\001\013\001\101\001\255\255\255\255\255\255\ +\255\255\106\001\107\001\108\001\109\001\110\001\111\001\255\255\ +\255\255\114\001\028\001\029\001\030\001\031\001\032\001\033\001\ +\034\001\255\255\255\255\255\255\255\255\039\001\255\255\041\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\050\001\255\255\052\001\053\001\054\001\055\001\056\001\255\255\ +\255\255\059\001\060\001\255\255\255\255\063\001\064\001\065\001\ +\255\255\255\255\068\001\069\001\255\255\071\001\072\001\255\255\ +\074\001\255\255\255\255\255\255\078\001\255\255\080\001\255\255\ +\255\255\255\255\084\001\085\001\255\255\087\001\255\255\255\255\ +\255\255\005\001\006\001\007\001\255\255\255\255\096\001\011\001\ +\012\001\255\255\255\255\101\001\255\255\255\255\255\255\255\255\ +\106\001\107\001\108\001\109\001\110\001\111\001\255\255\255\255\ +\114\001\255\255\030\001\031\001\032\001\033\001\034\001\255\255\ +\255\255\255\255\255\255\039\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\050\001\255\255\ +\052\001\053\001\054\001\055\001\056\001\255\255\255\255\059\001\ +\255\255\255\255\255\255\063\001\064\001\065\001\255\255\255\255\ +\255\255\069\001\255\255\071\001\072\001\255\255\255\255\255\255\ +\255\255\255\255\078\001\255\255\255\255\255\255\255\255\255\255\ +\084\001\085\001\255\255\087\001\255\255\255\255\255\255\255\255\ +\092\001\005\001\006\001\007\001\255\255\255\255\010\001\011\001\ +\012\001\101\001\255\255\255\255\255\255\255\255\106\001\107\001\ +\255\255\109\001\110\001\255\255\255\255\255\255\114\001\255\255\ +\255\255\255\255\030\001\031\001\032\001\033\001\034\001\255\255\ +\255\255\255\255\255\255\039\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\050\001\255\255\ +\052\001\053\001\054\001\055\001\056\001\255\255\255\255\059\001\ +\255\255\255\255\255\255\063\001\064\001\065\001\255\255\255\255\ +\255\255\069\001\255\255\071\001\072\001\255\255\255\255\255\255\ +\255\255\255\255\078\001\255\255\255\255\255\255\255\255\255\255\ +\084\001\085\001\255\255\087\001\255\255\255\255\005\001\006\001\ +\007\001\255\255\255\255\255\255\011\001\012\001\255\255\255\255\ +\255\255\101\001\255\255\255\255\255\255\255\255\106\001\107\001\ +\255\255\109\001\110\001\026\001\255\255\255\255\114\001\030\001\ +\031\001\032\001\033\001\034\001\255\255\255\255\255\255\255\255\ +\039\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\050\001\255\255\052\001\053\001\054\001\ +\055\001\056\001\255\255\255\255\059\001\255\255\255\255\255\255\ +\063\001\064\001\065\001\255\255\255\255\255\255\069\001\255\255\ +\071\001\072\001\255\255\255\255\255\255\255\255\255\255\078\001\ +\255\255\255\255\255\255\255\255\255\255\084\001\085\001\255\255\ +\087\001\255\255\255\255\005\001\006\001\007\001\255\255\255\255\ +\255\255\011\001\012\001\255\255\255\255\255\255\101\001\255\255\ +\255\255\255\255\255\255\106\001\107\001\255\255\109\001\110\001\ +\255\255\255\255\255\255\114\001\030\001\031\001\032\001\033\001\ +\034\001\255\255\255\255\255\255\255\255\039\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\050\001\255\255\052\001\053\001\054\001\055\001\056\001\255\255\ +\255\255\059\001\255\255\255\255\255\255\063\001\064\001\065\001\ +\255\255\255\255\255\255\069\001\255\255\071\001\072\001\255\255\ +\255\255\255\255\255\255\255\255\078\001\255\255\255\255\255\255\ +\255\255\083\001\084\001\085\001\255\255\087\001\255\255\255\255\ +\005\001\006\001\007\001\255\255\255\255\255\255\011\001\012\001\ +\255\255\255\255\255\255\101\001\255\255\255\255\255\255\255\255\ +\106\001\107\001\255\255\109\001\110\001\255\255\255\255\255\255\ +\114\001\030\001\031\001\032\001\033\001\034\001\255\255\255\255\ +\255\255\255\255\039\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\050\001\255\255\052\001\ +\053\001\054\001\055\001\056\001\255\255\255\255\059\001\255\255\ +\255\255\255\255\063\001\064\001\065\001\255\255\255\255\255\255\ +\069\001\255\255\071\001\072\001\255\255\255\255\255\255\255\255\ +\255\255\078\001\255\255\255\255\255\255\255\255\255\255\084\001\ +\085\001\255\255\087\001\255\255\255\255\255\255\255\255\092\001\ +\005\001\006\001\007\001\255\255\255\255\010\001\011\001\012\001\ +\101\001\255\255\255\255\255\255\255\255\106\001\107\001\255\255\ +\109\001\110\001\255\255\255\255\255\255\114\001\255\255\255\255\ +\255\255\030\001\031\001\032\001\033\001\034\001\255\255\255\255\ +\255\255\255\255\039\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\050\001\255\255\052\001\ +\053\001\054\001\055\001\056\001\255\255\255\255\059\001\255\255\ +\255\255\255\255\063\001\064\001\065\001\255\255\255\255\255\255\ +\069\001\255\255\071\001\072\001\255\255\255\255\255\255\255\255\ +\255\255\078\001\255\255\255\255\255\255\255\255\255\255\084\001\ +\085\001\255\255\087\001\255\255\255\255\255\255\005\001\006\001\ +\007\001\255\255\255\255\255\255\011\001\012\001\255\255\255\255\ +\101\001\255\255\255\255\255\255\255\255\106\001\107\001\022\001\ +\109\001\110\001\255\255\255\255\255\255\114\001\255\255\030\001\ +\031\001\032\001\033\001\034\001\255\255\255\255\255\255\255\255\ +\039\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\050\001\255\255\052\001\053\001\054\001\ +\055\001\056\001\255\255\255\255\059\001\255\255\255\255\255\255\ +\063\001\064\001\065\001\255\255\255\255\255\255\069\001\255\255\ +\071\001\072\001\255\255\255\255\255\255\255\255\255\255\078\001\ +\255\255\255\255\255\255\255\255\255\255\084\001\085\001\255\255\ +\087\001\255\255\255\255\005\001\006\001\007\001\255\255\255\255\ +\255\255\011\001\012\001\255\255\255\255\255\255\101\001\255\255\ +\255\255\255\255\255\255\106\001\107\001\255\255\109\001\110\001\ +\026\001\255\255\255\255\114\001\030\001\031\001\032\001\033\001\ +\034\001\255\255\255\255\255\255\255\255\039\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\050\001\255\255\052\001\053\001\054\001\055\001\056\001\255\255\ +\255\255\059\001\255\255\255\255\255\255\063\001\064\001\065\001\ +\255\255\255\255\255\255\069\001\255\255\071\001\072\001\255\255\ +\255\255\255\255\255\255\255\255\078\001\255\255\255\255\255\255\ +\255\255\255\255\084\001\085\001\255\255\087\001\255\255\255\255\ +\005\001\006\001\007\001\255\255\255\255\255\255\011\001\012\001\ +\255\255\255\255\255\255\101\001\255\255\255\255\255\255\255\255\ +\106\001\107\001\255\255\109\001\110\001\255\255\255\255\255\255\ +\114\001\030\001\031\001\032\001\033\001\034\001\255\255\255\255\ +\255\255\255\255\039\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\050\001\255\255\052\001\ +\053\001\054\001\055\001\056\001\255\255\255\255\059\001\255\255\ +\255\255\255\255\063\001\064\001\065\001\255\255\255\255\255\255\ +\069\001\255\255\071\001\072\001\255\255\255\255\255\255\255\255\ +\255\255\078\001\255\255\255\255\255\255\255\255\255\255\084\001\ +\085\001\255\255\087\001\255\255\255\255\005\001\006\001\007\001\ +\255\255\255\255\255\255\011\001\012\001\255\255\255\255\255\255\ +\101\001\255\255\255\255\255\255\255\255\106\001\107\001\255\255\ +\109\001\110\001\255\255\255\255\255\255\114\001\030\001\031\001\ +\032\001\033\001\034\001\255\255\255\255\255\255\255\255\039\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\050\001\255\255\052\001\053\001\054\001\055\001\ +\056\001\255\255\255\255\059\001\255\255\255\255\255\255\063\001\ +\064\001\065\001\255\255\255\255\255\255\069\001\255\255\071\001\ +\072\001\255\255\255\255\255\255\255\255\255\255\078\001\255\255\ +\255\255\255\255\255\255\255\255\084\001\085\001\255\255\087\001\ +\255\255\255\255\005\001\006\001\007\001\255\255\255\255\255\255\ +\011\001\012\001\255\255\255\255\255\255\101\001\255\255\255\255\ +\255\255\255\255\106\001\107\001\255\255\109\001\110\001\255\255\ +\255\255\255\255\114\001\030\001\031\001\032\001\033\001\034\001\ +\255\255\255\255\255\255\255\255\039\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\050\001\ +\255\255\052\001\053\001\054\001\055\001\056\001\255\255\255\255\ +\059\001\255\255\255\255\255\255\063\001\064\001\065\001\255\255\ +\255\255\006\001\069\001\255\255\071\001\072\001\255\255\012\001\ +\255\255\014\001\255\255\078\001\017\001\255\255\255\255\255\255\ +\255\255\084\001\085\001\255\255\087\001\255\255\027\001\255\255\ +\255\255\030\001\031\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\101\001\255\255\255\255\255\255\255\255\106\001\ +\107\001\255\255\109\001\110\001\255\255\050\001\051\001\114\001\ +\053\001\255\255\055\001\056\001\255\255\255\255\059\001\255\255\ +\255\255\255\255\255\255\064\001\065\001\255\255\006\001\255\255\ +\255\255\255\255\071\001\255\255\012\001\255\255\014\001\255\255\ +\255\255\017\001\255\255\255\255\081\001\255\255\255\255\084\001\ +\255\255\255\255\255\255\027\001\089\001\255\255\030\001\031\001\ +\255\255\006\001\255\255\255\255\097\001\255\255\255\255\012\001\ +\101\001\014\001\255\255\104\001\255\255\106\001\255\255\255\255\ +\109\001\110\001\050\001\051\001\255\255\053\001\255\255\055\001\ +\056\001\030\001\031\001\059\001\255\255\255\255\255\255\255\255\ +\064\001\065\001\255\255\255\255\255\255\255\255\255\255\071\001\ +\255\255\255\255\255\255\255\255\255\255\050\001\051\001\255\255\ +\053\001\081\001\055\001\056\001\084\001\255\255\059\001\255\255\ +\255\255\089\001\255\255\064\001\065\001\255\255\255\255\255\255\ +\255\255\097\001\071\001\255\255\073\001\101\001\255\255\255\255\ +\104\001\255\255\106\001\255\255\081\001\109\001\110\001\084\001\ +\255\255\255\255\006\001\255\255\089\001\255\255\255\255\255\255\ +\012\001\255\255\014\001\255\255\097\001\255\255\255\255\255\255\ +\101\001\255\255\255\255\104\001\255\255\106\001\255\255\027\001\ +\109\001\110\001\030\001\031\001\255\255\006\001\255\255\255\255\ +\255\255\255\255\255\255\012\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\050\001\051\001\ +\255\255\053\001\255\255\055\001\056\001\030\001\031\001\059\001\ +\255\255\255\255\255\255\255\255\064\001\065\001\255\255\255\255\ +\255\255\255\255\255\255\071\001\255\255\255\255\255\255\255\255\ +\255\255\050\001\051\001\255\255\053\001\081\001\055\001\056\001\ +\084\001\255\255\059\001\255\255\255\255\089\001\255\255\064\001\ +\065\001\255\255\006\001\255\255\255\255\097\001\071\001\255\255\ +\012\001\101\001\255\255\255\255\104\001\255\255\106\001\255\255\ +\081\001\109\001\110\001\084\001\255\255\255\255\255\255\255\255\ +\089\001\255\255\030\001\031\001\255\255\255\255\255\255\255\255\ +\097\001\255\255\255\255\255\255\101\001\255\255\255\255\104\001\ +\255\255\106\001\255\255\255\255\109\001\110\001\050\001\051\001\ +\255\255\053\001\255\255\055\001\056\001\255\255\255\255\059\001\ +\255\255\255\255\255\255\255\255\064\001\065\001\255\255\255\255\ +\006\001\255\255\255\255\071\001\255\255\255\255\012\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\081\001\255\255\255\255\ +\084\001\255\255\255\255\255\255\255\255\089\001\028\001\255\255\ +\030\001\031\001\255\255\255\255\255\255\097\001\255\255\255\255\ +\255\255\101\001\255\255\255\255\104\001\255\255\106\001\255\255\ +\255\255\109\001\110\001\255\255\050\001\255\255\052\001\053\001\ +\255\255\055\001\056\001\255\255\255\255\059\001\255\255\255\255\ +\255\255\255\255\064\001\065\001\255\255\255\255\255\255\006\001\ +\255\255\071\001\255\255\010\001\255\255\012\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\084\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\028\001\092\001\030\001\ +\031\001\255\255\255\255\097\001\255\255\255\255\255\255\101\001\ +\255\255\255\255\255\255\255\255\106\001\255\255\255\255\109\001\ +\110\001\255\255\255\255\050\001\255\255\052\001\053\001\255\255\ +\055\001\056\001\255\255\255\255\059\001\255\255\255\255\255\255\ +\255\255\064\001\065\001\255\255\006\001\255\255\255\255\255\255\ +\071\001\255\255\012\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\006\001\007\001\255\255\255\255\084\001\011\001\012\001\ +\255\255\255\255\028\001\255\255\030\001\031\001\255\255\255\255\ +\255\255\255\255\097\001\255\255\255\255\255\255\101\001\255\255\ +\255\255\030\001\031\001\106\001\255\255\255\255\109\001\110\001\ +\050\001\255\255\052\001\053\001\255\255\055\001\056\001\255\255\ +\255\255\059\001\255\255\255\255\255\255\050\001\064\001\065\001\ +\053\001\054\001\055\001\056\001\255\255\071\001\059\001\255\255\ +\006\001\255\255\008\001\064\001\065\001\255\255\012\001\255\255\ +\255\255\255\255\084\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\092\001\255\255\255\255\255\255\028\001\097\001\ +\030\001\031\001\087\001\101\001\255\255\255\255\255\255\255\255\ +\106\001\255\255\255\255\109\001\110\001\255\255\255\255\255\255\ +\101\001\255\255\255\255\255\255\050\001\106\001\052\001\053\001\ +\109\001\055\001\056\001\255\255\255\255\059\001\255\255\255\255\ +\255\255\255\255\064\001\065\001\255\255\006\001\255\255\255\255\ +\255\255\071\001\255\255\012\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\084\001\255\255\ +\255\255\255\255\255\255\028\001\255\255\030\001\031\001\255\255\ +\255\255\255\255\255\255\097\001\255\255\255\255\255\255\101\001\ +\255\255\255\255\255\255\255\255\106\001\255\255\255\255\109\001\ +\110\001\050\001\255\255\052\001\053\001\255\255\055\001\056\001\ +\255\255\255\255\059\001\255\255\255\255\255\255\255\255\064\001\ +\065\001\255\255\006\001\255\255\255\255\255\255\071\001\255\255\ +\012\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\084\001\255\255\255\255\255\255\255\255\ +\028\001\255\255\030\001\031\001\255\255\006\001\255\255\255\255\ +\097\001\255\255\255\255\012\001\101\001\255\255\255\255\255\255\ +\255\255\106\001\255\255\255\255\109\001\110\001\050\001\255\255\ +\052\001\053\001\255\255\055\001\056\001\030\001\031\001\059\001\ +\255\255\255\255\255\255\255\255\064\001\065\001\255\255\255\255\ +\255\255\255\255\255\255\071\001\255\255\255\255\255\255\255\255\ +\255\255\050\001\255\255\052\001\053\001\255\255\055\001\056\001\ +\084\001\255\255\059\001\255\255\255\255\255\255\255\255\064\001\ +\065\001\255\255\006\001\255\255\255\255\097\001\071\001\255\255\ +\012\001\101\001\255\255\255\255\255\255\255\255\106\001\255\255\ +\255\255\109\001\110\001\084\001\255\255\255\255\255\255\255\255\ +\028\001\255\255\030\001\031\001\093\001\006\001\255\255\255\255\ +\097\001\255\255\255\255\012\001\101\001\255\255\255\255\255\255\ +\255\255\106\001\255\255\255\255\109\001\110\001\050\001\255\255\ +\052\001\053\001\255\255\055\001\056\001\030\001\031\001\059\001\ +\255\255\255\255\255\255\255\255\064\001\065\001\255\255\255\255\ +\255\255\255\255\255\255\071\001\255\255\255\255\255\255\255\255\ +\255\255\050\001\255\255\052\001\053\001\255\255\055\001\056\001\ +\084\001\255\255\059\001\255\255\255\255\255\255\255\255\064\001\ +\065\001\255\255\006\001\255\255\255\255\097\001\071\001\255\255\ +\012\001\101\001\255\255\255\255\255\255\255\255\106\001\255\255\ +\255\255\109\001\110\001\084\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\030\001\031\001\255\255\006\001\255\255\255\255\ +\097\001\255\255\255\255\012\001\101\001\255\255\255\255\255\255\ +\255\255\106\001\255\255\255\255\109\001\110\001\050\001\255\255\ +\052\001\053\001\255\255\055\001\056\001\030\001\031\001\059\001\ +\255\255\255\255\255\255\255\255\064\001\065\001\255\255\255\255\ +\255\255\255\255\255\255\071\001\255\255\255\255\255\255\255\255\ +\255\255\050\001\255\255\255\255\053\001\255\255\055\001\056\001\ +\084\001\255\255\059\001\255\255\255\255\255\255\255\255\064\001\ +\065\001\255\255\006\001\255\255\255\255\097\001\071\001\255\255\ +\012\001\101\001\255\255\255\255\255\255\255\255\106\001\255\255\ +\255\255\109\001\110\001\084\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\030\001\031\001\255\255\255\255\255\255\255\255\ +\097\001\255\255\255\255\255\255\101\001\255\255\255\255\255\255\ +\255\255\106\001\255\255\255\255\109\001\110\001\050\001\255\255\ +\255\255\053\001\255\255\055\001\056\001\255\255\255\255\059\001\ +\255\255\255\255\255\255\255\255\064\001\065\001\255\255\006\001\ +\007\001\255\255\255\255\071\001\011\001\012\001\006\001\007\001\ +\255\255\255\255\255\255\011\001\012\001\255\255\255\255\022\001\ +\084\001\255\255\255\255\255\255\255\255\255\255\255\255\030\001\ +\031\001\255\255\255\255\255\255\255\255\097\001\030\001\031\001\ +\255\255\101\001\255\255\255\255\255\255\255\255\106\001\255\255\ +\047\001\109\001\110\001\050\001\051\001\255\255\053\001\054\001\ +\055\001\056\001\050\001\051\001\059\001\053\001\054\001\055\001\ +\056\001\064\001\065\001\059\001\255\255\255\255\255\255\255\255\ +\064\001\065\001\255\255\255\255\255\255\255\255\255\255\006\001\ +\007\001\255\255\081\001\255\255\011\001\012\001\255\255\255\255\ +\087\001\081\001\089\001\255\255\255\255\255\255\255\255\087\001\ +\255\255\089\001\097\001\098\001\255\255\255\255\101\001\030\001\ +\031\001\104\001\255\255\106\001\255\255\101\001\109\001\255\255\ +\104\001\255\255\106\001\255\255\255\255\109\001\255\255\255\255\ +\255\255\255\255\255\255\050\001\255\255\255\255\053\001\054\001\ +\055\001\056\001\255\255\255\255\059\001\255\255\255\255\255\255\ +\255\255\064\001\065\001\255\255\255\255\000\001\001\001\002\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\009\001\255\255\ +\255\255\255\255\255\255\014\001\015\001\016\001\017\001\018\001\ +\087\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\027\001\255\255\255\255\255\255\255\255\255\255\101\001\255\255\ +\255\255\036\001\255\255\106\001\255\255\255\255\109\001\042\001\ +\043\001\044\001\045\001\046\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\061\001\255\255\015\001\255\255\255\255\066\001\ +\255\255\255\255\255\255\255\255\071\001\072\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\082\001\ +\083\001\084\001\085\001\086\001\255\255\000\001\001\001\002\001\ +\255\255\255\255\255\255\094\001\007\001\255\255\009\001\255\255\ +\255\255\100\001\255\255\255\255\055\001\016\001\057\001\058\001\ +\059\001\255\255\061\001\255\255\255\255\064\001\065\001\255\255\ +\027\001\255\255\255\255\255\255\255\255\255\255\255\255\074\001\ +\255\255\036\001\255\255\255\255\255\255\255\255\081\001\042\001\ +\043\001\044\001\045\001\046\001\047\001\255\255\089\001\090\001\ +\255\255\255\255\255\255\094\001\255\255\255\255\097\001\255\255\ +\255\255\255\255\061\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\109\001\110\001\071\001\072\001\255\255\074\001\ +\255\255\255\255\255\255\255\255\000\001\001\001\002\001\082\001\ +\083\001\084\001\085\001\086\001\087\001\009\001\255\255\255\255\ +\255\255\255\255\255\255\015\001\016\001\255\255\018\001\098\001\ +\255\255\100\001\255\255\255\255\255\255\255\255\255\255\027\001\ +\255\255\255\255\255\255\255\255\000\001\001\001\002\001\255\255\ +\036\001\255\255\255\255\255\255\255\255\009\001\042\001\043\001\ +\044\001\045\001\046\001\015\001\016\001\255\255\018\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\027\001\ +\255\255\061\001\255\255\255\255\255\255\255\255\066\001\255\255\ +\036\001\255\255\255\255\071\001\072\001\255\255\042\001\043\001\ +\044\001\045\001\046\001\255\255\255\255\255\255\082\001\083\001\ +\084\001\085\001\086\001\255\255\255\255\255\255\255\255\091\001\ +\255\255\061\001\255\255\255\255\255\255\255\255\066\001\255\255\ +\100\001\255\255\255\255\071\001\072\001\255\255\255\255\255\255\ +\255\255\255\255\000\001\001\001\002\001\255\255\082\001\083\001\ +\084\001\085\001\086\001\009\001\255\255\255\255\255\255\255\255\ +\092\001\015\001\016\001\255\255\018\001\255\255\255\255\255\255\ +\100\001\255\255\255\255\255\255\255\255\027\001\255\255\255\255\ +\255\255\255\255\000\001\001\001\002\001\255\255\036\001\255\255\ +\255\255\255\255\255\255\009\001\042\001\043\001\044\001\045\001\ +\046\001\015\001\016\001\255\255\018\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\027\001\255\255\061\001\ +\255\255\255\255\255\255\255\255\066\001\255\255\036\001\255\255\ +\255\255\071\001\072\001\255\255\042\001\043\001\044\001\045\001\ +\046\001\255\255\255\255\255\255\082\001\083\001\084\001\085\001\ +\086\001\255\255\255\255\255\255\255\255\255\255\255\255\061\001\ +\094\001\255\255\255\255\255\255\066\001\255\255\100\001\255\255\ +\255\255\071\001\072\001\255\255\255\255\255\255\255\255\255\255\ +\000\001\001\001\002\001\255\255\082\001\083\001\084\001\085\001\ +\086\001\009\001\255\255\255\255\255\255\091\001\255\255\015\001\ +\016\001\255\255\018\001\255\255\255\255\255\255\100\001\255\255\ +\255\255\255\255\255\255\027\001\255\255\255\255\255\255\255\255\ +\000\001\001\001\002\001\255\255\036\001\255\255\255\255\255\255\ +\255\255\009\001\042\001\043\001\044\001\045\001\046\001\015\001\ +\016\001\255\255\018\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\027\001\255\255\061\001\255\255\255\255\ +\255\255\255\255\066\001\255\255\036\001\255\255\255\255\071\001\ +\072\001\255\255\042\001\043\001\044\001\045\001\046\001\255\255\ +\255\255\255\255\082\001\083\001\084\001\085\001\086\001\255\255\ +\255\255\255\255\255\255\255\255\092\001\061\001\255\255\255\255\ +\255\255\255\255\066\001\255\255\100\001\255\255\255\255\071\001\ +\072\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\082\001\083\001\084\001\085\001\086\001\000\001\ +\001\001\002\001\255\255\255\255\255\255\255\255\094\001\255\255\ +\009\001\255\255\255\255\255\255\100\001\255\255\015\001\016\001\ +\255\255\018\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\027\001\255\255\255\255\255\255\255\255\000\001\ +\001\001\002\001\255\255\036\001\255\255\255\255\255\255\255\255\ +\009\001\042\001\043\001\044\001\045\001\046\001\015\001\016\001\ +\255\255\018\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\027\001\255\255\061\001\255\255\255\255\255\255\ +\255\255\066\001\255\255\036\001\255\255\255\255\071\001\072\001\ +\255\255\042\001\043\001\044\001\045\001\046\001\255\255\255\255\ +\255\255\082\001\083\001\084\001\085\001\086\001\255\255\255\255\ +\255\255\255\255\091\001\255\255\061\001\255\255\255\255\255\255\ +\255\255\066\001\255\255\100\001\255\255\255\255\071\001\072\001\ +\255\255\255\255\255\255\255\255\255\255\000\001\001\001\002\001\ +\255\255\082\001\083\001\084\001\085\001\086\001\009\001\255\255\ +\255\255\255\255\255\255\092\001\015\001\016\001\255\255\018\001\ +\255\255\255\255\255\255\100\001\255\255\255\255\255\255\255\255\ +\027\001\255\255\255\255\255\255\255\255\000\001\001\001\002\001\ +\255\255\036\001\255\255\255\255\255\255\255\255\009\001\042\001\ +\043\001\044\001\045\001\046\001\015\001\016\001\255\255\018\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\027\001\255\255\061\001\255\255\255\255\255\255\255\255\066\001\ +\255\255\036\001\255\255\255\255\071\001\072\001\255\255\042\001\ +\043\001\044\001\045\001\046\001\255\255\255\255\255\255\082\001\ +\083\001\084\001\085\001\086\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\061\001\094\001\255\255\255\255\255\255\066\001\ +\255\255\100\001\255\255\255\255\071\001\072\001\255\255\255\255\ +\255\255\255\255\255\255\000\001\001\001\002\001\255\255\082\001\ +\083\001\084\001\085\001\086\001\009\001\255\255\255\255\255\255\ +\091\001\255\255\015\001\016\001\255\255\018\001\255\255\255\255\ +\255\255\100\001\255\255\255\255\255\255\255\255\027\001\255\255\ +\255\255\255\255\255\255\000\001\001\001\002\001\255\255\036\001\ +\255\255\255\255\255\255\255\255\009\001\042\001\043\001\044\001\ +\045\001\046\001\015\001\016\001\255\255\018\001\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\027\001\255\255\ +\061\001\255\255\255\255\255\255\255\255\066\001\255\255\036\001\ +\255\255\255\255\071\001\072\001\255\255\042\001\043\001\044\001\ +\045\001\046\001\255\255\255\255\255\255\082\001\083\001\084\001\ +\085\001\086\001\255\255\255\255\255\255\255\255\255\255\092\001\ +\061\001\001\001\002\001\255\255\255\255\066\001\255\255\100\001\ +\255\255\009\001\071\001\072\001\255\255\255\255\255\255\015\001\ +\016\001\255\255\018\001\255\255\255\255\082\001\083\001\084\001\ +\085\001\086\001\255\255\027\001\255\255\255\255\255\255\255\255\ +\255\255\094\001\255\255\255\255\036\001\255\255\255\255\100\001\ +\255\255\255\255\042\001\043\001\044\001\045\001\046\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\061\001\255\255\255\255\ +\255\255\255\255\066\001\255\255\255\255\255\255\255\255\071\001\ +\072\001\001\001\002\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\009\001\082\001\083\001\084\001\085\001\086\001\015\001\ +\016\001\255\255\018\001\255\255\255\255\255\255\255\255\095\001\ +\255\255\025\001\255\255\027\001\100\001\255\255\255\255\255\255\ +\255\255\001\001\002\001\255\255\036\001\255\255\255\255\255\255\ +\255\255\009\001\042\001\043\001\044\001\045\001\046\001\015\001\ +\016\001\255\255\018\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\027\001\255\255\061\001\255\255\255\255\ +\255\255\255\255\066\001\255\255\036\001\255\255\255\255\071\001\ +\072\001\255\255\042\001\043\001\044\001\045\001\046\001\255\255\ +\255\255\255\255\082\001\083\001\084\001\085\001\086\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\061\001\001\001\002\001\ +\255\255\255\255\066\001\255\255\100\001\255\255\009\001\071\001\ +\072\001\255\255\255\255\255\255\015\001\255\255\255\255\255\255\ +\255\255\255\255\082\001\083\001\084\001\085\001\086\001\255\255\ +\027\001\255\255\255\255\255\255\255\255\255\255\001\001\002\001\ +\255\255\036\001\255\255\255\255\100\001\255\255\255\255\042\001\ +\043\001\044\001\045\001\046\001\015\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\027\001\255\255\061\001\255\255\255\255\255\255\255\255\066\001\ +\255\255\036\001\255\255\255\255\071\001\072\001\255\255\042\001\ +\043\001\044\001\045\001\046\001\013\001\255\255\255\255\082\001\ +\083\001\084\001\085\001\086\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\061\001\028\001\029\001\255\255\255\255\066\001\ +\255\255\100\001\255\255\255\255\071\001\072\001\255\255\255\255\ +\041\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\083\001\084\001\085\001\086\001\255\255\255\255\055\001\255\255\ +\057\001\058\001\059\001\060\001\061\001\255\255\255\255\064\001\ +\065\001\100\001\255\255\068\001\255\255\255\255\255\255\255\255\ +\255\255\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ +\081\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\089\001\090\001\255\255\255\255\255\255\255\255\255\255\096\001\ +\097\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\108\001\109\001\110\001\111\001" + +let yynames_const = "\ + AMPERAMPER\000\ + AMPERSAND\000\ + AND\000\ + AS\000\ + ASSERT\000\ + BACKQUOTE\000\ + BANG\000\ + BAR\000\ + BARBAR\000\ + BARRBRACKET\000\ + BEGIN\000\ + CLASS\000\ + COLON\000\ + COLONCOLON\000\ + COLONEQUAL\000\ + COLONGREATER\000\ + COMMA\000\ + CONSTRAINT\000\ + DO\000\ + DONE\000\ + DOT\000\ + DOTDOT\000\ + DOWNTO\000\ + ELSE\000\ + END\000\ + EOF\000\ + EQUAL\000\ + EXCEPTION\000\ + EXTERNAL\000\ + FALSE\000\ + FOR\000\ + FUN\000\ + FUNCTION\000\ + FUNCTOR\000\ + GREATER\000\ + GREATERRBRACE\000\ + GREATERRBRACKET\000\ + IF\000\ + IN\000\ + INCLUDE\000\ + INHERIT\000\ + INITIALIZER\000\ + LAZY\000\ + LBRACE\000\ + LBRACELESS\000\ + LBRACKET\000\ + LBRACKETBAR\000\ + LBRACKETLESS\000\ + LBRACKETGREATER\000\ + LBRACKETPERCENT\000\ + LBRACKETPERCENTPERCENT\000\ + LESS\000\ + LESSMINUS\000\ + LET\000\ + LPAREN\000\ + LBRACKETAT\000\ + LBRACKETATAT\000\ + LBRACKETATATAT\000\ + MATCH\000\ + METHOD\000\ + MINUS\000\ + MINUSDOT\000\ + MINUSGREATER\000\ + MODULE\000\ + MUTABLE\000\ + NEW\000\ + NONREC\000\ + OBJECT\000\ + OF\000\ + OPEN\000\ + OR\000\ + PERCENT\000\ + PLUS\000\ + PLUSDOT\000\ + PLUSEQ\000\ + PRIVATE\000\ + QUESTION\000\ + QUOTE\000\ + RBRACE\000\ + RBRACKET\000\ + REC\000\ + RPAREN\000\ + SEMI\000\ + SEMISEMI\000\ + HASH\000\ + SIG\000\ + STAR\000\ + STRUCT\000\ + THEN\000\ + TILDE\000\ + TO\000\ + TRUE\000\ + TRY\000\ + TYPE\000\ + UNDERSCORE\000\ + VAL\000\ + VIRTUAL\000\ + WHEN\000\ + WHILE\000\ + WITH\000\ + EOL\000\ + " + +let yynames_block = "\ + CHAR\000\ + FLOAT\000\ + INFIXOP0\000\ + INFIXOP1\000\ + INFIXOP2\000\ + INFIXOP3\000\ + INFIXOP4\000\ + DOTOP\000\ + INT\000\ + LABEL\000\ + LIDENT\000\ + OPTLABEL\000\ + PREFIXOP\000\ + HASHOP\000\ + STRING\000\ + UIDENT\000\ + COMMENT\000\ + DOCSTRING\000\ + " + +let yyact = [| + (fun _ -> failwith "parser") +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'structure) in + Obj.repr( +# 568 "ml/parser.mly" + ( extra_str 1 _1 ) +# 6360 "ml/parser.ml" + : Parsetree.structure)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'signature) in + Obj.repr( +# 571 "ml/parser.mly" + ( extra_sig 1 _1 ) +# 6367 "ml/parser.ml" + : Parsetree.signature)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in + Obj.repr( +# 576 "ml/parser.mly" + ( _1 ) +# 6374 "ml/parser.ml" + : Parsetree.core_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 579 "ml/parser.mly" + ( _1 ) +# 6381 "ml/parser.ml" + : Parsetree.expression)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in + Obj.repr( +# 582 "ml/parser.mly" + ( _1 ) +# 6388 "ml/parser.ml" + : Parsetree.pattern)) +; (fun __caml_parser_env -> + Obj.repr( +# 589 "ml/parser.mly" + ( mkrhs "*" 2, None ) +# 6394 "ml/parser.ml" + : 'functor_arg)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'functor_arg_name) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in + Obj.repr( +# 591 "ml/parser.mly" + ( mkrhs _2 2, Some _4 ) +# 6402 "ml/parser.ml" + : 'functor_arg)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 595 "ml/parser.mly" + ( _1 ) +# 6409 "ml/parser.ml" + : 'functor_arg_name)) +; (fun __caml_parser_env -> + Obj.repr( +# 596 "ml/parser.mly" + ( "_" ) +# 6415 "ml/parser.ml" + : 'functor_arg_name)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'functor_args) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'functor_arg) in + Obj.repr( +# 601 "ml/parser.mly" + ( _2 :: _1 ) +# 6423 "ml/parser.ml" + : 'functor_args)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'functor_arg) in + Obj.repr( +# 603 "ml/parser.mly" + ( [ _1 ] ) +# 6430 "ml/parser.ml" + : 'functor_args)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'mod_longident) in + Obj.repr( +# 608 "ml/parser.mly" + ( mkmod(Pmod_ident (mkrhs _1 1)) ) +# 6437 "ml/parser.ml" + : 'module_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'structure) in + Obj.repr( +# 610 "ml/parser.mly" + ( mkmod ~attrs:_2 (Pmod_structure(extra_str 3 _3)) ) +# 6445 "ml/parser.ml" + : 'module_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'structure) in + Obj.repr( +# 612 "ml/parser.mly" + ( unclosed "struct" 1 "end" 4 ) +# 6453 "ml/parser.ml" + : 'module_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'functor_args) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'module_expr) in + Obj.repr( +# 614 "ml/parser.mly" + ( let modexp = + List.fold_left + (fun acc (n, t) -> mkmod(Pmod_functor(n, t, acc))) + _5 _3 + in wrap_mod_attrs modexp _2 ) +# 6466 "ml/parser.ml" + : 'module_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'paren_module_expr) in + Obj.repr( +# 620 "ml/parser.mly" + ( mkmod(Pmod_apply(_1, _2)) ) +# 6474 "ml/parser.ml" + : 'module_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'module_expr) in + Obj.repr( +# 622 "ml/parser.mly" + ( mkmod(Pmod_apply(_1, mkmod (Pmod_structure []))) ) +# 6481 "ml/parser.ml" + : 'module_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'paren_module_expr) in + Obj.repr( +# 624 "ml/parser.mly" + ( _1 ) +# 6488 "ml/parser.ml" + : 'module_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in + Obj.repr( +# 626 "ml/parser.mly" + ( Mod.attr _1 _2 ) +# 6496 "ml/parser.ml" + : 'module_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in + Obj.repr( +# 628 "ml/parser.mly" + ( mkmod(Pmod_extension _1) ) +# 6503 "ml/parser.ml" + : 'module_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'module_expr) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in + Obj.repr( +# 633 "ml/parser.mly" + ( mkmod(Pmod_constraint(_2, _4)) ) +# 6511 "ml/parser.ml" + : 'paren_module_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'module_expr) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in + Obj.repr( +# 635 "ml/parser.mly" + ( unclosed "(" 1 ")" 5 ) +# 6519 "ml/parser.ml" + : 'paren_module_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in + Obj.repr( +# 637 "ml/parser.mly" + ( _2 ) +# 6526 "ml/parser.ml" + : 'paren_module_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in + Obj.repr( +# 639 "ml/parser.mly" + ( unclosed "(" 1 ")" 3 ) +# 6533 "ml/parser.ml" + : 'paren_module_expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 641 "ml/parser.mly" + ( mkmod ~attrs:_3 (Pmod_unpack _4)) +# 6541 "ml/parser.ml" + : 'paren_module_expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in + Obj.repr( +# 643 "ml/parser.mly" + ( mkmod ~attrs:_3 + (Pmod_unpack( + ghexp(Pexp_constraint(_4, ghtyp(Ptyp_package _6))))) ) +# 6552 "ml/parser.ml" + : 'paren_module_expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 6 : 'attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 5 : 'expr) in + let _6 = (Parsing.peek_val __caml_parser_env 3 : 'package_type) in + let _8 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in + Obj.repr( +# 648 "ml/parser.mly" + ( mkmod ~attrs:_3 + (Pmod_unpack( + ghexp(Pexp_coerce(_4, Some(ghtyp(Ptyp_package _6)), + ghtyp(Ptyp_package _8))))) ) +# 6565 "ml/parser.ml" + : 'paren_module_expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in + Obj.repr( +# 653 "ml/parser.mly" + ( mkmod ~attrs:_3 + (Pmod_unpack( + ghexp(Pexp_coerce(_4, None, ghtyp(Ptyp_package _6))))) ) +# 6576 "ml/parser.ml" + : 'paren_module_expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + Obj.repr( +# 657 "ml/parser.mly" + ( unclosed "(" 1 ")" 6 ) +# 6584 "ml/parser.ml" + : 'paren_module_expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + Obj.repr( +# 659 "ml/parser.mly" + ( unclosed "(" 1 ")" 6 ) +# 6592 "ml/parser.ml" + : 'paren_module_expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 661 "ml/parser.mly" + ( unclosed "(" 1 ")" 5 ) +# 6600 "ml/parser.ml" + : 'paren_module_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'seq_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'post_item_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'structure_tail) in + Obj.repr( +# 666 "ml/parser.mly" + ( mark_rhs_docs 1 2; + (text_str 1) @ mkstrexp _1 _2 :: _3 ) +# 6610 "ml/parser.ml" + : 'structure)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'structure_tail) in + Obj.repr( +# 668 "ml/parser.mly" + ( _1 ) +# 6617 "ml/parser.ml" + : 'structure)) +; (fun __caml_parser_env -> + Obj.repr( +# 671 "ml/parser.mly" + ( [] ) +# 6623 "ml/parser.ml" + : 'structure_tail)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'structure) in + Obj.repr( +# 672 "ml/parser.mly" + ( (text_str 1) @ _2 ) +# 6630 "ml/parser.ml" + : 'structure_tail)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'structure_item) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'structure_tail) in + Obj.repr( +# 673 "ml/parser.mly" + ( (text_str 1) @ _1 :: _2 ) +# 6638 "ml/parser.ml" + : 'structure_tail)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'let_bindings) in + Obj.repr( +# 677 "ml/parser.mly" + ( val_of_let_bindings _1 ) +# 6645 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'primitive_declaration) in + Obj.repr( +# 679 "ml/parser.mly" + ( let (body, ext) = _1 in mkstr_ext (Pstr_primitive body) ext ) +# 6652 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'value_description) in + Obj.repr( +# 681 "ml/parser.mly" + ( let (body, ext) = _1 in mkstr_ext (Pstr_primitive body) ext ) +# 6659 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_declarations) in + Obj.repr( +# 683 "ml/parser.mly" + ( let (nr, l, ext ) = _1 in mkstr_ext (Pstr_type (nr, List.rev l)) ext ) +# 6666 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'str_type_extension) in + Obj.repr( +# 685 "ml/parser.mly" + ( let (l, ext) = _1 in mkstr_ext (Pstr_typext l) ext ) +# 6673 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'str_exception_declaration) in + Obj.repr( +# 687 "ml/parser.mly" + ( let (l, ext) = _1 in mkstr_ext (Pstr_exception l) ext ) +# 6680 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_binding) in + Obj.repr( +# 689 "ml/parser.mly" + ( let (body, ext) = _1 in mkstr_ext (Pstr_module body) ext ) +# 6687 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'rec_module_bindings) in + Obj.repr( +# 691 "ml/parser.mly" + ( let (l, ext) = _1 in mkstr_ext (Pstr_recmodule(List.rev l)) ext ) +# 6694 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_type_declaration) in + Obj.repr( +# 693 "ml/parser.mly" + ( let (body, ext) = _1 in mkstr_ext (Pstr_modtype body) ext ) +# 6701 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'open_statement) in + Obj.repr( +# 695 "ml/parser.mly" + ( let (body, ext) = _1 in mkstr_ext (Pstr_open body) ext ) +# 6708 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_type_declarations) in + Obj.repr( +# 697 "ml/parser.mly" + ( let (l, ext) = _1 in mkstr_ext (Pstr_class_type (List.rev l)) ext ) +# 6715 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'str_include_statement) in + Obj.repr( +# 699 "ml/parser.mly" + ( let (body, ext) = _1 in mkstr_ext (Pstr_include body) ext ) +# 6722 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'item_extension) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 701 "ml/parser.mly" + ( mkstr(Pstr_extension (_1, (add_docs_attrs (symbol_docs ()) _2))) ) +# 6730 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'floating_attribute) in + Obj.repr( +# 703 "ml/parser.mly" + ( mark_symbol_docs (); + mkstr(Pstr_attribute _1) ) +# 6738 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 708 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Incl.mk _3 ~attrs:(attrs@_4) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext ) +# 6750 "ml/parser.ml" + : 'str_include_statement)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'module_expr) in + Obj.repr( +# 715 "ml/parser.mly" + ( _2 ) +# 6757 "ml/parser.ml" + : 'module_binding_body)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'module_type) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'module_expr) in + Obj.repr( +# 717 "ml/parser.mly" + ( mkmod(Pmod_constraint(_4, _2)) ) +# 6765 "ml/parser.ml" + : 'module_binding_body)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'functor_arg) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'module_binding_body) in + Obj.repr( +# 719 "ml/parser.mly" + ( mkmod(Pmod_functor(fst _1, snd _1, _2)) ) +# 6773 "ml/parser.ml" + : 'module_binding_body)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_binding_body) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 723 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Mb.mk (mkrhs _3 3) _4 ~attrs:(attrs@_5) + ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) + , ext ) +# 6786 "ml/parser.ml" + : 'module_binding)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'rec_module_binding) in + Obj.repr( +# 729 "ml/parser.mly" + ( let (b, ext) = _1 in ([b], ext) ) +# 6793 "ml/parser.ml" + : 'rec_module_bindings)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'rec_module_bindings) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'and_module_binding) in + Obj.repr( +# 731 "ml/parser.mly" + ( let (l, ext) = _1 in (_2 :: l, ext) ) +# 6801 "ml/parser.ml" + : 'rec_module_bindings)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : string) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'module_binding_body) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 735 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Mb.mk (mkrhs _4 4) _5 ~attrs:(attrs@_6) + ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) + , ext ) +# 6814 "ml/parser.ml" + : 'rec_module_binding)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_binding_body) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 742 "ml/parser.mly" + ( Mb.mk (mkrhs _3 3) _4 ~attrs:(_2@_5) ~loc:(symbol_rloc ()) + ~text:(symbol_text ()) ~docs:(symbol_docs ()) ) +# 6825 "ml/parser.ml" + : 'and_module_binding)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'mty_longident) in + Obj.repr( +# 750 "ml/parser.mly" + ( mkmty(Pmty_ident (mkrhs _1 1)) ) +# 6832 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'signature) in + Obj.repr( +# 752 "ml/parser.mly" + ( mkmty ~attrs:_2 (Pmty_signature (extra_sig 3 _3)) ) +# 6840 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'signature) in + Obj.repr( +# 754 "ml/parser.mly" + ( unclosed "sig" 1 "end" 4 ) +# 6848 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'functor_args) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'module_type) in + Obj.repr( +# 757 "ml/parser.mly" + ( let mty = + List.fold_left + (fun acc (n, t) -> mkmty(Pmty_functor(n, t, acc))) + _5 _3 + in wrap_mty_attrs mty _2 ) +# 6861 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'module_type) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'module_type) in + Obj.repr( +# 764 "ml/parser.mly" + ( mkmty(Pmty_functor(mknoloc "_", Some _1, _3)) ) +# 6869 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'module_type) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'with_constraints) in + Obj.repr( +# 766 "ml/parser.mly" + ( mkmty(Pmty_with(_1, List.rev _3)) ) +# 6877 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'attributes) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'module_expr) in + Obj.repr( +# 768 "ml/parser.mly" + ( mkmty ~attrs:_4 (Pmty_typeof _5) ) +# 6885 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in + Obj.repr( +# 772 "ml/parser.mly" + ( _2 ) +# 6892 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in + Obj.repr( +# 774 "ml/parser.mly" + ( unclosed "(" 1 ")" 3 ) +# 6899 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in + Obj.repr( +# 776 "ml/parser.mly" + ( mkmty(Pmty_extension _1) ) +# 6906 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in + Obj.repr( +# 778 "ml/parser.mly" + ( Mty.attr _1 _2 ) +# 6914 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + Obj.repr( +# 781 "ml/parser.mly" + ( [] ) +# 6920 "ml/parser.ml" + : 'signature)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'signature) in + Obj.repr( +# 782 "ml/parser.mly" + ( (text_sig 1) @ _2 ) +# 6927 "ml/parser.ml" + : 'signature)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'signature_item) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'signature) in + Obj.repr( +# 783 "ml/parser.mly" + ( (text_sig 1) @ _1 :: _2 ) +# 6935 "ml/parser.ml" + : 'signature)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'value_description) in + Obj.repr( +# 787 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_value body) ext ) +# 6942 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'primitive_declaration) in + Obj.repr( +# 789 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_value body) ext) +# 6949 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_declarations) in + Obj.repr( +# 791 "ml/parser.mly" + ( let (nr, l, ext) = _1 in mksig_ext (Psig_type (nr, List.rev l)) ext ) +# 6956 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'sig_type_extension) in + Obj.repr( +# 793 "ml/parser.mly" + ( let (l, ext) = _1 in mksig_ext (Psig_typext l) ext ) +# 6963 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'sig_exception_declaration) in + Obj.repr( +# 795 "ml/parser.mly" + ( let (l, ext) = _1 in mksig_ext (Psig_exception l) ext ) +# 6970 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_declaration) in + Obj.repr( +# 797 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_module body) ext ) +# 6977 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_alias) in + Obj.repr( +# 799 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_module body) ext ) +# 6984 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'rec_module_declarations) in + Obj.repr( +# 801 "ml/parser.mly" + ( let (l, ext) = _1 in mksig_ext (Psig_recmodule (List.rev l)) ext ) +# 6991 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_type_declaration) in + Obj.repr( +# 803 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_modtype body) ext ) +# 6998 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'open_statement) in + Obj.repr( +# 805 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_open body) ext ) +# 7005 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'sig_include_statement) in + Obj.repr( +# 807 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_include body) ext ) +# 7012 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_type_declarations) in + Obj.repr( +# 809 "ml/parser.mly" + ( let (l, ext) = _1 in mksig_ext (Psig_class_type (List.rev l)) ext ) +# 7019 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'item_extension) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 811 "ml/parser.mly" + ( mksig(Psig_extension (_1, (add_docs_attrs (symbol_docs ()) _2))) ) +# 7027 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'floating_attribute) in + Obj.repr( +# 813 "ml/parser.mly" + ( mark_symbol_docs (); + mksig(Psig_attribute _1) ) +# 7035 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'override_flag) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'mod_longident) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 818 "ml/parser.mly" + ( let (ext, attrs) = _3 in + Opn.mk (mkrhs _4 4) ~override:_2 ~attrs:(attrs@_5) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext) +# 7048 "ml/parser.ml" + : 'open_statement)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 825 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Incl.mk _3 ~attrs:(attrs@_4) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext) +# 7060 "ml/parser.ml" + : 'sig_include_statement)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'module_type) in + Obj.repr( +# 832 "ml/parser.mly" + ( _2 ) +# 7067 "ml/parser.ml" + : 'module_declaration_body)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 4 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'module_type) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'module_declaration_body) in + Obj.repr( +# 834 "ml/parser.mly" + ( mkmty(Pmty_functor(mkrhs _2 2, Some _4, _6)) ) +# 7076 "ml/parser.ml" + : 'module_declaration_body)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'module_declaration_body) in + Obj.repr( +# 836 "ml/parser.mly" + ( mkmty(Pmty_functor(mkrhs "*" 1, None, _3)) ) +# 7083 "ml/parser.ml" + : 'module_declaration_body)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_declaration_body) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 840 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Md.mk (mkrhs _3 3) _4 ~attrs:(attrs@_5) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext ) +# 7096 "ml/parser.ml" + : 'module_declaration)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'mod_longident) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 847 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Md.mk (mkrhs _3 3) + (Mty.alias ~loc:(rhs_loc 5) (mkrhs _5 5)) ~attrs:(attrs@_6) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext ) +# 7110 "ml/parser.ml" + : 'module_alias)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'rec_module_declaration) in + Obj.repr( +# 855 "ml/parser.mly" + ( let (body, ext) = _1 in ([body], ext) ) +# 7117 "ml/parser.ml" + : 'rec_module_declarations)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'rec_module_declarations) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'and_module_declaration) in + Obj.repr( +# 857 "ml/parser.mly" + ( let (l, ext) = _1 in (_2 :: l, ext) ) +# 7125 "ml/parser.ml" + : 'rec_module_declarations)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 5 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 861 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Md.mk (mkrhs _4 4) _6 ~attrs:(attrs@_7) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext) +# 7138 "ml/parser.ml" + : 'rec_module_declaration)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 4 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 868 "ml/parser.mly" + ( Md.mk (mkrhs _3 3) _5 ~attrs:(_2@_6) ~loc:(symbol_rloc()) + ~text:(symbol_text()) ~docs:(symbol_docs()) ) +# 7149 "ml/parser.ml" + : 'and_module_declaration)) +; (fun __caml_parser_env -> + Obj.repr( +# 872 "ml/parser.mly" + ( None ) +# 7155 "ml/parser.ml" + : 'module_type_declaration_body)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'module_type) in + Obj.repr( +# 873 "ml/parser.mly" + ( Some _2 ) +# 7162 "ml/parser.ml" + : 'module_type_declaration_body)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'ident) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'module_type_declaration_body) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 878 "ml/parser.mly" + ( let (ext, attrs) = _3 in + Mtd.mk (mkrhs _4 4) ?typ:_5 ~attrs:(attrs@_6) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext ) +# 7175 "ml/parser.ml" + : 'module_type_declaration)) +; (fun __caml_parser_env -> + Obj.repr( +# 886 "ml/parser.mly" + ( [] ) +# 7181 "ml/parser.ml" + : 'class_type_parameters)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'type_parameter_list) in + Obj.repr( +# 887 "ml/parser.mly" + ( List.rev _2 ) +# 7188 "ml/parser.ml" + : 'class_type_parameters)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_self_pattern) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_fields) in + Obj.repr( +# 891 "ml/parser.mly" + ( Cstr.mk _1 (extra_cstr 2 (List.rev _2)) ) +# 7196 "ml/parser.ml" + : 'class_structure)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in + Obj.repr( +# 895 "ml/parser.mly" + ( reloc_pat _2 ) +# 7203 "ml/parser.ml" + : 'class_self_pattern)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'pattern) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in + Obj.repr( +# 897 "ml/parser.mly" + ( mkpat(Ppat_constraint(_2, _4)) ) +# 7211 "ml/parser.ml" + : 'class_self_pattern)) +; (fun __caml_parser_env -> + Obj.repr( +# 899 "ml/parser.mly" + ( ghpat(Ppat_any) ) +# 7217 "ml/parser.ml" + : 'class_self_pattern)) +; (fun __caml_parser_env -> + Obj.repr( +# 903 "ml/parser.mly" + ( [] ) +# 7223 "ml/parser.ml" + : 'class_fields)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_fields) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_field) in + Obj.repr( +# 905 "ml/parser.mly" + ( _2 :: (text_cstr 2) @ _1 ) +# 7231 "ml/parser.ml" + : 'class_fields)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'value) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 909 "ml/parser.mly" + ( let v, attrs = _2 in + mkcf (Pcf_val v) ~attrs:(attrs@_3) ~docs:(symbol_docs ()) ) +# 7240 "ml/parser.ml" + : 'class_field)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'method_) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 912 "ml/parser.mly" + ( let meth, attrs = _2 in + mkcf (Pcf_method meth) ~attrs:(attrs@_3) ~docs:(symbol_docs ()) ) +# 7249 "ml/parser.ml" + : 'class_field)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'constrain_field) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 915 "ml/parser.mly" + ( mkcf (Pcf_constraint _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) +# 7258 "ml/parser.ml" + : 'class_field)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 917 "ml/parser.mly" + ( mkcf (Pcf_initializer _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) +# 7267 "ml/parser.ml" + : 'class_field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'item_extension) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 919 "ml/parser.mly" + ( mkcf (Pcf_extension _1) ~attrs:_2 ~docs:(symbol_docs ()) ) +# 7275 "ml/parser.ml" + : 'class_field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'floating_attribute) in + Obj.repr( +# 921 "ml/parser.mly" + ( mark_symbol_docs (); + mkcf (Pcf_attribute _1) ) +# 7283 "ml/parser.ml" + : 'class_field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'override_flag) in + let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'label) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 927 "ml/parser.mly" + ( if _1 = Override then syntax_error (); + (mkloc _5 (rhs_loc 5), Mutable, Cfk_virtual _7), _2 ) +# 7294 "ml/parser.ml" + : 'value)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'override_flag) in + let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'mutable_flag) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'label) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 930 "ml/parser.mly" + ( if _1 = Override then syntax_error (); + (mkrhs _5 5, _4, Cfk_virtual _7), _2 ) +# 7306 "ml/parser.ml" + : 'value)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 5 : 'override_flag) in + let _2 = (Parsing.peek_val __caml_parser_env 4 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'mutable_flag) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'label) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 933 "ml/parser.mly" + ( (mkrhs _4 4, _3, Cfk_concrete (_1, _6)), _2 ) +# 7317 "ml/parser.ml" + : 'value)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'override_flag) in + let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mutable_flag) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'label) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'type_constraint) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 935 "ml/parser.mly" + ( + let e = mkexp_constraint _7 _5 in + (mkrhs _4 4, _3, Cfk_concrete (_1, e)), _2 + ) +# 7332 "ml/parser.ml" + : 'value)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'override_flag) in + let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'label) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'poly_type) in + Obj.repr( +# 943 "ml/parser.mly" + ( if _1 = Override then syntax_error (); + (mkloc _5 (rhs_loc 5), Private, Cfk_virtual _7), _2 ) +# 7343 "ml/parser.ml" + : 'method_)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'override_flag) in + let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'private_flag) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'label) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'poly_type) in + Obj.repr( +# 946 "ml/parser.mly" + ( if _1 = Override then syntax_error (); + (mkloc _5 (rhs_loc 5), _4, Cfk_virtual _7), _2 ) +# 7355 "ml/parser.ml" + : 'method_)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'override_flag) in + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'private_flag) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'label) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'strict_binding) in + Obj.repr( +# 949 "ml/parser.mly" + ( (mkloc _4 (rhs_loc 4), _3, + Cfk_concrete (_1, ghexp(Pexp_poly (_5, None)))), _2 ) +# 7367 "ml/parser.ml" + : 'method_)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 7 : 'override_flag) in + let _2 = (Parsing.peek_val __caml_parser_env 6 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 5 : 'private_flag) in + let _4 = (Parsing.peek_val __caml_parser_env 4 : 'label) in + let _6 = (Parsing.peek_val __caml_parser_env 2 : 'poly_type) in + let _8 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 952 "ml/parser.mly" + ( (mkloc _4 (rhs_loc 4), _3, + Cfk_concrete (_1, ghexp(Pexp_poly(_8, Some _6)))), _2 ) +# 7380 "ml/parser.ml" + : 'method_)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 10 : 'override_flag) in + let _2 = (Parsing.peek_val __caml_parser_env 9 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 8 : 'private_flag) in + let _4 = (Parsing.peek_val __caml_parser_env 7 : 'label) in + let _7 = (Parsing.peek_val __caml_parser_env 4 : 'lident_list) in + let _9 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in + let _11 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 956 "ml/parser.mly" + ( let exp, poly = wrap_type_annotation _7 _9 _11 in + (mkloc _4 (rhs_loc 4), _3, + Cfk_concrete (_1, ghexp(Pexp_poly(exp, Some poly)))), _2 ) +# 7395 "ml/parser.ml" + : 'method_)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'core_type_comma_list) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'clty_longident) in + Obj.repr( +# 965 "ml/parser.mly" + ( mkcty(Pcty_constr (mkloc _4 (rhs_loc 4), List.rev _2)) ) +# 7403 "ml/parser.ml" + : 'class_signature)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'clty_longident) in + Obj.repr( +# 967 "ml/parser.mly" + ( mkcty(Pcty_constr (mkrhs _1 1, [])) ) +# 7410 "ml/parser.ml" + : 'class_signature)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'class_sig_body) in + Obj.repr( +# 969 "ml/parser.mly" + ( mkcty ~attrs:_2 (Pcty_signature _3) ) +# 7418 "ml/parser.ml" + : 'class_signature)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'class_sig_body) in + Obj.repr( +# 971 "ml/parser.mly" + ( unclosed "object" 1 "end" 4 ) +# 7426 "ml/parser.ml" + : 'class_signature)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_signature) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in + Obj.repr( +# 973 "ml/parser.mly" + ( Cty.attr _1 _2 ) +# 7434 "ml/parser.ml" + : 'class_signature)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in + Obj.repr( +# 975 "ml/parser.mly" + ( mkcty(Pcty_extension _1) ) +# 7441 "ml/parser.ml" + : 'class_signature)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'override_flag) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'attributes) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'class_signature) in + Obj.repr( +# 977 "ml/parser.mly" + ( wrap_class_type_attrs (mkcty(Pcty_open(_3, mkrhs _5 5, _7))) _4 ) +# 7451 "ml/parser.ml" + : 'class_signature)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_self_type) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_sig_fields) in + Obj.repr( +# 981 "ml/parser.mly" + ( Csig.mk _1 (extra_csig 2 (List.rev _2)) ) +# 7459 "ml/parser.ml" + : 'class_sig_body)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in + Obj.repr( +# 985 "ml/parser.mly" + ( _2 ) +# 7466 "ml/parser.ml" + : 'class_self_type)) +; (fun __caml_parser_env -> + Obj.repr( +# 987 "ml/parser.mly" + ( mktyp(Ptyp_any) ) +# 7472 "ml/parser.ml" + : 'class_self_type)) +; (fun __caml_parser_env -> + Obj.repr( +# 990 "ml/parser.mly" + ( [] ) +# 7478 "ml/parser.ml" + : 'class_sig_fields)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_sig_fields) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_sig_field) in + Obj.repr( +# 991 "ml/parser.mly" + ( _2 :: (text_csig 2) @ _1 ) +# 7486 "ml/parser.ml" + : 'class_sig_fields)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'class_signature) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 995 "ml/parser.mly" + ( mkctf (Pctf_inherit _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) +# 7495 "ml/parser.ml" + : 'class_sig_field)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'value_type) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 997 "ml/parser.mly" + ( mkctf (Pctf_val _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) +# 7504 "ml/parser.ml" + : 'class_sig_field)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'private_virtual_flags) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'label) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'poly_type) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1000 "ml/parser.mly" + ( + let (p, v) = _3 in + mkctf (Pctf_method (mkrhs _4 4, p, v, _6)) ~attrs:(_2@_7) ~docs:(symbol_docs ()) + ) +# 7518 "ml/parser.ml" + : 'class_sig_field)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'constrain_field) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1005 "ml/parser.mly" + ( mkctf (Pctf_constraint _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) +# 7527 "ml/parser.ml" + : 'class_sig_field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'item_extension) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1007 "ml/parser.mly" + ( mkctf (Pctf_extension _1) ~attrs:_2 ~docs:(symbol_docs ()) ) +# 7535 "ml/parser.ml" + : 'class_sig_field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'floating_attribute) in + Obj.repr( +# 1009 "ml/parser.mly" + ( mark_symbol_docs (); + mkctf(Pctf_attribute _1) ) +# 7543 "ml/parser.ml" + : 'class_sig_field)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'mutable_flag) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'label) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1014 "ml/parser.mly" + ( mkrhs _3 3, _2, Virtual, _5 ) +# 7552 "ml/parser.ml" + : 'value_type)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'virtual_flag) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'label) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1016 "ml/parser.mly" + ( mkrhs _3 3, Mutable, _2, _5 ) +# 7561 "ml/parser.ml" + : 'value_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'label) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1018 "ml/parser.mly" + ( mkrhs _1 1, Immutable, Concrete, _3 ) +# 7569 "ml/parser.ml" + : 'value_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1021 "ml/parser.mly" + ( _1, _3, symbol_rloc() ) +# 7577 "ml/parser.ml" + : 'constrain)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1024 "ml/parser.mly" + ( _1, _3 ) +# 7585 "ml/parser.ml" + : 'constrain_field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_type_declaration) in + Obj.repr( +# 1028 "ml/parser.mly" + ( let (body, ext) = _1 in ([body],ext) ) +# 7592 "ml/parser.ml" + : 'class_type_declarations)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'class_type_declarations) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'and_class_type_declaration) in + Obj.repr( +# 1030 "ml/parser.mly" + ( let (l, ext) = _1 in (_2 :: l, ext) ) +# 7600 "ml/parser.ml" + : 'class_type_declarations)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 6 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 5 : 'virtual_flag) in + let _5 = (Parsing.peek_val __caml_parser_env 4 : 'class_type_parameters) in + let _6 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _8 = (Parsing.peek_val __caml_parser_env 1 : 'class_signature) in + let _9 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1035 "ml/parser.mly" + ( let (ext, attrs) = _3 in + Ci.mk (mkrhs _6 6) _8 ~virt:_4 ~params:_5 ~attrs:(attrs@_9) + ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) + , ext) +# 7615 "ml/parser.ml" + : 'class_type_declaration)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 6 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 5 : 'virtual_flag) in + let _4 = (Parsing.peek_val __caml_parser_env 4 : 'class_type_parameters) in + let _5 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _7 = (Parsing.peek_val __caml_parser_env 1 : 'class_signature) in + let _8 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1043 "ml/parser.mly" + ( Ci.mk (mkrhs _5 5) _7 ~virt:_3 ~params:_4 + ~attrs:(_2@_8) ~loc:(symbol_rloc ()) + ~text:(symbol_text ()) ~docs:(symbol_docs ()) ) +# 7629 "ml/parser.ml" + : 'and_class_type_declaration)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1051 "ml/parser.mly" + ( _1 ) +# 7636 "ml/parser.ml" + : 'seq_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1052 "ml/parser.mly" + ( _1 ) +# 7643 "ml/parser.ml" + : 'seq_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1053 "ml/parser.mly" + ( mkexp(Pexp_sequence(_1, _3)) ) +# 7651 "ml/parser.ml" + : 'seq_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'expr) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'attr_id) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1055 "ml/parser.mly" + ( let seq = mkexp(Pexp_sequence (_1, _5)) in + let payload = PStr [mkstrexp seq []] in + mkexp (Pexp_extension (_4, payload)) ) +# 7662 "ml/parser.ml" + : 'seq_expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'label_let_pattern) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'opt_default) in + Obj.repr( +# 1061 "ml/parser.mly" + ( (Optional (fst _3), _4, snd _3) ) +# 7670 "ml/parser.ml" + : 'labeled_simple_pattern)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_var) in + Obj.repr( +# 1063 "ml/parser.mly" + ( (Optional (fst _2), None, snd _2) ) +# 7677 "ml/parser.ml" + : 'labeled_simple_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : string) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'let_pattern) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'opt_default) in + Obj.repr( +# 1065 "ml/parser.mly" + ( (Optional _1, _4, _3) ) +# 7686 "ml/parser.ml" + : 'labeled_simple_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'pattern_var) in + Obj.repr( +# 1067 "ml/parser.mly" + ( (Optional _1, None, _2) ) +# 7694 "ml/parser.ml" + : 'labeled_simple_pattern)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'label_let_pattern) in + Obj.repr( +# 1069 "ml/parser.mly" + ( (Labelled (fst _3), None, snd _3) ) +# 7701 "ml/parser.ml" + : 'labeled_simple_pattern)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_var) in + Obj.repr( +# 1071 "ml/parser.mly" + ( (Labelled (fst _2), None, snd _2) ) +# 7708 "ml/parser.ml" + : 'labeled_simple_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_pattern) in + Obj.repr( +# 1073 "ml/parser.mly" + ( (Labelled _1, None, _2) ) +# 7716 "ml/parser.ml" + : 'labeled_simple_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_pattern) in + Obj.repr( +# 1075 "ml/parser.mly" + ( (Nolabel, None, _1) ) +# 7723 "ml/parser.ml" + : 'labeled_simple_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 1078 "ml/parser.mly" + ( mkpat(Ppat_var (mkrhs _1 1)) ) +# 7730 "ml/parser.ml" + : 'pattern_var)) +; (fun __caml_parser_env -> + Obj.repr( +# 1079 "ml/parser.mly" + ( mkpat Ppat_any ) +# 7736 "ml/parser.ml" + : 'pattern_var)) +; (fun __caml_parser_env -> + Obj.repr( +# 1082 "ml/parser.mly" + ( None ) +# 7742 "ml/parser.ml" + : 'opt_default)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1083 "ml/parser.mly" + ( Some _2 ) +# 7749 "ml/parser.ml" + : 'opt_default)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label_var) in + Obj.repr( +# 1087 "ml/parser.mly" + ( _1 ) +# 7756 "ml/parser.ml" + : 'label_let_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'label_var) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1089 "ml/parser.mly" + ( let (lab, pat) = _1 in (lab, mkpat(Ppat_constraint(pat, _3))) ) +# 7764 "ml/parser.ml" + : 'label_let_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 1092 "ml/parser.mly" + ( (_1, mkpat(Ppat_var (mkrhs _1 1))) ) +# 7771 "ml/parser.ml" + : 'label_var)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1096 "ml/parser.mly" + ( _1 ) +# 7778 "ml/parser.ml" + : 'let_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1098 "ml/parser.mly" + ( mkpat(Ppat_constraint(_1, _3)) ) +# 7786 "ml/parser.ml" + : 'let_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in + Obj.repr( +# 1102 "ml/parser.mly" + ( _1 ) +# 7793 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'simple_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_labeled_expr_list) in + Obj.repr( +# 1104 "ml/parser.mly" + ( mkexp(Pexp_apply(_1, List.rev _2)) ) +# 7801 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'let_bindings) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1106 "ml/parser.mly" + ( expr_of_let_bindings _1 _3 ) +# 7809 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'module_binding_body) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1108 "ml/parser.mly" + ( mkexp_attrs (Pexp_letmodule(mkrhs _4 4, _5, _7)) _3 ) +# 7819 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'let_exception_declaration) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1110 "ml/parser.mly" + ( mkexp_attrs (Pexp_letexception(_4, _6)) _3 ) +# 7828 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'override_flag) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1112 "ml/parser.mly" + ( mkexp_attrs (Pexp_open(_3, mkrhs _5 5, _7)) _4 ) +# 7838 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_bar) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'match_cases) in + Obj.repr( +# 1114 "ml/parser.mly" + ( mkexp_attrs (Pexp_function(List.rev _4)) _2 ) +# 7847 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'labeled_simple_pattern) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'fun_def) in + Obj.repr( +# 1116 "ml/parser.mly" + ( let (l,o,p) = _3 in + mkexp_attrs (Pexp_fun(l, o, p, _4)) _2 ) +# 7857 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 5 : 'ext_attributes) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'lident_list) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'fun_def) in + Obj.repr( +# 1119 "ml/parser.mly" + ( mkexp_attrs (mk_newtypes _5 _7).pexp_desc _2 ) +# 7866 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'seq_expr) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'opt_bar) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'match_cases) in + Obj.repr( +# 1121 "ml/parser.mly" + ( mkexp_attrs (Pexp_match(_3, List.rev _6)) _2 ) +# 7876 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'seq_expr) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'opt_bar) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'match_cases) in + Obj.repr( +# 1123 "ml/parser.mly" + ( mkexp_attrs (Pexp_try(_3, List.rev _6)) _2 ) +# 7886 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'seq_expr) in + Obj.repr( +# 1125 "ml/parser.mly" + ( syntax_error() ) +# 7894 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'expr_comma_list) in + Obj.repr( +# 1127 "ml/parser.mly" + ( mkexp(Pexp_tuple(List.rev _1)) ) +# 7901 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'constr_longident) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in + Obj.repr( +# 1129 "ml/parser.mly" + ( mkexp(Pexp_construct(mkrhs _1 1, Some _2)) ) +# 7909 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'name_tag) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in + Obj.repr( +# 1131 "ml/parser.mly" + ( mkexp(Pexp_variant(_1, Some _2)) ) +# 7917 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 5 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'seq_expr) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1133 "ml/parser.mly" + ( mkexp_attrs(Pexp_ifthenelse(_3, _5, Some _7)) _2 ) +# 7927 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'seq_expr) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1135 "ml/parser.mly" + ( mkexp_attrs (Pexp_ifthenelse(_3, _5, None)) _2 ) +# 7936 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'seq_expr) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1137 "ml/parser.mly" + ( mkexp_attrs (Pexp_while(_3, _5)) _2 ) +# 7945 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 8 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 7 : 'pattern) in + let _5 = (Parsing.peek_val __caml_parser_env 5 : 'seq_expr) in + let _6 = (Parsing.peek_val __caml_parser_env 4 : 'direction_flag) in + let _7 = (Parsing.peek_val __caml_parser_env 3 : 'seq_expr) in + let _9 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1140 "ml/parser.mly" + ( mkexp_attrs(Pexp_for(_3, _5, _7, _6, _9)) _2 ) +# 7957 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1142 "ml/parser.mly" + ( mkexp_cons (rhs_loc 2) (ghexp(Pexp_tuple[_1;_3])) (symbol_rloc()) ) +# 7965 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1144 "ml/parser.mly" + ( mkinfix _1 _2 _3 ) +# 7974 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1146 "ml/parser.mly" + ( mkinfix _1 _2 _3 ) +# 7983 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1148 "ml/parser.mly" + ( mkinfix _1 _2 _3 ) +# 7992 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1150 "ml/parser.mly" + ( mkinfix _1 _2 _3 ) +# 8001 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1152 "ml/parser.mly" + ( mkinfix _1 _2 _3 ) +# 8010 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1154 "ml/parser.mly" + ( mkinfix _1 "+" _3 ) +# 8018 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1156 "ml/parser.mly" + ( mkinfix _1 "+." _3 ) +# 8026 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1158 "ml/parser.mly" + ( mkinfix _1 "+=" _3 ) +# 8034 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1160 "ml/parser.mly" + ( mkinfix _1 "-" _3 ) +# 8042 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1162 "ml/parser.mly" + ( mkinfix _1 "-." _3 ) +# 8050 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1164 "ml/parser.mly" + ( mkinfix _1 "*" _3 ) +# 8058 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1166 "ml/parser.mly" + ( mkinfix _1 "%" _3 ) +# 8066 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1168 "ml/parser.mly" + ( mkinfix _1 "=" _3 ) +# 8074 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1170 "ml/parser.mly" + ( mkinfix _1 "<" _3 ) +# 8082 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1172 "ml/parser.mly" + ( mkinfix _1 ">" _3 ) +# 8090 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1174 "ml/parser.mly" + ( mkinfix _1 "or" _3 ) +# 8098 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1176 "ml/parser.mly" + ( mkinfix _1 "||" _3 ) +# 8106 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1178 "ml/parser.mly" + ( mkinfix _1 "&" _3 ) +# 8114 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1180 "ml/parser.mly" + ( mkinfix _1 "&&" _3 ) +# 8122 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1182 "ml/parser.mly" + ( mkinfix _1 ":=" _3 ) +# 8130 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'subtractive) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1184 "ml/parser.mly" + ( mkuminus _1 _2 ) +# 8138 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'additive) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1186 "ml/parser.mly" + ( mkuplus _1 _2 ) +# 8146 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'label_longident) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1188 "ml/parser.mly" + ( mkexp(Pexp_setfield(_1, mkrhs _3 3, _5)) ) +# 8155 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'seq_expr) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1190 "ml/parser.mly" + ( mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "Array" "set")), + [Nolabel,_1; Nolabel,_4; Nolabel,_7])) ) +# 8165 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'seq_expr) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1193 "ml/parser.mly" + ( mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "String" "set")), + [Nolabel,_1; Nolabel,_4; Nolabel,_7])) ) +# 8175 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 5 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1196 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "[]<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _4; Nolabel, _7]) ) +# 8186 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 5 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1199 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "()<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _4; Nolabel, _7]) ) +# 8197 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 5 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1202 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "{}<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _4; Nolabel, _7]) ) +# 8208 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 8 : 'simple_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 6 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 5 : string) in + let _6 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in + let _9 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1205 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3,"." ^ _4 ^ "[]<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _6; Nolabel, _9]) ) +# 8220 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 8 : 'simple_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 6 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 5 : string) in + let _6 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in + let _9 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1208 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "()<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _6; Nolabel, _9]) ) +# 8232 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 8 : 'simple_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 6 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 5 : string) in + let _6 = (Parsing.peek_val __caml_parser_env 3 : 'expr) in + let _9 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1211 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "{}<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _6; Nolabel, _9]) ) +# 8244 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'label) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1214 "ml/parser.mly" + ( mkexp(Pexp_setinstvar(mkrhs _1 1, _3)) ) +# 8252 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in + Obj.repr( +# 1216 "ml/parser.mly" + ( mkexp_attrs (Pexp_assert _3) _2 ) +# 8260 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in + Obj.repr( +# 1218 "ml/parser.mly" + ( mkexp_attrs (Pexp_lazy _3) _2 ) +# 8268 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'class_structure) in + Obj.repr( +# 1220 "ml/parser.mly" + ( mkexp_attrs (Pexp_object _3) _2 ) +# 8276 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'class_structure) in + Obj.repr( +# 1222 "ml/parser.mly" + ( unclosed "object" 1 "end" 4 ) +# 8284 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in + Obj.repr( +# 1224 "ml/parser.mly" + ( Exp.attr _1 _2 ) +# 8292 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + Obj.repr( +# 1226 "ml/parser.mly" + ( not_expecting 1 "wildcard \"_\"" ) +# 8298 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'val_longident) in + Obj.repr( +# 1230 "ml/parser.mly" + ( mkexp(Pexp_ident (mkrhs _1 1)) ) +# 8305 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constant) in + Obj.repr( +# 1232 "ml/parser.mly" + ( mkexp(Pexp_constant _1) ) +# 8312 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constr_longident) in + Obj.repr( +# 1234 "ml/parser.mly" + ( mkexp(Pexp_construct(mkrhs _1 1, None)) ) +# 8319 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'name_tag) in + Obj.repr( +# 1236 "ml/parser.mly" + ( mkexp(Pexp_variant(_1, None)) ) +# 8326 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1238 "ml/parser.mly" + ( reloc_exp _2 ) +# 8333 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1240 "ml/parser.mly" + ( unclosed "(" 1 ")" 3 ) +# 8340 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1242 "ml/parser.mly" + ( wrap_exp_attrs (reloc_exp _3) _2 (* check location *) ) +# 8348 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ext_attributes) in + Obj.repr( +# 1244 "ml/parser.mly" + ( mkexp_attrs (Pexp_construct (mkloc (Lident "()") (symbol_rloc ()), + None)) _2 ) +# 8356 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1247 "ml/parser.mly" + ( unclosed "begin" 1 "end" 4 ) +# 8364 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'seq_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'type_constraint) in + Obj.repr( +# 1249 "ml/parser.mly" + ( mkexp_constraint _2 _3 ) +# 8372 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'simple_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'label_longident) in + Obj.repr( +# 1251 "ml/parser.mly" + ( mkexp(Pexp_field(_1, mkrhs _3 3)) ) +# 8380 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1253 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, _4)) ) +# 8388 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in + Obj.repr( +# 1255 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, + mkexp(Pexp_construct(mkrhs (Lident "()") 1, None)))) ) +# 8396 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1258 "ml/parser.mly" + ( unclosed "(" 3 ")" 5 ) +# 8404 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1260 "ml/parser.mly" + ( mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "Array" "get")), + [Nolabel,_1; Nolabel,_4])) ) +# 8413 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1263 "ml/parser.mly" + ( unclosed "(" 3 ")" 5 ) +# 8421 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1265 "ml/parser.mly" + ( mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "String" "get")), + [Nolabel,_1; Nolabel,_4])) ) +# 8430 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1268 "ml/parser.mly" + ( unclosed "[" 3 "]" 5 ) +# 8438 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1270 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "[]")) in + mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _4]) ) +# 8448 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1273 "ml/parser.mly" + ( unclosed "[" 3 "]" 5 ) +# 8457 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1275 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "()")) in + mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _4]) ) +# 8467 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1278 "ml/parser.mly" + ( unclosed "(" 3 ")" 5 ) +# 8476 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1280 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "{}")) in + mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _4]) ) +# 8486 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1283 "ml/parser.mly" + ( unclosed "{" 3 "}" 5 ) +# 8495 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1285 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "[]")) in + mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _6]) ) +# 8506 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1288 "ml/parser.mly" + ( unclosed "[" 5 "]" 7 ) +# 8516 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1290 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "()")) in + mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _6]) ) +# 8527 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1293 "ml/parser.mly" + ( unclosed "(" 5 ")" 7 ) +# 8537 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1295 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "{}")) in + mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _6]) ) +# 8548 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'simple_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1298 "ml/parser.mly" + ( unclosed "{" 5 "}" 7 ) +# 8558 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_expr) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr_comma_list) in + Obj.repr( +# 1300 "ml/parser.mly" + ( unclosed "{" 3 "}" 5 ) +# 8566 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'record_expr) in + Obj.repr( +# 1302 "ml/parser.mly" + ( let (exten, fields) = _2 in mkexp (Pexp_record(fields, exten)) ) +# 8573 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'record_expr) in + Obj.repr( +# 1304 "ml/parser.mly" + ( unclosed "{" 1 "}" 3 ) +# 8580 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'record_expr) in + Obj.repr( +# 1306 "ml/parser.mly" + ( let (exten, fields) = _4 in + let rec_exp = mkexp(Pexp_record(fields, exten)) in + mkexp(Pexp_open(Fresh, mkrhs _1 1, rec_exp)) ) +# 8590 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'record_expr) in + Obj.repr( +# 1310 "ml/parser.mly" + ( unclosed "{" 3 "}" 5 ) +# 8598 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in + Obj.repr( +# 1312 "ml/parser.mly" + ( mkexp (Pexp_array(List.rev _2)) ) +# 8606 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in + Obj.repr( +# 1314 "ml/parser.mly" + ( unclosed "[|" 1 "|]" 4 ) +# 8614 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + Obj.repr( +# 1316 "ml/parser.mly" + ( mkexp (Pexp_array []) ) +# 8620 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 5 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in + Obj.repr( +# 1318 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, mkexp(Pexp_array(List.rev _4)))) ) +# 8629 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in + Obj.repr( +# 1320 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, mkexp(Pexp_array []))) ) +# 8636 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 5 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in + Obj.repr( +# 1322 "ml/parser.mly" + ( unclosed "[|" 3 "|]" 6 ) +# 8645 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in + Obj.repr( +# 1324 "ml/parser.mly" + ( reloc_exp (mktailexp (rhs_loc 4) (List.rev _2)) ) +# 8653 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in + Obj.repr( +# 1326 "ml/parser.mly" + ( unclosed "[" 1 "]" 4 ) +# 8661 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 5 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in + Obj.repr( +# 1328 "ml/parser.mly" + ( let list_exp = reloc_exp (mktailexp (rhs_loc 6) (List.rev _4)) in + mkexp(Pexp_open(Fresh, mkrhs _1 1, list_exp)) ) +# 8671 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in + Obj.repr( +# 1331 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, + mkexp(Pexp_construct(mkrhs (Lident "[]") 1, None)))) ) +# 8679 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 5 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in + Obj.repr( +# 1334 "ml/parser.mly" + ( unclosed "[" 3 "]" 6 ) +# 8688 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in + Obj.repr( +# 1336 "ml/parser.mly" + ( mkexp(Pexp_apply(mkoperator _1 1, [Nolabel,_2])) ) +# 8696 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in + Obj.repr( +# 1338 "ml/parser.mly" + ( mkexp(Pexp_apply(mkoperator "!" 1, [Nolabel,_2])) ) +# 8703 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'field_expr_list) in + Obj.repr( +# 1340 "ml/parser.mly" + ( mkexp (Pexp_override _2) ) +# 8710 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'field_expr_list) in + Obj.repr( +# 1342 "ml/parser.mly" + ( unclosed "{<" 1 ">}" 3 ) +# 8717 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + Obj.repr( +# 1344 "ml/parser.mly" + ( mkexp (Pexp_override [])) +# 8723 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'field_expr_list) in + Obj.repr( +# 1346 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, mkexp (Pexp_override _4)))) +# 8731 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in + Obj.repr( +# 1348 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, mkexp (Pexp_override [])))) +# 8738 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'field_expr_list) in + Obj.repr( +# 1350 "ml/parser.mly" + ( unclosed "{<" 3 ">}" 5 ) +# 8746 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'simple_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'label) in + Obj.repr( +# 1352 "ml/parser.mly" + ( mkexp(Pexp_send(_1, mkrhs _3 3)) ) +# 8754 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'simple_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in + Obj.repr( +# 1354 "ml/parser.mly" + ( mkinfix _1 _2 _3 ) +# 8763 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in + Obj.repr( +# 1356 "ml/parser.mly" + ( mkexp_attrs (Pexp_pack _4) _3 ) +# 8771 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'module_expr) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in + Obj.repr( +# 1358 "ml/parser.mly" + ( mkexp_attrs (Pexp_constraint (ghexp (Pexp_pack _4), + ghtyp (Ptyp_package _6))) + _3 ) +# 8782 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'module_expr) in + Obj.repr( +# 1362 "ml/parser.mly" + ( unclosed "(" 1 ")" 6 ) +# 8790 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 8 : 'mod_longident) in + let _5 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in + let _6 = (Parsing.peek_val __caml_parser_env 3 : 'module_expr) in + let _8 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in + Obj.repr( +# 1365 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, + mkexp_attrs (Pexp_constraint (ghexp (Pexp_pack _6), + ghtyp (Ptyp_package _8))) + _5 )) ) +# 8803 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 7 : 'mod_longident) in + let _5 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in + let _6 = (Parsing.peek_val __caml_parser_env 2 : 'module_expr) in + Obj.repr( +# 1370 "ml/parser.mly" + ( unclosed "(" 3 ")" 8 ) +# 8812 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in + Obj.repr( +# 1372 "ml/parser.mly" + ( mkexp (Pexp_extension _1) ) +# 8819 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'labeled_simple_expr) in + Obj.repr( +# 1376 "ml/parser.mly" + ( [_1] ) +# 8826 "ml/parser.ml" + : 'simple_labeled_expr_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'simple_labeled_expr_list) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'labeled_simple_expr) in + Obj.repr( +# 1378 "ml/parser.mly" + ( _2 :: _1 ) +# 8834 "ml/parser.ml" + : 'simple_labeled_expr_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in + Obj.repr( +# 1382 "ml/parser.mly" + ( (Nolabel, _1) ) +# 8841 "ml/parser.ml" + : 'labeled_simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label_expr) in + Obj.repr( +# 1384 "ml/parser.mly" + ( _1 ) +# 8848 "ml/parser.ml" + : 'labeled_simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in + Obj.repr( +# 1388 "ml/parser.mly" + ( (Labelled _1, _2) ) +# 8856 "ml/parser.ml" + : 'label_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_ident) in + Obj.repr( +# 1390 "ml/parser.mly" + ( (Labelled (fst _2), snd _2) ) +# 8863 "ml/parser.ml" + : 'label_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_ident) in + Obj.repr( +# 1392 "ml/parser.mly" + ( (Optional (fst _2), snd _2) ) +# 8870 "ml/parser.ml" + : 'label_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in + Obj.repr( +# 1394 "ml/parser.mly" + ( (Optional _1, _2) ) +# 8878 "ml/parser.ml" + : 'label_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 1397 "ml/parser.mly" + ( (_1, mkexp(Pexp_ident(mkrhs (Lident _1) 1))) ) +# 8885 "ml/parser.ml" + : 'label_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 1400 "ml/parser.mly" + ( [mkrhs _1 1] ) +# 8892 "ml/parser.ml" + : 'lident_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'lident_list) in + Obj.repr( +# 1401 "ml/parser.mly" + ( mkrhs _1 1 :: _2 ) +# 8900 "ml/parser.ml" + : 'lident_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'val_ident) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'strict_binding) in + Obj.repr( +# 1405 "ml/parser.mly" + ( (mkpatvar _1 1, _2) ) +# 8908 "ml/parser.ml" + : 'let_binding_body)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'val_ident) in + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'type_constraint) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1407 "ml/parser.mly" + ( let v = mkpatvar _1 1 in (* PR#7344 *) + let t = + match _2 with + Some t, None -> t + | _, Some t -> t + | _ -> assert false + in + (ghpat(Ppat_constraint(v, ghtyp(Ptyp_poly([],t)))), + mkexp_constraint _4 _2) ) +# 8925 "ml/parser.ml" + : 'let_binding_body)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'val_ident) in + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'typevar_list) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1417 "ml/parser.mly" + ( (ghpat(Ppat_constraint(mkpatvar _1 1, + ghtyp(Ptyp_poly(List.rev _3,_5)))), + _7) ) +# 8937 "ml/parser.ml" + : 'let_binding_body)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 7 : 'val_ident) in + let _4 = (Parsing.peek_val __caml_parser_env 4 : 'lident_list) in + let _6 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in + let _8 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1421 "ml/parser.mly" + ( let exp, poly = wrap_type_annotation _4 _6 _8 in + (ghpat(Ppat_constraint(mkpatvar _1 1, poly)), exp) ) +# 8948 "ml/parser.ml" + : 'let_binding_body)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1424 "ml/parser.mly" + ( (_1, _3) ) +# 8956 "ml/parser.ml" + : 'let_binding_body)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'simple_pattern_not_ident) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1426 "ml/parser.mly" + ( (ghpat(Ppat_constraint(_1, _3)), _5) ) +# 8965 "ml/parser.ml" + : 'let_binding_body)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'let_binding) in + Obj.repr( +# 1429 "ml/parser.mly" + ( _1 ) +# 8972 "ml/parser.ml" + : 'let_bindings)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'let_bindings) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'and_let_binding) in + Obj.repr( +# 1430 "ml/parser.mly" + ( addlb _1 _2 ) +# 8980 "ml/parser.ml" + : 'let_bindings)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'rec_flag) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'let_binding_body) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1434 "ml/parser.mly" + ( let (ext, attr) = _2 in + mklbs ext _3 (mklb true _4 (attr@_5)) ) +# 8991 "ml/parser.ml" + : 'let_binding)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'let_binding_body) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1439 "ml/parser.mly" + ( mklb false _3 (_2@_4) ) +# 9000 "ml/parser.ml" + : 'and_let_binding)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'strict_binding) in + Obj.repr( +# 1443 "ml/parser.mly" + ( _1 ) +# 9007 "ml/parser.ml" + : 'fun_binding)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'type_constraint) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1445 "ml/parser.mly" + ( mkexp_constraint _3 _1 ) +# 9015 "ml/parser.ml" + : 'fun_binding)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1449 "ml/parser.mly" + ( _2 ) +# 9022 "ml/parser.ml" + : 'strict_binding)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'labeled_simple_pattern) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'fun_binding) in + Obj.repr( +# 1451 "ml/parser.mly" + ( let (l, o, p) = _1 in ghexp(Pexp_fun(l, o, p, _2)) ) +# 9030 "ml/parser.ml" + : 'strict_binding)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'lident_list) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'fun_binding) in + Obj.repr( +# 1453 "ml/parser.mly" + ( mk_newtypes _3 _5 ) +# 9038 "ml/parser.ml" + : 'strict_binding)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'match_case) in + Obj.repr( +# 1456 "ml/parser.mly" + ( [_1] ) +# 9045 "ml/parser.ml" + : 'match_cases)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'match_cases) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'match_case) in + Obj.repr( +# 1457 "ml/parser.mly" + ( _3 :: _1 ) +# 9053 "ml/parser.ml" + : 'match_cases)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1461 "ml/parser.mly" + ( Exp.case _1 _3 ) +# 9061 "ml/parser.ml" + : 'match_case)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'pattern) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'seq_expr) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1463 "ml/parser.mly" + ( Exp.case _1 ~guard:_3 _5 ) +# 9070 "ml/parser.ml" + : 'match_case)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + Obj.repr( +# 1465 "ml/parser.mly" + ( Exp.case _1 (Exp.unreachable ~loc:(rhs_loc 3) ())) +# 9077 "ml/parser.ml" + : 'match_case)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1469 "ml/parser.mly" + ( _2 ) +# 9084 "ml/parser.ml" + : 'fun_def)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'simple_core_type) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1471 "ml/parser.mly" + ( mkexp (Pexp_constraint (_4, _2)) ) +# 9092 "ml/parser.ml" + : 'fun_def)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'labeled_simple_pattern) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'fun_def) in + Obj.repr( +# 1474 "ml/parser.mly" + ( + let (l,o,p) = _1 in + ghexp(Pexp_fun(l, o, p, _2)) + ) +# 9103 "ml/parser.ml" + : 'fun_def)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'lident_list) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'fun_def) in + Obj.repr( +# 1479 "ml/parser.mly" + ( mk_newtypes _3 _5 ) +# 9111 "ml/parser.ml" + : 'fun_def)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr_comma_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1482 "ml/parser.mly" + ( _3 :: _1 ) +# 9119 "ml/parser.ml" + : 'expr_comma_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1483 "ml/parser.mly" + ( [_3; _1] ) +# 9127 "ml/parser.ml" + : 'expr_comma_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'simple_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_expr_list) in + Obj.repr( +# 1486 "ml/parser.mly" + ( (Some _1, _3) ) +# 9135 "ml/parser.ml" + : 'record_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_expr_list) in + Obj.repr( +# 1487 "ml/parser.mly" + ( (None, _1) ) +# 9142 "ml/parser.ml" + : 'record_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_expr) in + Obj.repr( +# 1490 "ml/parser.mly" + ( [_1] ) +# 9149 "ml/parser.ml" + : 'lbl_expr_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'lbl_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_expr_list) in + Obj.repr( +# 1491 "ml/parser.mly" + ( _1 :: _3 ) +# 9157 "ml/parser.ml" + : 'lbl_expr_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'lbl_expr) in + Obj.repr( +# 1492 "ml/parser.mly" + ( [_1] ) +# 9164 "ml/parser.ml" + : 'lbl_expr_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'label_longident) in + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'opt_type_constraint) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1496 "ml/parser.mly" + ( (mkrhs _1 1, mkexp_opt_constraint _4 _2) ) +# 9173 "ml/parser.ml" + : 'lbl_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'label_longident) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'opt_type_constraint) in + Obj.repr( +# 1498 "ml/parser.mly" + ( (mkrhs _1 1, mkexp_opt_constraint (exp_of_label _1 1) _2) ) +# 9181 "ml/parser.ml" + : 'lbl_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'field_expr) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'opt_semi) in + Obj.repr( +# 1501 "ml/parser.mly" + ( [_1] ) +# 9189 "ml/parser.ml" + : 'field_expr_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'field_expr) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'field_expr_list) in + Obj.repr( +# 1502 "ml/parser.mly" + ( _1 :: _3 ) +# 9197 "ml/parser.ml" + : 'field_expr_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'label) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1506 "ml/parser.mly" + ( (mkrhs _1 1, _3) ) +# 9205 "ml/parser.ml" + : 'field_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label) in + Obj.repr( +# 1508 "ml/parser.mly" + ( (mkrhs _1 1, exp_of_label (Lident _1) 1) ) +# 9212 "ml/parser.ml" + : 'field_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1511 "ml/parser.mly" + ( [_1] ) +# 9219 "ml/parser.ml" + : 'expr_semi_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'expr_semi_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1512 "ml/parser.mly" + ( _3 :: _1 ) +# 9227 "ml/parser.ml" + : 'expr_semi_list)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1515 "ml/parser.mly" + ( (Some _2, None) ) +# 9234 "ml/parser.ml" + : 'type_constraint)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'core_type) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1516 "ml/parser.mly" + ( (Some _2, Some _4) ) +# 9242 "ml/parser.ml" + : 'type_constraint)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1517 "ml/parser.mly" + ( (None, Some _2) ) +# 9249 "ml/parser.ml" + : 'type_constraint)) +; (fun __caml_parser_env -> + Obj.repr( +# 1518 "ml/parser.mly" + ( syntax_error() ) +# 9255 "ml/parser.ml" + : 'type_constraint)) +; (fun __caml_parser_env -> + Obj.repr( +# 1519 "ml/parser.mly" + ( syntax_error() ) +# 9261 "ml/parser.ml" + : 'type_constraint)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_constraint) in + Obj.repr( +# 1522 "ml/parser.mly" + ( Some _1 ) +# 9268 "ml/parser.ml" + : 'opt_type_constraint)) +; (fun __caml_parser_env -> + Obj.repr( +# 1523 "ml/parser.mly" + ( None ) +# 9274 "ml/parser.ml" + : 'opt_type_constraint)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'val_ident) in + Obj.repr( +# 1530 "ml/parser.mly" + ( mkpat(Ppat_alias(_1, mkrhs _3 3)) ) +# 9282 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + Obj.repr( +# 1532 "ml/parser.mly" + ( expecting 3 "identifier" ) +# 9289 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern_comma_list) in + Obj.repr( +# 1534 "ml/parser.mly" + ( mkpat(Ppat_tuple(List.rev _1)) ) +# 9296 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1536 "ml/parser.mly" + ( mkpat_cons (rhs_loc 2) (ghpat(Ppat_tuple[_1;_3])) (symbol_rloc()) ) +# 9304 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + Obj.repr( +# 1538 "ml/parser.mly" + ( expecting 3 "pattern" ) +# 9311 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1540 "ml/parser.mly" + ( mkpat(Ppat_or(_1, _3)) ) +# 9319 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + Obj.repr( +# 1542 "ml/parser.mly" + ( expecting 3 "pattern" ) +# 9326 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1544 "ml/parser.mly" + ( mkpat_attrs (Ppat_exception _3) _2) +# 9334 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in + Obj.repr( +# 1546 "ml/parser.mly" + ( Pat.attr _1 _2 ) +# 9342 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern_gen) in + Obj.repr( +# 1547 "ml/parser.mly" + ( _1 ) +# 9349 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'val_ident) in + Obj.repr( +# 1551 "ml/parser.mly" + ( mkpat(Ppat_alias(_1, mkrhs _3 3)) ) +# 9357 "ml/parser.ml" + : 'pattern_no_exn)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in + Obj.repr( +# 1553 "ml/parser.mly" + ( expecting 3 "identifier" ) +# 9364 "ml/parser.ml" + : 'pattern_no_exn)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern_no_exn_comma_list) in + Obj.repr( +# 1555 "ml/parser.mly" + ( mkpat(Ppat_tuple(List.rev _1)) ) +# 9371 "ml/parser.ml" + : 'pattern_no_exn)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1557 "ml/parser.mly" + ( mkpat_cons (rhs_loc 2) (ghpat(Ppat_tuple[_1;_3])) (symbol_rloc()) ) +# 9379 "ml/parser.ml" + : 'pattern_no_exn)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in + Obj.repr( +# 1559 "ml/parser.mly" + ( expecting 3 "pattern" ) +# 9386 "ml/parser.ml" + : 'pattern_no_exn)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1561 "ml/parser.mly" + ( mkpat(Ppat_or(_1, _3)) ) +# 9394 "ml/parser.ml" + : 'pattern_no_exn)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in + Obj.repr( +# 1563 "ml/parser.mly" + ( expecting 3 "pattern" ) +# 9401 "ml/parser.ml" + : 'pattern_no_exn)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'pattern_no_exn) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in + Obj.repr( +# 1565 "ml/parser.mly" + ( Pat.attr _1 _2 ) +# 9409 "ml/parser.ml" + : 'pattern_no_exn)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern_gen) in + Obj.repr( +# 1566 "ml/parser.mly" + ( _1 ) +# 9416 "ml/parser.ml" + : 'pattern_no_exn)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_pattern) in + Obj.repr( +# 1570 "ml/parser.mly" + ( _1 ) +# 9423 "ml/parser.ml" + : 'pattern_gen)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'constr_longident) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1572 "ml/parser.mly" + ( mkpat(Ppat_construct(mkrhs _1 1, Some _2)) ) +# 9431 "ml/parser.ml" + : 'pattern_gen)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'name_tag) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1574 "ml/parser.mly" + ( mkpat(Ppat_variant(_1, Some _2)) ) +# 9439 "ml/parser.ml" + : 'pattern_gen)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'simple_pattern) in + Obj.repr( +# 1576 "ml/parser.mly" + ( mkpat_attrs (Ppat_lazy _3) _2) +# 9447 "ml/parser.ml" + : 'pattern_gen)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'val_ident) in + Obj.repr( +# 1580 "ml/parser.mly" + ( mkpat(Ppat_var (mkrhs _1 1)) ) +# 9454 "ml/parser.ml" + : 'simple_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_pattern_not_ident) in + Obj.repr( +# 1581 "ml/parser.mly" + ( _1 ) +# 9461 "ml/parser.ml" + : 'simple_pattern)) +; (fun __caml_parser_env -> + Obj.repr( +# 1585 "ml/parser.mly" + ( mkpat(Ppat_any) ) +# 9467 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'signed_constant) in + Obj.repr( +# 1587 "ml/parser.mly" + ( mkpat(Ppat_constant _1) ) +# 9474 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'signed_constant) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'signed_constant) in + Obj.repr( +# 1589 "ml/parser.mly" + ( mkpat(Ppat_interval (_1, _3)) ) +# 9482 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constr_longident) in + Obj.repr( +# 1591 "ml/parser.mly" + ( mkpat(Ppat_construct(mkrhs _1 1, None)) ) +# 9489 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'name_tag) in + Obj.repr( +# 1593 "ml/parser.mly" + ( mkpat(Ppat_variant(_1, None)) ) +# 9496 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'type_longident) in + Obj.repr( +# 1595 "ml/parser.mly" + ( mkpat(Ppat_type (mkrhs _2 2)) ) +# 9503 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_delimited_pattern) in + Obj.repr( +# 1597 "ml/parser.mly" + ( _1 ) +# 9510 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'simple_delimited_pattern) in + Obj.repr( +# 1599 "ml/parser.mly" + ( mkpat @@ Ppat_open(mkrhs _1 1, _3) ) +# 9518 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in + Obj.repr( +# 1601 "ml/parser.mly" + ( mkpat @@ Ppat_open(mkrhs _1 1, mkpat @@ + Ppat_construct ( mkrhs (Lident "[]") 4, None)) ) +# 9526 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in + Obj.repr( +# 1604 "ml/parser.mly" + ( mkpat @@ Ppat_open( mkrhs _1 1, mkpat @@ + Ppat_construct ( mkrhs (Lident "()") 4, None) ) ) +# 9534 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in + Obj.repr( +# 1607 "ml/parser.mly" + ( mkpat @@ Ppat_open (mkrhs _1 1, _4)) +# 9542 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in + Obj.repr( +# 1609 "ml/parser.mly" + (unclosed "(" 3 ")" 5 ) +# 9550 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in + Obj.repr( +# 1611 "ml/parser.mly" + ( expecting 4 "pattern" ) +# 9557 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in + Obj.repr( +# 1613 "ml/parser.mly" + ( reloc_pat _2 ) +# 9564 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in + Obj.repr( +# 1615 "ml/parser.mly" + ( unclosed "(" 1 ")" 3 ) +# 9571 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'pattern) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in + Obj.repr( +# 1617 "ml/parser.mly" + ( mkpat(Ppat_constraint(_2, _4)) ) +# 9579 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'pattern) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in + Obj.repr( +# 1619 "ml/parser.mly" + ( unclosed "(" 1 ")" 5 ) +# 9587 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + Obj.repr( +# 1621 "ml/parser.mly" + ( expecting 4 "type" ) +# 9594 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : string) in + Obj.repr( +# 1623 "ml/parser.mly" + ( mkpat_attrs (Ppat_unpack (mkrhs _4 4)) _3 ) +# 9602 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in + Obj.repr( +# 1625 "ml/parser.mly" + ( mkpat_attrs + (Ppat_constraint(mkpat(Ppat_unpack (mkrhs _4 4)), + ghtyp(Ptyp_package _6))) + _3 ) +# 9614 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in + Obj.repr( +# 1630 "ml/parser.mly" + ( unclosed "(" 1 ")" 7 ) +# 9623 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in + Obj.repr( +# 1632 "ml/parser.mly" + ( mkpat(Ppat_extension _1) ) +# 9630 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'lbl_pattern_list) in + Obj.repr( +# 1637 "ml/parser.mly" + ( let (fields, closed) = _2 in mkpat(Ppat_record(fields, closed)) ) +# 9637 "ml/parser.ml" + : 'simple_delimited_pattern)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'lbl_pattern_list) in + Obj.repr( +# 1639 "ml/parser.mly" + ( unclosed "{" 1 "}" 3 ) +# 9644 "ml/parser.ml" + : 'simple_delimited_pattern)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_semi_list) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in + Obj.repr( +# 1641 "ml/parser.mly" + ( reloc_pat (mktailpat (rhs_loc 4) (List.rev _2)) ) +# 9652 "ml/parser.ml" + : 'simple_delimited_pattern)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_semi_list) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in + Obj.repr( +# 1643 "ml/parser.mly" + ( unclosed "[" 1 "]" 4 ) +# 9660 "ml/parser.ml" + : 'simple_delimited_pattern)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_semi_list) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in + Obj.repr( +# 1645 "ml/parser.mly" + ( mkpat(Ppat_array(List.rev _2)) ) +# 9668 "ml/parser.ml" + : 'simple_delimited_pattern)) +; (fun __caml_parser_env -> + Obj.repr( +# 1647 "ml/parser.mly" + ( mkpat(Ppat_array []) ) +# 9674 "ml/parser.ml" + : 'simple_delimited_pattern)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_semi_list) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'opt_semi) in + Obj.repr( +# 1649 "ml/parser.mly" + ( unclosed "[|" 1 "|]" 4 ) +# 9682 "ml/parser.ml" + : 'simple_delimited_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_comma_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1652 "ml/parser.mly" + ( _3 :: _1 ) +# 9690 "ml/parser.ml" + : 'pattern_comma_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1653 "ml/parser.mly" + ( [_3; _1] ) +# 9698 "ml/parser.ml" + : 'pattern_comma_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + Obj.repr( +# 1654 "ml/parser.mly" + ( expecting 3 "pattern" ) +# 9705 "ml/parser.ml" + : 'pattern_comma_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn_comma_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1657 "ml/parser.mly" + ( _3 :: _1 ) +# 9713 "ml/parser.ml" + : 'pattern_no_exn_comma_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1658 "ml/parser.mly" + ( [_3; _1] ) +# 9721 "ml/parser.ml" + : 'pattern_no_exn_comma_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_no_exn) in + Obj.repr( +# 1659 "ml/parser.mly" + ( expecting 3 "pattern" ) +# 9728 "ml/parser.ml" + : 'pattern_no_exn_comma_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1662 "ml/parser.mly" + ( [_1] ) +# 9735 "ml/parser.ml" + : 'pattern_semi_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern_semi_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1663 "ml/parser.mly" + ( _3 :: _1 ) +# 9743 "ml/parser.ml" + : 'pattern_semi_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_pattern) in + Obj.repr( +# 1666 "ml/parser.mly" + ( [_1], Closed ) +# 9750 "ml/parser.ml" + : 'lbl_pattern_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'lbl_pattern) in + Obj.repr( +# 1667 "ml/parser.mly" + ( [_1], Closed ) +# 9757 "ml/parser.ml" + : 'lbl_pattern_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'lbl_pattern) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'opt_semi) in + Obj.repr( +# 1668 "ml/parser.mly" + ( [_1], Open ) +# 9765 "ml/parser.ml" + : 'lbl_pattern_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'lbl_pattern) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_pattern_list) in + Obj.repr( +# 1670 "ml/parser.mly" + ( let (fields, closed) = _3 in _1 :: fields, closed ) +# 9773 "ml/parser.ml" + : 'lbl_pattern_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'label_longident) in + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'opt_pattern_type_constraint) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1674 "ml/parser.mly" + ( (mkrhs _1 1, mkpat_opt_constraint _4 _2) ) +# 9782 "ml/parser.ml" + : 'lbl_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'label_longident) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'opt_pattern_type_constraint) in + Obj.repr( +# 1676 "ml/parser.mly" + ( (mkrhs _1 1, mkpat_opt_constraint (pat_of_label _1 1) _2) ) +# 9790 "ml/parser.ml" + : 'lbl_pattern)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1679 "ml/parser.mly" + ( Some _2 ) +# 9797 "ml/parser.ml" + : 'opt_pattern_type_constraint)) +; (fun __caml_parser_env -> + Obj.repr( +# 1680 "ml/parser.mly" + ( None ) +# 9803 "ml/parser.ml" + : 'opt_pattern_type_constraint)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'val_ident) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1687 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Val.mk (mkrhs _3 3) _5 ~attrs:(attrs@_6) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext ) +# 9816 "ml/parser.ml" + : 'value_description)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string * string option) in + Obj.repr( +# 1696 "ml/parser.mly" + ( [fst _1] ) +# 9823 "ml/parser.ml" + : 'primitive_declaration_body)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : string * string option) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'primitive_declaration_body) in + Obj.repr( +# 1697 "ml/parser.mly" + ( fst _1 :: _2 ) +# 9831 "ml/parser.ml" + : 'primitive_declaration_body)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 6 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 5 : 'val_ident) in + let _5 = (Parsing.peek_val __caml_parser_env 3 : 'core_type) in + let _7 = (Parsing.peek_val __caml_parser_env 1 : 'primitive_declaration_body) in + let _8 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1702 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Val.mk (mkrhs _3 3) _5 ~prim:_7 ~attrs:(attrs@_8) + ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) + , ext ) +# 9845 "ml/parser.ml" + : 'primitive_declaration)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_declaration) in + Obj.repr( +# 1712 "ml/parser.mly" + ( let (nonrec_flag, ty, ext) = _1 in (nonrec_flag, [ty], ext) ) +# 9852 "ml/parser.ml" + : 'type_declarations)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'type_declarations) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'and_type_declaration) in + Obj.repr( +# 1714 "ml/parser.mly" + ( let (nonrec_flag, tys, ext) = _1 in (nonrec_flag, _2 :: tys, ext) ) +# 9860 "ml/parser.ml" + : 'type_declarations)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 6 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 5 : 'nonrec_flag) in + let _4 = (Parsing.peek_val __caml_parser_env 4 : 'optional_type_parameters) in + let _5 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _6 = (Parsing.peek_val __caml_parser_env 2 : 'type_kind) in + let _7 = (Parsing.peek_val __caml_parser_env 1 : 'constraints) in + let _8 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1720 "ml/parser.mly" + ( let (kind, priv, manifest) = _6 in + let (ext, attrs) = _2 in + let ty = + Type.mk (mkrhs _5 5) ~params:_4 ~cstrs:(List.rev _7) ~kind + ~priv ?manifest ~attrs:(attrs@_8) + ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) + in + (_3, ty, ext) ) +# 9880 "ml/parser.ml" + : 'type_declaration)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 5 : 'attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'optional_type_parameters) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'type_kind) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'constraints) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1732 "ml/parser.mly" + ( let (kind, priv, manifest) = _5 in + Type.mk (mkrhs _4 4) ~params:_3 ~cstrs:(List.rev _6) + ~kind ~priv ?manifest ~attrs:(_2@_7) ~loc:(symbol_rloc ()) + ~text:(symbol_text ()) ~docs:(symbol_docs ()) ) +# 9895 "ml/parser.ml" + : 'and_type_declaration)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'constraints) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'constrain) in + Obj.repr( +# 1738 "ml/parser.mly" + ( _3 :: _1 ) +# 9903 "ml/parser.ml" + : 'constraints)) +; (fun __caml_parser_env -> + Obj.repr( +# 1739 "ml/parser.mly" + ( [] ) +# 9909 "ml/parser.ml" + : 'constraints)) +; (fun __caml_parser_env -> + Obj.repr( +# 1743 "ml/parser.mly" + ( (Ptype_abstract, Public, None) ) +# 9915 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1745 "ml/parser.mly" + ( (Ptype_abstract, Public, Some _2) ) +# 9922 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1747 "ml/parser.mly" + ( (Ptype_abstract, Private, Some _3) ) +# 9929 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_declarations) in + Obj.repr( +# 1749 "ml/parser.mly" + ( (Ptype_variant(List.rev _2), Public, None) ) +# 9936 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_declarations) in + Obj.repr( +# 1751 "ml/parser.mly" + ( (Ptype_variant(List.rev _3), Private, None) ) +# 9943 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + Obj.repr( +# 1753 "ml/parser.mly" + ( (Ptype_open, Public, None) ) +# 9949 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + Obj.repr( +# 1755 "ml/parser.mly" + ( (Ptype_open, Private, None) ) +# 9955 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'private_flag) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'label_declarations) in + Obj.repr( +# 1757 "ml/parser.mly" + ( (Ptype_record _4, _2, None) ) +# 9963 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'core_type) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'private_flag) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_declarations) in + Obj.repr( +# 1759 "ml/parser.mly" + ( (Ptype_variant(List.rev _5), _4, Some _2) ) +# 9972 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'core_type) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'private_flag) in + Obj.repr( +# 1761 "ml/parser.mly" + ( (Ptype_open, _4, Some _2) ) +# 9980 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 5 : 'core_type) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'private_flag) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'label_declarations) in + Obj.repr( +# 1763 "ml/parser.mly" + ( (Ptype_record _6, _4, Some _2) ) +# 9989 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + Obj.repr( +# 1766 "ml/parser.mly" + ( [] ) +# 9995 "ml/parser.ml" + : 'optional_type_parameters)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'optional_type_parameter) in + Obj.repr( +# 1767 "ml/parser.mly" + ( [_1] ) +# 10002 "ml/parser.ml" + : 'optional_type_parameters)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'optional_type_parameter_list) in + Obj.repr( +# 1768 "ml/parser.mly" + ( List.rev _2 ) +# 10009 "ml/parser.ml" + : 'optional_type_parameters)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'type_variance) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'optional_type_variable) in + Obj.repr( +# 1771 "ml/parser.mly" + ( _2, _1 ) +# 10017 "ml/parser.ml" + : 'optional_type_parameter)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'optional_type_parameter) in + Obj.repr( +# 1774 "ml/parser.mly" + ( [_1] ) +# 10024 "ml/parser.ml" + : 'optional_type_parameter_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'optional_type_parameter_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'optional_type_parameter) in + Obj.repr( +# 1775 "ml/parser.mly" + ( _3 :: _1 ) +# 10032 "ml/parser.ml" + : 'optional_type_parameter_list)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 1778 "ml/parser.mly" + ( mktyp(Ptyp_var _2) ) +# 10039 "ml/parser.ml" + : 'optional_type_variable)) +; (fun __caml_parser_env -> + Obj.repr( +# 1779 "ml/parser.mly" + ( mktyp(Ptyp_any) ) +# 10045 "ml/parser.ml" + : 'optional_type_variable)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'type_variance) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'type_variable) in + Obj.repr( +# 1784 "ml/parser.mly" + ( _2, _1 ) +# 10053 "ml/parser.ml" + : 'type_parameter)) +; (fun __caml_parser_env -> + Obj.repr( +# 1787 "ml/parser.mly" + ( Invariant ) +# 10059 "ml/parser.ml" + : 'type_variance)) +; (fun __caml_parser_env -> + Obj.repr( +# 1788 "ml/parser.mly" + ( Covariant ) +# 10065 "ml/parser.ml" + : 'type_variance)) +; (fun __caml_parser_env -> + Obj.repr( +# 1789 "ml/parser.mly" + ( Contravariant ) +# 10071 "ml/parser.ml" + : 'type_variance)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 1792 "ml/parser.mly" + ( mktyp(Ptyp_var _2) ) +# 10078 "ml/parser.ml" + : 'type_variable)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_parameter) in + Obj.repr( +# 1795 "ml/parser.mly" + ( [_1] ) +# 10085 "ml/parser.ml" + : 'type_parameter_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'type_parameter_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'type_parameter) in + Obj.repr( +# 1796 "ml/parser.mly" + ( _3 :: _1 ) +# 10093 "ml/parser.ml" + : 'type_parameter_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_declaration) in + Obj.repr( +# 1799 "ml/parser.mly" + ( [_1] ) +# 10100 "ml/parser.ml" + : 'constructor_declarations)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'bar_constructor_declaration) in + Obj.repr( +# 1800 "ml/parser.mly" + ( [_1] ) +# 10107 "ml/parser.ml" + : 'constructor_declarations)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'constructor_declarations) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'bar_constructor_declaration) in + Obj.repr( +# 1801 "ml/parser.mly" + ( _2 :: _1 ) +# 10115 "ml/parser.ml" + : 'constructor_declarations)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'constr_ident) in + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'generalized_constructor_arguments) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 1805 "ml/parser.mly" + ( + let args,res = _2 in + Type.constructor (mkrhs _1 1) ~args ?res ~attrs:_3 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) + ) +# 10128 "ml/parser.ml" + : 'constructor_declaration)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'constr_ident) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'generalized_constructor_arguments) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 1813 "ml/parser.mly" + ( + let args,res = _3 in + Type.constructor (mkrhs _2 2) ~args ?res ~attrs:_4 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) + ) +# 10141 "ml/parser.ml" + : 'bar_constructor_declaration)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'sig_exception_declaration) in + Obj.repr( +# 1820 "ml/parser.mly" + ( _1 ) +# 10148 "ml/parser.ml" + : 'str_exception_declaration)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 5 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 4 : 'constr_ident) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'constr_longident) in + let _6 = (Parsing.peek_val __caml_parser_env 1 : 'attributes) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1823 "ml/parser.mly" + ( let (ext,attrs) = _2 in + Te.rebind (mkrhs _3 3) (mkrhs _5 5) ~attrs:(attrs @ _6 @ _7) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext ) +# 10162 "ml/parser.ml" + : 'str_exception_declaration)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 4 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'constr_ident) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'generalized_constructor_arguments) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'attributes) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1831 "ml/parser.mly" + ( let args, res = _4 in + let (ext,attrs) = _2 in + Te.decl (mkrhs _3 3) ~args ?res ~attrs:(attrs @ _5 @ _6) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext ) +# 10177 "ml/parser.ml" + : 'sig_exception_declaration)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'constr_ident) in + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'generalized_constructor_arguments) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 1839 "ml/parser.mly" + ( let args, res = _2 in + Te.decl (mkrhs _1 1) ~args ?res ~attrs:_3 ~loc:(symbol_rloc()) ) +# 10187 "ml/parser.ml" + : 'let_exception_declaration)) +; (fun __caml_parser_env -> + Obj.repr( +# 1843 "ml/parser.mly" + ( (Pcstr_tuple [],None) ) +# 10193 "ml/parser.ml" + : 'generalized_constructor_arguments)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_arguments) in + Obj.repr( +# 1844 "ml/parser.mly" + ( (_2,None) ) +# 10200 "ml/parser.ml" + : 'generalized_constructor_arguments)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'constructor_arguments) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in + Obj.repr( +# 1846 "ml/parser.mly" + ( (_2,Some _4) ) +# 10208 "ml/parser.ml" + : 'generalized_constructor_arguments)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in + Obj.repr( +# 1848 "ml/parser.mly" + ( (Pcstr_tuple [],Some _2) ) +# 10215 "ml/parser.ml" + : 'generalized_constructor_arguments)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_list) in + Obj.repr( +# 1852 "ml/parser.mly" + ( Pcstr_tuple (List.rev _1) ) +# 10222 "ml/parser.ml" + : 'constructor_arguments)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'label_declarations) in + Obj.repr( +# 1853 "ml/parser.mly" + ( Pcstr_record _2 ) +# 10229 "ml/parser.ml" + : 'constructor_arguments)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label_declaration) in + Obj.repr( +# 1856 "ml/parser.mly" + ( [_1] ) +# 10236 "ml/parser.ml" + : 'label_declarations)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label_declaration_semi) in + Obj.repr( +# 1857 "ml/parser.mly" + ( [_1] ) +# 10243 "ml/parser.ml" + : 'label_declarations)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'label_declaration_semi) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_declarations) in + Obj.repr( +# 1858 "ml/parser.mly" + ( _1 :: _2 ) +# 10251 "ml/parser.ml" + : 'label_declarations)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mutable_flag) in + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'label) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'poly_type_no_attr) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 1862 "ml/parser.mly" + ( + Type.field (mkrhs _2 2) _4 ~mut:_1 ~attrs:_5 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) + ) +# 10264 "ml/parser.ml" + : 'label_declaration)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 6 : 'mutable_flag) in + let _2 = (Parsing.peek_val __caml_parser_env 5 : 'label) in + let _4 = (Parsing.peek_val __caml_parser_env 3 : 'poly_type_no_attr) in + let _5 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _7 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 1869 "ml/parser.mly" + ( + let info = + match rhs_info 5 with + | Some _ as info_before_semi -> info_before_semi + | None -> symbol_info () + in + Type.field (mkrhs _2 2) _4 ~mut:_1 ~attrs:(_5 @ _7) + ~loc:(symbol_rloc()) ~info + ) +# 10283 "ml/parser.ml" + : 'label_declaration_semi)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 7 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 6 : 'nonrec_flag) in + let _4 = (Parsing.peek_val __caml_parser_env 5 : 'optional_type_parameters) in + let _5 = (Parsing.peek_val __caml_parser_env 4 : 'type_longident) in + let _7 = (Parsing.peek_val __caml_parser_env 2 : 'private_flag) in + let _8 = (Parsing.peek_val __caml_parser_env 1 : 'str_extension_constructors) in + let _9 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1885 "ml/parser.mly" + ( let (ext, attrs) = _2 in + if _3 <> Recursive then not_expecting 3 "nonrec flag"; + Te.mk (mkrhs _5 5) (List.rev _8) ~params:_4 ~priv:_7 + ~attrs:(attrs@_9) ~docs:(symbol_docs ()) + , ext ) +# 10300 "ml/parser.ml" + : 'str_type_extension)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 7 : 'ext_attributes) in + let _3 = (Parsing.peek_val __caml_parser_env 6 : 'nonrec_flag) in + let _4 = (Parsing.peek_val __caml_parser_env 5 : 'optional_type_parameters) in + let _5 = (Parsing.peek_val __caml_parser_env 4 : 'type_longident) in + let _7 = (Parsing.peek_val __caml_parser_env 2 : 'private_flag) in + let _8 = (Parsing.peek_val __caml_parser_env 1 : 'sig_extension_constructors) in + let _9 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 1894 "ml/parser.mly" + ( let (ext, attrs) = _2 in + if _3 <> Recursive then not_expecting 3 "nonrec flag"; + Te.mk (mkrhs _5 5) (List.rev _8) ~params:_4 ~priv:_7 + ~attrs:(attrs @ _9) ~docs:(symbol_docs ()) + , ext ) +# 10317 "ml/parser.ml" + : 'sig_type_extension)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension_constructor_declaration) in + Obj.repr( +# 1901 "ml/parser.mly" + ( [_1] ) +# 10324 "ml/parser.ml" + : 'str_extension_constructors)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'bar_extension_constructor_declaration) in + Obj.repr( +# 1902 "ml/parser.mly" + ( [_1] ) +# 10331 "ml/parser.ml" + : 'str_extension_constructors)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension_constructor_rebind) in + Obj.repr( +# 1903 "ml/parser.mly" + ( [_1] ) +# 10338 "ml/parser.ml" + : 'str_extension_constructors)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'bar_extension_constructor_rebind) in + Obj.repr( +# 1904 "ml/parser.mly" + ( [_1] ) +# 10345 "ml/parser.ml" + : 'str_extension_constructors)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'str_extension_constructors) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'bar_extension_constructor_declaration) in + Obj.repr( +# 1906 "ml/parser.mly" + ( _2 :: _1 ) +# 10353 "ml/parser.ml" + : 'str_extension_constructors)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'str_extension_constructors) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'bar_extension_constructor_rebind) in + Obj.repr( +# 1908 "ml/parser.mly" + ( _2 :: _1 ) +# 10361 "ml/parser.ml" + : 'str_extension_constructors)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension_constructor_declaration) in + Obj.repr( +# 1911 "ml/parser.mly" + ( [_1] ) +# 10368 "ml/parser.ml" + : 'sig_extension_constructors)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'bar_extension_constructor_declaration) in + Obj.repr( +# 1912 "ml/parser.mly" + ( [_1] ) +# 10375 "ml/parser.ml" + : 'sig_extension_constructors)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'sig_extension_constructors) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'bar_extension_constructor_declaration) in + Obj.repr( +# 1914 "ml/parser.mly" + ( _2 :: _1 ) +# 10383 "ml/parser.ml" + : 'sig_extension_constructors)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'constr_ident) in + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'generalized_constructor_arguments) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 1918 "ml/parser.mly" + ( let args, res = _2 in + Te.decl (mkrhs _1 1) ~args ?res ~attrs:_3 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) ) +# 10394 "ml/parser.ml" + : 'extension_constructor_declaration)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'constr_ident) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'generalized_constructor_arguments) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 1924 "ml/parser.mly" + ( let args, res = _3 in + Te.decl (mkrhs _2 2) ~args ?res ~attrs:_4 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) ) +# 10405 "ml/parser.ml" + : 'bar_extension_constructor_declaration)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'constr_ident) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'constr_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 1930 "ml/parser.mly" + ( Te.rebind (mkrhs _1 1) (mkrhs _3 3) ~attrs:_4 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) ) +# 10415 "ml/parser.ml" + : 'extension_constructor_rebind)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'constr_ident) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'constr_longident) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 1935 "ml/parser.mly" + ( Te.rebind (mkrhs _2 2) (mkrhs _4 4) ~attrs:_5 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) ) +# 10425 "ml/parser.ml" + : 'bar_extension_constructor_rebind)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'with_constraint) in + Obj.repr( +# 1942 "ml/parser.mly" + ( [_1] ) +# 10432 "ml/parser.ml" + : 'with_constraints)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'with_constraints) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'with_constraint) in + Obj.repr( +# 1943 "ml/parser.mly" + ( _3 :: _1 ) +# 10440 "ml/parser.ml" + : 'with_constraints)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 4 : 'optional_type_parameters) in + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'label_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'with_type_binder) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'core_type_no_attr) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'constraints) in + Obj.repr( +# 1948 "ml/parser.mly" + ( Pwith_type + (mkrhs _3 3, + (Type.mk (mkrhs (Longident.last _3) 3) + ~params:_2 + ~cstrs:(List.rev _6) + ~manifest:_5 + ~priv:_4 + ~loc:(symbol_rloc()))) ) +# 10458 "ml/parser.ml" + : 'with_constraint)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'optional_type_parameters) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'label_longident) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_no_attr) in + Obj.repr( +# 1959 "ml/parser.mly" + ( Pwith_typesubst + (mkrhs _3 3, + (Type.mk (mkrhs (Longident.last _3) 3) + ~params:_2 + ~manifest:_5 + ~loc:(symbol_rloc()))) ) +# 10472 "ml/parser.ml" + : 'with_constraint)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'mod_ext_longident) in + Obj.repr( +# 1966 "ml/parser.mly" + ( Pwith_module (mkrhs _2 2, mkrhs _4 4) ) +# 10480 "ml/parser.ml" + : 'with_constraint)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'mod_ext_longident) in + Obj.repr( +# 1968 "ml/parser.mly" + ( Pwith_modsubst (mkrhs _2 2, mkrhs _4 4) ) +# 10488 "ml/parser.ml" + : 'with_constraint)) +; (fun __caml_parser_env -> + Obj.repr( +# 1971 "ml/parser.mly" + ( Public ) +# 10494 "ml/parser.ml" + : 'with_type_binder)) +; (fun __caml_parser_env -> + Obj.repr( +# 1972 "ml/parser.mly" + ( Private ) +# 10500 "ml/parser.ml" + : 'with_type_binder)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 1978 "ml/parser.mly" + ( [mkrhs _2 2] ) +# 10507 "ml/parser.ml" + : 'typevar_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'typevar_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 1979 "ml/parser.mly" + ( mkrhs _3 3 :: _1 ) +# 10515 "ml/parser.ml" + : 'typevar_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1983 "ml/parser.mly" + ( _1 ) +# 10522 "ml/parser.ml" + : 'poly_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'typevar_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1985 "ml/parser.mly" + ( mktyp(Ptyp_poly(List.rev _1, _3)) ) +# 10530 "ml/parser.ml" + : 'poly_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_no_attr) in + Obj.repr( +# 1989 "ml/parser.mly" + ( _1 ) +# 10537 "ml/parser.ml" + : 'poly_type_no_attr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'typevar_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_no_attr) in + Obj.repr( +# 1991 "ml/parser.mly" + ( mktyp(Ptyp_poly(List.rev _1, _3)) ) +# 10545 "ml/parser.ml" + : 'poly_type_no_attr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_no_attr) in + Obj.repr( +# 1998 "ml/parser.mly" + ( _1 ) +# 10552 "ml/parser.ml" + : 'core_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attribute) in + Obj.repr( +# 2000 "ml/parser.mly" + ( Typ.attr _1 _2 ) +# 10560 "ml/parser.ml" + : 'core_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type2) in + Obj.repr( +# 2004 "ml/parser.mly" + ( _1 ) +# 10567 "ml/parser.ml" + : 'core_type_no_attr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'core_type2) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 2006 "ml/parser.mly" + ( mktyp(Ptyp_alias(_1, _4)) ) +# 10575 "ml/parser.ml" + : 'core_type_no_attr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type_or_tuple) in + Obj.repr( +# 2010 "ml/parser.mly" + ( _1 ) +# 10582 "ml/parser.ml" + : 'core_type2)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 4 : string) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'core_type2) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'core_type2) in + Obj.repr( +# 2012 "ml/parser.mly" + ( let param = extra_rhs_core_type _4 ~pos:4 in + mktyp (Ptyp_arrow(Optional _2 , param, _6)) ) +# 10592 "ml/parser.ml" + : 'core_type2)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : string) in + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'core_type2) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'core_type2) in + Obj.repr( +# 2015 "ml/parser.mly" + ( let param = extra_rhs_core_type _2 ~pos:2 in + mktyp(Ptyp_arrow(Optional _1 , param, _4)) + ) +# 10603 "ml/parser.ml" + : 'core_type2)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : string) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'core_type2) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'core_type2) in + Obj.repr( +# 2019 "ml/parser.mly" + ( let param = extra_rhs_core_type _3 ~pos:3 in + mktyp(Ptyp_arrow(Labelled _1, param, _5)) ) +# 10613 "ml/parser.ml" + : 'core_type2)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'core_type2) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type2) in + Obj.repr( +# 2022 "ml/parser.mly" + ( let param = extra_rhs_core_type _1 ~pos:1 in + mktyp(Ptyp_arrow(Nolabel, param, _3)) ) +# 10622 "ml/parser.ml" + : 'core_type2)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type2) in + Obj.repr( +# 2028 "ml/parser.mly" + ( _1 ) +# 10629 "ml/parser.ml" + : 'simple_core_type)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'core_type_comma_list) in + Obj.repr( +# 2030 "ml/parser.mly" + ( match _2 with [sty] -> sty | _ -> raise Parse_error ) +# 10636 "ml/parser.ml" + : 'simple_core_type)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 2035 "ml/parser.mly" + ( mktyp(Ptyp_var _2) ) +# 10643 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + Obj.repr( +# 2037 "ml/parser.mly" + ( mktyp(Ptyp_any) ) +# 10649 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_longident) in + Obj.repr( +# 2039 "ml/parser.mly" + ( mktyp(Ptyp_constr(mkrhs _1 1, [])) ) +# 10656 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'simple_core_type2) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'type_longident) in + Obj.repr( +# 2041 "ml/parser.mly" + ( mktyp(Ptyp_constr(mkrhs _2 2, [_1])) ) +# 10664 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'core_type_comma_list) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'type_longident) in + Obj.repr( +# 2043 "ml/parser.mly" + ( mktyp(Ptyp_constr(mkrhs _4 4, List.rev _2)) ) +# 10672 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'meth_list) in + Obj.repr( +# 2045 "ml/parser.mly" + ( let (f, c) = _2 in mktyp(Ptyp_object (f, c)) ) +# 10679 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + Obj.repr( +# 2047 "ml/parser.mly" + ( mktyp(Ptyp_object ([], Closed)) ) +# 10685 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_longident) in + Obj.repr( +# 2049 "ml/parser.mly" + ( mktyp(Ptyp_class(mkrhs _2 2, [])) ) +# 10692 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'simple_core_type2) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'class_longident) in + Obj.repr( +# 2051 "ml/parser.mly" + ( mktyp(Ptyp_class(mkrhs _3 3, [_1])) ) +# 10700 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'core_type_comma_list) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'class_longident) in + Obj.repr( +# 2053 "ml/parser.mly" + ( mktyp(Ptyp_class(mkrhs _5 5, List.rev _2)) ) +# 10708 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'tag_field) in + Obj.repr( +# 2055 "ml/parser.mly" + ( mktyp(Ptyp_variant([_2], Closed, None)) ) +# 10715 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'row_field_list) in + Obj.repr( +# 2061 "ml/parser.mly" + ( mktyp(Ptyp_variant(List.rev _3, Closed, None)) ) +# 10722 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 3 : 'row_field) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'row_field_list) in + Obj.repr( +# 2063 "ml/parser.mly" + ( mktyp(Ptyp_variant(_2 :: List.rev _4, Closed, None)) ) +# 10730 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'opt_bar) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'row_field_list) in + Obj.repr( +# 2065 "ml/parser.mly" + ( mktyp(Ptyp_variant(List.rev _3, Open, None)) ) +# 10738 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + Obj.repr( +# 2067 "ml/parser.mly" + ( mktyp(Ptyp_variant([], Open, None)) ) +# 10744 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'opt_bar) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'row_field_list) in + Obj.repr( +# 2069 "ml/parser.mly" + ( mktyp(Ptyp_variant(List.rev _3, Closed, Some [])) ) +# 10752 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 4 : 'opt_bar) in + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'row_field_list) in + let _5 = (Parsing.peek_val __caml_parser_env 1 : 'name_tag_list) in + Obj.repr( +# 2071 "ml/parser.mly" + ( mktyp(Ptyp_variant(List.rev _3, Closed, Some (List.rev _5))) ) +# 10761 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'ext_attributes) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'package_type) in + Obj.repr( +# 2073 "ml/parser.mly" + ( mktyp_attrs (Ptyp_package _4) _3 ) +# 10769 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in + Obj.repr( +# 2075 "ml/parser.mly" + ( mktyp (Ptyp_extension _1) ) +# 10776 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_type) in + Obj.repr( +# 2078 "ml/parser.mly" + ( package_type_of_module_type _1 ) +# 10783 "ml/parser.ml" + : 'package_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'row_field) in + Obj.repr( +# 2081 "ml/parser.mly" + ( [_1] ) +# 10790 "ml/parser.ml" + : 'row_field_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'row_field_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'row_field) in + Obj.repr( +# 2082 "ml/parser.mly" + ( _3 :: _1 ) +# 10798 "ml/parser.ml" + : 'row_field_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'tag_field) in + Obj.repr( +# 2085 "ml/parser.mly" + ( _1 ) +# 10805 "ml/parser.ml" + : 'row_field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in + Obj.repr( +# 2086 "ml/parser.mly" + ( Rinherit _1 ) +# 10812 "ml/parser.ml" + : 'row_field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'name_tag) in + let _3 = (Parsing.peek_val __caml_parser_env 2 : 'opt_ampersand) in + let _4 = (Parsing.peek_val __caml_parser_env 1 : 'amper_type_list) in + let _5 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 2090 "ml/parser.mly" + ( Rtag (mkrhs _1 1, add_info_attrs (symbol_info ()) _5, + _3, List.rev _4) ) +# 10823 "ml/parser.ml" + : 'tag_field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'name_tag) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 2093 "ml/parser.mly" + ( Rtag (mkrhs _1 1, add_info_attrs (symbol_info ()) _2, true, []) ) +# 10831 "ml/parser.ml" + : 'tag_field)) +; (fun __caml_parser_env -> + Obj.repr( +# 2096 "ml/parser.mly" + ( true ) +# 10837 "ml/parser.ml" + : 'opt_ampersand)) +; (fun __caml_parser_env -> + Obj.repr( +# 2097 "ml/parser.mly" + ( false ) +# 10843 "ml/parser.ml" + : 'opt_ampersand)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_no_attr) in + Obj.repr( +# 2100 "ml/parser.mly" + ( [_1] ) +# 10850 "ml/parser.ml" + : 'amper_type_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'amper_type_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_no_attr) in + Obj.repr( +# 2101 "ml/parser.mly" + ( _3 :: _1 ) +# 10858 "ml/parser.ml" + : 'amper_type_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'name_tag) in + Obj.repr( +# 2104 "ml/parser.mly" + ( [_1] ) +# 10865 "ml/parser.ml" + : 'name_tag_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'name_tag_list) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'name_tag) in + Obj.repr( +# 2105 "ml/parser.mly" + ( _2 :: _1 ) +# 10873 "ml/parser.ml" + : 'name_tag_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in + Obj.repr( +# 2108 "ml/parser.mly" + ( _1 ) +# 10880 "ml/parser.ml" + : 'simple_core_type_or_tuple)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'simple_core_type) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type_list) in + Obj.repr( +# 2110 "ml/parser.mly" + ( mktyp(Ptyp_tuple(_1 :: List.rev _3)) ) +# 10888 "ml/parser.ml" + : 'simple_core_type_or_tuple)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 2113 "ml/parser.mly" + ( [_1] ) +# 10895 "ml/parser.ml" + : 'core_type_comma_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'core_type_comma_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 2114 "ml/parser.mly" + ( _3 :: _1 ) +# 10903 "ml/parser.ml" + : 'core_type_comma_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in + Obj.repr( +# 2117 "ml/parser.mly" + ( [_1] ) +# 10910 "ml/parser.ml" + : 'core_type_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'core_type_list) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in + Obj.repr( +# 2118 "ml/parser.mly" + ( _3 :: _1 ) +# 10918 "ml/parser.ml" + : 'core_type_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'field_semi) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'meth_list) in + Obj.repr( +# 2121 "ml/parser.mly" + ( let (f, c) = _2 in (_1 :: f, c) ) +# 10926 "ml/parser.ml" + : 'meth_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'inherit_field_semi) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'meth_list) in + Obj.repr( +# 2122 "ml/parser.mly" + ( let (f, c) = _2 in (_1 :: f, c) ) +# 10934 "ml/parser.ml" + : 'meth_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'field_semi) in + Obj.repr( +# 2123 "ml/parser.mly" + ( [_1], Closed ) +# 10941 "ml/parser.ml" + : 'meth_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'field) in + Obj.repr( +# 2124 "ml/parser.mly" + ( [_1], Closed ) +# 10948 "ml/parser.ml" + : 'meth_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'inherit_field_semi) in + Obj.repr( +# 2125 "ml/parser.mly" + ( [_1], Closed ) +# 10955 "ml/parser.ml" + : 'meth_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in + Obj.repr( +# 2126 "ml/parser.mly" + ( [Oinherit _1], Closed ) +# 10962 "ml/parser.ml" + : 'meth_list)) +; (fun __caml_parser_env -> + Obj.repr( +# 2127 "ml/parser.mly" + ( [], Open ) +# 10968 "ml/parser.ml" + : 'meth_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'label) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'poly_type_no_attr) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 2131 "ml/parser.mly" + ( Otag (mkrhs _1 1, add_info_attrs (symbol_info ()) _4, _3) ) +# 10977 "ml/parser.ml" + : 'field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 5 : 'label) in + let _3 = (Parsing.peek_val __caml_parser_env 3 : 'poly_type_no_attr) in + let _4 = (Parsing.peek_val __caml_parser_env 2 : 'attributes) in + let _6 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 2136 "ml/parser.mly" + ( let info = + match rhs_info 4 with + | Some _ as info_before_semi -> info_before_semi + | None -> symbol_info () + in + ( Otag (mkrhs _1 1, add_info_attrs info (_4 @ _6), _3)) ) +# 10992 "ml/parser.ml" + : 'field_semi)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'simple_core_type) in + Obj.repr( +# 2145 "ml/parser.mly" + ( Oinherit _1 ) +# 10999 "ml/parser.ml" + : 'inherit_field_semi)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2148 "ml/parser.mly" + ( _1 ) +# 11006 "ml/parser.ml" + : 'label)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in + Obj.repr( +# 2154 "ml/parser.mly" + ( let (n, m) = _1 in Pconst_integer (n, m) ) +# 11013 "ml/parser.ml" + : 'constant)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : char) in + Obj.repr( +# 2155 "ml/parser.mly" + ( Pconst_char (Char.code _1) ) +# 11020 "ml/parser.ml" + : 'constant)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string * string option) in + Obj.repr( +# 2156 "ml/parser.mly" + ( let (s, d) = _1 in Pconst_string (s, d) ) +# 11027 "ml/parser.ml" + : 'constant)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in + Obj.repr( +# 2157 "ml/parser.mly" + ( let (f, m) = _1 in Pconst_float (f, m) ) +# 11034 "ml/parser.ml" + : 'constant)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constant) in + Obj.repr( +# 2160 "ml/parser.mly" + ( _1 ) +# 11041 "ml/parser.ml" + : 'signed_constant)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in + Obj.repr( +# 2161 "ml/parser.mly" + ( let (n, m) = _2 in Pconst_integer("-" ^ n, m) ) +# 11048 "ml/parser.ml" + : 'signed_constant)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in + Obj.repr( +# 2162 "ml/parser.mly" + ( let (f, m) = _2 in Pconst_float("-" ^ f, m) ) +# 11055 "ml/parser.ml" + : 'signed_constant)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in + Obj.repr( +# 2163 "ml/parser.mly" + ( let (n, m) = _2 in Pconst_integer (n, m) ) +# 11062 "ml/parser.ml" + : 'signed_constant)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in + Obj.repr( +# 2164 "ml/parser.mly" + ( let (f, m) = _2 in Pconst_float(f, m) ) +# 11069 "ml/parser.ml" + : 'signed_constant)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2170 "ml/parser.mly" + ( _1 ) +# 11076 "ml/parser.ml" + : 'ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2171 "ml/parser.mly" + ( _1 ) +# 11083 "ml/parser.ml" + : 'ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2174 "ml/parser.mly" + ( _1 ) +# 11090 "ml/parser.ml" + : 'val_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'operator) in + Obj.repr( +# 2175 "ml/parser.mly" + ( _2 ) +# 11097 "ml/parser.ml" + : 'val_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'operator) in + Obj.repr( +# 2176 "ml/parser.mly" + ( unclosed "(" 1 ")" 3 ) +# 11104 "ml/parser.ml" + : 'val_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2177 "ml/parser.mly" + ( expecting 2 "operator" ) +# 11110 "ml/parser.ml" + : 'val_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2178 "ml/parser.mly" + ( expecting 3 "module-expr" ) +# 11116 "ml/parser.ml" + : 'val_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2181 "ml/parser.mly" + ( _1 ) +# 11123 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2182 "ml/parser.mly" + ( _1 ) +# 11130 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2183 "ml/parser.mly" + ( _1 ) +# 11137 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2184 "ml/parser.mly" + ( _1 ) +# 11144 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2185 "ml/parser.mly" + ( _1 ) +# 11151 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2186 "ml/parser.mly" + ( _1 ) +# 11158 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in + Obj.repr( +# 2187 "ml/parser.mly" + ( "."^ _1 ^"()" ) +# 11165 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : string) in + Obj.repr( +# 2188 "ml/parser.mly" + ( "."^ _1 ^ "()<-" ) +# 11172 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in + Obj.repr( +# 2189 "ml/parser.mly" + ( "."^ _1 ^"[]" ) +# 11179 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : string) in + Obj.repr( +# 2190 "ml/parser.mly" + ( "."^ _1 ^ "[]<-" ) +# 11186 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in + Obj.repr( +# 2191 "ml/parser.mly" + ( "."^ _1 ^"{}" ) +# 11193 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : string) in + Obj.repr( +# 2192 "ml/parser.mly" + ( "."^ _1 ^ "{}<-" ) +# 11200 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2193 "ml/parser.mly" + ( _1 ) +# 11207 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2194 "ml/parser.mly" + ( "!" ) +# 11213 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2195 "ml/parser.mly" + ( "+" ) +# 11219 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2196 "ml/parser.mly" + ( "+." ) +# 11225 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2197 "ml/parser.mly" + ( "-" ) +# 11231 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2198 "ml/parser.mly" + ( "-." ) +# 11237 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2199 "ml/parser.mly" + ( "*" ) +# 11243 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2200 "ml/parser.mly" + ( "=" ) +# 11249 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2201 "ml/parser.mly" + ( "<" ) +# 11255 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2202 "ml/parser.mly" + ( ">" ) +# 11261 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2203 "ml/parser.mly" + ( "or" ) +# 11267 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2204 "ml/parser.mly" + ( "||" ) +# 11273 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2205 "ml/parser.mly" + ( "&" ) +# 11279 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2206 "ml/parser.mly" + ( "&&" ) +# 11285 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2207 "ml/parser.mly" + ( ":=" ) +# 11291 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2208 "ml/parser.mly" + ( "+=" ) +# 11297 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2209 "ml/parser.mly" + ( "%" ) +# 11303 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2212 "ml/parser.mly" + ( _1 ) +# 11310 "ml/parser.ml" + : 'constr_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2213 "ml/parser.mly" + ( "[]" ) +# 11316 "ml/parser.ml" + : 'constr_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2214 "ml/parser.mly" + ( "()" ) +# 11322 "ml/parser.ml" + : 'constr_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2215 "ml/parser.mly" + ( "::" ) +# 11328 "ml/parser.ml" + : 'constr_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2216 "ml/parser.mly" + ( "false" ) +# 11334 "ml/parser.ml" + : 'constr_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2217 "ml/parser.mly" + ( "true" ) +# 11340 "ml/parser.ml" + : 'constr_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'val_ident) in + Obj.repr( +# 2221 "ml/parser.mly" + ( Lident _1 ) +# 11347 "ml/parser.ml" + : 'val_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'val_ident) in + Obj.repr( +# 2222 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 11355 "ml/parser.ml" + : 'val_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'mod_longident) in + Obj.repr( +# 2225 "ml/parser.mly" + ( _1 ) +# 11362 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + Obj.repr( +# 2226 "ml/parser.mly" + ( Ldot(_1,"::") ) +# 11369 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2227 "ml/parser.mly" + ( Lident "[]" ) +# 11375 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2228 "ml/parser.mly" + ( Lident "()" ) +# 11381 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2229 "ml/parser.mly" + ( Lident "::" ) +# 11387 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2230 "ml/parser.mly" + ( Lident "false" ) +# 11393 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2231 "ml/parser.mly" + ( Lident "true" ) +# 11399 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2234 "ml/parser.mly" + ( Lident _1 ) +# 11406 "ml/parser.ml" + : 'label_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2235 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 11414 "ml/parser.ml" + : 'label_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2238 "ml/parser.mly" + ( Lident _1 ) +# 11421 "ml/parser.ml" + : 'type_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_ext_longident) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2239 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 11429 "ml/parser.ml" + : 'type_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2242 "ml/parser.mly" + ( Lident _1 ) +# 11436 "ml/parser.ml" + : 'mod_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2243 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 11444 "ml/parser.ml" + : 'mod_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2246 "ml/parser.mly" + ( Lident _1 ) +# 11451 "ml/parser.ml" + : 'mod_ext_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_ext_longident) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2247 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 11459 "ml/parser.ml" + : 'mod_ext_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_ext_longident) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'mod_ext_longident) in + Obj.repr( +# 2248 "ml/parser.mly" + ( lapply _1 _3 ) +# 11467 "ml/parser.ml" + : 'mod_ext_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 2251 "ml/parser.mly" + ( Lident _1 ) +# 11474 "ml/parser.ml" + : 'mty_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_ext_longident) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 2252 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 11482 "ml/parser.ml" + : 'mty_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2255 "ml/parser.mly" + ( Lident _1 ) +# 11489 "ml/parser.ml" + : 'clty_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_ext_longident) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2256 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 11497 "ml/parser.ml" + : 'clty_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2259 "ml/parser.mly" + ( Lident _1 ) +# 11504 "ml/parser.ml" + : 'class_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'mod_longident) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2260 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 11512 "ml/parser.ml" + : 'class_longident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 2269 "ml/parser.mly" + ( _2 ) +# 11519 "ml/parser.ml" + : 'name_tag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2272 "ml/parser.mly" + ( Nonrecursive ) +# 11525 "ml/parser.ml" + : 'rec_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2273 "ml/parser.mly" + ( Recursive ) +# 11531 "ml/parser.ml" + : 'rec_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2276 "ml/parser.mly" + ( Recursive ) +# 11537 "ml/parser.ml" + : 'nonrec_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2277 "ml/parser.mly" + ( Nonrecursive ) +# 11543 "ml/parser.ml" + : 'nonrec_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2280 "ml/parser.mly" + ( Upto ) +# 11549 "ml/parser.ml" + : 'direction_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2281 "ml/parser.mly" + ( Downto ) +# 11555 "ml/parser.ml" + : 'direction_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2284 "ml/parser.mly" + ( Public ) +# 11561 "ml/parser.ml" + : 'private_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2285 "ml/parser.mly" + ( Private ) +# 11567 "ml/parser.ml" + : 'private_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2288 "ml/parser.mly" + ( Immutable ) +# 11573 "ml/parser.ml" + : 'mutable_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2289 "ml/parser.mly" + ( Mutable ) +# 11579 "ml/parser.ml" + : 'mutable_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2292 "ml/parser.mly" + ( Concrete ) +# 11585 "ml/parser.ml" + : 'virtual_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2293 "ml/parser.mly" + ( Virtual ) +# 11591 "ml/parser.ml" + : 'virtual_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2296 "ml/parser.mly" + ( Public, Concrete ) +# 11597 "ml/parser.ml" + : 'private_virtual_flags)) +; (fun __caml_parser_env -> + Obj.repr( +# 2297 "ml/parser.mly" + ( Private, Concrete ) +# 11603 "ml/parser.ml" + : 'private_virtual_flags)) +; (fun __caml_parser_env -> + Obj.repr( +# 2298 "ml/parser.mly" + ( Public, Virtual ) +# 11609 "ml/parser.ml" + : 'private_virtual_flags)) +; (fun __caml_parser_env -> + Obj.repr( +# 2299 "ml/parser.mly" + ( Private, Virtual ) +# 11615 "ml/parser.ml" + : 'private_virtual_flags)) +; (fun __caml_parser_env -> + Obj.repr( +# 2300 "ml/parser.mly" + ( Private, Virtual ) +# 11621 "ml/parser.ml" + : 'private_virtual_flags)) +; (fun __caml_parser_env -> + Obj.repr( +# 2303 "ml/parser.mly" + ( Fresh ) +# 11627 "ml/parser.ml" + : 'override_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2304 "ml/parser.mly" + ( Override ) +# 11633 "ml/parser.ml" + : 'override_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2307 "ml/parser.mly" + ( () ) +# 11639 "ml/parser.ml" + : 'opt_bar)) +; (fun __caml_parser_env -> + Obj.repr( +# 2308 "ml/parser.mly" + ( () ) +# 11645 "ml/parser.ml" + : 'opt_bar)) +; (fun __caml_parser_env -> + Obj.repr( +# 2311 "ml/parser.mly" + ( () ) +# 11651 "ml/parser.ml" + : 'opt_semi)) +; (fun __caml_parser_env -> + Obj.repr( +# 2312 "ml/parser.mly" + ( () ) +# 11657 "ml/parser.ml" + : 'opt_semi)) +; (fun __caml_parser_env -> + Obj.repr( +# 2315 "ml/parser.mly" + ( "-" ) +# 11663 "ml/parser.ml" + : 'subtractive)) +; (fun __caml_parser_env -> + Obj.repr( +# 2316 "ml/parser.mly" + ( "-." ) +# 11669 "ml/parser.ml" + : 'subtractive)) +; (fun __caml_parser_env -> + Obj.repr( +# 2319 "ml/parser.mly" + ( "+" ) +# 11675 "ml/parser.ml" + : 'additive)) +; (fun __caml_parser_env -> + Obj.repr( +# 2320 "ml/parser.mly" + ( "+." ) +# 11681 "ml/parser.ml" + : 'additive)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2326 "ml/parser.mly" + ( _1 ) +# 11688 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2327 "ml/parser.mly" + ( _1 ) +# 11695 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2328 "ml/parser.mly" + ( "and" ) +# 11701 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2329 "ml/parser.mly" + ( "as" ) +# 11707 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2330 "ml/parser.mly" + ( "assert" ) +# 11713 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2331 "ml/parser.mly" + ( "begin" ) +# 11719 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2332 "ml/parser.mly" + ( "class" ) +# 11725 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2333 "ml/parser.mly" + ( "constraint" ) +# 11731 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2334 "ml/parser.mly" + ( "do" ) +# 11737 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2335 "ml/parser.mly" + ( "done" ) +# 11743 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2336 "ml/parser.mly" + ( "downto" ) +# 11749 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2337 "ml/parser.mly" + ( "else" ) +# 11755 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2338 "ml/parser.mly" + ( "end" ) +# 11761 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2339 "ml/parser.mly" + ( "exception" ) +# 11767 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2340 "ml/parser.mly" + ( "external" ) +# 11773 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2341 "ml/parser.mly" + ( "false" ) +# 11779 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2342 "ml/parser.mly" + ( "for" ) +# 11785 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2343 "ml/parser.mly" + ( "fun" ) +# 11791 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2344 "ml/parser.mly" + ( "function" ) +# 11797 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2345 "ml/parser.mly" + ( "functor" ) +# 11803 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2346 "ml/parser.mly" + ( "if" ) +# 11809 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2347 "ml/parser.mly" + ( "in" ) +# 11815 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2348 "ml/parser.mly" + ( "include" ) +# 11821 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2349 "ml/parser.mly" + ( "inherit" ) +# 11827 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2350 "ml/parser.mly" + ( "initializer" ) +# 11833 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2351 "ml/parser.mly" + ( "lazy" ) +# 11839 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2352 "ml/parser.mly" + ( "let" ) +# 11845 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2353 "ml/parser.mly" + ( "match" ) +# 11851 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2354 "ml/parser.mly" + ( "method" ) +# 11857 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2355 "ml/parser.mly" + ( "module" ) +# 11863 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2356 "ml/parser.mly" + ( "mutable" ) +# 11869 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2357 "ml/parser.mly" + ( "new" ) +# 11875 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2358 "ml/parser.mly" + ( "nonrec" ) +# 11881 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2359 "ml/parser.mly" + ( "object" ) +# 11887 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2360 "ml/parser.mly" + ( "of" ) +# 11893 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2361 "ml/parser.mly" + ( "open" ) +# 11899 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2362 "ml/parser.mly" + ( "or" ) +# 11905 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2363 "ml/parser.mly" + ( "private" ) +# 11911 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2364 "ml/parser.mly" + ( "rec" ) +# 11917 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2365 "ml/parser.mly" + ( "sig" ) +# 11923 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2366 "ml/parser.mly" + ( "struct" ) +# 11929 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2367 "ml/parser.mly" + ( "then" ) +# 11935 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2368 "ml/parser.mly" + ( "to" ) +# 11941 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2369 "ml/parser.mly" + ( "true" ) +# 11947 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2370 "ml/parser.mly" + ( "try" ) +# 11953 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2371 "ml/parser.mly" + ( "type" ) +# 11959 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2372 "ml/parser.mly" + ( "val" ) +# 11965 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2373 "ml/parser.mly" + ( "virtual" ) +# 11971 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2374 "ml/parser.mly" + ( "when" ) +# 11977 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2375 "ml/parser.mly" + ( "while" ) +# 11983 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2376 "ml/parser.mly" + ( "with" ) +# 11989 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'single_attr_id) in + Obj.repr( +# 2381 "ml/parser.mly" + ( mkloc _1 (symbol_rloc()) ) +# 11996 "ml/parser.ml" + : 'attr_id)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'single_attr_id) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'attr_id) in + Obj.repr( +# 2382 "ml/parser.mly" + ( mkloc (_1 ^ "." ^ _3.txt) (symbol_rloc())) +# 12004 "ml/parser.ml" + : 'attr_id)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attr_id) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'payload) in + Obj.repr( +# 2385 "ml/parser.mly" + ( (_2, _3) ) +# 12012 "ml/parser.ml" + : 'attribute)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attr_id) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'payload) in + Obj.repr( +# 2388 "ml/parser.mly" + ( (_2, _3) ) +# 12020 "ml/parser.ml" + : 'post_item_attribute)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attr_id) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'payload) in + Obj.repr( +# 2391 "ml/parser.mly" + ( (_2, _3) ) +# 12028 "ml/parser.ml" + : 'floating_attribute)) +; (fun __caml_parser_env -> + Obj.repr( +# 2394 "ml/parser.mly" + ( [] ) +# 12034 "ml/parser.ml" + : 'post_item_attributes)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'post_item_attribute) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'post_item_attributes) in + Obj.repr( +# 2395 "ml/parser.mly" + ( _1 :: _2 ) +# 12042 "ml/parser.ml" + : 'post_item_attributes)) +; (fun __caml_parser_env -> + Obj.repr( +# 2398 "ml/parser.mly" + ( [] ) +# 12048 "ml/parser.ml" + : 'attributes)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'attribute) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 2399 "ml/parser.mly" + ( _1 :: _2 ) +# 12056 "ml/parser.ml" + : 'attributes)) +; (fun __caml_parser_env -> + Obj.repr( +# 2402 "ml/parser.mly" + ( None, [] ) +# 12062 "ml/parser.ml" + : 'ext_attributes)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'attribute) in + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 2403 "ml/parser.mly" + ( None, _1 :: _2 ) +# 12070 "ml/parser.ml" + : 'ext_attributes)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'attr_id) in + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'attributes) in + Obj.repr( +# 2404 "ml/parser.mly" + ( Some _2, _3 ) +# 12078 "ml/parser.ml" + : 'ext_attributes)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attr_id) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'payload) in + Obj.repr( +# 2407 "ml/parser.mly" + ( (_2, _3) ) +# 12086 "ml/parser.ml" + : 'extension)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'attr_id) in + let _3 = (Parsing.peek_val __caml_parser_env 1 : 'payload) in + Obj.repr( +# 2410 "ml/parser.mly" + ( (_2, _3) ) +# 12094 "ml/parser.ml" + : 'item_extension)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'structure) in + Obj.repr( +# 2413 "ml/parser.mly" + ( PStr _1 ) +# 12101 "ml/parser.ml" + : 'payload)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'signature) in + Obj.repr( +# 2414 "ml/parser.mly" + ( PSig _2 ) +# 12108 "ml/parser.ml" + : 'payload)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 2415 "ml/parser.mly" + ( PTyp _2 ) +# 12115 "ml/parser.ml" + : 'payload)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 2416 "ml/parser.mly" + ( PPat (_2, None) ) +# 12122 "ml/parser.ml" + : 'payload)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + let _4 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 2417 "ml/parser.mly" + ( PPat (_2, Some _4) ) +# 12130 "ml/parser.ml" + : 'payload)) +(* Entry implementation *) +; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0))) +(* Entry interface *) +; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0))) +(* Entry parse_core_type *) +; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0))) +(* Entry parse_expression *) +; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0))) +(* Entry parse_pattern *) +; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0))) +|] +let yytables = + { Parsing.actions=yyact; + Parsing.transl_const=yytransl_const; + Parsing.transl_block=yytransl_block; + Parsing.lhs=yylhs; + Parsing.len=yylen; + Parsing.defred=yydefred; + Parsing.dgoto=yydgoto; + Parsing.sindex=yysindex; + Parsing.rindex=yyrindex; + Parsing.gindex=yygindex; + Parsing.tablesize=yytablesize; + Parsing.table=yytable; + Parsing.check=yycheck; + Parsing.error_function=parse_error; + Parsing.names_const=yynames_const; + Parsing.names_block=yynames_block } +let implementation (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = + (Parsing.yyparse yytables 1 lexfun lexbuf : Parsetree.structure) +let interface (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = + (Parsing.yyparse yytables 2 lexfun lexbuf : Parsetree.signature) +let parse_core_type (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = + (Parsing.yyparse yytables 3 lexfun lexbuf : Parsetree.core_type) +let parse_expression (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = + (Parsing.yyparse yytables 4 lexfun lexbuf : Parsetree.expression) +let parse_pattern (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = + (Parsing.yyparse yytables 5 lexfun lexbuf : Parsetree.pattern) +;; diff --git a/analysis/vendor/compiler-libs-406/parser.mli b/analysis/vendor/ml/parser.mli similarity index 91% rename from analysis/vendor/compiler-libs-406/parser.mli rename to analysis/vendor/ml/parser.mli index 444edf031..fd7969f7b 100644 --- a/analysis/vendor/compiler-libs-406/parser.mli +++ b/analysis/vendor/ml/parser.mli @@ -123,10 +123,6 @@ val implementation : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Parsetree.structure val interface : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Parsetree.signature -val toplevel_phrase : - (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Parsetree.toplevel_phrase -val use_file : - (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Parsetree.toplevel_phrase list val parse_core_type : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Parsetree.core_type val parse_expression : diff --git a/analysis/vendor/ml/parser.mly b/analysis/vendor/ml/parser.mly new file mode 100644 index 000000000..fe4ace9a4 --- /dev/null +++ b/analysis/vendor/ml/parser.mly @@ -0,0 +1,2419 @@ +/**************************************************************************/ +/* */ +/* OCaml */ +/* */ +/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */ +/* */ +/* Copyright 1996 Institut National de Recherche en Informatique et */ +/* en Automatique. */ +/* */ +/* All rights reserved. This file is distributed under the terms of */ +/* the GNU Lesser General Public License version 2.1, with the */ +/* special exception on linking described in the file LICENSE. */ +/* */ +/**************************************************************************/ + +/* The parser definition */ + +%{ +open Location +open Asttypes +open Longident +open Parsetree +open Ast_helper +open Docstrings + +let mktyp d = Typ.mk ~loc:(symbol_rloc()) d +let mkpat d = Pat.mk ~loc:(symbol_rloc()) d +let mkexp d = Exp.mk ~loc:(symbol_rloc()) d +let mkmty ?attrs d = Mty.mk ~loc:(symbol_rloc()) ?attrs d +let mksig d = Sig.mk ~loc:(symbol_rloc()) d +let mkmod ?attrs d = Mod.mk ~loc:(symbol_rloc()) ?attrs d +let mkstr d = Str.mk ~loc:(symbol_rloc()) d +let mkcty ?attrs d = Cty.mk ~loc:(symbol_rloc()) ?attrs d +let mkctf ?attrs ?docs d = + Ctf.mk ~loc:(symbol_rloc()) ?attrs ?docs d +let mkcf ?attrs ?docs d = + Cf.mk ~loc:(symbol_rloc()) ?attrs ?docs d + +let mkrhs rhs pos = mkloc rhs (rhs_loc pos) + +let reloc_pat x = { x with ppat_loc = symbol_rloc () };; +let reloc_exp x = { x with pexp_loc = symbol_rloc () };; + +let mkoperator name pos = + let loc = rhs_loc pos in + Exp.mk ~loc (Pexp_ident(mkloc (Lident name) loc)) + +let mkpatvar name pos = + Pat.mk ~loc:(rhs_loc pos) (Ppat_var (mkrhs name pos)) + +(* + Ghost expressions and patterns: + expressions and patterns that do not appear explicitly in the + source file they have the loc_ghost flag set to true. + Then the profiler will not try to instrument them and the + -annot option will not try to display their type. + + Every grammar rule that generates an element with a location must + make at most one non-ghost element, the topmost one. + + How to tell whether your location must be ghost: + A location corresponds to a range of characters in the source file. + If the location contains a piece of code that is syntactically + valid (according to the documentation), and corresponds to the + AST node, then the location must be real; in all other cases, + it must be ghost. +*) +let ghexp d = Exp.mk ~loc:(symbol_gloc ()) d +let ghpat d = Pat.mk ~loc:(symbol_gloc ()) d +let ghtyp d = Typ.mk ~loc:(symbol_gloc ()) d +let ghloc d = { txt = d; loc = symbol_gloc () } +let ghstr d = Str.mk ~loc:(symbol_gloc()) d +let ghsig d = Sig.mk ~loc:(symbol_gloc()) d + +let mkinfix arg1 name arg2 = + mkexp(Pexp_apply(mkoperator name 2, [Nolabel, arg1; Nolabel, arg2])) + +let neg_string f = + if String.length f > 0 && f.[0] = '-' + then String.sub f 1 (String.length f - 1) + else "-" ^ f + +let mkuminus name arg = + match name, arg.pexp_desc with + | "-", Pexp_constant(Pconst_integer (n,m)) -> + mkexp(Pexp_constant(Pconst_integer(neg_string n,m))) + | ("-" | "-."), Pexp_constant(Pconst_float (f, m)) -> + mkexp(Pexp_constant(Pconst_float(neg_string f, m))) + | _ -> + mkexp(Pexp_apply(mkoperator ("~" ^ name) 1, [Nolabel, arg])) + +let mkuplus name arg = + let desc = arg.pexp_desc in + match name, desc with + | "+", Pexp_constant(Pconst_integer _) + | ("+" | "+."), Pexp_constant(Pconst_float _) -> mkexp desc + | _ -> + mkexp(Pexp_apply(mkoperator ("~" ^ name) 1, [Nolabel, arg])) + +let mkexp_cons consloc args loc = + Exp.mk ~loc (Pexp_construct(mkloc (Lident "::") consloc, Some args)) + +let mkpat_cons consloc args loc = + Pat.mk ~loc (Ppat_construct(mkloc (Lident "::") consloc, Some args)) + +let rec mktailexp nilloc = function + [] -> + let loc = { nilloc with loc_ghost = true } in + let nil = { txt = Lident "[]"; loc = loc } in + Exp.mk ~loc (Pexp_construct (nil, None)) + | e1 :: el -> + let exp_el = mktailexp nilloc el in + let loc = {loc_start = e1.pexp_loc.loc_start; + loc_end = exp_el.pexp_loc.loc_end; + loc_ghost = true} + in + let arg = Exp.mk ~loc (Pexp_tuple [e1; exp_el]) in + mkexp_cons {loc with loc_ghost = true} arg loc + +let rec mktailpat nilloc = function + [] -> + let loc = { nilloc with loc_ghost = true } in + let nil = { txt = Lident "[]"; loc = loc } in + Pat.mk ~loc (Ppat_construct (nil, None)) + | p1 :: pl -> + let pat_pl = mktailpat nilloc pl in + let loc = {loc_start = p1.ppat_loc.loc_start; + loc_end = pat_pl.ppat_loc.loc_end; + loc_ghost = true} + in + let arg = Pat.mk ~loc (Ppat_tuple [p1; pat_pl]) in + mkpat_cons {loc with loc_ghost = true} arg loc + +let mkstrexp e attrs = + { pstr_desc = Pstr_eval (e, attrs); pstr_loc = e.pexp_loc } + +let mkexp_constraint e (t1, t2) = + match t1, t2 with + | Some t, None -> ghexp(Pexp_constraint(e, t)) + | _, Some t -> ghexp(Pexp_coerce(e, t1, t)) + | None, None -> assert false + +let mkexp_opt_constraint e = function + | None -> e + | Some constraint_ -> mkexp_constraint e constraint_ + +let mkpat_opt_constraint p = function + | None -> p + | Some typ -> mkpat (Ppat_constraint(p, typ)) + +let array_function str name = + ghloc (Ldot(Lident str, (if !Clflags.fast then "unsafe_" ^ name else name))) + +let syntax_error () = + raise Syntaxerr.Escape_error + +let unclosed opening_name opening_num closing_name closing_num = + raise(Syntaxerr.Error(Syntaxerr.Unclosed(rhs_loc opening_num, opening_name, + rhs_loc closing_num, closing_name))) + +let expecting pos nonterm = + raise Syntaxerr.(Error(Expecting(rhs_loc pos, nonterm))) + +let not_expecting pos nonterm = + raise Syntaxerr.(Error(Not_expecting(rhs_loc pos, nonterm))) + + +let lapply p1 p2 = + if !Clflags.applicative_functors + then Lapply(p1, p2) + else raise (Syntaxerr.Error(Syntaxerr.Applicative_path (symbol_rloc()))) + +let exp_of_label lbl pos = + mkexp (Pexp_ident(mkrhs (Lident(Longident.last lbl)) pos)) + +let pat_of_label lbl pos = + mkpat (Ppat_var (mkrhs (Longident.last lbl) pos)) + +let mk_newtypes newtypes exp = + List.fold_right (fun newtype exp -> mkexp (Pexp_newtype (newtype, exp))) + newtypes exp + +let wrap_type_annotation newtypes core_type body = + let exp = mkexp(Pexp_constraint(body,core_type)) in + let exp = mk_newtypes newtypes exp in + (exp, ghtyp(Ptyp_poly(newtypes, Typ.varify_constructors newtypes core_type))) + +let wrap_exp_attrs body (ext, attrs) = + (* todo: keep exact location for the entire attribute *) + let body = {body with pexp_attributes = attrs @ body.pexp_attributes} in + match ext with + | None -> body + | Some id -> ghexp(Pexp_extension (id, PStr [mkstrexp body []])) + +let mkexp_attrs d attrs = + wrap_exp_attrs (mkexp d) attrs + +let wrap_typ_attrs typ (ext, attrs) = + (* todo: keep exact location for the entire attribute *) + let typ = {typ with ptyp_attributes = attrs @ typ.ptyp_attributes} in + match ext with + | None -> typ + | Some id -> ghtyp(Ptyp_extension (id, PTyp typ)) + +let mktyp_attrs d attrs = + wrap_typ_attrs (mktyp d) attrs + +let wrap_pat_attrs pat (ext, attrs) = + (* todo: keep exact location for the entire attribute *) + let pat = {pat with ppat_attributes = attrs @ pat.ppat_attributes} in + match ext with + | None -> pat + | Some id -> ghpat(Ppat_extension (id, PPat (pat, None))) + +let mkpat_attrs d attrs = + wrap_pat_attrs (mkpat d) attrs + +let wrap_class_type_attrs body attrs = + {body with pcty_attributes = attrs @ body.pcty_attributes} +let wrap_mod_attrs body attrs = + {body with pmod_attributes = attrs @ body.pmod_attributes} +let wrap_mty_attrs body attrs = + {body with pmty_attributes = attrs @ body.pmty_attributes} + +let wrap_str_ext body ext = + match ext with + | None -> body + | Some id -> ghstr(Pstr_extension ((id, PStr [body]), [])) + +let mkstr_ext d ext = + wrap_str_ext (mkstr d) ext + +let wrap_sig_ext body ext = + match ext with + | None -> body + | Some id -> ghsig(Psig_extension ((id, PSig [body]), [])) + +let mksig_ext d ext = + wrap_sig_ext (mksig d) ext + +let text_str pos = Str.text (rhs_text pos) +let text_sig pos = Sig.text (rhs_text pos) +let text_cstr pos = Cf.text (rhs_text pos) +let text_csig pos = Ctf.text (rhs_text pos) + + +let extra_text text pos items = + let pre_extras = rhs_pre_extra_text pos in + let post_extras = rhs_post_extra_text pos in + text pre_extras @ items @ text post_extras + +let extra_str pos items = extra_text Str.text pos items +let extra_sig pos items = extra_text Sig.text pos items +let extra_cstr pos items = extra_text Cf.text pos items +let extra_csig pos items = extra_text Ctf.text pos items + +let extra_rhs_core_type ct ~pos = + let docs = rhs_info pos in + { ct with ptyp_attributes = add_info_attrs docs ct.ptyp_attributes } + +type let_binding = + { lb_pattern: pattern; + lb_expression: expression; + lb_attributes: attributes; + lb_docs: docs Lazy.t; + lb_text: text Lazy.t; + lb_loc: Location.t; } + +type [@warning "-69"] let_bindings = + { lbs_bindings: let_binding list; + lbs_rec: rec_flag; + lbs_extension: string Asttypes.loc option; + lbs_loc: Location.t } + +let mklb first (p, e) attrs = + { lb_pattern = p; + lb_expression = e; + lb_attributes = attrs; + lb_docs = symbol_docs_lazy (); + lb_text = if first then empty_text_lazy + else symbol_text_lazy (); + lb_loc = symbol_rloc (); } + +let mklbs ext rf lb = + { lbs_bindings = [lb]; + lbs_rec = rf; + lbs_extension = ext ; + lbs_loc = symbol_rloc (); } + +let addlb lbs lb = + { lbs with lbs_bindings = lb :: lbs.lbs_bindings } + +let val_of_let_bindings lbs = + let bindings = + List.map + (fun lb -> + Vb.mk ~loc:lb.lb_loc ~attrs:lb.lb_attributes + ~docs:(Lazy.force lb.lb_docs) + ~text:(Lazy.force lb.lb_text) + lb.lb_pattern lb.lb_expression) + lbs.lbs_bindings + in + let str = mkstr(Pstr_value(lbs.lbs_rec, List.rev bindings)) in + match lbs.lbs_extension with + | None -> str + | Some id -> ghstr (Pstr_extension((id, PStr [str]), [])) + +let expr_of_let_bindings lbs body = + let bindings = + List.map + (fun lb -> + Vb.mk ~loc:lb.lb_loc ~attrs:lb.lb_attributes + lb.lb_pattern lb.lb_expression) + lbs.lbs_bindings + in + mkexp_attrs (Pexp_let(lbs.lbs_rec, List.rev bindings, body)) + (lbs.lbs_extension, []) + + + +(* Alternatively, we could keep the generic module type in the Parsetree + and extract the package type during type-checking. In that case, + the assertions below should be turned into explicit checks. *) +let package_type_of_module_type pmty = + let err loc s = + raise (Syntaxerr.Error (Syntaxerr.Invalid_package_type (loc, s))) + in + let map_cstr = function + | Pwith_type (lid, ptyp) -> + let loc = ptyp.ptype_loc in + if ptyp.ptype_params <> [] then + err loc "parametrized types are not supported"; + if ptyp.ptype_cstrs <> [] then + err loc "constrained types are not supported"; + if ptyp.ptype_private <> Public then + err loc "private types are not supported"; + + (* restrictions below are checked by the 'with_constraint' rule *) + assert (ptyp.ptype_kind = Ptype_abstract); + assert (ptyp.ptype_attributes = []); + let ty = + match ptyp.ptype_manifest with + | Some ty -> ty + | None -> assert false + in + (lid, ty) + | _ -> + err pmty.pmty_loc "only 'with type t =' constraints are supported" + in + match pmty with + | {pmty_desc = Pmty_ident lid} -> (lid, []) + | {pmty_desc = Pmty_with({pmty_desc = Pmty_ident lid}, cstrs)} -> + (lid, List.map map_cstr cstrs) + | _ -> + err pmty.pmty_loc + "only module type identifier and 'with type' constraints are supported" + + +%} + +/* Tokens */ + +%token AMPERAMPER +%token AMPERSAND +%token AND +%token AS +%token ASSERT +%token BACKQUOTE +%token BANG +%token BAR +%token BARBAR +%token BARRBRACKET +%token BEGIN +%token CHAR +%token CLASS +%token COLON +%token COLONCOLON +%token COLONEQUAL +%token COLONGREATER +%token COMMA +%token CONSTRAINT +%token DO +%token DONE +%token DOT +%token DOTDOT +%token DOWNTO +%token ELSE +%token END +%token EOF +%token EQUAL +%token EXCEPTION +%token EXTERNAL +%token FALSE +%token FLOAT +%token FOR +%token FUN +%token FUNCTION +%token FUNCTOR +%token GREATER +%token GREATERRBRACE +%token GREATERRBRACKET +%token IF +%token IN +%token INCLUDE +%token INFIXOP0 +%token INFIXOP1 +%token INFIXOP2 +%token INFIXOP3 +%token INFIXOP4 +%token DOTOP +%token INHERIT +%token INITIALIZER +%token INT +%token LABEL +%token LAZY +%token LBRACE +%token LBRACELESS +%token LBRACKET +%token LBRACKETBAR +%token LBRACKETLESS +%token LBRACKETGREATER +%token LBRACKETPERCENT +%token LBRACKETPERCENTPERCENT +%token LESS +%token LESSMINUS +%token LET +%token LIDENT +%token LPAREN +%token LBRACKETAT +%token LBRACKETATAT +%token LBRACKETATATAT +%token MATCH +%token METHOD +%token MINUS +%token MINUSDOT +%token MINUSGREATER +%token MODULE +%token MUTABLE +%token NEW +%token NONREC +%token OBJECT +%token OF +%token OPEN +%token OPTLABEL +%token OR +/* %token PARSER */ +%token PERCENT +%token PLUS +%token PLUSDOT +%token PLUSEQ +%token PREFIXOP +%token PRIVATE +%token QUESTION +%token QUOTE +%token RBRACE +%token RBRACKET +%token REC +%token RPAREN +%token SEMI +%token SEMISEMI +%token HASH +%token HASHOP +%token SIG +%token STAR +%token STRING +%token STRUCT +%token THEN +%token TILDE +%token TO +%token TRUE +%token TRY +%token TYPE +%token UIDENT +%token UNDERSCORE +%token VAL +%token VIRTUAL +%token WHEN +%token WHILE +%token WITH +%token COMMENT +%token DOCSTRING + +%token EOL + +/* Precedences and associativities. + +Tokens and rules have precedences. A reduce/reduce conflict is resolved +in favor of the first rule (in source file order). A shift/reduce conflict +is resolved by comparing the precedence and associativity of the token to +be shifted with those of the rule to be reduced. + +By default, a rule has the precedence of its rightmost terminal (if any). + +When there is a shift/reduce conflict between a rule and a token that +have the same precedence, it is resolved using the associativity: +if the token is left-associative, the parser will reduce; if +right-associative, the parser will shift; if non-associative, +the parser will declare a syntax error. + +We will only use associativities with operators of the kind x * x -> x +for example, in the rules of the form expr: expr BINOP expr +in all other cases, we define two precedences if needed to resolve +conflicts. + +The precedences must be listed from low to high. +*/ + +%nonassoc IN +%nonassoc below_SEMI +%nonassoc SEMI /* below EQUAL ({lbl=...; lbl=...}) */ +%nonassoc LET /* above SEMI ( ...; let ... in ...) */ +%nonassoc below_WITH +%nonassoc FUNCTION WITH /* below BAR (match ... with ...) */ +%nonassoc AND /* above WITH (module rec A: SIG with ... and ...) */ +%nonassoc THEN /* below ELSE (if ... then ...) */ +%nonassoc ELSE /* (if ... then ... else ...) */ +%nonassoc LESSMINUS /* below COLONEQUAL (lbl <- x := e) */ +%right COLONEQUAL /* expr (e := e := e) */ +%nonassoc AS +%left BAR /* pattern (p|p|p) */ +%nonassoc below_COMMA +%left COMMA /* expr/expr_comma_list (e,e,e) */ +%right MINUSGREATER /* core_type2 (t -> t -> t) */ +%right OR BARBAR /* expr (e || e || e) */ +%right AMPERSAND AMPERAMPER /* expr (e && e && e) */ +%nonassoc below_EQUAL +%left INFIXOP0 EQUAL LESS GREATER /* expr (e OP e OP e) */ +%right INFIXOP1 /* expr (e OP e OP e) */ +%nonassoc below_LBRACKETAT +%nonassoc LBRACKETAT +%nonassoc LBRACKETATAT +%right COLONCOLON /* expr (e :: e :: e) */ +%left INFIXOP2 PLUS PLUSDOT MINUS MINUSDOT PLUSEQ /* expr (e OP e OP e) */ +%left PERCENT INFIXOP3 STAR /* expr (e OP e OP e) */ +%right INFIXOP4 /* expr (e OP e OP e) */ +%nonassoc prec_unary_minus prec_unary_plus /* unary - */ +%nonassoc prec_constant_constructor /* cf. simple_expr (C versus C x) */ +%nonassoc prec_constr_appl /* above AS BAR COLONCOLON COMMA */ +%nonassoc below_HASH +%nonassoc HASH /* simple_expr/toplevel_directive */ +%left HASHOP +%nonassoc below_DOT +%nonassoc DOT DOTOP +/* Finally, the first tokens of simple_expr are above everything else. */ +%nonassoc BACKQUOTE BANG BEGIN CHAR FALSE FLOAT INT + LBRACE LBRACELESS LBRACKET LBRACKETBAR LIDENT LPAREN + NEW PREFIXOP STRING TRUE UIDENT + LBRACKETPERCENT LBRACKETPERCENTPERCENT + + +/* Entry points */ + +%start implementation /* for implementation files */ +%type implementation +%start interface /* for interface files */ +%type interface +%start parse_core_type +%type parse_core_type +%start parse_expression +%type parse_expression +%start parse_pattern +%type parse_pattern +%% + +/* Entry points */ + +implementation: + structure EOF { extra_str 1 $1 } +; +interface: + signature EOF { extra_sig 1 $1 } +; + + +parse_core_type: + core_type EOF { $1 } +; +parse_expression: + seq_expr EOF { $1 } +; +parse_pattern: + pattern EOF { $1 } +; + +/* Module expressions */ + +functor_arg: + LPAREN RPAREN + { mkrhs "*" 2, None } + | LPAREN functor_arg_name COLON module_type RPAREN + { mkrhs $2 2, Some $4 } +; + +functor_arg_name: + UIDENT { $1 } + | UNDERSCORE { "_" } +; + +functor_args: + functor_args functor_arg + { $2 :: $1 } + | functor_arg + { [ $1 ] } +; + +module_expr: + mod_longident + { mkmod(Pmod_ident (mkrhs $1 1)) } + | STRUCT attributes structure END + { mkmod ~attrs:$2 (Pmod_structure(extra_str 3 $3)) } + | STRUCT attributes structure error + { unclosed "struct" 1 "end" 4 } + | FUNCTOR attributes functor_args MINUSGREATER module_expr + { let modexp = + List.fold_left + (fun acc (n, t) -> mkmod(Pmod_functor(n, t, acc))) + $5 $3 + in wrap_mod_attrs modexp $2 } + | module_expr paren_module_expr + { mkmod(Pmod_apply($1, $2)) } + | module_expr LPAREN RPAREN + { mkmod(Pmod_apply($1, mkmod (Pmod_structure []))) } + | paren_module_expr + { $1 } + | module_expr attribute + { Mod.attr $1 $2 } + | extension + { mkmod(Pmod_extension $1) } +; + +paren_module_expr: + LPAREN module_expr COLON module_type RPAREN + { mkmod(Pmod_constraint($2, $4)) } + | LPAREN module_expr COLON module_type error + { unclosed "(" 1 ")" 5 } + | LPAREN module_expr RPAREN + { $2 } + | LPAREN module_expr error + { unclosed "(" 1 ")" 3 } + | LPAREN VAL attributes expr RPAREN + { mkmod ~attrs:$3 (Pmod_unpack $4)} + | LPAREN VAL attributes expr COLON package_type RPAREN + { mkmod ~attrs:$3 + (Pmod_unpack( + ghexp(Pexp_constraint($4, ghtyp(Ptyp_package $6))))) } + | LPAREN VAL attributes expr COLON package_type COLONGREATER package_type + RPAREN + { mkmod ~attrs:$3 + (Pmod_unpack( + ghexp(Pexp_coerce($4, Some(ghtyp(Ptyp_package $6)), + ghtyp(Ptyp_package $8))))) } + | LPAREN VAL attributes expr COLONGREATER package_type RPAREN + { mkmod ~attrs:$3 + (Pmod_unpack( + ghexp(Pexp_coerce($4, None, ghtyp(Ptyp_package $6))))) } + | LPAREN VAL attributes expr COLON error + { unclosed "(" 1 ")" 6 } + | LPAREN VAL attributes expr COLONGREATER error + { unclosed "(" 1 ")" 6 } + | LPAREN VAL attributes expr error + { unclosed "(" 1 ")" 5 } +; + +structure: + seq_expr post_item_attributes structure_tail + { mark_rhs_docs 1 2; + (text_str 1) @ mkstrexp $1 $2 :: $3 } + | structure_tail { $1 } +; +structure_tail: + /* empty */ { [] } + | SEMISEMI structure { (text_str 1) @ $2 } + | structure_item structure_tail { (text_str 1) @ $1 :: $2 } +; +structure_item: + let_bindings + { val_of_let_bindings $1 } + | primitive_declaration + { let (body, ext) = $1 in mkstr_ext (Pstr_primitive body) ext } + | value_description + { let (body, ext) = $1 in mkstr_ext (Pstr_primitive body) ext } + | type_declarations + { let (nr, l, ext ) = $1 in mkstr_ext (Pstr_type (nr, List.rev l)) ext } + | str_type_extension + { let (l, ext) = $1 in mkstr_ext (Pstr_typext l) ext } + | str_exception_declaration + { let (l, ext) = $1 in mkstr_ext (Pstr_exception l) ext } + | module_binding + { let (body, ext) = $1 in mkstr_ext (Pstr_module body) ext } + | rec_module_bindings + { let (l, ext) = $1 in mkstr_ext (Pstr_recmodule(List.rev l)) ext } + | module_type_declaration + { let (body, ext) = $1 in mkstr_ext (Pstr_modtype body) ext } + | open_statement + { let (body, ext) = $1 in mkstr_ext (Pstr_open body) ext } + | class_type_declarations + { let (l, ext) = $1 in mkstr_ext (Pstr_class_type (List.rev l)) ext } + | str_include_statement + { let (body, ext) = $1 in mkstr_ext (Pstr_include body) ext } + | item_extension post_item_attributes + { mkstr(Pstr_extension ($1, (add_docs_attrs (symbol_docs ()) $2))) } + | floating_attribute + { mark_symbol_docs (); + mkstr(Pstr_attribute $1) } +; +str_include_statement: + INCLUDE ext_attributes module_expr post_item_attributes + { let (ext, attrs) = $2 in + Incl.mk $3 ~attrs:(attrs@$4) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext } +; +module_binding_body: + EQUAL module_expr + { $2 } + | COLON module_type EQUAL module_expr + { mkmod(Pmod_constraint($4, $2)) } + | functor_arg module_binding_body + { mkmod(Pmod_functor(fst $1, snd $1, $2)) } +; +module_binding: + MODULE ext_attributes UIDENT module_binding_body post_item_attributes + { let (ext, attrs) = $2 in + Mb.mk (mkrhs $3 3) $4 ~attrs:(attrs@$5) + ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) + , ext } +; +rec_module_bindings: + rec_module_binding { let (b, ext) = $1 in ([b], ext) } + | rec_module_bindings and_module_binding + { let (l, ext) = $1 in ($2 :: l, ext) } +; +rec_module_binding: + MODULE ext_attributes REC UIDENT module_binding_body post_item_attributes + { let (ext, attrs) = $2 in + Mb.mk (mkrhs $4 4) $5 ~attrs:(attrs@$6) + ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) + , ext } +; +and_module_binding: + AND attributes UIDENT module_binding_body post_item_attributes + { Mb.mk (mkrhs $3 3) $4 ~attrs:($2@$5) ~loc:(symbol_rloc ()) + ~text:(symbol_text ()) ~docs:(symbol_docs ()) } +; + +/* Module types */ + +module_type: + mty_longident + { mkmty(Pmty_ident (mkrhs $1 1)) } + | SIG attributes signature END + { mkmty ~attrs:$2 (Pmty_signature (extra_sig 3 $3)) } + | SIG attributes signature error + { unclosed "sig" 1 "end" 4 } + | FUNCTOR attributes functor_args MINUSGREATER module_type + %prec below_WITH + { let mty = + List.fold_left + (fun acc (n, t) -> mkmty(Pmty_functor(n, t, acc))) + $5 $3 + in wrap_mty_attrs mty $2 } + | module_type MINUSGREATER module_type + %prec below_WITH + { mkmty(Pmty_functor(mknoloc "_", Some $1, $3)) } + | module_type WITH with_constraints + { mkmty(Pmty_with($1, List.rev $3)) } + | MODULE TYPE OF attributes module_expr %prec below_LBRACKETAT + { mkmty ~attrs:$4 (Pmty_typeof $5) } +/* | LPAREN MODULE mod_longident RPAREN + { mkmty (Pmty_alias (mkrhs $3 3)) } */ + | LPAREN module_type RPAREN + { $2 } + | LPAREN module_type error + { unclosed "(" 1 ")" 3 } + | extension + { mkmty(Pmty_extension $1) } + | module_type attribute + { Mty.attr $1 $2 } +; +signature: + /* empty */ { [] } + | SEMISEMI signature { (text_sig 1) @ $2 } + | signature_item signature { (text_sig 1) @ $1 :: $2 } +; +signature_item: + value_description + { let (body, ext) = $1 in mksig_ext (Psig_value body) ext } + | primitive_declaration + { let (body, ext) = $1 in mksig_ext (Psig_value body) ext} + | type_declarations + { let (nr, l, ext) = $1 in mksig_ext (Psig_type (nr, List.rev l)) ext } + | sig_type_extension + { let (l, ext) = $1 in mksig_ext (Psig_typext l) ext } + | sig_exception_declaration + { let (l, ext) = $1 in mksig_ext (Psig_exception l) ext } + | module_declaration + { let (body, ext) = $1 in mksig_ext (Psig_module body) ext } + | module_alias + { let (body, ext) = $1 in mksig_ext (Psig_module body) ext } + | rec_module_declarations + { let (l, ext) = $1 in mksig_ext (Psig_recmodule (List.rev l)) ext } + | module_type_declaration + { let (body, ext) = $1 in mksig_ext (Psig_modtype body) ext } + | open_statement + { let (body, ext) = $1 in mksig_ext (Psig_open body) ext } + | sig_include_statement + { let (body, ext) = $1 in mksig_ext (Psig_include body) ext } + | class_type_declarations + { let (l, ext) = $1 in mksig_ext (Psig_class_type (List.rev l)) ext } + | item_extension post_item_attributes + { mksig(Psig_extension ($1, (add_docs_attrs (symbol_docs ()) $2))) } + | floating_attribute + { mark_symbol_docs (); + mksig(Psig_attribute $1) } +; +open_statement: + | OPEN override_flag ext_attributes mod_longident post_item_attributes + { let (ext, attrs) = $3 in + Opn.mk (mkrhs $4 4) ~override:$2 ~attrs:(attrs@$5) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext} +; +sig_include_statement: + INCLUDE ext_attributes module_type post_item_attributes %prec below_WITH + { let (ext, attrs) = $2 in + Incl.mk $3 ~attrs:(attrs@$4) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext} +; +module_declaration_body: + COLON module_type + { $2 } + | LPAREN UIDENT COLON module_type RPAREN module_declaration_body + { mkmty(Pmty_functor(mkrhs $2 2, Some $4, $6)) } + | LPAREN RPAREN module_declaration_body + { mkmty(Pmty_functor(mkrhs "*" 1, None, $3)) } +; +module_declaration: + MODULE ext_attributes UIDENT module_declaration_body post_item_attributes + { let (ext, attrs) = $2 in + Md.mk (mkrhs $3 3) $4 ~attrs:(attrs@$5) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext } +; +module_alias: + MODULE ext_attributes UIDENT EQUAL mod_longident post_item_attributes + { let (ext, attrs) = $2 in + Md.mk (mkrhs $3 3) + (Mty.alias ~loc:(rhs_loc 5) (mkrhs $5 5)) ~attrs:(attrs@$6) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext } +; +rec_module_declarations: + rec_module_declaration + { let (body, ext) = $1 in ([body], ext) } + | rec_module_declarations and_module_declaration + { let (l, ext) = $1 in ($2 :: l, ext) } +; +rec_module_declaration: + MODULE ext_attributes REC UIDENT COLON module_type post_item_attributes + { let (ext, attrs) = $2 in + Md.mk (mkrhs $4 4) $6 ~attrs:(attrs@$7) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext} +; +and_module_declaration: + AND attributes UIDENT COLON module_type post_item_attributes + { Md.mk (mkrhs $3 3) $5 ~attrs:($2@$6) ~loc:(symbol_rloc()) + ~text:(symbol_text()) ~docs:(symbol_docs()) } +; +module_type_declaration_body: + /* empty */ { None } + | EQUAL module_type { Some $2 } +; +module_type_declaration: + MODULE TYPE ext_attributes ident module_type_declaration_body + post_item_attributes + { let (ext, attrs) = $3 in + Mtd.mk (mkrhs $4 4) ?typ:$5 ~attrs:(attrs@$6) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext } +; +/* Class expressions */ + +class_type_parameters: + /*empty*/ { [] } + | LBRACKET type_parameter_list RBRACKET { List.rev $2 } +; +class_structure: + | class_self_pattern class_fields + { Cstr.mk $1 (extra_cstr 2 (List.rev $2)) } +; +class_self_pattern: + LPAREN pattern RPAREN + { reloc_pat $2 } + | LPAREN pattern COLON core_type RPAREN + { mkpat(Ppat_constraint($2, $4)) } + | /* empty */ + { ghpat(Ppat_any) } +; +class_fields: + /* empty */ + { [] } + | class_fields class_field + { $2 :: (text_cstr 2) @ $1 } +; +class_field: + | VAL value post_item_attributes + { let v, attrs = $2 in + mkcf (Pcf_val v) ~attrs:(attrs@$3) ~docs:(symbol_docs ()) } + | METHOD method_ post_item_attributes + { let meth, attrs = $2 in + mkcf (Pcf_method meth) ~attrs:(attrs@$3) ~docs:(symbol_docs ()) } + | CONSTRAINT attributes constrain_field post_item_attributes + { mkcf (Pcf_constraint $3) ~attrs:($2@$4) ~docs:(symbol_docs ()) } + | INITIALIZER attributes seq_expr post_item_attributes + { mkcf (Pcf_initializer $3) ~attrs:($2@$4) ~docs:(symbol_docs ()) } + | item_extension post_item_attributes + { mkcf (Pcf_extension $1) ~attrs:$2 ~docs:(symbol_docs ()) } + | floating_attribute + { mark_symbol_docs (); + mkcf (Pcf_attribute $1) } +; +value: +/* TODO: factorize these rules (also with method): */ + override_flag attributes MUTABLE VIRTUAL label COLON core_type + { if $1 = Override then syntax_error (); + (mkloc $5 (rhs_loc 5), Mutable, Cfk_virtual $7), $2 } + | override_flag attributes VIRTUAL mutable_flag label COLON core_type + { if $1 = Override then syntax_error (); + (mkrhs $5 5, $4, Cfk_virtual $7), $2 } + | override_flag attributes mutable_flag label EQUAL seq_expr + { (mkrhs $4 4, $3, Cfk_concrete ($1, $6)), $2 } + | override_flag attributes mutable_flag label type_constraint EQUAL seq_expr + { + let e = mkexp_constraint $7 $5 in + (mkrhs $4 4, $3, Cfk_concrete ($1, e)), $2 + } +; +method_: +/* TODO: factorize those rules... */ + override_flag attributes PRIVATE VIRTUAL label COLON poly_type + { if $1 = Override then syntax_error (); + (mkloc $5 (rhs_loc 5), Private, Cfk_virtual $7), $2 } + | override_flag attributes VIRTUAL private_flag label COLON poly_type + { if $1 = Override then syntax_error (); + (mkloc $5 (rhs_loc 5), $4, Cfk_virtual $7), $2 } + | override_flag attributes private_flag label strict_binding + { (mkloc $4 (rhs_loc 4), $3, + Cfk_concrete ($1, ghexp(Pexp_poly ($5, None)))), $2 } + | override_flag attributes private_flag label COLON poly_type EQUAL seq_expr + { (mkloc $4 (rhs_loc 4), $3, + Cfk_concrete ($1, ghexp(Pexp_poly($8, Some $6)))), $2 } + | override_flag attributes private_flag label COLON TYPE lident_list + DOT core_type EQUAL seq_expr + { let exp, poly = wrap_type_annotation $7 $9 $11 in + (mkloc $4 (rhs_loc 4), $3, + Cfk_concrete ($1, ghexp(Pexp_poly(exp, Some poly)))), $2 } +; + +/* Class types */ + +class_signature: + LBRACKET core_type_comma_list RBRACKET clty_longident + { mkcty(Pcty_constr (mkloc $4 (rhs_loc 4), List.rev $2)) } + | clty_longident + { mkcty(Pcty_constr (mkrhs $1 1, [])) } + | OBJECT attributes class_sig_body END + { mkcty ~attrs:$2 (Pcty_signature $3) } + | OBJECT attributes class_sig_body error + { unclosed "object" 1 "end" 4 } + | class_signature attribute + { Cty.attr $1 $2 } + | extension + { mkcty(Pcty_extension $1) } + | LET OPEN override_flag attributes mod_longident IN class_signature + { wrap_class_type_attrs (mkcty(Pcty_open($3, mkrhs $5 5, $7))) $4 } +; +class_sig_body: + class_self_type class_sig_fields + { Csig.mk $1 (extra_csig 2 (List.rev $2)) } +; +class_self_type: + LPAREN core_type RPAREN + { $2 } + | /* empty */ + { mktyp(Ptyp_any) } +; +class_sig_fields: + /* empty */ { [] } +| class_sig_fields class_sig_field { $2 :: (text_csig 2) @ $1 } +; +class_sig_field: + INHERIT attributes class_signature post_item_attributes + { mkctf (Pctf_inherit $3) ~attrs:($2@$4) ~docs:(symbol_docs ()) } + | VAL attributes value_type post_item_attributes + { mkctf (Pctf_val $3) ~attrs:($2@$4) ~docs:(symbol_docs ()) } + | METHOD attributes private_virtual_flags label COLON poly_type + post_item_attributes + { + let (p, v) = $3 in + mkctf (Pctf_method (mkrhs $4 4, p, v, $6)) ~attrs:($2@$7) ~docs:(symbol_docs ()) + } + | CONSTRAINT attributes constrain_field post_item_attributes + { mkctf (Pctf_constraint $3) ~attrs:($2@$4) ~docs:(symbol_docs ()) } + | item_extension post_item_attributes + { mkctf (Pctf_extension $1) ~attrs:$2 ~docs:(symbol_docs ()) } + | floating_attribute + { mark_symbol_docs (); + mkctf(Pctf_attribute $1) } +; +value_type: + VIRTUAL mutable_flag label COLON core_type + { mkrhs $3 3, $2, Virtual, $5 } + | MUTABLE virtual_flag label COLON core_type + { mkrhs $3 3, Mutable, $2, $5 } + | label COLON core_type + { mkrhs $1 1, Immutable, Concrete, $3 } +; +constrain: + core_type EQUAL core_type { $1, $3, symbol_rloc() } +; +constrain_field: + core_type EQUAL core_type { $1, $3 } +; +class_type_declarations: + class_type_declaration + { let (body, ext) = $1 in ([body],ext) } + | class_type_declarations and_class_type_declaration + { let (l, ext) = $1 in ($2 :: l, ext) } +; +class_type_declaration: + CLASS TYPE ext_attributes virtual_flag class_type_parameters LIDENT EQUAL + class_signature post_item_attributes + { let (ext, attrs) = $3 in + Ci.mk (mkrhs $6 6) $8 ~virt:$4 ~params:$5 ~attrs:(attrs@$9) + ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) + , ext} +; +and_class_type_declaration: + AND attributes virtual_flag class_type_parameters LIDENT EQUAL + class_signature post_item_attributes + { Ci.mk (mkrhs $5 5) $7 ~virt:$3 ~params:$4 + ~attrs:($2@$8) ~loc:(symbol_rloc ()) + ~text:(symbol_text ()) ~docs:(symbol_docs ()) } +; + +/* Core expressions */ + +seq_expr: + | expr %prec below_SEMI { $1 } + | expr SEMI { $1 } + | expr SEMI seq_expr { mkexp(Pexp_sequence($1, $3)) } + | expr SEMI PERCENT attr_id seq_expr + { let seq = mkexp(Pexp_sequence ($1, $5)) in + let payload = PStr [mkstrexp seq []] in + mkexp (Pexp_extension ($4, payload)) } +; +labeled_simple_pattern: + QUESTION LPAREN label_let_pattern opt_default RPAREN + { (Optional (fst $3), $4, snd $3) } + | QUESTION label_var + { (Optional (fst $2), None, snd $2) } + | OPTLABEL LPAREN let_pattern opt_default RPAREN + { (Optional $1, $4, $3) } + | OPTLABEL pattern_var + { (Optional $1, None, $2) } + | TILDE LPAREN label_let_pattern RPAREN + { (Labelled (fst $3), None, snd $3) } + | TILDE label_var + { (Labelled (fst $2), None, snd $2) } + | LABEL simple_pattern + { (Labelled $1, None, $2) } + | simple_pattern + { (Nolabel, None, $1) } +; +pattern_var: + LIDENT { mkpat(Ppat_var (mkrhs $1 1)) } + | UNDERSCORE { mkpat Ppat_any } +; +opt_default: + /* empty */ { None } + | EQUAL seq_expr { Some $2 } +; +label_let_pattern: + label_var + { $1 } + | label_var COLON core_type + { let (lab, pat) = $1 in (lab, mkpat(Ppat_constraint(pat, $3))) } +; +label_var: + LIDENT { ($1, mkpat(Ppat_var (mkrhs $1 1))) } +; +let_pattern: + pattern + { $1 } + | pattern COLON core_type + { mkpat(Ppat_constraint($1, $3)) } +; +expr: + simple_expr %prec below_HASH + { $1 } + | simple_expr simple_labeled_expr_list + { mkexp(Pexp_apply($1, List.rev $2)) } + | let_bindings IN seq_expr + { expr_of_let_bindings $1 $3 } + | LET MODULE ext_attributes UIDENT module_binding_body IN seq_expr + { mkexp_attrs (Pexp_letmodule(mkrhs $4 4, $5, $7)) $3 } + | LET EXCEPTION ext_attributes let_exception_declaration IN seq_expr + { mkexp_attrs (Pexp_letexception($4, $6)) $3 } + | LET OPEN override_flag ext_attributes mod_longident IN seq_expr + { mkexp_attrs (Pexp_open($3, mkrhs $5 5, $7)) $4 } + | FUNCTION ext_attributes opt_bar match_cases + { mkexp_attrs (Pexp_function(List.rev $4)) $2 } + | FUN ext_attributes labeled_simple_pattern fun_def + { let (l,o,p) = $3 in + mkexp_attrs (Pexp_fun(l, o, p, $4)) $2 } + | FUN ext_attributes LPAREN TYPE lident_list RPAREN fun_def + { mkexp_attrs (mk_newtypes $5 $7).pexp_desc $2 } + | MATCH ext_attributes seq_expr WITH opt_bar match_cases + { mkexp_attrs (Pexp_match($3, List.rev $6)) $2 } + | TRY ext_attributes seq_expr WITH opt_bar match_cases + { mkexp_attrs (Pexp_try($3, List.rev $6)) $2 } + | TRY ext_attributes seq_expr WITH error + { syntax_error() } + | expr_comma_list %prec below_COMMA + { mkexp(Pexp_tuple(List.rev $1)) } + | constr_longident simple_expr %prec below_HASH + { mkexp(Pexp_construct(mkrhs $1 1, Some $2)) } + | name_tag simple_expr %prec below_HASH + { mkexp(Pexp_variant($1, Some $2)) } + | IF ext_attributes seq_expr THEN expr ELSE expr + { mkexp_attrs(Pexp_ifthenelse($3, $5, Some $7)) $2 } + | IF ext_attributes seq_expr THEN expr + { mkexp_attrs (Pexp_ifthenelse($3, $5, None)) $2 } + | WHILE ext_attributes seq_expr DO seq_expr DONE + { mkexp_attrs (Pexp_while($3, $5)) $2 } + | FOR ext_attributes pattern EQUAL seq_expr direction_flag seq_expr DO + seq_expr DONE + { mkexp_attrs(Pexp_for($3, $5, $7, $6, $9)) $2 } + | expr COLONCOLON expr + { mkexp_cons (rhs_loc 2) (ghexp(Pexp_tuple[$1;$3])) (symbol_rloc()) } + | expr INFIXOP0 expr + { mkinfix $1 $2 $3 } + | expr INFIXOP1 expr + { mkinfix $1 $2 $3 } + | expr INFIXOP2 expr + { mkinfix $1 $2 $3 } + | expr INFIXOP3 expr + { mkinfix $1 $2 $3 } + | expr INFIXOP4 expr + { mkinfix $1 $2 $3 } + | expr PLUS expr + { mkinfix $1 "+" $3 } + | expr PLUSDOT expr + { mkinfix $1 "+." $3 } + | expr PLUSEQ expr + { mkinfix $1 "+=" $3 } + | expr MINUS expr + { mkinfix $1 "-" $3 } + | expr MINUSDOT expr + { mkinfix $1 "-." $3 } + | expr STAR expr + { mkinfix $1 "*" $3 } + | expr PERCENT expr + { mkinfix $1 "%" $3 } + | expr EQUAL expr + { mkinfix $1 "=" $3 } + | expr LESS expr + { mkinfix $1 "<" $3 } + | expr GREATER expr + { mkinfix $1 ">" $3 } + | expr OR expr + { mkinfix $1 "or" $3 } + | expr BARBAR expr + { mkinfix $1 "||" $3 } + | expr AMPERSAND expr + { mkinfix $1 "&" $3 } + | expr AMPERAMPER expr + { mkinfix $1 "&&" $3 } + | expr COLONEQUAL expr + { mkinfix $1 ":=" $3 } + | subtractive expr %prec prec_unary_minus + { mkuminus $1 $2 } + | additive expr %prec prec_unary_plus + { mkuplus $1 $2 } + | simple_expr DOT label_longident LESSMINUS expr + { mkexp(Pexp_setfield($1, mkrhs $3 3, $5)) } + | simple_expr DOT LPAREN seq_expr RPAREN LESSMINUS expr + { mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "Array" "set")), + [Nolabel,$1; Nolabel,$4; Nolabel,$7])) } + | simple_expr DOT LBRACKET seq_expr RBRACKET LESSMINUS expr + { mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "String" "set")), + [Nolabel,$1; Nolabel,$4; Nolabel,$7])) } + | simple_expr DOTOP LBRACKET expr RBRACKET LESSMINUS expr + { let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ $2 ^ "[]<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, $1; Nolabel, $4; Nolabel, $7]) } + | simple_expr DOTOP LPAREN expr RPAREN LESSMINUS expr + { let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ $2 ^ "()<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, $1; Nolabel, $4; Nolabel, $7]) } + | simple_expr DOTOP LBRACE expr RBRACE LESSMINUS expr + { let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ $2 ^ "{}<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, $1; Nolabel, $4; Nolabel, $7]) } + | simple_expr DOT mod_longident DOTOP LBRACKET expr RBRACKET LESSMINUS expr + { let id = mkexp @@ Pexp_ident( ghloc @@ Ldot($3,"." ^ $4 ^ "[]<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, $1; Nolabel, $6; Nolabel, $9]) } + | simple_expr DOT mod_longident DOTOP LPAREN expr RPAREN LESSMINUS expr + { let id = mkexp @@ Pexp_ident( ghloc @@ Ldot($3, "." ^ $4 ^ "()<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, $1; Nolabel, $6; Nolabel, $9]) } + | simple_expr DOT mod_longident DOTOP LBRACE expr RBRACE LESSMINUS expr + { let id = mkexp @@ Pexp_ident( ghloc @@ Ldot($3, "." ^ $4 ^ "{}<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, $1; Nolabel, $6; Nolabel, $9]) } + | label LESSMINUS expr + { mkexp(Pexp_setinstvar(mkrhs $1 1, $3)) } + | ASSERT ext_attributes simple_expr %prec below_HASH + { mkexp_attrs (Pexp_assert $3) $2 } + | LAZY ext_attributes simple_expr %prec below_HASH + { mkexp_attrs (Pexp_lazy $3) $2 } + | OBJECT ext_attributes class_structure END + { mkexp_attrs (Pexp_object $3) $2 } + | OBJECT ext_attributes class_structure error + { unclosed "object" 1 "end" 4 } + | expr attribute + { Exp.attr $1 $2 } + | UNDERSCORE + { not_expecting 1 "wildcard \"_\"" } +; +simple_expr: + val_longident + { mkexp(Pexp_ident (mkrhs $1 1)) } + | constant + { mkexp(Pexp_constant $1) } + | constr_longident %prec prec_constant_constructor + { mkexp(Pexp_construct(mkrhs $1 1, None)) } + | name_tag %prec prec_constant_constructor + { mkexp(Pexp_variant($1, None)) } + | LPAREN seq_expr RPAREN + { reloc_exp $2 } + | LPAREN seq_expr error + { unclosed "(" 1 ")" 3 } + | BEGIN ext_attributes seq_expr END + { wrap_exp_attrs (reloc_exp $3) $2 (* check location *) } + | BEGIN ext_attributes END + { mkexp_attrs (Pexp_construct (mkloc (Lident "()") (symbol_rloc ()), + None)) $2 } + | BEGIN ext_attributes seq_expr error + { unclosed "begin" 1 "end" 4 } + | LPAREN seq_expr type_constraint RPAREN + { mkexp_constraint $2 $3 } + | simple_expr DOT label_longident + { mkexp(Pexp_field($1, mkrhs $3 3)) } + | mod_longident DOT LPAREN seq_expr RPAREN + { mkexp(Pexp_open(Fresh, mkrhs $1 1, $4)) } + | mod_longident DOT LPAREN RPAREN + { mkexp(Pexp_open(Fresh, mkrhs $1 1, + mkexp(Pexp_construct(mkrhs (Lident "()") 1, None)))) } + | mod_longident DOT LPAREN seq_expr error + { unclosed "(" 3 ")" 5 } + | simple_expr DOT LPAREN seq_expr RPAREN + { mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "Array" "get")), + [Nolabel,$1; Nolabel,$4])) } + | simple_expr DOT LPAREN seq_expr error + { unclosed "(" 3 ")" 5 } + | simple_expr DOT LBRACKET seq_expr RBRACKET + { mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "String" "get")), + [Nolabel,$1; Nolabel,$4])) } + | simple_expr DOT LBRACKET seq_expr error + { unclosed "[" 3 "]" 5 } + | simple_expr DOTOP LBRACKET expr RBRACKET + { let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ $2 ^ "[]")) in + mkexp @@ Pexp_apply(id, [Nolabel, $1; Nolabel, $4]) } + | simple_expr DOTOP LBRACKET expr error + { unclosed "[" 3 "]" 5 } + | simple_expr DOTOP LPAREN expr RPAREN + { let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ $2 ^ "()")) in + mkexp @@ Pexp_apply(id, [Nolabel, $1; Nolabel, $4]) } + | simple_expr DOTOP LPAREN expr error + { unclosed "(" 3 ")" 5 } + | simple_expr DOTOP LBRACE expr RBRACE + { let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ $2 ^ "{}")) in + mkexp @@ Pexp_apply(id, [Nolabel, $1; Nolabel, $4]) } + | simple_expr DOTOP LBRACE expr error + { unclosed "{" 3 "}" 5 } + | simple_expr DOT mod_longident DOTOP LBRACKET expr RBRACKET + { let id = mkexp @@ Pexp_ident( ghloc @@ Ldot($3, "." ^ $4 ^ "[]")) in + mkexp @@ Pexp_apply(id, [Nolabel, $1; Nolabel, $6]) } + | simple_expr DOT mod_longident DOTOP LBRACKET expr error + { unclosed "[" 5 "]" 7 } + | simple_expr DOT mod_longident DOTOP LPAREN expr RPAREN + { let id = mkexp @@ Pexp_ident( ghloc @@ Ldot($3, "." ^ $4 ^ "()")) in + mkexp @@ Pexp_apply(id, [Nolabel, $1; Nolabel, $6]) } + | simple_expr DOT mod_longident DOTOP LPAREN expr error + { unclosed "(" 5 ")" 7 } + | simple_expr DOT mod_longident DOTOP LBRACE expr RBRACE + { let id = mkexp @@ Pexp_ident( ghloc @@ Ldot($3, "." ^ $4 ^ "{}")) in + mkexp @@ Pexp_apply(id, [Nolabel, $1; Nolabel, $6]) } + | simple_expr DOT mod_longident DOTOP LBRACE expr error + { unclosed "{" 5 "}" 7 } + | simple_expr DOT LBRACE expr_comma_list error + { unclosed "{" 3 "}" 5 } + | LBRACE record_expr RBRACE + { let (exten, fields) = $2 in mkexp (Pexp_record(fields, exten)) } + | LBRACE record_expr error + { unclosed "{" 1 "}" 3 } + | mod_longident DOT LBRACE record_expr RBRACE + { let (exten, fields) = $4 in + let rec_exp = mkexp(Pexp_record(fields, exten)) in + mkexp(Pexp_open(Fresh, mkrhs $1 1, rec_exp)) } + | mod_longident DOT LBRACE record_expr error + { unclosed "{" 3 "}" 5 } + | LBRACKETBAR expr_semi_list opt_semi BARRBRACKET + { mkexp (Pexp_array(List.rev $2)) } + | LBRACKETBAR expr_semi_list opt_semi error + { unclosed "[|" 1 "|]" 4 } + | LBRACKETBAR BARRBRACKET + { mkexp (Pexp_array []) } + | mod_longident DOT LBRACKETBAR expr_semi_list opt_semi BARRBRACKET + { mkexp(Pexp_open(Fresh, mkrhs $1 1, mkexp(Pexp_array(List.rev $4)))) } + | mod_longident DOT LBRACKETBAR BARRBRACKET + { mkexp(Pexp_open(Fresh, mkrhs $1 1, mkexp(Pexp_array []))) } + | mod_longident DOT LBRACKETBAR expr_semi_list opt_semi error + { unclosed "[|" 3 "|]" 6 } + | LBRACKET expr_semi_list opt_semi RBRACKET + { reloc_exp (mktailexp (rhs_loc 4) (List.rev $2)) } + | LBRACKET expr_semi_list opt_semi error + { unclosed "[" 1 "]" 4 } + | mod_longident DOT LBRACKET expr_semi_list opt_semi RBRACKET + { let list_exp = reloc_exp (mktailexp (rhs_loc 6) (List.rev $4)) in + mkexp(Pexp_open(Fresh, mkrhs $1 1, list_exp)) } + | mod_longident DOT LBRACKET RBRACKET + { mkexp(Pexp_open(Fresh, mkrhs $1 1, + mkexp(Pexp_construct(mkrhs (Lident "[]") 1, None)))) } + | mod_longident DOT LBRACKET expr_semi_list opt_semi error + { unclosed "[" 3 "]" 6 } + | PREFIXOP simple_expr + { mkexp(Pexp_apply(mkoperator $1 1, [Nolabel,$2])) } + | BANG simple_expr + { mkexp(Pexp_apply(mkoperator "!" 1, [Nolabel,$2])) } + | LBRACELESS field_expr_list GREATERRBRACE + { mkexp (Pexp_override $2) } + | LBRACELESS field_expr_list error + { unclosed "{<" 1 ">}" 3 } + | LBRACELESS GREATERRBRACE + { mkexp (Pexp_override [])} + | mod_longident DOT LBRACELESS field_expr_list GREATERRBRACE + { mkexp(Pexp_open(Fresh, mkrhs $1 1, mkexp (Pexp_override $4)))} + | mod_longident DOT LBRACELESS GREATERRBRACE + { mkexp(Pexp_open(Fresh, mkrhs $1 1, mkexp (Pexp_override [])))} + | mod_longident DOT LBRACELESS field_expr_list error + { unclosed "{<" 3 ">}" 5 } + | simple_expr HASH label + { mkexp(Pexp_send($1, mkrhs $3 3)) } + | simple_expr HASHOP simple_expr + { mkinfix $1 $2 $3 } + | LPAREN MODULE ext_attributes module_expr RPAREN + { mkexp_attrs (Pexp_pack $4) $3 } + | LPAREN MODULE ext_attributes module_expr COLON package_type RPAREN + { mkexp_attrs (Pexp_constraint (ghexp (Pexp_pack $4), + ghtyp (Ptyp_package $6))) + $3 } + | LPAREN MODULE ext_attributes module_expr COLON error + { unclosed "(" 1 ")" 6 } + | mod_longident DOT LPAREN MODULE ext_attributes module_expr COLON + package_type RPAREN + { mkexp(Pexp_open(Fresh, mkrhs $1 1, + mkexp_attrs (Pexp_constraint (ghexp (Pexp_pack $6), + ghtyp (Ptyp_package $8))) + $5 )) } + | mod_longident DOT LPAREN MODULE ext_attributes module_expr COLON error + { unclosed "(" 3 ")" 8 } + | extension + { mkexp (Pexp_extension $1) } +; +simple_labeled_expr_list: + labeled_simple_expr + { [$1] } + | simple_labeled_expr_list labeled_simple_expr + { $2 :: $1 } +; +labeled_simple_expr: + simple_expr %prec below_HASH + { (Nolabel, $1) } + | label_expr + { $1 } +; +label_expr: + LABEL simple_expr %prec below_HASH + { (Labelled $1, $2) } + | TILDE label_ident + { (Labelled (fst $2), snd $2) } + | QUESTION label_ident + { (Optional (fst $2), snd $2) } + | OPTLABEL simple_expr %prec below_HASH + { (Optional $1, $2) } +; +label_ident: + LIDENT { ($1, mkexp(Pexp_ident(mkrhs (Lident $1) 1))) } +; +lident_list: + LIDENT { [mkrhs $1 1] } + | LIDENT lident_list { mkrhs $1 1 :: $2 } +; +let_binding_body: + val_ident strict_binding + { (mkpatvar $1 1, $2) } + | val_ident type_constraint EQUAL seq_expr + { let v = mkpatvar $1 1 in (* PR#7344 *) + let t = + match $2 with + Some t, None -> t + | _, Some t -> t + | _ -> assert false + in + (ghpat(Ppat_constraint(v, ghtyp(Ptyp_poly([],t)))), + mkexp_constraint $4 $2) } + | val_ident COLON typevar_list DOT core_type EQUAL seq_expr + { (ghpat(Ppat_constraint(mkpatvar $1 1, + ghtyp(Ptyp_poly(List.rev $3,$5)))), + $7) } + | val_ident COLON TYPE lident_list DOT core_type EQUAL seq_expr + { let exp, poly = wrap_type_annotation $4 $6 $8 in + (ghpat(Ppat_constraint(mkpatvar $1 1, poly)), exp) } + | pattern_no_exn EQUAL seq_expr + { ($1, $3) } + | simple_pattern_not_ident COLON core_type EQUAL seq_expr + { (ghpat(Ppat_constraint($1, $3)), $5) } +; +let_bindings: + let_binding { $1 } + | let_bindings and_let_binding { addlb $1 $2 } +; +let_binding: + LET ext_attributes rec_flag let_binding_body post_item_attributes + { let (ext, attr) = $2 in + mklbs ext $3 (mklb true $4 (attr@$5)) } +; +and_let_binding: + AND attributes let_binding_body post_item_attributes + { mklb false $3 ($2@$4) } +; +fun_binding: + strict_binding + { $1 } + | type_constraint EQUAL seq_expr + { mkexp_constraint $3 $1 } +; +strict_binding: + EQUAL seq_expr + { $2 } + | labeled_simple_pattern fun_binding + { let (l, o, p) = $1 in ghexp(Pexp_fun(l, o, p, $2)) } + | LPAREN TYPE lident_list RPAREN fun_binding + { mk_newtypes $3 $5 } +; +match_cases: + match_case { [$1] } + | match_cases BAR match_case { $3 :: $1 } +; +match_case: + pattern MINUSGREATER seq_expr + { Exp.case $1 $3 } + | pattern WHEN seq_expr MINUSGREATER seq_expr + { Exp.case $1 ~guard:$3 $5 } + | pattern MINUSGREATER DOT + { Exp.case $1 (Exp.unreachable ~loc:(rhs_loc 3) ())} +; +fun_def: + MINUSGREATER seq_expr + { $2 } + | COLON simple_core_type MINUSGREATER seq_expr + { mkexp (Pexp_constraint ($4, $2)) } +/* Cf #5939: we used to accept (fun p when e0 -> e) */ + | labeled_simple_pattern fun_def + { + let (l,o,p) = $1 in + ghexp(Pexp_fun(l, o, p, $2)) + } + | LPAREN TYPE lident_list RPAREN fun_def + { mk_newtypes $3 $5 } +; +expr_comma_list: + expr_comma_list COMMA expr { $3 :: $1 } + | expr COMMA expr { [$3; $1] } +; +record_expr: + simple_expr WITH lbl_expr_list { (Some $1, $3) } + | lbl_expr_list { (None, $1) } +; +lbl_expr_list: + lbl_expr { [$1] } + | lbl_expr SEMI lbl_expr_list { $1 :: $3 } + | lbl_expr SEMI { [$1] } +; +lbl_expr: + label_longident opt_type_constraint EQUAL expr + { (mkrhs $1 1, mkexp_opt_constraint $4 $2) } + | label_longident opt_type_constraint + { (mkrhs $1 1, mkexp_opt_constraint (exp_of_label $1 1) $2) } +; +field_expr_list: + field_expr opt_semi { [$1] } + | field_expr SEMI field_expr_list { $1 :: $3 } +; +field_expr: + label EQUAL expr + { (mkrhs $1 1, $3) } + | label + { (mkrhs $1 1, exp_of_label (Lident $1) 1) } +; +expr_semi_list: + expr { [$1] } + | expr_semi_list SEMI expr { $3 :: $1 } +; +type_constraint: + COLON core_type { (Some $2, None) } + | COLON core_type COLONGREATER core_type { (Some $2, Some $4) } + | COLONGREATER core_type { (None, Some $2) } + | COLON error { syntax_error() } + | COLONGREATER error { syntax_error() } +; +opt_type_constraint: + type_constraint { Some $1 } + | /* empty */ { None } +; + +/* Patterns */ + +pattern: + | pattern AS val_ident + { mkpat(Ppat_alias($1, mkrhs $3 3)) } + | pattern AS error + { expecting 3 "identifier" } + | pattern_comma_list %prec below_COMMA + { mkpat(Ppat_tuple(List.rev $1)) } + | pattern COLONCOLON pattern + { mkpat_cons (rhs_loc 2) (ghpat(Ppat_tuple[$1;$3])) (symbol_rloc()) } + | pattern COLONCOLON error + { expecting 3 "pattern" } + | pattern BAR pattern + { mkpat(Ppat_or($1, $3)) } + | pattern BAR error + { expecting 3 "pattern" } + | EXCEPTION ext_attributes pattern %prec prec_constr_appl + { mkpat_attrs (Ppat_exception $3) $2} + | pattern attribute + { Pat.attr $1 $2 } + | pattern_gen { $1 } +; +pattern_no_exn: + | pattern_no_exn AS val_ident + { mkpat(Ppat_alias($1, mkrhs $3 3)) } + | pattern_no_exn AS error + { expecting 3 "identifier" } + | pattern_no_exn_comma_list %prec below_COMMA + { mkpat(Ppat_tuple(List.rev $1)) } + | pattern_no_exn COLONCOLON pattern + { mkpat_cons (rhs_loc 2) (ghpat(Ppat_tuple[$1;$3])) (symbol_rloc()) } + | pattern_no_exn COLONCOLON error + { expecting 3 "pattern" } + | pattern_no_exn BAR pattern + { mkpat(Ppat_or($1, $3)) } + | pattern_no_exn BAR error + { expecting 3 "pattern" } + | pattern_no_exn attribute + { Pat.attr $1 $2 } + | pattern_gen { $1 } +; +pattern_gen: + simple_pattern + { $1 } + | constr_longident pattern %prec prec_constr_appl + { mkpat(Ppat_construct(mkrhs $1 1, Some $2)) } + | name_tag pattern %prec prec_constr_appl + { mkpat(Ppat_variant($1, Some $2)) } + | LAZY ext_attributes simple_pattern + { mkpat_attrs (Ppat_lazy $3) $2} +; +simple_pattern: + val_ident %prec below_EQUAL + { mkpat(Ppat_var (mkrhs $1 1)) } + | simple_pattern_not_ident { $1 } +; +simple_pattern_not_ident: + | UNDERSCORE + { mkpat(Ppat_any) } + | signed_constant + { mkpat(Ppat_constant $1) } + | signed_constant DOTDOT signed_constant + { mkpat(Ppat_interval ($1, $3)) } + | constr_longident + { mkpat(Ppat_construct(mkrhs $1 1, None)) } + | name_tag + { mkpat(Ppat_variant($1, None)) } + | HASH type_longident + { mkpat(Ppat_type (mkrhs $2 2)) } + | simple_delimited_pattern + { $1 } + | mod_longident DOT simple_delimited_pattern + { mkpat @@ Ppat_open(mkrhs $1 1, $3) } + | mod_longident DOT LBRACKET RBRACKET + { mkpat @@ Ppat_open(mkrhs $1 1, mkpat @@ + Ppat_construct ( mkrhs (Lident "[]") 4, None)) } + | mod_longident DOT LPAREN RPAREN + { mkpat @@ Ppat_open( mkrhs $1 1, mkpat @@ + Ppat_construct ( mkrhs (Lident "()") 4, None) ) } + | mod_longident DOT LPAREN pattern RPAREN + { mkpat @@ Ppat_open (mkrhs $1 1, $4)} + | mod_longident DOT LPAREN pattern error + {unclosed "(" 3 ")" 5 } + | mod_longident DOT LPAREN error + { expecting 4 "pattern" } + | LPAREN pattern RPAREN + { reloc_pat $2 } + | LPAREN pattern error + { unclosed "(" 1 ")" 3 } + | LPAREN pattern COLON core_type RPAREN + { mkpat(Ppat_constraint($2, $4)) } + | LPAREN pattern COLON core_type error + { unclosed "(" 1 ")" 5 } + | LPAREN pattern COLON error + { expecting 4 "type" } + | LPAREN MODULE ext_attributes UIDENT RPAREN + { mkpat_attrs (Ppat_unpack (mkrhs $4 4)) $3 } + | LPAREN MODULE ext_attributes UIDENT COLON package_type RPAREN + { mkpat_attrs + (Ppat_constraint(mkpat(Ppat_unpack (mkrhs $4 4)), + ghtyp(Ptyp_package $6))) + $3 } + | LPAREN MODULE ext_attributes UIDENT COLON package_type error + { unclosed "(" 1 ")" 7 } + | extension + { mkpat(Ppat_extension $1) } +; + +simple_delimited_pattern: + | LBRACE lbl_pattern_list RBRACE + { let (fields, closed) = $2 in mkpat(Ppat_record(fields, closed)) } + | LBRACE lbl_pattern_list error + { unclosed "{" 1 "}" 3 } + | LBRACKET pattern_semi_list opt_semi RBRACKET + { reloc_pat (mktailpat (rhs_loc 4) (List.rev $2)) } + | LBRACKET pattern_semi_list opt_semi error + { unclosed "[" 1 "]" 4 } + | LBRACKETBAR pattern_semi_list opt_semi BARRBRACKET + { mkpat(Ppat_array(List.rev $2)) } + | LBRACKETBAR BARRBRACKET + { mkpat(Ppat_array []) } + | LBRACKETBAR pattern_semi_list opt_semi error + { unclosed "[|" 1 "|]" 4 } + +pattern_comma_list: + pattern_comma_list COMMA pattern { $3 :: $1 } + | pattern COMMA pattern { [$3; $1] } + | pattern COMMA error { expecting 3 "pattern" } +; +pattern_no_exn_comma_list: + pattern_no_exn_comma_list COMMA pattern { $3 :: $1 } + | pattern_no_exn COMMA pattern { [$3; $1] } + | pattern_no_exn COMMA error { expecting 3 "pattern" } +; +pattern_semi_list: + pattern { [$1] } + | pattern_semi_list SEMI pattern { $3 :: $1 } +; +lbl_pattern_list: + lbl_pattern { [$1], Closed } + | lbl_pattern SEMI { [$1], Closed } + | lbl_pattern SEMI UNDERSCORE opt_semi { [$1], Open } + | lbl_pattern SEMI lbl_pattern_list + { let (fields, closed) = $3 in $1 :: fields, closed } +; +lbl_pattern: + label_longident opt_pattern_type_constraint EQUAL pattern + { (mkrhs $1 1, mkpat_opt_constraint $4 $2) } + | label_longident opt_pattern_type_constraint + { (mkrhs $1 1, mkpat_opt_constraint (pat_of_label $1 1) $2) } +; +opt_pattern_type_constraint: + COLON core_type { Some $2 } + | /* empty */ { None } +; + +/* Value descriptions */ + +value_description: + VAL ext_attributes val_ident COLON core_type post_item_attributes + { let (ext, attrs) = $2 in + Val.mk (mkrhs $3 3) $5 ~attrs:(attrs@$6) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext } +; + +/* Primitive declarations */ + +primitive_declaration_body: + STRING { [fst $1] } + | STRING primitive_declaration_body { fst $1 :: $2 } +; +primitive_declaration: + EXTERNAL ext_attributes val_ident COLON core_type EQUAL + primitive_declaration_body post_item_attributes + { let (ext, attrs) = $2 in + Val.mk (mkrhs $3 3) $5 ~prim:$7 ~attrs:(attrs@$8) + ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) + , ext } +; + +/* Type declarations */ + +type_declarations: + type_declaration + { let (nonrec_flag, ty, ext) = $1 in (nonrec_flag, [ty], ext) } + | type_declarations and_type_declaration + { let (nonrec_flag, tys, ext) = $1 in (nonrec_flag, $2 :: tys, ext) } +; + +type_declaration: + TYPE ext_attributes nonrec_flag optional_type_parameters LIDENT + type_kind constraints post_item_attributes + { let (kind, priv, manifest) = $6 in + let (ext, attrs) = $2 in + let ty = + Type.mk (mkrhs $5 5) ~params:$4 ~cstrs:(List.rev $7) ~kind + ~priv ?manifest ~attrs:(attrs@$8) + ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) + in + ($3, ty, ext) } +; +and_type_declaration: + AND attributes optional_type_parameters LIDENT type_kind constraints + post_item_attributes + { let (kind, priv, manifest) = $5 in + Type.mk (mkrhs $4 4) ~params:$3 ~cstrs:(List.rev $6) + ~kind ~priv ?manifest ~attrs:($2@$7) ~loc:(symbol_rloc ()) + ~text:(symbol_text ()) ~docs:(symbol_docs ()) } +; +constraints: + constraints CONSTRAINT constrain { $3 :: $1 } + | /* empty */ { [] } +; +type_kind: + /*empty*/ + { (Ptype_abstract, Public, None) } + | EQUAL core_type + { (Ptype_abstract, Public, Some $2) } + | EQUAL PRIVATE core_type + { (Ptype_abstract, Private, Some $3) } + | EQUAL constructor_declarations + { (Ptype_variant(List.rev $2), Public, None) } + | EQUAL PRIVATE constructor_declarations + { (Ptype_variant(List.rev $3), Private, None) } + | EQUAL DOTDOT + { (Ptype_open, Public, None) } + | EQUAL PRIVATE DOTDOT + { (Ptype_open, Private, None) } + | EQUAL private_flag LBRACE label_declarations RBRACE + { (Ptype_record $4, $2, None) } + | EQUAL core_type EQUAL private_flag constructor_declarations + { (Ptype_variant(List.rev $5), $4, Some $2) } + | EQUAL core_type EQUAL private_flag DOTDOT + { (Ptype_open, $4, Some $2) } + | EQUAL core_type EQUAL private_flag LBRACE label_declarations RBRACE + { (Ptype_record $6, $4, Some $2) } +; +optional_type_parameters: + /*empty*/ { [] } + | optional_type_parameter { [$1] } + | LPAREN optional_type_parameter_list RPAREN { List.rev $2 } +; +optional_type_parameter: + type_variance optional_type_variable { $2, $1 } +; +optional_type_parameter_list: + optional_type_parameter { [$1] } + | optional_type_parameter_list COMMA optional_type_parameter { $3 :: $1 } +; +optional_type_variable: + QUOTE ident { mktyp(Ptyp_var $2) } + | UNDERSCORE { mktyp(Ptyp_any) } +; + + +type_parameter: + type_variance type_variable { $2, $1 } +; +type_variance: + /* empty */ { Invariant } + | PLUS { Covariant } + | MINUS { Contravariant } +; +type_variable: + QUOTE ident { mktyp(Ptyp_var $2) } +; +type_parameter_list: + type_parameter { [$1] } + | type_parameter_list COMMA type_parameter { $3 :: $1 } +; +constructor_declarations: + constructor_declaration { [$1] } + | bar_constructor_declaration { [$1] } + | constructor_declarations bar_constructor_declaration { $2 :: $1 } +; +constructor_declaration: + | constr_ident generalized_constructor_arguments attributes + { + let args,res = $2 in + Type.constructor (mkrhs $1 1) ~args ?res ~attrs:$3 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) + } +; +bar_constructor_declaration: + | BAR constr_ident generalized_constructor_arguments attributes + { + let args,res = $3 in + Type.constructor (mkrhs $2 2) ~args ?res ~attrs:$4 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) + } +; +str_exception_declaration: + | sig_exception_declaration { $1 } + | EXCEPTION ext_attributes constr_ident EQUAL constr_longident attributes + post_item_attributes + { let (ext,attrs) = $2 in + Te.rebind (mkrhs $3 3) (mkrhs $5 5) ~attrs:(attrs @ $6 @ $7) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext } +; +sig_exception_declaration: + | EXCEPTION ext_attributes constr_ident generalized_constructor_arguments + attributes post_item_attributes + { let args, res = $4 in + let (ext,attrs) = $2 in + Te.decl (mkrhs $3 3) ~args ?res ~attrs:(attrs @ $5 @ $6) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext } +; +let_exception_declaration: + constr_ident generalized_constructor_arguments attributes + { let args, res = $2 in + Te.decl (mkrhs $1 1) ~args ?res ~attrs:$3 ~loc:(symbol_rloc()) } +; +generalized_constructor_arguments: + /*empty*/ { (Pcstr_tuple [],None) } + | OF constructor_arguments { ($2,None) } + | COLON constructor_arguments MINUSGREATER simple_core_type + { ($2,Some $4) } + | COLON simple_core_type + { (Pcstr_tuple [],Some $2) } +; + +constructor_arguments: + | core_type_list { Pcstr_tuple (List.rev $1) } + | LBRACE label_declarations RBRACE { Pcstr_record $2 } +; +label_declarations: + label_declaration { [$1] } + | label_declaration_semi { [$1] } + | label_declaration_semi label_declarations { $1 :: $2 } +; +label_declaration: + mutable_flag label COLON poly_type_no_attr attributes + { + Type.field (mkrhs $2 2) $4 ~mut:$1 ~attrs:$5 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) + } +; +label_declaration_semi: + mutable_flag label COLON poly_type_no_attr attributes SEMI attributes + { + let info = + match rhs_info 5 with + | Some _ as info_before_semi -> info_before_semi + | None -> symbol_info () + in + Type.field (mkrhs $2 2) $4 ~mut:$1 ~attrs:($5 @ $7) + ~loc:(symbol_rloc()) ~info + } +; + +/* Type Extensions */ + +str_type_extension: + TYPE ext_attributes nonrec_flag optional_type_parameters type_longident + PLUSEQ private_flag str_extension_constructors post_item_attributes + { let (ext, attrs) = $2 in + if $3 <> Recursive then not_expecting 3 "nonrec flag"; + Te.mk (mkrhs $5 5) (List.rev $8) ~params:$4 ~priv:$7 + ~attrs:(attrs@$9) ~docs:(symbol_docs ()) + , ext } +; +sig_type_extension: + TYPE ext_attributes nonrec_flag optional_type_parameters type_longident + PLUSEQ private_flag sig_extension_constructors post_item_attributes + { let (ext, attrs) = $2 in + if $3 <> Recursive then not_expecting 3 "nonrec flag"; + Te.mk (mkrhs $5 5) (List.rev $8) ~params:$4 ~priv:$7 + ~attrs:(attrs @ $9) ~docs:(symbol_docs ()) + , ext } +; +str_extension_constructors: + extension_constructor_declaration { [$1] } + | bar_extension_constructor_declaration { [$1] } + | extension_constructor_rebind { [$1] } + | bar_extension_constructor_rebind { [$1] } + | str_extension_constructors bar_extension_constructor_declaration + { $2 :: $1 } + | str_extension_constructors bar_extension_constructor_rebind + { $2 :: $1 } +; +sig_extension_constructors: + extension_constructor_declaration { [$1] } + | bar_extension_constructor_declaration { [$1] } + | sig_extension_constructors bar_extension_constructor_declaration + { $2 :: $1 } +; +extension_constructor_declaration: + | constr_ident generalized_constructor_arguments attributes + { let args, res = $2 in + Te.decl (mkrhs $1 1) ~args ?res ~attrs:$3 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) } +; +bar_extension_constructor_declaration: + | BAR constr_ident generalized_constructor_arguments attributes + { let args, res = $3 in + Te.decl (mkrhs $2 2) ~args ?res ~attrs:$4 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) } +; +extension_constructor_rebind: + | constr_ident EQUAL constr_longident attributes + { Te.rebind (mkrhs $1 1) (mkrhs $3 3) ~attrs:$4 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) } +; +bar_extension_constructor_rebind: + | BAR constr_ident EQUAL constr_longident attributes + { Te.rebind (mkrhs $2 2) (mkrhs $4 4) ~attrs:$5 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) } +; + +/* "with" constraints (additional type equations over signature components) */ + +with_constraints: + with_constraint { [$1] } + | with_constraints AND with_constraint { $3 :: $1 } +; +with_constraint: + TYPE optional_type_parameters label_longident with_type_binder + core_type_no_attr constraints + { Pwith_type + (mkrhs $3 3, + (Type.mk (mkrhs (Longident.last $3) 3) + ~params:$2 + ~cstrs:(List.rev $6) + ~manifest:$5 + ~priv:$4 + ~loc:(symbol_rloc()))) } + /* used label_longident instead of type_longident to disallow + functor applications in type path */ + | TYPE optional_type_parameters label_longident COLONEQUAL core_type_no_attr + { Pwith_typesubst + (mkrhs $3 3, + (Type.mk (mkrhs (Longident.last $3) 3) + ~params:$2 + ~manifest:$5 + ~loc:(symbol_rloc()))) } + | MODULE mod_longident EQUAL mod_ext_longident + { Pwith_module (mkrhs $2 2, mkrhs $4 4) } + | MODULE mod_longident COLONEQUAL mod_ext_longident + { Pwith_modsubst (mkrhs $2 2, mkrhs $4 4) } +; +with_type_binder: + EQUAL { Public } + | EQUAL PRIVATE { Private } +; + +/* Polymorphic types */ + +typevar_list: + QUOTE ident { [mkrhs $2 2] } + | typevar_list QUOTE ident { mkrhs $3 3 :: $1 } +; +poly_type: + core_type + { $1 } + | typevar_list DOT core_type + { mktyp(Ptyp_poly(List.rev $1, $3)) } +; +poly_type_no_attr: + core_type_no_attr + { $1 } + | typevar_list DOT core_type_no_attr + { mktyp(Ptyp_poly(List.rev $1, $3)) } +; + +/* Core types */ + +core_type: + core_type_no_attr + { $1 } + | core_type attribute + { Typ.attr $1 $2 } +; +core_type_no_attr: + core_type2 %prec MINUSGREATER + { $1 } + | core_type2 AS QUOTE ident + { mktyp(Ptyp_alias($1, $4)) } +; +core_type2: + simple_core_type_or_tuple + { $1 } + | QUESTION LIDENT COLON core_type2 MINUSGREATER core_type2 + { let param = extra_rhs_core_type $4 ~pos:4 in + mktyp (Ptyp_arrow(Optional $2 , param, $6)) } + | OPTLABEL core_type2 MINUSGREATER core_type2 + { let param = extra_rhs_core_type $2 ~pos:2 in + mktyp(Ptyp_arrow(Optional $1 , param, $4)) + } + | LIDENT COLON core_type2 MINUSGREATER core_type2 + { let param = extra_rhs_core_type $3 ~pos:3 in + mktyp(Ptyp_arrow(Labelled $1, param, $5)) } + | core_type2 MINUSGREATER core_type2 + { let param = extra_rhs_core_type $1 ~pos:1 in + mktyp(Ptyp_arrow(Nolabel, param, $3)) } +; + +simple_core_type: + simple_core_type2 %prec below_HASH + { $1 } + | LPAREN core_type_comma_list RPAREN %prec below_HASH + { match $2 with [sty] -> sty | _ -> raise Parse_error } +; + +simple_core_type2: + QUOTE ident + { mktyp(Ptyp_var $2) } + | UNDERSCORE + { mktyp(Ptyp_any) } + | type_longident + { mktyp(Ptyp_constr(mkrhs $1 1, [])) } + | simple_core_type2 type_longident + { mktyp(Ptyp_constr(mkrhs $2 2, [$1])) } + | LPAREN core_type_comma_list RPAREN type_longident + { mktyp(Ptyp_constr(mkrhs $4 4, List.rev $2)) } + | LESS meth_list GREATER + { let (f, c) = $2 in mktyp(Ptyp_object (f, c)) } + | LESS GREATER + { mktyp(Ptyp_object ([], Closed)) } + | HASH class_longident + { mktyp(Ptyp_class(mkrhs $2 2, [])) } + | simple_core_type2 HASH class_longident + { mktyp(Ptyp_class(mkrhs $3 3, [$1])) } + | LPAREN core_type_comma_list RPAREN HASH class_longident + { mktyp(Ptyp_class(mkrhs $5 5, List.rev $2)) } + | LBRACKET tag_field RBRACKET + { mktyp(Ptyp_variant([$2], Closed, None)) } +/* PR#3835: this is not LR(1), would need lookahead=2 + | LBRACKET simple_core_type RBRACKET + { mktyp(Ptyp_variant([$2], Closed, None)) } +*/ + | LBRACKET BAR row_field_list RBRACKET + { mktyp(Ptyp_variant(List.rev $3, Closed, None)) } + | LBRACKET row_field BAR row_field_list RBRACKET + { mktyp(Ptyp_variant($2 :: List.rev $4, Closed, None)) } + | LBRACKETGREATER opt_bar row_field_list RBRACKET + { mktyp(Ptyp_variant(List.rev $3, Open, None)) } + | LBRACKETGREATER RBRACKET + { mktyp(Ptyp_variant([], Open, None)) } + | LBRACKETLESS opt_bar row_field_list RBRACKET + { mktyp(Ptyp_variant(List.rev $3, Closed, Some [])) } + | LBRACKETLESS opt_bar row_field_list GREATER name_tag_list RBRACKET + { mktyp(Ptyp_variant(List.rev $3, Closed, Some (List.rev $5))) } + | LPAREN MODULE ext_attributes package_type RPAREN + { mktyp_attrs (Ptyp_package $4) $3 } + | extension + { mktyp (Ptyp_extension $1) } +; +package_type: + module_type { package_type_of_module_type $1 } +; +row_field_list: + row_field { [$1] } + | row_field_list BAR row_field { $3 :: $1 } +; +row_field: + tag_field { $1 } + | simple_core_type { Rinherit $1 } +; +tag_field: + name_tag OF opt_ampersand amper_type_list attributes + { Rtag (mkrhs $1 1, add_info_attrs (symbol_info ()) $5, + $3, List.rev $4) } + | name_tag attributes + { Rtag (mkrhs $1 1, add_info_attrs (symbol_info ()) $2, true, []) } +; +opt_ampersand: + AMPERSAND { true } + | /* empty */ { false } +; +amper_type_list: + core_type_no_attr { [$1] } + | amper_type_list AMPERSAND core_type_no_attr { $3 :: $1 } +; +name_tag_list: + name_tag { [$1] } + | name_tag_list name_tag { $2 :: $1 } +; +simple_core_type_or_tuple: + simple_core_type { $1 } + | simple_core_type STAR core_type_list + { mktyp(Ptyp_tuple($1 :: List.rev $3)) } +; +core_type_comma_list: + core_type { [$1] } + | core_type_comma_list COMMA core_type { $3 :: $1 } +; +core_type_list: + simple_core_type { [$1] } + | core_type_list STAR simple_core_type { $3 :: $1 } +; +meth_list: + field_semi meth_list { let (f, c) = $2 in ($1 :: f, c) } + | inherit_field_semi meth_list { let (f, c) = $2 in ($1 :: f, c) } + | field_semi { [$1], Closed } + | field { [$1], Closed } + | inherit_field_semi { [$1], Closed } + | simple_core_type { [Oinherit $1], Closed } + | DOTDOT { [], Open } +; +field: + label COLON poly_type_no_attr attributes + { Otag (mkrhs $1 1, add_info_attrs (symbol_info ()) $4, $3) } +; + +field_semi: + label COLON poly_type_no_attr attributes SEMI attributes + { let info = + match rhs_info 4 with + | Some _ as info_before_semi -> info_before_semi + | None -> symbol_info () + in + ( Otag (mkrhs $1 1, add_info_attrs info ($4 @ $6), $3)) } +; + +inherit_field_semi: + simple_core_type SEMI { Oinherit $1 } + +label: + LIDENT { $1 } +; + +/* Constants */ + +constant: + | INT { let (n, m) = $1 in Pconst_integer (n, m) } + | CHAR { Pconst_char (Char.code $1) } + | STRING { let (s, d) = $1 in Pconst_string (s, d) } + | FLOAT { let (f, m) = $1 in Pconst_float (f, m) } +; +signed_constant: + constant { $1 } + | MINUS INT { let (n, m) = $2 in Pconst_integer("-" ^ n, m) } + | MINUS FLOAT { let (f, m) = $2 in Pconst_float("-" ^ f, m) } + | PLUS INT { let (n, m) = $2 in Pconst_integer (n, m) } + | PLUS FLOAT { let (f, m) = $2 in Pconst_float(f, m) } +; + +/* Identifiers and long identifiers */ + +ident: + UIDENT { $1 } + | LIDENT { $1 } +; +val_ident: + LIDENT { $1 } + | LPAREN operator RPAREN { $2 } + | LPAREN operator error { unclosed "(" 1 ")" 3 } + | LPAREN error { expecting 2 "operator" } + | LPAREN MODULE error { expecting 3 "module-expr" } +; +operator: + PREFIXOP { $1 } + | INFIXOP0 { $1 } + | INFIXOP1 { $1 } + | INFIXOP2 { $1 } + | INFIXOP3 { $1 } + | INFIXOP4 { $1 } + | DOTOP LPAREN RPAREN { "."^ $1 ^"()" } + | DOTOP LPAREN RPAREN LESSMINUS { "."^ $1 ^ "()<-" } + | DOTOP LBRACKET RBRACKET { "."^ $1 ^"[]" } + | DOTOP LBRACKET RBRACKET LESSMINUS { "."^ $1 ^ "[]<-" } + | DOTOP LBRACE RBRACE { "."^ $1 ^"{}" } + | DOTOP LBRACE RBRACE LESSMINUS { "."^ $1 ^ "{}<-" } + | HASHOP { $1 } + | BANG { "!" } + | PLUS { "+" } + | PLUSDOT { "+." } + | MINUS { "-" } + | MINUSDOT { "-." } + | STAR { "*" } + | EQUAL { "=" } + | LESS { "<" } + | GREATER { ">" } + | OR { "or" } + | BARBAR { "||" } + | AMPERSAND { "&" } + | AMPERAMPER { "&&" } + | COLONEQUAL { ":=" } + | PLUSEQ { "+=" } + | PERCENT { "%" } +; +constr_ident: + UIDENT { $1 } + | LBRACKET RBRACKET { "[]" } + | LPAREN RPAREN { "()" } + | LPAREN COLONCOLON RPAREN { "::" } + | FALSE { "false" } + | TRUE { "true" } +; + +val_longident: + val_ident { Lident $1 } + | mod_longident DOT val_ident { Ldot($1, $3) } +; +constr_longident: + mod_longident %prec below_DOT { $1 } + | mod_longident DOT LPAREN COLONCOLON RPAREN { Ldot($1,"::") } + | LBRACKET RBRACKET { Lident "[]" } + | LPAREN RPAREN { Lident "()" } + | LPAREN COLONCOLON RPAREN { Lident "::" } + | FALSE { Lident "false" } + | TRUE { Lident "true" } +; +label_longident: + LIDENT { Lident $1 } + | mod_longident DOT LIDENT { Ldot($1, $3) } +; +type_longident: + LIDENT { Lident $1 } + | mod_ext_longident DOT LIDENT { Ldot($1, $3) } +; +mod_longident: + UIDENT { Lident $1 } + | mod_longident DOT UIDENT { Ldot($1, $3) } +; +mod_ext_longident: + UIDENT { Lident $1 } + | mod_ext_longident DOT UIDENT { Ldot($1, $3) } + | mod_ext_longident LPAREN mod_ext_longident RPAREN { lapply $1 $3 } +; +mty_longident: + ident { Lident $1 } + | mod_ext_longident DOT ident { Ldot($1, $3) } +; +clty_longident: + LIDENT { Lident $1 } + | mod_ext_longident DOT LIDENT { Ldot($1, $3) } +; +class_longident: + LIDENT { Lident $1 } + | mod_longident DOT LIDENT { Ldot($1, $3) } +; + +/* Toplevel directives */ + + +/* Miscellaneous */ + +name_tag: + BACKQUOTE ident { $2 } +; +rec_flag: + /* empty */ { Nonrecursive } + | REC { Recursive } +; +nonrec_flag: + /* empty */ { Recursive } + | NONREC { Nonrecursive } +; +direction_flag: + TO { Upto } + | DOWNTO { Downto } +; +private_flag: + /* empty */ { Public } + | PRIVATE { Private } +; +mutable_flag: + /* empty */ { Immutable } + | MUTABLE { Mutable } +; +virtual_flag: + /* empty */ { Concrete } + | VIRTUAL { Virtual } +; +private_virtual_flags: + /* empty */ { Public, Concrete } + | PRIVATE { Private, Concrete } + | VIRTUAL { Public, Virtual } + | PRIVATE VIRTUAL { Private, Virtual } + | VIRTUAL PRIVATE { Private, Virtual } +; +override_flag: + /* empty */ { Fresh } + | BANG { Override } +; +opt_bar: + /* empty */ { () } + | BAR { () } +; +opt_semi: + | /* empty */ { () } + | SEMI { () } +; +subtractive: + | MINUS { "-" } + | MINUSDOT { "-." } +; +additive: + | PLUS { "+" } + | PLUSDOT { "+." } +; + +/* Attributes and extensions */ + +single_attr_id: + LIDENT { $1 } + | UIDENT { $1 } + | AND { "and" } + | AS { "as" } + | ASSERT { "assert" } + | BEGIN { "begin" } + | CLASS { "class" } + | CONSTRAINT { "constraint" } + | DO { "do" } + | DONE { "done" } + | DOWNTO { "downto" } + | ELSE { "else" } + | END { "end" } + | EXCEPTION { "exception" } + | EXTERNAL { "external" } + | FALSE { "false" } + | FOR { "for" } + | FUN { "fun" } + | FUNCTION { "function" } + | FUNCTOR { "functor" } + | IF { "if" } + | IN { "in" } + | INCLUDE { "include" } + | INHERIT { "inherit" } + | INITIALIZER { "initializer" } + | LAZY { "lazy" } + | LET { "let" } + | MATCH { "match" } + | METHOD { "method" } + | MODULE { "module" } + | MUTABLE { "mutable" } + | NEW { "new" } + | NONREC { "nonrec" } + | OBJECT { "object" } + | OF { "of" } + | OPEN { "open" } + | OR { "or" } + | PRIVATE { "private" } + | REC { "rec" } + | SIG { "sig" } + | STRUCT { "struct" } + | THEN { "then" } + | TO { "to" } + | TRUE { "true" } + | TRY { "try" } + | TYPE { "type" } + | VAL { "val" } + | VIRTUAL { "virtual" } + | WHEN { "when" } + | WHILE { "while" } + | WITH { "with" } +/* mod/land/lor/lxor/lsl/lsr/asr are not supported for now */ +; + +attr_id: + single_attr_id { mkloc $1 (symbol_rloc()) } + | single_attr_id DOT attr_id { mkloc ($1 ^ "." ^ $3.txt) (symbol_rloc())} +; +attribute: + LBRACKETAT attr_id payload RBRACKET { ($2, $3) } +; +post_item_attribute: + LBRACKETATAT attr_id payload RBRACKET { ($2, $3) } +; +floating_attribute: + LBRACKETATATAT attr_id payload RBRACKET { ($2, $3) } +; +post_item_attributes: + /* empty */ { [] } + | post_item_attribute post_item_attributes { $1 :: $2 } +; +attributes: + /* empty */{ [] } + | attribute attributes { $1 :: $2 } +; +ext_attributes: + /* empty */ { None, [] } + | attribute attributes { None, $1 :: $2 } + | PERCENT attr_id attributes { Some $2, $3 } +; +extension: + LBRACKETPERCENT attr_id payload RBRACKET { ($2, $3) } +; +item_extension: + LBRACKETPERCENTPERCENT attr_id payload RBRACKET { ($2, $3) } +; +payload: + structure { PStr $1 } + | COLON signature { PSig $2 } + | COLON core_type { PTyp $2 } + | QUESTION pattern { PPat ($2, None) } + | QUESTION pattern WHEN seq_expr { PPat ($2, Some $4) } +; +%% diff --git a/analysis/vendor/compiler-libs-406/parsetree.mli b/analysis/vendor/ml/parsetree.ml similarity index 97% rename from analysis/vendor/compiler-libs-406/parsetree.mli rename to analysis/vendor/ml/parsetree.ml index 1f5a4cfc8..d4ad85cba 100644 --- a/analysis/vendor/compiler-libs-406/parsetree.mli +++ b/analysis/vendor/ml/parsetree.ml @@ -24,7 +24,7 @@ type constant = Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker *) - | Pconst_char of char + | Pconst_char of int (* 'c' *) | Pconst_string of string * string option (* "constant" @@ -557,7 +557,7 @@ and 'a class_infos = Also used for "class type" declaration. *) -and class_description = class_type class_infos + and class_type_declaration = class_type class_infos @@ -618,7 +618,7 @@ and class_field = } and class_field_desc = - | Pcf_inherit of override_flag * class_expr * string loc option + | Pcf_inherit of unit (* inherit CE inherit CE as x inherit! CE @@ -645,7 +645,7 @@ and class_field_kind = | Cfk_virtual of core_type | Cfk_concrete of override_flag * expression -and class_declaration = class_expr class_infos + (** {1 Module language} *) @@ -705,7 +705,7 @@ and signature_item_desc = (* open X *) | Psig_include of include_description (* include MT *) - | Psig_class of class_description list + | Psig_class of unit (* class c1 : ... and ... and cn : ... *) | Psig_class_type of class_type_declaration list (* class type ct1 = ... and ... and ctn = ... *) @@ -830,8 +830,8 @@ and structure_item_desc = (* module type S = MT *) | Pstr_open of open_description (* open X *) - | Pstr_class of class_declaration list - (* class c1 = ... and ... and cn = ... *) + | Pstr_class of unit + (* Dummy AST node *) | Pstr_class_type of class_type_declaration list (* class type ct1 = ... and ... and ctn = ... *) | Pstr_include of include_declaration @@ -858,18 +858,3 @@ and module_binding = } (* X = ME *) -(** {1 Toplevel} *) - -(* Toplevel phrases *) - -type toplevel_phrase = - | Ptop_def of structure - | Ptop_dir of string * directive_argument - (* #use, #load ... *) - -and directive_argument = - | Pdir_none - | Pdir_string of string - | Pdir_int of string * char option - | Pdir_ident of Longident.t - | Pdir_bool of bool diff --git a/analysis/vendor/compiler-libs-406/path.ml b/analysis/vendor/ml/path.ml similarity index 97% rename from analysis/vendor/compiler-libs-406/path.ml rename to analysis/vendor/ml/path.ml index cff31cb81..518938651 100644 --- a/analysis/vendor/compiler-libs-406/path.ml +++ b/analysis/vendor/ml/path.ml @@ -48,7 +48,7 @@ let rec isfree id = function let rec binding_time = function Pident id -> Ident.binding_time id | Pdot(p, _s, _pos) -> binding_time p - | Papply(p1, p2) -> max (binding_time p1) (binding_time p2) + | Papply(p1, p2) -> Ext_pervasives.max_int (binding_time p1) (binding_time p2) let kfalse _ = false diff --git a/analysis/vendor/compiler-libs-406/path.mli b/analysis/vendor/ml/path.mli similarity index 100% rename from analysis/vendor/compiler-libs-406/path.mli rename to analysis/vendor/ml/path.mli diff --git a/analysis/vendor/compiler-libs-406/pprintast.ml b/analysis/vendor/ml/pprintast.ml similarity index 92% rename from analysis/vendor/compiler-libs-406/pprintast.ml rename to analysis/vendor/ml/pprintast.ml index 998365a79..b531404ef 100644 --- a/analysis/vendor/compiler-libs-406/pprintast.ml +++ b/analysis/vendor/ml/pprintast.ml @@ -191,8 +191,10 @@ let rec longident f = function let longident_loc f x = pp f "%a" longident x.txt +let string_of_int_as_char i = Ext_util.string_of_int_as_char i + let constant f = function - | Pconst_char i -> pp f "%C" i + | Pconst_char i -> pp f "%s" (string_of_int_as_char i) | Pconst_string (i, None) -> pp f "%S" i | Pconst_string (i, Some delim) -> pp f "{%s|%s|%s}" delim i delim | Pconst_integer (i, None) -> paren (i.[0]='-') (fun f -> pp f "%s") f i @@ -768,8 +770,22 @@ and value_description ctxt f x = but they're already printed by the callers this method *) pp f "@[%a%a@]" (core_type ctxt) x.pval_type (fun f x -> +#ifndef RELEASE + match x.pval_prim with + | first :: second :: _ + when Ext_string.first_marshal_char second + -> + pp f "@ =@ %a -- %a" + constant_string first + Ext_obj.pp_any (Marshal.from_string second 0) + | [] -> () + | _ -> + pp f "@ =@ %a" (list constant_string) x.pval_prim + +#else if x.pval_prim <> [] then pp f "@ =@ %a" (list constant_string) x.pval_prim +#endif ) x and extension ctxt f (s, e) = @@ -854,13 +870,7 @@ and class_type_declaration_list ctxt f l = and class_field ctxt f x = match x.pcf_desc with - | Pcf_inherit (ovf, ce, so) -> - pp f "@[<2>inherit@ %s@ %a%a@]%a" (override ovf) - (class_expr ctxt) ce - (fun f so -> match so with - | None -> (); - | Some (s) -> pp f "@ as %s" s.txt ) so - (item_attributes ctxt) x.pcf_attributes + | Pcf_inherit () -> () | Pcf_val (s, mf, Cfk_concrete (ovf, e)) -> pp f "@[<2>val%s %a%s =@;%a@]%a" (override ovf) mutable_flag mf s.txt @@ -919,40 +929,6 @@ and class_structure ctxt f { pcstr_self = p; pcstr_fields = l } = | _ -> pp f " (%a)" (pattern ctxt) p) p (list (class_field ctxt)) l -and class_expr ctxt f x = - if x.pcl_attributes <> [] then begin - pp f "((%a)%a)" (class_expr ctxt) {x with pcl_attributes=[]} - (attributes ctxt) x.pcl_attributes - end else - match x.pcl_desc with - | Pcl_structure (cs) -> class_structure ctxt f cs - | Pcl_fun (l, eo, p, e) -> - pp f "fun@ %a@ ->@ %a" - (label_exp ctxt) (l,eo,p) - (class_expr ctxt) e - | Pcl_let (rf, l, ce) -> - pp f "%a@ in@ %a" - (bindings ctxt) (rf,l) - (class_expr ctxt) ce - | Pcl_apply (ce, l) -> - pp f "((%a)@ %a)" (* Cf: #7200 *) - (class_expr ctxt) ce - (list (label_x_expression_param ctxt)) l - | Pcl_constr (li, l) -> - pp f "%a%a" - (fun f l-> if l <>[] then - pp f "[%a]@ " - (list (core_type ctxt) ~sep:",") l) l - longident_loc li - | Pcl_constraint (ce, ct) -> - pp f "(%a@ :@ %a)" - (class_expr ctxt) ce - (class_type ctxt) ct - | Pcl_extension e -> extension ctxt f e - | Pcl_open (ovf, lid, e) -> - pp f "@[<2>let open%s %a in@;%a@]" (override ovf) longident_loc lid - (class_expr ctxt) e - and module_type ctxt f x = if x.pmty_attributes <> [] then begin pp f "((%a)%a)" (module_type ctxt) {x with pmty_attributes=[]} @@ -1016,22 +992,8 @@ and signature_item ctxt f x : unit = type_extension ctxt f te | Psig_exception ed -> exception_declaration ctxt f ed - | Psig_class l -> - let class_description kwd f ({pci_params=ls;pci_name={txt;_};_} as x) = - pp f "@[<2>%s %a%a%s@;:@;%a@]%a" kwd - virtual_flag x.pci_virt - (class_params_def ctxt) ls txt - (class_type ctxt) x.pci_expr - (item_attributes ctxt) x.pci_attributes - in begin - match l with - | [] -> () - | [x] -> class_description "class" f x - | x :: xs -> - pp f "@[%a@,%a@]" - (class_description "class") x - (list ~sep:"@," (class_description "and")) xs - end + | Psig_class () -> + () | Psig_module ({pmd_type={pmty_desc=Pmty_alias alias; pmty_attributes=[]; _};_} as pmd) -> pp f "@[module@ %s@ =@ %a@]%a" pmd.pmd_name.txt @@ -1259,42 +1221,7 @@ and structure_item ctxt f x = pp f "@ =@ %a" (module_type ctxt) mt ) md (item_attributes ctxt) attrs - | Pstr_class l -> - let extract_class_args cl = - let rec loop acc = function - | {pcl_desc=Pcl_fun (l, eo, p, cl'); pcl_attributes = []} -> - loop ((l,eo,p) :: acc) cl' - | cl -> List.rev acc, cl - in - let args, cl = loop [] cl in - let constr, cl = - match cl with - | {pcl_desc=Pcl_constraint (cl', ct); pcl_attributes = []} -> - Some ct, cl' - | _ -> None, cl - in - args, constr, cl - in - let class_constraint f ct = pp f ": @[%a@] " (class_type ctxt) ct in - let class_declaration kwd f - ({pci_params=ls; pci_name={txt;_}; _} as x) = - let args, constr, cl = extract_class_args x.pci_expr in - pp f "@[<2>%s %a%a%s %a%a=@;%a@]%a" kwd - virtual_flag x.pci_virt - (class_params_def ctxt) ls txt - (list (label_exp ctxt)) args - (option class_constraint) constr - (class_expr ctxt) cl - (item_attributes ctxt) x.pci_attributes - in begin - match l with - | [] -> () - | [x] -> class_declaration "class" f x - | x :: xs -> - pp f "@[%a@,%a@]" - (class_declaration "class") x - (list ~sep:"@," (class_declaration "and")) xs - end + | Pstr_class () -> () | Pstr_class_type l -> class_type_declaration_list ctxt f l | Pstr_primitive vd -> pp f "@[external@ %a@ :@ %a@]%a" @@ -1493,24 +1420,7 @@ and label_x_expression_param ctxt f (l,e) = else pp f "~%s:%a" lbl (simple_expr ctxt) e -and directive_argument f x = - match x with - | Pdir_none -> () - | Pdir_string (s) -> pp f "@ %S" s - | Pdir_int (n, None) -> pp f "@ %s" n - | Pdir_int (n, Some m) -> pp f "@ %s%c" n m - | Pdir_ident (li) -> pp f "@ %a" longident li - | Pdir_bool (b) -> pp f "@ %s" (string_of_bool b) - -let toplevel_phrase f x = - match x with - | Ptop_def (s) ->pp f "@[%a@]" (list (structure_item reset_ctxt)) s - (* pp_open_hvbox f 0; *) - (* pp_print_list structure_item f s ; *) - (* pp_close_box f (); *) - | Ptop_dir (s, da) -> - pp f "@[#%s@ %a@]" s directive_argument da - (* pp f "@[#%s@ %a@]" s directive_argument da *) + let expression f x = pp f "@[%a@]" (expression reset_ctxt) x @@ -1527,11 +1437,6 @@ let string_of_structure x = structure reset_ctxt f x; flush_str_formatter () -let top_phrase f x = - pp_print_newline f (); - toplevel_phrase f x; - pp f ";;"; - pp_print_newline f () let core_type = core_type reset_ctxt let pattern = pattern reset_ctxt diff --git a/analysis/vendor/compiler-libs-406/pprintast.mli b/analysis/vendor/ml/pprintast.mli similarity index 91% rename from analysis/vendor/compiler-libs-406/pprintast.mli rename to analysis/vendor/ml/pprintast.mli index 60f57cf4e..7da9ee0d1 100644 --- a/analysis/vendor/compiler-libs-406/pprintast.mli +++ b/analysis/vendor/ml/pprintast.mli @@ -15,12 +15,13 @@ type space_formatter = (unit, Format.formatter, unit) format -val toplevel_phrase : Format.formatter -> Parsetree.toplevel_phrase -> unit + val expression : Format.formatter -> Parsetree.expression -> unit val string_of_expression : Parsetree.expression -> string -val top_phrase: Format.formatter -> Parsetree.toplevel_phrase -> unit + val core_type: Format.formatter -> Parsetree.core_type -> unit val pattern: Format.formatter -> Parsetree.pattern -> unit val signature: Format.formatter -> Parsetree.signature -> unit val structure: Format.formatter -> Parsetree.structure -> unit val string_of_structure: Parsetree.structure -> string +val string_of_int_as_char: int -> string diff --git a/analysis/vendor/compiler-libs-406/predef.ml b/analysis/vendor/ml/predef.ml similarity index 78% rename from analysis/vendor/compiler-libs-406/predef.ml rename to analysis/vendor/ml/predef.ml index e00df7feb..c9516c19d 100644 --- a/analysis/vendor/compiler-libs-406/predef.ml +++ b/analysis/vendor/ml/predef.ml @@ -39,14 +39,37 @@ and ident_exn = ident_create "exn" and ident_array = ident_create "array" and ident_list = ident_create "list" and ident_option = ident_create "option" -and ident_nativeint = ident_create "nativeint" -and ident_int32 = ident_create "int32" + and ident_int64 = ident_create "int64" and ident_lazy_t = ident_create "lazy_t" and ident_string = ident_create "string" and ident_extension_constructor = ident_create "extension_constructor" and ident_floatarray = ident_create "floatarray" +and ident_unknown = ident_create "unknown" + +and ident_promise = ident_create "promise" +and ident_uncurried = ident_create "function$" + +type test = + | For_sure_yes + | For_sure_no + | NA + +let type_is_builtin_path_but_option (p : Path.t) : test = + match p with + | Pident {stamp} -> + if + stamp >= ident_int.stamp + && stamp <= ident_floatarray.stamp + then + if (stamp = ident_option.stamp) + || (stamp = ident_unit.stamp) then + For_sure_no + else For_sure_yes + else NA + | _ -> NA + let path_int = Pident ident_int and path_char = Pident ident_char and path_bytes = Pident ident_bytes @@ -57,14 +80,18 @@ and path_exn = Pident ident_exn and path_array = Pident ident_array and path_list = Pident ident_list and path_option = Pident ident_option -and path_nativeint = Pident ident_nativeint -and path_int32 = Pident ident_int32 + + and path_int64 = Pident ident_int64 and path_lazy_t = Pident ident_lazy_t and path_string = Pident ident_string + +and path_unkonwn = Pident ident_unknown and path_extension_constructor = Pident ident_extension_constructor and path_floatarray = Pident ident_floatarray +and path_promise = Pident ident_promise + let type_int = newgenty (Tconstr(path_int, [], ref Mnil)) and type_char = newgenty (Tconstr(path_char, [], ref Mnil)) and type_bytes = newgenty (Tconstr(path_bytes, [], ref Mnil)) @@ -75,40 +102,41 @@ and type_exn = newgenty (Tconstr(path_exn, [], ref Mnil)) and type_array t = newgenty (Tconstr(path_array, [t], ref Mnil)) and type_list t = newgenty (Tconstr(path_list, [t], ref Mnil)) and type_option t = newgenty (Tconstr(path_option, [t], ref Mnil)) -and type_nativeint = newgenty (Tconstr(path_nativeint, [], ref Mnil)) -and type_int32 = newgenty (Tconstr(path_int32, [], ref Mnil)) + + and type_int64 = newgenty (Tconstr(path_int64, [], ref Mnil)) and type_lazy_t t = newgenty (Tconstr(path_lazy_t, [t], ref Mnil)) and type_string = newgenty (Tconstr(path_string, [], ref Mnil)) + +and type_unknown = newgenty (Tconstr(path_unkonwn, [], ref Mnil)) and type_extension_constructor = newgenty (Tconstr(path_extension_constructor, [], ref Mnil)) and type_floatarray = newgenty (Tconstr(path_floatarray, [], ref Mnil)) let ident_match_failure = ident_create_predef_exn "Match_failure" -and ident_out_of_memory = ident_create_predef_exn "Out_of_memory" + and ident_invalid_argument = ident_create_predef_exn "Invalid_argument" and ident_failure = ident_create_predef_exn "Failure" + +and ident_js_error = ident_create_predef_exn "JsError" and ident_not_found = ident_create_predef_exn "Not_found" -and ident_sys_error = ident_create_predef_exn "Sys_error" + and ident_end_of_file = ident_create_predef_exn "End_of_file" and ident_division_by_zero = ident_create_predef_exn "Division_by_zero" -and ident_stack_overflow = ident_create_predef_exn "Stack_overflow" -and ident_sys_blocked_io = ident_create_predef_exn "Sys_blocked_io" + + and ident_assert_failure = ident_create_predef_exn "Assert_failure" and ident_undefined_recursive_module = ident_create_predef_exn "Undefined_recursive_module" let all_predef_exns = [ ident_match_failure; - ident_out_of_memory; ident_invalid_argument; ident_failure; + ident_js_error; ident_not_found; - ident_sys_error; ident_end_of_file; ident_division_by_zero; - ident_stack_overflow; - ident_sys_blocked_io; ident_assert_failure; ident_undefined_recursive_module; ] @@ -149,6 +177,9 @@ and ident_nil = ident_create "[]" and ident_cons = ident_create "::" and ident_none = ident_create "None" and ident_some = ident_create "Some" +and ident_ctor_unknown = ident_create "Unknown" +and ident_ctor_uncurried = ident_create "Function$" + let common_initial_env add_type add_extension empty_env = let decl_bool = {decl_abstr with @@ -182,12 +213,41 @@ let common_initial_env add_type add_extension empty_env = type_arity = 1; type_kind = Type_variant([cstr ident_none []; cstr ident_some [tvar]]); type_variance = [Variance.covariant]} + and decl_uncurried = + let tvar1, tvar2 = newgenvar(), newgenvar() in + {decl_abstr with + type_params = [tvar1; tvar2]; + type_arity = 2; + type_kind = Type_variant([cstr ident_ctor_uncurried [tvar1]]); + type_variance = [Variance.covariant; Variance.covariant]; + type_unboxed = Types.unboxed_true_default_false; + } + and decl_unknown = + let tvar = newgenvar () in + {decl_abstr with + type_params = []; + type_arity = 0; + type_kind = Type_variant ([ { + cd_id = ident_ctor_unknown; + cd_args = Cstr_tuple [tvar]; + cd_res = Some type_unknown; + cd_loc = Location.none; + cd_attributes = [] + }]); + type_unboxed = Types.unboxed_true_default_false + } and decl_lazy_t = let tvar = newgenvar() in {decl_abstr with type_params = [tvar]; type_arity = 1; type_variance = [Variance.covariant]} + and decl_promise = + let tvar = newgenvar() in + {decl_abstr with + type_params = [tvar]; + type_arity = 1; + type_variance = [Variance.covariant]} in let add_extension id l = @@ -204,13 +264,10 @@ let common_initial_env add_type add_extension empty_env = in add_extension ident_match_failure [newgenty (Ttuple[type_string; type_int; type_int])] ( - add_extension ident_out_of_memory [] ( - add_extension ident_stack_overflow [] ( add_extension ident_invalid_argument [type_string] ( + add_extension ident_js_error [type_unknown] ( add_extension ident_failure [type_string] ( add_extension ident_not_found [] ( - add_extension ident_sys_blocked_io [] ( - add_extension ident_sys_error [type_string] ( add_extension ident_end_of_file [] ( add_extension ident_division_by_zero [] ( add_extension ident_assert_failure @@ -218,8 +275,7 @@ let common_initial_env add_type add_extension empty_env = add_extension ident_undefined_recursive_module [newgenty (Ttuple[type_string; type_int; type_int])] ( add_type ident_int64 decl_abstr ( - add_type ident_int32 decl_abstr ( - add_type ident_nativeint decl_abstr ( + add_type ident_lazy_t decl_lazy_t ( add_type ident_option decl_option ( add_type ident_list decl_list ( @@ -228,26 +284,31 @@ let common_initial_env add_type add_extension empty_env = add_type ident_unit decl_unit ( add_type ident_bool decl_bool ( add_type ident_float decl_abstr ( + add_type ident_unknown decl_unknown ( + add_type ident_uncurried decl_uncurried ( add_type ident_string decl_abstr ( - add_type ident_char decl_abstr_imm ( add_type ident_int decl_abstr_imm ( add_type ident_extension_constructor decl_abstr ( add_type ident_floatarray decl_abstr ( - empty_env)))))))))))))))))))))))))))) + add_type ident_promise decl_promise ( + empty_env))))))))))))))))))))))))) let build_initial_env add_type add_exception empty_env = let common = common_initial_env add_type add_exception empty_env in - let safe_string = add_type ident_bytes decl_abstr common in - let decl_bytes_unsafe = {decl_abstr with type_manifest = Some type_string} in - let unsafe_string = add_type ident_bytes decl_bytes_unsafe common in - (safe_string, unsafe_string) - + let res = add_type ident_bytes decl_abstr common in + let decl_type_char = + {decl_abstr with + type_manifest = Some type_int; + type_private = Private} in + add_type ident_char decl_type_char res + + let builtin_values = List.map (fun id -> Ident.make_global id; (Ident.name id, id)) - [ident_match_failure; ident_out_of_memory; ident_stack_overflow; + [ident_match_failure; ident_invalid_argument; - ident_failure; ident_not_found; ident_sys_error; ident_end_of_file; - ident_division_by_zero; ident_sys_blocked_io; + ident_failure; ident_js_error; ident_not_found; ident_end_of_file; + ident_division_by_zero; ident_assert_failure; ident_undefined_recursive_module ] (* Start non-predef identifiers at 1000. This way, more predefs can diff --git a/analysis/vendor/compiler-libs-406/predef.mli b/analysis/vendor/ml/predef.mli similarity index 94% rename from analysis/vendor/compiler-libs-406/predef.mli rename to analysis/vendor/ml/predef.mli index 878dc6eb9..d6f82144e 100644 --- a/analysis/vendor/compiler-libs-406/predef.mli +++ b/analysis/vendor/ml/predef.mli @@ -28,8 +28,8 @@ val type_exn: type_expr val type_array: type_expr -> type_expr val type_list: type_expr -> type_expr val type_option: type_expr -> type_expr -val type_nativeint: type_expr -val type_int32: type_expr + + val type_int64: type_expr val type_lazy_t: type_expr -> type_expr val type_extension_constructor:type_expr @@ -46,12 +46,13 @@ val path_exn: Path.t val path_array: Path.t val path_list: Path.t val path_option: Path.t -val path_nativeint: Path.t -val path_int32: Path.t + + val path_int64: Path.t val path_lazy_t: Path.t val path_extension_constructor: Path.t val path_floatarray: Path.t +val path_promise: Path.t val path_match_failure: Path.t val path_assert_failure : Path.t @@ -64,7 +65,7 @@ val path_undefined_recursive_module : Path.t val build_initial_env: (Ident.t -> type_declaration -> 'a -> 'a) -> (Ident.t -> extension_constructor -> 'a -> 'a) -> - 'a -> 'a * 'a + 'a -> 'a (* To initialize linker tables *) @@ -77,3 +78,11 @@ val builtin_idents: (string * Ident.t) list so flambda can generate code to raise it. *) val ident_division_by_zero: Ident.t val all_predef_exns : Ident.t list + +type test = + | For_sure_yes + | For_sure_no + | NA + +val type_is_builtin_path_but_option : + Path.t -> test diff --git a/analysis/vendor/ml/primitive.ml b/analysis/vendor/ml/primitive.ml new file mode 100644 index 000000000..ad0504a09 --- /dev/null +++ b/analysis/vendor/ml/primitive.ml @@ -0,0 +1,100 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +(* Description of primitive functions *) + +open Misc +open Parsetree + +type boxed_integer = Pnativeint | Pint32 | Pint64 + +type native_repr = + | Same_as_ocaml_repr + +type description = + { prim_name: string; (* Name of primitive or C function *) + prim_arity: int; (* Number of arguments *) + prim_alloc: bool; (* Does it allocates or raise? *) + prim_native_name: string; (* Name of C function for the nat. code gen. *) + prim_native_repr_args: native_repr list; + prim_native_repr_res: native_repr } + +let coerce : (description -> description -> bool) ref = + ref (fun + (p1 : description) (p2 : description) -> + p1 = p2 + ) + + + +let rec make_native_repr_args arity x = + if arity = 0 then + [] + else + x :: make_native_repr_args (arity - 1) x + +let simple ~name ~arity ~alloc = + {prim_name = name; + prim_arity = arity; + prim_alloc = alloc; + prim_native_name = ""; + prim_native_repr_args = make_native_repr_args arity Same_as_ocaml_repr; + prim_native_repr_res = Same_as_ocaml_repr} + +let make ~name ~alloc ~native_name ~native_repr_args ~native_repr_res = + {prim_name = name; + prim_arity = List.length native_repr_args; + prim_alloc = alloc; + prim_native_name = native_name; + prim_native_repr_args = native_repr_args; + prim_native_repr_res = native_repr_res} + +let parse_declaration valdecl ~native_repr_args ~native_repr_res = + let arity = List.length native_repr_args in + let name, native_name = + match valdecl.pval_prim with + | name :: name2 :: _ -> (name, name2) + | name :: _ -> (name, "") + | [] -> + fatal_error "Primitive.parse_declaration" + in + {prim_name = name; + prim_arity = arity; + prim_alloc = true; + prim_native_name = native_name; + prim_native_repr_args = native_repr_args; + prim_native_repr_res = native_repr_res} + +open Outcometree + +let print p osig_val_decl = + let prims = + if p.prim_native_name <> "" then + [p.prim_name; p.prim_native_name] + else + [p.prim_name] + in + { osig_val_decl with + oval_prims = prims; + oval_attributes = [] } + +let native_name p = + if p.prim_native_name <> "" + then p.prim_native_name + else p.prim_name + +let byte_name p = + p.prim_name + diff --git a/analysis/vendor/compiler-libs-406/primitive.mli b/analysis/vendor/ml/primitive.mli similarity index 89% rename from analysis/vendor/compiler-libs-406/primitive.mli rename to analysis/vendor/ml/primitive.mli index 02ece7d96..ecc224562 100644 --- a/analysis/vendor/compiler-libs-406/primitive.mli +++ b/analysis/vendor/ml/primitive.mli @@ -21,9 +21,6 @@ type boxed_integer = Pnativeint | Pint32 | Pint64 of a primitive *) type native_repr = | Same_as_ocaml_repr - | Unboxed_float - | Unboxed_integer of boxed_integer - | Untagged_int type description = private { prim_name: string; (* Name of primitive or C function *) @@ -63,9 +60,6 @@ val print val native_name: description -> string val byte_name: description -> string -type error = - | Old_style_float_with_native_repr_attribute - | Old_style_noalloc_with_noalloc_attribute - | No_native_primitive_with_repr_attribute -exception Error of Location.t * error +val coerce : + (description -> description -> bool ) ref \ No newline at end of file diff --git a/analysis/vendor/compiler-libs-406/printast.ml b/analysis/vendor/ml/printast.ml similarity index 89% rename from analysis/vendor/compiler-libs-406/printast.ml rename to analysis/vendor/ml/printast.ml index 2ef0123c5..eee7a9051 100644 --- a/analysis/vendor/compiler-libs-406/printast.ml +++ b/analysis/vendor/ml/printast.ml @@ -28,10 +28,12 @@ let fmt_position with_name f l = ;; let fmt_location f loc = + if !Clflags.dump_location then ( let p_2nd_name = loc.loc_start.pos_fname <> loc.loc_end.pos_fname in fprintf f "(%a..%a)" (fmt_position true) loc.loc_start (fmt_position p_2nd_name) loc.loc_end; if loc.loc_ghost then fprintf f " ghost"; + ) ;; let rec fmt_longident_aux f x = @@ -42,7 +44,6 @@ let rec fmt_longident_aux f x = fprintf f "%a(%a)" fmt_longident_aux y fmt_longident_aux z; ;; -let fmt_longident f x = fprintf f "\"%a\"" fmt_longident_aux x;; let fmt_longident_loc f (x : Longident.t loc) = fprintf f "\"%a\" %a" fmt_longident_aux x.txt fmt_location x.loc; @@ -59,7 +60,7 @@ let fmt_char_option f = function let fmt_constant f x = match x with | Pconst_integer (i,m) -> fprintf f "PConst_int (%s,%a)" i fmt_char_option m; - | Pconst_char (c) -> fprintf f "PConst_char %02x" (Char.code c); + | Pconst_char (c) -> fprintf f "PConst_char %02x" c; | Pconst_string (s, None) -> fprintf f "PConst_string(%S,None)" s; | Pconst_string (s, Some delim) -> fprintf f "PConst_string (%S,Some %S)" s delim; @@ -407,8 +408,8 @@ and type_declaration i ppf x = and attributes i ppf l = let i = i + 1 in List.iter - (fun ({Location.loc; txt}, arg) -> - line i ppf "attribute \"%s\" %a\n" txt fmt_location loc; + (fun (s, arg) -> + line i ppf "attribute %a \"%s\"\n" fmt_location (s: _ Asttypes.loc).loc s.txt; payload (i + 1) ppf arg; ) l @@ -522,16 +523,6 @@ and class_type_field i ppf x = line i ppf "Pctf_extension \"%s\"\n" s.txt; payload i ppf arg -and class_description i ppf x = - line i ppf "class_description %a\n" fmt_location x.pci_loc; - attributes i ppf x.pci_attributes; - let i = i+1 in - line i ppf "pci_virt = %a\n" fmt_virtual_flag x.pci_virt; - line i ppf "pci_params =\n"; - list (i+1) type_parameter ppf x.pci_params; - line i ppf "pci_name = %a\n" fmt_string_loc x.pci_name; - line i ppf "pci_expr =\n"; - class_type (i+1) ppf x.pci_expr; and class_type_declaration i ppf x = line i ppf "class_type_declaration %a\n" fmt_location x.pci_loc; @@ -544,43 +535,6 @@ and class_type_declaration i ppf x = line i ppf "pci_expr =\n"; class_type (i+1) ppf x.pci_expr; -and class_expr i ppf x = - line i ppf "class_expr %a\n" fmt_location x.pcl_loc; - attributes i ppf x.pcl_attributes; - let i = i+1 in - match x.pcl_desc with - | Pcl_constr (li, l) -> - line i ppf "Pcl_constr %a\n" fmt_longident_loc li; - list i core_type ppf l; - | Pcl_structure (cs) -> - line i ppf "Pcl_structure\n"; - class_structure i ppf cs; - | Pcl_fun (l, eo, p, e) -> - line i ppf "Pcl_fun\n"; - arg_label i ppf l; - option i expression ppf eo; - pattern i ppf p; - class_expr i ppf e; - | Pcl_apply (ce, l) -> - line i ppf "Pcl_apply\n"; - class_expr i ppf ce; - list i label_x_expression ppf l; - | Pcl_let (rf, l, ce) -> - line i ppf "Pcl_let %a\n" fmt_rec_flag rf; - list i value_binding ppf l; - class_expr i ppf ce; - | Pcl_constraint (ce, ct) -> - line i ppf "Pcl_constraint\n"; - class_expr i ppf ce; - class_type i ppf ct; - | Pcl_extension (s, arg) -> - line i ppf "Pcl_extension \"%s\"\n" s.txt; - payload i ppf arg - | Pcl_open (ovf, m, e) -> - line i ppf "Pcl_open %a \"%a\"\n" fmt_override_flag ovf - fmt_longident_loc m; - class_expr i ppf e - and class_structure i ppf { pcstr_self = p; pcstr_fields = l } = line i ppf "class_structure\n"; pattern (i+1) ppf p; @@ -591,10 +545,7 @@ and class_field i ppf x = let i = i + 1 in attributes i ppf x.pcf_attributes; match x.pcf_desc with - | Pcf_inherit (ovf, ce, so) -> - line i ppf "Pcf_inherit %a\n" fmt_override_flag ovf; - class_expr (i+1) ppf ce; - option (i+1) string_loc ppf so; + | Pcf_inherit () -> () | Pcf_val (s, mf, k) -> line i ppf "Pcf_val %a\n" fmt_mutable_flag mf; line (i+1) ppf "%a\n" fmt_string_loc s; @@ -625,17 +576,6 @@ and class_field_kind i ppf = function line i ppf "Virtual\n"; core_type i ppf t -and class_declaration i ppf x = - line i ppf "class_declaration %a\n" fmt_location x.pci_loc; - attributes i ppf x.pci_attributes; - let i = i+1 in - line i ppf "pci_virt = %a\n" fmt_virtual_flag x.pci_virt; - line i ppf "pci_params =\n"; - list (i+1) type_parameter ppf x.pci_params; - line i ppf "pci_name = %a\n" fmt_string_loc x.pci_name; - line i ppf "pci_expr =\n"; - class_expr (i+1) ppf x.pci_expr; - and module_type i ppf x = line i ppf "module_type %a\n" fmt_location x.pmty_loc; attributes i ppf x.pmty_attributes; @@ -699,9 +639,7 @@ and signature_item i ppf x = line i ppf "Psig_include\n"; module_type i ppf incl.pincl_mod; attributes i ppf incl.pincl_attributes - | Psig_class (l) -> - line i ppf "Psig_class\n"; - list i class_description ppf l; + | Psig_class () -> () | Psig_class_type (l) -> line i ppf "Psig_class_type\n"; list i class_type_declaration ppf l; @@ -802,9 +740,7 @@ and structure_item i ppf x = fmt_override_flag od.popen_override fmt_longident_loc od.popen_lid; attributes i ppf od.popen_attributes - | Pstr_class (l) -> - line i ppf "Pstr_class\n"; - list i class_declaration ppf l; + | Pstr_class () -> () | Pstr_class_type (l) -> line i ppf "Pstr_class_type\n"; list i class_type_declaration ppf l; @@ -897,27 +833,8 @@ and label_x_bool_x_core_type_list i ppf x = core_type (i+1) ppf ct ;; -let rec toplevel_phrase i ppf x = - match x with - | Ptop_def (s) -> - line i ppf "Ptop_def\n"; - structure (i+1) ppf s; - | Ptop_dir (s, da) -> - line i ppf "Ptop_dir \"%s\"\n" s; - directive_argument i ppf da; - -and directive_argument i ppf x = - match x with - | Pdir_none -> line i ppf "Pdir_none\n" - | Pdir_string (s) -> line i ppf "Pdir_string \"%s\"\n" s; - | Pdir_int (n, None) -> line i ppf "Pdir_int %s\n" n; - | Pdir_int (n, Some m) -> line i ppf "Pdir_int %s%c\n" n m; - | Pdir_ident (li) -> line i ppf "Pdir_ident %a\n" fmt_longident li; - | Pdir_bool (b) -> line i ppf "Pdir_bool %s\n" (string_of_bool b); -;; let interface ppf x = list 0 signature_item ppf x;; let implementation ppf x = list 0 structure_item ppf x;; -let top_phrase ppf x = toplevel_phrase 0 ppf x;; diff --git a/analysis/vendor/compiler-libs-406/printast.mli b/analysis/vendor/ml/printast.mli similarity index 96% rename from analysis/vendor/compiler-libs-406/printast.mli rename to analysis/vendor/ml/printast.mli index b77a2ca5a..eb94a3bcb 100644 --- a/analysis/vendor/compiler-libs-406/printast.mli +++ b/analysis/vendor/ml/printast.mli @@ -18,7 +18,7 @@ open Format;; val interface : formatter -> signature_item list -> unit;; val implementation : formatter -> structure_item list -> unit;; -val top_phrase : formatter -> toplevel_phrase -> unit;; + val expression: int -> formatter -> expression -> unit val structure: int -> formatter -> structure -> unit diff --git a/analysis/vendor/ml/printlambda.ml b/analysis/vendor/ml/printlambda.ml new file mode 100644 index 000000000..854223859 --- /dev/null +++ b/analysis/vendor/ml/printlambda.ml @@ -0,0 +1,465 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +open Format +open Asttypes +open Primitive +open Lambda + + +let rec struct_const ppf = function + | Const_base(Const_int n) -> fprintf ppf "%i" n + | Const_base(Const_char i) -> fprintf ppf "%s" (Pprintast.string_of_int_as_char i) + | Const_base(Const_string (s, _)) -> fprintf ppf "%S" s + | Const_immstring s -> fprintf ppf "#%S" s + | Const_base(Const_float f) -> fprintf ppf "%s" f + | Const_base(Const_int32 n) -> fprintf ppf "%lil" n + | Const_base(Const_int64 n) -> fprintf ppf "%LiL" n + | Const_base(Const_nativeint n) -> fprintf ppf "%nin" n + | Const_pointer (n,_) -> fprintf ppf "%ia" n + | Const_block(tag_info, []) -> + let tag = Lambda.tag_of_tag_info tag_info in + fprintf ppf "[%i]" tag + | Const_block(tag_info,sc1::scl) -> + let tag = Lambda.tag_of_tag_info tag_info in + let sconsts ppf scl = + List.iter (fun sc -> fprintf ppf "@ %a" struct_const sc) scl in + fprintf ppf "@[<1>[%i:@ @[%a%a@]]@]" tag struct_const sc1 sconsts scl + | Const_float_array [] -> + fprintf ppf "[| |]" + | Const_float_array (f1 :: fl) -> + let floats ppf fl = + List.iter (fun f -> fprintf ppf "@ %s" f) fl in + fprintf ppf "@[<1>[|@[%s%a@]|]@]" f1 floats fl + + | Const_false -> fprintf ppf "false" + | Const_true -> fprintf ppf "true" +let boxed_integer_name = function + | Pnativeint -> "nativeint" + | Pint32 -> "int32" + | Pint64 -> "int64" + +let value_kind = function + | Pgenval -> "" + +(* let field_kind = function + | Pgenval -> "*" + | Pintval -> "int" + | Pfloatval -> "float" + | Pboxedintval bi -> boxed_integer_name bi *) + +let print_boxed_integer_conversion ppf bi1 bi2 = + fprintf ppf "%s_of_%s" (boxed_integer_name bi2) (boxed_integer_name bi1) + +let boxed_integer_mark name = function + | Pnativeint -> Printf.sprintf "Nativeint.%s" name + | Pint32 -> Printf.sprintf "Int32.%s" name + | Pint64 -> Printf.sprintf "Int64.%s" name + +let print_boxed_integer name ppf bi = + fprintf ppf "%s" (boxed_integer_mark name bi);; + + + + +let string_of_loc_kind = function + | Loc_FILE -> "loc_FILE" + | Loc_LINE -> "loc_LINE" + | Loc_MODULE -> "loc_MODULE" + | Loc_POS -> "loc_POS" + | Loc_LOC -> "loc_LOC" + +(* let block_shape ppf shape = match shape with + | None | Some [] -> () + | Some l when List.for_all ((=) Pgenval) l -> () + | Some [elt] -> + Format.fprintf ppf " (%s)" (field_kind elt) + | Some (h :: t) -> + Format.fprintf ppf " (%s" (field_kind h); + List.iter (fun elt -> + Format.fprintf ppf ",%s" (field_kind elt)) + t; + Format.fprintf ppf ")" *) + + +let str_of_field_info (fld_info : Lambda.field_dbg_info)= + match fld_info with + | (Fld_module {name } | Fld_record {name} | Fld_record_inline {name} | Fld_record_extension {name}) + -> name + | Fld_tuple -> "[]" + | Fld_poly_var_tag->"`" + | Fld_poly_var_content -> "#" + | Fld_extension -> "ext" + | Fld_variant -> "var" + | Fld_cons -> "cons" + | Fld_array -> "[||]" +let print_taginfo ppf = function + | Blk_extension -> fprintf ppf "ext" + | Blk_record_ext {fields = ss} -> fprintf ppf "[%s]" (String.concat ";" (Array.to_list ss) ) + | Blk_tuple -> fprintf ppf "tuple" + | Blk_constructor {name ;num_nonconst} -> fprintf ppf "%s/%i" name num_nonconst + | Blk_poly_var name -> fprintf ppf "`%s" name + | Blk_record {fields = ss} -> fprintf ppf "[%s]" (String.concat ";" (Array.to_list ss) ) + | Blk_module ss -> fprintf ppf "[%s]" (String.concat ";" ss) + | Blk_some -> fprintf ppf "some" + | Blk_some_not_nested -> fprintf ppf "some_not_nested" + | Blk_lazy_general -> fprintf ppf "lazy_general" + | Blk_module_export _ -> fprintf ppf "module/exports" + | Blk_record_inlined {fields = ss } + -> fprintf ppf "[%s]" (String.concat ";" (Array.to_list ss) ) + +let primitive ppf = function + | Puncurried_apply -> fprintf ppf "@app" + | Pidentity -> fprintf ppf "id" + | Pbytes_to_string -> fprintf ppf "bytes_to_string" + | Pignore -> fprintf ppf "ignore" + | Prevapply -> fprintf ppf "revapply" + | Pdirapply -> fprintf ppf "dirapply" + | Ploc kind -> fprintf ppf "%s" (string_of_loc_kind kind) + | Pgetglobal id -> fprintf ppf "global %a" Ident.print id + | Pmakeblock(taginfo) -> + fprintf ppf "makeblock %a" print_taginfo taginfo + | Pfield (n, fld) -> fprintf ppf "field:%s/%i" (str_of_field_info fld) n + | Psetfield(n, _) -> + fprintf ppf "setfield %i" n + | Pduprecord -> fprintf ppf "duprecord" + | Plazyforce -> fprintf ppf "force" + | Pccall p -> fprintf ppf "%s" p.prim_name + | Praise k -> fprintf ppf "%s" (Lambda.raise_kind k) + | Psequand -> fprintf ppf "&&" + | Psequor -> fprintf ppf "||" + | Pnot -> fprintf ppf "not" + | Pnegint -> fprintf ppf "~" + | Paddint -> fprintf ppf "+" + | Psubint -> fprintf ppf "-" + | Pmulint -> fprintf ppf "*" + | Pdivint Safe -> fprintf ppf "/" + | Pdivint Unsafe -> fprintf ppf "/u" + | Pmodint Safe -> fprintf ppf "mod" + | Pmodint Unsafe -> fprintf ppf "mod_unsafe" + | Pandint -> fprintf ppf "and" + | Porint -> fprintf ppf "or" + | Pxorint -> fprintf ppf "xor" + | Plslint -> fprintf ppf "lsl" + | Plsrint -> fprintf ppf "lsr" + | Pasrint -> fprintf ppf "asr" + | Pintcomp(Ceq) -> fprintf ppf "==" + | Pintcomp(Cneq) -> fprintf ppf "!=" + | Pintcomp(Clt) -> fprintf ppf "<" + | Pintcomp(Cle) -> fprintf ppf "<=" + | Pintcomp(Cgt) -> fprintf ppf ">" + | Pintcomp(Cge) -> fprintf ppf ">=" + | Poffsetint n -> fprintf ppf "%i+" n + | Poffsetref n -> fprintf ppf "+:=%i"n + | Pintoffloat -> fprintf ppf "int_of_float" + | Pfloatofint -> fprintf ppf "float_of_int" + | Pnegfloat -> fprintf ppf "~." + | Pabsfloat -> fprintf ppf "abs." + | Paddfloat -> fprintf ppf "+." + | Psubfloat -> fprintf ppf "-." + | Pmulfloat -> fprintf ppf "*." + | Pdivfloat -> fprintf ppf "/." + | Pfloatcomp(Ceq) -> fprintf ppf "==." + | Pfloatcomp(Cneq) -> fprintf ppf "!=." + | Pfloatcomp(Clt) -> fprintf ppf "<." + | Pfloatcomp(Cle) -> fprintf ppf "<=." + | Pfloatcomp(Cgt) -> fprintf ppf ">." + | Pfloatcomp(Cge) -> fprintf ppf ">=." + | Pstringlength -> fprintf ppf "string.length" + | Pstringrefu -> fprintf ppf "string.unsafe_get" + | Pstringrefs -> fprintf ppf "string.get" + | Pbyteslength -> fprintf ppf "bytes.length" + | Pbytesrefu -> fprintf ppf "bytes.unsafe_get" + | Pbytessetu -> fprintf ppf "bytes.unsafe_set" + | Pbytesrefs -> fprintf ppf "bytes.get" + | Pbytessets -> fprintf ppf "bytes.set" + + | Parraylength -> fprintf ppf "array.length" + | Pmakearray Mutable -> fprintf ppf "makearray" + | Pmakearray Immutable -> fprintf ppf "makearray_imm" + | Parrayrefu -> fprintf ppf "array.unsafe_get" + | Parraysetu -> fprintf ppf "array.unsafe_set" + | Parrayrefs -> fprintf ppf "array.get" + | Parraysets -> fprintf ppf "array.set" + | Pctconst c -> + let const_name = match c with + | Big_endian -> "big_endian" + | Word_size -> "word_size" + | Int_size -> "int_size" + | Max_wosize -> "max_wosize" + | Ostype_unix -> "ostype_unix" + | Ostype_win32 -> "ostype_win32" + | Ostype_cygwin -> "ostype_cygwin" + | Backend_type -> "backend_type" in + fprintf ppf "sys.constant_%s" const_name + | Pisint -> fprintf ppf "isint" + | Pisout -> fprintf ppf "isout" + | Pbintofint bi -> print_boxed_integer "of_int" ppf bi + | Pintofbint bi -> print_boxed_integer "to_int" ppf bi + | Pcvtbint (bi1, bi2) -> print_boxed_integer_conversion ppf bi1 bi2 + | Pnegbint bi -> print_boxed_integer "neg" ppf bi + | Paddbint bi -> print_boxed_integer "add" ppf bi + | Psubbint bi -> print_boxed_integer "sub" ppf bi + | Pmulbint bi -> print_boxed_integer "mul" ppf bi + | Pdivbint { size = bi; is_safe = Safe } -> + print_boxed_integer "div" ppf bi + | Pdivbint { size = bi; is_safe = Unsafe } -> + print_boxed_integer "div_unsafe" ppf bi + | Pmodbint { size = bi; is_safe = Safe } -> + print_boxed_integer "mod" ppf bi + | Pmodbint { size = bi; is_safe = Unsafe } -> + print_boxed_integer "mod_unsafe" ppf bi + | Pandbint bi -> print_boxed_integer "and" ppf bi + | Porbint bi -> print_boxed_integer "or" ppf bi + | Pxorbint bi -> print_boxed_integer "xor" ppf bi + | Plslbint bi -> print_boxed_integer "lsl" ppf bi + | Plsrbint bi -> print_boxed_integer "lsr" ppf bi + | Pasrbint bi -> print_boxed_integer "asr" ppf bi + | Pbintcomp(bi, Ceq) -> print_boxed_integer "==" ppf bi + | Pbintcomp(bi, Cneq) -> print_boxed_integer "!=" ppf bi + | Pbintcomp(bi, Clt) -> print_boxed_integer "<" ppf bi + | Pbintcomp(bi, Cgt) -> print_boxed_integer ">" ppf bi + | Pbintcomp(bi, Cle) -> print_boxed_integer "<=" ppf bi + | Pbintcomp(bi, Cge) -> print_boxed_integer ">=" ppf bi + | Popaque -> fprintf ppf "opaque" + | Pcreate_extension s -> fprintf ppf "extension[%s]" s +let name_of_primitive = function + | Puncurried_apply -> "Puncurried_apply" + | Pidentity -> "Pidentity" + | Pbytes_to_string -> "Pbytes_to_string" + | Pignore -> "Pignore" + | Prevapply -> "Prevapply" + | Pdirapply -> "Pdirapply" + | Ploc _ -> "Ploc" + | Pgetglobal _ -> "Pgetglobal" + | Pmakeblock _ -> "Pmakeblock" + | Pfield _ -> "Pfield" + | Psetfield _ -> "Psetfield" + | Pduprecord -> "Pduprecord" + | Plazyforce -> "Plazyforce" + | Pccall _ -> "Pccall" + | Praise _ -> "Praise" + | Psequand -> "Psequand" + | Psequor -> "Psequor" + | Pnot -> "Pnot" + | Pnegint -> "Pnegint" + | Paddint -> "Paddint" + | Psubint -> "Psubint" + | Pmulint -> "Pmulint" + | Pdivint _ -> "Pdivint" + | Pmodint _ -> "Pmodint" + | Pandint -> "Pandint" + | Porint -> "Porint" + | Pxorint -> "Pxorint" + | Plslint -> "Plslint" + | Plsrint -> "Plsrint" + | Pasrint -> "Pasrint" + | Pintcomp _ -> "Pintcomp" + | Poffsetint _ -> "Poffsetint" + | Poffsetref _ -> "Poffsetref" + | Pintoffloat -> "Pintoffloat" + | Pfloatofint -> "Pfloatofint" + | Pnegfloat -> "Pnegfloat" + | Pabsfloat -> "Pabsfloat" + | Paddfloat -> "Paddfloat" + | Psubfloat -> "Psubfloat" + | Pmulfloat -> "Pmulfloat" + | Pdivfloat -> "Pdivfloat" + | Pfloatcomp _ -> "Pfloatcomp" + | Pstringlength -> "Pstringlength" + | Pstringrefu -> "Pstringrefu" + | Pstringrefs -> "Pstringrefs" + | Pbyteslength -> "Pbyteslength" + | Pbytesrefu -> "Pbytesrefu" + | Pbytessetu -> "Pbytessetu" + | Pbytesrefs -> "Pbytesrefs" + | Pbytessets -> "Pbytessets" + | Parraylength -> "Parraylength" + | Pmakearray _-> "Pmakearray" + | Parrayrefu -> "Parrayrefu" + | Parraysetu -> "Parraysetu" + | Parrayrefs -> "Parrayrefs" + | Parraysets -> "Parraysets" + | Pctconst _ -> "Pctconst" + | Pisint -> "Pisint" + | Pisout -> "Pisout" + | Pbintofint _ -> "Pbintofint" + | Pintofbint _ -> "Pintofbint" + | Pcvtbint _ -> "Pcvtbint" + | Pnegbint _ -> "Pnegbint" + | Paddbint _ -> "Paddbint" + | Psubbint _ -> "Psubbint" + | Pmulbint _ -> "Pmulbint" + | Pdivbint _ -> "Pdivbint" + | Pmodbint _ -> "Pmodbint" + | Pandbint _ -> "Pandbint" + | Porbint _ -> "Porbint" + | Pxorbint _ -> "Pxorbint" + | Plslbint _ -> "Plslbint" + | Plsrbint _ -> "Plsrbint" + | Pasrbint _ -> "Pasrbint" + | Pbintcomp _ -> "Pbintcomp" + | Popaque -> "Popaque" + | Pcreate_extension _ -> "Pcreate_extension" + +let function_attribute ppf { inline; is_a_functor; stub; return_unit } = + if is_a_functor then + fprintf ppf "is_a_functor@ "; + if stub then + fprintf ppf "stub@ "; + if return_unit then + fprintf ppf "void@ "; + begin match inline with + | Default_inline -> () + | Always_inline -> fprintf ppf "always_inline@ " + | Never_inline -> fprintf ppf "never_inline@ " + end + + +let apply_inlined_attribute ppf = function + | Default_inline -> () + | Always_inline -> fprintf ppf " always_inline" + | Never_inline -> fprintf ppf " never_inline" + + +let rec lam ppf = function + | Lvar id -> + Ident.print ppf id + | Lconst cst -> + struct_const ppf cst + | Lapply ap -> + let lams ppf largs = + List.iter (fun l -> fprintf ppf "@ %a" lam l) largs in + fprintf ppf "@[<2>(apply@ %a%a%a)@]" lam ap.ap_func lams ap.ap_args + apply_inlined_attribute ap.ap_inlined + + | Lfunction{ params; body; attr} -> + let pr_params ppf params = + List.iter (fun param -> fprintf ppf "@ %a" Ident.print param) params + in + fprintf ppf "@[<2>(function%a@ %a%a)@]" pr_params params + function_attribute attr lam body + | Llet(str, k, id, arg, body) -> + let kind = function + Alias -> "a" | Strict -> "" | StrictOpt -> "o" | Variable -> "v" + in + let rec letbody = function + | Llet(str, k, id, arg, body) -> + fprintf ppf "@ @[<2>%a =%s%s@ %a@]" + Ident.print id (kind str) (value_kind k) lam arg; + letbody body + | expr -> expr in + fprintf ppf "@[<2>(let@ @[(@[<2>%a =%s%s@ %a@]" + Ident.print id (kind str) (value_kind k) lam arg; + let expr = letbody body in + fprintf ppf ")@]@ %a)@]" lam expr + | Lletrec(id_arg_list, body) -> + let bindings ppf id_arg_list = + let spc = ref false in + List.iter + (fun (id, l) -> + if !spc then fprintf ppf "@ " else spc := true; + fprintf ppf "@[<2>%a@ %a@]" Ident.print id lam l) + id_arg_list in + fprintf ppf + "@[<2>(letrec@ (@[%a@])@ %a)@]" bindings id_arg_list lam body + | Lprim(prim, largs, _) -> + let lams ppf largs = + List.iter (fun l -> fprintf ppf "@ %a" lam l) largs in + fprintf ppf "@[<2>(%a%a)@]" primitive prim lams largs + | Lswitch(larg, sw, _loc) -> + let switch ppf sw = + let spc = ref false in + List.iter + (fun (n, l) -> + if !spc then fprintf ppf "@ " else spc := true; + fprintf ppf "@[case int %i:@ %a@]" n lam l) + sw.sw_consts; + List.iter + (fun (n, l) -> + if !spc then fprintf ppf "@ " else spc := true; + fprintf ppf "@[case tag %i:@ %a@]" n lam l) + sw.sw_blocks ; + begin match sw.sw_failaction with + | None -> () + | Some l -> + if !spc then fprintf ppf "@ " else spc := true; + fprintf ppf "@[default:@ %a@]" lam l + end in + fprintf ppf + "@[<1>(%s %a@ @[%a@])@]" + (match sw.sw_failaction with None -> "switch*" | _ -> "switch") + lam larg switch sw + | Lstringswitch(arg, cases, default, _) -> + let switch ppf cases = + let spc = ref false in + List.iter + (fun (s, l) -> + if !spc then fprintf ppf "@ " else spc := true; + fprintf ppf "@[case \"%s\":@ %a@]" (String.escaped s) lam l) + cases; + begin match default with + | Some default -> + if !spc then fprintf ppf "@ " else spc := true; + fprintf ppf "@[default:@ %a@]" lam default + | None -> () + end in + fprintf ppf + "@[<1>(stringswitch %a@ @[%a@])@]" lam arg switch cases + | Lstaticraise (i, ls) -> + let lams ppf largs = + List.iter (fun l -> fprintf ppf "@ %a" lam l) largs in + fprintf ppf "@[<2>(exit@ %d%a)@]" i lams ls; + | Lstaticcatch(lbody, (i, vars), lhandler) -> + fprintf ppf "@[<2>(catch@ %a@;<1 -1>with (%d%a)@ %a)@]" + lam lbody i + (fun ppf vars -> match vars with + | [] -> () + | _ -> + List.iter + (fun x -> fprintf ppf " %a" Ident.print x) + vars) + vars + lam lhandler + | Ltrywith(lbody, param, lhandler) -> + fprintf ppf "@[<2>(try@ %a@;<1 -1>with %a@ %a)@]" + lam lbody Ident.print param lam lhandler + | Lifthenelse(lcond, lif, lelse) -> + fprintf ppf "@[<2>(if@ %a@ %a@ %a)@]" lam lcond lam lif lam lelse + | Lsequence(l1, l2) -> + fprintf ppf "@[<2>(seq@ %a@ %a)@]" lam l1 sequence l2 + | Lwhile(lcond, lbody) -> + fprintf ppf "@[<2>(while@ %a@ %a)@]" lam lcond lam lbody + | Lfor(param, lo, hi, dir, body) -> + fprintf ppf "@[<2>(for %a@ %a@ %s@ %a@ %a)@]" + Ident.print param lam lo + (match dir with Upto -> "to" | Downto -> "downto") + lam hi lam body + | Lassign(id, expr) -> + fprintf ppf "@[<2>(assign@ %a@ %a)@]" Ident.print id lam expr + | Lsend (name,obj, _) -> + fprintf ppf "@[<2>(send%s@ %a@ )@]" name lam obj + +and sequence ppf = function + | Lsequence(l1, l2) -> + fprintf ppf "%a@ %a" sequence l1 sequence l2 + | l -> + lam ppf l + +let structured_constant = struct_const + +let lambda = lam + + diff --git a/analysis/vendor/compiler-libs-406/std_exit.ml b/analysis/vendor/ml/printlambda.mli similarity index 80% rename from analysis/vendor/compiler-libs-406/std_exit.ml rename to analysis/vendor/ml/printlambda.mli index 1b97652da..d9d242079 100644 --- a/analysis/vendor/compiler-libs-406/std_exit.ml +++ b/analysis/vendor/ml/printlambda.mli @@ -13,6 +13,13 @@ (* *) (**************************************************************************) -(* Ensure that [at_exit] functions are called at the end of every program *) +open Lambda -let _ = do_at_exit() +open Format + +val structured_constant: formatter -> structured_constant -> unit +val lambda: formatter -> lambda -> unit + +val primitive: formatter -> primitive -> unit +val name_of_primitive : primitive -> string +val value_kind : value_kind -> string diff --git a/analysis/vendor/compiler-libs-406/printtyp.ml b/analysis/vendor/ml/printtyp.ml similarity index 95% rename from analysis/vendor/compiler-libs-406/printtyp.ml rename to analysis/vendor/ml/printtyp.ml index 21b18399c..1f6a5da34 100644 --- a/analysis/vendor/compiler-libs-406/printtyp.ml +++ b/analysis/vendor/ml/printtyp.ml @@ -467,7 +467,7 @@ let check_name_of_type t = ignore(name_of_type new_name t) let remove_names tyl = let tyl = List.map repr tyl in - names := List.filter (fun (ty,_) -> not (List.memq ty tyl)) !names + names := Ext_list.filter !names (fun (ty,_) -> not (List.memq ty tyl)) let visited_objects = ref ([] : type_expr list) let aliased = ref ([] : type_expr list) @@ -574,7 +574,7 @@ let reset_and_mark_loops_list tyl = reset (); List.iter mark_loops tyl (* Disabled in classic mode when printing an unification error *) -let print_labels = ref true + let rec tree_of_typexp sch ty = let ty = repr ty in @@ -595,7 +595,7 @@ let rec tree_of_typexp sch ty = | Tarrow(l, ty1, ty2, _) -> let pr_arrow l ty1 ty2 = let lab = - if !print_labels || is_optional l then string_of_label l else "" + string_of_label l in let t1 = if is_optional l then @@ -618,16 +618,15 @@ let rec tree_of_typexp sch ty = let row = row_repr row in let fields = if row.row_closed then - List.filter (fun (_, f) -> row_field_repr f <> Rabsent) - row.row_fields + Ext_list.filter row.row_fields (fun (_, f) -> row_field_repr f <> Rabsent) else row.row_fields in let present = - List.filter + Ext_list.filter fields (fun (_, f) -> match row_field_repr f with | Rpresent _ -> true | _ -> false) - fields in + in let all_present = List.length present = List.length fields in begin match row.row_name with | Some(p, tyl) when namable_row row -> @@ -684,7 +683,7 @@ let rec tree_of_typexp sch ty = List.map (fun li -> String.concat "." (Longident.flatten li)) n in Otyp_module (Path.name p, n, tree_of_typlist sch tyl) in - if List.memq px !delayed then delayed := List.filter ((!=) px) !delayed; + if List.memq px !delayed then delayed := Ext_list.filter !delayed ((!=) px) ; if is_aliased px && aliasable ty then begin check_name_of_type px; Otyp_alias (pr_typ (), name_of_type new_name px) end @@ -906,7 +905,8 @@ let rec tree_of_type_decl id decl = otype_private = priv; otype_immediate = immediate; otype_unboxed = decl.type_unboxed.unboxed; - otype_cstrs = constraints } + otype_cstrs = constraints ; + } and tree_of_constructor_arguments = function | Cstr_tuple l -> tree_of_typlist false l @@ -936,7 +936,7 @@ let tree_of_type_declaration id decl rs = Osig_type (tree_of_type_decl id decl, tree_of_rec rs) let type_declaration id ppf decl = - !Oprint.out_sig_item ppf (tree_of_type_declaration id decl Trec_first) + !Oprint.out_sig_item ppf (tree_of_type_declaration id decl Trec_not) let constructor_arguments ppf a = let tys = tree_of_constructor_arguments a in @@ -1100,7 +1100,7 @@ let rec tree_of_class_type sch params = Octy_signature (self_ty, List.rev csil) | Cty_arrow (l, ty, cty) -> let lab = - if !print_labels || is_optional l then string_of_label l else "" + string_of_label l in let ty = if is_optional l then @@ -1191,8 +1191,6 @@ let wrap_env fenv ftree arg = let filter_rem_sig item rem = match item, rem with - | Sig_class _, ctydecl :: tydecl1 :: tydecl2 :: rem -> - ([ctydecl; tydecl1; tydecl2], rem) | Sig_class_type _, tydecl1 :: tydecl2 :: rem -> ([tydecl1; tydecl2], rem) | _ -> @@ -1276,8 +1274,8 @@ and trees_of_sigitem = function [tree_of_module id md.md_type rs ~ellipsis] | Sig_modtype(id, decl) -> [tree_of_modtype_declaration id decl] - | Sig_class(id, decl, rs) -> - [tree_of_class_declaration id decl rs] + | Sig_class() -> + [] | Sig_class_type(id, decl, rs) -> [tree_of_cltype_declaration id decl rs] @@ -1472,10 +1470,10 @@ let explanation unif t3 t4 ppf = fprintf ppf "@,Types for method %s are incompatible" l | (Tnil|Tconstr _), Tfield (l, _, _, _) -> fprintf ppf - "@,@[The first object type has no method %s@]" l + "@,@[The first object type has no field %s@]" l | Tfield (l, _, _, _), (Tnil|Tconstr _) -> fprintf ppf - "@,@[The second object type has no method %s@]" l + "@,@[The second object type has no field %s@]" l | Tnil, Tconstr _ | Tconstr _, Tnil -> fprintf ppf "@,@[The %s object type has an abstract row, it cannot be closed@]" @@ -1555,7 +1553,6 @@ let unification_error env unif tr txt1 ppf txt2 = let tr = filter_trace (mis = None) tr in let t1, t1' = may_prepare_expansion (tr = []) t1 and t2, t2' = may_prepare_expansion (tr = []) t2 in - print_labels := not !Clflags.classic; let tr = List.map prepare_expansion tr in fprintf ppf "@[\ @@ -1572,9 +1569,7 @@ let unification_error env unif tr txt1 ppf txt2 = warn_on_missing_def env ppf t1; warn_on_missing_def env ppf t2 end; - print_labels := true with exn -> - print_labels := true; raise exn let report_unification_error ppf env ?(unif=true) @@ -1582,17 +1577,88 @@ let report_unification_error ppf env ?(unif=true) wrap_printing_env env (fun () -> unification_error env unif tr txt1 ppf txt2) ;; + +let super_type_expansion ~tag t ppf t' = + let tag = Format.String_tag tag in + if same_path t t' then begin + Format.pp_open_stag ppf tag; + type_expr ppf t; + Format.pp_close_stag ppf (); + end else begin + let t' = if proxy t == proxy t' then unalias t' else t' in + fprintf ppf "@[<2>"; + Format.pp_open_stag ppf tag; + fprintf ppf "%a" type_expr t; + Format.pp_close_stag ppf (); + fprintf ppf "@ @{(defined as@}@ "; + Format.pp_open_stag ppf tag; + fprintf ppf "%a" type_expr t'; + Format.pp_close_stag ppf (); + fprintf ppf "@{)@}"; + fprintf ppf "@]"; + end + +let super_trace ppf = + let rec super_trace first_report ppf = function + | (t1, t1') :: (t2, t2') :: rem -> + fprintf ppf + "@,@,@["; + if first_report then + fprintf ppf "The incompatible parts:@," + else begin + fprintf ppf "Further expanded:@," + end; + fprintf ppf + "@[%a@ vs@ %a@]%a" + (super_type_expansion ~tag:"error" t1) t1' + (super_type_expansion ~tag:"info" t2) t2' + (super_trace false) rem; + fprintf ppf "@]" + | _ -> () + in super_trace true ppf + +let super_unification_error unif tr txt1 ppf txt2 = begin + reset (); + trace_same_names tr; + let tr = List.map (fun (t, t') -> (t, hide_variant_name t')) tr in + let mis = mismatch tr in + match tr with + | [] | _ :: [] -> assert false + | t1 :: t2 :: tr -> + try + let tr = filter_trace (mis = None) tr in + let t1, t1' = may_prepare_expansion (tr = []) t1 + and t2, t2' = may_prepare_expansion (tr = []) t2 in + let tr = List.map prepare_expansion tr in + fprintf ppf + "@[\ + @[%t@ %a@]@,\ + @[%t@ %a@]\ + %a\ + %t\ + @]" + txt1 (super_type_expansion ~tag:"error" t1) t1' + txt2 (super_type_expansion ~tag:"info" t2) t2' + super_trace tr + (explanation unif mis); + with exn -> + raise exn +end + +let super_report_unification_error ppf env ?(unif=true) + tr txt1 txt2 = + wrap_printing_env env (fun () -> super_unification_error unif tr txt1 ppf txt2) +;; + + let trace fst keep_last txt ppf tr = - print_labels := not !Clflags.classic; trace_same_names tr; try match tr with t1 :: t2 :: tr' -> if fst then trace fst txt ppf (t1 :: t2 :: filter_trace keep_last tr') else trace fst txt ppf (filter_trace keep_last tr); - print_labels := true | _ -> () with exn -> - print_labels := true; raise exn let report_subtyping_error ppf env tr1 txt1 tr2 = diff --git a/analysis/vendor/compiler-libs-406/printtyp.mli b/analysis/vendor/ml/printtyp.mli similarity index 96% rename from analysis/vendor/compiler-libs-406/printtyp.mli rename to analysis/vendor/ml/printtyp.mli index 8fd027ec6..6a3be2eb2 100644 --- a/analysis/vendor/compiler-libs-406/printtyp.mli +++ b/analysis/vendor/ml/printtyp.mli @@ -78,6 +78,14 @@ val report_unification_error: formatter -> Env.t -> ?unif:bool -> (type_expr * type_expr) list -> (formatter -> unit) -> (formatter -> unit) -> unit + + +val super_report_unification_error: + formatter -> Env.t -> ?unif:bool -> (type_expr * type_expr) list -> + (formatter -> unit) -> (formatter -> unit) -> + unit + + val report_subtyping_error: formatter -> Env.t -> (type_expr * type_expr) list -> string -> (type_expr * type_expr) list -> unit diff --git a/analysis/vendor/ml/printtyped.ml b/analysis/vendor/ml/printtyped.ml new file mode 100644 index 000000000..f6243f6c6 --- /dev/null +++ b/analysis/vendor/ml/printtyped.ml @@ -0,0 +1,786 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Fabrice Le Fessant, INRIA Saclay *) +(* *) +(* Copyright 1999 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +open Asttypes;; +open Format;; +open Lexing;; +open Location;; +open Typedtree;; + +let fmt_position f l = + if l.pos_lnum = -1 + then fprintf f "%s[%d]" l.pos_fname l.pos_cnum + else fprintf f "%s[%d,%d+%d]" l.pos_fname l.pos_lnum l.pos_bol + (l.pos_cnum - l.pos_bol) +;; + +let fmt_location f loc = + if !Clflags.dump_location then ( + fprintf f "(%a..%a)" fmt_position loc.loc_start fmt_position loc.loc_end; + if loc.loc_ghost then fprintf f " ghost"; + ) +;; + +let rec fmt_longident_aux f x = + match x with + | Longident.Lident (s) -> fprintf f "%s" s; + | Longident.Ldot (y, s) -> fprintf f "%a.%s" fmt_longident_aux y s; + | Longident.Lapply (y, z) -> + fprintf f "%a(%a)" fmt_longident_aux y fmt_longident_aux z; +;; + +let fmt_longident f x = fprintf f "\"%a\"" fmt_longident_aux x.txt;; + +let fmt_ident = Ident.print + +let rec fmt_path_aux f x = + match x with + | Path.Pident (s) -> fprintf f "%a" fmt_ident s; + | Path.Pdot (y, s, _pos) -> fprintf f "%a.%s" fmt_path_aux y s; + | Path.Papply (y, z) -> + fprintf f "%a(%a)" fmt_path_aux y fmt_path_aux z; +;; + +let fmt_path f x = fprintf f "\"%a\"" fmt_path_aux x;; + +let fmt_constant f x = + match x with + | Const_int (i) -> fprintf f "Const_int %d" i; + | Const_char (c) -> fprintf f "Const_char %02x" c; + | Const_string (s, None) -> fprintf f "Const_string(%S,None)" s; + | Const_string (s, Some delim) -> + fprintf f "Const_string (%S,Some %S)" s delim; + | Const_float (s) -> fprintf f "Const_float %s" s; + | Const_int32 (i) -> fprintf f "Const_int32 %ld" i; + | Const_int64 (i) -> fprintf f "Const_int64 %Ld" i; + | Const_nativeint (i) -> fprintf f "Const_nativeint %nd" i; +;; + +let fmt_mutable_flag f x = + match x with + | Immutable -> fprintf f "Immutable"; + | Mutable -> fprintf f "Mutable"; +;; + +let fmt_virtual_flag f x = + match x with + | Virtual -> fprintf f "Virtual"; + | Concrete -> fprintf f "Concrete"; +;; + +let fmt_override_flag f x = + match x with + | Override -> fprintf f "Override"; + | Fresh -> fprintf f "Fresh"; +;; + +let fmt_closed_flag f x = + match x with + | Closed -> fprintf f "Closed" + | Open -> fprintf f "Open" + +let fmt_rec_flag f x = + match x with + | Nonrecursive -> fprintf f "Nonrec"; + | Recursive -> fprintf f "Rec"; +;; + +let fmt_direction_flag f x = + match x with + | Upto -> fprintf f "Up"; + | Downto -> fprintf f "Down"; +;; + +let fmt_private_flag f x = + match x with + | Public -> fprintf f "Public"; + | Private -> fprintf f "Private"; +;; + +let line i f s (*...*) = + fprintf f "%s" (String.make (2*i) ' '); + fprintf f s (*...*) +;; + +let list i f ppf l = + match l with + | [] -> line i ppf "[]\n"; + | _ :: _ -> + line i ppf "[\n"; + List.iter (f (i+1) ppf) l; + line i ppf "]\n"; +;; + +let array i f ppf a = + if Array.length a = 0 then + line i ppf "[]\n" + else begin + line i ppf "[\n"; + Array.iter (f (i+1) ppf) a; + line i ppf "]\n" + end +;; + +let option i f ppf x = + match x with + | None -> line i ppf "None\n"; + | Some x -> + line i ppf "Some\n"; + f (i+1) ppf x; +;; + +let longident i ppf li = line i ppf "%a\n" fmt_longident li;; +let string i ppf s = line i ppf "\"%s\"\n" s;; +let arg_label i ppf = function + | Nolabel -> line i ppf "Nolabel\n" + | Optional s -> line i ppf "Optional \"%s\"\n" s + | Labelled s -> line i ppf "Labelled \"%s\"\n" s +;; + +let record_representation i ppf = let open Types in function + | Record_regular -> line i ppf "Record_regular\n" + | Record_float_unused -> assert false + | Record_optional_labels lbls -> + line i ppf "Record_optional_labels %s\n" (lbls |> String.concat ", ") + | Record_unboxed b -> line i ppf "Record_unboxed %b\n" b + | Record_inlined {tag = i} -> line i ppf "Record_inlined %d\n" i + | Record_extension -> line i ppf "Record_extension\n" + +let attributes i ppf l = + let i = i + 1 in + List.iter + (fun (s, arg) -> + line i ppf "attribute \"%s\"\n" s.txt; + Printast.payload (i + 1) ppf arg; + ) + l + +let rec core_type i ppf x = + line i ppf "core_type %a\n" fmt_location x.ctyp_loc; + attributes i ppf x.ctyp_attributes; + let i = i+1 in + match x.ctyp_desc with + | Ttyp_any -> line i ppf "Ttyp_any\n"; + | Ttyp_var (s) -> line i ppf "Ttyp_var %s\n" s; + | Ttyp_arrow (l, ct1, ct2) -> + line i ppf "Ttyp_arrow\n"; + arg_label i ppf l; + core_type i ppf ct1; + core_type i ppf ct2; + | Ttyp_tuple l -> + line i ppf "Ttyp_tuple\n"; + list i core_type ppf l; + | Ttyp_constr (li, _, l) -> + line i ppf "Ttyp_constr %a\n" fmt_path li; + list i core_type ppf l; + | Ttyp_variant (l, closed, low) -> + line i ppf "Ttyp_variant closed=%a\n" fmt_closed_flag closed; + list i label_x_bool_x_core_type_list ppf l; + option i (fun i -> list i string) ppf low + | Ttyp_object (l, c) -> + line i ppf "Ttyp_object %a\n" fmt_closed_flag c; + let i = i + 1 in + List.iter (function + | OTtag (s, attrs, t) -> + line i ppf "method %s\n" s.txt; + attributes i ppf attrs; + core_type (i + 1) ppf t + | OTinherit ct -> + line i ppf "OTinherit\n"; + core_type (i + 1) ppf ct + ) l + | Ttyp_class (li, _, l) -> + line i ppf "Ttyp_class %a\n" fmt_path li; + list i core_type ppf l; + | Ttyp_alias (ct, s) -> + line i ppf "Ttyp_alias \"%s\"\n" s; + core_type i ppf ct; + | Ttyp_poly (sl, ct) -> + line i ppf "Ttyp_poly%a\n" + (fun ppf -> List.iter (fun x -> fprintf ppf " '%s" x)) sl; + core_type i ppf ct; + | Ttyp_package { pack_path = s; pack_fields = l } -> + line i ppf "Ttyp_package %a\n" fmt_path s; + list i package_with ppf l; + +and package_with i ppf (s, t) = + line i ppf "with type %a\n" fmt_longident s; + core_type i ppf t + +and pattern i ppf x = + line i ppf "pattern %a\n" fmt_location x.pat_loc; + attributes i ppf x.pat_attributes; + let i = i+1 in + match x.pat_extra with + | (Tpat_unpack, _, attrs) :: rem -> + line i ppf "Tpat_unpack\n"; + attributes i ppf attrs; + pattern i ppf { x with pat_extra = rem } + | (Tpat_constraint cty, _, attrs) :: rem -> + line i ppf "Tpat_constraint\n"; + attributes i ppf attrs; + core_type i ppf cty; + pattern i ppf { x with pat_extra = rem } + | (Tpat_type (id, _), _, attrs) :: rem -> + line i ppf "Tpat_type %a\n" fmt_path id; + attributes i ppf attrs; + pattern i ppf { x with pat_extra = rem } + | (Tpat_open (id,_,_), _, attrs)::rem -> + line i ppf "Tpat_open \"%a\"\n" fmt_path id; + attributes i ppf attrs; + pattern i ppf { x with pat_extra = rem } + | [] -> + match x.pat_desc with + | Tpat_any -> line i ppf "Tpat_any\n"; + | Tpat_var (s,_) -> line i ppf "Tpat_var \"%a\"\n" fmt_ident s; + | Tpat_alias (p, s,_) -> + line i ppf "Tpat_alias \"%a\"\n" fmt_ident s; + pattern i ppf p; + | Tpat_constant (c) -> line i ppf "Tpat_constant %a\n" fmt_constant c; + | Tpat_tuple (l) -> + line i ppf "Tpat_tuple\n"; + list i pattern ppf l; + | Tpat_construct (li, _, po) -> + line i ppf "Tpat_construct %a\n" fmt_longident li; + list i pattern ppf po; + | Tpat_variant (l, po, _) -> + line i ppf "Tpat_variant \"%s\"\n" l; + option i pattern ppf po; + | Tpat_record (l, _c) -> + line i ppf "Tpat_record\n"; + list i longident_x_pattern ppf l; + | Tpat_array (l) -> + line i ppf "Tpat_array\n"; + list i pattern ppf l; + | Tpat_or (p1, p2, _) -> + line i ppf "Tpat_or\n"; + pattern i ppf p1; + pattern i ppf p2; + | Tpat_lazy p -> + line i ppf "Tpat_lazy\n"; + pattern i ppf p; + +and expression_extra i ppf x attrs = + match x with + | Texp_constraint ct -> + line i ppf "Texp_constraint\n"; + attributes i ppf attrs; + core_type i ppf ct; + | Texp_coerce (cto1, cto2) -> + line i ppf "Texp_coerce\n"; + attributes i ppf attrs; + option i core_type ppf cto1; + core_type i ppf cto2; + | Texp_open (ovf, m, _, _) -> + line i ppf "Texp_open %a \"%a\"\n" fmt_override_flag ovf fmt_path m; + attributes i ppf attrs; + | Texp_poly cto -> + line i ppf "Texp_poly\n"; + attributes i ppf attrs; + option i core_type ppf cto; + | Texp_newtype s -> + line i ppf "Texp_newtype \"%s\"\n" s; + attributes i ppf attrs; + +and expression i ppf x = + line i ppf "expression %a\n" fmt_location x.exp_loc; + attributes i ppf x.exp_attributes; + let i = + List.fold_left (fun i (extra,_,attrs) -> + expression_extra i ppf extra attrs; i+1) + (i+1) x.exp_extra + in + match x.exp_desc with + | Texp_ident (li,_,_) -> line i ppf "Texp_ident %a\n" fmt_path li; + | Texp_instvar () -> assert false + | Texp_constant (c) -> line i ppf "Texp_constant %a\n" fmt_constant c; + | Texp_let (rf, l, e) -> + line i ppf "Texp_let %a\n" fmt_rec_flag rf; + list i value_binding ppf l; + expression i ppf e; + | Texp_function { arg_label = p; param ; cases; partial = _; } -> + line i ppf "Texp_function\n"; + line i ppf "%a" Ident.print param; + arg_label i ppf p; + list i case ppf cases; + | Texp_apply (e, l) -> + line i ppf "Texp_apply\n"; + expression i ppf e; + list i label_x_expression ppf l; + | Texp_match (e, l1, l2, _partial) -> + line i ppf "Texp_match\n"; + expression i ppf e; + list i case ppf l1; + list i case ppf l2; + | Texp_try (e, l) -> + line i ppf "Texp_try\n"; + expression i ppf e; + list i case ppf l; + | Texp_tuple (l) -> + line i ppf "Texp_tuple\n"; + list i expression ppf l; + | Texp_construct (li, _, eo) -> + line i ppf "Texp_construct %a\n" fmt_longident li; + list i expression ppf eo; + | Texp_variant (l, eo) -> + line i ppf "Texp_variant \"%s\"\n" l; + option i expression ppf eo; + | Texp_record { fields; representation; extended_expression } -> + line i ppf "Texp_record\n"; + let i = i+1 in + line i ppf "fields =\n"; + array (i+1) record_field ppf fields; + line i ppf "representation =\n"; + record_representation (i+1) ppf representation; + line i ppf "extended_expression =\n"; + option (i+1) expression ppf extended_expression; + | Texp_field (e, li, _) -> + line i ppf "Texp_field\n"; + expression i ppf e; + longident i ppf li; + | Texp_setfield (e1, li, _, e2) -> + line i ppf "Texp_setfield\n"; + expression i ppf e1; + longident i ppf li; + expression i ppf e2; + | Texp_array (l) -> + line i ppf "Texp_array\n"; + list i expression ppf l; + | Texp_ifthenelse (e1, e2, eo) -> + line i ppf "Texp_ifthenelse\n"; + expression i ppf e1; + expression i ppf e2; + option i expression ppf eo; + | Texp_sequence (e1, e2) -> + line i ppf "Texp_sequence\n"; + expression i ppf e1; + expression i ppf e2; + | Texp_while (e1, e2) -> + line i ppf "Texp_while\n"; + expression i ppf e1; + expression i ppf e2; + | Texp_for (s, _, e1, e2, df, e3) -> + line i ppf "Texp_for \"%a\" %a\n" fmt_ident s fmt_direction_flag df; + expression i ppf e1; + expression i ppf e2; + expression i ppf e3; + | Texp_send (e, Tmeth_name s, eo) -> + line i ppf "Texp_send \"%s\"\n" s; + expression i ppf e; + option i expression ppf eo + | Texp_new _ + | Texp_setinstvar _ + | Texp_override _ -> + () + | Texp_letmodule (s, _, me, e) -> + line i ppf "Texp_letmodule \"%a\"\n" fmt_ident s; + module_expr i ppf me; + expression i ppf e; + | Texp_letexception (cd, e) -> + line i ppf "Texp_letexception\n"; + extension_constructor i ppf cd; + expression i ppf e; + | Texp_assert (e) -> + line i ppf "Texp_assert"; + expression i ppf e; + | Texp_lazy (e) -> + line i ppf "Texp_lazy"; + expression i ppf e; + | Texp_object () -> + () + | Texp_pack me -> + line i ppf "Texp_pack"; + module_expr i ppf me + | Texp_unreachable -> + line i ppf "Texp_unreachable" + | Texp_extension_constructor (li, _) -> + line i ppf "Texp_extension_constructor %a" fmt_longident li + +and value_description i ppf x = + line i ppf "value_description %a %a\n" fmt_ident x.val_id fmt_location + x.val_loc; + attributes i ppf x.val_attributes; + core_type (i+1) ppf x.val_desc; + list (i+1) string ppf x.val_prim; + +and type_parameter i ppf (x, _variance) = core_type i ppf x + +and type_declaration i ppf x = + line i ppf "type_declaration %a %a\n" fmt_ident x.typ_id fmt_location + x.typ_loc; + attributes i ppf x.typ_attributes; + let i = i+1 in + line i ppf "ptype_params =\n"; + list (i+1) type_parameter ppf x.typ_params; + line i ppf "ptype_cstrs =\n"; + list (i+1) core_type_x_core_type_x_location ppf x.typ_cstrs; + line i ppf "ptype_kind =\n"; + type_kind (i+1) ppf x.typ_kind; + line i ppf "ptype_private = %a\n" fmt_private_flag x.typ_private; + line i ppf "ptype_manifest =\n"; + option (i+1) core_type ppf x.typ_manifest; + +and type_kind i ppf x = + match x with + | Ttype_abstract -> + line i ppf "Ttype_abstract\n" + | Ttype_variant l -> + line i ppf "Ttype_variant\n"; + list (i+1) constructor_decl ppf l; + | Ttype_record l -> + line i ppf "Ttype_record\n"; + list (i+1) label_decl ppf l; + | Ttype_open -> + line i ppf "Ttype_open\n" + +and type_extension i ppf x = + line i ppf "type_extension\n"; + attributes i ppf x.tyext_attributes; + let i = i+1 in + line i ppf "ptyext_path = %a\n" fmt_path x.tyext_path; + line i ppf "ptyext_params =\n"; + list (i+1) type_parameter ppf x.tyext_params; + line i ppf "ptyext_constructors =\n"; + list (i+1) extension_constructor ppf x.tyext_constructors; + line i ppf "ptyext_private = %a\n" fmt_private_flag x.tyext_private; + +and extension_constructor i ppf x = + line i ppf "extension_constructor %a\n" fmt_location x.ext_loc; + attributes i ppf x.ext_attributes; + let i = i + 1 in + line i ppf "pext_name = \"%a\"\n" fmt_ident x.ext_id; + line i ppf "pext_kind =\n"; + extension_constructor_kind (i + 1) ppf x.ext_kind; + +and extension_constructor_kind i ppf x = + match x with + Text_decl(a, r) -> + line i ppf "Text_decl\n"; + constructor_arguments (i+1) ppf a; + option (i+1) core_type ppf r; + | Text_rebind(p, _) -> + line i ppf "Text_rebind\n"; + line (i+1) ppf "%a\n" fmt_path p; + +and class_type i ppf x = + line i ppf "class_type %a\n" fmt_location x.cltyp_loc; + attributes i ppf x.cltyp_attributes; + let i = i+1 in + match x.cltyp_desc with + | Tcty_constr (li, _, l) -> + line i ppf "Tcty_constr %a\n" fmt_path li; + list i core_type ppf l; + | Tcty_signature (cs) -> + line i ppf "Tcty_signature\n"; + class_signature i ppf cs; + | Tcty_arrow (l, co, cl) -> + line i ppf "Tcty_arrow\n"; + arg_label i ppf l; + core_type i ppf co; + class_type i ppf cl; + | Tcty_open (ovf, m, _, _, e) -> + line i ppf "Tcty_open %a \"%a\"\n" fmt_override_flag ovf fmt_path m; + class_type i ppf e + +and class_signature i ppf { csig_self = ct; csig_fields = l } = + line i ppf "class_signature\n"; + core_type (i+1) ppf ct; + list (i+1) class_type_field ppf l; + +and class_type_field i ppf x = + line i ppf "class_type_field %a\n" fmt_location x.ctf_loc; + let i = i+1 in + attributes i ppf x.ctf_attributes; + match x.ctf_desc with + | Tctf_inherit (ct) -> + line i ppf "Tctf_inherit\n"; + class_type i ppf ct; + | Tctf_val (s, mf, vf, ct) -> + line i ppf "Tctf_val \"%s\" %a %a\n" s fmt_mutable_flag mf + fmt_virtual_flag vf; + core_type (i+1) ppf ct; + | Tctf_method (s, pf, vf, ct) -> + line i ppf "Tctf_method \"%s\" %a %a\n" s fmt_private_flag pf + fmt_virtual_flag vf; + core_type (i+1) ppf ct; + | Tctf_constraint (ct1, ct2) -> + line i ppf "Tctf_constraint\n"; + core_type (i+1) ppf ct1; + core_type (i+1) ppf ct2; + | Tctf_attribute (s, arg) -> + line i ppf "Tctf_attribute \"%s\"\n" s.txt; + Printast.payload i ppf arg + + +and class_type_declaration i ppf x = + line i ppf "class_type_declaration %a\n" fmt_location x.ci_loc; + let i = i+1 in + line i ppf "pci_virt = %a\n" fmt_virtual_flag x.ci_virt; + line i ppf "pci_params =\n"; + list (i+1) type_parameter ppf x.ci_params; + line i ppf "pci_name = \"%s\"\n" x.ci_id_name.txt; + line i ppf "pci_expr =\n"; + class_type (i+1) ppf x.ci_expr; + + +and module_type i ppf x = + line i ppf "module_type %a\n" fmt_location x.mty_loc; + attributes i ppf x.mty_attributes; + let i = i+1 in + match x.mty_desc with + | Tmty_ident (li,_) -> line i ppf "Tmty_ident %a\n" fmt_path li; + | Tmty_alias (li,_) -> line i ppf "Tmty_alias %a\n" fmt_path li; + | Tmty_signature (s) -> + line i ppf "Tmty_signature\n"; + signature i ppf s; + | Tmty_functor (s, _, mt1, mt2) -> + line i ppf "Tmty_functor \"%a\"\n" fmt_ident s; + Misc.may (module_type i ppf) mt1; + module_type i ppf mt2; + | Tmty_with (mt, l) -> + line i ppf "Tmty_with\n"; + module_type i ppf mt; + list i longident_x_with_constraint ppf l; + | Tmty_typeof m -> + line i ppf "Tmty_typeof\n"; + module_expr i ppf m; + +and signature i ppf x = list i signature_item ppf x.sig_items + +and signature_item i ppf x = + line i ppf "signature_item %a\n" fmt_location x.sig_loc; + let i = i+1 in + match x.sig_desc with + | Tsig_value vd -> + line i ppf "Tsig_value\n"; + value_description i ppf vd; + | Tsig_type (rf, l) -> + line i ppf "Tsig_type %a\n" fmt_rec_flag rf; + list i type_declaration ppf l; + | Tsig_typext e -> + line i ppf "Tsig_typext\n"; + type_extension i ppf e; + | Tsig_exception ext -> + line i ppf "Tsig_exception\n"; + extension_constructor i ppf ext + | Tsig_module md -> + line i ppf "Tsig_module \"%a\"\n" fmt_ident md.md_id; + attributes i ppf md.md_attributes; + module_type i ppf md.md_type + | Tsig_recmodule decls -> + line i ppf "Tsig_recmodule\n"; + list i module_declaration ppf decls; + | Tsig_modtype x -> + line i ppf "Tsig_modtype \"%a\"\n" fmt_ident x.mtd_id; + attributes i ppf x.mtd_attributes; + modtype_declaration i ppf x.mtd_type + | Tsig_open od -> + line i ppf "Tsig_open %a %a\n" + fmt_override_flag od.open_override + fmt_path od.open_path; + attributes i ppf od.open_attributes + | Tsig_include incl -> + line i ppf "Tsig_include\n"; + attributes i ppf incl.incl_attributes; + module_type i ppf incl.incl_mod + | Tsig_class () -> + () + | Tsig_class_type (l) -> + line i ppf "Tsig_class_type\n"; + list i class_type_declaration ppf l; + | Tsig_attribute (s, arg) -> + line i ppf "Tsig_attribute \"%s\"\n" s.txt; + Printast.payload i ppf arg + +and module_declaration i ppf md = + line i ppf "%a" fmt_ident md.md_id; + attributes i ppf md.md_attributes; + module_type (i+1) ppf md.md_type; + +and module_binding i ppf x = + line i ppf "%a\n" fmt_ident x.mb_id; + attributes i ppf x.mb_attributes; + module_expr (i+1) ppf x.mb_expr + +and modtype_declaration i ppf = function + | None -> line i ppf "#abstract" + | Some mt -> module_type (i + 1) ppf mt + +and with_constraint i ppf x = + match x with + | Twith_type (td) -> + line i ppf "Twith_type\n"; + type_declaration (i+1) ppf td; + | Twith_typesubst (td) -> + line i ppf "Twith_typesubst\n"; + type_declaration (i+1) ppf td; + | Twith_module (li,_) -> line i ppf "Twith_module %a\n" fmt_path li; + | Twith_modsubst (li,_) -> line i ppf "Twith_modsubst %a\n" fmt_path li; + +and module_expr i ppf x = + line i ppf "module_expr %a\n" fmt_location x.mod_loc; + attributes i ppf x.mod_attributes; + let i = i+1 in + match x.mod_desc with + | Tmod_ident (li,_) -> line i ppf "Tmod_ident %a\n" fmt_path li; + | Tmod_structure (s) -> + line i ppf "Tmod_structure\n"; + structure i ppf s; + | Tmod_functor (s, _, mt, me) -> + line i ppf "Tmod_functor \"%a\"\n" fmt_ident s; + Misc.may (module_type i ppf) mt; + module_expr i ppf me; + | Tmod_apply (me1, me2, _) -> + line i ppf "Tmod_apply\n"; + module_expr i ppf me1; + module_expr i ppf me2; + | Tmod_constraint (me, _, Tmodtype_explicit mt, _) -> + line i ppf "Tmod_constraint\n"; + module_expr i ppf me; + module_type i ppf mt; + | Tmod_constraint (me, _, Tmodtype_implicit, _) -> module_expr i ppf me + | Tmod_unpack (e, _) -> + line i ppf "Tmod_unpack\n"; + expression i ppf e; + +and structure i ppf x = list i structure_item ppf x.str_items + +and structure_item i ppf x = + line i ppf "structure_item %a\n" fmt_location x.str_loc; + let i = i+1 in + match x.str_desc with + | Tstr_eval (e, attrs) -> + line i ppf "Tstr_eval\n"; + attributes i ppf attrs; + expression i ppf e; + | Tstr_value (rf, l) -> + line i ppf "Tstr_value %a\n" fmt_rec_flag rf; + list i value_binding ppf l; + | Tstr_primitive vd -> + line i ppf "Tstr_primitive\n"; + value_description i ppf vd; + | Tstr_type (rf, l) -> + line i ppf "Tstr_type %a\n" fmt_rec_flag rf; + list i type_declaration ppf l; + | Tstr_typext te -> + line i ppf "Tstr_typext\n"; + type_extension i ppf te + | Tstr_exception ext -> + line i ppf "Tstr_exception\n"; + extension_constructor i ppf ext; + | Tstr_module x -> + line i ppf "Tstr_module\n"; + module_binding i ppf x + | Tstr_recmodule bindings -> + line i ppf "Tstr_recmodule\n"; + list i module_binding ppf bindings + | Tstr_modtype x -> + line i ppf "Tstr_modtype \"%a\"\n" fmt_ident x.mtd_id; + attributes i ppf x.mtd_attributes; + modtype_declaration i ppf x.mtd_type + | Tstr_open od -> + line i ppf "Tstr_open %a %a\n" + fmt_override_flag od.open_override + fmt_path od.open_path; + attributes i ppf od.open_attributes + | Tstr_class () -> () + | Tstr_class_type (l) -> + line i ppf "Tstr_class_type\n"; + list i class_type_declaration ppf (List.map (fun (_, _, cl) -> cl) l); + | Tstr_include incl -> + line i ppf "Tstr_include"; + attributes i ppf incl.incl_attributes; + module_expr i ppf incl.incl_mod; + | Tstr_attribute (s, arg) -> + line i ppf "Tstr_attribute \"%s\"\n" s.txt; + Printast.payload i ppf arg + +and longident_x_with_constraint i ppf (li, _, wc) = + line i ppf "%a\n" fmt_path li; + with_constraint (i+1) ppf wc; + +and core_type_x_core_type_x_location i ppf (ct1, ct2, l) = + line i ppf " %a\n" fmt_location l; + core_type (i+1) ppf ct1; + core_type (i+1) ppf ct2; + +and constructor_decl i ppf {cd_id; cd_name = _; cd_args; cd_res; cd_loc; + cd_attributes} = + line i ppf "%a\n" fmt_location cd_loc; + line (i+1) ppf "%a\n" fmt_ident cd_id; + attributes i ppf cd_attributes; + constructor_arguments (i+1) ppf cd_args; + option (i+1) core_type ppf cd_res + +and constructor_arguments i ppf = function + | Cstr_tuple l -> list i core_type ppf l + | Cstr_record l -> list i label_decl ppf l + +and label_decl i ppf {ld_id; ld_name = _; ld_mutable; ld_type; ld_loc; + ld_attributes} = + line i ppf "%a\n" fmt_location ld_loc; + attributes i ppf ld_attributes; + line (i+1) ppf "%a\n" fmt_mutable_flag ld_mutable; + line (i+1) ppf "%a" fmt_ident ld_id; + core_type (i+1) ppf ld_type + +and longident_x_pattern i ppf (li, _, p) = + line i ppf "%a\n" fmt_longident li; + pattern (i+1) ppf p; + +and case i ppf {c_lhs; c_guard; c_rhs} = + line i ppf "\n"; + pattern (i+1) ppf c_lhs; + begin match c_guard with + | None -> () + | Some g -> line (i+1) ppf "\n"; expression (i + 2) ppf g + end; + expression (i+1) ppf c_rhs; + +and value_binding i ppf x = + line i ppf "\n"; + attributes (i+1) ppf x.vb_attributes; + pattern (i+1) ppf x.vb_pat; + expression (i+1) ppf x.vb_expr + + +and record_field i ppf = function + | _, Overridden (li, e) -> + line i ppf "%a\n" fmt_longident li; + expression (i+1) ppf e; + | _, Kept _ -> + line i ppf "" + +and label_x_expression i ppf (l, e) = + line i ppf "\n"; + arg_label (i+1) ppf l; + (match e with None -> () | Some e -> expression (i+1) ppf e) + +and label_x_bool_x_core_type_list i ppf x = + match x with + Ttag (l, attrs, b, ctl) -> + line i ppf "Ttag \"%s\" %s\n" l.txt (string_of_bool b); + attributes (i+1) ppf attrs; + list (i+1) core_type ppf ctl + | Tinherit (ct) -> + line i ppf "Tinherit\n"; + core_type (i+1) ppf ct +;; + +let interface ppf x = list 0 signature_item ppf x.sig_items;; + +let implementation ppf x = list 0 structure_item ppf x.str_items;; + +let implementation_with_coercion ppf (x, _) = implementation ppf x diff --git a/analysis/vendor/compiler-libs-406/stdLabels.ml b/analysis/vendor/ml/printtyped.mli similarity index 72% rename from analysis/vendor/compiler-libs-406/stdLabels.ml rename to analysis/vendor/ml/printtyped.mli index 664472b18..ded42bb32 100644 --- a/analysis/vendor/compiler-libs-406/stdLabels.ml +++ b/analysis/vendor/ml/printtyped.mli @@ -2,9 +2,9 @@ (* *) (* OCaml *) (* *) -(* Jacques Garrigue, Kyoto University RIMS *) +(* Damien Doligez, projet Para, INRIA Rocquencourt *) (* *) -(* Copyright 2001 Institut National de Recherche en Informatique et *) +(* Copyright 1999 Institut National de Recherche en Informatique et *) (* en Automatique. *) (* *) (* All rights reserved. This file is distributed under the terms of *) @@ -13,12 +13,11 @@ (* *) (**************************************************************************) -(* Module [StdLabels]: meta-module for labelled libraries *) +open Typedtree;; +open Format;; -module Array = ArrayLabels +val interface : formatter -> signature -> unit;; +val implementation : formatter -> structure -> unit;; -module List = ListLabels - -module String = StringLabels - -module Bytes = BytesLabels +val implementation_with_coercion : + formatter -> (structure * module_coercion) -> unit;; diff --git a/analysis/vendor/ml/rec_check.ml b/analysis/vendor/ml/rec_check.ml new file mode 100644 index 000000000..161afcdd5 --- /dev/null +++ b/analysis/vendor/ml/rec_check.ml @@ -0,0 +1,474 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +type error = Illegal_letrec_expr + +exception Error of Location.t * error + +module Rec_context = struct + type access = + | Dereferenced + (** [Dereferenced] indicates that the value (not just the address) of a + variable is accessed *) + | Guarded + (** [Guarded] indicates that the address of a variable is used in a + guarded context, i.e. under a constructor. A variable that is + dereferenced within a function body or lazy context is also considered + guarded. *) + | Unguarded + (** [Unguarded] indicates that the address of a variable is used in an + unguarded context, i.e. not under a constructor. *) + + (** [guard] represents guarded contexts such as [C -] and [{l = -}] *) + let guard : access -> access = function + | Dereferenced -> Dereferenced + | Guarded -> Guarded + | Unguarded -> Guarded + + (** [inspect] represents elimination contexts such as [match - with cases], + [e -] and [- e] *) + let inspect : access -> access = function + | Dereferenced -> Dereferenced + | Guarded -> Dereferenced + | Unguarded -> Dereferenced + + (** [delay] represents contexts that delay evaluation such as [fun p -> -] + or [lazy -] *) + let delay : access -> access = function + | Dereferenced -> Guarded + | Guarded -> Guarded + | Unguarded -> Guarded + + module Use : sig + type t + + val guard : t -> t + (** An expression appears in a guarded context *) + + val discard : t -> t + (** The address of a subexpression is not used, but may be bound *) + + val inspect : t -> t + (** The value of a subexpression is inspected with match, application, etc. *) + + val delay : t -> t + (** An expression appears under 'fun p ->' or 'lazy' *) + + val join : t -> t -> t + (** Combine the access information of two expressions *) + + val single : Ident.t -> access -> t + (** Combine the access information of two expressions *) + + val empty : t + (** No variables are accessed in an expression; it might be a + constant or a global identifier *) + + val unguarded : t -> Ident.t list + (** The list of identifiers that are used in an unguarded context *) + + val dependent : t -> Ident.t list + (** The list of all used identifiers *) + end = struct + module M = Map.Make (Ident) + + type t = access M.t + (** A "t" maps each rec-bound variable to an access status *) + + let map f tbl = M.map f tbl + + let guard t = map guard t + + let inspect t = map inspect t + + let delay t = map delay t + + let discard = guard + + let prec x y = + match (x, y) with + | Dereferenced, _ | _, Dereferenced -> Dereferenced + | Unguarded, _ | _, Unguarded -> Unguarded + | _ -> Guarded + + let join x y = + M.fold + (fun id v tbl -> + let v' = try M.find id tbl with Not_found -> Guarded in + M.add id (prec v v') tbl) + x y + + let single id access = M.add id access M.empty + + let empty = M.empty + + let list_matching p t = + let r = ref [] in + M.iter (fun id v -> if p v then r := id :: !r) t; + !r + + let unguarded = + list_matching (function Unguarded | Dereferenced -> true | _ -> false) + + let dependent = list_matching (function _ -> true) + end + + module Env = struct + (* A typing environment maps identifiers to types *) + type env = Use.t Ident.tbl + + let empty = Ident.empty + + let join x y = + let r = + Ident.fold_all + (fun id v tbl -> + let v' = try Ident.find_same id tbl with Not_found -> Use.empty in + Ident.add id (Use.join v v') tbl) + x y + in + r + end +end + +let rec pattern_variables : Typedtree.pattern -> Ident.t list = + fun pat -> + match pat.pat_desc with + | Tpat_any -> [] + | Tpat_var (id, _) -> [ id ] + | Tpat_alias (pat, id, _) -> id :: pattern_variables pat + | Tpat_constant _ -> [] + | Tpat_tuple pats -> List.concat (List.map pattern_variables pats) + | Tpat_construct (_, _, pats) -> List.concat (List.map pattern_variables pats) + | Tpat_variant (_, Some pat, _) -> pattern_variables pat + | Tpat_variant (_, None, _) -> [] + | Tpat_record (fields, _) -> + List.concat (List.map (fun (_, _, p) -> pattern_variables p) fields) + | Tpat_array pats -> List.concat (List.map pattern_variables pats) + | Tpat_or (l, r, _) -> pattern_variables l @ pattern_variables r + | Tpat_lazy p -> pattern_variables p + +open Rec_context +open Asttypes +open Typedtree + +let build_unguarded_env : Ident.t list -> Env.env = + fun idlist -> + List.fold_left + (fun env id -> Ident.add id (Use.single id Unguarded) env) + Env.empty idlist + +let is_ref : Types.value_description -> bool = function + | { + Types.val_kind = + Types.Val_prim { Primitive.prim_name = "%makemutable"; prim_arity = 1 }; + } -> + true + | _ -> false + +type sd = Static | Dynamic + +let rec classify_expression : Typedtree.expression -> sd = + fun exp -> + match exp.exp_desc with + | Texp_let (_, _, e) + | Texp_letmodule (_, _, _, e) + | Texp_sequence (_, e) + | Texp_letexception (_, e) -> + classify_expression e + | Texp_ident _ | Texp_for _ | Texp_constant _ | Texp_new _ | Texp_instvar _ + | Texp_tuple _ | Texp_array _ | Texp_construct _ | Texp_variant _ + | Texp_record _ | Texp_setfield _ | Texp_while _ | Texp_setinstvar _ + | Texp_pack _ | Texp_object _ | Texp_function _ | Texp_lazy _ + | Texp_unreachable | Texp_extension_constructor _ -> + Static + | Texp_apply ({ exp_desc = Texp_ident (_, _, vd) }, _) when is_ref vd -> + Static + | Texp_apply _ | Texp_match _ | Texp_ifthenelse _ | Texp_send _ | Texp_field _ + | Texp_assert _ | Texp_try _ | Texp_override _ -> + Dynamic + +let rec expression : Env.env -> Typedtree.expression -> Use.t = + fun env exp -> + match exp.exp_desc with + | Texp_ident (pth, _, _) -> path env pth + | Texp_let (rec_flag, bindings, body) -> + let env', ty = value_bindings rec_flag env bindings in + (* Here and in other binding constructs 'discard' is used in a + similar way to the way it's used in sequence: uses are + propagated, but unguarded access are not. *) + Use.join (Use.discard ty) (expression (Env.join env env') body) + | Texp_letmodule (x, _, m, e) -> + let ty = modexp env m in + Use.join (Use.discard ty) (expression (Ident.add x ty env) e) + | Texp_match (e, val_cases, exn_cases, _) -> + let t = expression env e in + let exn_case env { Typedtree.c_rhs } = expression env c_rhs in + let cs = list (case ~scrutinee:t) env val_cases + and es = list exn_case env exn_cases in + Use.(join cs es) + | Texp_for (_, _, e1, e2, _, e3) -> + Use.( + join + (join (inspect (expression env e1)) (inspect (expression env e2))) + (* The body is evaluated, but not used, and not available + for inclusion in another value *) + (discard (expression env e3))) + | Texp_constant _ -> Use.empty + | Texp_new _ -> assert false + | Texp_instvar _ -> Use.empty + | Texp_apply ({ exp_desc = Texp_ident (_, _, vd) }, [ (_, Some arg) ]) + when is_ref vd -> + Use.guard (expression env arg) + | Texp_apply (e, args) -> + let arg env (_, eo) = option expression env eo in + Use.(join (inspect (expression env e)) (inspect (list arg env args))) + | Texp_tuple exprs -> Use.guard (list expression env exprs) + | Texp_array exprs -> Use.guard (list expression env exprs) + | Texp_construct (_, desc, exprs) -> + let access_constructor = + match desc.cstr_tag with + | Cstr_extension (pth, _) -> Use.inspect (path env pth) + | _ -> Use.empty + in + let use = + match desc.cstr_tag with + | Cstr_unboxed -> fun x -> x + | Cstr_constant _ | Cstr_block _ | Cstr_extension _ -> Use.guard + in + Use.join access_constructor (use (list expression env exprs)) + | Texp_variant (_, eo) -> Use.guard (option expression env eo) + | Texp_record { fields = es; extended_expression = eo; representation = rep } + -> + let use = + match rep with + | Record_unboxed _ -> fun x -> x + | Record_float_unused -> assert false + | Record_optional_labels _ | Record_regular | Record_inlined _ | Record_extension + -> + Use.guard + in + let field env = function + | _, Kept _ -> Use.empty + | _, Overridden (_, e) -> expression env e + in + Use.join (use (array field env es)) (option expression env eo) + | Texp_ifthenelse (cond, ifso, ifnot) -> + Use.( + join + (inspect (expression env cond)) + (join (expression env ifso) (option expression env ifnot))) + | Texp_setfield (e1, _, _, e2) -> + Use.(join (inspect (expression env e1)) (inspect (expression env e2))) + | Texp_sequence (e1, e2) -> + Use.(join (discard (expression env e1)) (expression env e2)) + | Texp_while (e1, e2) -> + Use.(join (inspect (expression env e1)) (discard (expression env e2))) + | Texp_send (e1, _, eo) -> + Use.( + join (inspect (expression env e1)) (inspect (option expression env eo))) + | Texp_field (e, _, _) -> Use.(inspect (expression env e)) + | Texp_setinstvar () -> assert false + | Texp_letexception (_, e) -> expression env e + | Texp_assert e -> Use.inspect (expression env e) + | Texp_pack m -> modexp env m + | Texp_object () -> assert false + | Texp_try (e, cases) -> + (* This is more permissive than the old check. *) + let case env { Typedtree.c_rhs } = expression env c_rhs in + Use.join (expression env e) (list case env cases) + | Texp_override () -> assert false + | Texp_function { cases } -> + Use.delay (list (case ~scrutinee:Use.empty) env cases) + | Texp_lazy e -> ( + match Typeopt.classify_lazy_argument e with + | `Constant_or_function | `Identifier _ | `Float -> expression env e + | `Other -> Use.delay (expression env e)) + | Texp_unreachable -> Use.empty + | Texp_extension_constructor _ -> Use.empty + +and option : 'a. (Env.env -> 'a -> Use.t) -> Env.env -> 'a option -> Use.t = + fun f env -> Misc.Stdlib.Option.value_default (f env) ~default:Use.empty + +and list : 'a. (Env.env -> 'a -> Use.t) -> Env.env -> 'a list -> Use.t = + fun f env -> + List.fold_left (fun typ item -> Use.join (f env item) typ) Use.empty + +and array : 'a. (Env.env -> 'a -> Use.t) -> Env.env -> 'a array -> Use.t = + fun f env -> + Array.fold_left (fun typ item -> Use.join (f env item) typ) Use.empty + +and modexp : Env.env -> Typedtree.module_expr -> Use.t = + fun env m -> + match m.mod_desc with + | Tmod_ident (pth, _) -> path env pth + | Tmod_structure s -> structure env s + | Tmod_functor (_, _, _, e) -> Use.delay (modexp env e) + | Tmod_apply (f, p, _) -> + Use.(join (inspect (modexp env f)) (inspect (modexp env p))) + | Tmod_constraint (m, _, _, Tcoerce_none) -> modexp env m + | Tmod_constraint (m, _, _, _) -> Use.inspect (modexp env m) + | Tmod_unpack (e, _) -> expression env e + +and path : Env.env -> Path.t -> Use.t = + fun env pth -> + match pth with + | Path.Pident x -> ( try Ident.find_same x env with Not_found -> Use.empty) + | Path.Pdot (t, _, _) -> Use.inspect (path env t) + | Path.Papply (f, p) -> Use.(inspect (join (path env f) (path env p))) + +and structure : Env.env -> Typedtree.structure -> Use.t = + fun env s -> + let _, ty = + List.fold_left + (fun (env, ty) item -> + let env', ty' = structure_item env item in + (Env.join env env', Use.join ty ty')) + (env, Use.empty) s.str_items + in + Use.guard ty + +and structure_item : Env.env -> Typedtree.structure_item -> Env.env * Use.t = + fun env s -> + match s.str_desc with + | Tstr_eval (e, _) -> (Env.empty, expression env e) + | Tstr_value (rec_flag, valbinds) -> value_bindings rec_flag env valbinds + | Tstr_module { mb_id; mb_expr } -> + let ty = modexp env mb_expr in + (Ident.add mb_id ty Env.empty, ty) + | Tstr_recmodule mbs -> + let modbind env { mb_expr } = modexp env mb_expr in + (* Over-approximate: treat any access as a use *) + (Env.empty, Use.inspect (list modbind env mbs)) + | Tstr_primitive _ -> (Env.empty, Use.empty) + | Tstr_type _ -> (Env.empty, Use.empty) + | Tstr_typext _ -> (Env.empty, Use.empty) + | Tstr_exception _ -> (Env.empty, Use.empty) + | Tstr_modtype _ -> (Env.empty, Use.empty) + | Tstr_open _ -> (Env.empty, Use.empty) + | Tstr_class () -> (Env.empty, Use.empty) + | Tstr_class_type _ -> (Env.empty, Use.empty) + | Tstr_include inc -> + (* This is a kind of projection. There's no need to add + anything to the environment because everything is used in + the type component already *) + (Env.empty, Use.inspect (modexp env inc.incl_mod)) + | Tstr_attribute _ -> (Env.empty, Use.empty) + +and case : Env.env -> Typedtree.case -> scrutinee:Use.t -> Use.t = + fun env { Typedtree.c_lhs; c_guard; c_rhs } ~scrutinee:ty -> + let ty = + if is_destructuring_pattern c_lhs then Use.inspect ty else Use.discard ty + (* as in 'let' *) + in + let vars = pattern_variables c_lhs in + let env = List.fold_left (fun env id -> Ident.add id ty env) env vars in + Use.( + join ty + (join (expression env c_rhs) (inspect (option expression env c_guard)))) + +and value_bindings : + rec_flag -> Env.env -> Typedtree.value_binding list -> Env.env * Use.t = + fun rec_flag env bindings -> + match rec_flag with + | Recursive -> + (* Approximation: + let rec y = + let rec x1 = e1 + and x2 = e2 + in e + treated as + let rec y = + let rec x = (e1, e2)[x1:=fst x, x2:=snd x] in + e[x1:=fst x, x2:=snd x] + Further, use the fact that x1,x2 cannot occur unguarded in e1, e2 + to avoid recursive trickiness. + *) + let ids, ty = + List.fold_left + (fun (pats, tys) { vb_pat = p; vb_expr = e } -> + (pattern_variables p @ pats, Use.join (expression env e) tys)) + ([], Use.empty) bindings + in + ( List.fold_left + (fun (env : Env.env) (id : Ident.t) -> Ident.add id ty env) + Env.empty ids, + ty ) + | Nonrecursive -> + List.fold_left + (fun (env2, ty) binding -> + let env', ty' = value_binding env binding in + (Env.join env2 env', Use.join ty ty')) + (Env.empty, Use.empty) bindings + +and value_binding : Env.env -> Typedtree.value_binding -> Env.env * Use.t = + (* NB: returns new environment only *) + fun env { vb_pat; vb_expr } -> + let vars = pattern_variables vb_pat in + let ty = expression env vb_expr in + let ty = if is_destructuring_pattern vb_pat then Use.inspect ty else ty in + (List.fold_left (fun env id -> Ident.add id ty env) Env.empty vars, ty) + +and is_destructuring_pattern : Typedtree.pattern -> bool = + fun pat -> + match pat.pat_desc with + | Tpat_any -> false + | Tpat_var (_, _) -> false + | Tpat_alias (pat, _, _) -> is_destructuring_pattern pat + | Tpat_constant _ -> true + | Tpat_tuple _ -> true + | Tpat_construct (_, _, _) -> true + | Tpat_variant _ -> true + | Tpat_record (_, _) -> true + | Tpat_array _ -> true + | Tpat_or (l, r, _) -> + is_destructuring_pattern l || is_destructuring_pattern r + | Tpat_lazy _ -> true + +let check_recursive_expression idlist expr = + let ty = expression (build_unguarded_env idlist) expr in + match (Use.unguarded ty, Use.dependent ty, classify_expression expr) with + | _ :: _, _, _ (* The expression inspects rec-bound variables *) + | _, _ :: _, Dynamic -> + (* The expression depends on rec-bound variables + and its size is unknown *) + raise (Error (expr.exp_loc, Illegal_letrec_expr)) + | [], _, Static (* The expression has known size *) | [], [], Dynamic -> + (* The expression has unknown size, + but does not depend on rec-bound variables *) + () + +let check_recursive_bindings valbinds = + let ids = + List.concat (List.map (fun b -> pattern_variables b.vb_pat) valbinds) + in + Ext_list.iter valbinds (fun { vb_expr } -> + match vb_expr.exp_desc with + | Texp_record + { fields = [| (_, Overridden (_, { exp_desc = Texp_function _ })) |] } + | Texp_function _ -> + () + (*TODO: add uncurried function too*) + | _ -> check_recursive_expression ids vb_expr) + +let report_error ppf = function + | Illegal_letrec_expr -> + Format.fprintf ppf + "This kind of expression is not allowed as right-hand side of `let rec'" + +let () = + Location.register_error_of_exn (function + | Error (loc, err) -> Some (Location.error_of_printer loc report_error err) + | _ -> None) diff --git a/analysis/vendor/ml/rec_check.mli b/analysis/vendor/ml/rec_check.mli new file mode 100644 index 000000000..f37e89145 --- /dev/null +++ b/analysis/vendor/ml/rec_check.mli @@ -0,0 +1,4 @@ + + + +val check_recursive_bindings : Typedtree.value_binding list -> unit diff --git a/analysis/vendor/ml/rescript_cpp.ml b/analysis/vendor/ml/rescript_cpp.ml new file mode 100644 index 000000000..71938df29 --- /dev/null +++ b/analysis/vendor/ml/rescript_cpp.ml @@ -0,0 +1,572 @@ +(* Copyright (C) 2021- Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +type directive_type = + | Dir_type_bool + | Dir_type_float + | Dir_type_int + | Dir_type_string + | Dir_type_null + +type pp_error = + | Unterminated_paren_in_conditional + | Unterminated_if + | Unterminated_else + | Unexpected_token_in_conditional + | Expect_hash_then_in_conditional + | Illegal_semver of string + | Unexpected_directive + | Conditional_expr_expected_type of directive_type * directive_type + +exception Pp_error of pp_error * Location.t + +type directive_value = + | Dir_bool of bool + | Dir_float of float + | Dir_int of int + | Dir_string of string + | Dir_null + +let type_of_directive x = + match x with + | Dir_bool _ -> Dir_type_bool + | Dir_float _ -> Dir_type_float + | Dir_int _ -> Dir_type_int + | Dir_string _ -> Dir_type_string + | Dir_null -> Dir_type_null + +let string_of_type_directive x = + match x with + | Dir_type_bool -> "bool" + | Dir_type_float -> "float" + | Dir_type_int -> "int" + | Dir_type_string -> "string" + | Dir_type_null -> "null" + +let prepare_pp_error loc = function + | Unterminated_if -> Location.errorf ~loc "#if not terminated" + | Unterminated_else -> Location.errorf ~loc "#else not terminated" + | Unexpected_directive -> Location.errorf ~loc "Unexpected directive" + | Unexpected_token_in_conditional -> + Location.errorf ~loc "Unexpected token in conditional predicate" + | Unterminated_paren_in_conditional -> + Location.errorf ~loc "Unterminated parens in conditional predicate" + | Expect_hash_then_in_conditional -> + Location.errorf ~loc "Expect `then` after conditional predicate" + | Conditional_expr_expected_type (a, b) -> + Location.errorf ~loc "Conditional expression type mismatch (%s,%s)" + (string_of_type_directive a) + (string_of_type_directive b) + | Illegal_semver s -> + Location.errorf ~loc "Illegal semantic version string %s" s + +let () = + Location.register_error_of_exn (function + | Pp_error (err, loc) -> Some (prepare_pp_error loc err) + | _ -> None) + +let assert_same_type lexbuf x y = + let lhs = type_of_directive x in + let rhs = type_of_directive y in + if lhs <> rhs then + raise + (Pp_error (Conditional_expr_expected_type (lhs, rhs), Location.curr lexbuf)) + else y + +let directive_built_in_values = Hashtbl.create 51 + +let replace_directive_built_in_value k v = + Hashtbl.replace directive_built_in_values k v + +let remove_directive_built_in_value k = + Hashtbl.replace directive_built_in_values k Dir_null + +let replace_directive_bool k v = + Hashtbl.replace directive_built_in_values k (Dir_bool v) + +let replace_directive_string k v = + Hashtbl.replace directive_built_in_values k (Dir_string v) + +let () = + (* Note we use {!Config} instead of {!Sys} becasue + we want to overwrite in some cases with the + same stdlib + *) + let version = Config.version (* so that it can be overridden*) in + replace_directive_built_in_value "OCAML_VERSION" (Dir_string version); + replace_directive_built_in_value "OS_TYPE" (Dir_string Sys.os_type) + +let find_directive_built_in_value k = Hashtbl.find directive_built_in_values k + +let iter_directive_built_in_value f = Hashtbl.iter f directive_built_in_values +(* let iter_directive_built_in_value f = Hashtbl.iter f directive_built_in_values *) + +(* + {[ + # semver 0 "12";; + - : int * int * int * string = (12, 0, 0, "");; + # semver 0 "12.3";; + - : int * int * int * string = (12, 3, 0, "");; + semver 0 "12.3.10";; + - : int * int * int * string = (12, 3, 10, "");; + # semver 0 "12.3.10+x";; + - : int * int * int * string = (12, 3, 10, "+x") + ]} + *) +let zero = Char.code '0' + +let dot = Char.code '.' + +let semantic_version_parse str start last_index = + let rec aux start acc last_index = + if start <= last_index then + let c = Char.code (String.unsafe_get str start) in + if c = dot then (acc, start + 1) (* consume [4.] instead of [4]*) + else + let v = c - zero in + if v >= 0 && v <= 9 then aux (start + 1) ((acc * 10) + v) last_index + else (acc, start) + else (acc, start) + in + let major, major_end = aux start 0 last_index in + let minor, minor_end = aux major_end 0 last_index in + let patch, patch_end = aux minor_end 0 last_index in + let additional = String.sub str patch_end (last_index - patch_end + 1) in + ((major, minor, patch), additional) + +(** + {[ + semver Location.none "1.2.3" "~1.3.0" = false;; + semver Location.none "1.2.3" "^1.3.0" = true ;; + semver Location.none "1.2.3" ">1.3.0" = false ;; + semver Location.none "1.2.3" ">=1.3.0" = false ;; + semver Location.none "1.2.3" "<1.3.0" = true ;; + semver Location.none "1.2.3" "<=1.3.0" = true ;; + ]} + *) +let semver loc lhs str = + let last_index = String.length str - 1 in + if last_index < 0 then raise (Pp_error (Illegal_semver str, loc)) + else + let pred, (((major, minor, _patch) as version), _) = + let v = String.unsafe_get str 0 in + match v with + | '>' -> + if last_index = 0 then raise (Pp_error (Illegal_semver str, loc)) + else if String.unsafe_get str 1 = '=' then + (`Ge, semantic_version_parse str 2 last_index) + else (`Gt, semantic_version_parse str 1 last_index) + | '<' -> + if last_index = 0 then raise (Pp_error (Illegal_semver str, loc)) + else if String.unsafe_get str 1 = '=' then + (`Le, semantic_version_parse str 2 last_index) + else (`Lt, semantic_version_parse str 1 last_index) + | '^' -> (`Compatible, semantic_version_parse str 1 last_index) + | '~' -> (`Approximate, semantic_version_parse str 1 last_index) + | _ -> (`Exact, semantic_version_parse str 0 last_index) + in + let ((l_major, l_minor, _l_patch) as lversion), _ = + semantic_version_parse lhs 0 (String.length lhs - 1) + in + match pred with + | `Ge -> lversion >= version + | `Gt -> lversion > version + | `Le -> lversion <= version + | `Lt -> lversion < version + | `Approximate -> major = l_major && minor = l_minor + | `Compatible -> major = l_major + | `Exact -> lversion = version + +let pp_directive_value fmt (x : directive_value) = + match x with + | Dir_bool b -> Format.pp_print_bool fmt b + | Dir_int b -> Format.pp_print_int fmt b + | Dir_float b -> Format.pp_print_float fmt b + | Dir_string s -> Format.fprintf fmt "%S" s + | Dir_null -> Format.pp_print_string fmt "null" + +let list_variables fmt = + iter_directive_built_in_value (fun s dir_value -> + Format.fprintf fmt "@[%s@ %a@]@." s pp_directive_value dir_value) + +let defined str = + match find_directive_built_in_value str with + | Dir_null -> false + | _ -> true + | exception _ -> ( + try + ignore @@ Sys.getenv str; + true + with _ -> false) + +let query _loc str = + match find_directive_built_in_value str with + | Dir_null -> Dir_bool false + | v -> v + | exception Not_found -> ( + match Sys.getenv str with + | v -> ( + try Dir_bool (bool_of_string v) + with _ -> ( + try Dir_int (int_of_string v) + with _ -> ( + try Dir_float (float_of_string v) with _ -> Dir_string v))) + | exception Not_found -> Dir_bool false) + +let define_key_value key v = + if String.length key > 0 && Char.uppercase_ascii key.[0] = key.[0] then ( + replace_directive_built_in_value key + (* NEED Sync up across {!lexer.mll} {!bspp.ml} and here, + TODO: put it in {!lexer.mll} + *) + (try Dir_bool (bool_of_string v) + with _ -> ( + try Dir_int (int_of_string v) + with _ -> ( + try Dir_float (float_of_string v) with _ -> Dir_string v))); + true) + else false + +let cvt_int_literal s = -int_of_string ("-" ^ s) + +let value_of_token loc (t : Parser.token) = + match t with + | INT (i, None) -> Dir_int (cvt_int_literal i) + | STRING (s, _) -> Dir_string s + | FLOAT (s, None) -> Dir_float (float_of_string s) + | TRUE -> Dir_bool true + | FALSE -> Dir_bool false + | UIDENT s -> query loc s + | _ -> raise (Pp_error (Unexpected_token_in_conditional, loc)) + +let directive_parse (token_with_comments : Lexing.lexbuf -> Parser.token) lexbuf + = + let look_ahead = ref None in + let token () : Parser.token = + let v = !look_ahead in + match v with + | Some v -> + look_ahead := None; + v + | None -> + let rec skip () = + match token_with_comments lexbuf with + | COMMENT _ | DOCSTRING _ -> skip () + | EOF -> raise (Pp_error (Unterminated_if, Location.curr lexbuf)) + | t -> t + in + skip () + in + let push e = + (* INVARIANT: only look at most one token *) + assert (!look_ahead = None); + look_ahead := Some e + in + let rec token_op calc ~no lhs = + match token () with + | (LESS | GREATER | INFIXOP0 "<=" | INFIXOP0 ">=" | EQUAL | INFIXOP0 "<>") + as op -> + let f = + match op with + | LESS -> ( < ) + | GREATER -> ( > ) + | INFIXOP0 "<=" -> ( <= ) + | EQUAL -> ( = ) + | INFIXOP0 "<>" -> ( <> ) + | _ -> assert false + in + let curr_loc = Location.curr lexbuf in + let rhs = value_of_token curr_loc (token ()) in + (not calc) || f lhs (assert_same_type lexbuf lhs rhs) + | INFIXOP0 "=~" -> ( + (not calc) + || + match lhs with + | Dir_string s -> ( + let curr_loc = Location.curr lexbuf in + let rhs = value_of_token curr_loc (token ()) in + match rhs with + | Dir_string rhs -> semver curr_loc s rhs + | _ -> + raise + (Pp_error + ( Conditional_expr_expected_type + (Dir_type_string, type_of_directive lhs), + Location.curr lexbuf ))) + | _ -> + raise + (Pp_error + ( Conditional_expr_expected_type + (Dir_type_string, type_of_directive lhs), + Location.curr lexbuf ))) + | e -> no e + and parse_or calc : bool = parse_or_aux calc (parse_and calc) + and (* a || (b || (c || d))*) + parse_or_aux calc v : bool = + (* let l = v in *) + match token () with + | BARBAR -> + let b = parse_or (calc && not v) in + v || b + | e -> + push e; + v + and parse_and calc = parse_and_aux calc (parse_relation calc) + and parse_and_aux calc v = + (* a && (b && (c && d)) *) + (* let l = v in *) + match token () with + | AMPERAMPER -> + let b = parse_and (calc && v) in + v && b + | e -> + push e; + v + and parse_relation (calc : bool) : bool = + let curr_token = token () in + let curr_loc = Location.curr lexbuf in + match curr_token with + | TRUE -> true + | FALSE -> false + | UIDENT v -> + let value_v = query curr_loc v in + token_op calc + ~no:(fun e -> + push e; + match value_v with + | Dir_bool b -> b + | _ -> + let ty = type_of_directive value_v in + raise + (Pp_error + ( Conditional_expr_expected_type (Dir_type_bool, ty), + curr_loc ))) + value_v + | INT (v, None) -> + let num_v = cvt_int_literal v in + token_op calc + ~no:(fun e -> + push e; + num_v <> 0) + (Dir_int num_v) + | FLOAT (v, None) -> + token_op calc + ~no:(fun _e -> + raise + (Pp_error + ( Conditional_expr_expected_type (Dir_type_bool, Dir_type_float), + curr_loc ))) + (Dir_float (float_of_string v)) + | STRING (v, _) -> + token_op calc + ~no:(fun _e -> + raise + (Pp_error + ( Conditional_expr_expected_type + (Dir_type_bool, Dir_type_string), + curr_loc ))) + (Dir_string v) + | LIDENT (("defined" | "undefined") as r) -> ( + let t = token () in + let loc = Location.curr lexbuf in + match t with + | UIDENT s -> + (not calc) || if r.[0] = 'u' then not @@ defined s else defined s + | _ -> raise (Pp_error (Unexpected_token_in_conditional, loc))) + | LPAREN -> ( + let v = parse_or calc in + match token () with + | RPAREN -> v + | _ -> + raise + (Pp_error (Unterminated_paren_in_conditional, Location.curr lexbuf)) + ) + | _ -> raise (Pp_error (Unexpected_token_in_conditional, curr_loc)) + in + let v = parse_or true in + match token () with + | THEN | EOL -> v + | _ -> + raise (Pp_error (Expect_hash_then_in_conditional, Location.curr lexbuf)) + +type dir_conditional = Dir_if_true | Dir_if_false | Dir_out + +(* let string_of_dir_conditional (x : dir_conditional) = *) +(* match x with *) +(* | Dir_if_true -> "Dir_if_true" *) +(* | Dir_if_false -> "Dir_if_false" *) +(* | Dir_out -> "Dir_out" *) + +let if_then_else = ref Dir_out + +(* store the token after hash, [# token] + when we see `#if` we do the processing immediately + when we see #method, we produce `HASH` token and save `method` + token so that the next lexing produce the right one. +*) +let sharp_look_ahead = ref None + +let update_if_then_else v = + (* Format.fprintf Format.err_formatter "@[update %s \n@]@." (string_of_dir_conditional v); *) + if_then_else := v + +let at_bol lexbuf = + let pos = Lexing.lexeme_start_p lexbuf in + pos.pos_cnum = pos.pos_bol + +(* skip to #else | #end | #elif *) +let rec skip_from_if_false (token_with_comments : Lexing.lexbuf -> Parser.token) + cont lexbuf = + let token = token_with_comments lexbuf in + if token = EOF then raise (Pp_error (Unterminated_if, Location.curr lexbuf)) + else if token = HASH && at_bol lexbuf then + let token = token_with_comments lexbuf in + match token with + | END | LIDENT "endif" -> + update_if_then_else Dir_out; + cont lexbuf + | ELSE -> + update_if_then_else Dir_if_false; + cont lexbuf + | IF -> raise (Pp_error (Unexpected_directive, Location.curr lexbuf)) + | LIDENT "elif" when directive_parse token_with_comments lexbuf -> + update_if_then_else Dir_if_true; + cont lexbuf + | _ -> skip_from_if_false token_with_comments cont lexbuf + else skip_from_if_false token_with_comments cont lexbuf + +let interpret_directive_cont lexbuf ~cont + ~(token_with_comments : Lexing.lexbuf -> Parser.token) look_ahead = + (* current state *) + let if_then_else = !if_then_else in + match (token_with_comments lexbuf, if_then_else) with + | IF, Dir_out -> + if directive_parse token_with_comments lexbuf then ( + update_if_then_else Dir_if_true (* Next state: ELSE *); + cont lexbuf) + else skip_from_if_false token_with_comments cont lexbuf + | LIDENT (("ifndef" | "ifdef") as s), Dir_out -> + let rec token () = + match token_with_comments lexbuf with + | COMMENT _ | DOCSTRING _ -> token () + | EOF -> raise (Pp_error (Unterminated_if, Location.curr lexbuf)) + | t -> t + in + let t0 = token () in + let t = + match t0 with + | UIDENT t -> t + | _ -> + raise + (Pp_error (Unexpected_token_in_conditional, Location.curr lexbuf)) + in + let t1 = token () in + (match t1 with + | THEN | EOL -> () + | _ -> + raise + (Pp_error (Expect_hash_then_in_conditional, Location.curr lexbuf))); + let boolean = defined t = (s = "ifdef") in + if boolean then ( + update_if_then_else Dir_if_true (* Next state: ELSE *); + cont lexbuf) + else skip_from_if_false token_with_comments cont lexbuf + | (IF | LIDENT "ifndef" | LIDENT "ifdef"), (Dir_if_false | Dir_if_true) -> + raise (Pp_error (Unexpected_directive, Location.curr lexbuf)) + | LIDENT "elif", (Dir_if_false | Dir_out) -> + (* when the predicate is false, it will continue eating `elif` *) + raise (Pp_error (Unexpected_directive, Location.curr lexbuf)) + | ((LIDENT "elif" | ELSE) as token), Dir_if_true -> + (* looking for #end, however, it can not see #if anymore, + we need do some validation *) + let rec skip_from_if_true else_seen = + let token = token_with_comments lexbuf in + if token = EOF then + raise (Pp_error (Unterminated_else, Location.curr lexbuf)) + else if token = HASH && at_bol lexbuf then + let token = token_with_comments lexbuf in + match token with + | END | LIDENT "endif" -> + update_if_then_else Dir_out; + cont lexbuf + | IF -> raise (Pp_error (Unexpected_directive, Location.curr lexbuf)) + | ELSE -> + if else_seen then + raise (Pp_error (Unexpected_directive, Location.curr lexbuf)) + else skip_from_if_true true + | LIDENT "elif" when else_seen -> + raise (Pp_error (Unexpected_directive, Location.curr lexbuf)) + | _ -> skip_from_if_true else_seen + else skip_from_if_true else_seen + in + skip_from_if_true (token = ELSE) + | ELSE, Dir_if_false | ELSE, Dir_out -> + raise (Pp_error (Unexpected_directive, Location.curr lexbuf)) + | (END | LIDENT "endif"), (Dir_if_false | Dir_if_true) -> + update_if_then_else Dir_out; + cont lexbuf + | (END | LIDENT "endif"), Dir_out -> + raise (Pp_error (Unexpected_directive, Location.curr lexbuf)) + | token, (Dir_if_true | Dir_if_false | Dir_out) -> look_ahead token + +let interpret_directive lexbuf ~cont ~token_with_comments : Parser.token = + interpret_directive_cont lexbuf ~cont ~token_with_comments + (fun (token : 'a) : 'a -> + sharp_look_ahead := Some token; + HASH) + +let eof_check lexbuf = + if !if_then_else <> Dir_out then + if !if_then_else = Dir_if_true then + raise (Pp_error (Unterminated_if, Location.curr lexbuf)) + else raise (Pp_error (Unterminated_else, Location.curr lexbuf)) + +let init () = + sharp_look_ahead := None; + update_if_then_else Dir_out + +let check_sharp_look_ahead action : Parser.token = + match !sharp_look_ahead with + | None -> action () + | Some token -> + sharp_look_ahead := None; + token + +let rec filter_directive ~(token_with_comments : Lexing.lexbuf -> Parser.token) + pos acc lexbuf : (int * int) list = + match token_with_comments lexbuf with + | HASH when at_bol lexbuf -> + (* ^[start_pos]#if ... #then^[end_pos] *) + let start_pos = Lexing.lexeme_start lexbuf in + interpret_directive_cont lexbuf + ~cont:(fun lexbuf -> + filter_directive (Lexing.lexeme_end lexbuf) ~token_with_comments + ((pos, start_pos) :: acc) lexbuf) + ~token_with_comments + (fun _token -> filter_directive pos acc lexbuf ~token_with_comments) + | EOF -> (pos, Lexing.lexeme_end lexbuf) :: acc + | _ -> filter_directive ~token_with_comments pos acc lexbuf + +let filter_directive_from_lexbuf lexbuf ~token_with_comments = + List.rev (filter_directive 0 [] lexbuf ~token_with_comments) diff --git a/analysis/vendor/ml/rescript_cpp.mli b/analysis/vendor/ml/rescript_cpp.mli new file mode 100644 index 000000000..46fe63110 --- /dev/null +++ b/analysis/vendor/ml/rescript_cpp.mli @@ -0,0 +1,54 @@ +(* Copyright (C) 2021- Hongbo Zhang, Authors of ReScript + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + +val at_bol : Lexing.lexbuf -> bool + +val interpret_directive : + Lexing.lexbuf -> + cont:(Lexing.lexbuf -> Parser.token) -> + token_with_comments:(Lexing.lexbuf -> Parser.token) -> + Parser.token + +val eof_check : Lexing.lexbuf -> unit + +val init : unit -> unit + +val check_sharp_look_ahead : (unit -> Parser.token) -> Parser.token + +(* Methods below are used for cpp, they are not needed by the compiler patches*) +val remove_directive_built_in_value : string -> unit + +val replace_directive_string : string -> string -> unit + +val replace_directive_bool : string -> bool -> unit + +val define_key_value : string -> string -> bool +(** @return false means failed to define *) + +val list_variables : Format.formatter -> unit + +val filter_directive_from_lexbuf : + Lexing.lexbuf -> + token_with_comments:(Lexing.lexbuf -> Parser.token) -> + (int * int) list diff --git a/analysis/vendor/compiler-libs-406/stypes.ml b/analysis/vendor/ml/stypes.ml similarity index 99% rename from analysis/vendor/compiler-libs-406/stypes.ml rename to analysis/vendor/ml/stypes.ml index 8435669ec..879aef7f4 100644 --- a/analysis/vendor/compiler-libs-406/stypes.ml +++ b/analysis/vendor/ml/stypes.ml @@ -32,7 +32,7 @@ let output_int oc i = output_string oc (string_of_int i) type annotation = | Ti_pat of pattern | Ti_expr of expression - | Ti_class of class_expr + | Ti_class of unit | Ti_mod of module_expr | An_call of Location.t * Annot.call | An_ident of Location.t * string * Annot.ident @@ -42,7 +42,7 @@ let get_location ti = match ti with Ti_pat p -> p.pat_loc | Ti_expr e -> e.exp_loc - | Ti_class c -> c.cl_loc + | Ti_class () -> assert false | Ti_mod m -> m.mod_loc | An_call (l, _k) -> l | An_ident (l, _s, _k) -> l diff --git a/analysis/vendor/compiler-libs-406/stypes.mli b/analysis/vendor/ml/stypes.mli similarity index 98% rename from analysis/vendor/compiler-libs-406/stypes.mli rename to analysis/vendor/ml/stypes.mli index 46df1ce69..770956c86 100644 --- a/analysis/vendor/compiler-libs-406/stypes.mli +++ b/analysis/vendor/ml/stypes.mli @@ -22,7 +22,7 @@ open Typedtree;; type annotation = | Ti_pat of pattern | Ti_expr of expression - | Ti_class of class_expr + | Ti_class of unit | Ti_mod of module_expr | An_call of Location.t * Annot.call | An_ident of Location.t * string * Annot.ident diff --git a/analysis/vendor/compiler-libs-406/subst.ml b/analysis/vendor/ml/subst.ml similarity index 95% rename from analysis/vendor/compiler-libs-406/subst.ml rename to analysis/vendor/ml/subst.ml index fb5f90194..f30b7a1f2 100644 --- a/analysis/vendor/compiler-libs-406/subst.ml +++ b/analysis/vendor/ml/subst.ml @@ -70,7 +70,7 @@ let is_not_doc = function let attrs s x = let x = if s.for_saving && not !Clflags.keep_docs then - List.filter is_not_doc x + Ext_list.filter x is_not_doc else x in if s.for_saving && not !Clflags.keep_locs @@ -328,24 +328,7 @@ let rec class_type s = | Cty_arrow (l, ty, cty) -> Cty_arrow (l, typexp s ty, class_type s cty) -let class_declaration s decl = - let decl = - { cty_params = List.map (typexp s) decl.cty_params; - cty_variance = decl.cty_variance; - cty_type = class_type s decl.cty_type; - cty_path = type_path s decl.cty_path; - cty_new = - begin match decl.cty_new with - None -> None - | Some ty -> Some (typexp s ty) - end; - cty_loc = loc s decl.cty_loc; - cty_attributes = attrs s decl.cty_attributes; - } - in - (* Do not clean up if saving: next is cltype_declaration *) - if not s.for_saving then cleanup_types (); - decl + let cltype_declaration s decl = let decl = @@ -398,14 +381,14 @@ let rec rename_bound_idents s idents = function let id' = Ident.rename id in rename_bound_idents (add_modtype id (Mty_ident(Pident id')) s) (id' :: idents) sg - | (Sig_class(id, _, _) | Sig_class_type(id, _, _)) :: sg -> + | Sig_class_type(id, _, _) :: sg -> (* cheat and pretend they are types cf. PR#6650 *) let id' = Ident.rename id in rename_bound_idents (add_type id (Pident id') s) (id' :: idents) sg | (Sig_value(id, _) | Sig_typext(id, _, _)) :: sg -> let id' = Ident.rename id in rename_bound_idents s (id' :: idents) sg - + | Sig_class _ :: _ -> assert false let rec modtype s = function Mty_ident p as mty -> begin match p with @@ -445,8 +428,8 @@ and signature_component s comp newid = Sig_module(newid, module_declaration s d, rs) | Sig_modtype(_id, d) -> Sig_modtype(newid, modtype_declaration s d) - | Sig_class(_id, d, rs) -> - Sig_class(newid, class_declaration s d, rs) + | Sig_class() -> + Sig_class() | Sig_class_type(_id, d, rs) -> Sig_class_type(newid, cltype_declaration s d, rs) diff --git a/analysis/vendor/compiler-libs-406/subst.mli b/analysis/vendor/ml/subst.mli similarity index 97% rename from analysis/vendor/compiler-libs-406/subst.mli rename to analysis/vendor/ml/subst.mli index f81cb4da5..3f975b48d 100644 --- a/analysis/vendor/compiler-libs-406/subst.mli +++ b/analysis/vendor/ml/subst.mli @@ -52,7 +52,7 @@ val value_description: t -> value_description -> value_description val type_declaration: t -> type_declaration -> type_declaration val extension_constructor: t -> extension_constructor -> extension_constructor -val class_declaration: t -> class_declaration -> class_declaration + val cltype_declaration: t -> class_type_declaration -> class_type_declaration val modtype: t -> module_type -> module_type val signature: t -> signature -> signature diff --git a/analysis/vendor/ml/switch.ml b/analysis/vendor/ml/switch.ml new file mode 100644 index 000000000..9caa94e80 --- /dev/null +++ b/analysis/vendor/ml/switch.ml @@ -0,0 +1,868 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Luc Maranget, projet Moscova, INRIA Rocquencourt *) +(* *) +(* Copyright 2000 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + + +type 'a shared = Shared of 'a | Single of 'a + +type 'a t_store = + {act_get : unit -> 'a array ; + act_get_shared : unit -> 'a shared array ; + act_store : 'a -> int ; + act_store_shared : 'a -> int ; } + +exception Not_simple + +module type Stored = sig + type t + type key + val compare_key : key -> key -> int + val make_key : t -> key option +end + +module Store(A:Stored) = struct + module AMap = + Map.Make(struct type t = A.key let compare = A.compare_key end) + + type intern = + { mutable map : (bool * int) AMap.t ; + mutable next : int ; + mutable acts : (bool * A.t) list; } + + let mk_store () = + let st = + { map = AMap.empty ; + next = 0 ; + acts = [] ; } in + + let add mustshare act = + let i = st.next in + st.acts <- (mustshare,act) :: st.acts ; + st.next <- i+1 ; + i in + + let store mustshare act = match A.make_key act with + | Some key -> + begin try + let (shared,i) = AMap.find key st.map in + if not shared then st.map <- AMap.add key (true,i) st.map ; + i + with Not_found -> + let i = add mustshare act in + st.map <- AMap.add key (mustshare,i) st.map ; + i + end + | None -> + add mustshare act + + and get () = Array.of_list (List.rev_map (fun (_,act) -> act) st.acts) + + and get_shared () = + let acts = + Array.of_list + (List.rev_map + (fun (shared,act) -> + if shared then Shared act else Single act) + st.acts) in + AMap.iter + (fun _ (shared,i) -> + if shared then match acts.(i) with + | Single act -> acts.(i) <- Shared act + | Shared _ -> ()) + st.map ; + acts in + {act_store = store false ; act_store_shared = store true ; + act_get = get; act_get_shared = get_shared; } +end + + + +module type S = + sig + type primitive + val eqint : primitive + val neint : primitive + val leint : primitive + val ltint : primitive + val geint : primitive + val gtint : primitive + type act + + val bind : act -> (act -> act) -> act + val make_const : int -> act + val make_offset : act -> int -> act + val make_prim : primitive -> act list -> act + val make_isout : act -> act -> act + val make_isin : act -> act -> act + val make_if : act -> act -> act -> act + val make_switch : Location.t -> act -> int array -> act array -> offset:int -> Lambda.switch_names option -> act + val make_catch : act -> int * (act -> act) + val make_exit : int -> act + end + +(* The module will ``produce good code for the case statement'' *) +(* + Adaptation of + R.L. Berstein + ``Producing good code for the case statement'' + Sofware Practice and Experience, 15(10) (1985) + and + D.L. Spuler + ``Two-Way Comparison Search Trees, a Generalisation of Binary Search Trees + and Split Trees'' + ``Compiler Code Generation for Multiway Branch Statement as + a Static Search Problem'' + Technical Reports, James Cook University +*) +(* + Main adaptation is considering interval tests + (implemented as one addition + one unsigned test and branch) + which leads to exhaustive search for finding the optimal + test sequence in small cases and heuristics otherwise. +*) +module Make (Arg : S) = + struct + + type 'a inter = + {cases : (int * int * int) array ; + actions : 'a array} + +type 'a t_ctx = {off : int ; arg : 'a} + +let cut = ref 8 +and more_cut = ref 16 + +(* +let pint chan i = + if i = min_int then Printf.fprintf chan "-oo" + else if i=max_int then Printf.fprintf chan "oo" + else Printf.fprintf chan "%d" i + +let pcases chan cases = + for i =0 to Array.length cases-1 do + let l,h,act = cases.(i) in + if l=h then + Printf.fprintf chan "%d:%d " l act + else + Printf.fprintf chan "%a..%a:%d " pint l pint h act + done + +let prerr_inter i = Printf.fprintf stderr + "cases=%a" pcases i.cases +*) + +let get_act cases i = + let _,_,r = cases.(i) in + r +and get_low cases i = + let r,_,_ = cases.(i) in + r + +type ctests = { + mutable n : int ; + mutable ni : int ; + } + +let too_much = {n=max_int ; ni=max_int} + +(* +let ptests chan {n=n ; ni=ni} = + Printf.fprintf chan "{n=%d ; ni=%d}" n ni + +let pta chan t = + for i =0 to Array.length t-1 do + Printf.fprintf chan "%d: %a\n" i ptests t.(i) + done +*) + +let less_tests c1 c2 = + if c1.n < c2.n then + true + else if c1.n = c2.n then begin + if c1.ni < c2.ni then + true + else + false + end else + false + +and eq_tests c1 c2 = c1.n = c2.n && c1.ni=c2.ni + +let less2tests (c1,d1) (c2,d2) = + if eq_tests c1 c2 then + less_tests d1 d2 + else + less_tests c1 c2 + +let add_test t1 t2 = + t1.n <- t1.n + t2.n ; + t1.ni <- t1.ni + t2.ni ; + +type t_ret = Inter of int * int | Sep of int | No + +(* +let pret chan = function + | Inter (i,j)-> Printf.fprintf chan "Inter %d %d" i j + | Sep i -> Printf.fprintf chan "Sep %d" i + | No -> Printf.fprintf chan "No" +*) + +let coupe cases i = + let l,_,_ = cases.(i) in + l, + Array.sub cases 0 i, + Array.sub cases i (Array.length cases-i) + + +let case_append c1 c2 = + let len1 = Array.length c1 + and len2 = Array.length c2 in + match len1,len2 with + | 0,_ -> c2 + | _,0 -> c1 + | _,_ -> + let l1,h1,act1 = c1.(Array.length c1-1) + and l2,h2,act2 = c2.(0) in + if act1 = act2 then + let r = Array.make (len1+len2-1) c1.(0) in + for i = 0 to len1-2 do + r.(i) <- c1.(i) + done ; + + let l = + if len1-2 >= 0 then begin + let _,h,_ = r.(len1-2) in + if h+1 < l1 then + h+1 + else + l1 + end else + l1 + and h = + if 1 < len2-1 then begin + let l,_,_ = c2.(1) in + if h2+1 < l then + l-1 + else + h2 + end else + h2 in + r.(len1-1) <- (l,h,act1) ; + for i=1 to len2-1 do + r.(len1-1+i) <- c2.(i) + done ; + r + else if h1 > l1 then + let r = Array.make (len1+len2) c1.(0) in + for i = 0 to len1-2 do + r.(i) <- c1.(i) + done ; + r.(len1-1) <- (l1,l2-1,act1) ; + for i=0 to len2-1 do + r.(len1+i) <- c2.(i) + done ; + r + else if h2 > l2 then + let r = Array.make (len1+len2) c1.(0) in + for i = 0 to len1-1 do + r.(i) <- c1.(i) + done ; + r.(len1) <- (h1+1,h2,act2) ; + for i=1 to len2-1 do + r.(len1+i) <- c2.(i) + done ; + r + else + Array.append c1 c2 + + +let coupe_inter i j cases = + let lcases = Array.length cases in + let low,_,_ = cases.(i) + and _,high,_ = cases.(j) in + low,high, + Array.sub cases i (j-i+1), + case_append (Array.sub cases 0 i) (Array.sub cases (j+1) (lcases-(j+1))) + +type kind = Kvalue of int | Kinter of int | Kempty + +(* +let pkind chan = function + | Kvalue i ->Printf.fprintf chan "V%d" i + | Kinter i -> Printf.fprintf chan "I%d" i + | Kempty -> Printf.fprintf chan "E" + +let rec pkey chan = function + | [] -> () + | [k] -> pkind chan k + | k::rem -> + Printf.fprintf chan "%a %a" pkey rem pkind k +*) + +let t = Hashtbl.create 17 + +let make_key cases = + let seen = ref [] + and count = ref 0 in + let rec got_it act = function + | [] -> + seen := (act,!count):: !seen ; + let r = !count in + incr count ; + r + | (act0,index) :: rem -> + if act0 = act then + index + else + got_it act rem in + + let make_one (l:int) h act = + if l=h then + Kvalue (got_it act !seen) + else + Kinter (got_it act !seen) in + + let rec make_rec i pl = + if i < 0 then + [] + else + let l,h,act = cases.(i) in + if pl = h+1 then + make_one l h act::make_rec (i-1) l + else + Kempty::make_one l h act::make_rec (i-1) l in + + let l,h,act = cases.(Array.length cases-1) in + make_one l h act::make_rec (Array.length cases-2) l + + + let same_act t = + let len = Array.length t in + let a = get_act t (len-1) in + let rec do_rec i = + if i < 0 then true + else + let b = get_act t i in + b=a && do_rec (i-1) in + do_rec (len-2) + + +(* + Interval test x in [l,h] works by checking x-l in [0,h-l] + * This may be false for arithmetic modulo 2^31 + * Subtracting l may change the relative ordering of values + and invalid the invariant that matched values are given in + increasing order + + To avoid this, interval check is allowed only when the + integers indeed present in the whole case interval are + in [-2^16 ; 2^16] + + This condition is checked by zyva +*) + +let inter_limit = 1 lsl 16 + +let ok_inter = ref false + +let rec opt_count top cases = + let key = make_key cases in + try + Hashtbl.find t key + with + | Not_found -> + let r = + let lcases = Array.length cases in + match lcases with + | 0 -> assert false + | _ when same_act cases -> No, ({n=0; ni=0},{n=0; ni=0}) + | _ -> + if lcases < !cut then + enum top cases + else if lcases < !more_cut then + heuristic cases + else + divide cases in + Hashtbl.add t key r ; + r + +and divide cases = + let lcases = Array.length cases in + let m = lcases/2 in + let _,left,right = coupe cases m in + let ci = {n=1 ; ni=0} + and cm = {n=1 ; ni=0} + and _,(cml,cleft) = opt_count false left + and _,(cmr,cright) = opt_count false right in + add_test ci cleft ; + add_test ci cright ; + if less_tests cml cmr then + add_test cm cmr + else + add_test cm cml ; + Sep m,(cm, ci) + +and heuristic cases = + let lcases = Array.length cases in + + let sep,csep = divide cases + + and inter,cinter = + if !ok_inter then begin + let _,_,act0 = cases.(0) + and _,_,act1 = cases.(lcases-1) in + if act0 = act1 then begin + let low, high, inside, outside = coupe_inter 1 (lcases-2) cases in + let _,(cmi,cinside) = opt_count false inside + and _,(cmo,coutside) = opt_count false outside + and cmij = {n=1 ; ni=(if low=high then 0 else 1)} + and cij = {n=1 ; ni=(if low=high then 0 else 1)} in + add_test cij cinside ; + add_test cij coutside ; + if less_tests cmi cmo then + add_test cmij cmo + else + add_test cmij cmi ; + Inter (1,lcases-2),(cmij,cij) + end else + Inter (-1,-1),(too_much, too_much) + end else + Inter (-1,-1),(too_much, too_much) in + if less2tests csep cinter then + sep,csep + else + inter,cinter + + +and enum top cases = + let lcases = Array.length cases in + let lim, with_sep = + let best = ref (-1) and best_cost = ref (too_much,too_much) in + + for i = 1 to lcases-(1) do + let _,left,right = coupe cases i in + let ci = {n=1 ; ni=0} + and cm = {n=1 ; ni=0} + and _,(cml,cleft) = opt_count false left + and _,(cmr,cright) = opt_count false right in + add_test ci cleft ; + add_test ci cright ; + if less_tests cml cmr then + add_test cm cmr + else + add_test cm cml ; + + if + less2tests (cm,ci) !best_cost + then begin + if top then + Printf.fprintf stderr "Get it: %d\n" i ; + best := i ; + best_cost := (cm,ci) + end + done ; + !best, !best_cost in + + let ilow, ihigh, with_inter = + if not !ok_inter then + let rlow = ref (-1) and rhigh = ref (-1) + and best_cost= ref (too_much,too_much) in + for i=1 to lcases-2 do + let low, high, inside, outside = coupe_inter i i cases in + if low=high then begin + let _,(cmi,cinside) = opt_count false inside + and _,(cmo,coutside) = opt_count false outside + and cmij = {n=1 ; ni=0} + and cij = {n=1 ; ni=0} in + add_test cij cinside ; + add_test cij coutside ; + if less_tests cmi cmo then + add_test cmij cmo + else + add_test cmij cmi ; + if less2tests (cmij,cij) !best_cost then begin + rlow := i ; + rhigh := i ; + best_cost := (cmij,cij) + end + end + done ; + !rlow, !rhigh, !best_cost + else + let rlow = ref (-1) and rhigh = ref (-1) + and best_cost= ref (too_much,too_much) in + for i=1 to lcases-2 do + for j=i to lcases-2 do + let low, high, inside, outside = coupe_inter i j cases in + let _,(cmi,cinside) = opt_count false inside + and _,(cmo,coutside) = opt_count false outside + and cmij = {n=1 ; ni=(if low=high then 0 else 1)} + and cij = {n=1 ; ni=(if low=high then 0 else 1)} in + add_test cij cinside ; + add_test cij coutside ; + if less_tests cmi cmo then + add_test cmij cmo + else + add_test cmij cmi ; + if less2tests (cmij,cij) !best_cost then begin + rlow := i ; + rhigh := j ; + best_cost := (cmij,cij) + end + done + done ; + !rlow, !rhigh, !best_cost in + let r = ref (Inter (ilow,ihigh)) and rc = ref with_inter in + if less2tests with_sep !rc then begin + r := Sep lim ; rc := with_sep + end ; + !r, !rc + + let make_if_test test arg i ifso ifnot = + Arg.make_if + (Arg.make_prim test [arg ; Arg.make_const i]) + ifso ifnot + + let make_if_lt arg i ifso ifnot = match i with + | 1 -> + make_if_test Arg.leint arg 0 ifso ifnot + | _ -> + make_if_test Arg.ltint arg i ifso ifnot + + and make_if_ge arg i ifso ifnot = match i with + | 1 -> + make_if_test Arg.gtint arg 0 ifso ifnot + | _ -> + make_if_test Arg.geint arg i ifso ifnot + + and make_if_eq arg i ifso ifnot = + make_if_test Arg.eqint arg i ifso ifnot + + and make_if_ne arg i ifso ifnot = + make_if_test Arg.neint arg i ifso ifnot + + let do_make_if_out h arg ifso ifno = + Arg.make_if (Arg.make_isout h arg) ifso ifno + + let make_if_out ctx l d mk_ifso mk_ifno = match l with + | 0 -> + do_make_if_out + (Arg.make_const d) ctx.arg (mk_ifso ctx) (mk_ifno ctx) + | _ -> + if (*true || *)!Config.bs_only then + do_make_if_out + (Arg.make_const d) (Arg.make_offset ctx.arg (-l)) (mk_ifso ctx) (mk_ifno ctx) else + Arg.bind + (Arg.make_offset ctx.arg (-l)) + (fun arg -> + let ctx = {off= (-l+ctx.off) ; arg=arg} in + do_make_if_out + (Arg.make_const d) arg (mk_ifso ctx) (mk_ifno ctx)) + + let do_make_if_in h arg ifso ifno = + Arg.make_if (Arg.make_isin h arg) ifso ifno + + let make_if_in ctx l d mk_ifso mk_ifno = match l with + | 0 -> + do_make_if_in + (Arg.make_const d) ctx.arg (mk_ifso ctx) (mk_ifno ctx) + | _ -> + if (*true || *) !Config.bs_only then + do_make_if_in + (Arg.make_const d) (Arg.make_offset ctx.arg (-l)) (mk_ifso ctx) (mk_ifno ctx) else + Arg.bind + (Arg.make_offset ctx.arg (-l)) + (fun arg -> + let ctx = {off= (-l+ctx.off) ; arg=arg} in + do_make_if_in + (Arg.make_const d) arg (mk_ifso ctx) (mk_ifno ctx)) + + let rec c_test ctx ({cases=cases ; actions=actions} as s) = + let lcases = Array.length cases in + assert(lcases > 0) ; + if lcases = 1 then + actions.(get_act cases 0) ctx + + else begin + + let w,_c = opt_count false cases in +(* + Printf.fprintf stderr + "off=%d tactic=%a for %a\n" + ctx.off pret w pcases cases ; + *) + match w with + | No -> actions.(get_act cases 0) ctx + | Inter (i,j) -> + let low,high,inside, outside = coupe_inter i j cases in + let _,(cinside,_) = opt_count false inside + and _,(coutside,_) = opt_count false outside in +(* Costs are retrieved to put the code with more remaining tests + in the privileged (positive) branch of ``if'' *) + if low=high then begin + if less_tests coutside cinside then + make_if_eq + ctx.arg + (low+ctx.off) + (c_test ctx {s with cases=inside}) + (c_test ctx {s with cases=outside}) + else + make_if_ne + ctx.arg + (low+ctx.off) + (c_test ctx {s with cases=outside}) + (c_test ctx {s with cases=inside}) + end else begin + if less_tests coutside cinside then + make_if_in + ctx + (low+ctx.off) + (high-low) + (fun ctx -> c_test ctx {s with cases=inside}) + (fun ctx -> c_test ctx {s with cases=outside}) + else + make_if_out + ctx + (low+ctx.off) + (high-low) + (fun ctx -> c_test ctx {s with cases=outside}) + (fun ctx -> c_test ctx {s with cases=inside}) + end + | Sep i -> + let lim,left,right = coupe cases i in + let _,(cleft,_) = opt_count false left + and _,(cright,_) = opt_count false right in + let left = {s with cases=left} + and right = {s with cases=right} in + + if i=1 && (lim+ctx.off)=1 && get_low cases 0+ctx.off=0 then + make_if_ne + ctx.arg 0 + (c_test ctx right) (c_test ctx left) + else if less_tests cright cleft then + make_if_lt + ctx.arg (lim+ctx.off) + (c_test ctx left) (c_test ctx right) + else + make_if_ge + ctx.arg (lim+ctx.off) + (c_test ctx right) (c_test ctx left) + + end + + +(* Minimal density of switches *) +let theta = ref 0.33333 + +(* Minimal number of tests to make a switch *) +let switch_min = ref 3 + +(* Particular case 0, 1, 2 *) +let particular_case cases i j = + j-i = 2 && + (let l1,_h1,act1 = cases.(i) + and l2,_h2,_act2 = cases.(i+1) + and l3,h3,act3 = cases.(i+2) in + l1+1=l2 && l2+1=l3 && l3=h3 && + act1 <> act3) + +let approx_count cases i j = + let l = j-i+1 in + if l < !cut then + let _,(_,{n=ntests}) = opt_count false (Array.sub cases i l) in + ntests + else + l-1 + +(* Sends back a boolean that says whether is switch is worth or not *) + +let dense {cases} i j = + if i=j then true + else + let l,_,_ = cases.(i) + and _,h,_ = cases.(j) in + let ntests = approx_count cases i j in +(* + (ntests+1) >= theta * (h-l+1) +*) + particular_case cases i j || + (ntests >= !switch_min && + float_of_int ntests +. 1.0 >= + !theta *. (float_of_int h -. float_of_int l +. 1.0)) + +(* Compute clusters by dynamic programming + Adaptation of the correction to Bernstein + ``Correction to `Producing Good Code for the Case Statement' '' + S.K. Kannan and T.A. Proebsting + Software Practice and Experience Vol. 24(2) 233 (Feb 1994) +*) + +let comp_clusters s = + let len = Array.length s.cases in + let min_clusters = Array.make len max_int + and k = Array.make len 0 in + let get_min i = if i < 0 then 0 else min_clusters.(i) in + + for i = 0 to len-1 do + for j = 0 to i do + if + dense s j i && + get_min (j-1) + 1 < min_clusters.(i) + then begin + k.(i) <- j ; + min_clusters.(i) <- get_min (j-1) + 1 + end + done ; + done ; + min_clusters.(len-1),k + +(* Assume j > i *) +let make_switch loc {cases=cases ; actions=actions} i j sw_names = + let ll,_,_ = cases.(i) + and _,hh,_ = cases.(j) in + let tbl = Array.make (hh-ll+1) 0 + and t = Hashtbl.create 17 + and index = ref 0 in + let get_index act = + try + Hashtbl.find t act + with + | Not_found -> + let i = !index in + incr index ; + Hashtbl.add t act i ; + i in + + for k=i to j do + let l,h,act = cases.(k) in + let index = get_index act in + for kk=l-ll to h-ll do + tbl.(kk) <- index + done + done ; + let acts = Array.make !index actions.(0) in + Hashtbl.iter + (fun act i -> acts.(i) <- actions.(act)) + t ; + (fun ctx -> + if !Config.bs_only then + Arg.make_switch ~offset:(ll+ctx.off) loc ctx.arg tbl acts sw_names + else + match -ll-ctx.off with + | 0 -> Arg.make_switch loc ctx.arg tbl acts sw_names ~offset:0 + | _ -> + Arg.bind + (Arg.make_offset ctx.arg (-ll-ctx.off)) + (fun arg -> Arg.make_switch loc arg tbl acts sw_names ~offset:0)) + + +let make_clusters loc ({cases=cases ; actions=actions} as s) n_clusters k sw_names = + let len = Array.length cases in + let r = Array.make n_clusters (0,0,0) + and t = Hashtbl.create 17 + and index = ref 0 + and bidon = ref (Array.length actions) in + let get_index act = + try + let i,_ = Hashtbl.find t act in + i + with + | Not_found -> + let i = !index in + incr index ; + Hashtbl.add + t act + (i,(fun _ -> actions.(act))) ; + i + and add_index act = + let i = !index in + incr index ; + incr bidon ; + Hashtbl.add t !bidon (i,act) ; + i in + + let rec zyva j ir = + let i = k.(j) in + begin if i=j then + let l,h,act = cases.(i) in + r.(ir) <- (l,h,get_index act) + else (* assert i < j *) + let l,_,_ = cases.(i) + and _,h,_ = cases.(j) in + r.(ir) <- (l,h,add_index (make_switch loc s i j sw_names)) + end ; + if i > 0 then zyva (i-1) (ir-1) in + + zyva (len-1) (n_clusters-1) ; + let acts = Array.make !index (fun _ -> assert false) in + Hashtbl.iter (fun _ (i,act) -> acts.(i) <- act) t ; + {cases = r ; actions = acts} +;; + + +let do_zyva loc (low,high) arg cases actions sw_names = + let old_ok = !ok_inter in + ok_inter := (abs low <= inter_limit && abs high <= inter_limit) ; + if !ok_inter <> old_ok then Hashtbl.clear t ; + + let s = {cases=cases ; actions=actions} in + +(* + Printf.eprintf "ZYVA: %B [low=%i,high=%i]\n" !ok_inter low high ; + pcases stderr cases ; + prerr_endline "" ; +*) + let n_clusters,k = comp_clusters s in + let clusters = make_clusters loc s n_clusters k sw_names in + c_test {arg=arg ; off=0} clusters + +let abstract_shared actions = + let handlers = ref (fun x -> x) in + let actions = + Array.map + (fun act -> match act with + | Single act -> act + | Shared act -> + let i,h = Arg.make_catch act in + let oh = !handlers in + handlers := (fun act -> h (oh act)) ; + Arg.make_exit i) + actions in + !handlers,actions + +let zyva loc lh arg cases actions names = + assert (Array.length cases > 0) ; + let actions = actions.act_get_shared () in + let hs,actions = abstract_shared actions in + hs (do_zyva loc lh arg cases actions names) + +and test_sequence arg cases actions = + assert (Array.length cases > 0) ; + let actions = actions.act_get_shared () in + let hs,actions = abstract_shared actions in + let old_ok = !ok_inter in + ok_inter := false ; + if !ok_inter <> old_ok then Hashtbl.clear t ; + let s = + {cases=cases ; + actions=Array.map (fun act -> (fun _ -> act)) actions} in +(* + Printf.eprintf "SEQUENCE: %B\n" !ok_inter ; + pcases stderr cases ; + prerr_endline "" ; +*) + hs (c_test {arg=arg ; off=0} s) +;; + +end diff --git a/analysis/vendor/ml/switch.mli b/analysis/vendor/ml/switch.mli new file mode 100644 index 000000000..2dc3e2c56 --- /dev/null +++ b/analysis/vendor/ml/switch.mli @@ -0,0 +1,119 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Luc Maranget, projet Moscova, INRIA Rocquencourt *) +(* *) +(* Copyright 2000 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +(* + This module transforms generic switches in combinations + of if tests and switches. +*) + +(* For detecting action sharing, object style *) + +(* Store for actions in object style: + act_store : store an action, returns index in table + In case an action with equal key exists, returns index + of the stored action. Otherwise add entry in table. + act_store_shared : This stored action will always be shared. + act_get : retrieve table + act_get_shared : retrieve table, with sharing explicit +*) + +type 'a shared = Shared of 'a | Single of 'a + +type 'a t_store = + {act_get : unit -> 'a array ; + act_get_shared : unit -> 'a shared array ; + act_store : 'a -> int ; + act_store_shared : 'a -> int ; } + +exception Not_simple + +module type Stored = sig + type t + type key + val compare_key : key -> key -> int + val make_key : t -> key option +end + +module Store(A:Stored) : + sig + val mk_store : unit -> A.t t_store + end + +(* Arguments to the Make functor *) +module type S = + sig + (* type of basic tests *) + type primitive + (* basic tests themselves *) + val eqint : primitive + val neint : primitive + val leint : primitive + val ltint : primitive + val geint : primitive + val gtint : primitive + (* type of actions *) + type act + + (* Various constructors, for making a binder, + adding one integer, etc. *) + val bind : act -> (act -> act) -> act + val make_const : int -> act + val make_offset : act -> int -> act + val make_prim : primitive -> act list -> act + val make_isout : act -> act -> act + val make_isin : act -> act -> act + val make_if : act -> act -> act -> act + (* construct an actual switch : + make_switch arg cases acts + NB: cases is in the value form *) + val make_switch : + Location.t -> act -> int array -> act array -> offset:int -> Lambda.switch_names option -> act + (* Build last minute sharing of action stuff *) + val make_catch : act -> int * (act -> act) + val make_exit : int -> act + + end + + +(* + Make.zyva arg low high cases actions where + - arg is the argument of the switch. + - low, high are the interval limits. + - cases is a list of sub-interval and action indices + - actions is an array of actions. + + All these arguments specify a switch construct and zyva + returns an action that performs the switch. +*) +module Make : + functor (Arg : S) -> + sig +(* Standard entry point, sharing is tracked *) + val zyva : + Location.t -> + (int * int) -> + Arg.act -> + (int * int * int) array -> + Arg.act t_store -> + Lambda.switch_names option -> + Arg.act + +(* Output test sequence, sharing tracked *) + val test_sequence : + Arg.act -> + (int * int * int) array -> + Arg.act t_store -> + Arg.act + end diff --git a/analysis/vendor/compiler-libs-406/syntaxerr.ml b/analysis/vendor/ml/syntaxerr.ml similarity index 100% rename from analysis/vendor/compiler-libs-406/syntaxerr.ml rename to analysis/vendor/ml/syntaxerr.ml diff --git a/analysis/vendor/compiler-libs-406/syntaxerr.mli b/analysis/vendor/ml/syntaxerr.mli similarity index 100% rename from analysis/vendor/compiler-libs-406/syntaxerr.mli rename to analysis/vendor/ml/syntaxerr.mli diff --git a/analysis/vendor/compiler-libs-406/tast_iterator.ml b/analysis/vendor/ml/tast_iterator.ml similarity index 99% rename from analysis/vendor/compiler-libs-406/tast_iterator.ml rename to analysis/vendor/ml/tast_iterator.ml index 52761b13f..3fdba16cd 100644 --- a/analysis/vendor/compiler-libs-406/tast_iterator.ml +++ b/analysis/vendor/ml/tast_iterator.ml @@ -244,7 +244,7 @@ let signature_item sub {sig_desc; sig_env; _} = | Tsig_recmodule list -> List.iter (sub.module_declaration sub) list | Tsig_modtype x -> sub.module_type_declaration sub x | Tsig_include incl -> include_infos (sub.module_type sub) incl - | Tsig_class list -> List.iter (sub.class_description sub) list + | Tsig_class () -> () | Tsig_class_type list -> List.iter (sub.class_type_declaration sub) list | Tsig_open _od -> () | Tsig_attribute _ -> () @@ -277,7 +277,7 @@ let module_coercion sub = function sub.module_coercion sub c1; sub.module_coercion sub c2 | Tcoerce_alias (_, c1) -> sub.module_coercion sub c1 - | Tcoerce_structure (l1, l2) -> + | Tcoerce_structure (l1, l2, _) -> List.iter (fun (_, c) -> sub.module_coercion sub c) l1; List.iter (fun (_, _, c) -> sub.module_coercion sub c) l2 | Tcoerce_primitive {pc_env; _} -> sub.env sub pc_env diff --git a/analysis/vendor/compiler-libs-406/tast_iterator.mli b/analysis/vendor/ml/tast_iterator.mli similarity index 100% rename from analysis/vendor/compiler-libs-406/tast_iterator.mli rename to analysis/vendor/ml/tast_iterator.mli diff --git a/analysis/vendor/compiler-libs-406/tast_mapper.ml b/analysis/vendor/ml/tast_mapper.ml similarity index 85% rename from analysis/vendor/compiler-libs-406/tast_mapper.ml rename to analysis/vendor/ml/tast_mapper.ml index 36e33e3f2..eaf6aa49e 100644 --- a/analysis/vendor/compiler-libs-406/tast_mapper.ml +++ b/analysis/vendor/ml/tast_mapper.ml @@ -23,12 +23,9 @@ type mapper = { case: mapper -> case -> case; cases: mapper -> case list -> case list; - class_declaration: mapper -> class_declaration -> class_declaration; class_description: mapper -> class_description -> class_description; - class_expr: mapper -> class_expr -> class_expr; - class_field: mapper -> class_field -> class_field; + class_signature: mapper -> class_signature -> class_signature; - class_structure: mapper -> class_structure -> class_structure; class_type: mapper -> class_type -> class_type; class_type_declaration: mapper -> class_type_declaration -> class_type_declaration; @@ -96,8 +93,6 @@ let include_infos f x = {x with incl_mod = f x.incl_mod} let class_type_declaration sub x = class_infos sub (sub.class_type sub) x -let class_declaration sub x = - class_infos sub (sub.class_expr sub) x let structure_item sub {str_desc; str_loc; str_env} = let str_env = sub.env sub str_env in @@ -117,9 +112,7 @@ let structure_item sub {str_desc; str_loc; str_env} = | Tstr_recmodule list -> Tstr_recmodule (List.map (sub.module_binding sub) list) | Tstr_modtype x -> Tstr_modtype (sub.module_type_declaration sub x) - | Tstr_class list -> - Tstr_class - (List.map (tuple2 (sub.class_declaration sub) id) list) + | Tstr_class () -> Tstr_class () | Tstr_class_type list -> Tstr_class_type (List.map (tuple3 id id (sub.class_type_declaration sub)) list) @@ -313,18 +306,9 @@ let expr sub x = ) | Texp_new _ | Texp_instvar _ as d -> d - | Texp_setinstvar (path1, path2, id, exp) -> - Texp_setinstvar ( - path1, - path2, - id, - sub.expr sub exp - ) - | Texp_override (path, list) -> - Texp_override ( - path, - List.map (tuple3 id id (sub.expr sub)) list - ) + | Texp_setinstvar _ + | Texp_override _ -> + assert false | Texp_letmodule (id, s, mexpr, exp) -> Texp_letmodule ( id, @@ -341,8 +325,8 @@ let expr sub x = Texp_assert (sub.expr sub exp) | Texp_lazy exp -> Texp_lazy (sub.expr sub exp) - | Texp_object (cl, sl) -> - Texp_object (sub.class_structure sub cl, sl) + | Texp_object () -> + Texp_object () | Texp_pack mexpr -> Texp_pack (sub.module_expr sub mexpr) | Texp_unreachable -> @@ -383,11 +367,10 @@ let signature_item sub x = Tsig_modtype (sub.module_type_declaration sub x) | Tsig_include incl -> Tsig_include (include_infos (sub.module_type sub) incl) - | Tsig_class list -> - Tsig_class (List.map (sub.class_description sub) list) | Tsig_class_type list -> Tsig_class_type (List.map (sub.class_type_declaration sub) list) + | Tsig_class _ | Tsig_open _ | Tsig_attribute _ as d -> d in @@ -432,12 +415,12 @@ let module_coercion sub = function Tcoerce_functor (sub.module_coercion sub c1, sub.module_coercion sub c2) | Tcoerce_alias (p, c1) -> Tcoerce_alias (p, sub.module_coercion sub c1) - | Tcoerce_structure (l1, l2) -> + | Tcoerce_structure (l1, l2, runtime_fields) -> let l1' = List.map (fun (i,c) -> i, sub.module_coercion sub c) l1 in let l2' = List.map (fun (id,i,c) -> id, i, sub.module_coercion sub c) l2 in - Tcoerce_structure (l1', l2') + Tcoerce_structure (l1', l2', runtime_fields) | Tcoerce_primitive pc -> Tcoerce_primitive {pc with pc_env = sub.env sub pc.pc_env} @@ -483,49 +466,6 @@ let module_binding sub x = let mb_expr = sub.module_expr sub x.mb_expr in {x with mb_expr} -let class_expr sub x = - let cl_env = sub.env sub x.cl_env in - let cl_desc = - match x.cl_desc with - | Tcl_constraint (cl, clty, vals, meths, concrs) -> - Tcl_constraint ( - sub.class_expr sub cl, - opt (sub.class_type sub) clty, - vals, - meths, - concrs - ) - | Tcl_structure clstr -> - Tcl_structure (sub.class_structure sub clstr) - | Tcl_fun (label, pat, priv, cl, partial) -> - Tcl_fun ( - label, - sub.pat sub pat, - List.map (tuple3 id id (sub.expr sub)) priv, - sub.class_expr sub cl, - partial - ) - | Tcl_apply (cl, args) -> - Tcl_apply ( - sub.class_expr sub cl, - List.map (tuple2 id (opt (sub.expr sub))) args - ) - | Tcl_let (rec_flag, value_bindings, ivars, cl) -> - let (rec_flag, value_bindings) = - sub.value_bindings sub (rec_flag, value_bindings) - in - Tcl_let ( - rec_flag, - value_bindings, - List.map (tuple3 id id (sub.expr sub)) ivars, - sub.class_expr sub cl - ) - | Tcl_ident (path, lid, tyl) -> - Tcl_ident (path, lid, List.map (sub.typ sub) tyl) - | Tcl_open (ovf, p, lid, env, e) -> - Tcl_open (ovf, p, lid, sub.env sub env, sub.class_expr sub e) - in - {x with cl_desc; cl_env} let class_type sub x = let cltyp_env = sub.env sub x.cltyp_env in @@ -599,10 +539,6 @@ let typ sub x = in {x with ctyp_desc; ctyp_env} -let class_structure sub x = - let cstr_self = sub.pat sub x.cstr_self in - let cstr_fields = List.map (sub.class_field sub) x.cstr_fields in - {x with cstr_self; cstr_fields} let row_field sub = function | Ttag (label, attrs, b, list) -> @@ -614,29 +550,7 @@ let object_field sub = function OTtag (label, attrs, (sub.typ sub ct)) | OTinherit ct -> OTinherit (sub.typ sub ct) -let class_field_kind sub = function - | Tcfk_virtual ct -> Tcfk_virtual (sub.typ sub ct) - | Tcfk_concrete (ovf, e) -> Tcfk_concrete (ovf, sub.expr sub e) - -let class_field sub x = - let cf_desc = - match x.cf_desc with - | Tcf_inherit (ovf, cl, super, vals, meths) -> - Tcf_inherit (ovf, sub.class_expr sub cl, super, vals, meths) - | Tcf_constraint (cty, cty') -> - Tcf_constraint ( - sub.typ sub cty, - sub.typ sub cty' - ) - | Tcf_val (s, mf, id, k, b) -> - Tcf_val (s, mf, id, class_field_kind sub k, b) - | Tcf_method (s, priv, k) -> - Tcf_method (s, priv, class_field_kind sub k) - | Tcf_initializer exp -> - Tcf_initializer (sub.expr sub exp) - | Tcf_attribute _ as d -> d - in - {x with cf_desc} + let value_bindings sub (rec_flag, list) = (rec_flag, List.map (sub.value_binding sub) list) @@ -662,12 +576,8 @@ let default = { case; cases; - class_declaration; class_description; - class_expr; - class_field; class_signature; - class_structure; class_type; class_type_declaration; class_type_field; diff --git a/analysis/vendor/compiler-libs-406/tast_mapper.mli b/analysis/vendor/ml/tast_mapper.mli similarity index 93% rename from analysis/vendor/compiler-libs-406/tast_mapper.mli rename to analysis/vendor/ml/tast_mapper.mli index 2251fa570..4fd87b693 100644 --- a/analysis/vendor/compiler-libs-406/tast_mapper.mli +++ b/analysis/vendor/ml/tast_mapper.mli @@ -22,12 +22,8 @@ type mapper = { case: mapper -> case -> case; cases: mapper -> case list -> case list; - class_declaration: mapper -> class_declaration -> class_declaration; class_description: mapper -> class_description -> class_description; - class_expr: mapper -> class_expr -> class_expr; - class_field: mapper -> class_field -> class_field; class_signature: mapper -> class_signature -> class_signature; - class_structure: mapper -> class_structure -> class_structure; class_type: mapper -> class_type -> class_type; class_type_declaration: mapper -> class_type_declaration -> class_type_declaration; diff --git a/analysis/vendor/compiler-libs-406/tbl.ml b/analysis/vendor/ml/tbl.ml similarity index 100% rename from analysis/vendor/compiler-libs-406/tbl.ml rename to analysis/vendor/ml/tbl.ml diff --git a/analysis/vendor/compiler-libs-406/tbl.mli b/analysis/vendor/ml/tbl.mli similarity index 100% rename from analysis/vendor/compiler-libs-406/tbl.mli rename to analysis/vendor/ml/tbl.mli diff --git a/analysis/vendor/compiler-libs-406/callback.ml b/analysis/vendor/ml/terminfo.ml similarity index 71% rename from analysis/vendor/compiler-libs-406/callback.ml rename to analysis/vendor/ml/terminfo.ml index e0cfb6553..5ed4bb5bc 100644 --- a/analysis/vendor/compiler-libs-406/callback.ml +++ b/analysis/vendor/ml/terminfo.ml @@ -13,15 +13,14 @@ (* *) (**************************************************************************) -(* Registering OCaml values with the C runtime for later callbacks *) +(* Basic interface to the terminfo database *) -external register_named_value : string -> Obj.t -> unit - = "caml_register_named_value" - -let register name v = - register_named_value name (Obj.repr v) - -let register_exception name (exn : exn) = - let exn = Obj.repr exn in - let slot = if Obj.tag exn = Obj.object_tag then exn else Obj.field exn 0 in - register_named_value name slot +type status = + | Uninitialised + | Bad_term + | Good_term of int +;; +external setup : out_channel -> status = "caml_terminfo_setup";; +external backup : int -> unit = "caml_terminfo_backup";; +external standout : bool -> unit = "caml_terminfo_standout";; +external resume : int -> unit = "caml_terminfo_resume";; diff --git a/analysis/vendor/compiler-libs-406/ccomp.mli b/analysis/vendor/ml/terminfo.mli similarity index 67% rename from analysis/vendor/compiler-libs-406/ccomp.mli rename to analysis/vendor/ml/terminfo.mli index 17094ba21..92af80f9b 100644 --- a/analysis/vendor/compiler-libs-406/ccomp.mli +++ b/analysis/vendor/ml/terminfo.mli @@ -13,21 +13,14 @@ (* *) (**************************************************************************) -(* Compiling C files and building C libraries *) +(* Basic interface to the terminfo database *) -val command: string -> int -val run_command: string -> unit -val compile_file: ?output:string -> ?opt:string -> string -> int -val create_archive: string -> string list -> int -val expand_libname: string -> string -val quote_files: string list -> string -val quote_optfile: string option -> string -(*val make_link_options: string list -> string*) - -type link_mode = - | Exe - | Dll - | MainDll - | Partial - -val call_linker: link_mode -> string -> string list -> string -> bool +type status = + | Uninitialised + | Bad_term + | Good_term of int (* number of lines of the terminal *) +;; +external setup : out_channel -> status = "caml_terminfo_setup";; +external backup : int -> unit = "caml_terminfo_backup";; +external standout : bool -> unit = "caml_terminfo_standout";; +external resume : int -> unit = "caml_terminfo_resume";; diff --git a/analysis/vendor/ml/transl_recmodule.ml b/analysis/vendor/ml/transl_recmodule.ml new file mode 100644 index 000000000..99425fbff --- /dev/null +++ b/analysis/vendor/ml/transl_recmodule.ml @@ -0,0 +1,274 @@ +open Types +open Typedtree +open Lambda + +type error = Circular_dependency of Ident.t + +exception Error of Location.t * error +(* Reorder bindings to honor dependencies. *) + +(* Utilities for compiling "module rec" definitions *) + +let undefined_location loc = + let fname, line, char = Location.get_pos_info loc.Location.loc_start in + let fname = Filename.basename fname in + Lconst + (Const_block + ( Lambda.Blk_tuple, + [ + Const_base (Const_string (fname, None)); + Const_base (Const_int line); + Const_base (Const_int char); + ] )) + +let cstr_const = 3 + +let cstr_non_const = 2 + +let init_shape modl = + let add_name x id = + Const_block + (Blk_tuple, [ x; Const_base (Const_string (Ident.name id, None)) ]) + in + let module_tag_info : Lambda.tag_info = + Blk_constructor { name = "Module"; num_nonconst = 2; tag = 0 } + in + let value_tag_info : Lambda.tag_info = + Blk_constructor { name = "value"; num_nonconst = 2; tag = 1 } + in + let rec init_shape_mod env mty = + match Mtype.scrape env mty with + | Mty_ident _ -> raise Not_found + | Mty_alias _ -> + Const_block (value_tag_info, [ Const_pointer (0, Pt_module_alias) ]) + | Mty_signature sg -> + Const_block + ( module_tag_info, + [ Const_block (Blk_tuple, init_shape_struct env sg) ] ) + | Mty_functor _ -> raise Not_found + (* can we do better? *) + and init_shape_struct env sg = + match sg with + | [] -> [] + | Sig_value (id, { val_kind = Val_reg; val_type = ty }) :: rem -> + let init_v = + match Ctype.expand_head env ty with + | { desc = Tarrow (_, _, _, _) } -> + Const_pointer + ( 0, + Pt_constructor + { + name = "Function"; + const = cstr_const; + non_const = cstr_non_const; + } ) + | { desc = Tconstr (p, _, _) } when Path.same p Predef.path_lazy_t -> + Const_pointer + ( 1, + Pt_constructor + { + name = "Lazy"; + const = cstr_const; + non_const = cstr_non_const; + } ) + | _ -> raise Not_found + in + add_name init_v id :: init_shape_struct env rem + | Sig_value (_, { val_kind = Val_prim _ }) :: rem -> + init_shape_struct env rem + | Sig_type (id, tdecl, _) :: rem -> + init_shape_struct (Env.add_type ~check:false id tdecl env) rem + | Sig_typext _ :: _ -> raise Not_found + | Sig_module (id, md, _) :: rem -> + add_name (init_shape_mod env md.md_type) id + :: + init_shape_struct + (Env.add_module_declaration ~check:false id md env) + rem + | Sig_modtype (id, minfo) :: rem -> + init_shape_struct (Env.add_modtype id minfo env) rem + | Sig_class _ :: _ -> assert false + | Sig_class_type _ :: rem -> init_shape_struct env rem + in + try + Some + ( undefined_location modl.mod_loc, + Lconst (init_shape_mod modl.mod_env modl.mod_type) ) + with Not_found -> None + +type binding_status = Undefined | Inprogress | Defined + +let reorder_rec_bindings bindings = + let id = Array.of_list (List.map (fun (id, _, _, _) -> id) bindings) + and loc = Array.of_list (List.map (fun (_, loc, _, _) -> loc) bindings) + and init = Array.of_list (List.map (fun (_, _, init, _) -> init) bindings) + and rhs = Array.of_list (List.map (fun (_, _, _, rhs) -> rhs) bindings) in + let fv = Array.map Lambda.free_variables rhs in + let num_bindings = Array.length id in + let status = Array.make num_bindings Undefined in + let res = ref [] in + let rec emit_binding i = + match status.(i) with + | Defined -> () + | Inprogress -> raise (Error (loc.(i), Circular_dependency id.(i))) + | Undefined -> + if init.(i) = None then ( + status.(i) <- Inprogress; + for j = 0 to num_bindings - 1 do + if IdentSet.mem id.(j) fv.(i) then emit_binding j + done); + res := (id.(i), init.(i), rhs.(i)) :: !res; + status.(i) <- Defined + in + for i = 0 to num_bindings - 1 do + match status.(i) with + | Undefined -> emit_binding i + | Inprogress -> assert false + | Defined -> () + done; + List.rev !res + +type t = Lambda.lambda + +(* Utilities for compiling "module rec" definitions *) + +let bs_init_mod (args : t list) loc : t = + Lprim + (Pccall (Primitive.simple ~name:"#init_mod" ~arity:2 ~alloc:true), args, loc) + +let bs_update_mod (args : t list) loc : t = + Lprim + ( Pccall (Primitive.simple ~name:"#update_mod" ~arity:3 ~alloc:true), + args, + loc ) + +type loc = t + +type shape = t + +type binding = Ident.t * (loc * shape) option * t + +let eval_rec_bindings_aux (bindings : binding list) (cont : t) : t = + let rec bind_inits args acc = + match args with + | [] -> acc + | (_id, None, _rhs) :: rem -> bind_inits rem acc + | (id, Some (loc, shape), _rhs) :: rem -> + Lambda.Llet + ( Strict, + Pgenval, + id, + bs_init_mod [ loc; shape ] Location.none, + bind_inits rem acc ) + in + let rec bind_strict args acc = + match args with + | [] -> acc + | (id, None, rhs) :: rem -> + Lambda.Llet (Strict, Pgenval, id, rhs, bind_strict rem acc) + | (_id, Some _, _rhs) :: rem -> bind_strict rem acc + in + let rec patch_forwards args = + match args with + | [] -> cont + | (_id, None, _rhs) :: rem -> patch_forwards rem + | (id, Some (_loc, shape), rhs) :: rem -> + Lsequence + ( bs_update_mod [ shape; Lvar id; rhs ] Location.none, + patch_forwards rem ) + in + bind_inits bindings (bind_strict bindings (patch_forwards bindings)) + +(* collect all function declarations + if the module creation is just a set of function declarations and consts, + it is good +*) +let rec is_function_or_const_block (lam : Lambda.lambda) acc = + match lam with + | Lprim (Pmakeblock _, args, _) -> + Ext_list.for_all args (fun x -> + match x with + | Lvar id -> Set_ident.mem acc id + | Lfunction _ | Lconst _ -> true + | _ -> false) + | Llet (_, _, id, Lfunction _, cont) -> + is_function_or_const_block cont (Set_ident.add acc id) + | Lletrec (bindings, cont) -> ( + let rec aux_bindings bindings acc = + match bindings with + | [] -> Some acc + | (id, Lambda.Lfunction _) :: rest -> + aux_bindings rest (Set_ident.add acc id) + | (_, _) :: _ -> None + in + match aux_bindings bindings acc with + | None -> false + | Some acc -> is_function_or_const_block cont acc) + | Llet (_, _, _, Lconst _, cont) -> is_function_or_const_block cont acc + | Llet (_, _, id1, Lvar id2, cont) when Set_ident.mem acc id2 -> + is_function_or_const_block cont (Set_ident.add acc id1) + | _ -> false + +let is_strict_or_all_functions (xs : binding list) = + Ext_list.for_all xs (fun (_, opt, rhs) -> + match opt with + | None -> true + | _ -> is_function_or_const_block rhs Set_ident.empty) + +(* Without such optimizations: + + {[ + module rec X : sig + val f : int -> int + end = struct + let f x = x + 1 + end + and Y : sig + val f : int -> int + end = struct + let f x = x + 2 + end + ]} + would generate such rawlambda: + + {[ + (setglobal Debug_tmp! + (let + (X/1002 = (#init_mod [0: "debug_tmp.ml" 15 6] [0: [0: [0: 0a "f"]]]) + Y/1003 = (#init_mod [0: "debug_tmp.ml" 20 6] [0: [0: [0: 0a "f"]]])) + (seq + (#update_mod [0: [0: [0: 0a "f"]]] X/1002 + (let (f/1010 = (function x/1011 (+ x/1011 1))) + (makeblock 0/[f] f/1010))) + (#update_mod [0: [0: [0: 0a "f"]]] Y/1003 + (let (f/1012 = (function x/1013 (+ x/1013 2))) + (makeblock 0/[f] f/1012))) + (makeblock 0/module/exports X/1002 Y/1003)))) + + ]} +*) +let eval_rec_bindings (bindings : binding list) (cont : t) : t = + if is_strict_or_all_functions bindings then + Lambda.Lletrec (Ext_list.map bindings (fun (id, _, rhs) -> (id, rhs)), cont) + else eval_rec_bindings_aux bindings cont + +let compile_recmodule compile_rhs bindings cont = + eval_rec_bindings + (reorder_rec_bindings + (List.map + (fun { mb_id = id; mb_expr = modl; mb_loc = loc; _ } -> + (id, modl.mod_loc, init_shape modl, compile_rhs id modl loc)) + bindings)) + cont + +let report_error ppf = function + | Circular_dependency id -> + Format.fprintf ppf + "@[Cannot safely evaluate the definition@ of the recursively-defined \ + module %a@]" + Printtyp.ident id + +let () = + Location.register_error_of_exn (function + | Error (loc, err) -> Some (Location.error_of_printer loc report_error err) + | _ -> None) diff --git a/analysis/vendor/ml/transl_recmodule.mli b/analysis/vendor/ml/transl_recmodule.mli new file mode 100644 index 000000000..a94a41846 --- /dev/null +++ b/analysis/vendor/ml/transl_recmodule.mli @@ -0,0 +1,29 @@ +(* Copyright (C) 2015 - Hongbo Zhang, Authors of ReScript + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * In addition to the permissions granted to you by the LGPL, you may combine + * or link a "work that uses the Library" with a publicly distributed version + * of this file to produce a combined library or application, then distribute + * that combined work under the terms of your choosing, with no requirement + * to comply with the obligations normally placed on you by section 4 of the + * LGPL version 3 (or the corresponding section of a later version of the LGPL + * should you choose to use a later version). + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) + + +val compile_recmodule : + (Ident.t -> Typedtree.module_expr -> Location.t -> Lambda.lambda) -> + Typedtree.module_binding list -> + Lambda.lambda -> + Lambda.lambda diff --git a/analysis/vendor/ml/translattribute.ml b/analysis/vendor/ml/translattribute.ml new file mode 100644 index 000000000..ac282fdf6 --- /dev/null +++ b/analysis/vendor/ml/translattribute.ml @@ -0,0 +1,119 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Pierre Chambart, OCamlPro *) +(* *) +(* Copyright 2015 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +type t = Parsetree.attribute + +let is_inline_attribute (attr : t) = + match attr with { txt = "inline" }, _ -> true | _ -> false + +let is_inlined_attribute (attr : t) = + match attr with { txt = "inlined" }, _ -> true | _ -> false + +let find_attribute p (attributes : t list) = + let inline_attribute, other_attributes = List.partition p attributes in + let attr = + match inline_attribute with + | [] -> None + | [ attr ] -> Some attr + | _ :: ({ txt; loc }, _) :: _ -> + Location.prerr_warning loc (Warnings.Duplicated_attribute txt); + None + in + (attr, other_attributes) + +let parse_inline_attribute (attr : t option) : Lambda.inline_attribute = + match attr with + | None -> Default_inline + | Some ({ txt; loc }, payload) -> ( + let open Parsetree in + (* the 'inline' and 'inlined' attributes can be used as + [@inline], [@inline never] or [@inline always]. + [@inline] is equivalent to [@inline always] *) + let warning txt = + Warnings.Attribute_payload + (txt, "It must be either empty, 'always' or 'never'") + in + match payload with + | PStr [] -> Always_inline + | PStr [ { pstr_desc = Pstr_eval ({ pexp_desc }, []) } ] -> ( + match pexp_desc with + | Pexp_ident { txt = Longident.Lident "never" } -> Never_inline + | Pexp_ident { txt = Longident.Lident "always" } -> Always_inline + | _ -> + Location.prerr_warning loc (warning txt); + Default_inline) + | _ -> + Location.prerr_warning loc (warning txt); + Default_inline) + +let get_inline_attribute l = + let attr, _ = find_attribute is_inline_attribute l in + parse_inline_attribute attr + +let add_inline_attribute (expr : Lambda.lambda) loc attributes = + match (expr, get_inline_attribute attributes) with + | expr, Default_inline -> expr + | Lfunction ({ attr = { stub = false } as attr } as funct), inline -> + (match attr.inline with + | Default_inline -> () + | Always_inline | Never_inline -> + Location.prerr_warning loc (Warnings.Duplicated_attribute "inline")); + let attr = { attr with inline } in + Lfunction { funct with attr } + | expr, (Always_inline | Never_inline) -> + Location.prerr_warning loc (Warnings.Misplaced_attribute "inline"); + expr + +(* Get the [@inlined] attribute payload (or default if not present). + It also returns the expression without this attribute. This is + used to ensure that this attribute is not misplaced: If it + appears on any expression, it is an error, otherwise it would + have been removed by this function *) +let get_and_remove_inlined_attribute (e : Typedtree.expression) = + let attr, exp_attributes = + find_attribute is_inlined_attribute e.exp_attributes + in + let inlined = parse_inline_attribute attr in + (inlined, { e with exp_attributes }) + +let get_and_remove_inlined_attribute_on_module (e : Typedtree.module_expr) = + let attr, mod_attributes = + find_attribute is_inlined_attribute e.mod_attributes + in + let inlined = parse_inline_attribute attr in + (inlined, { e with mod_attributes }) + +let check_attribute (e : Typedtree.expression) (({ txt; loc }, _) : t) = + match txt with + | "inline" -> ( + match e.exp_desc with + | Texp_function _ -> () + | _ -> Location.prerr_warning loc (Warnings.Misplaced_attribute txt)) + | "inlined" -> + (* Removed by the Texp_apply cases *) + Location.prerr_warning loc (Warnings.Misplaced_attribute txt) + | _ -> () + +let check_attribute_on_module (e : Typedtree.module_expr) + (({ txt; loc }, _) : t) = + match txt with + | "inline" -> ( + match e.mod_desc with + | Tmod_functor _ -> () + | _ -> Location.prerr_warning loc (Warnings.Misplaced_attribute txt)) + | "inlined" -> + (* Removed by the Texp_apply cases *) + Location.prerr_warning loc (Warnings.Misplaced_attribute txt) + | _ -> () diff --git a/analysis/vendor/compiler-libs-406/attr_helper.mli b/analysis/vendor/ml/translattribute.mli similarity index 61% rename from analysis/vendor/compiler-libs-406/attr_helper.mli rename to analysis/vendor/ml/translattribute.mli index 3d7145c3c..03115eb0e 100644 --- a/analysis/vendor/compiler-libs-406/attr_helper.mli +++ b/analysis/vendor/ml/translattribute.mli @@ -2,7 +2,7 @@ (* *) (* OCaml *) (* *) -(* Jeremie Dimino, Jane Street Europe *) +(* Pierre Chambart, OCamlPro *) (* *) (* Copyright 2015 Institut National de Recherche en Informatique et *) (* en Automatique. *) @@ -13,24 +13,18 @@ (* *) (**************************************************************************) -(** Helpers for attributes *) +val check_attribute : Typedtree.expression -> Parsetree.attribute -> unit -open Asttypes -open Parsetree +val check_attribute_on_module : + Typedtree.module_expr -> Parsetree.attribute -> unit -type error = - | Multiple_attributes of string - | No_payload_expected of string +val add_inline_attribute : + Lambda.lambda -> Location.t -> Parsetree.attributes -> Lambda.lambda -(** The [string list] argument of the following functions is a list of - alternative names for the attribute we are looking for. For instance: +val get_inline_attribute : Parsetree.attributes -> Lambda.inline_attribute - {[ - ["foo"; "ocaml.foo"] - ]} *) -val get_no_payload_attribute : string list -> attributes -> string loc option -val has_no_payload_attribute : string list -> attributes -> bool +val get_and_remove_inlined_attribute : + Typedtree.expression -> Lambda.inline_attribute * Typedtree.expression -exception Error of Location.t * error - -val report_error: Format.formatter -> error -> unit +val get_and_remove_inlined_attribute_on_module : + Typedtree.module_expr -> Lambda.inline_attribute * Typedtree.module_expr diff --git a/analysis/vendor/ml/translcore.ml b/analysis/vendor/ml/translcore.ml new file mode 100644 index 000000000..0854908dd --- /dev/null +++ b/analysis/vendor/ml/translcore.ml @@ -0,0 +1,1278 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +(* Translation from typed abstract syntax to lambda terms, + for the core language *) + +open Misc +open Asttypes +open Primitive +open Types +open Typedtree +open Typeopt +open Lambda + +type error = Unknown_builtin_primitive of string | Unreachable_reached + +exception Error of Location.t * error + +(* Forward declaration -- to be filled in by Translmod.transl_module *) +let transl_module = + ref + (fun _cc _rootpath _modl -> assert false + : module_coercion -> Path.t option -> module_expr -> lambda) + +(* Compile an exception/extension definition *) + +let transl_extension_constructor env path ext = + let name = + match path (*!Clflags.for_package*) with + | None -> Ident.name ext.ext_id + | Some p -> Path.name p + in + let loc = ext.ext_loc in + match ext.ext_kind with + | Text_decl _ -> Lprim (Pcreate_extension name, [], loc) + | Text_rebind (path, _lid) -> transl_extension_path ~loc env path + +(* Translation of primitives *) + +type specialized = { + gencomp : Lambda.primitive; + intcomp : Lambda.primitive; + boolcomp : Lambda.primitive; + floatcomp : Lambda.primitive; + stringcomp : Lambda.primitive; + bytescomp : Lambda.primitive; + int64comp : Lambda.primitive; + simplify_constant_constructor : bool; +} + +let arity2 name : Lambda.primitive = + Lambda.Pccall (Primitive.simple ~name ~arity:2 ~alloc:true) + +let comparisons_table = + create_hashtable 11 + [ + ( "%equal", + { + gencomp = + Pccall (Primitive.simple ~name:"caml_equal" ~arity:2 ~alloc:true); + intcomp = Pintcomp Ceq; + boolcomp = + Pccall + (Primitive.simple ~name:"caml_bool_equal" ~arity:2 ~alloc:false); + floatcomp = Pfloatcomp Ceq; + stringcomp = + Pccall + (Primitive.simple ~name:"caml_string_equal" ~arity:2 ~alloc:false); + bytescomp = + Pccall + (Primitive.simple ~name:"caml_bytes_equal" ~arity:2 ~alloc:false); + int64comp = Pbintcomp (Pint64, Ceq); + simplify_constant_constructor = true; + } ); + ( "%notequal", + { + gencomp = + Pccall (Primitive.simple ~name:"caml_notequal" ~arity:2 ~alloc:true); + intcomp = Pintcomp Cneq; + boolcomp = + Pccall + (Primitive.simple ~name:"caml_bool_notequal" ~arity:2 ~alloc:false); + floatcomp = Pfloatcomp Cneq; + stringcomp = + Pccall + (Primitive.simple ~name:"caml_string_notequal" ~arity:2 + ~alloc:false); + bytescomp = + Pccall + (Primitive.simple ~name:"caml_bytes_notequal" ~arity:2 + ~alloc:false); + int64comp = Pbintcomp (Pint64, Cneq); + simplify_constant_constructor = true; + } ); + ( "%lessthan", + { + gencomp = + Pccall (Primitive.simple ~name:"caml_lessthan" ~arity:2 ~alloc:true); + intcomp = Pintcomp Clt; + boolcomp = + Pccall + (Primitive.simple ~name:"caml_bool_lessthan" ~arity:2 ~alloc:false); + floatcomp = Pfloatcomp Clt; + stringcomp = + Pccall + (Primitive.simple ~name:"caml_string_lessthan" ~arity:2 + ~alloc:false); + bytescomp = + Pccall + (Primitive.simple ~name:"caml_bytes_lessthan" ~arity:2 + ~alloc:false); + int64comp = Pbintcomp (Pint64, Clt); + simplify_constant_constructor = false; + } ); + ( "%greaterthan", + { + gencomp = + Pccall + (Primitive.simple ~name:"caml_greaterthan" ~arity:2 ~alloc:true); + intcomp = Pintcomp Cgt; + boolcomp = + Pccall + (Primitive.simple ~name:"caml_bool_greaterthan" ~arity:2 + ~alloc:false); + floatcomp = Pfloatcomp Cgt; + stringcomp = + Pccall + (Primitive.simple ~name:"caml_string_greaterthan" ~arity:2 + ~alloc:false); + bytescomp = + Pccall + (Primitive.simple ~name:"caml_bytes_greaterthan" ~arity:2 + ~alloc:false); + int64comp = Pbintcomp (Pint64, Cgt); + simplify_constant_constructor = false; + } ); + ( "%lessequal", + { + gencomp = + Pccall + (Primitive.simple ~name:"caml_lessequal" ~arity:2 ~alloc:true); + intcomp = Pintcomp Cle; + boolcomp = + Pccall + (Primitive.simple ~name:"caml_bool_lessequal" ~arity:2 + ~alloc:false); + floatcomp = Pfloatcomp Cle; + stringcomp = + Pccall + (Primitive.simple ~name:"caml_string_lessequal" ~arity:2 + ~alloc:false); + bytescomp = + Pccall + (Primitive.simple ~name:"caml_bytes_lessequal" ~arity:2 + ~alloc:false); + int64comp = Pbintcomp (Pint64, Cle); + simplify_constant_constructor = false; + } ); + ( "%greaterequal", + { + gencomp = + Pccall + (Primitive.simple ~name:"caml_greaterequal" ~arity:2 ~alloc:true); + intcomp = Pintcomp Cge; + boolcomp = + Pccall + (Primitive.simple ~name:"caml_bool_greaterequal" ~arity:2 + ~alloc:false); + floatcomp = Pfloatcomp Cge; + stringcomp = + Pccall + (Primitive.simple ~name:"caml_string_greaterequal" ~arity:2 + ~alloc:false); + bytescomp = + Pccall + (Primitive.simple ~name:"caml_bytes_greaterequal" ~arity:2 + ~alloc:false); + int64comp = Pbintcomp (Pint64, Cge); + simplify_constant_constructor = false; + } ); + ( "%compare", + { + gencomp = + Pccall (Primitive.simple ~name:"caml_compare" ~arity:2 ~alloc:true); + (* Not unboxed since the comparison is done directly on tagged int *) + intcomp = + Pccall + (Primitive.simple ~name:"caml_int_compare" ~arity:2 ~alloc:false); + boolcomp = + Pccall + (Primitive.simple ~name:"caml_bool_compare" ~arity:2 ~alloc:false); + floatcomp = + Pccall + (Primitive.simple ~name:"caml_float_compare" ~arity:2 ~alloc:false); + stringcomp = + Pccall + (Primitive.simple ~name:"caml_string_compare" ~arity:2 + ~alloc:false); + bytescomp = + Pccall + (Primitive.simple ~name:"caml_bytes_compare" ~arity:2 ~alloc:false); + int64comp = + Pccall + (Primitive.simple ~name:"caml_int64_compare" ~arity:2 ~alloc:false); + simplify_constant_constructor = false; + } ); + ( "%bs_max", + { + gencomp = arity2 "caml_max"; + bytescomp = arity2 "caml_max"; + (* FIXME bytescomp*) + intcomp = arity2 "caml_int_max"; + boolcomp = arity2 "caml_bool_max"; + floatcomp = arity2 "caml_float_max"; + stringcomp = arity2 "caml_string_max"; + int64comp = arity2 "caml_int64_max"; + simplify_constant_constructor = false; + } ); + ( "%bs_min", + { + gencomp = arity2 "caml_min"; + bytescomp = arity2 "caml_min"; + intcomp = arity2 "caml_int_min"; + boolcomp = arity2 "caml_bool_min"; + floatcomp = arity2 "caml_float_min"; + stringcomp = arity2 "caml_string_min"; + int64comp = arity2 "caml_int64_min"; + simplify_constant_constructor = false; + } ); + ( "%bs_equal_null", + { + gencomp = arity2 "caml_equal_null"; + bytescomp = arity2 "caml_equal_null"; + (* FIXME*) + intcomp = arity2 "caml_int_equal_null"; + boolcomp = arity2 "caml_bool_equal_null"; + floatcomp = arity2 "caml_float_equal_null"; + stringcomp = arity2 "caml_string_equal_null"; + int64comp = arity2 "caml_int64_equal_null"; + simplify_constant_constructor = true; + } ); + ( "%bs_equal_undefined", + { + gencomp = arity2 "caml_equal_undefined"; + bytescomp = arity2 "caml_equal_undefined"; + (* FIXME*) + intcomp = arity2 "caml_int_equal_undefined"; + boolcomp = arity2 "caml_bool_equal_undefined"; + floatcomp = arity2 "caml_float_equal_undefined"; + stringcomp = arity2 "caml_string_equal_undefined"; + int64comp = arity2 "caml_int64_equal_undefined"; + simplify_constant_constructor = true; + } ); + ( "%bs_equal_nullable", + { + gencomp = arity2 "caml_equal_nullable"; + bytescomp = arity2 "caml_equal_nullable"; + (* FIXME *) + intcomp = arity2 "caml_int_equal_nullable"; + boolcomp = arity2 "caml_bool_equal_nullable"; + floatcomp = arity2 "caml_float_equal_nullable"; + stringcomp = arity2 "caml_string_equal_nullable"; + int64comp = arity2 "caml_int64_equal_nullable"; + simplify_constant_constructor = true; + } ); + ] + +let primitives_table = + create_hashtable 57 + [ + ("%identity", Pidentity); + ("%bytes_to_string", Pbytes_to_string); + ("%ignore", Pignore); + ("%revapply", Prevapply); + ("%apply", Pdirapply); + ("%loc_LOC", Ploc Loc_LOC); + ("%loc_FILE", Ploc Loc_FILE); + ("%loc_LINE", Ploc Loc_LINE); + ("%loc_POS", Ploc Loc_POS); + ("%loc_MODULE", Ploc Loc_MODULE); + (* BEGIN Triples for ref data type *) + ("%bs_ref_setfield0", Psetfield (0, Lambda.ref_field_set_info)); + ("%bs_ref_field0", Pfield (0, Lambda.ref_field_info)); + ("%makemutable", Pmakeblock Lambda.ref_tag_info); + ("%incr", Poffsetref 1); + ("%decr", Poffsetref (-1)); + (* Finish Triples for ref data type *) + ("%field0", Pfield (0, Fld_tuple)); + ("%field1", Pfield (1, Fld_tuple)); + ("%obj_field", Parrayrefu); + ("%obj_set_field", Parraysetu); + ("%obj_is_int", Pisint); + ("%raise", Praise Raise_regular); + ("%reraise", Praise Raise_reraise); + ("%raise_notrace", Praise Raise_notrace); + ("%sequand", Psequand); + ("%sequor", Psequor); + ("%boolnot", Pnot); + ("%big_endian", Pctconst Big_endian); + ("%backend_type", Pctconst Backend_type); + ("%word_size", Pctconst Word_size); + ("%int_size", Pctconst Int_size); + ("%max_wosize", Pctconst Max_wosize); + ("%ostype_unix", Pctconst Ostype_unix); + ("%ostype_win32", Pctconst Ostype_win32); + ("%ostype_cygwin", Pctconst Ostype_cygwin); + ("%negint", Pnegint); + ("%succint", Poffsetint 1); + ("%predint", Poffsetint (-1)); + ("%addint", Paddint); + ("%subint", Psubint); + ("%mulint", Pmulint); + ("%divint", Pdivint Safe); + ("%modint", Pmodint Safe); + ("%andint", Pandint); + ("%orint", Porint); + ("%xorint", Pxorint); + ("%lslint", Plslint); + ("%lsrint", Plsrint); + ("%asrint", Pasrint); + ("%eq", Pintcomp Ceq); + ("%noteq", Pintcomp Cneq); + ("%ltint", Pintcomp Clt); + ("%leint", Pintcomp Cle); + ("%gtint", Pintcomp Cgt); + ("%geint", Pintcomp Cge); + ("%intoffloat", Pintoffloat); + ("%floatofint", Pfloatofint); + ("%negfloat", Pnegfloat); + ("%absfloat", Pabsfloat); + ("%addfloat", Paddfloat); + ("%subfloat", Psubfloat); + ("%mulfloat", Pmulfloat); + ("%divfloat", Pdivfloat); + ("%eqfloat", Pfloatcomp Ceq); + ("%noteqfloat", Pfloatcomp Cneq); + ("%ltfloat", Pfloatcomp Clt); + ("%lefloat", Pfloatcomp Cle); + ("%gtfloat", Pfloatcomp Cgt); + ("%gefloat", Pfloatcomp Cge); + ("%string_length", Pstringlength); + ("%string_safe_get", Pstringrefs); + ("%string_unsafe_get", Pstringrefu); + ("%bytes_length", Pbyteslength); + ("%bytes_safe_get", Pbytesrefs); + ("%bytes_safe_set", Pbytessets); + ("%bytes_unsafe_get", Pbytesrefu); + ("%bytes_unsafe_set", Pbytessetu); + ("%array_length", Parraylength); + ("%array_safe_get", Parrayrefs); + ("%array_safe_set", Parraysets); + ("%array_unsafe_get", Parrayrefu); + ("%array_unsafe_set", Parraysetu); + ("%floatarray_length", Parraylength); + ("%floatarray_safe_get", Parrayrefs); + ("%floatarray_safe_set", Parraysets); + ("%floatarray_unsafe_get", Parrayrefu); + ("%floatarray_unsafe_set", Parraysetu); + ("%lazy_force", Plazyforce); + ("%int64_of_int", Pbintofint Pint64); + ("%int64_to_int", Pintofbint Pint64); + ("%int64_neg", Pnegbint Pint64); + ("%int64_add", Paddbint Pint64); + ("%int64_sub", Psubbint Pint64); + ("%int64_mul", Pmulbint Pint64); + ("%int64_div", Pdivbint { size = Pint64; is_safe = Safe }); + ("%int64_mod", Pmodbint { size = Pint64; is_safe = Safe }); + ("%int64_and", Pandbint Pint64); + ("%int64_or", Porbint Pint64); + ("%int64_xor", Pxorbint Pint64); + ("%int64_lsl", Plslbint Pint64); + ("%int64_lsr", Plsrbint Pint64); + ("%int64_asr", Pasrbint Pint64); + ("%nativeint_of_int32", Pcvtbint (Pint32, Pnativeint)); + ("%nativeint_to_int32", Pcvtbint (Pnativeint, Pint32)); + ("%int64_of_int32", Pcvtbint (Pint32, Pint64)); + ("%int64_to_int32", Pcvtbint (Pint64, Pint32)); + ("%int64_of_nativeint", Pcvtbint (Pnativeint, Pint64)); + ("%int64_to_nativeint", Pcvtbint (Pint64, Pnativeint)); + ("%opaque", Popaque); + ("%uncurried_apply", Puncurried_apply); + ] + +let find_primitive prim_name = Hashtbl.find primitives_table prim_name + +let specialize_comparison + ({ gencomp; intcomp; floatcomp; stringcomp; bytescomp; int64comp; boolcomp } : + specialized) env ty = + match () with + | () + when is_base_type env ty Predef.path_int + || is_base_type env ty Predef.path_char + || maybe_pointer_type env ty = Immediate -> + intcomp + | () when is_base_type env ty Predef.path_float -> floatcomp + | () when is_base_type env ty Predef.path_string -> stringcomp + | () when is_base_type env ty Predef.path_bytes -> bytescomp + | () when is_base_type env ty Predef.path_int64 -> int64comp + | () when is_base_type env ty Predef.path_bool -> boolcomp + | () -> gencomp + +(* Specialize a primitive from available type information, + raise Not_found if primitive is unknown *) + +let specialize_primitive p env ty (* ~has_constant_constructor *) = + try + let table = Hashtbl.find comparisons_table p.prim_name in + match is_function_type env ty with + | Some (lhs, _rhs) -> specialize_comparison table env lhs + | None -> table.gencomp + with Not_found -> find_primitive p.prim_name + +(* Eta-expand a primitive *) + +let transl_primitive loc p env ty = + let prim = + try specialize_primitive p env ty (* ~has_constant_constructor:false *) + with Not_found -> Pccall p + in + match prim with + | Plazyforce -> + let parm = Ident.create "prim" in + Lfunction + { + params = [ parm ]; + body = Matching.inline_lazy_force (Lvar parm) Location.none; + loc; + attr = default_stub_attribute; + } + | Ploc kind -> ( + let lam = lam_of_loc kind loc in + match p.prim_arity with + | 0 -> lam + | 1 -> + (* TODO: we should issue a warning ? *) + let param = Ident.create "prim" in + Lfunction + { + params = [ param ]; + attr = default_stub_attribute; + loc; + body = Lprim (Pmakeblock Blk_tuple, [ lam; Lvar param ], loc); + } + | _ -> assert false) + | _ -> + let rec make_params n total = + if n <= 0 then [] + else + Ident.create ("prim" ^ string_of_int (total - n)) + :: make_params (n - 1) total + in + let prim_arity = p.prim_arity in + if prim_arity = 0 then Lprim (prim, [], loc) + else + let params = + if prim_arity = 1 then [ Ident.create "prim" ] + else make_params prim_arity prim_arity + in + Lfunction + { + params; + attr = default_stub_attribute; + loc; + body = Lprim (prim, List.map (fun id -> Lvar id) params, loc); + } + +let transl_primitive_application loc prim env ty args = + let prim_name = prim.prim_name in + try + match args with + | [ arg1; _ ] + when is_base_type env arg1.exp_type Predef.path_bool + && Hashtbl.mem comparisons_table prim_name -> + (Hashtbl.find comparisons_table prim_name).boolcomp + | _ -> + let has_constant_constructor = + match args with + | [ + _; + { + exp_desc = Texp_construct (_, { cstr_tag = Cstr_constant _ }, _); + }; + ] + | [ + { + exp_desc = Texp_construct (_, { cstr_tag = Cstr_constant _ }, _); + }; + _; + ] + | [ _; { exp_desc = Texp_variant (_, None) } ] + | [ { exp_desc = Texp_variant (_, None) }; _ ] -> + true + | _ -> false + in + if has_constant_constructor then + match Hashtbl.find_opt comparisons_table prim_name with + | Some table when table.simplify_constant_constructor -> table.intcomp + | Some _ | None -> specialize_primitive prim env ty + (* ~has_constant_constructor*) + else specialize_primitive prim env ty + with Not_found -> + if String.length prim_name > 0 && prim_name.[0] = '%' then + raise (Error (loc, Unknown_builtin_primitive prim_name)); + Pccall prim + +(* To propagate structured constants *) + +exception Not_constant + +let extract_constant = function + | Lconst sc -> sc + | _ -> raise_notrace Not_constant + +(* Push the default values under the functional abstractions *) +(* Also push bindings of module patterns, since this sound *) + +type binding = + | Bind_value of value_binding list + | Bind_module of Ident.t * string loc * module_expr + +let rec push_defaults loc bindings cases partial = + match cases with + | [ + { + c_lhs = pat; + c_guard = None; + c_rhs = + { exp_desc = Texp_function { arg_label; param; cases; partial } } as exp; + }; + ] -> + let cases = push_defaults exp.exp_loc bindings cases partial in + [ + { + c_lhs = pat; + c_guard = None; + c_rhs = + { + exp with + exp_desc = Texp_function { arg_label; param; cases; partial }; + }; + }; + ] + | [ + { + c_lhs = pat; + c_guard = None; + c_rhs = + { + exp_attributes = [ ({ txt = "#default" }, _) ]; + exp_desc = + Texp_let (Nonrecursive, binds, ({ exp_desc = Texp_function _ } as e2)); + }; + }; + ] -> + push_defaults loc + (Bind_value binds :: bindings) + [ { c_lhs = pat; c_guard = None; c_rhs = e2 } ] + partial + | [ + { + c_lhs = pat; + c_guard = None; + c_rhs = + { + exp_attributes = [ ({ txt = "#modulepat" }, _) ]; + exp_desc = + Texp_letmodule + (id, name, mexpr, ({ exp_desc = Texp_function _ } as e2)); + }; + }; + ] -> + push_defaults loc + (Bind_module (id, name, mexpr) :: bindings) + [ { c_lhs = pat; c_guard = None; c_rhs = e2 } ] + partial + | [ case ] -> + let exp = + List.fold_left + (fun exp binds -> + { + exp with + exp_desc = + (match binds with + | Bind_value binds -> Texp_let (Nonrecursive, binds, exp) + | Bind_module (id, name, mexpr) -> + Texp_letmodule (id, name, mexpr, exp)); + }) + case.c_rhs bindings + in + [ { case with c_rhs = exp } ] + | { c_lhs = pat; c_rhs = exp; c_guard = _ } :: _ when bindings <> [] -> + let param = Typecore.name_pattern "param" cases in + let name = Ident.name param in + let exp = + { + exp with + exp_loc = loc; + exp_desc = + Texp_match + ( { + exp with + exp_type = pat.pat_type; + exp_desc = + Texp_ident + ( Path.Pident param, + mknoloc (Longident.Lident name), + { + val_type = pat.pat_type; + val_kind = Val_reg; + val_attributes = []; + Types.val_loc = Location.none; + } ); + }, + cases, + [], + partial ); + } + in + push_defaults loc bindings + [ + { + c_lhs = { pat with pat_desc = Tpat_var (param, mknoloc name) }; + c_guard = None; + c_rhs = exp; + }; + ] + Total + | _ -> cases + + + +(* Assertions *) + +let assert_failed exp = + let fname, line, char = + Location.get_pos_info exp.exp_loc.Location.loc_start + in + let fname = Filename.basename fname in + Lprim + ( Praise Raise_regular, + [ + Lprim + ( Pmakeblock Blk_extension, + [ + transl_normal_path Predef.path_assert_failure; + Lconst + (Const_block + ( Blk_tuple, + [ + Const_base (Const_string (fname, None)); + Const_base (Const_int line); + Const_base (Const_int char); + ] )); + ], + exp.exp_loc ); + ], + exp.exp_loc ) + +let rec cut n l = + if n = 0 then ([], l) + else + match l with + | [] -> failwith "Translcore.cut" + | a :: l -> + let l1, l2 = cut (n - 1) l in + (a :: l1, l2) + +(* Translation of expressions *) + +let try_ids = Hashtbl.create 8 + +let has_async_attribute exp = exp.exp_attributes |> List.exists (fun ({txt}, _payload) -> txt = "res.async") + +let rec transl_exp e = + List.iter (Translattribute.check_attribute e) e.exp_attributes; + transl_exp0 e + +and transl_exp0 (e : Typedtree.expression) : Lambda.lambda = + match e.exp_desc with + | Texp_ident (_, _, { val_kind = Val_prim p }) -> + transl_primitive e.exp_loc p e.exp_env e.exp_type + | Texp_ident (path, _, { val_kind = Val_reg }) -> + transl_value_path ~loc:e.exp_loc e.exp_env path + | Texp_constant cst -> Lconst (Const_base cst) + | Texp_let (rec_flag, pat_expr_list, body) -> + transl_let rec_flag pat_expr_list (transl_exp body) + | Texp_function { arg_label = _; param; cases; partial } -> + let async = has_async_attribute e in + let params, body, return_unit = + let pl = push_defaults e.exp_loc [] cases partial in + transl_function e.exp_loc partial param pl + in + let attr = + { + default_function_attribute with + inline = Translattribute.get_inline_attribute e.exp_attributes; + async; + return_unit; + } + in + let loc = e.exp_loc in + Lfunction { params; body; attr; loc } + | Texp_apply + ( ({ + exp_desc = Texp_ident (_, _, { val_kind = Val_prim p }); + exp_type = prim_type; + } as funct), + oargs ) + when List.length oargs >= p.prim_arity + && List.for_all (fun (_, arg) -> arg <> None) oargs -> ( + let args, args' = cut p.prim_arity oargs in + let wrap f = + if args' = [] then f + else + let inlined, _ = + Translattribute.get_and_remove_inlined_attribute funct + in + transl_apply ~inlined f args' e.exp_loc + in + let args = + List.map (function _, Some x -> x | _ -> assert false) args + in + let argl = transl_list args in + let prim = + transl_primitive_application e.exp_loc p e.exp_env prim_type args + in + match (prim, args) with + | Praise k, [ _ ] -> + let targ = List.hd argl in + let k = + match (k, targ) with + | Raise_regular, Lvar id when Hashtbl.mem try_ids id -> + Raise_reraise + | _ -> k + in + wrap (Lprim (Praise k, [ targ ], e.exp_loc)) + | Ploc kind, [] -> lam_of_loc kind e.exp_loc + | Ploc kind, [ arg1 ] -> + let lam = lam_of_loc kind arg1.exp_loc in + Lprim (Pmakeblock Blk_tuple, lam :: argl, e.exp_loc) + | Ploc _, _ -> assert false + | _, _ -> ( + match (prim, argl) with + | Plazyforce, [ a ] -> wrap (Matching.inline_lazy_force a e.exp_loc) + | Plazyforce, _ -> assert false + | _ -> + wrap (Lprim (prim, argl, e.exp_loc)) + )) + | Texp_apply (funct, oargs) -> + let inlined, funct = + Translattribute.get_and_remove_inlined_attribute funct + in + transl_apply ~inlined (transl_exp funct) oargs e.exp_loc + | Texp_match (arg, pat_expr_list, exn_pat_expr_list, partial) -> + transl_match e arg pat_expr_list exn_pat_expr_list partial + | Texp_try (body, pat_expr_list) -> + let id = Typecore.name_pattern "exn" pat_expr_list in + Ltrywith + ( transl_exp body, + id, + Matching.for_trywith (Lvar id) (transl_cases_try pat_expr_list) ) + | Texp_tuple el -> ( + let ll = transl_list el in + try Lconst (Const_block (Blk_tuple, List.map extract_constant ll)) + with Not_constant -> Lprim (Pmakeblock Blk_tuple, ll, e.exp_loc)) + | Texp_construct ({ txt = Lident "false" }, _, []) -> Lconst Const_false + | Texp_construct ({ txt = Lident "true" }, _, []) -> Lconst Const_true + | Texp_construct ({ txt = Lident "Function$"}, _, [expr]) -> + (* ReScript uncurried encoding *) + let loc = expr.exp_loc in + let lambda = transl_exp expr in + let arity_s = Ast_uncurried.uncurried_type_get_arity ~env:e.exp_env e.exp_type |> string_of_int in + let prim = + Primitive.make ~name:"#fn_mk" ~alloc:true ~native_name:arity_s + ~native_repr_args:[ Same_as_ocaml_repr ] + ~native_repr_res:Same_as_ocaml_repr + in + Lprim + ( Pccall prim + (* could be replaced with Opaque in the future except arity 0*), + [ lambda ], + loc ) + | Texp_construct (lid, cstr, args) -> ( + let ll = transl_list args in + if cstr.cstr_inlined <> None then + match ll with [ x ] -> x | _ -> assert false + else + match cstr.cstr_tag with + | Cstr_constant n -> + Lconst + (Const_pointer + ( n, + match lid.txt with + | Longident.Ldot (Longident.Lident "*predef*", "None") + | Longident.Lident "None" + when Datarepr.constructor_has_optional_shape cstr -> + Pt_shape_none + | _ -> + if Datarepr.constructor_has_optional_shape cstr then + Pt_shape_none + else + Pt_constructor + { + name = cstr.cstr_name; + const = cstr.cstr_consts; + non_const = cstr.cstr_nonconsts; + } )) + | Cstr_unboxed -> ( match ll with [ v ] -> v | _ -> assert false) + | Cstr_block n -> ( + let tag_info : Lambda.tag_info = + if Datarepr.constructor_has_optional_shape cstr then + match args with + | [ arg ] + when Typeopt.cannot_inhabit_none_like_value arg.exp_type + arg.exp_env -> + (* Format.fprintf Format.err_formatter "@[special boxingl@]@."; *) + Blk_some_not_nested + | _ -> Blk_some + else + Blk_constructor + { + name = cstr.cstr_name; + num_nonconst = cstr.cstr_nonconsts; + tag = n; + } + in + try Lconst (Const_block (tag_info, List.map extract_constant ll)) + with Not_constant -> Lprim (Pmakeblock tag_info, ll, e.exp_loc)) + | Cstr_extension (path, _) -> + Lprim + ( Pmakeblock Blk_extension, + transl_extension_path e.exp_env path :: ll, + e.exp_loc )) + | Texp_extension_constructor (_, path) -> transl_extension_path e.exp_env path + | Texp_variant (l, arg) -> ( + let tag = Btype.hash_variant l in + match arg with + | None -> Lconst (Const_pointer (tag, Pt_variant { name = l })) + | Some arg -> ( + let lam = transl_exp arg in + let tag_info = Blk_poly_var l in + try + Lconst + (Const_block + (tag_info, [ Const_base (Const_int tag); extract_constant lam ])) + with Not_constant -> + Lprim + ( Pmakeblock tag_info, + [ Lconst (Const_base (Const_int tag)); lam ], + e.exp_loc ))) + | Texp_record { fields; representation; extended_expression } -> + transl_record e.exp_loc e.exp_env fields representation + extended_expression + | Texp_field (arg, _, lbl) -> ( + let targ = transl_exp arg in + match lbl.lbl_repres with + | Record_float_unused -> assert false + | Record_regular | Record_optional_labels _ -> + Lprim + (Pfield (lbl.lbl_pos, !Lambda.fld_record lbl), [ targ ], e.exp_loc) + | Record_inlined _ -> + Lprim + ( Pfield (lbl.lbl_pos, Fld_record_inline { name = lbl.lbl_name }), + [ targ ], + e.exp_loc ) + | Record_unboxed _ -> targ + | Record_extension -> + Lprim + ( Pfield + (lbl.lbl_pos + 1, Fld_record_extension { name = lbl.lbl_name }), + [ targ ], + e.exp_loc )) + | Texp_setfield (arg, _, lbl, newval) -> + let access = + match lbl.lbl_repres with + | Record_float_unused -> assert false + | Record_regular | Record_optional_labels _ -> + Psetfield (lbl.lbl_pos, !Lambda.fld_record_set lbl) + | Record_inlined _ -> + Psetfield (lbl.lbl_pos, Fld_record_inline_set lbl.lbl_name) + | Record_unboxed _ -> assert false + | Record_extension -> + Psetfield (lbl.lbl_pos + 1, Fld_record_extension_set lbl.lbl_name) + in + Lprim (access, [ transl_exp arg; transl_exp newval ], e.exp_loc) + | Texp_array expr_list -> + let ll = transl_list expr_list in + Lprim (Pmakearray Mutable, ll, e.exp_loc) + | Texp_ifthenelse (cond, ifso, Some ifnot) -> + Lifthenelse (transl_exp cond, transl_exp ifso, transl_exp ifnot) + | Texp_ifthenelse (cond, ifso, None) -> + Lifthenelse (transl_exp cond, transl_exp ifso, lambda_unit) + | Texp_sequence (expr1, expr2) -> + Lsequence (transl_exp expr1, transl_exp expr2) + | Texp_while (cond, body) -> Lwhile (transl_exp cond, transl_exp body) + | Texp_for (param, _, low, high, dir, body) -> + Lfor (param, transl_exp low, transl_exp high, dir, transl_exp body) + | Texp_send (expr, Tmeth_name nm, _) -> + let obj = transl_exp expr in + Lsend (nm, obj, e.exp_loc) + | Texp_new _ | Texp_instvar _ | Texp_setinstvar _ | Texp_override _ -> + assert false + | Texp_letmodule (id, _loc, modl, body) -> + let defining_expr = !transl_module Tcoerce_none None modl in + Llet (Strict, Pgenval, id, defining_expr, transl_exp body) + | Texp_letexception (cd, body) -> + Llet + ( Strict, + Pgenval, + cd.ext_id, + transl_extension_constructor e.exp_env None cd, + transl_exp body ) + | Texp_pack modl -> !transl_module Tcoerce_none None modl + | Texp_assert { exp_desc = Texp_construct (_, { cstr_name = "false" }, _) } -> + if !Clflags.no_assert_false then Lambda.lambda_assert_false + else assert_failed e + | Texp_assert cond -> + if !Clflags.noassert then lambda_unit + else Lifthenelse (transl_exp cond, lambda_unit, assert_failed e) + | Texp_lazy e -> + (* when e needs no computation (constants, identifiers, ...), we + optimize the translation just as Lazy.lazy_from_val would + do *) + Lprim (Pmakeblock Blk_lazy_general, [ transl_exp e ], e.exp_loc) + | Texp_object () -> assert false + | Texp_unreachable -> raise (Error (e.exp_loc, Unreachable_reached)) + +and transl_list expr_list = List.map transl_exp expr_list + +and transl_guard guard rhs = + let expr = transl_exp rhs in + match guard with + | None -> expr + | Some cond -> Lifthenelse (transl_exp cond, expr, staticfail) + +and transl_case { c_lhs; c_guard; c_rhs } = (c_lhs, transl_guard c_guard c_rhs) + +and transl_cases cases = + let cases = + Ext_list.filter cases (fun c -> c.c_rhs.exp_desc <> Texp_unreachable) + in + List.map transl_case cases + +and transl_case_try { c_lhs; c_guard; c_rhs } = + match c_lhs.pat_desc with + | Tpat_var (id, _) | Tpat_alias (_, id, _) -> + Hashtbl.replace try_ids id (); + Misc.try_finally + (fun () -> (c_lhs, transl_guard c_guard c_rhs)) + (fun () -> Hashtbl.remove try_ids id) + | _ -> (c_lhs, transl_guard c_guard c_rhs) + +and transl_cases_try cases = + let cases = + Ext_list.filter cases (fun c -> c.c_rhs.exp_desc <> Texp_unreachable) + in + List.map transl_case_try cases + +and transl_apply ?(inlined = Default_inline) lam sargs loc = + let lapply funct args = + match funct with + (* Attention: This may not be what we need to change the application arity*) + | Lapply ap -> Lapply { ap with ap_args = ap.ap_args @ args; ap_loc = loc } + | lexp -> + Lapply + { ap_loc = loc; ap_func = lexp; ap_args = args; ap_inlined = inlined } + in + let rec build_apply lam args = function + | (None, optional) :: l -> + let defs = ref [] in + let protect name lam = + match lam with + | Lvar _ | Lconst _ -> lam + | _ -> + let id = Ident.create name in + defs := (id, lam) :: !defs; + Lvar id + in + let args, args' = + if List.for_all (fun (_, opt) -> opt) args then ([], args) + else (args, []) + in + let lam = + if args = [] then lam else lapply lam (List.rev_map fst args) + in + let handle = protect "func" lam + and l = + List.map (fun (arg, opt) -> (may_map (protect "arg") arg, opt)) l + and id_arg = Ident.create "param" in + let body = + match build_apply handle ((Lvar id_arg, optional) :: args') l with + | Lfunction { params = ids; body = lam; attr; loc } -> + Lfunction { params = id_arg :: ids; body = lam; attr; loc } + | lam -> + Lfunction + { + params = [ id_arg ]; + body = lam; + attr = default_stub_attribute; + loc; + } + in + List.fold_left + (fun body (id, lam) -> Llet (Strict, Pgenval, id, lam, body)) + body !defs + | (Some arg, optional) :: l -> build_apply lam ((arg, optional) :: args) l + | [] -> lapply lam (List.rev_map fst args) + in + (build_apply lam [] + (List.map + (fun (l, x) -> (may_map transl_exp x, Btype.is_optional l)) + sargs) + : Lambda.lambda) + +and transl_function loc partial param cases = + match cases with + | [ + { + c_lhs = pat; + c_guard = None; + c_rhs = + { + exp_desc = + Texp_function + { arg_label = _; param = param'; cases; partial = partial' }; + } as exp; + }; + ] + when Parmatch.inactive ~partial pat && not (exp |> has_async_attribute) -> + let params, body, return_unit = + transl_function exp.exp_loc partial' param' cases + in + ( param :: params, + Matching.for_function loc None (Lvar param) [ (pat, body) ] partial, + return_unit ) + | { c_rhs = { exp_env; exp_type }; _ } :: _ -> + ( [ param ], + Matching.for_function loc None (Lvar param) (transl_cases cases) partial, + is_base_type exp_env exp_type Predef.path_unit ) + | _ -> assert false + +and transl_let rec_flag pat_expr_list body = + match rec_flag with + | Nonrecursive -> + let rec transl = function + | [] -> body + | { vb_pat = pat; vb_expr = expr; vb_attributes = attr; vb_loc } :: rem + -> + let lam = transl_exp expr in + let lam = Translattribute.add_inline_attribute lam vb_loc attr in + Matching.for_let pat.pat_loc lam pat (transl rem) + in + transl pat_expr_list + | Recursive -> + let transl_case { vb_expr = expr; vb_attributes; vb_loc; vb_pat = pat } = + let id = + match pat.pat_desc with + | Tpat_var (id, _) -> id + | Tpat_alias ({ pat_desc = Tpat_any }, id, _) -> id + | _ -> assert false + (* Illegal_letrec_pat + Only variables are allowed as left-hand side of `let rec' + *) + in + let lam = transl_exp expr in + let lam = + Translattribute.add_inline_attribute lam vb_loc vb_attributes + in + (id, lam) + in + Lletrec (Ext_list.map pat_expr_list transl_case, body) + +and transl_record loc env fields repres opt_init_expr = + match (opt_init_expr, repres, fields) with + | None, Record_unboxed _, [| ({ lbl_name; lbl_loc }, Overridden (_, expr)) |] + -> + (* ReScript uncurried encoding *) + let loc = lbl_loc in + let lambda = transl_exp expr in + if lbl_name.[0] = 'I' then + let arity_s = String.sub lbl_name 1 (String.length lbl_name - 1) in + let prim = + Primitive.make ~name:"#fn_mk" ~alloc:true ~native_name:arity_s + ~native_repr_args:[ Same_as_ocaml_repr ] + ~native_repr_res:Same_as_ocaml_repr + in + Lprim + ( Pccall prim + (* could be replaced with Opaque in the future except arity 0*), + [ lambda ], + loc ) + else lambda + | _ -> ( + let size = Array.length fields in + (* Determine if there are "enough" fields (only relevant if this is a + functional-style record update *) + let no_init = match opt_init_expr with None -> true | _ -> false in + if + no_init || (size < 20 && (match repres with Record_optional_labels _ -> false | _ -> true)) + (* TODO: More strategies + 3 + 2 * List.length lbl_expr_list >= size (density) + *) + then + (* Allocate new record with given fields (and remaining fields + taken from init_expr if any *) + let init_id = Ident.create "init" in + let lv = + Array.mapi + (fun i (lbl, definition) -> + match definition with + | Kept _ -> + let access = + match repres with + | Record_float_unused -> assert false + | Record_regular | Record_optional_labels _ -> + Pfield (i, !Lambda.fld_record lbl) + | Record_inlined _ -> + Pfield (i, Fld_record_inline { name = lbl.lbl_name }) + | Record_unboxed _ -> assert false + | Record_extension -> + Pfield + (i + 1, Fld_record_extension { name = lbl.lbl_name }) + in + Lprim (access, [ Lvar init_id ], loc) + | Overridden (_lid, expr) -> transl_exp expr) + fields + in + let ll = Array.to_list lv in + let mut = + if Array.exists (fun (lbl, _) -> lbl.lbl_mut = Mutable) fields then + Mutable + else Immutable + in + let lam = + try + if mut = Mutable then raise Not_constant; + let cl = List.map extract_constant ll in + match repres with + | Record_float_unused -> assert false + | Record_regular -> + Lconst + (Const_block (!Lambda.blk_record fields mut Record_regular, cl)) + | Record_optional_labels _ -> + Lconst + (Const_block (!Lambda.blk_record fields mut Record_optional, cl)) + | Record_inlined { tag; name; num_nonconsts; optional_labels } -> + Lconst + (Const_block + ( !Lambda.blk_record_inlined fields name num_nonconsts optional_labels ~tag + mut, + cl )) + | Record_unboxed _ -> + Lconst (match cl with [ v ] -> v | _ -> assert false) + | Record_extension -> raise Not_constant + with Not_constant -> ( + match repres with + | Record_regular -> + Lprim + ( Pmakeblock (!Lambda.blk_record fields mut Record_regular), + ll, + loc ) + | Record_optional_labels _ -> + Lprim + ( Pmakeblock (!Lambda.blk_record fields mut Record_optional), + ll, + loc ) + | Record_float_unused -> assert false + | Record_inlined { tag; name; num_nonconsts; optional_labels } -> + Lprim + ( Pmakeblock + (!Lambda.blk_record_inlined fields name num_nonconsts optional_labels ~tag + mut), + ll, + loc ) + | Record_unboxed _ -> ( + match ll with [ v ] -> v | _ -> assert false) + | Record_extension -> + let path = + let label, _ = fields.(0) in + match label.lbl_res.desc with + | Tconstr (p, _, _) -> p + | _ -> assert false + in + let slot = transl_extension_path env path in + Lprim + ( Pmakeblock (!Lambda.blk_record_ext fields mut), + slot :: ll, + loc )) + in + match opt_init_expr with + | None -> lam + | Some init_expr -> + Llet (Strict, Pgenval, init_id, transl_exp init_expr, lam) + else + (* Take a shallow copy of the init record, then mutate the fields + of the copy *) + let copy_id = Ident.create "newrecord" in + let update_field cont (lbl, definition) = + match definition with + | Kept _type -> cont + | Overridden (_lid, expr) -> + let upd = + match repres with + | Record_float_unused -> assert false + | Record_regular | Record_optional_labels _ -> + Psetfield (lbl.lbl_pos, !Lambda.fld_record_set lbl) + | Record_inlined _ -> + Psetfield (lbl.lbl_pos, Fld_record_inline_set lbl.lbl_name) + | Record_unboxed _ -> assert false + | Record_extension -> + Psetfield + (lbl.lbl_pos + 1, Fld_record_extension_set lbl.lbl_name) + in + Lsequence + (Lprim (upd, [ Lvar copy_id; transl_exp expr ], loc), cont) + in + match opt_init_expr with + | None -> assert false + | Some init_expr -> + Llet + ( Strict, + Pgenval, + copy_id, + Lprim (Pduprecord, [ transl_exp init_expr ], loc), + Array.fold_left update_field (Lvar copy_id) fields )) + +and transl_match e arg pat_expr_list exn_pat_expr_list partial = + let id = Typecore.name_pattern "exn" exn_pat_expr_list + and cases = transl_cases pat_expr_list + and exn_cases = transl_cases_try exn_pat_expr_list in + let static_catch body val_ids handler = + let static_exception_id = next_negative_raise_count () in + Lstaticcatch + ( Ltrywith + ( Lstaticraise (static_exception_id, body), + id, + Matching.for_trywith (Lvar id) exn_cases ), + (static_exception_id, val_ids), + handler ) + in + match (arg, exn_cases) with + | { exp_desc = Texp_tuple argl }, [] -> + Matching.for_multiple_match e.exp_loc (transl_list argl) cases partial + | { exp_desc = Texp_tuple argl }, _ :: _ -> + let val_ids = List.map (fun _ -> Typecore.name_pattern "val" []) argl in + let lvars = List.map (fun id -> Lvar id) val_ids in + static_catch (transl_list argl) val_ids + (Matching.for_multiple_match e.exp_loc lvars cases partial) + | arg, [] -> + Matching.for_function e.exp_loc None (transl_exp arg) cases partial + | arg, _ :: _ -> + let val_id = Typecore.name_pattern "val" pat_expr_list in + static_catch [ transl_exp arg ] [ val_id ] + (Matching.for_function e.exp_loc None (Lvar val_id) cases partial) + +open Format + +let report_error ppf = function + | Unknown_builtin_primitive prim_name -> + fprintf ppf "Unknown builtin primitive \"%s\"" prim_name + | Unreachable_reached -> fprintf ppf "Unreachable expression was reached" + +let () = + Location.register_error_of_exn (function + | Error (loc, err) -> Some (Location.error_of_printer loc report_error err) + | _ -> None) diff --git a/analysis/vendor/ml/translcore.mli b/analysis/vendor/ml/translcore.mli new file mode 100644 index 000000000..eaf38f2f1 --- /dev/null +++ b/analysis/vendor/ml/translcore.mli @@ -0,0 +1,44 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +(* Translation from typed abstract syntax to lambda terms, + for the core language *) + + +val transl_exp : Typedtree.expression -> Lambda.lambda + +val transl_let : + Asttypes.rec_flag -> + Typedtree.value_binding list -> + Lambda.lambda -> + Lambda.lambda + +val transl_primitive : + Location.t -> + Primitive.description -> + Env.t -> + Types.type_expr -> + Lambda.lambda + +val transl_extension_constructor : + Env.t -> Path.t option -> Typedtree.extension_constructor -> Lambda.lambda + +(* Forward declaration -- to be filled in by Translmod.transl_module *) +val transl_module : + (Typedtree.module_coercion -> + Path.t option -> + Typedtree.module_expr -> + Lambda.lambda) + ref diff --git a/analysis/vendor/ml/translmod.ml b/analysis/vendor/ml/translmod.ml new file mode 100644 index 000000000..533e281ab --- /dev/null +++ b/analysis/vendor/ml/translmod.ml @@ -0,0 +1,534 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +(* Translation from typed abstract syntax to lambda terms, + for the module language *) + +open Typedtree + +type error = Conflicting_inline_attributes | Fragile_pattern_in_toplevel + +exception Error of Location.t * error + +(* Keep track of the root path (from the root of the namespace to the + currently compiled module expression). Useful for naming extensions. *) + +let global_path glob : Path.t option = Some (Pident glob) + +let is_top (rootpath : Path.t option) = + match rootpath with Some (Pident _) -> true | _ -> false + +let functor_path path param : Path.t option = + match path with None -> None | Some p -> Some (Papply (p, Pident param)) + +let field_path path field : Path.t option = + match path with + | None -> None + | Some p -> Some (Pdot (p, Ident.name field, Path.nopos)) + +(* Compile type extensions *) + +let transl_type_extension env rootpath (tyext : Typedtree.type_extension) body : + Lambda.lambda = + List.fold_right + (fun ext body -> + let lam = + Translcore.transl_extension_constructor env + (field_path rootpath ext.ext_id) + ext + in + Lambda.Llet (Strict, Pgenval, ext.ext_id, lam, body)) + tyext.tyext_constructors body + +(* Compile a coercion *) + +let rec apply_coercion loc strict (restr : Typedtree.module_coercion) arg = + match restr with + | Tcoerce_none -> arg + | Tcoerce_structure (pos_cc_list, id_pos_list, runtime_fields) -> + Lambda.name_lambda strict arg (fun id -> + let get_field_name name pos = + Lambda.Lprim (Pfield (pos, Fld_module { name }), [ Lvar id ], loc) + in + let lam = + Lambda.Lprim + ( Pmakeblock (Blk_module runtime_fields), + Ext_list.map2 pos_cc_list runtime_fields (fun (pos, cc) name -> + apply_coercion loc Alias cc + (Lprim + (Pfield (pos, Fld_module { name }), [ Lvar id ], loc))), + loc ) + in + wrap_id_pos_list loc id_pos_list get_field_name lam) + | Tcoerce_functor (cc_arg, cc_res) -> + let param = Ident.create "funarg" in + let carg = apply_coercion loc Alias cc_arg (Lvar param) in + apply_coercion_result loc strict arg [ param ] [ carg ] cc_res + | Tcoerce_primitive { pc_loc; pc_desc; pc_env; pc_type } -> + Translcore.transl_primitive pc_loc pc_desc pc_env pc_type + | Tcoerce_alias (path, cc) -> + Lambda.name_lambda strict arg (fun _ -> + apply_coercion loc Alias cc (Lambda.transl_normal_path path)) + +and apply_coercion_result loc strict funct params args cc_res = + match cc_res with + | Tcoerce_functor (cc_arg, cc_res) -> + let param = Ident.create "funarg" in + let arg = apply_coercion loc Alias cc_arg (Lvar param) in + apply_coercion_result loc strict funct (param :: params) (arg :: args) + cc_res + | _ -> + Lambda.name_lambda strict funct (fun id -> + Lfunction + { + params = List.rev params; + attr = + { + Lambda.default_function_attribute with + is_a_functor = true; + stub = true; + }; + loc; + body = + apply_coercion loc Strict cc_res + (Lapply + { + ap_loc = loc; + ap_func = Lvar id; + ap_args = List.rev args; + ap_inlined = Default_inline; + }); + }) + +and wrap_id_pos_list loc id_pos_list get_field lam = + let fv = Lambda.free_variables lam in + (*Format.eprintf "%a@." Printlambda.lambda lam; + IdentSet.iter (fun id -> Format.eprintf "%a " Ident.print id) fv; + Format.eprintf "@.";*) + let lam, s = + List.fold_left + (fun (lam, s) (id', pos, c) -> + if Lambda.IdentSet.mem id' fv then + let id'' = Ident.create (Ident.name id') in + ( Lambda.Llet + ( Alias, + Pgenval, + id'', + apply_coercion loc Alias c (get_field (Ident.name id') pos), + lam ), + Ident.add id' (Lambda.Lvar id'') s ) + else (lam, s)) + (lam, Ident.empty) id_pos_list + in + if s == Ident.empty then lam else Lambda.subst_lambda s lam + +(* Compose two coercions + apply_coercion c1 (apply_coercion c2 e) behaves like + apply_coercion (compose_coercions c1 c2) e. *) + +let rec compose_coercions c1 c2 = + match (c1, c2) with + | Tcoerce_none, c2 -> c2 + | c1, Tcoerce_none -> c1 + | ( Tcoerce_structure (pc1, ids1, runtime_fields1), + Tcoerce_structure (pc2, ids2, _runtime_fields2) ) -> + let v2 = Array.of_list pc2 in + let ids1 = + List.map + (fun (id, pos1, c1) -> + let pos2, c2 = v2.(pos1) in + (id, pos2, compose_coercions c1 c2)) + ids1 + in + Tcoerce_structure + ( List.map + (function + | (_p1, Tcoerce_primitive _) as x -> + x (* (p1, Tcoerce_primitive p) *) + | p1, c1 -> + let p2, c2 = v2.(p1) in + (p2, compose_coercions c1 c2)) + pc1, + ids1 @ ids2, + runtime_fields1 ) + | Tcoerce_functor (arg1, res1), Tcoerce_functor (arg2, res2) -> + Tcoerce_functor (compose_coercions arg2 arg1, compose_coercions res1 res2) + | c1, Tcoerce_alias (path, c2) -> Tcoerce_alias (path, compose_coercions c1 c2) + | _, _ -> Misc.fatal_error "Translmod.compose_coercions" + +(* +let apply_coercion a b c = + Format.eprintf "@[<2>apply_coercion@ %a@]@." Includemod.print_coercion b; + apply_coercion a b c + +let compose_coercions c1 c2 = + let c3 = compose_coercions c1 c2 in + let open Includemod in + Format.eprintf "@[<2>compose_coercions@ (%a)@ (%a) =@ %a@]@." + print_coercion c1 print_coercion c2 print_coercion c3; + c3 +*) + +(* Record the primitive declarations occurring in the module compiled *) + +let rec pure_module m : Lambda.let_kind = + match m.mod_desc with + | Tmod_ident _ -> Alias + | Tmod_constraint (m, _, _, _) -> pure_module m + | _ -> Strict + +(* Generate lambda-code for a reordered list of bindings *) + +(* Extract the list of "value" identifiers bound by a signature. + "Value" identifiers are identifiers for signature components that + correspond to a run-time value: values, extensions, modules, classes. + Note: manifest primitives do not correspond to a run-time value! *) + +let rec bound_value_identifiers : Types.signature_item list -> Ident.t list = + function + | [] -> [] + | Sig_value (id, { val_kind = Val_reg }) :: rem -> + id :: bound_value_identifiers rem + | Sig_typext (id, _, _) :: rem -> id :: bound_value_identifiers rem + | Sig_module (id, _, _) :: rem -> id :: bound_value_identifiers rem + | Sig_class _ :: _ -> assert false + | _ :: rem -> bound_value_identifiers rem + +(* Compile one or more functors, merging curried functors to produce + multi-argument functors. Any [@inline] attribute on a functor that is + merged must be consistent with any other [@inline] attribute(s) on the + functor(s) being merged with. Such an attribute will be placed on the + resulting merged functor. *) + +let merge_inline_attributes (attr1 : Lambda.inline_attribute) + (attr2 : Lambda.inline_attribute) loc = + match (attr1, attr2) with + | Lambda.Default_inline, _ -> attr2 + | _, Lambda.Default_inline -> attr1 + | _, _ -> + if attr1 = attr2 then attr1 + else raise (Error (loc, Conflicting_inline_attributes)) + +let merge_functors mexp coercion root_path = + let rec merge mexp coercion path acc inline_attribute = + let finished = (acc, mexp, path, coercion, inline_attribute) in + match mexp.mod_desc with + | Tmod_functor (param, _, _, body) -> + let inline_attribute' = + Translattribute.get_inline_attribute mexp.mod_attributes + in + let arg_coercion, res_coercion = + match coercion with + | Tcoerce_none -> (Tcoerce_none, Tcoerce_none) + | Tcoerce_functor (arg_coercion, res_coercion) -> + (arg_coercion, res_coercion) + | _ -> Misc.fatal_error "Translmod.merge_functors: bad coercion" + in + let loc = mexp.mod_loc in + let path = functor_path path param in + let inline_attribute = + merge_inline_attributes inline_attribute inline_attribute' loc + in + merge body res_coercion path + ((param, loc, arg_coercion) :: acc) + inline_attribute + | _ -> finished + in + merge mexp coercion root_path [] Default_inline + +let export_identifiers : Ident.t list ref = ref [] + +let rec compile_functor mexp coercion root_path loc = + let functor_params_rev, body, body_path, res_coercion, inline_attribute = + merge_functors mexp coercion root_path + in + assert (functor_params_rev <> []); + (* cf. [transl_module] *) + let params, body = + List.fold_left + (fun (params, body) (param, loc, arg_coercion) -> + let param' = Ident.rename param in + let arg = apply_coercion loc Alias arg_coercion (Lvar param') in + let params = param' :: params in + let body = Lambda.Llet (Alias, Pgenval, param, arg, body) in + (params, body)) + ([], transl_module res_coercion body_path body) + functor_params_rev + in + Lambda.Lfunction + { + params; + attr = + { + inline = inline_attribute; + is_a_functor = true; + stub = false; + return_unit = false; + async = false; + }; + loc; + body; + } + +(* Compile a module expression *) +and transl_module cc rootpath mexp = + List.iter (Translattribute.check_attribute_on_module mexp) mexp.mod_attributes; + let loc = mexp.mod_loc in + match mexp.mod_type with + | Mty_alias (Mta_absent, _) -> + apply_coercion loc Alias cc Lambda.lambda_module_alias + | _ -> ( + match mexp.mod_desc with + | Tmod_ident (path, _) -> + apply_coercion loc Strict cc + (Lambda.transl_module_path ~loc mexp.mod_env path) + | Tmod_structure str -> fst (transl_struct loc [] cc rootpath str) + | Tmod_functor _ -> compile_functor mexp cc rootpath loc + | Tmod_apply (funct, arg, ccarg) -> + let inlined_attribute, funct = + Translattribute.get_and_remove_inlined_attribute_on_module funct + in + apply_coercion loc Strict cc + (Lapply + { + ap_loc = loc; + ap_func = transl_module Tcoerce_none None funct; + ap_args = [ transl_module ccarg None arg ]; + ap_inlined = inlined_attribute; + }) + | Tmod_constraint (arg, _, _, ccarg) -> + transl_module (compose_coercions cc ccarg) rootpath arg + | Tmod_unpack (arg, _) -> + apply_coercion loc Strict cc (Translcore.transl_exp arg)) + +and transl_struct loc fields cc rootpath str = + transl_structure loc fields cc rootpath str.str_final_env str.str_items + +and transl_structure loc fields cc rootpath final_env = function + | [] -> ( + let is_top_root_path = is_top rootpath in + + match cc with + | Tcoerce_none -> + let block_fields = + List.fold_left + (fun acc id -> + if is_top_root_path then + export_identifiers := id :: !export_identifiers; + Lambda.Lvar id :: acc) + [] fields + in + ( Lambda.Lprim + ( Pmakeblock + (if is_top_root_path then + Blk_module_export !export_identifiers + else + Blk_module (List.rev_map (fun id -> id.Ident.name) fields)), + block_fields, + loc ), + List.length fields ) + | Tcoerce_structure (pos_cc_list, id_pos_list, runtime_fields) -> + (* Do not ignore id_pos_list ! *) + (*Format.eprintf "%a@.@[" Includemod.print_coercion cc; + List.iter (fun l -> Format.eprintf "%a@ " Ident.print l) + fields; + Format.eprintf "@]@.";*) + assert (List.length runtime_fields = List.length pos_cc_list); + let v = Ext_array.reverse_of_list fields in + let get_field pos = Lambda.Lvar v.(pos) + and ids = + List.fold_right Lambda.IdentSet.add fields Lambda.IdentSet.empty + in + let get_field_name _name = get_field in + let result = + List.fold_right + (fun (pos, cc) code -> + match cc with + | Tcoerce_primitive p -> + if is_top rootpath then + export_identifiers := p.pc_id :: !export_identifiers; + Translcore.transl_primitive p.pc_loc p.pc_desc p.pc_env + p.pc_type + :: code + | _ -> + if is_top rootpath then + export_identifiers := v.(pos) :: !export_identifiers; + apply_coercion loc Strict cc (get_field pos) :: code) + pos_cc_list [] + in + let lam = + Lambda.Lprim + ( Pmakeblock + (if is_top_root_path then + Blk_module_export !export_identifiers + else Blk_module runtime_fields), + result, + loc ) + and id_pos_list = + Ext_list.filter id_pos_list (fun (id, _, _) -> + not (Lambda.IdentSet.mem id ids)) + in + ( wrap_id_pos_list loc id_pos_list get_field_name lam, + List.length pos_cc_list ) + | _ -> Misc.fatal_error "Translmod.transl_structure") + | item :: rem -> ( + match item.str_desc with + | Tstr_eval (expr, _) -> + let body, size = + transl_structure loc fields cc rootpath final_env rem + in + (Lsequence (Translcore.transl_exp expr, body), size) + | Tstr_value (rec_flag, pat_expr_list) -> + let ext_fields = rev_let_bound_idents pat_expr_list @ fields in + let body, size = + transl_structure loc ext_fields cc rootpath final_env rem + in + (* Recursve already excludes complex pattern bindings*) + if is_top rootpath && rec_flag = Nonrecursive then + Ext_list.iter pat_expr_list (fun { vb_pat } -> + match vb_pat.pat_desc with + | Tpat_var _ | Tpat_alias _ -> () + | _ -> + if not (Parmatch.irrefutable vb_pat) then + raise + (Error (vb_pat.pat_loc, Fragile_pattern_in_toplevel))); + (Translcore.transl_let rec_flag pat_expr_list body, size) + | Tstr_typext tyext -> + let ids = List.map (fun ext -> ext.ext_id) tyext.tyext_constructors in + let body, size = + transl_structure loc + (List.rev_append ids fields) + cc rootpath final_env rem + in + (transl_type_extension item.str_env rootpath tyext body, size) + | Tstr_exception ext -> + let id = ext.ext_id in + let path = field_path rootpath id in + let body, size = + transl_structure loc (id :: fields) cc rootpath final_env rem + in + ( Llet + ( Strict, + Pgenval, + id, + Translcore.transl_extension_constructor item.str_env path ext, + body ), + size ) + | Tstr_module mb as s -> + let id = mb.mb_id in + let body, size = + transl_structure loc + (if Typemod.rescript_hide s then fields else id :: fields) + cc rootpath final_env rem + in + let module_body = + transl_module Tcoerce_none (field_path rootpath id) mb.mb_expr + in + let module_body = + Translattribute.add_inline_attribute module_body mb.mb_loc + mb.mb_attributes + in + (Llet (pure_module mb.mb_expr, Pgenval, id, module_body, body), size) + | Tstr_recmodule bindings -> + let ext_fields = + List.rev_append (List.map (fun mb -> mb.mb_id) bindings) fields + in + let body, size = + transl_structure loc ext_fields cc rootpath final_env rem + in + let lam = + Transl_recmodule.compile_recmodule + (fun id modl _loc -> + transl_module Tcoerce_none (field_path rootpath id) modl) + bindings body + in + (lam, size) + | Tstr_include incl -> + let ids = bound_value_identifiers incl.incl_type in + let modl = incl.incl_mod in + let mid = Ident.create "include" in + let rec rebind_idents pos newfields = function + | [] -> transl_structure loc newfields cc rootpath final_env rem + | id :: ids -> + let body, size = + rebind_idents (pos + 1) (id :: newfields) ids + in + ( Llet + ( Alias, + Pgenval, + id, + Lprim + ( Pfield (pos, Fld_module { name = Ident.name id }), + [ Lvar mid ], + incl.incl_loc ), + body ), + size ) + in + let body, size = rebind_idents 0 fields ids in + ( Llet + ( pure_module modl, + Pgenval, + mid, + transl_module Tcoerce_none None modl, + body ), + size ) + | Tstr_class _ | Tstr_primitive _ | Tstr_type _ | Tstr_modtype _ + | Tstr_open _ | Tstr_class_type _ | Tstr_attribute _ -> + transl_structure loc fields cc rootpath final_env rem) + +(* Update forward declaration in Translcore *) +let _ = Translcore.transl_module := transl_module + +(* Introduce dependencies on modules referenced only by "external". *) + +(* Compile an implementation *) + +let transl_implementation module_name (str, cc) = + export_identifiers := []; + let module_id = Ident.create_persistent module_name in + let body, _ = transl_struct Location.none [] cc (global_path module_id) str in + (body, !export_identifiers) + +(* Build the list of value identifiers defined by a toplevel structure + (excluding primitive declarations). *) + +(* second level idents (module M = struct ... let id = ... end), + and all sub-levels idents *) +(* A variant of transl_structure used to compile toplevel structure definitions + for the native-code compiler. Store the defined values in the fields + of the global as soon as they are defined, in order to reduce register + pressure. Also rewrites the defining expressions so that they + refer to earlier fields of the structure through the fields of + the global, not by their names. + "map" is a table from defined idents to (pos in global block, coercion). + "prim" is a list of (pos in global block, primitive declaration). *) + +(* Compile an implementation using transl_store_structure + (for the native-code compiler). *) + +(* Compile a toplevel phrase *) + +(* Error report *) + +let report_error ppf = function + | Conflicting_inline_attributes -> + Format.fprintf ppf "@[Conflicting ``inline'' attributes@]" + | Fragile_pattern_in_toplevel -> + Format.fprintf ppf "@[Such fragile pattern not allowed in the toplevel@]" + +let () = + Location.register_error_of_exn (function + | Error (loc, err) -> Some (Location.error_of_printer loc report_error err) + | _ -> None) diff --git a/analysis/vendor/compiler-libs-406/oo.ml b/analysis/vendor/ml/translmod.mli similarity index 72% rename from analysis/vendor/compiler-libs-406/oo.ml rename to analysis/vendor/ml/translmod.mli index 3833b9721..af45c84a4 100644 --- a/analysis/vendor/compiler-libs-406/oo.ml +++ b/analysis/vendor/ml/translmod.mli @@ -2,7 +2,7 @@ (* *) (* OCaml *) (* *) -(* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) (* *) (* Copyright 1996 Institut National de Recherche en Informatique et *) (* en Automatique. *) @@ -13,7 +13,18 @@ (* *) (**************************************************************************) -let copy = CamlinternalOO.copy -external id : < .. > -> int = "%field1" -let new_method = CamlinternalOO.public_method_label -let public_method_label = CamlinternalOO.public_method_label +(* Translation from typed abstract syntax to lambda terms, + for the module language *) + +val transl_implementation : + string -> + Typedtree.structure * Typedtree.module_coercion -> + Lambda.lambda * Ident.t list + +type error +(* exception Error of Location.t * error *) + +val report_error : Format.formatter -> error -> unit + + + diff --git a/analysis/vendor/compiler-libs-406/typeclass.ml b/analysis/vendor/ml/typeclass.ml similarity index 50% rename from analysis/vendor/compiler-libs-406/typeclass.ml rename to analysis/vendor/ml/typeclass.ml index 371d2ad7d..00ea7dfcc 100644 --- a/analysis/vendor/compiler-libs-406/typeclass.ml +++ b/analysis/vendor/ml/typeclass.ml @@ -15,9 +15,7 @@ open Parsetree open Asttypes -open Path open Types -open Typecore open Typetexp open Format @@ -51,11 +49,8 @@ type error = Unconsistent_constraint of (type_expr * type_expr) list | Field_type_mismatch of string * string * (type_expr * type_expr) list | Structure_expected of class_type - | Cannot_apply of class_type - | Apply_wrong_label of arg_label | Pattern_type_clash of type_expr | Repeated_parameter - | Unbound_class_2 of Longident.t | Unbound_class_type_2 of Longident.t | Abbrev_type_clash of type_expr * type_expr * type_expr | Constructor_type_mismatch of string * (type_expr * type_expr) list @@ -63,18 +58,14 @@ type error = | Parameter_arity_mismatch of Longident.t * int * int | Parameter_mismatch of (type_expr * type_expr) list | Bad_parameters of Ident.t * type_expr * type_expr - | Class_match_failure of Ctype.class_match_failure list - | Unbound_val of string + | Unbound_type_var of (formatter -> unit) * Ctype.closed_class_failure - | Make_nongen_seltype of type_expr | Non_generalizable_class of Ident.t * Types.class_declaration | Cannot_coerce_self of type_expr | Non_collapsable_conjunction of Ident.t * Types.class_declaration * (type_expr * type_expr) list - | Final_self_clash of (type_expr * type_expr) list - | Mutability_mismatch of string * mutable_flag | No_overriding of string * string - | Duplicate of string * string + exception Error of Location.t * Env.t * error exception Error_forward of Location.error @@ -163,25 +154,6 @@ let rec class_body cty = | Cty_arrow (_, _, cty) -> class_body cty -let extract_constraints cty = - let sign = Ctype.signature_of_class_type cty in - (Vars.fold (fun lab _ vars -> lab :: vars) sign.csig_vars [], - begin let (fields, _) = - Ctype.flatten_fields (Ctype.object_fields sign.csig_self) - in - List.fold_left - (fun meths (lab, _, _) -> - if lab = dummy_method then meths else lab::meths) - [] fields - end, - sign.csig_concr) - -let rec abbreviate_class_type path params cty = - match cty with - Cty_constr (_, _, _) | Cty_signature _ -> - Cty_constr (path, params, cty) - | Cty_arrow (l, ty, cty) -> - Cty_arrow (l, ty, abbreviate_class_type path params cty) (* Check that all type variables are generalizable *) (* Use Env.empty to prevent expansion of recursively defined object types; @@ -221,11 +193,6 @@ let rec limited_generalize rv = Ctype.limited_generalize rv ty; limited_generalize rv cty -(* Record a class type *) -let rc node = - Cmt_format.add_saved_type (Cmt_format.Partial_class_expr node); - Stypes.record (Stypes.Ti_class node); (* moved to genannot *) - node (***********************************) @@ -233,47 +200,8 @@ let rc node = (***********************************) -(* Enter a value in the method environment only *) -let enter_met_env ?check loc lab kind ty val_env met_env par_env = - let (id, val_env) = - Env.enter_value lab {val_type = ty; val_kind = Val_unbound; - val_attributes = []; - Types.val_loc = loc} val_env - in - (id, val_env, - Env.add_value ?check id {val_type = ty; val_kind = kind; - val_attributes = []; - Types.val_loc = loc} met_env, - Env.add_value id {val_type = ty; val_kind = Val_unbound; - val_attributes = []; - Types.val_loc = loc} par_env) (* Enter an instance variable in the environment *) -let enter_val cl_num vars inh lab mut virt ty val_env met_env par_env loc = - let instance = Ctype.instance val_env in - let (id, virt) = - try - let (id, mut', virt', ty') = Vars.find lab !vars in - if mut' <> mut then - raise (Error(loc, val_env, Mutability_mismatch(lab, mut))); - Ctype.unify val_env (instance ty) (instance ty'); - (if not inh then Some id else None), - (if virt' = Concrete then virt' else virt) - with - Ctype.Unify tr -> - raise (Error(loc, val_env, - Field_type_mismatch("instance variable", lab, tr))) - | Not_found -> None, virt - in - let (id, _, _, _) as result = - match id with Some id -> (id, val_env, met_env, par_env) - | None -> - enter_met_env Location.none lab (Val_ivar (mut, cl_num)) - ty val_env met_env par_env - in - vars := Vars.add lab (id, mut, virt, ty) !vars; - result - let concr_vals vars = Vars.fold (fun id (_, vf, _) s -> if vf = Virtual then s else Concr.add id s) @@ -326,18 +254,6 @@ let inheritance self_type env ovf concr_meths warn_vals loc parent = | _ -> raise(Error(loc, env, Structure_expected parent)) -let virtual_method val_env meths self_type lab priv sty loc = - let (_, ty') = - Ctype.filter_self_method val_env lab priv meths self_type - in - let sty = Ast_helper.Typ.force_poly sty in - let cty = transl_simple_type val_env false sty in - let ty = cty.ctyp_type in - begin - try Ctype.unify val_env ty ty' with Ctype.Unify trace -> - raise(Error(loc, val_env, Field_type_mismatch ("method", lab, trace))); - end; - cty let delayed_meth_specs = ref [] @@ -382,12 +298,6 @@ let type_constraint val_env sty sty' loc = end; (cty, cty') -let make_method loc cl_num expr = - let open Ast_helper in - let mkid s = mkloc s loc in - Exp.fun_ ~loc:expr.pexp_loc Nolabel None - (Pat.alias ~loc (Pat.var ~loc (mkid "self-*")) (mkid ("self-" ^ cl_num))) - expr (*******************************) @@ -568,671 +478,6 @@ let class_type env scty = (*******************************) -let rec class_field self_loc cl_num self_type meths vars arg cf = - Builtin_attributes.warning_scope cf.pcf_attributes - (fun () -> class_field_aux self_loc cl_num self_type meths vars arg cf) - -and class_field_aux self_loc cl_num self_type meths vars - (val_env, met_env, par_env, fields, concr_meths, warn_vals, inher, - local_meths, local_vals) cf = - let loc = cf.pcf_loc in - let mkcf desc = - { cf_desc = desc; cf_loc = loc; cf_attributes = cf.pcf_attributes } - in - match cf.pcf_desc with - Pcf_inherit (ovf, sparent, super) -> - let parent = class_expr cl_num val_env par_env sparent in - let inher = - match parent.cl_type with - Cty_constr (p, tl, _) -> (p, tl) :: inher - | _ -> inher - in - let (cl_sig, concr_meths, warn_vals) = - inheritance self_type val_env (Some ovf) concr_meths warn_vals - sparent.pcl_loc parent.cl_type - in - (* Variables *) - let (val_env, met_env, par_env, inh_vars) = - Vars.fold - (fun lab info (val_env, met_env, par_env, inh_vars) -> - let mut, vr, ty = info in - let (id, val_env, met_env, par_env) = - enter_val cl_num vars true lab mut vr ty val_env met_env par_env - sparent.pcl_loc - in - (val_env, met_env, par_env, (lab, id) :: inh_vars)) - cl_sig.csig_vars (val_env, met_env, par_env, []) - in - (* Inherited concrete methods *) - let inh_meths = - Concr.fold (fun lab rem -> (lab, Ident.create lab)::rem) - cl_sig.csig_concr [] - in - (* Super *) - let (val_env, met_env, par_env,super) = - match super with - None -> - (val_env, met_env, par_env,None) - | Some {txt=name} -> - let (_id, val_env, met_env, par_env) = - enter_met_env ~check:(fun s -> Warnings.Unused_ancestor s) - sparent.pcl_loc name (Val_anc (inh_meths, cl_num)) self_type - val_env met_env par_env - in - (val_env, met_env, par_env,Some name) - in - (val_env, met_env, par_env, - lazy (mkcf (Tcf_inherit (ovf, parent, super, inh_vars, inh_meths))) - :: fields, - concr_meths, warn_vals, inher, local_meths, local_vals) - - | Pcf_val (lab, mut, Cfk_virtual styp) -> - if !Clflags.principal then Ctype.begin_def (); - let cty = Typetexp.transl_simple_type val_env false styp in - let ty = cty.ctyp_type in - if !Clflags.principal then begin - Ctype.end_def (); - Ctype.generalize_structure ty - end; - let (id, val_env, met_env', par_env) = - enter_val cl_num vars false lab.txt mut Virtual ty - val_env met_env par_env loc - in - (val_env, met_env', par_env, - lazy (mkcf (Tcf_val (lab, mut, id, Tcfk_virtual cty, - met_env == met_env'))) - :: fields, - concr_meths, warn_vals, inher, local_meths, local_vals) - - | Pcf_val (lab, mut, Cfk_concrete (ovf, sexp)) -> - if Concr.mem lab.txt local_vals then - raise(Error(loc, val_env, Duplicate ("instance variable", lab.txt))); - if Concr.mem lab.txt warn_vals then begin - if ovf = Fresh then - Location.prerr_warning lab.loc - (Warnings.Instance_variable_override[lab.txt]) - end else begin - if ovf = Override then - raise(Error(loc, val_env, - No_overriding ("instance variable", lab.txt))) - end; - if !Clflags.principal then Ctype.begin_def (); - let exp = - try type_exp val_env sexp with Ctype.Unify [(ty, _)] -> - raise(Error(loc, val_env, Make_nongen_seltype ty)) - in - if !Clflags.principal then begin - Ctype.end_def (); - Ctype.generalize_structure exp.exp_type - end; - let (id, val_env, met_env', par_env) = - enter_val cl_num vars false lab.txt mut Concrete exp.exp_type - val_env met_env par_env loc - in - (val_env, met_env', par_env, - lazy (mkcf (Tcf_val (lab, mut, id, - Tcfk_concrete (ovf, exp), met_env == met_env'))) - :: fields, - concr_meths, Concr.add lab.txt warn_vals, inher, local_meths, - Concr.add lab.txt local_vals) - - | Pcf_method (lab, priv, Cfk_virtual sty) -> - let cty = virtual_method val_env meths self_type lab.txt priv sty loc in - (val_env, met_env, par_env, - lazy (mkcf(Tcf_method (lab, priv, Tcfk_virtual cty))) - ::fields, - concr_meths, warn_vals, inher, local_meths, local_vals) - - | Pcf_method (lab, priv, Cfk_concrete (ovf, expr)) -> - let expr = - match expr.pexp_desc with - | Pexp_poly _ -> expr - | _ -> Ast_helper.Exp.poly ~loc:expr.pexp_loc expr None - in - if Concr.mem lab.txt local_meths then - raise(Error(loc, val_env, Duplicate ("method", lab.txt))); - if Concr.mem lab.txt concr_meths then begin - if ovf = Fresh then - Location.prerr_warning loc (Warnings.Method_override [lab.txt]) - end else begin - if ovf = Override then - raise(Error(loc, val_env, No_overriding("method", lab.txt))) - end; - let (_, ty) = - Ctype.filter_self_method val_env lab.txt priv meths self_type - in - begin try match expr.pexp_desc with - Pexp_poly (sbody, sty) -> - begin match sty with None -> () - | Some sty -> - let sty = Ast_helper.Typ.force_poly sty in - let cty' = Typetexp.transl_simple_type val_env false sty in - let ty' = cty'.ctyp_type in - Ctype.unify val_env ty' ty - end; - begin match (Ctype.repr ty).desc with - Tvar _ -> - let ty' = Ctype.newvar () in - Ctype.unify val_env (Ctype.newty (Tpoly (ty', []))) ty; - Ctype.unify val_env (type_approx val_env sbody) ty' - | Tpoly (ty1, tl) -> - let _, ty1' = Ctype.instance_poly false tl ty1 in - let ty2 = type_approx val_env sbody in - Ctype.unify val_env ty2 ty1' - | _ -> assert false - end - | _ -> assert false - with Ctype.Unify trace -> - raise(Error(loc, val_env, - Field_type_mismatch ("method", lab.txt, trace))) - end; - let meth_expr = make_method self_loc cl_num expr in - (* backup variables for Pexp_override *) - let vars_local = !vars in - - let field = - Warnings.mk_lazy - (fun () -> - (* Read the generalized type *) - let (_, ty) = Meths.find lab.txt !meths in - let meth_type = - Btype.newgenty (Tarrow(Nolabel, self_type, ty, Cok)) in - Ctype.raise_nongen_level (); - vars := vars_local; - let texp = type_expect met_env meth_expr meth_type in - Ctype.end_def (); - mkcf (Tcf_method (lab, priv, Tcfk_concrete (ovf, texp))) - ) - in - (val_env, met_env, par_env, field::fields, - Concr.add lab.txt concr_meths, warn_vals, inher, - Concr.add lab.txt local_meths, local_vals) - - | Pcf_constraint (sty, sty') -> - let (cty, cty') = type_constraint val_env sty sty' loc in - (val_env, met_env, par_env, - lazy (mkcf (Tcf_constraint (cty, cty'))) :: fields, - concr_meths, warn_vals, inher, local_meths, local_vals) - - | Pcf_initializer expr -> - let expr = make_method self_loc cl_num expr in - let vars_local = !vars in - let field = - lazy begin - Ctype.raise_nongen_level (); - let meth_type = - Ctype.newty - (Tarrow (Nolabel, self_type, - Ctype.instance_def Predef.type_unit, Cok)) in - vars := vars_local; - let texp = type_expect met_env expr meth_type in - Ctype.end_def (); - mkcf (Tcf_initializer texp) - end in - (val_env, met_env, par_env, field::fields, concr_meths, warn_vals, - inher, local_meths, local_vals) - | Pcf_attribute x -> - Builtin_attributes.warning_attribute x; - (val_env, met_env, par_env, - lazy (mkcf (Tcf_attribute x)) :: fields, - concr_meths, warn_vals, inher, local_meths, local_vals) - | Pcf_extension ext -> - raise (Error_forward (Builtin_attributes.error_of_extension ext)) - -and class_structure cl_num final val_env met_env loc - { pcstr_self = spat; pcstr_fields = str } = - (* Environment for substructures *) - let par_env = met_env in - - (* Location of self. Used for locations of self arguments *) - let self_loc = {spat.ppat_loc with Location.loc_ghost = true} in - - (* Self type, with a dummy method preventing it from being closed/escaped. *) - let self_type = Ctype.newvar () in - Ctype.unify val_env - (Ctype.filter_method val_env dummy_method Private self_type) - (Ctype.newty (Ttuple [])); - - (* Private self is used for private method calls *) - let private_self = if final then Ctype.newvar () else self_type in - - (* Self binder *) - let (pat, meths, vars, val_env, meth_env, par_env) = - type_self_pattern cl_num private_self val_env met_env par_env spat - in - let public_self = pat.pat_type in - - (* Check that the binder has a correct type *) - let ty = - if final then Ctype.newty (Tobject (Ctype.newvar(), ref None)) - else self_type in - begin try Ctype.unify val_env public_self ty with - Ctype.Unify _ -> - raise(Error(spat.ppat_loc, val_env, Pattern_type_clash public_self)) - end; - let get_methods ty = - (fst (Ctype.flatten_fields - (Ctype.object_fields (Ctype.expand_head val_env ty)))) in - if final then begin - (* Copy known information to still empty self_type *) - List.iter - (fun (lab,kind,ty) -> - let k = - if Btype.field_kind_repr kind = Fpresent then Public else Private in - try Ctype.unify val_env ty - (Ctype.filter_method val_env lab k self_type) - with _ -> assert false) - (get_methods public_self) - end; - - (* Typing of class fields *) - let (_, _, _, fields, concr_meths, _, inher, _local_meths, _local_vals) = - Builtin_attributes.warning_scope [] - (fun () -> - List.fold_left (class_field self_loc cl_num self_type meths vars) - (val_env, meth_env, par_env, [], Concr.empty, Concr.empty, [], - Concr.empty, Concr.empty) - str - ) - in - Ctype.unify val_env self_type (Ctype.newvar ()); - let sign = - {csig_self = public_self; - csig_vars = Vars.map (fun (_id, mut, vr, ty) -> (mut, vr, ty)) !vars; - csig_concr = concr_meths; - csig_inher = inher} in - let methods = get_methods self_type in - let priv_meths = - List.filter (fun (_,kind,_) -> Btype.field_kind_repr kind <> Fpresent) - methods in - if final then begin - (* Unify private_self and a copy of self_type. self_type will not - be modified after this point *) - Ctype.close_object self_type; - let mets = virtual_methods {sign with csig_self = self_type} in - let vals = - Vars.fold - (fun name (_mut, vr, _ty) l -> if vr = Virtual then name :: l else l) - sign.csig_vars [] in - if mets <> [] || vals <> [] then - raise(Error(loc, val_env, Virtual_class(true, final, mets, vals))); - let self_methods = - List.fold_right - (fun (lab,kind,ty) rem -> - if lab = dummy_method then - (* allow public self and private self to be unified *) - match Btype.field_kind_repr kind with - Fvar r -> Btype.set_kind r Fabsent; rem - | _ -> rem - else - Ctype.newty(Tfield(lab, Btype.copy_kind kind, ty, rem))) - methods (Ctype.newty Tnil) in - begin try - Ctype.unify val_env private_self - (Ctype.newty (Tobject(self_methods, ref None))); - Ctype.unify val_env public_self self_type - with Ctype.Unify trace -> raise(Error(loc, val_env, Final_self_clash trace)) - end; - end; - - (* Typing of method bodies *) - (* if !Clflags.principal then *) begin - let ms = !meths in - (* Generalize the spine of methods accessed through self *) - Meths.iter (fun _ (_,ty) -> Ctype.generalize_spine ty) ms; - meths := - Meths.map (fun (id,ty) -> (id, Ctype.generic_instance val_env ty)) ms; - (* But keep levels correct on the type of self *) - Meths.iter (fun _ (_,ty) -> Ctype.unify val_env ty (Ctype.newvar ())) ms - end; - let fields = List.map Lazy.force (List.rev fields) in - let meths = Meths.map (function (id, _ty) -> id) !meths in - - (* Check for private methods made public *) - let pub_meths' = - List.filter (fun (_,kind,_) -> Btype.field_kind_repr kind = Fpresent) - (get_methods public_self) in - let names = List.map (fun (x,_,_) -> x) in - let l1 = names priv_meths and l2 = names pub_meths' in - let added = List.filter (fun x -> List.mem x l1) l2 in - if added <> [] then - Location.prerr_warning loc (Warnings.Implicit_public_methods added); - let sign = if final then sign else - {sign with Types.csig_self = Ctype.expand_head val_env public_self} in - { - cstr_self = pat; - cstr_fields = fields; - cstr_type = sign; - cstr_meths = meths}, sign (* redondant, since already in cstr_type *) - -and class_expr cl_num val_env met_env scl = - Builtin_attributes.warning_scope scl.pcl_attributes - (fun () -> class_expr_aux cl_num val_env met_env scl) - -and class_expr_aux cl_num val_env met_env scl = - match scl.pcl_desc with - Pcl_constr (lid, styl) -> - let (path, decl) = Typetexp.find_class val_env scl.pcl_loc lid.txt in - if Path.same decl.cty_path unbound_class then - raise(Error(scl.pcl_loc, val_env, Unbound_class_2 lid.txt)); - let tyl = List.map - (fun sty -> transl_simple_type val_env false sty) - styl - in - let (params, clty) = - Ctype.instance_class decl.cty_params decl.cty_type - in - let clty' = abbreviate_class_type path params clty in - if List.length params <> List.length tyl then - raise(Error(scl.pcl_loc, val_env, - Parameter_arity_mismatch (lid.txt, List.length params, - List.length tyl))); - List.iter2 - (fun cty' ty -> - let ty' = cty'.ctyp_type in - try Ctype.unify val_env ty' ty with Ctype.Unify trace -> - raise(Error(cty'.ctyp_loc, val_env, Parameter_mismatch trace))) - tyl params; - let cl = - rc {cl_desc = Tcl_ident (path, lid, tyl); - cl_loc = scl.pcl_loc; - cl_type = clty'; - cl_env = val_env; - cl_attributes = scl.pcl_attributes; - } - in - let (vals, meths, concrs) = extract_constraints clty in - rc {cl_desc = Tcl_constraint (cl, None, vals, meths, concrs); - cl_loc = scl.pcl_loc; - cl_type = clty'; - cl_env = val_env; - cl_attributes = []; (* attributes are kept on the inner cl node *) - } - | Pcl_structure cl_str -> - let (desc, ty) = - class_structure cl_num false val_env met_env scl.pcl_loc cl_str in - rc {cl_desc = Tcl_structure desc; - cl_loc = scl.pcl_loc; - cl_type = Cty_signature ty; - cl_env = val_env; - cl_attributes = scl.pcl_attributes; - } - | Pcl_fun (l, Some default, spat, sbody) -> - let loc = default.pexp_loc in - let open Ast_helper in - let scases = [ - Exp.case - (Pat.construct ~loc - (mknoloc (Longident.(Ldot (Lident "*predef*", "Some")))) - (Some (Pat.var ~loc (mknoloc "*sth*")))) - (Exp.ident ~loc (mknoloc (Longident.Lident "*sth*"))); - - Exp.case - (Pat.construct ~loc - (mknoloc (Longident.(Ldot (Lident "*predef*", "None")))) - None) - default; - ] - in - let smatch = - Exp.match_ ~loc (Exp.ident ~loc (mknoloc (Longident.Lident "*opt*"))) - scases - in - let sfun = - Cl.fun_ ~loc:scl.pcl_loc - l None - (Pat.var ~loc (mknoloc "*opt*")) - (Cl.let_ ~loc:scl.pcl_loc Nonrecursive [Vb.mk spat smatch] sbody) - (* Note: we don't put the '#default' attribute, as it - is not detected for class-level let bindings. See #5975.*) - in - class_expr cl_num val_env met_env sfun - | Pcl_fun (l, None, spat, scl') -> - if !Clflags.principal then Ctype.begin_def (); - let (pat, pv, val_env', met_env) = - Typecore.type_class_arg_pattern cl_num val_env met_env l spat - in - if !Clflags.principal then begin - Ctype.end_def (); - iter_pattern (fun {pat_type=ty} -> Ctype.generalize_structure ty) pat - end; - let pv = - List.map - begin fun (id, id_loc, id', _ty) -> - let path = Pident id' in - (* do not mark the value as being used *) - let vd = Env.find_value path val_env' in - (id, id_loc, - {exp_desc = - Texp_ident(path, mknoloc (Longident.Lident (Ident.name id)), vd); - exp_loc = Location.none; exp_extra = []; - exp_type = Ctype.instance val_env' vd.val_type; - exp_attributes = []; (* check *) - exp_env = val_env'}) - end - pv - in - let not_function = function - Cty_arrow _ -> false - | _ -> true - in - let partial = - let dummy = type_exp val_env (Ast_helper.Exp.unreachable ()) in - Typecore.check_partial val_env pat.pat_type pat.pat_loc - [{c_lhs = pat; c_guard = None; c_rhs = dummy}] - in - Ctype.raise_nongen_level (); - let cl = class_expr cl_num val_env' met_env scl' in - Ctype.end_def (); - if Btype.is_optional l && not_function cl.cl_type then - Location.prerr_warning pat.pat_loc - Warnings.Unerasable_optional_argument; - rc {cl_desc = Tcl_fun (l, pat, pv, cl, partial); - cl_loc = scl.pcl_loc; - cl_type = Cty_arrow - (l, Ctype.instance_def pat.pat_type, cl.cl_type); - cl_env = val_env; - cl_attributes = scl.pcl_attributes; - } - | Pcl_apply (scl', sargs) -> - assert (sargs <> []); - if !Clflags.principal then Ctype.begin_def (); - let cl = class_expr cl_num val_env met_env scl' in - if !Clflags.principal then begin - Ctype.end_def (); - generalize_class_type false cl.cl_type; - end; - let rec nonopt_labels ls ty_fun = - match ty_fun with - | Cty_arrow (l, _, ty_res) -> - if Btype.is_optional l then nonopt_labels ls ty_res - else nonopt_labels (l::ls) ty_res - | _ -> ls - in - let ignore_labels = - !Clflags.classic || - let labels = nonopt_labels [] cl.cl_type in - List.length labels = List.length sargs && - List.for_all (fun (l,_) -> l = Nolabel) sargs && - List.exists (fun l -> l <> Nolabel) labels && - begin - Location.prerr_warning - cl.cl_loc - (Warnings.Labels_omitted - (List.map Printtyp.string_of_label - (List.filter ((<>) Nolabel) labels))); - true - end - in - let rec type_args args omitted ty_fun ty_fun0 sargs more_sargs = - match ty_fun, ty_fun0 with - | Cty_arrow (l, ty, ty_fun), Cty_arrow (_, ty0, ty_fun0) - when sargs <> [] || more_sargs <> [] -> - let name = Btype.label_name l - and optional = Btype.is_optional l in - let sargs, more_sargs, arg = - if ignore_labels && not (Btype.is_optional l) then begin - match sargs, more_sargs with - (l', sarg0)::_, _ -> - raise(Error(sarg0.pexp_loc, val_env, Apply_wrong_label l')) - | _, (l', sarg0)::more_sargs -> - if l <> l' && l' <> Nolabel then - raise(Error(sarg0.pexp_loc, val_env, - Apply_wrong_label l')) - else ([], more_sargs, - Some (type_argument val_env sarg0 ty ty0)) - | _ -> - assert false - end else try - let (l', sarg0, sargs, more_sargs) = - try - let (l', sarg0, sargs1, sargs2) = - Btype.extract_label name sargs - in (l', sarg0, sargs1 @ sargs2, more_sargs) - with Not_found -> - let (l', sarg0, sargs1, sargs2) = - Btype.extract_label name more_sargs - in (l', sarg0, sargs @ sargs1, sargs2) - in - if not optional && Btype.is_optional l' then - Location.prerr_warning sarg0.pexp_loc - (Warnings.Nonoptional_label (Printtyp.string_of_label l)); - sargs, more_sargs, - if not optional || Btype.is_optional l' then - Some (type_argument val_env sarg0 ty ty0) - else - let ty' = extract_option_type val_env ty - and ty0' = extract_option_type val_env ty0 in - let arg = type_argument val_env sarg0 ty' ty0' in - Some (option_some arg) - with Not_found -> - sargs, more_sargs, - if Btype.is_optional l - && (List.mem_assoc Nolabel sargs - || List.mem_assoc Nolabel more_sargs) - then - Some (option_none ty0 Location.none) - else None - in - let omitted = if arg = None then (l,ty0) :: omitted else omitted in - type_args ((l,arg)::args) omitted ty_fun ty_fun0 - sargs more_sargs - | _ -> - match sargs @ more_sargs with - (l, sarg0)::_ -> - if omitted <> [] then - raise(Error(sarg0.pexp_loc, val_env, Apply_wrong_label l)) - else - raise(Error(cl.cl_loc, val_env, Cannot_apply cl.cl_type)) - | [] -> - (List.rev args, - List.fold_left - (fun ty_fun (l,ty) -> Cty_arrow(l,ty,ty_fun)) - ty_fun0 omitted) - in - let (args, cty) = - let (_, ty_fun0) = Ctype.instance_class [] cl.cl_type in - if ignore_labels then - type_args [] [] cl.cl_type ty_fun0 [] sargs - else - type_args [] [] cl.cl_type ty_fun0 sargs [] - in - rc {cl_desc = Tcl_apply (cl, args); - cl_loc = scl.pcl_loc; - cl_type = cty; - cl_env = val_env; - cl_attributes = scl.pcl_attributes; - } - | Pcl_let (rec_flag, sdefs, scl') -> - let (defs, val_env) = - try - Typecore.type_let val_env rec_flag sdefs None - with Ctype.Unify [(ty, _)] -> - raise(Error(scl.pcl_loc, val_env, Make_nongen_seltype ty)) - in - let (vals, met_env) = - List.fold_right - (fun (id, id_loc) (vals, met_env) -> - let path = Pident id in - (* do not mark the value as used *) - let vd = Env.find_value path val_env in - Ctype.begin_def (); - let expr = - {exp_desc = - Texp_ident(path, mknoloc(Longident.Lident (Ident.name id)),vd); - exp_loc = Location.none; exp_extra = []; - exp_type = Ctype.instance val_env vd.val_type; - exp_attributes = []; - exp_env = val_env; - } - in - Ctype.end_def (); - Ctype.generalize expr.exp_type; - let desc = - {val_type = expr.exp_type; val_kind = Val_ivar (Immutable, - cl_num); - val_attributes = []; - Types.val_loc = vd.Types.val_loc; - } - in - let id' = Ident.create (Ident.name id) in - ((id', id_loc, expr) - :: vals, - Env.add_value id' desc met_env)) - (let_bound_idents_with_loc defs) - ([], met_env) - in - let cl = class_expr cl_num val_env met_env scl' in - let () = if rec_flag = Recursive then - check_recursive_bindings val_env defs - in - rc {cl_desc = Tcl_let (rec_flag, defs, vals, cl); - cl_loc = scl.pcl_loc; - cl_type = cl.cl_type; - cl_env = val_env; - cl_attributes = scl.pcl_attributes; - } - | Pcl_constraint (scl', scty) -> - Ctype.begin_class_def (); - let context = Typetexp.narrow () in - let cl = class_expr cl_num val_env met_env scl' in - Typetexp.widen context; - let context = Typetexp.narrow () in - let clty = class_type val_env scty in - Typetexp.widen context; - Ctype.end_def (); - - limited_generalize (Ctype.row_variable (Ctype.self_type cl.cl_type)) - cl.cl_type; - limited_generalize (Ctype.row_variable (Ctype.self_type clty.cltyp_type)) - clty.cltyp_type; - - begin match - Includeclass.class_types val_env cl.cl_type clty.cltyp_type - with - [] -> () - | error -> raise(Error(cl.cl_loc, val_env, Class_match_failure error)) - end; - let (vals, meths, concrs) = extract_constraints clty.cltyp_type in - rc {cl_desc = Tcl_constraint (cl, Some clty, vals, meths, concrs); - cl_loc = scl.pcl_loc; - cl_type = snd (Ctype.instance_class [] clty.cltyp_type); - cl_env = val_env; - cl_attributes = scl.pcl_attributes; - } - | Pcl_open (ovf, lid, e) -> - let used_slot = ref false in - let (path, new_val_env) = !Typecore.type_open ~used_slot ovf val_env scl.pcl_loc lid in - let (_path, new_met_env) = !Typecore.type_open ~used_slot ovf met_env scl.pcl_loc lid in - let cl = class_expr cl_num new_val_env new_met_env e in - rc {cl_desc = Tcl_open (ovf, path, lid, new_val_env, cl); - cl_loc = scl.pcl_loc; - cl_type = cl.cl_type; - cl_env = val_env; - cl_attributes = scl.pcl_attributes; - } - | Pcl_extension ext -> - raise (Error_forward (Builtin_attributes.error_of_extension ext)) (*******************************) @@ -1241,18 +486,6 @@ and class_expr_aux cl_num val_env met_env scl = let var_option = Predef.type_option (Btype.newgenvar ()) -let rec approx_declaration cl = - match cl.pcl_desc with - Pcl_fun (l, _, _, cl) -> - let arg = - if Btype.is_optional l then Ctype.instance_def var_option - else Ctype.newvar () in - Ctype.newty (Tarrow (l, arg, approx_declaration cl, Cok)) - | Pcl_let (_, _, cl) -> - approx_declaration cl - | Pcl_constraint (cl, _) -> - approx_declaration cl - | _ -> Ctype.newvar () let rec approx_description ct = match ct.pcty_desc with @@ -1289,7 +522,7 @@ let temp_abbrev loc env id arity = in (!params, ty, env) -let initial_env define_class approx +let initial_env approx (res, env) (cl, id, ty_id, obj_id, cl_id) = (* Temporary abbreviations *) let arity = List.length cl.pci_params in @@ -1298,7 +531,6 @@ let initial_env define_class approx (* Temporary type for the class constructor *) let constr_type = approx cl.pci_expr in - if !Clflags.principal then Ctype.generalize_spine constr_type; let dummy_cty = Cty_signature { csig_self = Ctype.newvar (); @@ -1328,13 +560,7 @@ let initial_env define_class approx clty_path = unbound_class; clty_loc = Location.none; clty_attributes = []; - } - ( - if define_class then - Env.add_class id dummy_class env - else - env - ) + } env in ((cl, id, ty_id, obj_id, obj_params, obj_ty, @@ -1342,7 +568,7 @@ let initial_env define_class approx constr_type, dummy_class)::res, env) -let class_infos define_class kind +let class_infos kind (cl, id, ty_id, obj_id, obj_params, obj_ty, cl_id, cl_params, cl_ty, @@ -1458,23 +684,11 @@ let class_infos define_class kind clty_loc = cl.pci_loc; clty_attributes = cl.pci_attributes; } - and clty = - {cty_params = params; cty_type = typ; - cty_variance = cty_variance; - cty_path = Path.Pident obj_id; - cty_new = - begin match cl.pci_virt with - | Virtual -> None - | Concrete -> Some constr_type - end; - cty_loc = cl.pci_loc; - cty_attributes = cl.pci_attributes; - } in dummy_class.cty_type <- typ; let env = Env.add_cltype ty_id cltydef ( - if define_class then Env.add_class id clty env else env) + env) in if cl.pci_virt = Concrete then begin @@ -1485,7 +699,7 @@ let class_infos define_class kind (fun name (_mut, vr, _ty) l -> if vr = Virtual then name :: l else l) sign.csig_vars [] in if mets <> [] || vals <> [] then - raise(Error(cl.pci_loc, env, Virtual_class(define_class, false, mets, + raise(Error(cl.pci_loc, env, Virtual_class(false, false, mets, vals))); end; @@ -1557,7 +771,7 @@ let class_infos define_class kind arity, pub_meths, List.rev !coercion_locs, expr) :: res, env) -let final_decl env define_class +let final_decl env (cl, id, clty, ty_id, cltydef, obj_id, obj_abbr, cl_id, cl_abbr, ci_params, arity, pub_meths, coe, expr) = @@ -1584,9 +798,7 @@ let final_decl env define_class None -> () | Some reason -> let printer = - if define_class - then function ppf -> Printtyp.class_declaration id ppf clty - else function ppf -> Printtyp.cltype_declaration id ppf cltydef + function ppf -> Printtyp.cltype_declaration id ppf cltydef in raise(Error(cl.pci_loc, env, Unbound_type_var(printer, reason))) end; @@ -1609,7 +821,7 @@ let final_decl env define_class }) (* (cl.pci_variance, cl.pci_loc)) *) -let class_infos define_class kind +let class_infos kind (cl, id, ty_id, obj_id, obj_params, obj_ty, cl_id, cl_params, cl_ty, @@ -1617,7 +829,7 @@ let class_infos define_class kind (res, env) = Builtin_attributes.warning_scope cl.pci_attributes (fun () -> - class_infos define_class kind + class_infos kind (cl, id, ty_id, obj_id, obj_params, obj_ty, cl_id, cl_params, cl_ty, @@ -1636,18 +848,16 @@ let merge_type_decls (id, id_loc, clty, ty_id, cltydef, obj_id, obj_abbr, cl_id, cl_abbr, arity, pub_meths, coe, expr, req) -let final_env define_class env - (id, _id_loc, clty, ty_id, cltydef, obj_id, obj_abbr, cl_id, cl_abbr, +let final_env env + (_id, _id_loc, _clty, ty_id, cltydef, obj_id, obj_abbr, cl_id, cl_abbr, _arity, _pub_meths, _coe, _expr, _req) = (* Add definitions after cleaning them *) Env.add_type ~check:true obj_id (Subst.type_declaration Subst.identity obj_abbr) ( Env.add_type ~check:true cl_id (Subst.type_declaration Subst.identity cl_abbr) ( - Env.add_cltype ty_id (Subst.cltype_declaration Subst.identity cltydef) ( - if define_class then - Env.add_class id (Subst.class_declaration Subst.identity clty) env - else env))) + Env.add_cltype ty_id (Subst.cltype_declaration Subst.identity cltydef) + env)) (* Check that #c is coercible to c if there is a self-coercion *) let check_coercions env @@ -1688,8 +898,8 @@ let check_coercions env cls_info=req} (*******************************) - -let type_classes define_class approx kind env cls = +(* FIXME: [define_class] is always [false] here *) +let type_classes approx kind env cls = let cls = List.map (function cl -> @@ -1701,49 +911,30 @@ let type_classes define_class approx kind env cls = Ctype.init_def (Ident.current_time ()); Ctype.begin_class_def (); let (res, env) = - List.fold_left (initial_env define_class approx) ([], env) cls + List.fold_left (initial_env approx) ([], env) cls in let (res, env) = - List.fold_right (class_infos define_class kind) res ([], env) + List.fold_right (class_infos kind) res ([], env) in Ctype.end_def (); - let res = List.rev_map (final_decl env define_class) res in + let res = List.rev_map (final_decl env ) res in let decls = List.fold_right extract_type_decls res [] in let decls = Typedecl.compute_variance_decls env decls in let res = List.map2 merge_type_decls res decls in - let env = List.fold_left (final_env define_class) env res in + let env = List.fold_left final_env env res in let res = List.map (check_coercions env) res in (res, env) -let class_num = ref 0 -let class_declaration env sexpr = - incr class_num; - let expr = class_expr (string_of_int !class_num) env env sexpr in - (expr, expr.cl_type) let class_description env sexpr = let expr = class_type env sexpr in (expr, expr.cltyp_type) -let class_declarations env cls = - let info, env = - type_classes true approx_declaration class_declaration env cls - in - let ids, exprs = - List.split - (List.map - (fun ci -> ci.cls_id, ci.cls_info.ci_expr) - info) - in - check_recursive_class_bindings env ids exprs; - info, env -let class_descriptions env cls = - type_classes true approx_description class_description env cls let class_type_declarations env cls = let (decls, env) = - type_classes false approx_description class_description env cls + type_classes approx_description class_description env cls in (List.map (fun decl -> @@ -1758,44 +949,7 @@ let class_type_declarations env cls = decls, env) -let rec unify_parents env ty cl = - match cl.cl_desc with - Tcl_ident (p, _, _) -> - begin try - let decl = Env.find_class p env in - let _, body = Ctype.find_cltype_for_path env decl.cty_path in - Ctype.unify env ty (Ctype.instance env body) - with - Not_found -> () - | _exn -> assert false - end - | Tcl_structure st -> unify_parents_struct env ty st - | Tcl_open (_, _, _, _, cl) - | Tcl_fun (_, _, _, cl, _) - | Tcl_apply (cl, _) - | Tcl_let (_, _, _, cl) - | Tcl_constraint (cl, _, _, _, _) -> unify_parents env ty cl -and unify_parents_struct env ty st = - List.iter - (function - | {cf_desc = Tcf_inherit (_, cl, _, _, _)} -> - unify_parents env ty cl - | _ -> ()) - st.cstr_fields - -let type_object env loc s = - incr class_num; - let (desc, sign) = - class_structure (string_of_int !class_num) true env env loc s in - let sty = Ctype.expand_head env sign.csig_self in - Ctype.hide_private_methods sty; - let (fields, _) = Ctype.flatten_fields (Ctype.object_fields sty) in - let meths = List.map (fun (s,_,_) -> s) fields in - unify_parents_struct env sign.csig_self desc; - (desc, sign, meths) -let () = - Typecore.type_object := type_object (*******************************) @@ -1833,14 +987,6 @@ let report_error env ppf = function fprintf ppf "@[This class expression is not a class structure; it has type@ %a@]" Printtyp.class_type clty - | Cannot_apply _ -> - fprintf ppf - "This class expression is not a class function, it cannot be applied" - | Apply_wrong_label l -> - let mark_label = function - | Nolabel -> "out label" - | l -> sprintf " label %s" (Btype.prefixed_label_name l) in - fprintf ppf "This argument cannot be applied with%s" (mark_label l) | Pattern_type_clash ty -> (* XXX Trace *) (* XXX Revoir message d'erreur | Improve error message *) @@ -1848,9 +994,6 @@ let report_error env ppf = function fprintf ppf "@[%s@ %a@]" "This pattern cannot match self: it only matches values of type" Printtyp.type_expr ty - | Unbound_class_2 cl -> - fprintf ppf "@[The class@ %a@ is not yet completely defined@]" - Printtyp.longident cl | Unbound_class_type_2 cl -> fprintf ppf "@[The class type@ %a@ is not yet completely defined@]" Printtyp.longident cl @@ -1902,10 +1045,6 @@ let report_error env ppf = function "@[The abbreviation %a@ is used with parameters@ %a@ \ which are incompatible with constraints@ %a@]" Printtyp.ident id Printtyp.type_expr params Printtyp.type_expr cstrs - | Class_match_failure error -> - Includeclass.report_error ppf error - | Unbound_val lab -> - fprintf ppf "Unbound instance variable %s" lab | Unbound_type_var (printer, reason) -> let print_common ppf kind ty0 real lab ty = let ty1 = @@ -1926,12 +1065,6 @@ let report_error env ppf = function "@[@[Some type variables are unbound in this type:@;<1 2>%t@]@ \ @[%a@]@]" printer print_reason reason - | Make_nongen_seltype ty -> - fprintf ppf - "@[@[Self type should not occur in the non-generic type@;<1 2>\ - %a@]@,\ - It would escape the scope of its class@]" - Printtyp.type_scheme ty | Non_generalizable_class (id, clty) -> fprintf ppf "@[The type of this class,@ %a,@ \ @@ -1951,27 +1084,11 @@ let report_error env ppf = function Printtyp.report_unification_error ppf env trace (fun ppf -> fprintf ppf "Type") (fun ppf -> fprintf ppf "is not compatible with type") - | Final_self_clash trace -> - Printtyp.report_unification_error ppf env trace - (function ppf -> - fprintf ppf "This object is expected to have type") - (function ppf -> - fprintf ppf "but actually has type") - | Mutability_mismatch (_lab, mut) -> - let mut1, mut2 = - if mut = Immutable then "mutable", "immutable" - else "immutable", "mutable" in - fprintf ppf - "@[The instance variable is %s;@ it cannot be redefined as %s@]" - mut1 mut2 | No_overriding (_, "") -> fprintf ppf "@[This inheritance does not override any method@ %s@]" "instance variable" | No_overriding (kind, name) -> fprintf ppf "@[The %s `%s'@ has no previous definition@]" kind name - | Duplicate (kind, name) -> - fprintf ppf "@[The %s `%s'@ has multiple definitions in this object@]" - kind name let report_error env ppf err = Printtyp.wrap_printing_env env (fun () -> report_error env ppf err) diff --git a/analysis/vendor/ml/typeclass.mli b/analysis/vendor/ml/typeclass.mli new file mode 100644 index 000000000..b31bff919 --- /dev/null +++ b/analysis/vendor/ml/typeclass.mli @@ -0,0 +1,65 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Jerome Vouillon, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1996 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +open Asttypes +open Types +open Format + +type 'a class_info = { + cls_id : Ident.t; + cls_id_loc : string loc; + cls_decl : class_declaration; + cls_ty_id : Ident.t; + cls_ty_decl : class_type_declaration; + cls_obj_id : Ident.t; + cls_obj_abbr : type_declaration; + cls_typesharp_id : Ident.t; + cls_abbr : type_declaration; + cls_arity : int; + cls_pub_methods : string list; + cls_info : 'a; +} + +type class_type_info = { + clsty_ty_id : Ident.t; + clsty_id_loc : string loc; + clsty_ty_decl : class_type_declaration; + clsty_obj_id : Ident.t; + clsty_obj_abbr : type_declaration; + clsty_typesharp_id : Ident.t; + clsty_abbr : type_declaration; + clsty_info : Typedtree.class_type_declaration; +} + + + + + +val class_type_declarations: + Env.t -> Parsetree.class_type_declaration list -> class_type_info list * Env.t + + +val approx_class_declarations: + Env.t -> Parsetree.class_type_declaration list -> class_type_info list + +val virtual_methods: Types.class_signature -> label list + + +type error + +exception Error of Location.t * Env.t * error +exception Error_forward of Location.error + +val report_error : Env.t -> formatter -> error -> unit diff --git a/analysis/vendor/compiler-libs-406/typecore.ml b/analysis/vendor/ml/typecore.ml similarity index 65% rename from analysis/vendor/compiler-libs-406/typecore.ml rename to analysis/vendor/ml/typecore.ml index 9802f3242..c0cd6e131 100644 --- a/analysis/vendor/compiler-libs-406/typecore.ml +++ b/analysis/vendor/ml/typecore.ml @@ -35,28 +35,21 @@ type error = | Apply_non_function of type_expr | Apply_wrong_label of arg_label * type_expr | Label_multiply_defined of string - | Label_missing of Ident.t list + | Labels_missing of string list | Label_not_mutable of Longident.t | Wrong_name of string * type_expr * string * Path.t * string * string list | Name_type_mismatch of string * Longident.t * (Path.t * Path.t) * (Path.t * Path.t) list - | Invalid_format of string | Undefined_method of type_expr * string * string list option - | Undefined_inherited_method of string * string list - | Virtual_class of Longident.t | Private_type of type_expr | Private_label of Longident.t * type_expr - | Unbound_instance_variable of string * string list - | Instance_variable_not_mutable of bool * string + | Not_subtype of (type_expr * type_expr) list * (type_expr * type_expr) list - | Outside_class - | Value_multiply_overridden of string | Coercion_failure of type_expr * type_expr * (type_expr * type_expr) list * bool | Too_many_arguments of bool * type_expr | Abstract_wrong_label of arg_label * type_expr | Scoping_let_module of string * type_expr - | Masked_instance_variable of Longident.t | Not_a_variant_type of Longident.t | Incoherent_label_order | Less_general of string * (type_expr * type_expr) list @@ -78,9 +71,10 @@ type error = | Literal_overflow of string | Unknown_literal of string * char | Illegal_letrec_pat - | Illegal_letrec_expr - | Illegal_class_expr - + | Labels_omitted of string list + | Empty_record_literal + | Uncurried_arity_mismatch of type_expr * int * int + | Field_not_optional of string * type_expr exception Error of Location.t * Env.t * error exception Error_forward of Location.error @@ -104,10 +98,6 @@ let type_package = ref (fun _ -> assert false) (* Forward declaration, to be filled in by Typeclass.class_structure *) -let type_object = - ref (fun _env _s -> assert false : - Env.t -> Location.t -> Parsetree.class_structure -> - Typedtree.class_structure * Types.class_signature * string list) (* Saving and outputting type information. @@ -177,7 +167,7 @@ let iter_expression f e = | Pexp_for (_, e1, e2, _, e3) -> expr e1; expr e2; expr e3 | Pexp_override sel -> List.iter (fun (_, e) -> expr e) sel | Pexp_letmodule (_, me, e) -> expr e; module_expr me - | Pexp_object { pcstr_fields = fs } -> List.iter class_field fs + | Pexp_object _ -> assert false | Pexp_pack me -> module_expr me | Pexp_unreachable -> () @@ -215,30 +205,10 @@ let iter_expression f e = | Pstr_include {pincl_mod = me} | Pstr_module {pmb_expr = me} -> module_expr me | Pstr_recmodule l -> List.iter (fun x -> module_expr x.pmb_expr) l - | Pstr_class cdl -> List.iter (fun c -> class_expr c.pci_expr) cdl - - and class_expr ce = - match ce.pcl_desc with - | Pcl_constr _ -> () - | Pcl_structure { pcstr_fields = fs } -> List.iter class_field fs - | Pcl_fun (_, eo, _, ce) -> may expr eo; class_expr ce - | Pcl_apply (ce, lel) -> - class_expr ce; List.iter (fun (_, e) -> expr e) lel - | Pcl_let (_, pel, ce) -> - List.iter binding pel; class_expr ce - | Pcl_open (_, _, ce) - | Pcl_constraint (ce, _) -> class_expr ce - | Pcl_extension _ -> () - - and class_field cf = - match cf.pcf_desc with - | Pcf_inherit (_, ce, _) -> class_expr ce - | Pcf_val (_, _, Cfk_virtual _) - | Pcf_method (_, _, Cfk_virtual _ ) | Pcf_constraint _ -> () - | Pcf_val (_, _, Cfk_concrete (_, e)) - | Pcf_method (_, _, Cfk_concrete (_, e)) -> expr e - | Pcf_initializer e -> expr e - | Pcf_attribute _ | Pcf_extension _ -> () + | Pstr_class () -> () + + + in expr e @@ -267,9 +237,9 @@ let type_constant = function | Const_char _ -> instance_def Predef.type_char | Const_string _ -> instance_def Predef.type_string | Const_float _ -> instance_def Predef.type_float - | Const_int32 _ -> instance_def Predef.type_int32 | Const_int64 _ -> instance_def Predef.type_int64 - | Const_nativeint _ -> instance_def Predef.type_nativeint + | Const_int32 _ + | Const_nativeint _ -> assert false let constant : Parsetree.constant -> (Asttypes.constant, error) result = function @@ -331,7 +301,7 @@ let extract_option_type env ty = let extract_concrete_record env ty = match extract_concrete_typedecl env ty with - (p0, p, {type_kind=Type_record (fields, _)}) -> (p0, p, fields) + (p0, p, {type_kind=Type_record (fields, repr)}) -> (p0, p, fields, repr) | _ -> raise Not_found let extract_concrete_variant env ty = @@ -340,14 +310,19 @@ let extract_concrete_variant env ty = | (p0, p, {type_kind=Type_open}) -> (p0, p, []) | _ -> raise Not_found -let extract_label_names env ty = - try - let (_, _,fields) = extract_concrete_record env ty in - List.map (fun l -> l.Types.ld_id) fields - with Not_found -> - assert false +let label_is_optional ld = + match ld.lbl_repres with + | Record_optional_labels lbls -> Ext_list.mem_string lbls ld.lbl_name + | Record_inlined {optional_labels} -> Ext_list.mem_string optional_labels ld.lbl_name + | _ -> false -(* Typing of patterns *) +let check_optional_attr env ld attrs loc = + let check_redundant () = + if not (label_is_optional ld) then + raise (Error (loc, env, Field_not_optional (ld.lbl_name, ld.lbl_res))); + true in + Ext_list.exists attrs (fun ({txt}, _) -> + txt = "res.optional" && check_redundant ()) (* unification inside type_pat*) let unify_pat_types loc env ty ty' = @@ -646,7 +621,7 @@ module NameChoice(Name : sig val get_type: t -> type_expr val get_descrs: Env.type_descriptions -> t list val unbound_name_error: Env.t -> Longident.t loc -> 'a - val in_env: t -> bool + end) = struct open Name @@ -707,41 +682,14 @@ end) = struct paths, false)); lbl end - | Some(tpath0, tpath, pr) -> - let warn_pr () = - let label = label_of_kind type_kind in - warn lid.loc - (Warnings.Not_principal - ("this type-based " ^ label ^ " disambiguation")) - in + | Some(tpath0, tpath) -> try let lbl, use = disambiguate_by_type env tpath scope in use (); - if not pr then begin - (* Check if non-principal type is affecting result *) - match lbls with - [] -> warn_pr () - | (lbl', _use') :: rest -> - let lbl_tpath = get_type_path lbl' in - if not (compare_type_path env tpath lbl_tpath) then warn_pr () - else - let paths = ambiguous_types env lbl rest in - if paths <> [] then - warn lid.loc - (Warnings.Ambiguous_name ([Longident.last lid.txt], - paths, false)) - end; lbl with Not_found -> try let lbl = lookup_from_type env tpath lid in check_lk tpath lbl; - if in_env lbl then - begin - let s = Printtyp.string_of_path tpath in - warn lid.loc - (Warnings.Name_out_of_scope (s, [Longident.last lid.txt], false)); - end; - if not pr then warn_pr (); lbl with Not_found -> if lbls = [] then unbound_name_error env lid else @@ -757,13 +705,6 @@ end) = struct raise (Error (lid.loc, env, Name_type_mismatch (type_kind, lid.txt, tp, tpl))) in - if in_env lbl then - begin match scope with - (lab1,_)::_ when lab1 == lbl -> () - | _ -> - Location.prerr_warning lid.loc - (Warnings.Disambiguated_name(get_name lbl)) - end; lbl end @@ -778,10 +719,6 @@ module Label = NameChoice (struct let get_type lbl = lbl.lbl_res let get_descrs = snd let unbound_name_error = Typetexp.unbound_label_error - let in_env lbl = - match lbl.lbl_repres with - | Record_regular | Record_optional_labels _ | Record_float_unused | Record_unboxed false -> true - | Record_unboxed true | Record_inlined _ | Record_extension -> false end) let disambiguate_label_by_ids keep closed ids labels = @@ -792,23 +729,20 @@ let disambiguate_label_by_ids keep closed ids labels = and check_closed (lbl, _) = (not closed || List.length ids = Array.length lbl.lbl_all) in - let labels' = List.filter check_ids labels in + let labels' = Ext_list.filter labels check_ids in if keep && labels' = [] then (false, labels) else - let labels'' = List.filter check_closed labels' in + let labels'' = Ext_list.filter labels' check_closed in if keep && labels'' = [] then (false, labels') else (true, labels'') (* Only issue warnings once per record constructor/pattern *) let disambiguate_lid_a_list loc closed env opath lid_a_list = let ids = List.map (fun (lid, _) -> Longident.last lid.txt) lid_a_list in - let w_pr = ref false and w_amb = ref [] - and w_scope = ref [] and w_scope_ty = ref "" in + let w_amb = ref [] in let warn loc msg = let open Warnings in match msg with - | Not_principal _ -> w_pr := true + | Ambiguous_name([s], l, _) -> w_amb := (s, l) :: !w_amb - | Name_out_of_scope(ty, [s], _) -> - w_scope := s :: !w_scope; w_scope_ty := ty | _ -> Location.prerr_warning loc msg in let process_label lid = @@ -827,7 +761,7 @@ let disambiguate_lid_a_list loc closed env opath lid_a_list = Typetexp.unbound_label_error env lid; let (ok, labels) = match opath with - Some (_, _, true) -> (true, scope) (* disambiguate only checks scope *) + Some (_, _) -> (true, scope) (* disambiguate only checks scope *) | _ -> disambiguate_label_by_ids (opath=None) closed ids scope in if ok then Label.disambiguate lid env opath labels ~warn ~scope @@ -835,10 +769,7 @@ let disambiguate_lid_a_list loc closed env opath lid_a_list = in let lbl_a_list = List.map (fun (lid,a) -> lid, process_label lid, a) lid_a_list in - if !w_pr then - Location.prerr_warning loc - (Warnings.Not_principal "this type-based record disambiguation") - else begin + begin match List.rev !w_amb with (_,types)::_ as amb -> let paths = @@ -854,9 +785,6 @@ let disambiguate_lid_a_list loc closed env opath lid_a_list = amb | _ -> () end; - if !w_scope <> [] then - Location.prerr_warning loc - (Warnings.Name_out_of_scope (!w_scope_ty, List.rev !w_scope, true)); lbl_a_list let rec find_record_qual = function @@ -937,7 +865,6 @@ module Constructor = NameChoice (struct let get_type cstr = cstr.cstr_res let get_descrs = fst let unbound_name_error = Typetexp.unbound_constructor_error - let in_env _ = true end) (* unification of a type with a tconstr with @@ -1097,7 +1024,7 @@ and type_pat_aux ~constrs ~labels ~no_existentials ~mode ~explode ~env else or_ ~loc:gloc (constant ~loc:gloc (Pconst_char c1)) - (loop (Char.chr(Char.code c1 + 1)) c2) + (loop (c1 + 1) c2) in let p = if c1 <= c2 then loop c1 c2 else loop c2 c1 in let p = {p with ppat_loc=loc} in @@ -1121,7 +1048,7 @@ and type_pat_aux ~constrs ~labels ~no_existentials ~mode ~explode ~env let opath = try let (p0, p, _) = extract_concrete_variant !env expected_ty in - Some (p0, p, true) + Some (p0, p) with Not_found -> None in let candidates = @@ -1234,11 +1161,24 @@ and type_pat_aux ~constrs ~labels ~no_existentials ~mode ~explode ~env assert (lid_sp_list <> []); let opath, record_ty = try - let (p0, p,_) = extract_concrete_record !env expected_ty in - Some (p0, p, true), expected_ty + let (p0, p, _, _) = extract_concrete_record !env expected_ty in + Some (p0, p), expected_ty with Not_found -> None, newvar () in + let process_optional_label (ld, pat) = + let exp_optional_attr = check_optional_attr !env ld pat.ppat_attributes pat.ppat_loc in + let isFromPamatch = match pat.ppat_desc with + | Ppat_construct ({txt = Lident s}, _) -> + String.length s >= 2 && s.[0] = '#' && s.[1] = '$' + | _ -> false + in + if label_is_optional ld && not exp_optional_attr && not isFromPamatch then + let lid = mknoloc (Longident.(Ldot (Lident "*predef*", "Some"))) in + Ast_helper.Pat.construct ~loc:pat.ppat_loc lid (Some pat) + else pat + in let type_label_pat (label_lid, label, sarg) k = + let sarg = process_optional_label (label, sarg) in begin_def (); let (vars, ty_arg, ty_res) = instance_label false label in if vars = [] then end_def (); @@ -1485,88 +1425,8 @@ let type_pattern_list env spatl scope expected_tys allow = let new_env, unpacks = add_pattern_variables !new_env in (patl, new_env, get_ref pattern_force, unpacks) -let type_class_arg_pattern cl_num val_env met_env l spat = - reset_pattern None false; - let nv = newvar () in - let pat = type_pat (ref val_env) spat nv in - if has_variants pat then begin - Parmatch.pressure_variants val_env [pat]; - iter_pattern finalize_variant pat - end; - List.iter (fun f -> f()) (get_ref pattern_force); - if is_optional l then unify_pat val_env pat (type_option (newvar ())); - let (pv, met_env) = - List.fold_right - (fun (id, ty, name, loc, as_var) (pv, env) -> - let check s = - if as_var then Warnings.Unused_var s - else Warnings.Unused_var_strict s in - let id' = Ident.create (Ident.name id) in - ((id', name, id, ty)::pv, - Env.add_value id' {val_type = ty; - val_kind = Val_ivar (Immutable, cl_num); - val_attributes = []; - Types.val_loc = loc; - } ~check - env)) - !pattern_variables ([], met_env) - in - let val_env, _ = add_pattern_variables val_env in - (pat, pv, val_env, met_env) - -let type_self_pattern cl_num privty val_env met_env par_env spat = - let open Ast_helper in - let spat = - Pat.mk (Ppat_alias (Pat.mk(Ppat_alias (spat, mknoloc "selfpat-*")), - mknoloc ("selfpat-" ^ cl_num))) - in - reset_pattern None false; - let nv = newvar() in - let pat = type_pat (ref val_env) spat nv in - List.iter (fun f -> f()) (get_ref pattern_force); - let meths = ref Meths.empty in - let vars = ref Vars.empty in - let pv = !pattern_variables in - pattern_variables := []; - let (val_env, met_env, par_env) = - List.fold_right - (fun (id, ty, _name, loc, as_var) (val_env, met_env, par_env) -> - (Env.add_value id {val_type = ty; - val_kind = Val_unbound; - val_attributes = []; - Types.val_loc = loc; - } val_env, - Env.add_value id {val_type = ty; - val_kind = Val_self (meths, vars, cl_num, privty); - val_attributes = []; - Types.val_loc = loc; - } - ~check:(fun s -> if as_var then Warnings.Unused_var s - else Warnings.Unused_var_strict s) - met_env, - Env.add_value id {val_type = ty; val_kind = Val_unbound; - val_attributes = []; - Types.val_loc = loc; - } par_env)) - pv (val_env, met_env, par_env) - in - (pat, meths, vars, val_env, met_env, par_env) -let delayed_checks = ref [] -let reset_delayed_checks () = delayed_checks := [] -let add_delayed_check f = - delayed_checks := (f, Warnings.backup ()) :: !delayed_checks -let force_delayed_checks () = - (* checks may change type levels *) - let snap = Btype.snapshot () in - let w_old = Warnings.backup () in - List.iter - (fun (f, w) -> Warnings.restore w; f ()) - (List.rev !delayed_checks); - Warnings.restore w_old; - reset_delayed_checks (); - Btype.backtrack snap let rec final_subexpression sexp = match sexp.pexp_desc with @@ -1581,6 +1441,8 @@ let rec final_subexpression sexp = (* Generalization criterion for expressions *) let rec is_nonexpansive exp = + List.exists (function (({txt = "internal.expansive"},_) : Parsetree.attribute) -> true | _ -> false) + exp.exp_attributes || match exp.exp_desc with Texp_ident(_,_,_) -> true | Texp_constant _ -> true @@ -1611,31 +1473,16 @@ let rec is_nonexpansive exp = fields && is_nonexpansive_opt extended_expression | Texp_field(exp, _, _) -> is_nonexpansive exp - | Texp_array [] -> true + | Texp_array [] -> !Config.unsafe_empty_array | Texp_ifthenelse(_cond, ifso, ifnot) -> is_nonexpansive ifso && is_nonexpansive_opt ifnot | Texp_sequence (_e1, e2) -> is_nonexpansive e2 (* PR#4354 *) - | Texp_new (_, _, cl_decl) when Ctype.class_type_arity cl_decl.cty_type > 0 -> - true + | Texp_new _ -> + assert false (* Note: nonexpansive only means no _observable_ side effects *) | Texp_lazy e -> is_nonexpansive e - | Texp_object ({cstr_fields=fields; cstr_type = { csig_vars=vars}}, _) -> - let count = ref 0 in - List.for_all - (fun field -> match field.cf_desc with - Tcf_method _ -> true - | Tcf_val (_, _, _, Tcfk_concrete (_, e), _) -> - incr count; is_nonexpansive e - | Tcf_val (_, _, _, Tcfk_virtual _, _) -> - incr count; true - | Tcf_initializer e -> is_nonexpansive e - | Tcf_constraint _ -> true - | Tcf_inherit _ -> false - | Tcf_attribute _ -> true) - fields && - Vars.fold (fun _ (mut,_,_) b -> decr count; b && mut = Immutable) - vars true && - !count = 0 + | Texp_object () -> + assert false | Texp_letmodule (_, _, mexp, e) -> is_nonexpansive_mod mexp && is_nonexpansive e | Texp_pack mexp -> @@ -1688,643 +1535,8 @@ and is_nonexpansive_opt = function None -> true | Some e -> is_nonexpansive e -module Env' = Env -module Rec_context = -struct - type access = - Dereferenced - (** [Dereferenced] indicates that the value (not just the address) of a - variable is accessed *) - - | Guarded - (** [Guarded] indicates that the address of a variable is used in a - guarded context, i.e. under a constructor. A variable that is - dereferenced within a function body or lazy context is also considered - guarded. *) - - | Unguarded - (** [Unguarded] indicates that the address of a variable is used in an - unguarded context, i.e. not under a constructor. *) - - (** [guard] represents guarded contexts such as [C -] and [{l = -}] *) - let guard : access -> access = function - | Dereferenced -> Dereferenced - | Guarded -> Guarded - | Unguarded -> Guarded - - (** [inspect] represents elimination contexts such as [match - with cases], - [e -] and [- e] *) - let inspect : access -> access = function - | Dereferenced -> Dereferenced - | Guarded -> Dereferenced - | Unguarded -> Dereferenced - - (** [delay] represents contexts that delay evaluation such as [fun p -> -] - or [lazy -] *) - let delay : access -> access = function - | Dereferenced -> Guarded - | Guarded -> Guarded - | Unguarded -> Guarded - - module Use : - sig - type t - val guard : t -> t - (** An expression appears in a guarded context *) - - val discard : t -> t - (** The address of a subexpression is not used, but may be bound *) - - val inspect : t -> t - (** The value of a subexpression is inspected with match, application, etc. *) - - val delay : t -> t - (** An expression appears under 'fun p ->' or 'lazy' *) - - val join : t -> t -> t - (** Combine the access information of two expressions *) - - val single : Ident.t -> access -> t - (** Combine the access information of two expressions *) - - val empty : t - (** No variables are accessed in an expression; it might be a - constant or a global identifier *) - - val unguarded : t -> Ident.t list - (** The list of identifiers that are used in an unguarded context *) - - val dependent : t -> Ident.t list - (** The list of all used identifiers *) - end = - struct - module M = Map.Make(Ident) - - (** A "t" maps each rec-bound variable to an access status *) - type t = access M.t - - let map f tbl = M.map f tbl - let guard t = map guard t - let inspect t = map inspect t - let delay t = map delay t - let discard = guard - - let prec x y = - match x, y with - | Dereferenced, _ - | _, Dereferenced -> Dereferenced - | Unguarded, _ - | _, Unguarded -> Unguarded - | _ -> Guarded - - let join x y = - M.fold - (fun id v tbl -> - let v' = try M.find id tbl with Not_found -> Guarded in - M.add id (prec v v') tbl) - x y - - let single id access = M.add id access M.empty - - let empty = M.empty - let list_matching p t = - let r = ref [] in - M.iter (fun id v -> if p v then r := id :: !r) t; - !r - - let unguarded = - list_matching (function Unguarded | Dereferenced -> true | _ -> false) - - let dependent = - list_matching (function _ -> true) - end - - module Env = - struct - (* A typing environment maps identifiers to types *) - type env = Use.t Ident.tbl - - let empty = Ident.empty - - let join x y = - let r = - Ident.fold_all - (fun id v tbl -> - let v' = try Ident.find_same id tbl with Not_found -> Use.empty in - Ident.add id (Use.join v v') tbl) - x - y - in - r - end -end -let rec pattern_variables : Typedtree.pattern -> Ident.t list = - fun pat -> match pat.pat_desc with - | Tpat_any -> [] - | Tpat_var (id, _) -> [id] - | Tpat_alias (pat, id, _) -> id :: pattern_variables pat - | Tpat_constant _ -> [] - | Tpat_tuple pats -> List.concat (List.map pattern_variables pats) - | Tpat_construct (_, _, pats) -> - List.concat (List.map pattern_variables pats) - | Tpat_variant (_, Some pat, _) -> pattern_variables pat - | Tpat_variant (_, None, _) -> [] - | Tpat_record (fields, _) -> - List.concat (List.map (fun (_,_,p) -> pattern_variables p) fields) - | Tpat_array pats -> - List.concat (List.map pattern_variables pats) - | Tpat_or (l,r,_) -> - pattern_variables l @ pattern_variables r - | Tpat_lazy p -> - pattern_variables p - -module Rec_check = -struct - open Rec_context - - let build_unguarded_env : Ident.t list -> Env.env = fun idlist -> - List.fold_left - (fun env id -> Ident.add id (Use.single id Unguarded) env) - Env.empty - idlist - - let is_ref : Types.value_description -> bool = function - | { Types.val_kind = - Types.Val_prim { Primitive.prim_name = "%makemutable"; - prim_arity = 1 } } -> - true - | _ -> false - - let scrape env ty = - (Ctype.repr (Ctype.expand_head_opt env (Ctype.correct_levels ty))).desc - - let array_element_kind env ty = - match scrape env ty with - | Tvar _ | Tunivar _ -> - `Pgenarray - | Tconstr(p, _, _) -> - if Path.same p Predef.path_int || Path.same p Predef.path_char then - `Pintarray - else if Path.same p Predef.path_float then - `Pfloatarray - else if Path.same p Predef.path_string - || Path.same p Predef.path_array - || Path.same p Predef.path_nativeint - || Path.same p Predef.path_int32 - || Path.same p Predef.path_int64 then - `Paddrarray - else begin - try - match Env'.find_type p env with - {type_kind = Type_abstract} -> - `Pgenarray - | {type_kind = Type_variant cstrs} - when List.for_all (fun c -> c.Types.cd_args = Types.Cstr_tuple []) - cstrs -> - `Pintarray - | {type_kind = _} -> - `Paddrarray - with Not_found -> - (* This can happen due to e.g. missing -I options, - causing some .cmi files to be unavailable. - Maybe we should emit a warning. *) - `Pgenarray - end - | _ -> - `Paddrarray - - let array_type_kind env ty = - match scrape env ty with - | Tconstr(p, [elt_ty], _) | Tpoly({desc = Tconstr(p, [elt_ty], _)}, _) - when Path.same p Predef.path_array -> - array_element_kind env elt_ty - | _ -> - (* This can happen with e.g. Obj.field *) - `Pgenarray - - let array_kind exp = array_type_kind exp.exp_env exp.exp_type - - let has_concrete_element_type : Typedtree.expression -> bool = - fun e -> array_kind e <> `Pgenarray - - type sd = Static | Dynamic - - let rec classify_expression : Typedtree.expression -> sd = - fun exp -> match exp.exp_desc with - | Texp_let (_, _, e) - | Texp_letmodule (_, _, _, e) - | Texp_sequence (_, e) - | Texp_letexception (_, e) -> classify_expression e - | Texp_ident _ - | Texp_for _ - | Texp_constant _ - | Texp_new _ - | Texp_instvar _ - | Texp_tuple _ - | Texp_array _ - | Texp_construct _ - | Texp_variant _ - | Texp_record _ - | Texp_setfield _ - | Texp_while _ - | Texp_setinstvar _ - | Texp_pack _ - | Texp_object _ - | Texp_function _ - | Texp_lazy _ - | Texp_unreachable - | Texp_extension_constructor _ -> Static - | Texp_apply ({exp_desc = Texp_ident (_, _, vd)}, _) - when is_ref vd -> Static - | Texp_apply _ - | Texp_match _ - | Texp_ifthenelse _ - | Texp_send _ - | Texp_field _ - | Texp_assert _ - | Texp_try _ - | Texp_override _ -> Dynamic - - let rec expression : Env.env -> Typedtree.expression -> Use.t = - fun env exp -> match exp.exp_desc with - | Texp_ident (pth, _, _) -> - (path env pth) - | Texp_let (rec_flag, bindings, body) -> - let env', ty = value_bindings rec_flag env bindings in - (* Here and in other binding constructs 'discard' is used in a - similar way to the way it's used in sequence: uses are - propagated, but unguarded access are not. *) - Use.join (Use.discard ty) (expression (Env.join env env') body) - | Texp_letmodule (x, _, m, e) -> - let ty = modexp env m in - Use.join (Use.discard ty) (expression (Ident.add x ty env) e) - | Texp_match (e, val_cases, exn_cases, _) -> - let t = expression env e in - let exn_case env {Typedtree.c_rhs} = expression env c_rhs in - let cs = list (case ~scrutinee:t) env val_cases - and es = list exn_case env exn_cases in - Use.(join cs es) - | Texp_for (_, _, e1, e2, _, e3) -> - Use.(join - (join - (inspect (expression env e1)) - (inspect (expression env e2))) - (* The body is evaluated, but not used, and not available - for inclusion in another value *) - (discard (expression env e3))) - - | Texp_constant _ -> - Use.empty - | Texp_new (pth, _, _) -> - Use.inspect (path env pth) - | Texp_instvar _ -> - Use.empty - | Texp_apply ({exp_desc = Texp_ident (_, _, vd)}, [_, Some arg]) - when is_ref vd -> - Use.guard (expression env arg) - | Texp_apply (e, args) -> - let arg env (_, eo) = option expression env eo in - Use.(join - (inspect (expression env e)) - (inspect (list arg env args))) - | Texp_tuple exprs -> - Use.guard (list expression env exprs) - | Texp_array exprs when array_kind exp = `Pfloatarray -> - Use.inspect (list expression env exprs) - | Texp_array exprs when has_concrete_element_type exp -> - Use.guard (list expression env exprs) - | Texp_array exprs -> - (* This is counted as a use, because constructing a generic array - involves inspecting the elements (PR#6939). *) - Use.inspect (list expression env exprs) - | Texp_construct (_, desc, exprs) -> - let access_constructor = - match desc.cstr_tag with - | Cstr_extension (pth, _) -> Use.inspect (path env pth) - | _ -> Use.empty - in - let use = match desc.cstr_tag with - | Cstr_unboxed -> (fun x -> x) - | Cstr_constant _ | Cstr_block _ | Cstr_extension _ -> Use.guard - in - Use.join access_constructor (use (list expression env exprs)) - | Texp_variant (_, eo) -> - Use.guard (option expression env eo) - | Texp_record { fields = es; extended_expression = eo; - representation = rep } -> - let use = match rep with - | Record_float_unused -> Use.inspect - | Record_unboxed _ -> (fun x -> x) - | Record_regular | Record_optional_labels _ | Record_inlined _ - | Record_extension -> Use.guard - in - let field env = function - _, Kept _ -> Use.empty - | _, Overridden (_, e) -> expression env e - in - Use.join - (use (array field env es)) - (option expression env eo) - | Texp_ifthenelse (cond, ifso, ifnot) -> - Use.(join (inspect (expression env cond)) - (join - (expression env ifso) - (option expression env ifnot))) - | Texp_setfield (e1, _, _, e2) -> - Use.(join (inspect (expression env e1)) - (inspect (expression env e2))) - | Texp_sequence (e1, e2) -> - Use.(join (discard (expression env e1)) - (expression env e2)) - | Texp_while (e1, e2) -> - Use.(join (inspect (expression env e1)) - (discard (expression env e2))) - | Texp_send (e1, _, eo) -> - Use.(join (inspect (expression env e1)) - (inspect (option expression env eo))) - | Texp_field (e, _, _) -> - Use.(inspect (expression env e)) - | Texp_setinstvar (_,_,_,e) -> - Use.(inspect (expression env e)) - | Texp_letexception (_, e) -> - expression env e - | Texp_assert e -> - Use.inspect (expression env e) - | Texp_pack m -> - modexp env m - | Texp_object (clsstrct, _) -> - class_structure env clsstrct - | Texp_try (e, cases) -> - (* This is more permissive than the old check. *) - let case env {Typedtree.c_rhs} = expression env c_rhs in - Use.join (expression env e) - (list case env cases) - | Texp_override (_, fields) -> - let field env (_, _, e) = expression env e in - Use.inspect (list field env fields) - | Texp_function { cases } -> - Use.delay (list (case ~scrutinee:Use.empty) env cases) - | Texp_lazy e -> - begin match Typeopt.classify_lazy_argument e with - | `Constant_or_function - | `Identifier _ - | `Float -> - expression env e - | `Other -> - Use.delay (expression env e) - end - | Texp_unreachable -> - Use.empty - | Texp_extension_constructor _ -> - Use.empty - and option : 'a. (Env.env -> 'a -> Use.t) -> Env.env -> 'a option -> Use.t = - fun f env -> Misc.Stdlib.Option.value_default (f env) ~default:Use.empty - and list : 'a. (Env.env -> 'a -> Use.t) -> Env.env -> 'a list -> Use.t = - fun f env -> - List.fold_left (fun typ item -> Use.join (f env item) typ) Use.empty - and array : 'a. (Env.env -> 'a -> Use.t) -> Env.env -> 'a array -> Use.t = - fun f env -> - Array.fold_left (fun typ item -> Use.join (f env item) typ) Use.empty - and class_structure : Env.env -> Typedtree.class_structure -> Use.t = - fun env cs -> Use.(inspect (list class_field env cs.cstr_fields)) - and class_field : Env.env -> Typedtree.class_field -> Use.t = - fun env cf -> match cf.cf_desc with - | Tcf_inherit (_, ce, _super, _inh_vars, _inh_meths) -> - Use.inspect (class_expr env ce) - | Tcf_val (_lab, _mut, _, cfk, _) -> - class_field_kind env cfk - | Tcf_method (_, _, cfk) -> - class_field_kind env cfk - | Tcf_constraint _ -> - Use.empty - | Tcf_initializer e -> - Use.inspect (expression env e) - | Tcf_attribute _ -> - Use.empty - and class_field_kind : Env.env -> Typedtree.class_field_kind -> Use.t = - fun env cfk -> match cfk with - | Tcfk_virtual _ -> - Use.empty - | Tcfk_concrete (_, e) -> - Use.inspect (expression env e) - and modexp : Env.env -> Typedtree.module_expr -> Use.t = - fun env m -> match m.mod_desc with - | Tmod_ident (pth, _) -> - (path env pth) - | Tmod_structure s -> - structure env s - | Tmod_functor (_, _, _, e) -> - Use.delay (modexp env e) - | Tmod_apply (f, p, _) -> - Use.(join - (inspect (modexp env f)) - (inspect (modexp env p))) - | Tmod_constraint (m, _, _, Tcoerce_none) -> - modexp env m - | Tmod_constraint (m, _, _, _) -> - Use.inspect (modexp env m) - | Tmod_unpack (e, _) -> - expression env e - and path : Env.env -> Path.t -> Use.t = - fun env pth -> match pth with - | Path.Pident x -> - (try Ident.find_same x env with Not_found -> Use.empty) - | Path.Pdot (t, _, _) -> - Use.inspect (path env t) - | Path.Papply (f, p) -> - Use.(inspect (join (path env f) (path env p))) - and structure : Env.env -> Typedtree.structure -> Use.t = - fun env s -> - let _, ty = - List.fold_left - (fun (env, ty) item -> - let env', ty' = structure_item env item in - Env.join env env', Use.join ty ty') - (env, Use.empty) - s.str_items - in - Use.guard ty - and structure_item : Env.env -> Typedtree.structure_item -> Env.env * Use.t = - fun env s -> match s.str_desc with - | Tstr_eval (e, _) -> - Env.empty, expression env e - | Tstr_value (rec_flag, valbinds) -> - value_bindings rec_flag env valbinds - | Tstr_module {mb_id; mb_expr} -> - let ty = modexp env mb_expr in - Ident.add mb_id ty Env.empty, ty - | Tstr_recmodule mbs -> - let modbind env {mb_expr} = modexp env mb_expr in - (* Over-approximate: treat any access as a use *) - Env.empty, Use.inspect (list modbind env mbs) - | Tstr_primitive _ -> - Env.empty, Use.empty - | Tstr_type _ -> - Env.empty, Use.empty - | Tstr_typext _ -> - Env.empty, Use.empty - | Tstr_exception _ -> - Env.empty, Use.empty - | Tstr_modtype _ -> - Env.empty, Use.empty - | Tstr_open _ -> - Env.empty, Use.empty - | Tstr_class classes -> - (* Any occurrence in a class definition is counted as a use, - so there's no need to add anything to the environment. *) - let cls env ({ci_expr=ce}, _) = class_expr env ce in - Env.empty, Use.inspect (list cls env classes) - | Tstr_class_type _ -> - Env.empty, Use.empty - | Tstr_include inc -> - (* This is a kind of projection. There's no need to add - anything to the environment because everything is used in - the type component already *) - Env.empty, Use.inspect (modexp env inc.incl_mod) - | Tstr_attribute _ -> - Env.empty, Use.empty - and class_expr : Env.env -> Typedtree.class_expr -> Use.t = - fun env ce -> match ce.cl_desc with - | Tcl_ident (pth, _, _) -> - Use.inspect (path env pth) - | Tcl_structure cs -> - class_structure env cs - | Tcl_fun (_, _, args, ce, _) -> - let arg env (_, _, e) = expression env e in - Use.inspect (Use.join (list arg env args) - (class_expr env ce)) - | Tcl_apply (ce, args) -> - let arg env (_, eo) = option expression env eo in - Use.inspect (Use.join (class_expr env ce) - (list arg env args)) - | Tcl_let (rec_flag, valbinds, _, ce) -> - let _, ty = value_bindings rec_flag env valbinds in - Use.(inspect (join ty (class_expr env ce))) - | Tcl_constraint (ce, _, _, _, _) -> - class_expr env ce - | Tcl_open (_, _, _, _, ce) -> - class_expr env ce - and case : Env.env -> Typedtree.case -> scrutinee:Use.t -> Use.t = - fun env { Typedtree.c_lhs; c_guard; c_rhs } ~scrutinee:ty -> - let ty = - if is_destructuring_pattern c_lhs then Use.inspect ty - else Use.discard ty (* as in 'let' *) - in - let vars = pattern_variables c_lhs in - let env = - List.fold_left - (fun env id -> Ident.add id ty env) - env - vars - in - Use.(join ty - (join (expression env c_rhs) - (inspect (option expression env c_guard)))) - and value_bindings : rec_flag -> Env.env -> Typedtree.value_binding list -> Env.env * Use.t = - fun rec_flag env bindings -> - match rec_flag with - | Recursive -> - (* Approximation: - let rec y = - let rec x1 = e1 - and x2 = e2 - in e - treated as - let rec y = - let rec x = (e1, e2)[x1:=fst x, x2:=snd x] in - e[x1:=fst x, x2:=snd x] - Further, use the fact that x1,x2 cannot occur unguarded in e1, e2 - to avoid recursive trickiness. - *) - let ids, ty = - List.fold_left - (fun (pats, tys) {vb_pat=p; vb_expr=e} -> - (pattern_variables p @ pats, - Use.join (expression env e) tys)) - ([], Use.empty) - bindings - in - (List.fold_left (fun (env : Env.env) (id : Ident.t) -> - Ident.add id ty env) Env.empty ids, - ty) - | Nonrecursive -> - List.fold_left - (fun (env2, ty) binding -> - let env', ty' = value_binding env binding in - (Env.join env2 env', Use.join ty ty')) - (Env.empty, Use.empty) - bindings - and value_binding : Env.env -> Typedtree.value_binding -> Env.env * Use.t = - (* NB: returns new environment only *) - fun env { vb_pat; vb_expr } -> - let vars = pattern_variables vb_pat in - let ty = expression env vb_expr in - let ty = if is_destructuring_pattern vb_pat then Use.inspect ty else ty in - (List.fold_left - (fun env id -> Ident.add id ty env) - Env.empty - vars, - ty) - and is_destructuring_pattern : Typedtree.pattern -> bool = - fun pat -> match pat.pat_desc with - | Tpat_any -> false - | Tpat_var (_, _) -> false - | Tpat_alias (pat, _, _) -> is_destructuring_pattern pat - | Tpat_constant _ -> true - | Tpat_tuple _ -> true - | Tpat_construct (_, _, _) -> true - | Tpat_variant _ -> true - | Tpat_record (_, _) -> true - | Tpat_array _ -> true - | Tpat_or (l,r,_) -> is_destructuring_pattern l || is_destructuring_pattern r - | Tpat_lazy _ -> true - - let check_recursive_expression env idlist expr = - let ty = expression (build_unguarded_env idlist) expr in - match Use.unguarded ty, Use.dependent ty, classify_expression expr with - | _ :: _, _, _ (* The expression inspects rec-bound variables *) - | _, _ :: _, Dynamic -> (* The expression depends on rec-bound variables - and its size is unknown *) - raise(Error(expr.exp_loc, env, Illegal_letrec_expr)) - | [], _, Static (* The expression has known size *) - | [], [], Dynamic -> (* The expression has unknown size, - but does not depend on rec-bound variables *) - () - let check_class_expr env idlist ce = - let rec class_expr : Env.env -> Typedtree.class_expr -> Use.t = - fun env ce -> match ce.cl_desc with - | Tcl_ident (_, _, _) -> Use.empty - | Tcl_structure _ -> Use.empty - | Tcl_fun (_, _, _, _, _) -> Use.empty - | Tcl_apply (_, _) -> Use.empty - | Tcl_let (rec_flag, valbinds, _, ce) -> - let _, ty = value_bindings rec_flag env valbinds in - Use.join ty (class_expr env ce) - | Tcl_constraint (ce, _, _, _, _) -> - class_expr env ce - | Tcl_open (_, _, _, _, ce) -> - class_expr env ce - in - match Use.unguarded (class_expr (build_unguarded_env idlist) ce) with - | [] -> () - | _ :: _ -> raise(Error(ce.cl_loc, env, Illegal_class_expr)) -end - -let check_recursive_bindings env valbinds = - let ids = List.concat - (List.map (fun b -> pattern_variables b.vb_pat) valbinds) in - List.iter - (fun {vb_expr} -> - Rec_check.check_recursive_expression env ids vb_expr) - valbinds - -let check_recursive_class_bindings env ids exprs = - List.iter - (fun expr -> - Rec_check.check_class_expr env ids expr) - exprs (* Approximate the type of an expression, for better recursion *) @@ -2404,7 +1616,7 @@ let check_univars env expans kind exp ty_expected vars = let vars = List.map (expand_head env) vars in let vars = List.map (expand_head env) vars in let vars' = - List.filter + Ext_list.filter vars (fun t -> let t = repr t in generalize t; @@ -2412,7 +1624,7 @@ let check_univars env expans kind exp ty_expected vars = Tvar name when t.level = generic_level -> log_type t; t.desc <- Tunivar name; true | _ -> false) - vars in + in if List.length vars = List.length vars' then () else let ty = newgenty (Tpoly(repr exp.exp_type, vars')) and ty_expected = repr ty_expected in @@ -2520,7 +1732,7 @@ let contains_gadt env p = | Ppat_construct (lid, _) -> begin try let cstrs = Env.lookup_all_constructors lid.txt env in - List.iter (fun (cstr,_) -> if cstr.cstr_generalized then raise Exit) + List.iter (fun (cstr,_) -> if cstr.cstr_generalized then raise_notrace Exit) cstrs with Not_found -> () end; iter_ppat (loop env) p @@ -2554,9 +1766,19 @@ let check_absent_variant env = let duplicate_ident_types caselist env = let caselist = - List.filter (fun {pc_lhs} -> contains_gadt env pc_lhs) caselist in + Ext_list.filter caselist (fun {pc_lhs} -> contains_gadt env pc_lhs) in Env.copy_types (all_idents_cases caselist) env + +(* type_label_a_list returns a list of labels sorted by lbl_pos *) +(* note: check_duplicates would better be implemented in + type_label_a_list directly *) +let rec check_duplicates loc env = function + | (_, lbl1, _) :: (_, lbl2, _) :: _ when lbl1.lbl_pos = lbl2.lbl_pos -> + raise(Error(loc, env, Label_multiply_defined lbl1.lbl_name)) + | _ :: rem -> + check_duplicates loc env rem + | [] -> () (* Getting proper location of already typed expressions. Used to avoid confusing locations on type error messages in presence of @@ -2578,15 +1800,22 @@ let proper_exp_loc exp = in aux exp.exp_extra +let id_of_pattern : Typedtree.pattern -> Ident.t option = fun pat -> + match pat.pat_desc with + | Tpat_var (id, _) -> Some id + | Tpat_alias(_, id, _) -> Some id + | Tpat_construct (_,_, + [{pat_desc = (Tpat_var (id,_) | Tpat_alias(_,id,_))}]) + -> Some (Ident.rename id) + | _ -> None (* To find reasonable names for let-bound and lambda-bound idents *) let rec name_pattern default = function [] -> Ident.create default | {c_lhs=p; _} :: rem -> - match p.pat_desc with - Tpat_var (id, _) -> id - | Tpat_alias(_, id, _) -> id - | _ -> name_pattern default rem + match id_of_pattern p with + | None -> name_pattern default rem + | Some id -> id (* Typing of expressions *) @@ -2594,6 +1823,39 @@ let unify_exp env exp expected_ty = let loc = proper_exp_loc exp in unify_exp_types loc env exp.exp_type expected_ty + +let is_ignore funct env = + match funct.exp_desc with + Texp_ident (_, _, {val_kind=Val_prim{Primitive.prim_name="%ignore"}}) -> + (try ignore (filter_arrow env (instance env funct.exp_type) Nolabel); + true + with Unify _ -> false) + | _ -> false + +let not_identity = function + | Texp_ident(_,_,{val_kind=Val_prim + {Primitive.prim_name="%identity"}}) -> + false + | _ -> true + +let rec lower_args env seen ty_fun = + let ty = expand_head env ty_fun in + if List.memq ty seen then () else + match ty.desc with + Tarrow (_l, ty_arg, ty_fun, _com) -> + (try unify_var env (newvar()) ty_arg with Unify _ -> assert false); + lower_args env (ty::seen) ty_fun + | _ -> () + +let not_function env ty = + let ls, tvar = list_labels env ty in + ls = [] && not tvar + +type lazy_args = + (Asttypes.arg_label * (unit -> Typedtree.expression) option) list + +type targs = + (Asttypes.arg_label * Typedtree.expression option) list let rec type_exp ?recarg env sexp = (* We now delegate everything to type_expect *) type_expect ?recarg env sexp (newvar ()) @@ -2613,7 +1875,7 @@ and type_expect ?in_function ?recarg env sexp ty_expected = ) in Cmt_format.set_saved_types - (Cmt_format.Partial_expression exp :: previous_saved_types); + (Cmt_format.Partial_expression exp :: previous_saved_types); exp and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = @@ -2623,6 +1885,14 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = unify_exp env (re exp) (instance env ty_expected); exp in + let process_optional_label (id, ld, e) = + let exp_optional_attr = check_optional_attr env ld e.pexp_attributes e.pexp_loc in + if label_is_optional ld && not exp_optional_attr then + let lid = mknoloc (Longident.(Ldot (Lident "*predef*", "Some"))) in + let e = Ast_helper.Exp.construct ~loc:e.pexp_loc lid (Some e) + in (id, ld, e) + else (id, ld, e) + in match sexp.pexp_desc with | Pexp_ident lid -> begin @@ -2654,62 +1924,12 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = () (* will fail later *) end; rue { - exp_desc = - begin match desc.val_kind with - Val_ivar (_, cl_num) -> - let (self_path, _) = - Env.lookup_value (Longident.Lident ("self-" ^ cl_num)) env - in - Texp_instvar(self_path, path, - match lid.txt with - Longident.Lident txt -> { txt; loc = lid.loc } - | _ -> assert false) - | Val_self (_, _, cl_num, _) -> - let (path, _) = - Env.lookup_value (Longident.Lident ("self-" ^ cl_num)) env - in - Texp_ident(path, lid, desc) - | Val_unbound -> - raise(Error(loc, env, Masked_instance_variable lid.txt)) - (*| Val_prim _ -> - let p = Env.normalize_path (Some loc) env path in - Env.add_required_global (Path.head p); - Texp_ident(path, lid, desc)*) - | _ -> - Texp_ident(path, lid, desc) - end; + exp_desc = Texp_ident(path, lid, desc); exp_loc = loc; exp_extra = []; exp_type = instance env desc.val_type; exp_attributes = sexp.pexp_attributes; exp_env = env } end - | Pexp_constant(Pconst_string (str, _) as cst) -> ( - let cst = constant_or_raise env loc cst in - (* Terrible hack for format strings *) - let ty_exp = expand_head env ty_expected in - let fmt6_path = - Path.(Pdot (Pident (Ident.create_persistent "CamlinternalFormatBasics"), - "format6", 0)) in - let is_format = match ty_exp.desc with - | Tconstr(path, _, _) when Path.same path fmt6_path -> - if !Clflags.principal && ty_exp.level <> generic_level then - Location.prerr_warning loc - (Warnings.Not_principal "this coercion to format6"); - true - | _ -> false - in - if is_format then - let format_parsetree = - { (type_format loc str env) with pexp_loc = sexp.pexp_loc } in - type_expect ?in_function env format_parsetree ty_expected - else - rue { - exp_desc = Texp_constant cst; - exp_loc = loc; exp_extra = []; - exp_type = instance_def Predef.type_string; - exp_attributes = sexp.pexp_attributes; - exp_env = env } - ) | Pexp_constant cst -> let cst = constant_or_raise env loc cst in rue { @@ -2739,7 +1959,7 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = type_expect new_env (wrap_unpacks sbody unpacks) ty_expected in let () = if rec_flag = Recursive then - check_recursive_bindings env pat_exp_list + Rec_check.check_recursive_bindings pat_exp_list in re { exp_desc = Texp_let(rec_flag, pat_exp_list, body); @@ -2791,34 +2011,47 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = | Pexp_apply(sfunct, sargs) -> assert (sargs <> []); begin_def (); (* one more level for non-returning functions *) - if !Clflags.principal then begin_def (); let funct = type_exp env sfunct in - if !Clflags.principal then begin - end_def (); - generalize_structure funct.exp_type - end; - let rec lower_args seen ty_fun = - let ty = expand_head env ty_fun in - if List.memq ty seen then () else - match ty.desc with - Tarrow (_l, ty_arg, ty_fun, _com) -> - (try unify_var env (newvar()) ty_arg with Unify _ -> assert false); - lower_args (ty::seen) ty_fun - | _ -> () - in let ty = instance env funct.exp_type in end_def (); - wrap_trace_gadt_instances env (lower_args []) ty; + wrap_trace_gadt_instances env (lower_args env []) ty; begin_def (); - let (args, ty_res) = type_application env funct sargs in + let uncurried = + Ext_list.exists sexp.pexp_attributes (fun ({txt },_) -> txt = "res.uapp") + && not @@ Ext_list.exists sexp.pexp_attributes (fun ({txt },_) -> txt = "res.partial") + && not @@ is_automatic_curried_application env funct in + let (args, ty_res, fully_applied) = type_application uncurried env funct sargs in end_def (); unify_var env (newvar()) funct.exp_type; - rue { - exp_desc = Texp_apply(funct, args); - exp_loc = loc; exp_extra = []; - exp_type = ty_res; - exp_attributes = sexp.pexp_attributes; - exp_env = env } + + let mk_exp ?(loc=Location.none) exp_desc exp_type = + { exp_desc; + exp_loc = loc; exp_extra = []; + exp_type; + exp_attributes = []; + exp_env = env } in + let apply_internal name e = + let lid:Longident.t = Ldot (Ldot (Lident "Js", "Internal"), name) in + let (path, desc) = Env.lookup_value lid env in + let id = mk_exp (Texp_ident(path, {txt=lid; loc=Location.none}, desc)) desc.val_type in + mk_exp ~loc:e.exp_loc (Texp_apply(id, [(Nolabel, Some e)])) e.exp_type in + + let mk_apply funct args = + rue { + exp_desc = Texp_apply(funct, args); + exp_loc = loc; exp_extra = []; + exp_type = ty_res; + exp_attributes = sexp.pexp_attributes; + exp_env = env } in + + let is_primitive = match funct.exp_desc with + | Texp_ident (_, _, {val_kind = Val_prim _}) -> true + | _ -> false in + + if fully_applied && not is_primitive then + rue (apply_internal "opaqueFullApply" (mk_apply (apply_internal "opaque" funct) args)) + else + rue (mk_apply funct args) | Pexp_match(sarg, caselist) -> begin_def (); let arg = type_exp env sarg in @@ -2873,6 +2106,17 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = exp_type = newty (Ttuple (List.map (fun e -> e.exp_type) expl)); exp_attributes = sexp.pexp_attributes; exp_env = env } + | Pexp_construct({txt = Lident "Function$"} as lid, sarg) -> + let state = Warnings.backup () in + let arity = Ast_uncurried.attributes_to_arity sexp.pexp_attributes in + let uncurried_typ = Ast_uncurried.make_uncurried_type ~env ~arity (newvar()) in + unify_exp_types loc env uncurried_typ ty_expected; + (* Disable Unerasable_optional_argument for uncurried functions *) + let unerasable_optional_argument = Warnings.number Unerasable_optional_argument in + Warnings.parse_options false ("-" ^ string_of_int unerasable_optional_argument); + let exp = type_construct env loc lid sarg uncurried_typ sexp.pexp_attributes in + Warnings.restore state; + exp | Pexp_construct(lid, sarg) -> type_construct env loc lid sarg ty_expected sexp.pexp_attributes | Pexp_variant(l, sarg) -> @@ -2909,36 +2153,96 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = exp_attributes = sexp.pexp_attributes; exp_env = env } end - | Pexp_record(lid_sexp_list, opt_sexp) -> - assert (lid_sexp_list <> []); - let opt_exp = - match opt_sexp with - None -> None - | Some sexp -> - if !Clflags.principal then begin_def (); - let exp = type_exp ~recarg env sexp in - if !Clflags.principal then begin - end_def (); - generalize_structure exp.exp_type - end; - Some exp - in + | Pexp_record(lid_sexp_list, None) -> + let ty_record, opath, fields, repr_opt = + match extract_concrete_record env ty_expected with + | (p0, p, fields, repr) -> + (* XXX level may be wrong *) + ty_expected, Some (p0, p), fields, Some repr + | exception Not_found -> + newvar (), None, [], None + + in + let lbl_exp_list = + wrap_disambiguate "This record expression is expected to have" ty_record + (type_label_a_list loc true env + (fun e k -> k (type_label_exp true env loc ty_record (process_optional_label e))) + opath lid_sexp_list) + (fun x -> x) + in + unify_exp_types loc env ty_record (instance env ty_expected); + check_duplicates loc env lbl_exp_list; + let label_descriptions, representation = match lbl_exp_list, repr_opt with + | (_, { lbl_all = label_descriptions; lbl_repres = representation}, _) :: _, _ -> label_descriptions, representation + | [], Some (representation) when lid_sexp_list = [] -> + let optional_labels = match representation with + | Record_optional_labels optional_labels -> optional_labels + | Record_inlined {optional_labels} -> optional_labels + | _ -> [] in + let filter_missing (ld : Types.label_declaration) = + let name = Ident.name ld.ld_id in + if List.mem name optional_labels then + None + else + Some name in + let labels_missing = fields |> List.filter_map filter_missing in + if labels_missing <> [] then + raise(Error(loc, env, Labels_missing labels_missing)); + [||], representation + | [], _ -> + if fields = [] && repr_opt <> None then + [||], Record_optional_labels [] + else + raise(Error(loc, env, Empty_record_literal)) in + let labels_missing = ref [] in + let label_definitions = + let matching_label lbl = + List.find + (fun (_, lbl',_) -> lbl'.lbl_pos = lbl.lbl_pos) + lbl_exp_list + in + Array.map + (fun lbl -> + match matching_label lbl with + | (lid, _lbl, lbl_exp) -> + Overridden (lid, lbl_exp) + | exception Not_found -> + if not (label_is_optional lbl) then labels_missing := lbl.lbl_name :: !labels_missing; + Overridden ({loc ; txt = Lident lbl.lbl_name}, option_none lbl.lbl_arg loc)) + label_descriptions + in + if !labels_missing <> [] then + raise(Error(loc, env, Labels_missing (List.rev !labels_missing))); + let fields = + Array.map2 (fun descr def -> descr, def) + label_descriptions label_definitions + in + re { + exp_desc = Texp_record { + fields; representation; + extended_expression = None + }; + exp_loc = loc; exp_extra = []; + exp_type = instance env ty_expected; + exp_attributes = sexp.pexp_attributes; + exp_env = env } + | Pexp_record(lid_sexp_list, Some sexp) -> + assert (lid_sexp_list <> []); + let exp = type_exp ~recarg env sexp in let ty_record, opath = let get_path ty = try - let (p0, p,_) = extract_concrete_record env ty in + let (p0, p, _, _) = extract_concrete_record env ty in (* XXX level may be wrong *) - Some (p0, p, ty.level = generic_level || not !Clflags.principal) + Some (p0, p) with Not_found -> None in match get_path ty_expected with None -> - begin match opt_exp with - None -> newvar (), None - | Some exp -> + begin match get_path exp.exp_type with None -> newvar (), None - | Some (_, p', _) as op -> + | Some (_, p') as op -> let decl = Env.find_type p' env in begin_def (); let ty = @@ -2949,27 +2253,16 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = end | op -> ty_expected, op in - let closed = (opt_sexp = None) in + let closed = false in let lbl_exp_list = wrap_disambiguate "This record expression is expected to have" ty_record (type_label_a_list loc closed env - (fun e k -> k (type_label_exp true env loc ty_record e)) + (fun e k -> k (type_label_exp true env loc ty_record (process_optional_label e))) opath lid_sexp_list) (fun x -> x) in unify_exp_types loc env ty_record (instance env ty_expected); - - (* type_label_a_list returns a list of labels sorted by lbl_pos *) - (* note: check_duplicates would better be implemented in - type_label_a_list directly *) - let rec check_duplicates = function - | (_, lbl1, _) :: (_, lbl2, _) :: _ when lbl1.lbl_pos = lbl2.lbl_pos -> - raise(Error(loc, env, Label_multiply_defined lbl1.lbl_name)) - | _ :: rem -> - check_duplicates rem - | [] -> () - in - check_duplicates lbl_exp_list; + check_duplicates loc env lbl_exp_list; let opt_exp, label_definitions = let (_lid, lbl, _lbl_exp) = List.hd lbl_exp_list in let matching_label lbl = @@ -2977,31 +2270,6 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = (fun (_, lbl',_) -> lbl'.lbl_pos = lbl.lbl_pos) lbl_exp_list in - match opt_exp with - None -> - let label_definitions = - Array.map (fun lbl -> - match matching_label lbl with - | (lid, _lbl, lbl_exp) -> - Overridden (lid, lbl_exp) - | exception Not_found -> - let present_indices = - List.map (fun (_, lbl, _) -> lbl.lbl_pos) lbl_exp_list - in - let label_names = extract_label_names env ty_expected in - let rec missing_labels n = function - [] -> [] - | lbl :: rem -> - if List.mem n present_indices - then missing_labels (n + 1) rem - else lbl :: missing_labels (n + 1) rem - in - let missing = missing_labels 0 label_names in - raise(Error(loc, env, Label_missing missing))) - lbl.lbl_all - in - None, label_definitions - | Some exp -> let ty_exp = instance env exp.exp_type in let unify_kept lbl = let _, ty_arg1, ty_res1 = instance_label false lbl in @@ -3012,8 +2280,8 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = Overridden (lid, lbl_exp) | exception Not_found -> begin let _, ty_arg2, ty_res2 = instance_label false lbl in - unify env ty_arg1 ty_arg2; - unify env (instance env ty_expected) ty_res2; + unify_exp_types loc env ty_arg1 ty_arg2; + unify_exp_types loc env (instance env ty_expected) ty_res2; Kept ty_arg1 end in @@ -3024,7 +2292,7 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = match lbl_exp_list with [] -> assert false | (_, lbl,_)::_ -> Array.length lbl.lbl_all in let opt_exp = - if opt_sexp <> None && List.length lid_sexp_list = num_fields then + if List.length lid_sexp_list = num_fields then (Location.prerr_warning loc Warnings.Useless_record_with; None) else opt_exp in @@ -3169,7 +2437,7 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = | Pexp_coerce(sarg, sty, sty') -> let separate = true in (* always separate, 1% slowdown for lablgtk *) (* Also see PR#7199 for a problem with the following: - let separate = !Clflags.principal || Env.has_local_constraints env in*) + let separate = Env.has_local_constraints env in*) let (arg, ty',cty,cty') = match sty with | None -> @@ -3190,11 +2458,6 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = end else true in begin match arg.exp_desc, !self_coercion, (repr ty').desc with - Texp_ident(_, _, {val_kind=Val_self _}), (path,r) :: _, - Tconstr(path',_,_) when Path.same path path' -> - (* prerr_endline "self coercion"; *) - r := loc :: !r; - force () | _ when free_variables ~env arg.exp_type = [] && free_variables ~env ty' = [] -> if not gen && (* first try a single coercion *) @@ -3208,9 +2471,6 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = else begin try let force' = subtype env arg.exp_type ty' in force (); force' (); - if not gen && !Clflags.principal then - Location.prerr_warning loc - (Warnings.Not_principal "this ground coercion"); with Subtype (tr1, tr2) -> (* prerr_endline "coercion failed"; *) raise(Error(loc, env, Not_subtype(tr1, tr2))) @@ -3258,86 +2518,20 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = arg.exp_extra; } | Pexp_send (e, {txt=met}) -> - if !Clflags.principal then begin_def (); let obj = type_exp env e in let obj_meths = ref None in begin try let (meth, exp, typ) = match obj.exp_desc with - Texp_ident(_path, _, {val_kind = Val_self (meths, _, _, privty)}) -> - obj_meths := Some meths; - let (id, typ) = - filter_self_method env met Private meths privty - in - if is_Tvar (repr typ) then - Location.prerr_warning loc - (Warnings.Undeclared_virtual_method met); - (Tmeth_val id, None, typ) - | Texp_ident(_path, lid, {val_kind = Val_anc (methods, cl_num)}) -> - let method_id = - begin try List.assoc met methods with Not_found -> - let valid_methods = List.map fst methods in - raise(Error(e.pexp_loc, env, - Undefined_inherited_method (met, valid_methods))) - end - in - begin match - Env.lookup_value (Longident.Lident ("selfpat-" ^ cl_num)) env, - Env.lookup_value (Longident.Lident ("self-" ^cl_num)) env - with - (_, ({val_kind = Val_self (meths, _, _, privty)} as desc)), - (path, _) -> - obj_meths := Some meths; - let (_, typ) = - filter_self_method env met Private meths privty - in - let method_type = newvar () in - let (obj_ty, res_ty) = filter_arrow env method_type Nolabel in - unify env obj_ty desc.val_type; - unify env res_ty (instance env typ); - let exp = - Texp_apply({exp_desc = - Texp_ident(Path.Pident method_id, lid, - {val_type = method_type; - val_kind = Val_reg; - val_attributes = []; - Types.val_loc = Location.none}); - exp_loc = loc; exp_extra = []; - exp_type = method_type; - exp_attributes = []; (* check *) - exp_env = env}, - [ Nolabel, - Some {exp_desc = Texp_ident(path, lid, desc); - exp_loc = obj.exp_loc; exp_extra = []; - exp_type = desc.val_type; - exp_attributes = []; (* check *) - exp_env = env} - ]) - in - (Tmeth_name met, Some (re {exp_desc = exp; - exp_loc = loc; exp_extra = []; - exp_type = typ; - exp_attributes = []; (* check *) - exp_env = env}), typ) - | _ -> - assert false - end | _ -> (Tmeth_name met, None, filter_method env met Public obj.exp_type) in - if !Clflags.principal then begin - end_def (); - generalize_structure typ; - end; let typ = match repr typ with {desc = Tpoly (ty, [])} -> instance env ty - | {desc = Tpoly (ty, tl); level = l} -> - if !Clflags.principal && l <> generic_level then - Location.prerr_warning loc - (Warnings.Not_principal "this use of a polymorphic method"); + | {desc = Tpoly (ty, tl); level = _} -> snd (instance_poly false tl ty) | {desc = Tvar _} as ty -> let ty' = newvar () in @@ -3371,89 +2565,10 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = raise(Error(e.pexp_loc, env, Undefined_method (obj.exp_type, met, valid_methods))) end - | Pexp_new cl -> - let (cl_path, cl_decl) = Typetexp.find_class env cl.loc cl.txt in - begin match cl_decl.cty_new with - None -> - raise(Error(loc, env, Virtual_class cl.txt)) - | Some ty -> - rue { - exp_desc = Texp_new (cl_path, cl, cl_decl); - exp_loc = loc; exp_extra = []; - exp_type = instance_def ty; - exp_attributes = sexp.pexp_attributes; - exp_env = env } - end - | Pexp_setinstvar (lab, snewval) -> - begin try - let (path, desc) = Env.lookup_value (Longident.Lident lab.txt) env in - match desc.val_kind with - Val_ivar (Mutable, cl_num) -> - let newval = - type_expect env snewval (instance env desc.val_type) in - let (path_self, _) = - Env.lookup_value (Longident.Lident ("self-" ^ cl_num)) env - in - rue { - exp_desc = Texp_setinstvar(path_self, path, lab, newval); - exp_loc = loc; exp_extra = []; - exp_type = instance_def Predef.type_unit; - exp_attributes = sexp.pexp_attributes; - exp_env = env } - | Val_ivar _ -> - raise(Error(loc, env, Instance_variable_not_mutable(true,lab.txt))) - | _ -> - raise(Error(loc, env, Instance_variable_not_mutable(false,lab.txt))) - with - Not_found -> - let collect_vars name _path val_desc li = - match val_desc.val_kind with - | Val_ivar (Mutable, _) -> name::li - | _ -> li in - let valid_vars = Env.fold_values collect_vars None env [] in - raise(Error(loc, env, - Unbound_instance_variable (lab.txt, valid_vars))) - end - | Pexp_override lst -> - let _ = - List.fold_right - (fun (lab, _) l -> - if List.exists (fun l -> l.txt = lab.txt) l then - raise(Error(loc, env, - Value_multiply_overridden lab.txt)); - lab::l) - lst - [] in - begin match - try - Env.lookup_value (Longident.Lident "selfpat-*") env, - Env.lookup_value (Longident.Lident "self-*") env - with Not_found -> - raise(Error(loc, env, Outside_class)) - with - (_, {val_type = self_ty; val_kind = Val_self (_, vars, _, _)}), - (path_self, _) -> - let type_override (lab, snewval) = - begin try - let (id, _, _, ty) = Vars.find lab.txt !vars in - (Path.Pident id, lab, type_expect env snewval (instance env ty)) - with - Not_found -> - let vars = Vars.fold (fun var _ li -> var::li) !vars [] in - raise(Error(loc, env, - Unbound_instance_variable (lab.txt, vars))) - end - in - let modifs = List.map type_override lst in - rue { - exp_desc = Texp_override(path_self, modifs); - exp_loc = loc; exp_extra = []; - exp_type = self_ty; - exp_attributes = sexp.pexp_attributes; - exp_env = env } - | _ -> - assert false - end + | Pexp_new _ + | Pexp_setinstvar _ + | Pexp_override _ -> + assert false | Pexp_letmodule(name, smodl, sbody) -> let ty = newvar() in (* remember original level *) @@ -3524,17 +2639,8 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = exp_attributes = sexp.pexp_attributes; exp_env = env; } - | Pexp_object s -> - let desc, sign, meths = !type_object env loc s in - rue { - exp_desc = Texp_object (desc, (*sign,*) meths); - exp_loc = loc; exp_extra = []; - exp_type = sign.csig_self; - exp_attributes = sexp.pexp_attributes; - exp_env = env; - } + | Pexp_object _ -> assert false | Pexp_poly(sbody, sty) -> - if !Clflags.principal then begin_def (); let ty, cty = match sty with None -> repr ty_expected, None | Some sty -> @@ -3542,10 +2648,6 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = let cty = Typetexp.transl_simple_type env false sty in repr cty.ctyp_type, Some cty in - if !Clflags.principal then begin - end_def (); - generalize_structure ty - end; if sty <> None then unify_exp_types loc env (instance env ty) (instance env ty_expected); let exp = @@ -3556,12 +2658,7 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = | Tpoly (ty', tl) -> (* One more level to generalize locally *) begin_def (); - if !Clflags.principal then begin_def (); let vars, ty'' = instance_poly true tl ty' in - if !Clflags.principal then begin - end_def (); - generalize_structure ty'' - end; let exp = type_expect env sbody ty'' in end_def (); check_univars env false "method" exp ty_expected vars; @@ -3628,11 +2725,6 @@ and type_expect_ ?in_function ?(recarg=Rejected) env sexp ty_expected = let (p, nl) = match Ctype.expand_head env (instance env ty_expected) with {desc = Tpackage (p, nl, _tl)} -> - if !Clflags.principal && - (Ctype.expand_head env ty_expected).level < Btype.generic_level - then - Location.prerr_warning loc - (Warnings.Not_principal "this module packing"); (p, nl) | {desc = Tvar _} -> raise (Error (loc, env, Cannot_infer_signature)) @@ -3691,7 +2783,7 @@ and type_function ?in_function loc attrs env ty_expected l caselist = match in_function with Some p -> p | None -> (loc, instance env ty_expected) in - let separate = !Clflags.principal || Env.has_local_constraints env in + let separate = Env.has_local_constraints env in if separate then begin_def (); let (ty_arg, ty_res) = try filter_arrow env (instance env ty_expected) l @@ -3721,11 +2813,7 @@ and type_function ?in_function loc attrs env ty_expected l caselist = let cases, partial = type_cases ~in_function:(loc_fun,ty_fun) env ty_arg ty_res true loc caselist in - let not_function ty = - let ls, tvar = list_labels env ty in - ls = [] && not tvar - in - if is_optional l && not_function ty_res then + if is_optional l && not_function env ty_res then Location.prerr_warning (List.hd cases).c_lhs.pat_loc Warnings.Unerasable_optional_argument; let param = name_pattern "param" cases in @@ -3738,17 +2826,12 @@ and type_function ?in_function loc attrs env ty_expected l caselist = and type_label_access env srecord lid = - if !Clflags.principal then begin_def (); let record = type_exp ~recarg:Allowed env srecord in - if !Clflags.principal then begin - end_def (); - generalize_structure record.exp_type - end; let ty_exp = record.exp_type in let opath = try - let (p0, p,_) = extract_concrete_record env ty_exp in - Some(p0, p, ty_exp.level = generic_level || not !Clflags.principal) + let (p0, p, _, _) = extract_concrete_record env ty_exp in + Some(p0, p) with Not_found -> None in let labels = Typetexp.find_all_labels env lid.loc lid.txt in @@ -3760,249 +2843,11 @@ and type_label_access env srecord lid = (* Typing format strings for printing or reading. These formats are used by functions in modules Printf, Format, and Scanf. (Handling of * modifiers contributed by Thorsten Ohl.) *) - -and type_format loc str env = - let loc = {loc with Location.loc_ghost = true} in - try - CamlinternalFormatBasics.(CamlinternalFormat.( - let mk_exp_loc pexp_desc = { - pexp_desc = pexp_desc; - pexp_loc = loc; - pexp_attributes = []; - } and mk_lid_loc lid = { - txt = lid; - loc = loc; - } in - let mk_constr name args = - let lid = Longident.(Ldot(Lident "CamlinternalFormatBasics", name)) in - let arg = match args with - | [] -> None - | [ e ] -> Some e - | _ :: _ :: _ -> Some (mk_exp_loc (Pexp_tuple args)) in - mk_exp_loc (Pexp_construct (mk_lid_loc lid, arg)) in - let mk_cst cst = mk_exp_loc (Pexp_constant cst) in - let mk_int n = mk_cst (Pconst_integer (string_of_int n, None)) - and mk_string str = mk_cst (Pconst_string (str, None)) - and mk_char chr = mk_cst (Pconst_char chr) in - let rec mk_formatting_lit fmting = match fmting with - | Close_box -> - mk_constr "Close_box" [] - | Close_tag -> - mk_constr "Close_tag" [] - | Break (org, ns, ni) -> - mk_constr "Break" [ mk_string org; mk_int ns; mk_int ni ] - | FFlush -> - mk_constr "FFlush" [] - | Force_newline -> - mk_constr "Force_newline" [] - | Flush_newline -> - mk_constr "Flush_newline" [] - | Magic_size (org, sz) -> - mk_constr "Magic_size" [ mk_string org; mk_int sz ] - | Escaped_at -> - mk_constr "Escaped_at" [] - | Escaped_percent -> - mk_constr "Escaped_percent" [] - | Scan_indic c -> - mk_constr "Scan_indic" [ mk_char c ] - and mk_formatting_gen : type a b c d e f . - (a, b, c, d, e, f) formatting_gen -> Parsetree.expression = - fun fmting -> match fmting with - | Open_tag (Format (fmt', str')) -> - mk_constr "Open_tag" [ mk_format fmt' str' ] - | Open_box (Format (fmt', str')) -> - mk_constr "Open_box" [ mk_format fmt' str' ] - and mk_format : type a b c d e f . - (a, b, c, d, e, f) CamlinternalFormatBasics.fmt -> string -> - Parsetree.expression = fun fmt str -> - mk_constr "Format" [ mk_fmt fmt; mk_string str ] - and mk_side side = match side with - | Left -> mk_constr "Left" [] - | Right -> mk_constr "Right" [] - | Zeros -> mk_constr "Zeros" [] - and mk_iconv iconv = match iconv with - | Int_d -> mk_constr "Int_d" [] | Int_pd -> mk_constr "Int_pd" [] - | Int_sd -> mk_constr "Int_sd" [] | Int_i -> mk_constr "Int_i" [] - | Int_pi -> mk_constr "Int_pi" [] | Int_si -> mk_constr "Int_si" [] - | Int_x -> mk_constr "Int_x" [] | Int_Cx -> mk_constr "Int_Cx" [] - | Int_X -> mk_constr "Int_X" [] | Int_CX -> mk_constr "Int_CX" [] - | Int_o -> mk_constr "Int_o" [] | Int_Co -> mk_constr "Int_Co" [] - | Int_u -> mk_constr "Int_u" [] - | Int_Cd -> mk_constr "Int_Cd" [] - | Int_Ci -> mk_constr "Int_Ci" [] - | Int_Cu-> mk_constr "Int_Cu" [] - and mk_fconv fconv = match fconv with - | Float_f -> mk_constr "Float_f" [] - | Float_e -> mk_constr "Float_e" [] - | Float_E -> mk_constr "Float_E" [] - | Float_g -> mk_constr "Float_g" [] - | Float_G -> mk_constr "Float_G" [] - | Float_h -> mk_constr "Float_h" [] - | Float_H -> mk_constr "Float_H" [] - | Float_F -> mk_constr "Float_F" [] - | Float_CF -> mk_constr "Float_CF" [] - and mk_counter cnt = match cnt with - | Line_counter -> mk_constr "Line_counter" [] - | Char_counter -> mk_constr "Char_counter" [] - | Token_counter -> mk_constr "Token_counter" [] - and mk_int_opt n_opt = match n_opt with - | None -> - let lid_loc = mk_lid_loc (Longident.Lident "None") in - mk_exp_loc (Pexp_construct (lid_loc, None)) - | Some n -> - let lid_loc = mk_lid_loc (Longident.Lident "Some") in - mk_exp_loc (Pexp_construct (lid_loc, Some (mk_int n))) - and mk_fmtty : type a b c d e f g h i j k l . - (a, b, c, d, e, f, g, h, i, j, k, l) fmtty_rel -> Parsetree.expression - = - fun fmtty -> match fmtty with - | Char_ty rest -> mk_constr "Char_ty" [ mk_fmtty rest ] - | String_ty rest -> mk_constr "String_ty" [ mk_fmtty rest ] - | Int_ty rest -> mk_constr "Int_ty" [ mk_fmtty rest ] - | Int32_ty rest -> mk_constr "Int32_ty" [ mk_fmtty rest ] - | Nativeint_ty rest -> mk_constr "Nativeint_ty" [ mk_fmtty rest ] - | Int64_ty rest -> mk_constr "Int64_ty" [ mk_fmtty rest ] - | Float_ty rest -> mk_constr "Float_ty" [ mk_fmtty rest ] - | Bool_ty rest -> mk_constr "Bool_ty" [ mk_fmtty rest ] - | Alpha_ty rest -> mk_constr "Alpha_ty" [ mk_fmtty rest ] - | Theta_ty rest -> mk_constr "Theta_ty" [ mk_fmtty rest ] - | Any_ty rest -> mk_constr "Any_ty" [ mk_fmtty rest ] - | Reader_ty rest -> mk_constr "Reader_ty" [ mk_fmtty rest ] - | Ignored_reader_ty rest -> - mk_constr "Ignored_reader_ty" [ mk_fmtty rest ] - | Format_arg_ty (sub_fmtty, rest) -> - mk_constr "Format_arg_ty" [ mk_fmtty sub_fmtty; mk_fmtty rest ] - | Format_subst_ty (sub_fmtty1, sub_fmtty2, rest) -> - mk_constr "Format_subst_ty" - [ mk_fmtty sub_fmtty1; mk_fmtty sub_fmtty2; mk_fmtty rest ] - | End_of_fmtty -> mk_constr "End_of_fmtty" [] - and mk_ignored : type a b c d e f . - (a, b, c, d, e, f) ignored -> Parsetree.expression = - fun ign -> match ign with - | Ignored_char -> - mk_constr "Ignored_char" [] - | Ignored_caml_char -> - mk_constr "Ignored_caml_char" [] - | Ignored_string pad_opt -> - mk_constr "Ignored_string" [ mk_int_opt pad_opt ] - | Ignored_caml_string pad_opt -> - mk_constr "Ignored_caml_string" [ mk_int_opt pad_opt ] - | Ignored_int (iconv, pad_opt) -> - mk_constr "Ignored_int" [ mk_iconv iconv; mk_int_opt pad_opt ] - | Ignored_int32 (iconv, pad_opt) -> - mk_constr "Ignored_int32" [ mk_iconv iconv; mk_int_opt pad_opt ] - | Ignored_nativeint (iconv, pad_opt) -> - mk_constr "Ignored_nativeint" [ mk_iconv iconv; mk_int_opt pad_opt ] - | Ignored_int64 (iconv, pad_opt) -> - mk_constr "Ignored_int64" [ mk_iconv iconv; mk_int_opt pad_opt ] - | Ignored_float (pad_opt, prec_opt) -> - mk_constr "Ignored_float" [ mk_int_opt pad_opt; mk_int_opt prec_opt ] - | Ignored_bool pad_opt -> - mk_constr "Ignored_bool" [ mk_int_opt pad_opt ] - | Ignored_format_arg (pad_opt, fmtty) -> - mk_constr "Ignored_format_arg" [ mk_int_opt pad_opt; mk_fmtty fmtty ] - | Ignored_format_subst (pad_opt, fmtty) -> - mk_constr "Ignored_format_subst" [ - mk_int_opt pad_opt; mk_fmtty fmtty ] - | Ignored_reader -> - mk_constr "Ignored_reader" [] - | Ignored_scan_char_set (width_opt, char_set) -> - mk_constr "Ignored_scan_char_set" [ - mk_int_opt width_opt; mk_string char_set ] - | Ignored_scan_get_counter counter -> - mk_constr "Ignored_scan_get_counter" [ - mk_counter counter - ] - | Ignored_scan_next_char -> - mk_constr "Ignored_scan_next_char" [] - and mk_padding : type x y . (x, y) padding -> Parsetree.expression = - fun pad -> match pad with - | No_padding -> mk_constr "No_padding" [] - | Lit_padding (s, w) -> mk_constr "Lit_padding" [ mk_side s; mk_int w ] - | Arg_padding s -> mk_constr "Arg_padding" [ mk_side s ] - and mk_precision : type x y . (x, y) precision -> Parsetree.expression = - fun prec -> match prec with - | No_precision -> mk_constr "No_precision" [] - | Lit_precision w -> mk_constr "Lit_precision" [ mk_int w ] - | Arg_precision -> mk_constr "Arg_precision" [] - and mk_fmt : type a b c d e f . - (a, b, c, d, e, f) fmt -> Parsetree.expression = - fun fmt -> match fmt with - | Char rest -> - mk_constr "Char" [ mk_fmt rest ] - | Caml_char rest -> - mk_constr "Caml_char" [ mk_fmt rest ] - | String (pad, rest) -> - mk_constr "String" [ mk_padding pad; mk_fmt rest ] - | Caml_string (pad, rest) -> - mk_constr "Caml_string" [ mk_padding pad; mk_fmt rest ] - | Int (iconv, pad, prec, rest) -> - mk_constr "Int" [ - mk_iconv iconv; mk_padding pad; mk_precision prec; mk_fmt rest ] - | Int32 (iconv, pad, prec, rest) -> - mk_constr "Int32" [ - mk_iconv iconv; mk_padding pad; mk_precision prec; mk_fmt rest ] - | Nativeint (iconv, pad, prec, rest) -> - mk_constr "Nativeint" [ - mk_iconv iconv; mk_padding pad; mk_precision prec; mk_fmt rest ] - | Int64 (iconv, pad, prec, rest) -> - mk_constr "Int64" [ - mk_iconv iconv; mk_padding pad; mk_precision prec; mk_fmt rest ] - | Float (fconv, pad, prec, rest) -> - mk_constr "Float" [ - mk_fconv (snd fconv); mk_padding pad; mk_precision prec; mk_fmt rest ] - | Bool (pad, rest) -> - mk_constr "Bool" [ mk_padding pad; mk_fmt rest ] - | Flush rest -> - mk_constr "Flush" [ mk_fmt rest ] - | String_literal (s, rest) -> - mk_constr "String_literal" [ mk_string s; mk_fmt rest ] - | Char_literal (c, rest) -> - mk_constr "Char_literal" [ mk_char c; mk_fmt rest ] - | Format_arg (pad_opt, fmtty, rest) -> - mk_constr "Format_arg" [ - mk_int_opt pad_opt; mk_fmtty fmtty; mk_fmt rest ] - | Format_subst (pad_opt, fmtty, rest) -> - mk_constr "Format_subst" [ - mk_int_opt pad_opt; mk_fmtty fmtty; mk_fmt rest ] - | Alpha rest -> - mk_constr "Alpha" [ mk_fmt rest ] - | Theta rest -> - mk_constr "Theta" [ mk_fmt rest ] - | Formatting_lit (fmting, rest) -> - mk_constr "Formatting_lit" [ mk_formatting_lit fmting; mk_fmt rest ] - | Formatting_gen (fmting, rest) -> - mk_constr "Formatting_gen" [ mk_formatting_gen fmting; mk_fmt rest ] - | Reader rest -> - mk_constr "Reader" [ mk_fmt rest ] - | Scan_char_set (width_opt, char_set, rest) -> - mk_constr "Scan_char_set" [ - mk_int_opt width_opt; mk_string char_set; mk_fmt rest ] - | Scan_get_counter (cnt, rest) -> - mk_constr "Scan_get_counter" [ mk_counter cnt; mk_fmt rest ] - | Scan_next_char rest -> - mk_constr "Scan_next_char" [ mk_fmt rest ] - | Ignored_param (ign, rest) -> - mk_constr "Ignored_param" [ mk_ignored ign; mk_fmt rest ] - | End_of_format -> - mk_constr "End_of_format" [] - | Custom _ -> - (* Custom formatters have no syntax so they will never appear - in formats parsed from strings. *) - assert false - in - let legacy_behavior = not !Clflags.strict_formats in - let Fmt_EBB fmt = fmt_ebb_of_string ~legacy_behavior str in - mk_constr "Format" [ mk_fmt fmt; mk_string str ] - )) - with Failure msg -> - raise (Error (loc, env, Invalid_format msg)) - and type_label_exp create env loc ty_expected (lid, label, sarg) = (* Here also ty_expected may be at generic_level *) begin_def (); - let separate = !Clflags.principal || Env.has_local_constraints env in + let separate = Env.has_local_constraints env in if separate then (begin_def (); begin_def ()); let (vars, ty_arg, ty_res) = instance_label true label in if separate then begin @@ -4054,7 +2899,7 @@ and type_argument ?recarg env sarg ty_expected' ty_expected = (* ty_expected' may be generic *) let no_labels ty = let ls, tvar = list_labels env ty in - not tvar && List.for_all ((=) Nolabel) ls + not tvar && List.for_all (fun x -> x = Nolabel) ls in let rec is_inferred sexp = match sexp.pexp_desc with @@ -4065,30 +2910,23 @@ and type_argument ?recarg env sarg ty_expected' ty_expected = | _ -> false in match expand_head env ty_expected' with - {desc = Tarrow(Nolabel,ty_arg,ty_res,_); level = lv} + {desc = Tarrow(Nolabel,ty_arg,ty_res,_); level = _} when is_inferred sarg -> (* apply optional arguments when expected type is "" *) (* we must be very careful about not breaking the semantics *) - if !Clflags.principal then begin_def (); let texp = type_exp env sarg in - if !Clflags.principal then begin - end_def (); - generalize_structure texp.exp_type - end; let rec make_args args ty_fun = match (expand_head env ty_fun).desc with | Tarrow (l,ty_arg,ty_fun,_) when is_optional l -> let ty = option_none (instance env ty_arg) sarg.pexp_loc in make_args ((l, Some ty) :: args) ty_fun - | Tarrow (l,_,ty_res',_) when l = Nolabel || !Clflags.classic -> + | Tarrow (Nolabel,_,ty_res',_) -> List.rev args, ty_fun, no_labels ty_res' | Tvar _ -> List.rev args, ty_fun, false | _ -> [], texp.exp_type, false in let args, ty_fun', simple_res = make_args [] texp.exp_type in - let warn = !Clflags.principal && - (lv <> generic_level || (repr ty_fun').level <> generic_level) - and texp = {texp with exp_type = instance env texp.exp_type} + let texp = {texp with exp_type = instance env texp.exp_type} and ty_fun = instance env ty_fun' in if not (simple_res || no_labels ty_res) then begin unify_exp env texp ty_expected; @@ -4127,8 +2965,6 @@ and type_argument ?recarg env sarg ty_expected' ty_expected = Location.prerr_warning texp.exp_loc (Warnings.Eliminated_optional_arguments (List.map (fun (l, _) -> Printtyp.string_of_label l) args)); - if warn then Location.prerr_warning texp.exp_loc - (Warnings.Without_principality "eliminated optional argument"); (* let-expand to have side effects *) let let_pat, let_var = var_pair "arg" texp.exp_type in re { texp with exp_type = ty_fun; exp_desc = @@ -4142,8 +2978,13 @@ and type_argument ?recarg env sarg ty_expected' ty_expected = let texp = type_expect ?recarg env sarg ty_expected' in unify_exp env texp ty_expected; texp - -and type_application env funct sargs = +and is_automatic_curried_application env funct = + (* When a curried function is used with uncurried application, treat it as a curried application *) + !Config.use_automatic_curried_application && + match (expand_head env funct.exp_type).desc with + | Tarrow _ -> true + | _ -> false +and type_application uncurried env funct (sargs : sargs) : targs * Types.type_expr * bool = (* funct.exp_type may be generic *) let result_type omitted ty_fun = List.fold_left @@ -4155,34 +2996,81 @@ and type_application env funct sargs = tvar || List.mem l ls in let ignored = ref [] in - let rec type_unknown_args - (args : - (Asttypes.arg_label * (unit -> Typedtree.expression) option) list) - omitted ty_fun = function - [] -> - (List.map - (function l, None -> l, None - | l, Some f -> l, Some (f ())) - (List.rev args), - instance env (result_type omitted ty_fun)) + let has_uncurried_type t = + match (expand_head env t).desc with + | Tconstr (Pident {name = "function$"},[t; tArity],_) -> + let arity = Ast_uncurried.type_to_arity tArity in + Some (arity, t) + | _ -> None in + let force_uncurried_type funct = + match has_uncurried_type funct.exp_type with + | None -> + let arity = List.length sargs in + let uncurried_typ = Ast_uncurried.make_uncurried_type ~env ~arity (newvar()) in + begin + match (expand_head env funct.exp_type).desc with + | Tvar _ | Tarrow _ -> + unify_exp env funct uncurried_typ + | _ -> + raise(Error(funct.exp_loc, env, Apply_non_function (expand_head env funct.exp_type))) + end + | Some _ -> () in + let extract_uncurried_type t = + match has_uncurried_type t with + | Some (arity, t1) -> + if List.length sargs > arity then + raise(Error(funct.exp_loc, env, + Uncurried_arity_mismatch (t, arity, List.length sargs))); + t1, arity + | None -> t, max_int in + let update_uncurried_arity ~nargs t newT = + match has_uncurried_type t with + | Some (arity, _) -> + let newarity = arity - nargs in + let fully_applied = newarity <= 0 in + if uncurried && not fully_applied then + raise(Error(funct.exp_loc, env, + Uncurried_arity_mismatch (t, arity, List.length sargs))); + let newT = if fully_applied then newT else Ast_uncurried.make_uncurried_type ~env ~arity:newarity newT in + (fully_applied, newT) + | _ -> (false, newT) + in + let rec type_unknown_args max_arity (args : lazy_args) omitted ty_fun (syntax_args : sargs) + : targs * _ = + match syntax_args with + | [] -> + let collect_args () = + (List.map + (function l, None -> l, None + | l, Some f -> l, Some (f ())) + (List.rev args), + instance env (result_type omitted ty_fun)) in + if List.length args < max_arity && uncurried then + (match (expand_head env ty_fun).desc with + | Tarrow (Optional l,t1,t2,_) -> + ignored := (Optional l,t1,ty_fun.level) :: !ignored; + let arg = Optional l, Some (fun () -> option_none (instance env t1) Location.none) in + type_unknown_args max_arity (arg::args) omitted t2 [] + | _ -> collect_args ()) + else + collect_args () + | [(Nolabel, {pexp_desc = Pexp_construct ({txt = Lident "()"}, None)})] + when uncurried && omitted = [] && args <> [] && List.length args = List.length !ignored -> + (* foo(. ) treated as empty application if all args are optional (hence ignored) *) + type_unknown_args max_arity args omitted ty_fun [] | (l1, sarg1) :: sargl -> let (ty1, ty2) = let ty_fun = expand_head env ty_fun in + let arity_ok = List.length args < max_arity in match ty_fun.desc with - Tvar _ -> + Tvar _ -> let t1 = newvar () and t2 = newvar () in - let not_identity = function - Texp_ident(_,_,{val_kind=Val_prim - {Primitive.prim_name="%identity"}}) -> - false - | _ -> true - in if ty_fun.level >= t1.level && not_identity funct.exp_desc then Location.prerr_warning sarg1.pexp_loc Warnings.Unused_argument; unify env ty_fun (newty (Tarrow(l1,t1,t2,Clink(ref Cunknown)))); (t1, t2) - | Tarrow (l,t1,t2,_) when l = l1 - || !Clflags.classic && l1 = Nolabel && not (is_optional l) -> + | Tarrow (l,t1,t2,_) when Asttypes.same_arg_label l l1 && arity_ok + -> (t1, t2) | td -> let ty_fun = @@ -4190,7 +3078,10 @@ and type_application env funct sargs = let ty_res = result_type (omitted @ !ignored) ty_fun in match ty_res.desc with Tarrow _ -> - if (!Clflags.classic || not (has_label l1 ty_fun)) then + if not arity_ok then + raise (Error(sarg1.pexp_loc, env, + Apply_wrong_label(l1, funct.exp_type))) else + if (not (has_label l1 ty_fun)) then raise (Error(sarg1.pexp_loc, env, Apply_wrong_label(l1, ty_res))) else @@ -4206,126 +3097,58 @@ and type_application env funct sargs = unify_exp env arg1 (type_option(newvar())); arg1 in - type_unknown_args ((l1, Some arg1) :: args) omitted ty2 sargl + type_unknown_args max_arity ((l1, Some arg1) :: args) omitted ty2 sargl in - let ignore_labels = - !Clflags.classic || - begin - let ls, tvar = list_labels env funct.exp_type in - not tvar && - let labels = List.filter (fun l -> not (is_optional l)) ls in - List.length labels = List.length sargs && - List.for_all (fun (l,_) -> l = Nolabel) sargs && - List.exists (fun l -> l <> Nolabel) labels && - (Location.prerr_warning - funct.exp_loc - (Warnings.Labels_omitted - (List.map Printtyp.string_of_label - (List.filter ((<>) Nolabel) labels))); - true) - end - in - let warned = ref false in - let rec type_args args omitted ty_fun ty_fun0 ty_old sargs more_sargs = + let rec type_args max_arity args omitted ~ty_fun ty_fun0 ~(sargs : sargs) = match expand_head env ty_fun, expand_head env ty_fun0 with - {desc=Tarrow (l, ty, ty_fun, com); level=lv} as ty_fun', + {desc=Tarrow (l, ty, ty_fun, com); level=lv} , {desc=Tarrow (_, ty0, ty_fun0, _)} - when (sargs <> [] || more_sargs <> []) && commu_repr com = Cok -> - let may_warn loc w = - if not !warned && !Clflags.principal && lv <> generic_level - then begin - warned := true; - Location.prerr_warning loc w - end - in + when (sargs <> [] ) && commu_repr com = Cok && List.length args < max_arity -> let name = label_name l and optional = is_optional l in - let sargs, more_sargs, arg = - if ignore_labels && not (is_optional l) then begin - (* In classic mode, omitted = [] *) - match sargs, more_sargs with - (l', sarg0) :: _, _ -> - raise(Error(sarg0.pexp_loc, env, - Apply_wrong_label(l', ty_old))) - | _, (l', sarg0) :: more_sargs -> - if l <> l' && l' <> Nolabel then - raise(Error(sarg0.pexp_loc, env, - Apply_wrong_label(l', ty_fun'))) - else - ([], more_sargs, - Some (fun () -> type_argument env sarg0 ty ty0)) - | _ -> - assert false - end else try - let (l', sarg0, sargs, more_sargs) = - try - let (l', sarg0, sargs1, sargs2) = extract_label name sargs in - if sargs1 <> [] then - may_warn sarg0.pexp_loc - (Warnings.Not_principal "commuting this argument"); - (l', sarg0, sargs1 @ sargs2, more_sargs) - with Not_found -> - let (l', sarg0, sargs1, sargs2) = - extract_label name more_sargs in - if sargs1 <> [] || sargs <> [] then - may_warn sarg0.pexp_loc - (Warnings.Not_principal "commuting this argument"); - (l', sarg0, sargs @ sargs1, sargs2) - in + let sargs, omitted, arg = + match extract_label name sargs with + | None -> + if optional && (uncurried || label_assoc Nolabel sargs) + then begin + ignored := (l,ty,lv) :: !ignored; + sargs, omitted , Some (fun () -> option_none (instance env ty) Location.none) + end else + sargs, (l,ty,lv) :: omitted , None + | Some (l', sarg0, sargs) -> if not optional && is_optional l' then Location.prerr_warning sarg0.pexp_loc (Warnings.Nonoptional_label (Printtyp.string_of_label l)); - sargs, more_sargs, + sargs, omitted , + Some ( if not optional || is_optional l' then - Some (fun () -> type_argument env sarg0 ty ty0) - else begin - may_warn sarg0.pexp_loc - (Warnings.Not_principal "using an optional argument here"); - Some (fun () -> option_some (type_argument env sarg0 + (fun () -> type_argument env sarg0 ty ty0) + else + (fun () -> option_some (type_argument env sarg0 (extract_option_type env ty) - (extract_option_type env ty0))) - end - with Not_found -> - sargs, more_sargs, - if optional && - (List.mem_assoc Nolabel sargs - || List.mem_assoc Nolabel more_sargs) - then begin - may_warn funct.exp_loc - (Warnings.Without_principality "eliminated optional argument"); - ignored := (l,ty,lv) :: !ignored; - Some (fun () -> option_none (instance env ty) Location.none) - end else begin - may_warn funct.exp_loc - (Warnings.Without_principality "commuted an argument"); - None - end + (extract_option_type env ty0)))) in - let omitted = - if arg = None then (l,ty,lv) :: omitted else omitted in - let ty_old = if sargs = [] then ty_fun else ty_old in - type_args ((l,arg)::args) omitted ty_fun ty_fun0 - ty_old sargs more_sargs + type_args max_arity ((l,arg)::args) omitted ~ty_fun ty_fun0 ~sargs | _ -> - match sargs with - (l, sarg0) :: _ when ignore_labels -> - raise(Error(sarg0.pexp_loc, env, - Apply_wrong_label(l, ty_old))) - | _ -> - type_unknown_args args omitted ty_fun0 - (sargs @ more_sargs) + type_unknown_args max_arity args omitted ty_fun0 sargs (* This is the hot path for non-labeled function*) in - let is_ignore funct = - match funct.exp_desc with - Texp_ident (_, _, {val_kind=Val_prim{Primitive.prim_name="%ignore"}}) -> - (try ignore (filter_arrow env (instance env funct.exp_type) Nolabel); - true - with Unify _ -> false) - | _ -> false + let () = + let ls, tvar = list_labels env funct.exp_type in + if not tvar then + let labels = Ext_list.filter ls (fun l -> not (is_optional l)) in + if Ext_list.same_length labels sargs && + List.for_all (fun (l,_) -> l = Nolabel) sargs && + List.exists (fun l -> l <> Nolabel) labels then + raise + (Error( + funct.exp_loc, env, + (Labels_omitted + (List.map Printtyp.string_of_label + (Ext_list.filter labels (fun x -> x <> Nolabel)))))) in match sargs with (* Special case for ignore: avoid discarding warning *) - [Nolabel, sarg] when is_ignore funct -> + [Nolabel, sarg] when is_ignore funct env -> let ty_arg, ty_res = filter_arrow env (instance env funct.exp_type) Nolabel in @@ -4334,22 +3157,23 @@ and type_application env funct sargs = | Tarrow _ -> Location.prerr_warning exp.exp_loc Warnings.Partial_application | Tvar _ -> - add_delayed_check (fun () -> check_application_result env false exp) + Delayed_checks.add_delayed_check (fun () -> check_application_result env false exp) | _ -> () end; - ([Nolabel, Some exp], ty_res) + ([Nolabel, Some exp], ty_res, false) | _ -> - let ty = funct.exp_type in - if ignore_labels then - type_args [] [] ty (instance env ty) ty [] sargs - else - type_args [] [] ty (instance env ty) ty sargs [] + if uncurried then force_uncurried_type funct; + let ty, max_arity = extract_uncurried_type funct.exp_type in + let targs, ret_t = type_args max_arity [] [] ~ty_fun:ty (instance env ty) ~sargs in + let fully_applied, ret_t = + update_uncurried_arity funct.exp_type ~nargs:(List.length !ignored + List.length sargs) ret_t in + targs, ret_t, fully_applied and type_construct env loc lid sarg ty_expected attrs = let opath = try let (p0, p,_) = extract_concrete_variant env ty_expected in - Some(p0, p, ty_expected.level = generic_level || not !Clflags.principal) + Some(p0, p) with Not_found -> None in let constrs = Typetexp.find_all_constructors env lid.loc lid.txt in @@ -4369,7 +3193,7 @@ and type_construct env loc lid sarg ty_expected attrs = if List.length sargs <> constr.cstr_arity then raise(Error(loc, env, Constructor_arity_mismatch (lid.txt, constr.cstr_arity, List.length sargs))); - let separate = !Clflags.principal || Env.has_local_constraints env in + let separate = Env.has_local_constraints env in if separate then (begin_def (); begin_def ()); let (ty_args, ty_res) = instance_constructor constr in let texp = @@ -4427,27 +3251,13 @@ and type_statement env sexp = let ty = expand_head env exp.exp_type and tv = newvar() in if is_Tvar ty && ty.level > tv.level then Location.prerr_warning loc Warnings.Nonreturning_statement; - if !Clflags.strict_sequence then - let expected_ty = instance_def Predef.type_unit in - unify_exp env exp expected_ty; - exp - else begin - begin match ty.desc with - | Tarrow _ -> - Location.prerr_warning loc Warnings.Partial_application - | Tconstr (p, _, _) when Path.same p Predef.path_unit -> () - | Tvar _ -> - add_delayed_check (fun () -> check_application_result env true exp) - | _ -> - Location.prerr_warning loc Warnings.Statement_type - end; - unify_var env tv ty; - exp - end + let expected_ty = instance_def Predef.type_unit in + unify_exp env exp expected_ty; + exp (* Typing of match cases *) -and type_cases ?in_function env ty_arg ty_res partial_flag loc caselist = +and type_cases ?in_function env ty_arg ty_res partial_flag loc caselist : _ * Typedtree.partial = (* ty_arg is _fully_ generalized *) let patterns = List.map (fun {pc_lhs=p} -> p) caselist in let contains_polyvars = List.exists contains_polymorphic_variant patterns in @@ -4455,10 +3265,10 @@ and type_cases ?in_function env ty_arg ty_res partial_flag loc caselist = and has_gadts = List.exists (contains_gadt env) patterns in (* prerr_endline ( if has_gadts then "contains gadt" else "no gadt"); *) let ty_arg = - if (has_gadts || erase_either) && not !Clflags.principal + if (has_gadts || erase_either) then correct_levels ty_arg else ty_arg and ty_res, env = - if has_gadts && not !Clflags.principal then + if has_gadts then correct_levels ty_res, duplicate_ident_types caselist env else ty_res, env in @@ -4488,7 +3298,7 @@ and type_cases ?in_function env ty_arg ty_res partial_flag loc caselist = Format.printf "lev = %d@.%a@." lev Printtyp.raw_type_expr ty_res; *) (* Do we need to propagate polymorphism *) let propagate = - !Clflags.principal || has_gadts || (repr ty_arg).level = generic_level || + has_gadts || (repr ty_arg).level = generic_level || match caselist with [{pc_lhs}] when is_var pc_lhs -> false | _ -> true in @@ -4505,23 +3315,15 @@ and type_cases ?in_function env ty_arg ty_res partial_flag loc caselist = | None -> pc_rhs.pexp_loc | Some g -> {pc_rhs.pexp_loc with loc_start=g.pexp_loc.loc_start} in - if !Clflags.principal then begin_def (); (* propagation of pattern *) let scope = Some (Annot.Idef loc) in let (pat, ext_env, force, unpacks) = let partial = - if !Clflags.principal || erase_either + if erase_either then Some false else None in let ty_arg = instance ?partial env ty_arg in type_pattern ~lev env pc_lhs scope ty_arg in pattern_force := force @ !pattern_force; - let pat = - if !Clflags.principal then begin - end_def (); - iter_pattern (fun {pat_type=t} -> generalize_structure t) pat; - { pat with pat_type = instance ext_env pat.pat_type } - end else pat - in (pat, (ext_env, unpacks))) caselist in (* Unify all cases (delayed to keep it order-free) *) @@ -4553,13 +3355,7 @@ and type_cases ?in_function env ty_arg ty_res partial_flag loc caselist = (fun (pat, (ext_env, unpacks)) {pc_lhs; pc_guard; pc_rhs} -> let sexp = wrap_unpacks pc_rhs unpacks in let ty_res' = - if !Clflags.principal then begin - begin_def (); - let ty = instance ~partial:true env ty_res in - end_def (); - generalize_structure ty; ty - end - else if contains_gadt env pc_lhs then correct_levels ty_res + if contains_gadt env pc_lhs then correct_levels ty_res else ty_res in (* Format.printf "@[%i %i, ty_res' =@ %a@]@." lev (get_current_level()) Printtyp.raw_type_expr ty_res'; *) @@ -4580,7 +3376,7 @@ and type_cases ?in_function env ty_arg ty_res partial_flag loc caselist = ) pat_env_list caselist in - if !Clflags.principal || has_gadts then begin + if has_gadts then begin let ty_res' = instance env ty_res in List.iter (fun c -> unify_exp env c.c_rhs ty_res') cases end; @@ -4606,7 +3402,7 @@ and type_cases ?in_function env ty_arg ty_res partial_flag loc caselist = Parmatch.check_ambiguous_bindings cases in if contains_polyvars || do_init then - add_delayed_check unused_check + Delayed_checks.add_delayed_check unused_check else unused_check (); (* Check for unused cases, do not delay because of gadts *) @@ -4622,10 +3418,7 @@ and type_cases ?in_function env ty_arg ty_res partial_flag loc caselist = and type_let ?(check = fun s -> Warnings.Unused_var s) ?(check_strict = fun s -> Warnings.Unused_var_strict s) env rec_flag spat_sexp_list scope allow = - let open Ast_helper in begin_def(); - if !Clflags.principal then begin_def (); - let is_fake_let = match spat_sexp_list with | [{pvb_expr={pexp_desc=Pexp_match( @@ -4638,19 +3431,8 @@ and type_let ?(check = fun s -> Warnings.Unused_var s) let spatl = List.map - (fun {pvb_pat=spat; pvb_expr=sexp; pvb_attributes=attrs} -> - attrs, - match spat.ppat_desc, sexp.pexp_desc with - (Ppat_any | Ppat_constraint _), _ -> spat - | _, Pexp_coerce (_, _, sty) - | _, Pexp_constraint (_, sty) when !Clflags.principal -> - (* propagate type annotation to pattern, - to allow it to be generalized in -principal mode *) - Pat.constraint_ - ~loc:{spat.ppat_loc with Location.loc_ghost=true} - spat - sty - | _ -> spat) + (fun {pvb_pat=spat; pvb_attributes=attrs} -> + attrs, spat) spat_sexp_list in let nvs = List.map (fun _ -> newvar ()) spatl in let (pat_list, new_env, force, unpacks) = @@ -4677,16 +3459,6 @@ and type_let ?(check = fun s -> Warnings.Unused_var s) iter_pattern finalize_variant pat end) pat_list; - (* Generalize the structure *) - let pat_list = - if !Clflags.principal then begin - end_def (); - List.map - (fun pat -> - iter_pattern (fun pat -> generalize_structure pat.pat_type) pat; - {pat with pat_type = instance env pat.pat_type}) - pat_list - end else pat_list in (* Only bind pattern variables after generalizing *) List.iter (fun f -> f()) force; let exp_env = @@ -4734,7 +3506,7 @@ and type_let ?(check = fun s -> Warnings.Unused_var s) let name = Ident.name id in let used = ref false in if not (name = "" || name.[0] = '_' || name.[0] = '#') then - add_delayed_check + Delayed_checks.add_delayed_check (fun () -> if not !used then Location.prerr_warning vd.Types.val_loc @@ -4769,12 +3541,7 @@ and type_let ?(check = fun s -> Warnings.Unused_var s) match pat.pat_type.desc with | Tpoly (ty, tl) -> begin_def (); - if !Clflags.principal then begin_def (); let vars, ty' = instance_poly ~keep_names:true true tl ty in - if !Clflags.principal then begin - end_def (); - generalize_structure ty' - end; let exp = Builtin_attributes.warning_scope pvb_attributes (fun () -> type_expect exp_env sexp ty') @@ -4856,6 +3623,11 @@ let type_expression env sexp = Typetexp.reset_type_variables(); begin_def(); let exp = type_exp env sexp in + if Warnings.is_active Bs_toplevel_expression_unit then + (try unify env exp.exp_type + (instance_def Predef.type_unit) with + | Unify _ + | Tags _ -> Location.prerr_warning sexp.pexp_loc Bs_toplevel_expression_unit); end_def(); if not (is_nonexpansive exp) then generalize_expansive env exp.exp_type; generalize exp.exp_type; @@ -4914,6 +3686,12 @@ let report_error env ppf = function fprintf ppf "Variable %s must occur on both sides of this | pattern" (Ident.name id); spellcheck_idents ppf id valid_idents + | Expr_type_clash ( + (_, {desc = Tconstr (Pdot (Pdot(Pident {name = "Js_OO"},"Meth",_),a,_),_,_)}) :: + (_, {desc = Tconstr (Pdot (Pdot(Pident {name = "Js_OO"},"Meth",_),b,_),_,_)}) :: _ + ) when a <> b -> + fprintf ppf "This method has %s but was expected %s" a b + | Expr_type_clash trace -> report_unification_error ppf env trace (function ppf -> @@ -4946,10 +3724,10 @@ let report_error env ppf = function type_expr ty print_label l | Label_multiply_defined s -> fprintf ppf "The record field label %s is defined several times" s - | Label_missing labels -> + | Labels_missing labels -> let print_labels ppf = - List.iter (fun lbl -> fprintf ppf "@ %s" (Ident.name lbl)) in - fprintf ppf "@[Some record fields are undefined:%a@]" + List.iter (fun lbl -> fprintf ppf "@ %s" ( lbl)) in + fprintf ppf "@[Some required record fields are missing:%a. If this is a component, add the missing props.@]" print_labels labels | Label_not_mutable lid -> fprintf ppf "The record field %a is not mutable" longident lid @@ -4980,37 +3758,17 @@ let report_error env ppf = function (function ppf -> fprintf ppf "but a %s was expected belonging to the %s type" name kind) - | Invalid_format msg -> - fprintf ppf "%s" msg | Undefined_method (ty, me, valid_methods) -> reset_and_mark_loops ty; fprintf ppf "@[@[This expression has type@;<1 2>%a@]@,\ - It has no method %s@]" type_expr ty me; + It has no field %s@]" type_expr ty me; begin match valid_methods with | None -> () | Some valid_methods -> spellcheck ppf me valid_methods end - | Undefined_inherited_method (me, valid_methods) -> - fprintf ppf "This expression has no method %s" me; - spellcheck ppf me valid_methods; - | Virtual_class cl -> - fprintf ppf "Cannot instantiate the virtual class %a" - longident cl - | Unbound_instance_variable (var, valid_vars) -> - fprintf ppf "Unbound instance variable %s" var; - spellcheck ppf var valid_vars; - | Instance_variable_not_mutable (b, v) -> - if b then - fprintf ppf "The instance variable %s is not mutable" v - else - fprintf ppf "The value %s is not an instance variable" v | Not_subtype(tr1, tr2) -> report_subtyping_error ppf env tr1 "is not a subtype of" tr2 - | Outside_class -> - fprintf ppf "This object duplication occurs outside a method definition" - | Value_multiply_overridden v -> - fprintf ppf "The instance variable %s is overridden several times" v | Coercion_failure (ty, ty', trace, b) -> report_unification_error ppf env trace (function ppf -> @@ -5049,11 +3807,6 @@ let report_error env ppf = function "This `let module' expression has type@ %a@ " type_expr ty; fprintf ppf "In this type, the locally bound module name %s escapes its scope" id - | Masked_instance_variable lid -> - fprintf ppf - "The instance variable %a@ \ - cannot be accessed from the definition of another instance variable" - longident lid | Private_type ty -> fprintf ppf "Cannot create values of the private type %a" type_expr ty | Private_label (lid, ty) -> @@ -5062,7 +3815,7 @@ let report_error env ppf = function | Not_a_variant_type lid -> fprintf ppf "The type %a@ is not a variant type" longident lid | Incoherent_label_order -> - fprintf ppf "This function is applied to arguments@ "; + fprintf ppf "This labeled function is applied to arguments@ "; fprintf ppf "in an order different from other calls.@ "; fprintf ppf "This is only allowed when the real type is known." | Less_general (kind, trace) -> @@ -5129,11 +3882,24 @@ let report_error env ppf = function | Illegal_letrec_pat -> fprintf ppf "Only variables are allowed as left-hand side of `let rec'" - | Illegal_letrec_expr -> - fprintf ppf - "This kind of expression is not allowed as right-hand side of `let rec'" - | Illegal_class_expr -> - fprintf ppf "This kind of recursive class expression is not allowed" + | Labels_omitted labels -> + fprintf ppf "For labeled function, labels %s were omitted in the application of this function." + (String.concat ", " labels) + | Empty_record_literal -> + fprintf ppf "Empty record literal {} should be type annotated or used in a record context." + | Uncurried_arity_mismatch (typ, arity, args) -> + fprintf ppf "@[@[<2>This uncurried function has type@ %a@]" + type_expr typ; + fprintf ppf "@ @[It is applied with @{%d@} argument%s but it requires @{%d@}.@]@]" + args (if args = 0 then "" else "s") arity + | Field_not_optional (name, typ) -> + fprintf ppf + "Field @{%s@} is not optional in type %a. Use without ?" name + type_expr typ + + +let super_report_error_no_wrap_printing_env = report_error + let report_error env ppf err = wrap_printing_env env (fun () -> report_error env ppf err) @@ -5149,8 +3915,6 @@ let () = None ) -let () = - Env.add_delayed_check_forward := add_delayed_check (* drop ?recarg argument from the external API *) let type_expect ?in_function env e ty = type_expect ?in_function env e ty diff --git a/analysis/vendor/compiler-libs-406/typecore.mli b/analysis/vendor/ml/typecore.mli similarity index 80% rename from analysis/vendor/compiler-libs-406/typecore.mli rename to analysis/vendor/ml/typecore.mli index 42f125c17..502e4a689 100644 --- a/analysis/vendor/compiler-libs-406/typecore.mli +++ b/analysis/vendor/ml/typecore.mli @@ -33,17 +33,6 @@ val type_let: Typedtree.value_binding list * Env.t val type_expression: Env.t -> Parsetree.expression -> Typedtree.expression -val type_class_arg_pattern: - string -> Env.t -> Env.t -> arg_label -> Parsetree.pattern -> - Typedtree.pattern * (Ident.t * string loc * Ident.t * type_expr) list * - Env.t * Env.t -val type_self_pattern: - string -> type_expr -> Env.t -> Env.t -> Env.t -> Parsetree.pattern -> - Typedtree.pattern * - (Ident.t * type_expr) Meths.t ref * - (Ident.t * Asttypes.mutable_flag * Asttypes.virtual_flag * type_expr) - Vars.t ref * - Env.t * Env.t * Env.t val check_partial: ?lev:int -> Env.t -> type_expr -> Location.t -> Typedtree.case list -> Typedtree.partial @@ -63,9 +52,10 @@ val option_none: type_expr -> Location.t -> Typedtree.expression val extract_option_type: Env.t -> type_expr -> type_expr val iter_pattern: (Typedtree.pattern -> unit) -> Typedtree.pattern -> unit val generalizable: int -> type_expr -> bool -val reset_delayed_checks: unit -> unit -val force_delayed_checks: unit -> unit + + +val id_of_pattern : Typedtree.pattern -> Ident.t option val name_pattern : string -> Typedtree.case list -> Ident.t val self_coercion : (Path.t * Location.t list ref) list ref @@ -82,28 +72,20 @@ type error = | Apply_non_function of type_expr | Apply_wrong_label of arg_label * type_expr | Label_multiply_defined of string - | Label_missing of Ident.t list + | Labels_missing of string list | Label_not_mutable of Longident.t | Wrong_name of string * type_expr * string * Path.t * string * string list | Name_type_mismatch of string * Longident.t * (Path.t * Path.t) * (Path.t * Path.t) list - | Invalid_format of string | Undefined_method of type_expr * string * string list option - | Undefined_inherited_method of string * string list - | Virtual_class of Longident.t | Private_type of type_expr | Private_label of Longident.t * type_expr - | Unbound_instance_variable of string * string list - | Instance_variable_not_mutable of bool * string | Not_subtype of (type_expr * type_expr) list * (type_expr * type_expr) list - | Outside_class - | Value_multiply_overridden of string | Coercion_failure of type_expr * type_expr * (type_expr * type_expr) list * bool | Too_many_arguments of bool * type_expr | Abstract_wrong_label of arg_label * type_expr | Scoping_let_module of string * type_expr - | Masked_instance_variable of Longident.t | Not_a_variant_type of Longident.t | Incoherent_label_order | Less_general of string * (type_expr * type_expr) list @@ -125,12 +107,17 @@ type error = | Literal_overflow of string | Unknown_literal of string * char | Illegal_letrec_pat - | Illegal_letrec_expr - | Illegal_class_expr - + | Labels_omitted of string list + | Empty_record_literal + | Uncurried_arity_mismatch of type_expr * int * int + | Field_not_optional of string * type_expr exception Error of Location.t * Env.t * error exception Error_forward of Location.error + +val super_report_error_no_wrap_printing_env: Env.t -> formatter -> error -> unit + + val report_error: Env.t -> formatter -> error -> unit (* Deprecated. Use Location.{error_of_exn, report_error}. *) @@ -142,9 +129,6 @@ val type_open: Longident.t loc -> Path.t * Env.t) ref (* Forward declaration, to be filled in by Typeclass.class_structure *) -val type_object: - (Env.t -> Location.t -> Parsetree.class_structure -> - Typedtree.class_structure * Types.class_signature * string list) ref val type_package: (Env.t -> Parsetree.module_expr -> Path.t -> Longident.t list -> Typedtree.module_expr * type_expr list) ref @@ -155,6 +139,4 @@ val create_package_type : Location.t -> Env.t -> val constant: Parsetree.constant -> (Asttypes.constant, error) result -val check_recursive_bindings : Env.t -> Typedtree.value_binding list -> unit -val check_recursive_class_bindings : - Env.t -> Ident.t list -> Typedtree.class_expr list -> unit + diff --git a/analysis/vendor/compiler-libs-406/typedecl.ml b/analysis/vendor/ml/typedecl.ml similarity index 86% rename from analysis/vendor/compiler-libs-406/typedecl.ml rename to analysis/vendor/ml/typedecl.ml index 9d364da03..36097256f 100644 --- a/analysis/vendor/compiler-libs-406/typedecl.ml +++ b/analysis/vendor/ml/typedecl.ml @@ -27,7 +27,6 @@ type native_repr_kind = Unboxed | Untagged type error = Repeated_parameter | Duplicate_constructor of string - | Too_many_constructors | Duplicate_label of string | Recursive_abbrev of string | Cycle_in_def of string * type_expr @@ -37,7 +36,6 @@ type error = | Type_clash of Env.t * (type_expr * type_expr) list | Parameters_differ of Path.t * type_expr * type_expr | Null_arity_external - | Missing_native_external | Unbound_type_var of type_expr * type_declaration | Cannot_extend_private_type of Path.t | Not_extensible_type of Path.t @@ -51,12 +49,8 @@ type error = | Unbound_type_var_ext of type_expr * extension_constructor | Varying_anonymous | Val_in_structure - | Multiple_native_repr_attributes - | Cannot_unbox_or_untag_type of native_repr_kind - | Deep_unbox_or_untag_attribute of native_repr_kind | Bad_immediate_attribute | Bad_unboxed_attribute of string - | Wrong_unboxed_type_float | Boxed_and_unboxed | Nonrec_gadt @@ -152,11 +146,6 @@ let get_unboxed_type_representation env ty = get_unboxed_type_representation env ty 100 ;; -(* Determine if a type's values are represented by floats at run-time. *) -let is_float env ty = - match get_unboxed_type_representation env ty with - Some {desc = Tconstr(p, _, _); _} -> Path.same p Predef.path_float - | _ -> false (* Determine if a type definition defines a fixed type. (PW) *) let is_fixed_type sd = @@ -217,14 +206,18 @@ let make_params env params = List.map make_param params let transl_labels env closed lbls = - assert (lbls <> []); + if !Config.bs_only then + match !Builtin_attributes.check_duplicated_labels lbls with + | None -> () + | Some {loc;txt=name} -> raise (Error(loc,Duplicate_label name)) + else ( let all_labels = ref StringSet.empty in List.iter (fun {pld_name = {txt=name; loc}} -> if StringSet.mem name !all_labels then raise(Error(loc, Duplicate_label name)); all_labels := StringSet.add name !all_labels) - lbls; + lbls); let mk {pld_name=name;pld_mutable=mut;pld_type=arg;pld_loc=loc; pld_attributes=attrs} = Builtin_attributes.warning_scope attrs @@ -289,80 +282,13 @@ let make_constructor env type_path type_params sargs sret_type = widen z; targs, Some tret_type, args, Some ret_type, params -(* Check that the variable [id] is present in the [univ] list. *) -let check_type_var loc univ id = - let f t = (Btype.repr t).id = id in - if not (List.exists f univ) then raise (Error (loc, Wrong_unboxed_type_float)) (* Check that all the variables found in [ty] are in [univ]. Because [ty] is the argument to an abstract type, the representation of that abstract type could be any subexpression of [ty], in particular any type variable present in [ty]. *) -let rec check_unboxed_abstract_arg loc univ ty = - match ty.desc with - | Tvar _ -> check_type_var loc univ ty.id - | Tarrow (_, t1, t2, _) - | Tfield (_, _, t1, t2) -> - check_unboxed_abstract_arg loc univ t1; - check_unboxed_abstract_arg loc univ t2 - | Ttuple args - | Tconstr (_, args, _) - | Tpackage (_, _, args) -> - List.iter (check_unboxed_abstract_arg loc univ) args - | Tobject (fields, r) -> - check_unboxed_abstract_arg loc univ fields; - begin match !r with - | None -> () - | Some (_, args) -> List.iter (check_unboxed_abstract_arg loc univ) args - end - | Tnil - | Tunivar _ -> () - | Tlink e -> check_unboxed_abstract_arg loc univ e - | Tsubst _ -> assert false - | Tvariant { row_fields; row_more; row_name } -> - List.iter (check_unboxed_abstract_row_field loc univ) row_fields; - check_unboxed_abstract_arg loc univ row_more; - begin match row_name with - | None -> () - | Some (_, args) -> List.iter (check_unboxed_abstract_arg loc univ) args - end - | Tpoly (t, _) -> check_unboxed_abstract_arg loc univ t - -and check_unboxed_abstract_row_field loc univ (_, field) = - match field with - | Rpresent (Some ty) -> check_unboxed_abstract_arg loc univ ty - | Reither (_, args, _, r) -> - List.iter (check_unboxed_abstract_arg loc univ) args; - begin match !r with - | None -> () - | Some f -> check_unboxed_abstract_row_field loc univ ("", f) - end - | Rabsent - | Rpresent None -> () - -(* Check that the argument to a GADT constructor is compatible with unboxing - the type, given the universal parameters of the type. *) -let rec check_unboxed_gadt_arg loc univ env ty = - match get_unboxed_type_representation env ty with - | Some {desc = Tvar _; id} -> check_type_var loc univ id - | Some {desc = Tarrow _ | Ttuple _ | Tpackage _ | Tobject _ | Tnil - | Tvariant _; _} -> - () - (* A comment in [Translcore.transl_exp0] claims the above cannot be - represented by floats. *) - | Some {desc = Tconstr (p, args, _); _} -> - let tydecl = Env.find_type p env in - assert (not tydecl.type_unboxed.unboxed); - if tydecl.type_kind = Type_abstract then - List.iter (check_unboxed_abstract_arg loc univ) args - | Some {desc = Tfield _ | Tlink _ | Tsubst _; _} -> assert false - | Some {desc = Tunivar _; _} -> () - | Some {desc = Tpoly (t2, _); _} -> check_unboxed_gadt_arg loc univ env t2 - | None -> () - (* This case is tricky: the argument is another (or the same) type - in the same recursive definition. In this case we don't have to - check because we will also check that other type for correctness. *) + let transl_declaration env sdecl id = (* Bind type parameters *) @@ -432,6 +358,20 @@ let transl_declaration env sdecl id = | (_,_,loc)::_ -> Location.prerr_warning loc Warnings.Constraint_on_gadt end; + let has_optional attrs = Ext_list.exists attrs (fun ({txt },_) -> txt = "res.optional") in + let scstrs = + Ext_list.map scstrs (fun ({pcd_args} as cstr) -> + match pcd_args with + | Pcstr_tuple _ -> cstr + | Pcstr_record lds -> + {cstr with pcd_args = Pcstr_record (Ext_list.map lds (fun ld -> + if has_optional ld.pld_attributes then + let typ = ld.pld_type in + let typ = {typ with ptyp_desc = Ptyp_constr ({txt = Lident "option"; loc=typ.ptyp_loc}, [typ])} in + {ld with pld_type = typ} + else ld + ))} + ) in let all_constrs = ref StringSet.empty in List.iter (fun {pcd_name = {txt = name}} -> @@ -439,34 +379,12 @@ let transl_declaration env sdecl id = raise(Error(sdecl.ptype_loc, Duplicate_constructor name)); all_constrs := StringSet.add name !all_constrs) scstrs; - if List.length - (List.filter (fun cd -> cd.pcd_args <> Pcstr_tuple []) scstrs) - > (Config.max_tag + 1) then - raise(Error(sdecl.ptype_loc, Too_many_constructors)); let make_cstr scstr = let name = Ident.create scstr.pcd_name.txt in - let targs, tret_type, args, ret_type, cstr_params = + let targs, tret_type, args, ret_type, _cstr_params = make_constructor env (Path.Pident id) params scstr.pcd_args scstr.pcd_res in - if Config.flat_float_array && unbox then begin - (* Cannot unbox a type when the argument can be both float and - non-float because it interferes with the dynamic float array - optimization. This can only happen when the type is a GADT - and the argument is an existential type variable or an - unboxed (or abstract) type constructor applied to some - existential type variable. Of course we also have to rule - out any abstract type constructor applied to anything that - might be an existential type variable. - There is a difficulty with existential variables created - out of thin air (rather than bound by the declaration). - See PR#7511 and GPR#1133 for details. *) - match Datarepr.constructor_existentials args ret_type with - | _, [] -> () - | [argty], _ex -> - check_unboxed_gadt_arg sdecl.ptype_loc cstr_params env argty - | _ -> assert false - end; let tcstr = { cd_id = name; cd_name = scstr.pcd_name; @@ -491,12 +409,26 @@ let transl_declaration env sdecl id = let tcstrs, cstrs = List.split (List.map make_cstr scstrs) in Ttype_variant tcstrs, Type_variant cstrs | Ptype_record lbls -> + let has_optional attrs = Ext_list.exists attrs (fun ({txt },_) -> txt = "res.optional") in + let optionalLabels = + Ext_list.filter_map lbls + (fun lbl -> if has_optional lbl.pld_attributes then Some lbl.pld_name.txt else None) in + let lbls = + if optionalLabels = [] then lbls + else Ext_list.map lbls (fun lbl -> + let typ = lbl.pld_type in + let typ = + if has_optional lbl.pld_attributes then + {typ with ptyp_desc = Ptyp_constr ({txt = Lident "option"; loc=typ.ptyp_loc}, [typ])} + else typ in + {lbl with pld_type = typ }) in let lbls, lbls' = transl_labels env true lbls in let rep = if unbox then Record_unboxed false - else if List.for_all (fun l -> is_float env l.Types.ld_type) lbls' - then Record_float_unused - else Record_regular + else + if optionalLabels <> [] + then Record_optional_labels optionalLabels + else Record_regular in Ttype_record lbls, Type_record(lbls', rep) | Ptype_open -> Ttype_open, Type_open @@ -726,10 +658,10 @@ let check_well_founded env loc path to_check ty = if fini then () else let rec_ok = match ty.desc with - Tconstr(p,_,_) -> - !Clflags.recursive_types && Ctype.is_contractive env p + Tconstr(_p,_,_) -> + false (*!Clflags.recursive_types && Ctype.is_contractive env p*) | Tobject _ | Tvariant _ -> true - | _ -> !Clflags.recursive_types + | _ -> false (* !Clflags.recursive_types*) in let visited' = TypeMap.add ty parents !visited in let arg_exn = @@ -961,7 +893,7 @@ let compute_variance_type env check (required, loc) decl tyl = (* Check propagation from constrained parameters *) let args = Btype.newgenty (Ttuple params) in let fvl = Ctype.free_variables args in - let fvl = List.filter (fun v -> not (List.memq v params)) fvl in + let fvl = Ext_list.filter fvl (fun v -> not (List.memq v params)) in (* If there are no extra variables there is nothing to do *) if fvl = [] then () else let tvl2 = ref TypeMap.empty in @@ -1262,7 +1194,7 @@ let name_recursion sdecl id decl = (* Translate a set of type declarations, mutually recursive or not *) let transl_type_decl env rec_flag sdecl_list = (* Add dummy types for fixed rows *) - let fixed_types = List.filter is_fixed_type sdecl_list in + let fixed_types = Ext_list.filter sdecl_list is_fixed_type in let sdecl_list = List.map (fun sdecl -> @@ -1643,96 +1575,30 @@ let transl_exception env sext = let newenv = Env.add_extension ~check:true ext.ext_id ext.ext_type env in ext, newenv -type native_repr_attribute = - | Native_repr_attr_absent - | Native_repr_attr_present of native_repr_kind -let get_native_repr_attribute attrs ~global_repr = - match - Attr_helper.get_no_payload_attribute ["unboxed"; "ocaml.unboxed"] attrs, - Attr_helper.get_no_payload_attribute ["untagged"; "ocaml.untagged"] attrs, - global_repr - with - | None, None, None -> Native_repr_attr_absent - | None, None, Some repr -> Native_repr_attr_present repr - | Some _, None, None -> Native_repr_attr_present Unboxed - | None, Some _, None -> Native_repr_attr_present Untagged - | Some { Location.loc }, _, _ - | _, Some { Location.loc }, _ -> - raise (Error (loc, Multiple_native_repr_attributes)) - -let native_repr_of_type env kind ty = - match kind, (Ctype.expand_head_opt env ty).desc with - | Untagged, Tconstr (path, _, _) when Path.same path Predef.path_int -> - Some Untagged_int - | Unboxed, Tconstr (path, _, _) when Path.same path Predef.path_float -> - Some Unboxed_float - | Unboxed, Tconstr (path, _, _) when Path.same path Predef.path_int32 -> - Some (Unboxed_integer Pint32) - | Unboxed, Tconstr (path, _, _) when Path.same path Predef.path_int64 -> - Some (Unboxed_integer Pint64) - | Unboxed, Tconstr (path, _, _) when Path.same path Predef.path_nativeint -> - Some (Unboxed_integer Pnativeint) - | _ -> - None - -(* Raises an error when [core_type] contains an [@unboxed] or [@untagged] - attribute in a strict sub-term. *) -let error_if_has_deep_native_repr_attributes core_type = - let open Ast_iterator in - let this_iterator = - { default_iterator with typ = fun iterator core_type -> - begin - match - get_native_repr_attribute core_type.ptyp_attributes ~global_repr:None - with - | Native_repr_attr_present kind -> - raise (Error (core_type.ptyp_loc, - Deep_unbox_or_untag_attribute kind)) - | Native_repr_attr_absent -> () - end; - default_iterator.typ iterator core_type } - in - default_iterator.typ this_iterator core_type - -let make_native_repr env core_type ty ~global_repr = - error_if_has_deep_native_repr_attributes core_type; - match get_native_repr_attribute core_type.ptyp_attributes ~global_repr with - | Native_repr_attr_absent -> - Same_as_ocaml_repr - | Native_repr_attr_present kind -> - begin match native_repr_of_type env kind ty with - | None -> - raise (Error (core_type.ptyp_loc, Cannot_unbox_or_untag_type kind)) - | Some repr -> repr - end -let rec parse_native_repr_attributes env core_type ty ~global_repr = - match core_type.ptyp_desc, (Ctype.repr ty).desc, - get_native_repr_attribute core_type.ptyp_attributes ~global_repr:None +let rec parse_native_repr_attributes env core_type ty = + match core_type.ptyp_desc, (Ctype.repr ty).desc with - | Ptyp_arrow _, Tarrow _, Native_repr_attr_present kind -> - raise (Error (core_type.ptyp_loc, Cannot_unbox_or_untag_type kind)) - | Ptyp_arrow (_, ct1, ct2), Tarrow (_, t1, t2, _), _ -> - let repr_arg = make_native_repr env ct1 t1 ~global_repr in + | Ptyp_arrow (_, _, ct2), Tarrow (_, _, t2, _) -> + let repr_arg = Same_as_ocaml_repr in let repr_args, repr_res = - parse_native_repr_attributes env ct2 t2 ~global_repr + parse_native_repr_attributes env ct2 t2 in (repr_arg :: repr_args, repr_res) - | Ptyp_arrow _, _, _ | _, Tarrow _, _ -> assert false - | _ -> ([], make_native_repr env core_type ty ~global_repr) + | Ptyp_arrow _, _ | _, Tarrow _ -> assert false + | _ -> ([], Same_as_ocaml_repr) -let check_unboxable env loc ty = - let ty = Ctype.repr (Ctype.expand_head_opt env ty) in - try match ty.desc with - | Tconstr (p, _, _) -> - let tydecl = Env.find_type p env in - if tydecl.type_unboxed.unboxed then - Location.prerr_warning loc - (Warnings.Unboxable_type_in_prim_decl (Path.name p)) - | _ -> () - with Not_found -> () +let parse_native_repr_attributes env core_type ty = + match core_type.ptyp_desc, (Ctype.repr ty).desc + with + | Ptyp_constr ({txt = Lident "function$"}, [{ptyp_desc = Ptyp_arrow (_, _, ct2)}; _]), + Tconstr (Pident {name = "function$"},[{desc = Tarrow (_, _, t2, _)}; _],_) -> + let repr_args, repr_res = parse_native_repr_attributes env ct2 t2 in + let native_repr_args = Same_as_ocaml_repr :: repr_args in + (native_repr_args, repr_res) + | _ -> parse_native_repr_attributes env core_type ty (* Translate a value declaration *) let transl_value_decl env loc valdecl = @@ -1746,29 +1612,38 @@ let transl_value_decl env loc valdecl = | [] -> raise (Error(valdecl.pval_loc, Val_in_structure)) | _ -> - let global_repr = - match - get_native_repr_attribute valdecl.pval_attributes ~global_repr:None - with - | Native_repr_attr_present repr -> Some repr - | Native_repr_attr_absent -> None - in let native_repr_args, native_repr_res = - parse_native_repr_attributes env valdecl.pval_type ty ~global_repr + let rec scann (attrs : Parsetree.attributes) = + match attrs with + | ({txt = "internal.arity";_}, + PStr [ {pstr_desc = Pstr_eval + ( + ({pexp_desc = Pexp_constant (Pconst_integer (i,_))} : + Parsetree.expression) ,_)}]) :: _ -> + Some (int_of_string i) + | _ :: rest -> scann rest + | [] -> None + and make n = + if n = 0 then [] + else Primitive.Same_as_ocaml_repr :: make (n - 1) + in + match scann valdecl.pval_attributes with + | None -> parse_native_repr_attributes env valdecl.pval_type ty + | Some x -> make x , Primitive.Same_as_ocaml_repr in let prim = Primitive.parse_declaration valdecl ~native_repr_args ~native_repr_res in + let prim_native_name = prim.prim_native_name in if prim.prim_arity = 0 && - (prim.prim_name = "" || prim.prim_name.[0] <> '%') then + not ( String.length prim_native_name >= 20 && + String.unsafe_get prim_native_name 0 = '\132' && + String.unsafe_get prim_native_name 1 = '\149' + ) && + (prim.prim_name = "" || (prim.prim_name.[0] <> '%' && prim.prim_name.[0] <> '#')) then raise(Error(valdecl.pval_type.ptyp_loc, Null_arity_external)); - if !Clflags.native_code - && prim.prim_arity > 5 - && prim.prim_native_name = "" - then raise(Error(valdecl.pval_type.ptyp_loc, Missing_native_external)); - Btype.iter_type_expr (check_unboxable env loc) ty; { val_type = ty; val_kind = Val_prim prim; Types.val_loc = loc; val_attributes = valdecl.pval_attributes } in @@ -1972,10 +1847,6 @@ let report_error ppf = function fprintf ppf "A type parameter occurs several times" | Duplicate_constructor s -> fprintf ppf "Two constructors are named %s" s - | Too_many_constructors -> - fprintf ppf - "@[Too many non-constant constructors@ -- maximum is %i %s@]" - (Config.max_tag + 1) "non-constant constructors" | Duplicate_label s -> fprintf ppf "Two labels are named %s" s | Recursive_abbrev s -> @@ -2016,10 +1887,6 @@ let report_error ppf = function fprintf ppf "but is used here with type") | Null_arity_external -> fprintf ppf "External identifiers must be functions" - | Missing_native_external -> - fprintf ppf "@[An external function with more than 5 arguments \ - requires a second stub function@ \ - for native-code compilation@]" | Unbound_type_var (ty, decl) -> fprintf ppf "A type variable is unbound in this type declaration"; let ty = Ctype.repr ty in @@ -2126,29 +1993,12 @@ let report_error ppf = function "cannot be checked" | Val_in_structure -> fprintf ppf "Value declarations are only allowed in signatures" - | Multiple_native_repr_attributes -> - fprintf ppf "Too many [@@unboxed]/[@@untagged] attributes" - | Cannot_unbox_or_untag_type Unboxed -> - fprintf ppf "Don't know how to unbox this type. Only float, int32, \ - int64 and nativeint can be unboxed" - | Cannot_unbox_or_untag_type Untagged -> - fprintf ppf "Don't know how to untag this type. Only int \ - can be untagged" - | Deep_unbox_or_untag_attribute kind -> - fprintf ppf - "The attribute '%s' should be attached to a direct argument or \ - result of the primitive, it should not occur deeply into its type" - (match kind with Unboxed -> "@unboxed" | Untagged -> "@untagged") | Bad_immediate_attribute -> fprintf ppf "@[%s@ %s@]" "Types marked with the immediate attribute must be" "non-pointer types like int or bool" | Bad_unboxed_attribute msg -> fprintf ppf "@[This type cannot be unboxed because@ %s.@]" msg - | Wrong_unboxed_type_float -> - fprintf ppf "@[This type cannot be unboxed because@ \ - it might contain both float and non-float values.@ \ - You should annotate it with [%@%@ocaml.boxed].@]" | Boxed_and_unboxed -> fprintf ppf "@[A type cannot be boxed and unboxed at the same time.@]" | Nonrec_gadt -> diff --git a/analysis/vendor/compiler-libs-406/typedecl.mli b/analysis/vendor/ml/typedecl.mli similarity index 66% rename from analysis/vendor/compiler-libs-406/typedecl.mli rename to analysis/vendor/ml/typedecl.mli index 1c687cd04..03f1b8bab 100644 --- a/analysis/vendor/compiler-libs-406/typedecl.mli +++ b/analysis/vendor/ml/typedecl.mli @@ -65,41 +65,7 @@ val get_unboxed_type_representation: Env.t -> type_expr -> type_expr option type native_repr_kind = Unboxed | Untagged -type error = - Repeated_parameter - | Duplicate_constructor of string - | Too_many_constructors - | Duplicate_label of string - | Recursive_abbrev of string - | Cycle_in_def of string * type_expr - | Definition_mismatch of type_expr * Includecore.type_mismatch list - | Constraint_failed of type_expr * type_expr - | Inconsistent_constraint of Env.t * (type_expr * type_expr) list - | Type_clash of Env.t * (type_expr * type_expr) list - | Parameters_differ of Path.t * type_expr * type_expr - | Null_arity_external - | Missing_native_external - | Unbound_type_var of type_expr * type_declaration - | Cannot_extend_private_type of Path.t - | Not_extensible_type of Path.t - | Extension_mismatch of Path.t * Includecore.type_mismatch list - | Rebind_wrong_type of Longident.t * Env.t * (type_expr * type_expr) list - | Rebind_mismatch of Longident.t * Path.t * Path.t - | Rebind_private of Longident.t - | Bad_variance of int * (bool*bool*bool) * (bool*bool*bool) - | Unavailable_type_constructor of Path.t - | Bad_fixed_type of string - | Unbound_type_var_ext of type_expr * extension_constructor - | Varying_anonymous - | Val_in_structure - | Multiple_native_repr_attributes - | Cannot_unbox_or_untag_type of native_repr_kind - | Deep_unbox_or_untag_attribute of native_repr_kind - | Bad_immediate_attribute - | Bad_unboxed_attribute of string - | Wrong_unboxed_type_float - | Boxed_and_unboxed - | Nonrec_gadt +type error exception Error of Location.t * error diff --git a/analysis/vendor/compiler-libs-406/typedtree.ml b/analysis/vendor/ml/typedtree.ml similarity index 88% rename from analysis/vendor/compiler-libs-406/typedtree.ml rename to analysis/vendor/ml/typedtree.ml index 4cc996432..5744f0dc6 100644 --- a/analysis/vendor/compiler-libs-406/typedtree.ml +++ b/analysis/vendor/ml/typedtree.ml @@ -102,22 +102,21 @@ and expression_desc = Ident.t * Parsetree.pattern * expression * expression * direction_flag * expression | Texp_send of expression * meth * expression option - | Texp_new of Path.t * Longident.t loc * Types.class_declaration - | Texp_instvar of Path.t * Path.t * string loc - | Texp_setinstvar of Path.t * Path.t * string loc * expression - | Texp_override of Path.t * (Path.t * string loc * expression) list + | Texp_new of unit + | Texp_instvar of unit + | Texp_setinstvar of unit + | Texp_override of unit | Texp_letmodule of Ident.t * string loc * module_expr * expression | Texp_letexception of extension_constructor * expression | Texp_assert of expression | Texp_lazy of expression - | Texp_object of class_structure * string list + | Texp_object of unit | Texp_pack of module_expr | Texp_unreachable | Texp_extension_constructor of Longident.t loc * Path.t and meth = Tmeth_name of string - | Tmeth_val of Ident.t and case = { @@ -132,58 +131,9 @@ and record_label_definition = (* Value expressions for the class language *) -and class_expr = - { - cl_desc: class_expr_desc; - cl_loc: Location.t; - cl_type: Types.class_type; - cl_env: Env.t; - cl_attributes: attribute list; - } -and class_expr_desc = - Tcl_ident of Path.t * Longident.t loc * core_type list - | Tcl_structure of class_structure - | Tcl_fun of - arg_label * pattern * (Ident.t * string loc * expression) list - * class_expr * partial - | Tcl_apply of class_expr * (arg_label * expression option) list - | Tcl_let of rec_flag * value_binding list * - (Ident.t * string loc * expression) list * class_expr - | Tcl_constraint of - class_expr * class_type option * string list * string list * Concr.t - (* Visible instance variables, methods and concrete methods *) - | Tcl_open of override_flag * Path.t * Longident.t loc * Env.t * class_expr - -and class_structure = - { - cstr_self: pattern; - cstr_fields: class_field list; - cstr_type: Types.class_signature; - cstr_meths: Ident.t Meths.t; - } -and class_field = - { - cf_desc: class_field_desc; - cf_loc: Location.t; - cf_attributes: attribute list; - } -and class_field_kind = - | Tcfk_virtual of core_type - | Tcfk_concrete of override_flag * expression - -and class_field_desc = - Tcf_inherit of - override_flag * class_expr * string option * (string * Ident.t) list * - (string * Ident.t) list - (* Inherited instance variables and concrete methods *) - | Tcf_val of string loc * mutable_flag * Ident.t * class_field_kind * bool - | Tcf_method of string loc * private_flag * class_field_kind - | Tcf_constraint of core_type * core_type - | Tcf_initializer of expression - | Tcf_attribute of attribute (* Value expressions for the module language *) @@ -231,7 +181,7 @@ and structure_item_desc = | Tstr_recmodule of module_binding list | Tstr_modtype of module_type_declaration | Tstr_open of open_description - | Tstr_class of (class_declaration * string list) list + | Tstr_class of unit | Tstr_class_type of (Ident.t * string loc * class_type_declaration) list | Tstr_include of include_declaration | Tstr_attribute of attribute @@ -256,7 +206,8 @@ and value_binding = and module_coercion = Tcoerce_none | Tcoerce_structure of (int * module_coercion) list * - (Ident.t * int * module_coercion) list + (Ident.t * int * module_coercion) list * + string list (* runtime fields *) | Tcoerce_functor of module_coercion * module_coercion | Tcoerce_primitive of primitive_coercion | Tcoerce_alias of Path.t * module_coercion @@ -284,6 +235,7 @@ and primitive_coercion = pc_type: type_expr; pc_env: Env.t; pc_loc : Location.t; + pc_id : Ident.t; (*RE:Added *) } and signature = { @@ -307,7 +259,7 @@ and signature_item_desc = | Tsig_modtype of module_type_declaration | Tsig_open of open_description | Tsig_include of include_description - | Tsig_class of class_description list + | Tsig_class of unit | Tsig_class_type of class_type_declaration list | Tsig_attribute of attribute @@ -504,8 +456,6 @@ and class_type_field_desc = | Tctf_constraint of (core_type * core_type) | Tctf_attribute of attribute -and class_declaration = - class_expr class_infos and class_description = class_type class_infos diff --git a/analysis/vendor/compiler-libs-406/typedtree.mli b/analysis/vendor/ml/typedtree.mli similarity index 88% rename from analysis/vendor/compiler-libs-406/typedtree.mli rename to analysis/vendor/ml/typedtree.mli index 2e89ed523..a4559f361 100644 --- a/analysis/vendor/compiler-libs-406/typedtree.mli +++ b/analysis/vendor/ml/typedtree.mli @@ -217,22 +217,21 @@ and expression_desc = Ident.t * Parsetree.pattern * expression * expression * direction_flag * expression | Texp_send of expression * meth * expression option - | Texp_new of Path.t * Longident.t loc * Types.class_declaration - | Texp_instvar of Path.t * Path.t * string loc - | Texp_setinstvar of Path.t * Path.t * string loc * expression - | Texp_override of Path.t * (Path.t * string loc * expression) list + | Texp_new of unit + | Texp_instvar of unit + | Texp_setinstvar of unit + | Texp_override of unit | Texp_letmodule of Ident.t * string loc * module_expr * expression | Texp_letexception of extension_constructor * expression | Texp_assert of expression | Texp_lazy of expression - | Texp_object of class_structure * string list + | Texp_object of unit | Texp_pack of module_expr | Texp_unreachable | Texp_extension_constructor of Longident.t loc * Path.t and meth = Tmeth_name of string - | Tmeth_val of Ident.t and case = { @@ -245,60 +244,7 @@ and record_label_definition = | Kept of Types.type_expr | Overridden of Longident.t loc * expression -(* Value expressions for the class language *) -and class_expr = - { - cl_desc: class_expr_desc; - cl_loc: Location.t; - cl_type: Types.class_type; - cl_env: Env.t; - cl_attributes: attributes; - } - -and class_expr_desc = - Tcl_ident of Path.t * Longident.t loc * core_type list - | Tcl_structure of class_structure - | Tcl_fun of - arg_label * pattern * (Ident.t * string loc * expression) list - * class_expr * partial - | Tcl_apply of class_expr * (arg_label * expression option) list - | Tcl_let of rec_flag * value_binding list * - (Ident.t * string loc * expression) list * class_expr - | Tcl_constraint of - class_expr * class_type option * string list * string list * Concr.t - (* Visible instance variables, methods and concrete methods *) - | Tcl_open of override_flag * Path.t * Longident.t loc * Env.t * class_expr - -and class_structure = - { - cstr_self: pattern; - cstr_fields: class_field list; - cstr_type: Types.class_signature; - cstr_meths: Ident.t Meths.t; - } - -and class_field = - { - cf_desc: class_field_desc; - cf_loc: Location.t; - cf_attributes: attributes; - } - -and class_field_kind = - | Tcfk_virtual of core_type - | Tcfk_concrete of override_flag * expression - -and class_field_desc = - Tcf_inherit of - override_flag * class_expr * string option * (string * Ident.t) list * - (string * Ident.t) list - (* Inherited instance variables and concrete methods *) - | Tcf_val of string loc * mutable_flag * Ident.t * class_field_kind * bool - | Tcf_method of string loc * private_flag * class_field_kind - | Tcf_constraint of core_type * core_type - | Tcf_initializer of expression - | Tcf_attribute of attribute (* Value expressions for the module language *) @@ -352,7 +298,7 @@ and structure_item_desc = | Tstr_recmodule of module_binding list | Tstr_modtype of module_type_declaration | Tstr_open of open_description - | Tstr_class of (class_declaration * string list) list + | Tstr_class of unit | Tstr_class_type of (Ident.t * string loc * class_type_declaration) list | Tstr_include of include_declaration | Tstr_attribute of attribute @@ -377,7 +323,8 @@ and value_binding = and module_coercion = Tcoerce_none | Tcoerce_structure of (int * module_coercion) list * - (Ident.t * int * module_coercion) list + (Ident.t * int * module_coercion) list * + string list (* runtime fields *) | Tcoerce_functor of module_coercion * module_coercion | Tcoerce_primitive of primitive_coercion | Tcoerce_alias of Path.t * module_coercion @@ -404,6 +351,7 @@ and primitive_coercion = pc_type: type_expr; pc_env: Env.t; pc_loc : Location.t; + pc_id : Ident.t; } and signature = { @@ -427,7 +375,7 @@ and signature_item_desc = | Tsig_modtype of module_type_declaration | Tsig_open of open_description | Tsig_include of include_description - | Tsig_class of class_description list + | Tsig_class of unit | Tsig_class_type of class_type_declaration list | Tsig_attribute of attribute @@ -626,8 +574,6 @@ and class_type_field_desc = | Tctf_constraint of (core_type * core_type) | Tctf_attribute of attribute -and class_declaration = - class_expr class_infos and class_description = class_type class_infos @@ -658,8 +604,6 @@ val map_pattern_desc: (pattern -> pattern) -> pattern_desc -> pattern_desc val let_bound_idents: value_binding list -> Ident.t list val rev_let_bound_idents: value_binding list -> Ident.t list -val let_bound_idents_with_loc: - value_binding list -> (Ident.t * string loc) list (** Alpha conversion of patterns *) val alpha_pat: (Ident.t * Ident.t) list -> pattern -> pattern diff --git a/analysis/vendor/compiler-libs-406/typedtreeIter.ml b/analysis/vendor/ml/typedtreeIter.ml similarity index 84% rename from analysis/vendor/compiler-libs-406/typedtreeIter.ml rename to analysis/vendor/ml/typedtreeIter.ml index a3be8d3be..779a7c927 100644 --- a/analysis/vendor/compiler-libs-406/typedtreeIter.ml +++ b/analysis/vendor/ml/typedtreeIter.ml @@ -37,16 +37,13 @@ module type IteratorArgument = sig val enter_module_type : module_type -> unit val enter_module_expr : module_expr -> unit val enter_with_constraint : with_constraint -> unit - val enter_class_expr : class_expr -> unit val enter_class_signature : class_signature -> unit - val enter_class_declaration : class_declaration -> unit + val enter_class_description : class_description -> unit val enter_class_type_declaration : class_type_declaration -> unit val enter_class_type : class_type -> unit val enter_class_type_field : class_type_field -> unit val enter_core_type : core_type -> unit - val enter_class_structure : class_structure -> unit - val enter_class_field : class_field -> unit val enter_structure_item : structure_item -> unit @@ -63,16 +60,13 @@ module type IteratorArgument = sig val leave_module_type : module_type -> unit val leave_module_expr : module_expr -> unit val leave_with_constraint : with_constraint -> unit - val leave_class_expr : class_expr -> unit val leave_class_signature : class_signature -> unit - val leave_class_declaration : class_declaration -> unit + val leave_class_description : class_description -> unit val leave_class_type_declaration : class_type_declaration -> unit val leave_class_type : class_type -> unit val leave_class_type_field : class_type_field -> unit val leave_core_type : core_type -> unit - val leave_class_structure : class_structure -> unit - val leave_class_field : class_field -> unit val leave_structure_item : structure_item -> unit val enter_bindings : rec_flag -> unit @@ -96,7 +90,6 @@ module MakeIterator(Iter : IteratorArgument) : sig val iter_expression : expression -> unit val iter_module_type : module_type -> unit val iter_pattern : pattern -> unit - val iter_class_expr : class_expr -> unit end = struct @@ -146,8 +139,7 @@ module MakeIterator(Iter : IteratorArgument) : sig | Tstr_recmodule list -> List.iter iter_module_binding list | Tstr_modtype mtd -> iter_module_type_declaration mtd | Tstr_open _ -> () - | Tstr_class list -> - List.iter (fun (ci, _) -> iter_class_declaration ci) list + | Tstr_class () -> () | Tstr_class_type list -> List.iter (fun (_, _, ct) -> iter_class_type_declaration ct) @@ -335,14 +327,10 @@ module MakeIterator(Iter : IteratorArgument) : sig None -> () | Some exp -> iter_expression exp end - | Texp_new _ -> () - | Texp_instvar _ -> () - | Texp_setinstvar (_, _, _, exp) -> - iter_expression exp - | Texp_override (_, list) -> - List.iter (fun (_path, _, exp) -> - iter_expression exp - ) list + | Texp_new _ + | Texp_instvar _ + | Texp_setinstvar _ + | Texp_override _ -> () | Texp_letmodule (_id, _, mexpr, exp) -> iter_module_expr mexpr; iter_expression exp @@ -351,8 +339,8 @@ module MakeIterator(Iter : IteratorArgument) : sig iter_expression exp | Texp_assert exp -> iter_expression exp | Texp_lazy exp -> iter_expression exp - | Texp_object (cl, _) -> - iter_class_structure cl + | Texp_object () -> + () | Texp_pack (mexpr) -> iter_module_expr mexpr | Texp_unreachable -> @@ -392,8 +380,7 @@ module MakeIterator(Iter : IteratorArgument) : sig iter_module_type_declaration mtd | Tsig_open _ -> () | Tsig_include incl -> iter_module_type incl.incl_mod - | Tsig_class list -> - List.iter iter_class_description list + | Tsig_class () -> () | Tsig_class_type list -> List.iter iter_class_type_declaration list | Tsig_attribute _ -> () @@ -409,17 +396,7 @@ module MakeIterator(Iter : IteratorArgument) : sig end; Iter.leave_module_type_declaration mtd - and iter_class_declaration cd = - Iter.enter_class_declaration cd; - List.iter iter_type_parameter cd.ci_params; - iter_class_expr cd.ci_expr; - Iter.leave_class_declaration cd; - and iter_class_description cd = - Iter.enter_class_description cd; - List.iter iter_type_parameter cd.ci_params; - iter_class_type cd.ci_expr; - Iter.leave_class_description cd; and iter_class_type_declaration cd = Iter.enter_class_type_declaration cd; @@ -480,42 +457,6 @@ module MakeIterator(Iter : IteratorArgument) : sig end; Iter.leave_module_expr mexpr; - and iter_class_expr cexpr = - Iter.enter_class_expr cexpr; - begin - match cexpr.cl_desc with - | Tcl_constraint (cl, None, _, _, _ ) -> - iter_class_expr cl; - | Tcl_structure clstr -> iter_class_structure clstr - | Tcl_fun (_label, pat, priv, cl, _partial) -> - iter_pattern pat; - List.iter (fun (_id, _, exp) -> iter_expression exp) priv; - iter_class_expr cl - - | Tcl_apply (cl, args) -> - iter_class_expr cl; - List.iter (fun (_label, expo) -> - match expo with - None -> () - | Some exp -> iter_expression exp - ) args - - | Tcl_let (rec_flat, bindings, ivars, cl) -> - iter_bindings rec_flat bindings; - List.iter (fun (_id, _, exp) -> iter_expression exp) ivars; - iter_class_expr cl - - | Tcl_constraint (cl, Some clty, _vals, _meths, _concrs) -> - iter_class_expr cl; - iter_class_type clty - - | Tcl_ident (_, _, tyl) -> - List.iter iter_core_type tyl - - | Tcl_open (_, _, _, _, e) -> - iter_class_expr e - end; - Iter.leave_class_expr cexpr; and iter_class_type ct = Iter.enter_class_type ct; @@ -580,13 +521,6 @@ module MakeIterator(Iter : IteratorArgument) : sig end; Iter.leave_core_type ct - and iter_class_structure cs = - Iter.enter_class_structure cs; - iter_pattern cs.cstr_self; - List.iter iter_class_field cs.cstr_fields; - Iter.leave_class_structure cs; - - and iter_row_field rf = match rf with Ttag (_label, _attrs, _bool, list) -> @@ -597,28 +531,6 @@ module MakeIterator(Iter : IteratorArgument) : sig match ofield with OTtag (_, _, ct) | OTinherit ct -> iter_core_type ct - and iter_class_field cf = - Iter.enter_class_field cf; - begin - match cf.cf_desc with - Tcf_inherit (_ovf, cl, _super, _vals, _meths) -> - iter_class_expr cl - | Tcf_constraint (cty, cty') -> - iter_core_type cty; - iter_core_type cty' - | Tcf_val (_lab, _, _, Tcfk_virtual cty, _) -> - iter_core_type cty - | Tcf_val (_lab, _, _, Tcfk_concrete (_, exp), _) -> - iter_expression exp - | Tcf_method (_lab, _, Tcfk_virtual cty) -> - iter_core_type cty - | Tcf_method (_lab, _, Tcfk_concrete (_, exp)) -> - iter_expression exp - | Tcf_initializer exp -> - iter_expression exp - | Tcf_attribute _ -> () - end; - Iter.leave_class_field cf; end module DefaultIteratorArgument = struct @@ -636,16 +548,13 @@ module DefaultIteratorArgument = struct let enter_module_type _ = () let enter_module_expr _ = () let enter_with_constraint _ = () - let enter_class_expr _ = () let enter_class_signature _ = () - let enter_class_declaration _ = () + let enter_class_description _ = () let enter_class_type_declaration _ = () let enter_class_type _ = () let enter_class_type_field _ = () let enter_core_type _ = () - let enter_class_structure _ = () - let enter_class_field _ = () let enter_structure_item _ = () @@ -662,16 +571,13 @@ module DefaultIteratorArgument = struct let leave_module_type _ = () let leave_module_expr _ = () let leave_with_constraint _ = () - let leave_class_expr _ = () let leave_class_signature _ = () - let leave_class_declaration _ = () + let leave_class_description _ = () let leave_class_type_declaration _ = () let leave_class_type _ = () let leave_class_type_field _ = () let leave_core_type _ = () - let leave_class_structure _ = () - let leave_class_field _ = () let leave_structure_item _ = () let enter_binding _ = () diff --git a/analysis/vendor/compiler-libs-406/typedtreeIter.mli b/analysis/vendor/ml/typedtreeIter.mli similarity index 89% rename from analysis/vendor/compiler-libs-406/typedtreeIter.mli rename to analysis/vendor/ml/typedtreeIter.mli index 53aa54c12..b215c20d0 100644 --- a/analysis/vendor/compiler-libs-406/typedtreeIter.mli +++ b/analysis/vendor/ml/typedtreeIter.mli @@ -31,16 +31,12 @@ module type IteratorArgument = sig val enter_module_type : module_type -> unit val enter_module_expr : module_expr -> unit val enter_with_constraint : with_constraint -> unit - val enter_class_expr : class_expr -> unit val enter_class_signature : class_signature -> unit - val enter_class_declaration : class_declaration -> unit val enter_class_description : class_description -> unit val enter_class_type_declaration : class_type_declaration -> unit val enter_class_type : class_type -> unit val enter_class_type_field : class_type_field -> unit val enter_core_type : core_type -> unit - val enter_class_structure : class_structure -> unit - val enter_class_field : class_field -> unit val enter_structure_item : structure_item -> unit @@ -57,16 +53,12 @@ module type IteratorArgument = sig val leave_module_type : module_type -> unit val leave_module_expr : module_expr -> unit val leave_with_constraint : with_constraint -> unit - val leave_class_expr : class_expr -> unit val leave_class_signature : class_signature -> unit - val leave_class_declaration : class_declaration -> unit val leave_class_description : class_description -> unit val leave_class_type_declaration : class_type_declaration -> unit val leave_class_type : class_type -> unit val leave_class_type_field : class_type_field -> unit val leave_core_type : core_type -> unit - val leave_class_structure : class_structure -> unit - val leave_class_field : class_field -> unit val leave_structure_item : structure_item -> unit val enter_bindings : rec_flag -> unit @@ -81,7 +73,7 @@ module type IteratorArgument = sig end -module MakeIterator : +module [@warning "-67"] MakeIterator : functor (Iter : IteratorArgument) -> sig val iter_structure : structure -> unit @@ -91,7 +83,6 @@ module MakeIterator : val iter_expression : expression -> unit val iter_module_type : module_type -> unit val iter_pattern : pattern -> unit - val iter_class_expr : class_expr -> unit end module DefaultIteratorArgument : IteratorArgument diff --git a/analysis/vendor/ml/typedtreeMap.ml b/analysis/vendor/ml/typedtreeMap.ml new file mode 100644 index 000000000..7d4119b33 --- /dev/null +++ b/analysis/vendor/ml/typedtreeMap.ml @@ -0,0 +1,633 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Fabrice Le Fessant, INRIA Saclay *) +(* *) +(* Copyright 2012 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +open Typedtree + +module type MapArgument = sig + val enter_structure : structure -> structure + val enter_value_description : value_description -> value_description + val enter_type_declaration : type_declaration -> type_declaration + val enter_type_extension : type_extension -> type_extension + val enter_extension_constructor : + extension_constructor -> extension_constructor + val enter_pattern : pattern -> pattern + val enter_expression : expression -> expression + val enter_package_type : package_type -> package_type + val enter_signature : signature -> signature + val enter_signature_item : signature_item -> signature_item + val enter_module_type_declaration : + module_type_declaration -> module_type_declaration + val enter_module_type : module_type -> module_type + val enter_module_expr : module_expr -> module_expr + val enter_with_constraint : with_constraint -> with_constraint + val enter_class_signature : class_signature -> class_signature + + val enter_class_description : class_description -> class_description + val enter_class_type_declaration : + class_type_declaration -> class_type_declaration + val enter_class_type : class_type -> class_type + val enter_class_type_field : class_type_field -> class_type_field + val enter_core_type : core_type -> core_type + val enter_structure_item : structure_item -> structure_item + + val leave_structure : structure -> structure + val leave_value_description : value_description -> value_description + val leave_type_declaration : type_declaration -> type_declaration + val leave_type_extension : type_extension -> type_extension + val leave_extension_constructor : + extension_constructor -> extension_constructor + val leave_pattern : pattern -> pattern + val leave_expression : expression -> expression + val leave_package_type : package_type -> package_type + val leave_signature : signature -> signature + val leave_signature_item : signature_item -> signature_item + val leave_module_type_declaration : + module_type_declaration -> module_type_declaration + val leave_module_type : module_type -> module_type + val leave_module_expr : module_expr -> module_expr + val leave_with_constraint : with_constraint -> with_constraint + val leave_class_signature : class_signature -> class_signature + + val leave_class_description : class_description -> class_description + val leave_class_type_declaration : + class_type_declaration -> class_type_declaration + val leave_class_type : class_type -> class_type + val leave_class_type_field : class_type_field -> class_type_field + val leave_core_type : core_type -> core_type + val leave_structure_item : structure_item -> structure_item + +end + + +module MakeMap(Map : MapArgument) = struct + + open Misc + + let rec map_structure str = + let str = Map.enter_structure str in + let str_items = List.map map_structure_item str.str_items in + Map.leave_structure { str with str_items = str_items } + + and map_binding vb = + { + vb_pat = map_pattern vb.vb_pat; + vb_expr = map_expression vb.vb_expr; + vb_attributes = vb.vb_attributes; + vb_loc = vb.vb_loc; + } + + and map_bindings list = + List.map map_binding list + + and map_case {c_lhs; c_guard; c_rhs} = + { + c_lhs = map_pattern c_lhs; + c_guard = may_map map_expression c_guard; + c_rhs = map_expression c_rhs; + } + + and map_cases list = + List.map map_case list + + and map_structure_item item = + let item = Map.enter_structure_item item in + let str_desc = + match item.str_desc with + Tstr_eval (exp, attrs) -> Tstr_eval (map_expression exp, attrs) + | Tstr_value (rec_flag, list) -> + Tstr_value (rec_flag, map_bindings list) + | Tstr_primitive vd -> + Tstr_primitive (map_value_description vd) + | Tstr_type (rf, list) -> + Tstr_type (rf, List.map map_type_declaration list) + | Tstr_typext tyext -> + Tstr_typext (map_type_extension tyext) + | Tstr_exception ext -> + Tstr_exception (map_extension_constructor ext) + | Tstr_module x -> + Tstr_module (map_module_binding x) + | Tstr_recmodule list -> + let list = List.map map_module_binding list in + Tstr_recmodule list + | Tstr_modtype mtd -> + Tstr_modtype (map_module_type_declaration mtd) + | Tstr_open od -> Tstr_open od + | Tstr_class () -> assert false + | Tstr_class_type list -> + let list = + List.map + (fun (id, name, ct) -> + id, name, map_class_type_declaration ct) + list + in + Tstr_class_type list + | Tstr_include incl -> + Tstr_include {incl with incl_mod = map_module_expr incl.incl_mod} + | Tstr_attribute x -> Tstr_attribute x + in + Map.leave_structure_item { item with str_desc = str_desc} + + and map_module_binding x = + {x with mb_expr = map_module_expr x.mb_expr} + + and map_value_description v = + let v = Map.enter_value_description v in + let val_desc = map_core_type v.val_desc in + Map.leave_value_description { v with val_desc = val_desc } + + and map_type_declaration decl = + let decl = Map.enter_type_declaration decl in + let typ_params = List.map map_type_parameter decl.typ_params in + let typ_cstrs = List.map (fun (ct1, ct2, loc) -> + (map_core_type ct1, + map_core_type ct2, + loc) + ) decl.typ_cstrs in + let typ_kind = match decl.typ_kind with + Ttype_abstract -> Ttype_abstract + | Ttype_variant list -> + let list = List.map map_constructor_declaration list in + Ttype_variant list + | Ttype_record list -> + let list = + List.map + (fun ld -> + {ld with ld_type = map_core_type ld.ld_type} + ) list + in + Ttype_record list + | Ttype_open -> Ttype_open + in + let typ_manifest = may_map map_core_type decl.typ_manifest in + Map.leave_type_declaration { decl with typ_params = typ_params; + typ_cstrs = typ_cstrs; typ_kind = typ_kind; typ_manifest = typ_manifest } + + and map_type_parameter (ct, v) = (map_core_type ct, v) + + and map_constructor_arguments = function + | Cstr_tuple l -> + Cstr_tuple (List.map map_core_type l) + | Cstr_record l -> + Cstr_record + (List.map (fun ld -> {ld with ld_type = map_core_type ld.ld_type}) + l) + + and map_constructor_declaration cd = + let cd_args = map_constructor_arguments cd.cd_args in + {cd with cd_args; + cd_res = may_map map_core_type cd.cd_res + } + + and map_type_extension tyext = + let tyext = Map.enter_type_extension tyext in + let tyext_params = List.map map_type_parameter tyext.tyext_params in + let tyext_constructors = + List.map map_extension_constructor tyext.tyext_constructors + in + Map.leave_type_extension { tyext with tyext_params = tyext_params; + tyext_constructors = tyext_constructors } + + and map_extension_constructor ext = + let ext = Map.enter_extension_constructor ext in + let ext_kind = match ext.ext_kind with + Text_decl(args, ret) -> + let args = map_constructor_arguments args in + let ret = may_map map_core_type ret in + Text_decl(args, ret) + | Text_rebind(p, lid) -> Text_rebind(p, lid) + in + Map.leave_extension_constructor {ext with ext_kind = ext_kind} + + and map_pattern pat = + let pat = Map.enter_pattern pat in + let pat_desc = + match pat.pat_desc with + | Tpat_alias (pat1, p, text) -> + let pat1 = map_pattern pat1 in + Tpat_alias (pat1, p, text) + | Tpat_tuple list -> Tpat_tuple (List.map map_pattern list) + | Tpat_construct (lid, cstr_decl, args) -> + Tpat_construct (lid, cstr_decl, + List.map map_pattern args) + | Tpat_variant (label, pato, rowo) -> + let pato = match pato with + None -> pato + | Some pat -> Some (map_pattern pat) + in + Tpat_variant (label, pato, rowo) + | Tpat_record (list, closed) -> + Tpat_record (List.map (fun (lid, lab_desc, pat) -> + (lid, lab_desc, map_pattern pat) ) list, closed) + | Tpat_array list -> Tpat_array (List.map map_pattern list) + | Tpat_or (p1, p2, rowo) -> + Tpat_or (map_pattern p1, map_pattern p2, rowo) + | Tpat_lazy p -> Tpat_lazy (map_pattern p) + | Tpat_constant _ + | Tpat_any + | Tpat_var _ -> pat.pat_desc + + in + let pat_extra = List.map map_pat_extra pat.pat_extra in + Map.leave_pattern { pat with pat_desc = pat_desc; pat_extra = pat_extra } + + and map_pat_extra pat_extra = + match pat_extra with + | Tpat_constraint ct, loc, attrs -> + (Tpat_constraint (map_core_type ct), loc, attrs) + | (Tpat_type _ | Tpat_unpack | Tpat_open _ ), _, _ -> pat_extra + + and map_expression exp = + let exp = Map.enter_expression exp in + let exp_desc = + match exp.exp_desc with + Texp_ident (_, _, _) + | Texp_constant _ -> exp.exp_desc + | Texp_let (rec_flag, list, exp) -> + Texp_let (rec_flag, + map_bindings list, + map_expression exp) + | Texp_function { arg_label; param; cases; partial; } -> + Texp_function { arg_label; param; cases = map_cases cases; partial; } + | Texp_apply (exp, list) -> + Texp_apply (map_expression exp, + List.map (fun (label, expo) -> + let expo = + match expo with + None -> expo + | Some exp -> Some (map_expression exp) + in + (label, expo) + ) list ) + | Texp_match (exp, list1, list2, partial) -> + Texp_match ( + map_expression exp, + map_cases list1, + map_cases list2, + partial + ) + | Texp_try (exp, list) -> + Texp_try ( + map_expression exp, + map_cases list + ) + | Texp_tuple list -> + Texp_tuple (List.map map_expression list) + | Texp_construct (lid, cstr_desc, args) -> + Texp_construct (lid, cstr_desc, + List.map map_expression args ) + | Texp_variant (label, expo) -> + let expo =match expo with + None -> expo + | Some exp -> Some (map_expression exp) + in + Texp_variant (label, expo) + | Texp_record { fields; representation; extended_expression } -> + let fields = + Array.map (function + | label, Kept t -> label, Kept t + | label, Overridden (lid, exp) -> + label, Overridden (lid, map_expression exp)) + fields + in + let extended_expression = match extended_expression with + None -> extended_expression + | Some exp -> Some (map_expression exp) + in + Texp_record { fields; representation; extended_expression } + | Texp_field (exp, lid, label) -> + Texp_field (map_expression exp, lid, label) + | Texp_setfield (exp1, lid, label, exp2) -> + Texp_setfield ( + map_expression exp1, + lid, + label, + map_expression exp2) + | Texp_array list -> + Texp_array (List.map map_expression list) + | Texp_ifthenelse (exp1, exp2, expo) -> + Texp_ifthenelse ( + map_expression exp1, + map_expression exp2, + match expo with + None -> expo + | Some exp -> Some (map_expression exp) + ) + | Texp_sequence (exp1, exp2) -> + Texp_sequence ( + map_expression exp1, + map_expression exp2 + ) + | Texp_while (exp1, exp2) -> + Texp_while ( + map_expression exp1, + map_expression exp2 + ) + | Texp_for (id, name, exp1, exp2, dir, exp3) -> + Texp_for ( + id, name, + map_expression exp1, + map_expression exp2, + dir, + map_expression exp3 + ) + | Texp_send (exp, meth, expo) -> + Texp_send (map_expression exp, meth, may_map map_expression expo) + | Texp_new _ + | Texp_instvar _ + | Texp_setinstvar _ + | Texp_override _ -> + assert false + | Texp_letmodule (id, name, mexpr, exp) -> + Texp_letmodule ( + id, name, + map_module_expr mexpr, + map_expression exp + ) + | Texp_letexception (cd, exp) -> + Texp_letexception ( + map_extension_constructor cd, + map_expression exp + ) + | Texp_assert exp -> Texp_assert (map_expression exp) + | Texp_lazy exp -> Texp_lazy (map_expression exp) + | Texp_object () -> + Texp_object () + | Texp_pack (mexpr) -> + Texp_pack (map_module_expr mexpr) + | Texp_unreachable -> + Texp_unreachable + | Texp_extension_constructor _ as e -> + e + in + let exp_extra = List.map map_exp_extra exp.exp_extra in + Map.leave_expression { + exp with + exp_desc = exp_desc; + exp_extra = exp_extra; } + + and map_exp_extra ((desc, loc, attrs) as exp_extra) = + match desc with + | Texp_constraint ct -> + Texp_constraint (map_core_type ct), loc, attrs + | Texp_coerce (None, ct) -> + Texp_coerce (None, map_core_type ct), loc, attrs + | Texp_coerce (Some ct1, ct2) -> + Texp_coerce (Some (map_core_type ct1), + map_core_type ct2), loc, attrs + | Texp_poly (Some ct) -> + Texp_poly (Some ( map_core_type ct )), loc, attrs + | Texp_newtype _ + | Texp_open _ + | Texp_poly None -> exp_extra + + + and map_package_type pack = + let pack = Map.enter_package_type pack in + let pack_fields = List.map ( + fun (s, ct) -> (s, map_core_type ct) ) pack.pack_fields in + Map.leave_package_type { pack with pack_fields = pack_fields } + + and map_signature sg = + let sg = Map.enter_signature sg in + let sig_items = List.map map_signature_item sg.sig_items in + Map.leave_signature { sg with sig_items = sig_items } + + and map_signature_item item = + let item = Map.enter_signature_item item in + let sig_desc = + match item.sig_desc with + Tsig_value vd -> + Tsig_value (map_value_description vd) + | Tsig_type (rf, list) -> + Tsig_type (rf, List.map map_type_declaration list) + | Tsig_typext tyext -> + Tsig_typext (map_type_extension tyext) + | Tsig_exception ext -> + Tsig_exception (map_extension_constructor ext) + | Tsig_module md -> + Tsig_module {md with md_type = map_module_type md.md_type} + | Tsig_recmodule list -> + Tsig_recmodule + (List.map + (fun md -> {md with md_type = map_module_type md.md_type}) + list + ) + | Tsig_modtype mtd -> + Tsig_modtype (map_module_type_declaration mtd) + | Tsig_open _ -> item.sig_desc + | Tsig_include incl -> + Tsig_include {incl with incl_mod = map_module_type incl.incl_mod} + | Tsig_class () -> Tsig_class () + | Tsig_class_type list -> + Tsig_class_type (List.map map_class_type_declaration list) + | Tsig_attribute _ as x -> x + in + Map.leave_signature_item { item with sig_desc = sig_desc } + + and map_module_type_declaration mtd = + let mtd = Map.enter_module_type_declaration mtd in + let mtd = {mtd with mtd_type = may_map map_module_type mtd.mtd_type} in + Map.leave_module_type_declaration mtd + + + + and map_class_type_declaration cd = + let cd = Map.enter_class_type_declaration cd in + let ci_params = List.map map_type_parameter cd.ci_params in + let ci_expr = map_class_type cd.ci_expr in + Map.leave_class_type_declaration + { cd with ci_params = ci_params; ci_expr = ci_expr } + + and map_module_type mty = + let mty = Map.enter_module_type mty in + let mty_desc = + match mty.mty_desc with + Tmty_ident _ -> mty.mty_desc + | Tmty_alias _ -> mty.mty_desc + | Tmty_signature sg -> Tmty_signature (map_signature sg) + | Tmty_functor (id, name, mtype1, mtype2) -> + Tmty_functor (id, name, Misc.may_map map_module_type mtype1, + map_module_type mtype2) + | Tmty_with (mtype, list) -> + Tmty_with (map_module_type mtype, + List.map (fun (path, lid, withc) -> + (path, lid, map_with_constraint withc) + ) list) + | Tmty_typeof mexpr -> + Tmty_typeof (map_module_expr mexpr) + in + Map.leave_module_type { mty with mty_desc = mty_desc} + + and map_with_constraint cstr = + let cstr = Map.enter_with_constraint cstr in + let cstr = + match cstr with + Twith_type decl -> Twith_type (map_type_declaration decl) + | Twith_typesubst decl -> Twith_typesubst (map_type_declaration decl) + | Twith_module _ -> cstr + | Twith_modsubst _ -> cstr + in + Map.leave_with_constraint cstr + + and map_module_expr mexpr = + let mexpr = Map.enter_module_expr mexpr in + let mod_desc = + match mexpr.mod_desc with + Tmod_ident _ -> mexpr.mod_desc + | Tmod_structure st -> Tmod_structure (map_structure st) + | Tmod_functor (id, name, mtype, mexpr) -> + Tmod_functor (id, name, Misc.may_map map_module_type mtype, + map_module_expr mexpr) + | Tmod_apply (mexp1, mexp2, coercion) -> + Tmod_apply (map_module_expr mexp1, map_module_expr mexp2, coercion) + | Tmod_constraint (mexpr, mod_type, Tmodtype_implicit, coercion ) -> + Tmod_constraint (map_module_expr mexpr, mod_type, + Tmodtype_implicit, coercion) + | Tmod_constraint (mexpr, mod_type, + Tmodtype_explicit mtype, coercion) -> + Tmod_constraint (map_module_expr mexpr, mod_type, + Tmodtype_explicit (map_module_type mtype), + coercion) + | Tmod_unpack (exp, mod_type) -> + Tmod_unpack (map_expression exp, mod_type) + in + Map.leave_module_expr { mexpr with mod_desc = mod_desc } + + and map_class_type ct = + let ct = Map.enter_class_type ct in + let cltyp_desc = + match ct.cltyp_desc with + Tcty_signature csg -> Tcty_signature (map_class_signature csg) + | Tcty_constr (path, lid, list) -> + Tcty_constr (path, lid, List.map map_core_type list) + | Tcty_arrow (label, ct, cl) -> + Tcty_arrow (label, map_core_type ct, map_class_type cl) + | Tcty_open (ovf, p, lid, env, e) -> + Tcty_open (ovf, p, lid, env, map_class_type e) + in + Map.leave_class_type { ct with cltyp_desc = cltyp_desc } + + and map_class_signature cs = + let cs = Map.enter_class_signature cs in + let csig_self = map_core_type cs.csig_self in + let csig_fields = List.map map_class_type_field cs.csig_fields in + Map.leave_class_signature { cs with + csig_self = csig_self; csig_fields = csig_fields } + + + and map_class_type_field ctf = + let ctf = Map.enter_class_type_field ctf in + let ctf_desc = + match ctf.ctf_desc with + Tctf_inherit ct -> Tctf_inherit (map_class_type ct) + | Tctf_val (s, mut, virt, ct) -> + Tctf_val (s, mut, virt, map_core_type ct) + | Tctf_method (s, priv, virt, ct) -> + Tctf_method (s, priv, virt, map_core_type ct) + | Tctf_constraint (ct1, ct2) -> + Tctf_constraint (map_core_type ct1, map_core_type ct2) + | Tctf_attribute _ as x -> x + in + Map.leave_class_type_field { ctf with ctf_desc = ctf_desc } + + and map_core_type ct = + let ct = Map.enter_core_type ct in + let ctyp_desc = + match ct.ctyp_desc with + Ttyp_any + | Ttyp_var _ -> ct.ctyp_desc + | Ttyp_arrow (label, ct1, ct2) -> + Ttyp_arrow (label, map_core_type ct1, map_core_type ct2) + | Ttyp_tuple list -> Ttyp_tuple (List.map map_core_type list) + | Ttyp_constr (path, lid, list) -> + Ttyp_constr (path, lid, List.map map_core_type list) + | Ttyp_object (list, o) -> + Ttyp_object + (List.map map_object_field list, o) + | Ttyp_class (path, lid, list) -> + Ttyp_class (path, lid, List.map map_core_type list) + | Ttyp_alias (ct, s) -> Ttyp_alias (map_core_type ct, s) + | Ttyp_variant (list, bool, labels) -> + Ttyp_variant (List.map map_row_field list, bool, labels) + | Ttyp_poly (list, ct) -> Ttyp_poly (list, map_core_type ct) + | Ttyp_package pack -> Ttyp_package (map_package_type pack) + in + Map.leave_core_type { ct with ctyp_desc = ctyp_desc } + + and map_row_field rf = + match rf with + Ttag (label, attrs, bool, list) -> + Ttag (label, attrs, bool, List.map map_core_type list) + | Tinherit ct -> Tinherit (map_core_type ct) + + and map_object_field ofield = + match ofield with + OTtag (label, attrs, ct) -> + OTtag (label, attrs, map_core_type ct) + | OTinherit ct -> OTinherit (map_core_type ct) + +end + + +module DefaultMapArgument = struct + + let enter_structure t = t + let enter_value_description t = t + let enter_type_declaration t = t + let enter_type_extension t = t + let enter_extension_constructor t = t + let enter_pattern t = t + let enter_expression t = t + let enter_package_type t = t + let enter_signature t = t + let enter_signature_item t = t + let enter_module_type_declaration t = t + let enter_module_type t = t + let enter_module_expr t = t + let enter_with_constraint t = t + let enter_class_signature t = t + + let enter_class_description t = t + let enter_class_type_declaration t = t + let enter_class_type t = t + let enter_class_type_field t = t + let enter_core_type t = t + let enter_structure_item t = t + + + let leave_structure t = t + let leave_value_description t = t + let leave_type_declaration t = t + let leave_type_extension t = t + let leave_extension_constructor t = t + let leave_pattern t = t + let leave_expression t = t + let leave_package_type t = t + let leave_signature t = t + let leave_signature_item t = t + let leave_module_type_declaration t = t + let leave_module_type t = t + let leave_module_expr t = t + let leave_with_constraint t = t + let leave_class_signature t = t + + let leave_class_description t = t + let leave_class_type_declaration t = t + let leave_class_type t = t + let leave_class_type_field t = t + let leave_core_type t = t + let leave_structure_item t = t + +end diff --git a/analysis/vendor/ml/typedtreeMap.mli b/analysis/vendor/ml/typedtreeMap.mli new file mode 100644 index 000000000..ca23e6210 --- /dev/null +++ b/analysis/vendor/ml/typedtreeMap.mli @@ -0,0 +1,85 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Fabrice Le Fessant, INRIA Saclay *) +(* *) +(* Copyright 2012 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +open Typedtree + +module type MapArgument = sig + val enter_structure : structure -> structure + val enter_value_description : value_description -> value_description + val enter_type_declaration : type_declaration -> type_declaration + val enter_type_extension : type_extension -> type_extension + val enter_extension_constructor : + extension_constructor -> extension_constructor + val enter_pattern : pattern -> pattern + val enter_expression : expression -> expression + val enter_package_type : package_type -> package_type + val enter_signature : signature -> signature + val enter_signature_item : signature_item -> signature_item + val enter_module_type_declaration : + module_type_declaration -> module_type_declaration + val enter_module_type : module_type -> module_type + val enter_module_expr : module_expr -> module_expr + val enter_with_constraint : with_constraint -> with_constraint + val enter_class_signature : class_signature -> class_signature + val enter_class_description : class_description -> class_description + val enter_class_type_declaration : + class_type_declaration -> class_type_declaration + val enter_class_type : class_type -> class_type + val enter_class_type_field : class_type_field -> class_type_field + val enter_core_type : core_type -> core_type + val enter_structure_item : structure_item -> structure_item + + val leave_structure : structure -> structure + val leave_value_description : value_description -> value_description + val leave_type_declaration : type_declaration -> type_declaration + val leave_type_extension : type_extension -> type_extension + val leave_extension_constructor : + extension_constructor -> extension_constructor + val leave_pattern : pattern -> pattern + val leave_expression : expression -> expression + val leave_package_type : package_type -> package_type + val leave_signature : signature -> signature + val leave_signature_item : signature_item -> signature_item + val leave_module_type_declaration : + module_type_declaration -> module_type_declaration + val leave_module_type : module_type -> module_type + val leave_module_expr : module_expr -> module_expr + val leave_with_constraint : with_constraint -> with_constraint + val leave_class_signature : class_signature -> class_signature + val leave_class_description : class_description -> class_description + val leave_class_type_declaration : + class_type_declaration -> class_type_declaration + val leave_class_type : class_type -> class_type + val leave_class_type_field : class_type_field -> class_type_field + val leave_core_type : core_type -> core_type + val leave_structure_item : structure_item -> structure_item + +end + +module MakeMap : + functor + (Iter : MapArgument) -> +sig + val map_structure : structure -> structure + val map_pattern : pattern -> pattern + val map_structure_item : structure_item -> structure_item + val map_expression : expression -> expression + + val map_signature : signature -> signature + val map_signature_item : signature_item -> signature_item + val map_module_type : module_type -> module_type +end + +module DefaultMapArgument : MapArgument diff --git a/analysis/vendor/compiler-libs-406/typemod.ml b/analysis/vendor/ml/typemod.ml similarity index 90% rename from analysis/vendor/compiler-libs-406/typemod.ml rename to analysis/vendor/ml/typemod.ml index 84fc64901..8972d987a 100644 --- a/analysis/vendor/compiler-libs-406/typemod.ml +++ b/analysis/vendor/ml/typemod.ml @@ -35,9 +35,7 @@ type error = | With_cannot_remove_constrained_type | Repeated_name of string * string | Non_generalizable of type_expr - | Non_generalizable_class of Ident.t * class_declaration | Non_generalizable_module of module_type - | Implementation_is_required of string | Interface_not_compiled of string | Not_allowed_in_functor_body | Not_a_packed_module of type_expr @@ -50,13 +48,20 @@ type error = exception Error of Location.t * Env.t * error exception Error_forward of Location.error -module ImplementationHooks = Misc.MakeHooks(struct - type t = Typedtree.structure * Typedtree.module_coercion - end) -module InterfaceHooks = Misc.MakeHooks(struct - type t = Typedtree.signature - end) + +let rescript_hide_attributes (x : Typedtree.attributes) = + match x with + | [] -> false + | ({txt = "internal.local";_},_) :: _ -> true + | _ :: rest -> + Ext_list.exists rest (fun (x,_) -> x.txt = "internal.local") + +let rescript_hide (x : Typedtree.structure_item_desc) = + match x with + | Tstr_module {mb_attributes} -> rescript_hide_attributes mb_attributes + | _ -> false + open Typedtree let fst3 (x,_,_) = x @@ -572,7 +577,7 @@ and approx_sig env ssg = (extract_sig env smty.pmty_loc mty) in let newenv = Env.add_signature sg env in sg @ approx_sig newenv srem - | Psig_class sdecls | Psig_class_type sdecls -> + | Psig_class_type sdecls -> let decls = Typeclass.approx_class_declarations env sdecls in let rem = approx_sig env srem in List.flatten @@ -583,6 +588,7 @@ and approx_sig env ssg = Sig_type(decl.clsty_obj_id, decl.clsty_obj_abbr, rs); Sig_type(decl.clsty_typesharp_id, decl.clsty_abbr, rs)]) decls [rem]) + | Psig_class () -> assert false | _ -> approx_sig env srem @@ -871,26 +877,7 @@ and transl_signature env sg = mksig (Tsig_include incl) env loc :: trem, sg @ rem, final_env - | Psig_class cl -> - List.iter - (fun {pci_name} -> check_name check_type names pci_name) - cl; - let (classes, newenv) = Typeclass.class_descriptions env cl in - let (trem, rem, final_env) = transl_sig newenv srem in - mksig (Tsig_class - (List.map (fun decr -> - decr.Typeclass.cls_info) classes)) env loc - :: trem, - List.flatten - (map_rec - (fun rs cls -> - let open Typeclass in - [Sig_class(cls.cls_id, cls.cls_decl, rs); - Sig_class_type(cls.cls_ty_id, cls.cls_ty_decl, rs); - Sig_type(cls.cls_obj_id, cls.cls_obj_abbr, rs); - Sig_type(cls.cls_typesharp_id, cls.cls_abbr, rs)]) - classes [rem]), - final_env + | Psig_class _ -> assert false | Psig_class_type cl -> List.iter (fun {pci_name} -> check_name check_type names pci_name) @@ -1221,8 +1208,8 @@ let modtype_of_package env loc p nl tl = let package_subtype env p1 nl1 tl1 p2 nl2 tl2 = let mkmty p nl tl = let ntl = - List.filter (fun (_n,t) -> Ctype.free_variables t = []) - (List.combine nl tl) in + Ext_list.filter (List.combine nl tl) (fun (_n,t) -> Ctype.free_variables t = []) + in let (nl, tl) = List.split ntl in modtype_of_package env Location.none p nl tl in @@ -1264,7 +1251,7 @@ and type_module_aux ~alias sttn funct_body anchor env smod = let aliasable = not (Env.is_functor_arg path env) in let md = if alias && aliasable then - (Env.add_required_global (Path.head path); md) + md else match (Env.find_module path env).md_type with Mty_alias(_, p1) when not alias -> let p1 = Env.normalize_path (Some smod.pmod_loc) env p1 in @@ -1363,23 +1350,13 @@ and type_module_aux ~alias sttn funct_body anchor env smod = } | Pmod_unpack sexp -> - if !Clflags.principal then Ctype.begin_def (); let exp = Typecore.type_exp env sexp in - if !Clflags.principal then begin - Ctype.end_def (); - Ctype.generalize_structure exp.exp_type - end; let mty = match Ctype.expand_head env exp.exp_type with {desc = Tpackage (p, nl, tl)} -> if List.exists (fun t -> Ctype.free_variables t <> []) tl then raise (Error (smod.pmod_loc, env, Incomplete_packed_module exp.exp_type)); - if !Clflags.principal && - not (Typecore.generalizable (Btype.generic_level-1) exp.exp_type) - then - Location.prerr_warning smod.pmod_loc - (Warnings.Not_principal "this module unpacking"); modtype_of_package env smod.pmod_loc p nl tl | {desc = Tvar _} -> raise (Typecore.Error @@ -1425,7 +1402,7 @@ and type_structure ?(toplevel = false) funct_body anchor env sstr scope = let (defs, newenv) = Typecore.type_binding env rec_flag sdefs scope in let () = if rec_flag = Recursive then - Typecore.check_recursive_bindings env defs + Rec_check.check_recursive_bindings defs in (* Note: Env.find_value does not trigger the value_used event. Values will be marked as being used during the signature inclusion test. *) @@ -1568,33 +1545,8 @@ and type_structure ?(toplevel = false) funct_body anchor env sstr scope = | Pstr_open sod -> let (_path, newenv, od) = type_open ~toplevel env sod in Tstr_open od, [], newenv - | Pstr_class cl -> - List.iter - (fun {pci_name} -> check_name check_type names pci_name) - cl; - let (classes, new_env) = Typeclass.class_declarations env cl in - Tstr_class - (List.map (fun cls -> - (cls.Typeclass.cls_info, - cls.Typeclass.cls_pub_methods)) classes), -(* TODO: check with Jacques why this is here - Tstr_class_type - (List.map (fun (_,_, i, d, _,_,_,_,_,_,c) -> (i, c)) classes) :: - Tstr_type - (List.map (fun (_,_,_,_, i, d, _,_,_,_,_) -> (i, d)) classes) :: - Tstr_type - (List.map (fun (_,_,_,_,_,_, i, d, _,_,_) -> (i, d)) classes) :: -*) - List.flatten - (map_rec - (fun rs cls -> - let open Typeclass in - [Sig_class(cls.cls_id, cls.cls_decl, rs); - Sig_class_type(cls.cls_ty_id, cls.cls_ty_decl, rs); - Sig_type(cls.cls_obj_id, cls.cls_obj_abbr, rs); - Sig_type(cls.cls_typesharp_id, cls.cls_abbr, rs)]) - classes []), - new_env + | Pstr_class () -> + assert false | Pstr_class_type cl -> List.iter (fun {pci_name} -> check_name check_type names pci_name) @@ -1655,7 +1607,11 @@ and type_structure ?(toplevel = false) funct_body anchor env sstr scope = Cmt_format.set_saved_types (Cmt_format.Partial_structure_item str :: previous_saved_types); let (str_rem, sig_rem, final_env) = type_struct new_env srem in - (str :: str_rem, sg @ sig_rem, final_env) + let new_sg = + if rescript_hide desc then sig_rem + else + sg @ sig_rem in + (str :: str_rem, new_sg, final_env) in if !Clflags.annotations then (* moved to genannot *) @@ -1672,13 +1628,8 @@ and type_structure ?(toplevel = false) funct_body anchor env sstr scope = else Builtin_attributes.warning_scope [] run let type_toplevel_phrase env s = - Env.reset_required_globals (); - let (str, sg, env) = - type_structure ~toplevel:true false None env s Location.none in - let (str, _coerce) = ImplementationHooks.apply_hooks - { Misc.sourcefile = "//toplevel//" } (str, Tcoerce_none) - in - (str, sg, env) + type_structure ~toplevel:true false None env s Location.none + let type_module_alias = type_module ~alias:true true false None let type_module = type_module true false None @@ -1777,25 +1728,18 @@ let () = (* Typecheck an implementation file *) -let type_implementation sourcefile outputprefix modulename initial_env ast = +let type_implementation_more ?check_exists sourcefile outputprefix modulename initial_env ast = Cmt_format.clear (); try - Typecore.reset_delayed_checks (); - Env.reset_required_globals (); - if !Clflags.print_types then (* #7656 *) - Warnings.parse_options false "-32-34-37-38-60"; + Delayed_checks.reset_delayed_checks (); let (str, sg, finalenv) = type_structure initial_env ast (Location.in_file sourcefile) in let simple_sg = simplify_signature sg in - if !Clflags.print_types then begin - Typecore.force_delayed_checks (); - Printtyp.wrap_printing_env initial_env - (fun () -> fprintf std_formatter "%a@." Printtyp.signature simple_sg); - (str, Tcoerce_none) (* result is ignored by Compile.implementation *) - end else begin + begin let sourceintf = Filename.remove_extension sourcefile ^ !Config.interface_suffix in - if Sys.file_exists sourceintf then begin + let mli_status = !Clflags.assume_no_mli in + if mli_status = Clflags.Mli_exists then begin let intf_file = try find_in_path_uncap !Config.load_path (modulename ^ ".cmi") @@ -1805,20 +1749,21 @@ let type_implementation sourcefile outputprefix modulename initial_env ast = let dclsig = Env.read_signature modulename intf_file in let coercion = Includemod.compunit initial_env sourcefile sg intf_file dclsig in - Typecore.force_delayed_checks (); + Delayed_checks.force_delayed_checks (); (* It is important to run these checks after the inclusion test above, so that value declarations which are not used internally but exported are not reported as being unused. *) Cmt_format.save_cmt (outputprefix ^ ".cmt") modulename (Cmt_format.Implementation str) (Some sourcefile) initial_env None; - (str, coercion) + (str, coercion, finalenv, dclsig) + (* identifier is useless might read from serialized cmi files*) end else begin let coercion = Includemod.compunit initial_env sourcefile sg "(inferred signature)" simple_sg in check_nongen_schemes finalenv simple_sg; normalize_signature finalenv simple_sg; - Typecore.force_delayed_checks (); + Delayed_checks.force_delayed_checks (); (* See comment above. Here the target signature contains all the value being exported. We can still capture unused declarations like "let x = true;; let x = 1;;", because in this @@ -1826,14 +1771,14 @@ let type_implementation sourcefile outputprefix modulename initial_env ast = if not !Clflags.dont_write_files then begin let deprecated = Builtin_attributes.deprecated_of_str ast in let cmi = - Env.save_signature ~deprecated + Env.save_signature ?check_exists ~deprecated simple_sg modulename (outputprefix ^ ".cmi") in Cmt_format.save_cmt (outputprefix ^ ".cmt") modulename (Cmt_format.Implementation str) (Some sourcefile) initial_env (Some cmi); end; - (str, coercion) + (str, coercion, finalenv, simple_sg) end end with e -> @@ -1844,80 +1789,19 @@ let type_implementation sourcefile outputprefix modulename initial_env ast = raise e let type_implementation sourcefile outputprefix modulename initial_env ast = - ImplementationHooks.apply_hooks { Misc.sourcefile } - (type_implementation sourcefile outputprefix modulename initial_env ast) + let (a,b,_,_) = + type_implementation_more sourcefile outputprefix modulename initial_env ast in + a,b + let save_signature modname tsg outputprefix source_file initial_env cmi = Cmt_format.save_cmt (outputprefix ^ ".cmti") modname (Cmt_format.Interface tsg) (Some source_file) initial_env (Some cmi) -let type_interface sourcefile env ast = - InterfaceHooks.apply_hooks { Misc.sourcefile } (transl_signature env ast) (* "Packaging" of several compilation units into one unit having them as sub-modules. *) -let rec package_signatures subst = function - [] -> [] - | (name, sg) :: rem -> - let sg' = Subst.signature subst sg in - let oldid = Ident.create_persistent name - and newid = Ident.create name in - Sig_module(newid, {md_type=Mty_signature sg'; - md_attributes=[]; - md_loc=Location.none; - }, - Trec_not) :: - package_signatures (Subst.add_module oldid (Pident newid) subst) rem - -let package_units initial_env objfiles cmifile modulename = - (* Read the signatures of the units *) - let units = - List.map - (fun f -> - let pref = chop_extensions f in - let modname = String.capitalize_ascii(Filename.basename pref) in - let sg = Env.read_signature modname (pref ^ ".cmi") in - if Filename.check_suffix f ".cmi" && - not(Mtype.no_code_needed_sig Env.initial_safe_string sg) - then raise(Error(Location.none, Env.empty, - Implementation_is_required f)); - (modname, Env.read_signature modname (pref ^ ".cmi"))) - objfiles in - (* Compute signature of packaged unit *) - Ident.reinit(); - let sg = package_signatures Subst.identity units in - (* See if explicit interface is provided *) - let prefix = Filename.remove_extension cmifile in - let mlifile = prefix ^ !Config.interface_suffix in - if Sys.file_exists mlifile then begin - if not (Sys.file_exists cmifile) then begin - raise(Error(Location.in_file mlifile, Env.empty, - Interface_not_compiled mlifile)) - end; - let dclsig = Env.read_signature modulename cmifile in - Cmt_format.save_cmt (prefix ^ ".cmt") modulename - (Cmt_format.Packed (sg, objfiles)) None initial_env None ; - Includemod.compunit initial_env "(obtained by packing)" sg mlifile dclsig - end else begin - (* Determine imports *) - let unit_names = List.map fst units in - let imports = - List.filter - (fun (name, _crc) -> not (List.mem name unit_names)) - (Env.imports()) in - (* Write packaged signature *) - if not !Clflags.dont_write_files then begin - let cmi = - Env.save_signature_with_imports ~deprecated:None - sg modulename - (prefix ^ ".cmi") imports - in - Cmt_format.save_cmt (prefix ^ ".cmt") modulename - (Cmt_format.Packed (cmi.Cmi_format.cmi_sign, objfiles)) None initial_env (Some cmi) - end; - Tcoerce_none - end (* Error report *) @@ -1977,20 +1861,10 @@ let report_error ppf = function fprintf ppf "@[The type of this expression,@ %a,@ \ contains type variables that cannot be generalized@]" type_scheme typ - | Non_generalizable_class (id, desc) -> - fprintf ppf - "@[The type of this class,@ %a,@ \ - contains type variables that cannot be generalized@]" - (class_declaration id) desc | Non_generalizable_module mty -> fprintf ppf "@[The type of this module,@ %a,@ \ contains type variables that cannot be generalized@]" modtype mty - | Implementation_is_required intf_name -> - fprintf ppf - "@[The interface %a@ declares values, not just types.@ \ - An implementation must be provided.@]" - Location.print_filename intf_name | Interface_not_compiled intf_name -> fprintf ppf "@[Could not find the .cmi file for interface@ %a.@]" @@ -2021,6 +1895,10 @@ let report_error ppf = function "This is an alias for module %a, which is missing" path p + +let super_report_error_no_wrap_printing_env = report_error + + let report_error env ppf err = Printtyp.wrap_printing_env env (fun () -> report_error ppf err) diff --git a/analysis/vendor/compiler-libs-406/typemod.mli b/analysis/vendor/ml/typemod.mli similarity index 84% rename from analysis/vendor/compiler-libs-406/typemod.mli rename to analysis/vendor/ml/typemod.mli index fb767db2e..f8cd85f89 100644 --- a/analysis/vendor/compiler-libs-406/typemod.mli +++ b/analysis/vendor/ml/typemod.mli @@ -26,11 +26,18 @@ val type_structure: val type_toplevel_phrase: Env.t -> Parsetree.structure -> Typedtree.structure * Types.signature * Env.t + + +val rescript_hide : Typedtree.structure_item_desc -> bool + +val type_implementation_more: ?check_exists:unit -> + string -> string -> string -> Env.t -> Parsetree.structure -> + Typedtree.structure * Typedtree.module_coercion * Env.t * Types.signature + val type_implementation: string -> string -> string -> Env.t -> Parsetree.structure -> Typedtree.structure * Typedtree.module_coercion -val type_interface: - string -> Env.t -> Parsetree.signature -> Typedtree.signature + val transl_signature: Env.t -> Parsetree.signature -> Typedtree.signature val check_nongen_schemes: @@ -38,9 +45,6 @@ val check_nongen_schemes: val type_open_: ?used_slot:bool ref -> ?toplevel:bool -> Asttypes.override_flag -> Env.t -> Location.t -> Longident.t Asttypes.loc -> Path.t * Env.t -val modtype_of_package: - Env.t -> Location.t -> - Path.t -> Longident.t list -> type_expr list -> module_type val simplify_signature: signature -> signature val path_of_module : Typedtree.module_expr -> Path.t option @@ -49,9 +53,6 @@ val save_signature: string -> Typedtree.signature -> string -> string -> Env.t -> Cmi_format.cmi_infos -> unit -val package_units: - Env.t -> string list -> string -> string -> Typedtree.module_coercion - type error = Cannot_apply of module_type | Not_included of Includemod.error list @@ -66,9 +67,7 @@ type error = | With_cannot_remove_constrained_type | Repeated_name of string * string | Non_generalizable of type_expr - | Non_generalizable_class of Ident.t * class_declaration | Non_generalizable_module of module_type - | Implementation_is_required of string | Interface_not_compiled of string | Not_allowed_in_functor_body | Not_a_packed_module of type_expr @@ -81,10 +80,10 @@ type error = exception Error of Location.t * Env.t * error exception Error_forward of Location.error + +val super_report_error_no_wrap_printing_env: formatter -> error -> unit + + val report_error: Env.t -> formatter -> error -> unit -module ImplementationHooks : Misc.HookSig - with type t = Typedtree.structure * Typedtree.module_coercion -module InterfaceHooks : Misc.HookSig - with type t = Typedtree.signature diff --git a/analysis/vendor/compiler-libs-406/typeopt.ml b/analysis/vendor/ml/typeopt.ml similarity index 63% rename from analysis/vendor/compiler-libs-406/typeopt.ml rename to analysis/vendor/ml/typeopt.ml index 1d3101e32..3a8ff7cf3 100644 --- a/analysis/vendor/compiler-libs-406/typeopt.ml +++ b/analysis/vendor/ml/typeopt.ml @@ -15,7 +15,7 @@ (* Auxiliaries for type-based optimizations, e.g. array kinds *) -open Path + open Types open Asttypes open Typedtree @@ -39,6 +39,54 @@ let scrape_ty env ty = let scrape env ty = (scrape_ty env ty).desc + +(** [Types.constructor_description] + records the type at the definition type so for ['a option] + it will always be [Tvar] +*) +let cannot_inhabit_none_like_value (typ : Types.type_expr) (env : Env.t) = + match scrape env typ with + | Tconstr(p, _,_) -> + (* all built in types could not inhabit none-like values: + int, char, float, bool, unit, exn, array, list, nativeint, + int32, int64, lazy_t, bytes + *) + (match Predef.type_is_builtin_path_but_option p with + | For_sure_yes -> true + | For_sure_no -> false + | NA -> + + begin match (Env.find_type p env).type_kind with + | exception _ -> + false + | Types.Type_abstract | Types.Type_open -> false + | Types.Type_record _ -> true + | (Types.Type_variant + ([{cd_id = {name="None"}; cd_args = Cstr_tuple [] }; + {cd_id = {name = "Some"}; cd_args = Cstr_tuple [_]}] + | + [{cd_id = {name="Some"}; cd_args = Cstr_tuple [_] }; + {cd_id = {name = "None"}; cd_args = Cstr_tuple []}] + | [{cd_id= {name = "()"}; cd_args = Cstr_tuple []}] + )) + (* | Types.Type_variant *) + -> false (* conservative *) + | _ -> true + end) + | Ttuple _ + | Tvariant _ + | Tpackage _ + | Tarrow _ -> true + | Tfield _ + | Tpoly _ + | Tunivar _ + | Tlink _ + | Tsubst _ + | Tnil + | Tvar _ + | Tobject _ + -> false + let is_function_type env ty = match scrape env ty with | Tarrow (_, lhs, rhs, _) -> Some (lhs, rhs) @@ -76,8 +124,6 @@ let classify env ty = else if Path.same p Predef.path_string || Path.same p Predef.path_bytes || Path.same p Predef.path_array - || Path.same p Predef.path_nativeint - || Path.same p Predef.path_int32 || Path.same p Predef.path_int64 then Addr else begin try @@ -97,78 +143,10 @@ let classify env ty = | Tlink _ | Tsubst _ | Tpoly _ | Tfield _ -> assert false -let array_type_kind env ty = - match scrape env ty with - | Tconstr(p, [elt_ty], _) | Tpoly({desc = Tconstr(p, [elt_ty], _)}, _) - when Path.same p Predef.path_array -> - begin match classify env elt_ty with - | Any -> if Config.flat_float_array then Pgenarray else Paddrarray - | Float -> if Config.flat_float_array then Pfloatarray else Paddrarray - | Addr | Lazy -> Paddrarray - | Int -> Pintarray - end - | Tconstr(p, [], _) | Tpoly({desc = Tconstr(p, [], _)}, _) - when Path.same p Predef.path_floatarray -> - Pfloatarray - | _ -> - (* This can happen with e.g. Obj.field *) - Pgenarray -let array_kind exp = array_type_kind exp.exp_env exp.exp_type -let array_pattern_kind pat = array_type_kind pat.pat_env pat.pat_type -let bigarray_decode_type env ty tbl dfl = - match scrape env ty with - | Tconstr(Pdot(Pident mod_id, type_name, _), [], _) - when Ident.name mod_id = "CamlinternalBigarray" -> - begin try List.assoc type_name tbl with Not_found -> dfl end - | _ -> - dfl - -let kind_table = - ["float32_elt", Pbigarray_float32; - "float64_elt", Pbigarray_float64; - "int8_signed_elt", Pbigarray_sint8; - "int8_unsigned_elt", Pbigarray_uint8; - "int16_signed_elt", Pbigarray_sint16; - "int16_unsigned_elt", Pbigarray_uint16; - "int32_elt", Pbigarray_int32; - "int64_elt", Pbigarray_int64; - "int_elt", Pbigarray_caml_int; - "nativeint_elt", Pbigarray_native_int; - "complex32_elt", Pbigarray_complex32; - "complex64_elt", Pbigarray_complex64] - -let layout_table = - ["c_layout", Pbigarray_c_layout; - "fortran_layout", Pbigarray_fortran_layout] - -let bigarray_type_kind_and_layout env typ = - match scrape env typ with - | Tconstr(_p, [_caml_type; elt_type; layout_type], _abbrev) -> - (bigarray_decode_type env elt_type kind_table Pbigarray_unknown, - bigarray_decode_type env layout_type layout_table - Pbigarray_unknown_layout) - | _ -> - (Pbigarray_unknown, Pbigarray_unknown_layout) - -let value_kind env ty = - match scrape env ty with - | Tconstr(p, _, _) when Path.same p Predef.path_int -> - Pintval - | Tconstr(p, _, _) when Path.same p Predef.path_char -> - Pintval - | Tconstr(p, _, _) when Path.same p Predef.path_float -> - Pfloatval - | Tconstr(p, _, _) when Path.same p Predef.path_int32 -> - Pboxedintval Pint32 - | Tconstr(p, _, _) when Path.same p Predef.path_int64 -> - Pboxedintval Pint64 - | Tconstr(p, _, _) when Path.same p Predef.path_nativeint -> - Pboxedintval Pnativeint - | _ -> - Pgenval + (** Whether a forward block is needed for a lazy thunk on a value, i.e. @@ -176,7 +154,7 @@ let value_kind env ty = let lazy_val_requires_forward env ty = match classify env ty with | Any | Lazy -> true - | Float -> Config.flat_float_array + | Float (*-> Config.flat_float_array*) | Addr | Int -> false (** The compilation of the expression [lazy e] depends on the form of e: diff --git a/analysis/vendor/compiler-libs-406/typeopt.mli b/analysis/vendor/ml/typeopt.mli similarity index 82% rename from analysis/vendor/compiler-libs-406/typeopt.mli rename to analysis/vendor/ml/typeopt.mli index 299e82220..ffb740c97 100644 --- a/analysis/vendor/compiler-libs-406/typeopt.mli +++ b/analysis/vendor/ml/typeopt.mli @@ -23,15 +23,19 @@ val maybe_pointer_type : Env.t -> Types.type_expr -> Lambda.immediate_or_pointer val maybe_pointer : Typedtree.expression -> Lambda.immediate_or_pointer -val array_type_kind : Env.t -> Types.type_expr -> Lambda.array_kind -val array_kind : Typedtree.expression -> Lambda.array_kind -val array_pattern_kind : Typedtree.pattern -> Lambda.array_kind -val bigarray_type_kind_and_layout : - Env.t -> Types.type_expr -> Lambda.bigarray_kind * Lambda.bigarray_layout -val value_kind : Env.t -> Types.type_expr -> Lambda.value_kind + + + + val classify_lazy_argument : Typedtree.expression -> [ `Constant_or_function | `Float | `Identifier of [`Forward_value | `Other] | `Other] + +val cannot_inhabit_none_like_value: + Types.type_expr -> + Env.t -> + bool + diff --git a/analysis/vendor/compiler-libs-406/types.ml b/analysis/vendor/ml/types.ml similarity index 93% rename from analysis/vendor/compiler-libs-406/types.ml rename to analysis/vendor/ml/types.ml index fd3de4e4e..1dea0bec6 100644 --- a/analysis/vendor/compiler-libs-406/types.ml +++ b/analysis/vendor/ml/types.ml @@ -96,15 +96,6 @@ type value_description = and value_kind = Val_reg (* Regular value *) | Val_prim of Primitive.description (* Primitive *) - | Val_ivar of mutable_flag * string (* Instance variable (mutable ?) *) - | Val_self of (Ident.t * type_expr) Meths.t ref * - (Ident.t * Asttypes.mutable_flag * - Asttypes.virtual_flag * type_expr) Vars.t ref * - string * type_expr - (* Self *) - | Val_anc of (string * Ident.t) list * string - (* Ancestor *) - | Val_unbound (* Unbound variable *) (* Variance *) @@ -162,7 +153,8 @@ and record_representation = | Record_regular (* All fields are boxed / tagged *) | Record_float_unused (* Was: all fields are floats. Now: unused *) | Record_unboxed of bool (* Unboxed single-field record, inlined or not *) - | Record_inlined of int (* Inlined record *) + | Record_inlined of (* Inlined record *) + { tag : int ; name : string; num_nonconsts : int; optional_labels : string list} | Record_extension (* Inlined record under extension *) | Record_optional_labels of string list (* List of optional labels *) @@ -268,7 +260,7 @@ and signature_item = | Sig_typext of Ident.t * extension_constructor * ext_status | Sig_module of Ident.t * module_declaration * rec_status | Sig_modtype of Ident.t * modtype_declaration - | Sig_class of Ident.t * class_declaration * rec_status + | Sig_class of unit | Sig_class_type of Ident.t * class_type_declaration * rec_status and module_declaration = @@ -347,4 +339,19 @@ type label_description = lbl_private: private_flag; (* Read-only field? *) lbl_loc: Location.t; lbl_attributes: Parsetree.attributes; - } \ No newline at end of file + } +let same_record_representation x y = + match x with + | Record_regular -> y = Record_regular + | Record_float_unused -> y = Record_float_unused + | Record_optional_labels lbls -> ( + match y with + | Record_optional_labels lbls2 -> lbls = lbls2 + | _ -> false) + | Record_inlined {tag; name; num_nonconsts; optional_labels} -> ( + match y with + | Record_inlined y -> + tag = y.tag && name = y.name && num_nonconsts = y.num_nonconsts && optional_labels = y.optional_labels + | _ -> false) + | Record_extension -> y = Record_extension + | Record_unboxed x -> ( match y with Record_unboxed y -> x = y | _ -> false) diff --git a/analysis/vendor/compiler-libs-406/types.mli b/analysis/vendor/ml/types.mli similarity index 96% rename from analysis/vendor/compiler-libs-406/types.mli rename to analysis/vendor/ml/types.mli index 0dc914b46..e87361929 100644 --- a/analysis/vendor/compiler-libs-406/types.mli +++ b/analysis/vendor/ml/types.mli @@ -252,14 +252,6 @@ type value_description = and value_kind = Val_reg (* Regular value *) | Val_prim of Primitive.description (* Primitive *) - | Val_ivar of mutable_flag * string (* Instance variable (mutable ?) *) - | Val_self of (Ident.t * type_expr) Meths.t ref * - (Ident.t * mutable_flag * virtual_flag * type_expr) Vars.t ref * - string * type_expr - (* Self *) - | Val_anc of (string * Ident.t) list * string - (* Ancestor *) - | Val_unbound (* Unbound variable *) (* Variance *) @@ -308,7 +300,8 @@ and record_representation = | Record_regular (* All fields are boxed / tagged *) | Record_float_unused (* Was: all fields are floats. Now: unused *) | Record_unboxed of bool (* Unboxed single-field record, inlined or not *) - | Record_inlined of int (* Inlined record *) + | Record_inlined of (* Inlined record *) + { tag : int ; name : string; num_nonconsts : int; optional_labels : string list} | Record_extension (* Inlined record under extension *) | Record_optional_labels of string list (* List of optional labels *) @@ -419,7 +412,7 @@ and signature_item = | Sig_typext of Ident.t * extension_constructor * ext_status | Sig_module of Ident.t * module_declaration * rec_status | Sig_modtype of Ident.t * modtype_declaration - | Sig_class of Ident.t * class_declaration * rec_status + | Sig_class of unit | Sig_class_type of Ident.t * class_type_declaration * rec_status and module_declaration = @@ -493,3 +486,5 @@ type label_description = lbl_loc: Location.t; lbl_attributes: Parsetree.attributes; } + +val same_record_representation : record_representation -> record_representation -> bool \ No newline at end of file diff --git a/analysis/vendor/compiler-libs-406/typetexp.ml b/analysis/vendor/ml/typetexp.ml similarity index 96% rename from analysis/vendor/compiler-libs-406/typetexp.ml rename to analysis/vendor/ml/typetexp.ml index 5347c42da..b288e6016 100644 --- a/analysis/vendor/compiler-libs-406/typetexp.ml +++ b/analysis/vendor/ml/typetexp.ml @@ -483,7 +483,6 @@ and transl_type_aux env policy styp = end; ty with Not_found -> - if !Clflags.principal then begin_def (); let t = newvar () in used_variables := Tbl.add alias (t, styp.ptyp_loc) !used_variables; let ty = transl_type env policy st in @@ -491,10 +490,6 @@ and transl_type_aux env policy styp = let trace = swap_list trace in raise(Error(styp.ptyp_loc, env, Alias_type_mismatch trace)) end; - if !Clflags.principal then begin - end_def (); - generalize_structure t; - end; let t = instance env t in let px = Btype.proxy t in begin match px.desc with @@ -512,19 +507,25 @@ and transl_type_aux env policy styp = row_bound=(); row_closed=true; row_fixed=false; row_name=None}) in let hfields = Hashtbl.create 17 in + let collection_detect = Hashtbl.create 17 in let add_typed_field loc l f = - let h = Btype.hash_variant l in + if not !Config.bs_only then begin + let h = Btype.hash_variant l in + if Hashtbl.mem collection_detect h then + let l' = Hashtbl.find collection_detect h in + (* Check for tag conflicts *) + if l <> l' then raise(Error(styp.ptyp_loc, env, Variant_tags(l, l'))); + else Hashtbl.add collection_detect h l + end ; try - let (l',f') = Hashtbl.find hfields h in - (* Check for tag conflicts *) - if l <> l' then raise(Error(styp.ptyp_loc, env, Variant_tags(l, l'))); + let (_,f') = Hashtbl.find hfields l in let ty = mkfield l f and ty' = mkfield l f' in if equal env false [ty] [ty'] then () else try unify env ty ty' with Unify _trace -> raise(Error(loc, env, Constructor_mismatch (ty,ty'))) with Not_found -> - Hashtbl.add hfields h (l,f) + Hashtbl.add hfields l (l,f) in let add_field = function Rtag (l, attrs, c, stl) -> @@ -555,13 +556,10 @@ and transl_type_aux env policy styp = {desc=Tconstr(p, tl, _)} -> Some(p, tl) | _ -> None in - begin try + begin (* Set name if there are no fields yet *) - Hashtbl.iter (fun _ _ -> raise Exit) hfields; - name := nm - with Exit -> - (* Unset it otherwise *) - name := None + if Hashtbl.length hfields <> 0 then name := None + else name := nm end; let fl = match expand_head env cty.ctyp_type, nm with {desc=Tvariant row}, _ when Btype.static_row row -> @@ -865,10 +863,18 @@ let report_error env ppf = function fprintf ppf "The type constructor@ %a@ is not yet completely defined" path p | Type_arity_mismatch(lid, expected, provided) -> - fprintf ppf - "@[The type constructor %a@ expects %i argument(s),@ \ - but is here applied to %i argument(s)@]" - longident lid expected provided + if expected==0 then + fprintf ppf + "@[The type %a is not generic so expects no arguments,@ \ + but is here applied to %i argument(s).@ \ + Have you tried removing the angular brackets `<` and `>` and the@ \ + arguments within them and just writing `%a` instead? @]" + longident lid provided longident lid + else + fprintf ppf + "@[The type constructor %a@ expects %i argument(s),@ \ + but is here applied to %i argument(s)@]" + longident lid expected provided | Bound_type_variable name -> fprintf ppf "Already bound type parameter '%s" name | Recursive_type -> diff --git a/analysis/vendor/compiler-libs-406/typetexp.mli b/analysis/vendor/ml/typetexp.mli similarity index 96% rename from analysis/vendor/compiler-libs-406/typetexp.mli rename to analysis/vendor/ml/typetexp.mli index c6bc5e430..165c17d45 100644 --- a/analysis/vendor/compiler-libs-406/typetexp.mli +++ b/analysis/vendor/ml/typetexp.mli @@ -113,3 +113,10 @@ val find_class_type: val unbound_constructor_error: Env.t -> Longident.t Location.loc -> 'a val unbound_label_error: Env.t -> Longident.t Location.loc -> 'a + + +val spellcheck: + Format.formatter -> + (('a -> 'a list -> 'a list) -> + Longident.t option -> 'b -> 'c list -> string list) -> + 'b -> Longident.t -> unit diff --git a/analysis/vendor/compiler-libs-406/untypeast.ml b/analysis/vendor/ml/untypeast.ml similarity index 84% rename from analysis/vendor/compiler-libs-406/untypeast.ml rename to analysis/vendor/ml/untypeast.ml index e4ec51ce4..1372832e5 100644 --- a/analysis/vendor/compiler-libs-406/untypeast.ml +++ b/analysis/vendor/ml/untypeast.ml @@ -25,12 +25,7 @@ type mapper = { attributes: mapper -> T.attribute list -> attribute list; case: mapper -> T.case -> case; cases: mapper -> T.case list -> case list; - class_declaration: mapper -> T.class_declaration -> class_declaration; - class_description: mapper -> T.class_description -> class_description; - class_expr: mapper -> T.class_expr -> class_expr; - class_field: mapper -> T.class_field -> class_field; class_signature: mapper -> T.class_signature -> class_signature; - class_structure: mapper -> T.class_structure -> class_structure; class_type: mapper -> T.class_type -> class_type; class_type_declaration: mapper -> T.class_type_declaration -> class_type_declaration; @@ -88,9 +83,6 @@ Some notes: (** Utility functions. *) -let string_is_prefix sub str = - let sublen = String.length sub in - String.length str >= sublen && String.sub str 0 sublen = sub let map_opt f = function None -> None | Some e -> Some (f e) @@ -161,11 +153,8 @@ let structure_item sub item = Pstr_modtype (sub.module_type_declaration sub mtd) | Tstr_open od -> Pstr_open (sub.open_description sub od) - | Tstr_class list -> - Pstr_class - (List.map - (fun (ci, _) -> sub.class_declaration sub ci) - list) + | Tstr_class _list -> + Pstr_class () | Tstr_class_type list -> Pstr_class_type (List.map @@ -441,17 +430,12 @@ let expression sub exp = dir, sub.expr sub exp3) | Texp_send (exp, meth, _) -> Pexp_send (sub.expr sub exp, match meth with - Tmeth_name name -> mkloc name loc - | Tmeth_val id -> mkloc (Ident.name id) loc) - | Texp_new (_path, lid, _) -> Pexp_new (map_loc sub lid) - | Texp_instvar (_, path, name) -> - Pexp_ident ({loc = sub.location sub name.loc ; txt = lident_of_path path}) - | Texp_setinstvar (_, _path, lid, exp) -> - Pexp_setinstvar (map_loc sub lid, sub.expr sub exp) - | Texp_override (_, list) -> - Pexp_override (List.map (fun (_path, lid, exp) -> - (map_loc sub lid, sub.expr sub exp) - ) list) + Tmeth_name name -> mkloc name loc) + | Texp_new _ + | Texp_instvar _ + | Texp_setinstvar _ + | Texp_override _ -> + assert false | Texp_letmodule (_id, name, mexpr, exp) -> Pexp_letmodule (name, sub.module_expr sub mexpr, sub.expr sub exp) @@ -460,8 +444,8 @@ let expression sub exp = sub.expr sub exp) | Texp_assert exp -> Pexp_assert (sub.expr sub exp) | Texp_lazy exp -> Pexp_lazy (sub.expr sub exp) - | Texp_object (cl, _) -> - Pexp_object (sub.class_structure sub cl) + | Texp_object () -> + assert false | Texp_pack (mexpr) -> Pexp_pack (sub.module_expr sub mexpr) | Texp_unreachable -> @@ -512,8 +496,8 @@ let signature_item sub item = Psig_open (sub.open_description sub od) | Tsig_include incl -> Psig_include (sub.include_description sub incl) - | Tsig_class list -> - Psig_class (List.map (sub.class_description sub) list) + | Tsig_class () -> + Psig_class () | Tsig_class_type list -> Psig_class_type (List.map (sub.class_type_declaration sub) list) | Tsig_attribute x -> @@ -546,8 +530,6 @@ let class_infos f sub ci = (map_loc sub ci.ci_id_name) (f sub ci.ci_expr) -let class_declaration sub = class_infos sub.class_expr sub -let class_description sub = class_infos sub.class_type sub let class_type_declaration sub = class_infos sub.class_type sub let module_type sub mty = @@ -605,42 +587,7 @@ let module_expr sub mexpr = in Mod.mk ~loc ~attrs desc -let class_expr sub cexpr = - let loc = sub.location sub cexpr.cl_loc in - let attrs = sub.attributes sub cexpr.cl_attributes in - let desc = match cexpr.cl_desc with - | Tcl_constraint ( { cl_desc = Tcl_ident (_path, lid, tyl); _ }, - None, _, _, _ ) -> - Pcl_constr (map_loc sub lid, - List.map (sub.typ sub) tyl) - | Tcl_structure clstr -> Pcl_structure (sub.class_structure sub clstr) - - | Tcl_fun (label, pat, _pv, cl, _partial) -> - Pcl_fun (label, None, sub.pat sub pat, sub.class_expr sub cl) - - | Tcl_apply (cl, args) -> - Pcl_apply (sub.class_expr sub cl, - List.fold_right (fun (label, expo) list -> - match expo with - None -> list - | Some exp -> (label, sub.expr sub exp) :: list - ) args []) - - | Tcl_let (rec_flat, bindings, _ivars, cl) -> - Pcl_let (rec_flat, - List.map (sub.value_binding sub) bindings, - sub.class_expr sub cl) - - | Tcl_constraint (cl, Some clty, _vals, _meths, _concrs) -> - Pcl_constraint (sub.class_expr sub cl, sub.class_type sub clty) - | Tcl_open (ovf, _p, lid, _env, e) -> - Pcl_open (ovf, lid, sub.class_expr sub e) - - | Tcl_ident _ -> assert false - | Tcl_constraint (_, None, _, _, _) -> assert false - in - Cl.mk ~loc ~attrs desc let class_type sub ct = let loc = sub.location sub ct.cltyp_loc in @@ -705,16 +652,6 @@ let core_type sub ct = in Typ.mk ~loc ~attrs desc -let class_structure sub cs = - let rec remove_self = function - | { pat_desc = Tpat_alias (p, id, _s) } - when string_is_prefix "selfpat-" id.Ident.name -> - remove_self p - | p -> p - in - { pcstr_self = sub.pat sub (remove_self cs.cstr_self); - pcstr_fields = List.map (sub.class_field sub) cs.cstr_fields; - } let row_field sub rf = match rf with @@ -728,47 +665,7 @@ let object_field sub ofield = Otag (label, sub.attributes sub attrs, sub.typ sub ct) | OTinherit ct -> Oinherit (sub.typ sub ct) -and is_self_pat = function - | { pat_desc = Tpat_alias(_pat, id, _) } -> - string_is_prefix "self-" (Ident.name id) - | _ -> false - -let class_field sub cf = - let loc = sub.location sub cf.cf_loc in - let attrs = sub.attributes sub cf.cf_attributes in - let desc = match cf.cf_desc with - Tcf_inherit (ovf, cl, super, _vals, _meths) -> - Pcf_inherit (ovf, sub.class_expr sub cl, - map_opt (fun v -> mkloc v loc) super) - | Tcf_constraint (cty, cty') -> - Pcf_constraint (sub.typ sub cty, sub.typ sub cty') - | Tcf_val (lab, mut, _, Tcfk_virtual cty, _) -> - Pcf_val (lab, mut, Cfk_virtual (sub.typ sub cty)) - | Tcf_val (lab, mut, _, Tcfk_concrete (o, exp), _) -> - Pcf_val (lab, mut, Cfk_concrete (o, sub.expr sub exp)) - | Tcf_method (lab, priv, Tcfk_virtual cty) -> - Pcf_method (lab, priv, Cfk_virtual (sub.typ sub cty)) - | Tcf_method (lab, priv, Tcfk_concrete (o, exp)) -> - let remove_fun_self = function - | { exp_desc = - Texp_function { arg_label = Nolabel; cases = [case]; _ } } - when is_self_pat case.c_lhs && case.c_guard = None -> case.c_rhs - | e -> e - in - let exp = remove_fun_self exp in - Pcf_method (lab, priv, Cfk_concrete (o, sub.expr sub exp)) - | Tcf_initializer exp -> - let remove_fun_self = function - | { exp_desc = - Texp_function { arg_label = Nolabel; cases = [case]; _ } } - when is_self_pat case.c_lhs && case.c_guard = None -> case.c_rhs - | e -> e - in - let exp = remove_fun_self exp in - Pcf_initializer (sub.expr sub exp) - | Tcf_attribute x -> Pcf_attribute x - in - Cf.mk ~loc ~attrs desc + let location _sub l = l @@ -783,15 +680,10 @@ let default_mapper = signature_item = signature_item; module_type = module_type; with_constraint = with_constraint; - class_declaration = class_declaration; - class_expr = class_expr; - class_field = class_field; - class_structure = class_structure; class_type = class_type; class_type_field = class_type_field; class_signature = class_signature; class_type_declaration = class_type_declaration; - class_description = class_description; type_declaration = type_declaration; type_kind = type_kind; typ = core_type; diff --git a/analysis/vendor/compiler-libs-406/untypeast.mli b/analysis/vendor/ml/untypeast.mli similarity index 91% rename from analysis/vendor/compiler-libs-406/untypeast.mli rename to analysis/vendor/ml/untypeast.mli index 20a6668c9..d6bfdd05c 100644 --- a/analysis/vendor/compiler-libs-406/untypeast.mli +++ b/analysis/vendor/ml/untypeast.mli @@ -22,12 +22,7 @@ type mapper = { attributes: mapper -> Typedtree.attribute list -> attribute list; case: mapper -> Typedtree.case -> case; cases: mapper -> Typedtree.case list -> case list; - class_declaration: mapper -> Typedtree.class_declaration -> class_declaration; - class_description: mapper -> Typedtree.class_description -> class_description; - class_expr: mapper -> Typedtree.class_expr -> class_expr; - class_field: mapper -> Typedtree.class_field -> class_field; class_signature: mapper -> Typedtree.class_signature -> class_signature; - class_structure: mapper -> Typedtree.class_structure -> class_structure; class_type: mapper -> Typedtree.class_type -> class_type; class_type_declaration: mapper -> Typedtree.class_type_declaration -> class_type_declaration; diff --git a/analysis/vendor/res_outcome_printer/dune b/analysis/vendor/res_outcome_printer/dune index 78366aeb9..1503fe88e 100644 --- a/analysis/vendor/res_outcome_printer/dune +++ b/analysis/vendor/res_outcome_printer/dune @@ -2,5 +2,6 @@ (name outcomeprinter) (flags (-w "+26+27+32+33+39") - (-open Compilerlibs406)) - (libraries compilerlibs406)) + (-open Ml) + (-open Ext)) + (libraries ml ext)) diff --git a/analysis/vendor/res_outcome_printer/react_jsx_common.ml b/analysis/vendor/res_outcome_printer/react_jsx_common.ml new file mode 100644 index 000000000..ae4a529d6 --- /dev/null +++ b/analysis/vendor/res_outcome_printer/react_jsx_common.ml @@ -0,0 +1,65 @@ +open Asttypes +open Parsetree + +type jsxConfig = { + mutable version: int; + mutable module_: string; + mutable mode: string; + mutable nestedModules: string list; + mutable hasReactComponent: bool; +} + +(* Helper method to look up the [@react.component] attribute *) +let hasAttr (loc, _) = loc.txt = "react.component" + +(* Iterate over the attributes and try to find the [@react.component] attribute *) +let hasAttrOnBinding {pvb_attributes} = + List.find_opt hasAttr pvb_attributes <> None + +let coreTypeOfAttrs attributes = + List.find_map + (fun ({txt}, payload) -> + match (txt, payload) with + | "react.component", PTyp coreType -> Some coreType + | _ -> None) + attributes + +let typVarsOfCoreType {ptyp_desc} = + match ptyp_desc with + | Ptyp_constr (_, coreTypes) -> + List.filter + (fun {ptyp_desc} -> + match ptyp_desc with + | Ptyp_var _ -> true + | _ -> false) + coreTypes + | _ -> [] + +let raiseError ~loc msg = Location.raise_errorf ~loc msg + +let raiseErrorMultipleReactComponent ~loc = + raiseError ~loc + "Only one component definition is allowed for each module. Move to a \ + submodule or other file if necessary." + +let optionalAttr = ({txt = "res.optional"; loc = Location.none}, PStr []) + +let extractUncurried typ = + if Ast_uncurried.typeIsUncurriedFun typ then + let _arity, t = Ast_uncurried.typeExtractUncurriedFun typ in + t + else typ + +let removeArity binding = + let rec removeArityRecord expr = + match expr.pexp_desc with + | _ when Ast_uncurried.exprIsUncurriedFun expr -> + Ast_uncurried.exprExtractUncurriedFun expr + | Pexp_apply (forwardRef, [(label, e)]) -> + { + expr with + pexp_desc = Pexp_apply (forwardRef, [(label, removeArityRecord e)]); + } + | _ -> expr + in + {binding with pvb_expr = removeArityRecord binding.pvb_expr} diff --git a/analysis/vendor/res_outcome_printer/reactjs_jsx_ppx.ml b/analysis/vendor/res_outcome_printer/reactjs_jsx_ppx.ml new file mode 100644 index 000000000..f6449a6cc --- /dev/null +++ b/analysis/vendor/res_outcome_printer/reactjs_jsx_ppx.ml @@ -0,0 +1,168 @@ +open Ast_mapper +open Asttypes +open Parsetree +open Longident + +let getPayloadFields payload = + match payload with + | PStr + ({ + pstr_desc = + Pstr_eval ({pexp_desc = Pexp_record (recordFields, None)}, _); + } + :: _rest) -> + recordFields + | _ -> [] + +type configKey = Int | String + +let getJsxConfigByKey ~key ~type_ recordFields = + let values = + List.filter_map + (fun ((lid, expr) : Longident.t Location.loc * expression) -> + match (type_, lid, expr) with + | ( Int, + {txt = Lident k}, + {pexp_desc = Pexp_constant (Pconst_integer (value, None))} ) + when k = key -> + Some value + | ( String, + {txt = Lident k}, + (* accept both normal strings and "js" strings *) + {pexp_desc = Pexp_constant (Pconst_string (value, _))} ) + when k = key -> + Some value + | _ -> None) + recordFields + in + match values with + | [] -> None + | [v] | v :: _ -> Some v + +let getInt ~key fields = + match fields |> getJsxConfigByKey ~key ~type_:Int with + | None -> None + | Some s -> int_of_string_opt s + +let getString ~key fields = fields |> getJsxConfigByKey ~key ~type_:String + +let updateConfig config payload = + let fields = getPayloadFields payload in + (match getInt ~key:"version" fields with + | None -> () + | Some i -> config.React_jsx_common.version <- i); + (match getString ~key:"module" fields with + | None -> () + | Some s -> config.module_ <- s); + match getString ~key:"mode" fields with + | None -> () + | Some s -> config.mode <- s + +let isJsxConfigAttr ((loc, _) : attribute) = loc.txt = "jsxConfig" + +let processConfigAttribute attribute config = + if isJsxConfigAttr attribute then updateConfig config (snd attribute) + +let getMapper ~config = + let expr3, module_binding3, transformSignatureItem3, transformStructureItem3 = + Reactjs_jsx_v3.jsxMapper ~config + in + let expr4, module_binding4, transformSignatureItem4, transformStructureItem4 = + Reactjs_jsx_v4.jsxMapper ~config + in + + let expr mapper e = + match config.version with + | 3 -> expr3 mapper e + | 4 -> expr4 mapper e + | _ -> default_mapper.expr mapper e + in + let module_binding mapper mb = + match config.version with + | 3 -> module_binding3 mapper mb + | 4 -> module_binding4 mapper mb + | _ -> default_mapper.module_binding mapper mb + in + let saveConfig () = + { + config with + version = config.version; + module_ = config.module_; + mode = config.mode; + hasReactComponent = config.hasReactComponent; + } + in + let restoreConfig oldConfig = + config.version <- oldConfig.React_jsx_common.version; + config.module_ <- oldConfig.module_; + config.mode <- oldConfig.mode; + config.hasReactComponent <- oldConfig.hasReactComponent + in + let signature mapper items = + let oldConfig = saveConfig () in + config.hasReactComponent <- false; + let result = + List.map + (fun item -> + (match item.psig_desc with + | Psig_attribute attr -> processConfigAttribute attr config + | _ -> ()); + let item = default_mapper.signature_item mapper item in + if config.version = 3 then transformSignatureItem3 item + else if config.version = 4 then transformSignatureItem4 item + else [item]) + items + |> List.flatten + in + restoreConfig oldConfig; + result + in + let structure mapper items = + let oldConfig = saveConfig () in + config.hasReactComponent <- false; + let result = + List.map + (fun item -> + (match item.pstr_desc with + | Pstr_attribute attr -> processConfigAttribute attr config + | _ -> ()); + let item = default_mapper.structure_item mapper item in + if config.version = 3 then transformStructureItem3 item + else if config.version = 4 then transformStructureItem4 item + else [item]) + items + |> List.flatten + in + restoreConfig oldConfig; + result + in + + {default_mapper with expr; module_binding; signature; structure} + +let rewrite_implementation ~jsxVersion ~jsxModule ~jsxMode + (code : Parsetree.structure) : Parsetree.structure = + let config = + { + React_jsx_common.version = jsxVersion; + module_ = jsxModule; + mode = jsxMode; + nestedModules = []; + hasReactComponent = false; + } + in + let mapper = getMapper ~config in + mapper.structure mapper code + +let rewrite_signature ~jsxVersion ~jsxModule ~jsxMode + (code : Parsetree.signature) : Parsetree.signature = + let config = + { + React_jsx_common.version = jsxVersion; + module_ = jsxModule; + mode = jsxMode; + nestedModules = []; + hasReactComponent = false; + } + in + let mapper = getMapper ~config in + mapper.signature mapper code diff --git a/analysis/vendor/res_outcome_printer/reactjs_jsx_ppx.mli b/analysis/vendor/res_outcome_printer/reactjs_jsx_ppx.mli new file mode 100644 index 000000000..388202edb --- /dev/null +++ b/analysis/vendor/res_outcome_printer/reactjs_jsx_ppx.mli @@ -0,0 +1,23 @@ +(* + This is the module that handles turning Reason JSX' agnostic function call into + a ReasonReact-specific function call. Aka, this is a macro, using OCaml's ppx + facilities; https://whitequark.org/blog/2014/04/16/a-guide-to-extension- + points-in-ocaml/ + You wouldn't use this file directly; it's used by ReScript's + bsconfig.json. Specifically, there's a field called `react-jsx` inside the + field `reason`, which enables this ppx through some internal call in bsb +*) + +val rewrite_implementation : + jsxVersion:int -> + jsxModule:string -> + jsxMode:string -> + Parsetree.structure -> + Parsetree.structure + +val rewrite_signature : + jsxVersion:int -> + jsxModule:string -> + jsxMode:string -> + Parsetree.signature -> + Parsetree.signature diff --git a/analysis/vendor/res_outcome_printer/reactjs_jsx_v3.ml b/analysis/vendor/res_outcome_printer/reactjs_jsx_v3.ml new file mode 100644 index 000000000..d24b3a2d2 --- /dev/null +++ b/analysis/vendor/res_outcome_printer/reactjs_jsx_v3.ml @@ -0,0 +1,1188 @@ +open Ast_helper +open Ast_mapper +open Asttypes +open Parsetree +open Longident + +let nolabel = Nolabel + +let labelled str = Labelled str + +let optional str = Optional str + +let isOptional str = + match str with + | Optional _ -> true + | _ -> false + +let isLabelled str = + match str with + | Labelled _ -> true + | _ -> false + +let getLabel str = + match str with + | Optional str | Labelled str -> str + | Nolabel -> "" + +let optionIdent = Lident "option" + +let constantString ~loc str = + Ast_helper.Exp.constant ~loc (Pconst_string (str, None)) + +let safeTypeFromValue valueStr = + let valueStr = getLabel valueStr in + if valueStr = "" || (valueStr.[0] [@doesNotRaise]) <> '_' then valueStr + else "T" ^ valueStr + +let keyType loc = + Typ.constr ~loc {loc; txt = optionIdent} + [Typ.constr ~loc {loc; txt = Lident "string"} []] + +type 'a children = ListLiteral of 'a | Exact of 'a + +type componentConfig = {propsName: string} + +(* if children is a list, convert it to an array while mapping each element. If not, just map over it, as usual *) +let transformChildrenIfListUpper ~loc ~mapper theList = + let rec transformChildren_ theList accum = + (* not in the sense of converting a list to an array; convert the AST + reprensentation of a list to the AST reprensentation of an array *) + match theList with + | {pexp_desc = Pexp_construct ({txt = Lident "[]"}, None)} -> ( + match accum with + | [singleElement] -> Exact singleElement + | accum -> ListLiteral (Exp.array ~loc (List.rev accum))) + | { + pexp_desc = + Pexp_construct + ({txt = Lident "::"}, Some {pexp_desc = Pexp_tuple [v; acc]}); + } -> + transformChildren_ acc (mapper.expr mapper v :: accum) + | notAList -> Exact (mapper.expr mapper notAList) + in + transformChildren_ theList [] + +let transformChildrenIfList ~loc ~mapper theList = + let rec transformChildren_ theList accum = + (* not in the sense of converting a list to an array; convert the AST + reprensentation of a list to the AST reprensentation of an array *) + match theList with + | {pexp_desc = Pexp_construct ({txt = Lident "[]"}, None)} -> + Exp.array ~loc (List.rev accum) + | { + pexp_desc = + Pexp_construct + ({txt = Lident "::"}, Some {pexp_desc = Pexp_tuple [v; acc]}); + } -> + transformChildren_ acc (mapper.expr mapper v :: accum) + | notAList -> mapper.expr mapper notAList + in + transformChildren_ theList [] + +let extractChildren ?(removeLastPositionUnit = false) ~loc propsAndChildren = + let rec allButLast_ lst acc = + match lst with + | [] -> [] + | [(Nolabel, {pexp_desc = Pexp_construct ({txt = Lident "()"}, None)})] -> + acc + | (Nolabel, {pexp_loc}) :: _rest -> + React_jsx_common.raiseError ~loc:pexp_loc + "JSX: found non-labelled argument before the last position" + | arg :: rest -> allButLast_ rest (arg :: acc) + in + let allButLast lst = allButLast_ lst [] |> List.rev in + match + List.partition + (fun (label, _) -> label = labelled "children") + propsAndChildren + with + | [], props -> + (* no children provided? Place a placeholder list *) + ( Exp.construct ~loc {loc; txt = Lident "[]"} None, + if removeLastPositionUnit then allButLast props else props ) + | [(_, childrenExpr)], props -> + (childrenExpr, if removeLastPositionUnit then allButLast props else props) + | _ -> + React_jsx_common.raiseError ~loc + "JSX: somehow there's more than one `children` label" + +let unerasableIgnore loc = + ( {loc; txt = "warning"}, + PStr [Str.eval (Exp.constant (Pconst_string ("-16", None)))] ) + +let merlinFocus = ({loc = Location.none; txt = "merlin.focus"}, PStr []) + +(* Helper method to filter out any attribute that isn't [@react.component] *) +let otherAttrsPure (loc, _) = loc.txt <> "react.component" + +(* Finds the name of the variable the binding is assigned to, otherwise raises Invalid_argument *) +let rec getFnName binding = + match binding with + | {ppat_desc = Ppat_var {txt}} -> txt + | {ppat_desc = Ppat_constraint (pat, _)} -> getFnName pat + | {ppat_loc} -> + React_jsx_common.raiseError ~loc:ppat_loc + "react.component calls cannot be destructured." + +let makeNewBinding binding expression newName = + match binding with + | {pvb_pat = {ppat_desc = Ppat_var ppat_var} as pvb_pat} -> + { + binding with + pvb_pat = + {pvb_pat with ppat_desc = Ppat_var {ppat_var with txt = newName}}; + pvb_expr = expression; + pvb_attributes = [merlinFocus]; + } + | {pvb_loc} -> + React_jsx_common.raiseError ~loc:pvb_loc + "react.component calls cannot be destructured." + +(* Lookup the value of `props` otherwise raise Invalid_argument error *) +let getPropsNameValue _acc (loc, exp) = + match (loc, exp) with + | {txt = Lident "props"}, {pexp_desc = Pexp_ident {txt = Lident str}} -> + {propsName = str} + | {txt; loc}, _ -> + React_jsx_common.raiseError ~loc + "react.component only accepts props as an option, given: { %s }" + (Longident.last txt) + +(* Lookup the `props` record or string as part of [@react.component] and store the name for use when rewriting *) +let getPropsAttr payload = + let defaultProps = {propsName = "Props"} in + match payload with + | Some + (PStr + ({ + pstr_desc = + Pstr_eval ({pexp_desc = Pexp_record (recordFields, None)}, _); + } + :: _rest)) -> + List.fold_left getPropsNameValue defaultProps recordFields + | Some + (PStr + ({ + pstr_desc = + Pstr_eval ({pexp_desc = Pexp_ident {txt = Lident "props"}}, _); + } + :: _rest)) -> + {propsName = "props"} + | Some (PStr ({pstr_desc = Pstr_eval (_, _); pstr_loc} :: _rest)) -> + React_jsx_common.raiseError ~loc:pstr_loc + "react.component accepts a record config with props as an options." + | _ -> defaultProps + +(* Plucks the label, loc, and type_ from an AST node *) +let pluckLabelDefaultLocType (label, default, _, _, loc, type_) = + (label, default, loc, type_) + +(* Lookup the filename from the location information on the AST node and turn it into a valid module identifier *) +let filenameFromLoc (pstr_loc : Location.t) = + let fileName = + match pstr_loc.loc_start.pos_fname with + | "" -> !Location.input_name + | fileName -> fileName + in + let fileName = + try Filename.chop_extension (Filename.basename fileName) + with Invalid_argument _ -> fileName + in + let fileName = String.capitalize_ascii fileName in + fileName + +(* Build a string representation of a module name with segments separated by $ *) +let makeModuleName fileName nestedModules fnName = + let fullModuleName = + match (fileName, nestedModules, fnName) with + (* TODO: is this even reachable? It seems like the fileName always exists *) + | "", nestedModules, "make" -> nestedModules + | "", nestedModules, fnName -> List.rev (fnName :: nestedModules) + | fileName, nestedModules, "make" -> fileName :: List.rev nestedModules + | fileName, nestedModules, fnName -> + fileName :: List.rev (fnName :: nestedModules) + in + let fullModuleName = String.concat "$" fullModuleName in + fullModuleName + +(* + AST node builders + These functions help us build AST nodes that are needed when transforming a [@react.component] into a + constructor and a props external +*) + +(* Build an AST node representing all named args for the `external` definition for a component's props *) +let rec recursivelyMakeNamedArgsForExternal list args = + match list with + | (label, default, loc, interiorType) :: tl -> + recursivelyMakeNamedArgsForExternal tl + (Typ.arrow ~loc label + (match (label, interiorType, default) with + (* ~foo=1 *) + | label, None, Some _ -> + { + ptyp_desc = Ptyp_var (safeTypeFromValue label); + ptyp_loc = loc; + ptyp_attributes = []; + } + (* ~foo: int=1 *) + | _label, Some type_, Some _ -> type_ + (* ~foo: option(int)=? *) + | ( label, + Some {ptyp_desc = Ptyp_constr ({txt = Lident "option"}, [type_])}, + _ ) + | ( label, + Some + { + ptyp_desc = + Ptyp_constr + ({txt = Ldot (Lident "*predef*", "option")}, [type_]); + }, + _ ) + (* ~foo: int=? - note this isnt valid. but we want to get a type error *) + | label, Some type_, _ + when isOptional label -> + type_ + (* ~foo=? *) + | label, None, _ when isOptional label -> + { + ptyp_desc = Ptyp_var (safeTypeFromValue label); + ptyp_loc = loc; + ptyp_attributes = []; + } + (* ~foo *) + | label, None, _ -> + { + ptyp_desc = Ptyp_var (safeTypeFromValue label); + ptyp_loc = loc; + ptyp_attributes = []; + } + | _label, Some type_, _ -> type_) + args) + | [] -> args + +(* Build an AST node for the [@bs.obj] representing props for a component *) +let makePropsValue fnName loc namedArgListWithKeyAndRef propsType = + let propsName = fnName ^ "Props" in + { + pval_name = {txt = propsName; loc}; + pval_type = + recursivelyMakeNamedArgsForExternal namedArgListWithKeyAndRef + (Typ.arrow nolabel + { + ptyp_desc = Ptyp_constr ({txt = Lident "unit"; loc}, []); + ptyp_loc = loc; + ptyp_attributes = []; + } + propsType); + pval_prim = [""]; + pval_attributes = [({txt = "bs.obj"; loc}, PStr [])]; + pval_loc = loc; + } + +(* Build an AST node representing an `external` with the definition of the [@bs.obj] *) +let makePropsExternal fnName loc namedArgListWithKeyAndRef propsType = + { + pstr_loc = loc; + pstr_desc = + Pstr_primitive + (makePropsValue fnName loc namedArgListWithKeyAndRef propsType); + } + +(* Build an AST node for the signature of the `external` definition *) +let makePropsExternalSig fnName loc namedArgListWithKeyAndRef propsType = + { + psig_loc = loc; + psig_desc = + Psig_value (makePropsValue fnName loc namedArgListWithKeyAndRef propsType); + } + +(* Build an AST node for the props name when converted to an object inside the function signature *) +let makePropsName ~loc name = + {ppat_desc = Ppat_var {txt = name; loc}; ppat_loc = loc; ppat_attributes = []} + +let makeObjectField loc (str, attrs, type_) = + Otag ({loc; txt = str}, attrs, type_) + +(* Build an AST node representing a "closed" object representing a component's props *) +let makePropsType ~loc namedTypeList = + Typ.mk ~loc + (Ptyp_object (List.map (makeObjectField loc) namedTypeList, Closed)) + +(* Builds an AST node for the entire `external` definition of props *) +let makeExternalDecl fnName loc namedArgListWithKeyAndRef namedTypeList = + makePropsExternal fnName loc + (List.map pluckLabelDefaultLocType namedArgListWithKeyAndRef) + (makePropsType ~loc namedTypeList) + +let newtypeToVar newtype type_ = + let var_desc = Ptyp_var ("type-" ^ newtype) in + let typ (mapper : Ast_mapper.mapper) typ = + match typ.ptyp_desc with + | Ptyp_constr ({txt = Lident name}, _) when name = newtype -> + {typ with ptyp_desc = var_desc} + | _ -> Ast_mapper.default_mapper.typ mapper typ + in + let mapper = {Ast_mapper.default_mapper with typ} in + mapper.typ mapper type_ + +(* TODO: some line number might still be wrong *) +let jsxMapper ~config = + let transformUppercaseCall3 modulePath mapper loc attrs _ callArguments = + let children, argsWithLabels = + extractChildren ~loc ~removeLastPositionUnit:true callArguments + in + let argsForMake = argsWithLabels in + let childrenExpr = transformChildrenIfListUpper ~loc ~mapper children in + let recursivelyTransformedArgsForMake = + argsForMake + |> List.map (fun (label, expression) -> + (label, mapper.expr mapper expression)) + in + let childrenArg = ref None in + let args = + recursivelyTransformedArgsForMake + @ (match childrenExpr with + | Exact children -> [(labelled "children", children)] + | ListLiteral {pexp_desc = Pexp_array list} when list = [] -> [] + | ListLiteral expression -> + (* this is a hack to support react components that introspect into their children *) + childrenArg := Some expression; + [ + ( labelled "children", + Exp.ident ~loc {loc; txt = Ldot (Lident "React", "null")} ); + ]) + @ [(nolabel, Exp.construct ~loc {loc; txt = Lident "()"} None)] + in + let isCap str = String.capitalize_ascii str = str in + let ident = + match modulePath with + | Lident _ -> Ldot (modulePath, "make") + | Ldot (_modulePath, value) as fullPath when isCap value -> + Ldot (fullPath, "make") + | modulePath -> modulePath + in + let propsIdent = + match ident with + | Lident path -> Lident (path ^ "Props") + | Ldot (ident, path) -> Ldot (ident, path ^ "Props") + | _ -> + React_jsx_common.raiseError ~loc + "JSX name can't be the result of function applications" + in + let props = + Exp.apply ~attrs ~loc (Exp.ident ~loc {loc; txt = propsIdent}) args + in + (* handle key, ref, children *) + (* React.createElement(Component.make, props, ...children) *) + match !childrenArg with + | None -> + Exp.apply ~loc ~attrs + (Exp.ident ~loc {loc; txt = Ldot (Lident "React", "createElement")}) + [(nolabel, Exp.ident ~loc {txt = ident; loc}); (nolabel, props)] + | Some children -> + Exp.apply ~loc ~attrs + (Exp.ident ~loc + {loc; txt = Ldot (Lident "React", "createElementVariadic")}) + [ + (nolabel, Exp.ident ~loc {txt = ident; loc}); + (nolabel, props); + (nolabel, children); + ] + in + + let transformLowercaseCall3 mapper loc attrs callArguments id = + let children, nonChildrenProps = extractChildren ~loc callArguments in + let componentNameExpr = constantString ~loc id in + let childrenExpr = transformChildrenIfList ~loc ~mapper children in + let createElementCall = + match children with + (* [@JSX] div(~children=[a]), coming from
a
*) + | { + pexp_desc = + ( Pexp_construct ({txt = Lident "::"}, Some {pexp_desc = Pexp_tuple _}) + | Pexp_construct ({txt = Lident "[]"}, None) ); + } -> + "createDOMElementVariadic" + (* [@JSX] div(~children= value), coming from
...(value)
*) + | {pexp_loc} -> + React_jsx_common.raiseError ~loc:pexp_loc + "A spread as a DOM element's children don't make sense written \ + together. You can simply remove the spread." + in + let args = + match nonChildrenProps with + | [_justTheUnitArgumentAtEnd] -> + [ + (* "div" *) + (nolabel, componentNameExpr); + (* [|moreCreateElementCallsHere|] *) + (nolabel, childrenExpr); + ] + | nonEmptyProps -> + let propsCall = + Exp.apply ~loc + (Exp.ident ~loc {loc; txt = Ldot (Lident "ReactDOMRe", "domProps")}) + (nonEmptyProps + |> List.map (fun (label, expression) -> + (label, mapper.expr mapper expression))) + in + [ + (* "div" *) + (nolabel, componentNameExpr); + (* ReactDOMRe.props(~className=blabla, ~foo=bar, ()) *) + (labelled "props", propsCall); + (* [|moreCreateElementCallsHere|] *) + (nolabel, childrenExpr); + ] + in + Exp.apply + ~loc (* throw away the [@JSX] attribute and keep the others, if any *) + ~attrs + (* ReactDOMRe.createElement *) + (Exp.ident ~loc + {loc; txt = Ldot (Lident "ReactDOMRe", createElementCall)}) + args + in + + let rec recursivelyTransformNamedArgsForMake expr args newtypes = + match expr.pexp_desc with + (* TODO: make this show up with a loc. *) + | Pexp_fun (Labelled "key", _, _, _) | Pexp_fun (Optional "key", _, _, _) -> + React_jsx_common.raiseError ~loc:expr.pexp_loc + "Key cannot be accessed inside of a component. Don't worry - you can \ + always key a component from its parent!" + | Pexp_fun (Labelled "ref", _, _, _) | Pexp_fun (Optional "ref", _, _, _) -> + React_jsx_common.raiseError ~loc:expr.pexp_loc + "Ref cannot be passed as a normal prop. Either give the prop a \ + different name or use the `forwardRef` API instead." + | Pexp_fun (arg, default, pattern, expression) + when isOptional arg || isLabelled arg -> + let () = + match (isOptional arg, pattern, default) with + | true, {ppat_desc = Ppat_constraint (_, {ptyp_desc})}, None -> ( + match ptyp_desc with + | Ptyp_constr ({txt = Lident "option"}, [_]) -> () + | _ -> + let currentType = + match ptyp_desc with + | Ptyp_constr ({txt}, []) -> + String.concat "." (Longident.flatten txt) + | Ptyp_constr ({txt}, _innerTypeArgs) -> + String.concat "." (Longident.flatten txt) ^ "(...)" + | _ -> "..." + in + Location.prerr_warning pattern.ppat_loc + (Preprocessor + (Printf.sprintf + "React: optional argument annotations must have explicit \ + `option`. Did you mean `option(%s)=?`?" + currentType))) + | _ -> () + in + let alias = + match pattern with + | {ppat_desc = Ppat_alias (_, {txt}) | Ppat_var {txt}} -> txt + | {ppat_desc = Ppat_any} -> "_" + | _ -> getLabel arg + in + let type_ = + match pattern with + | {ppat_desc = Ppat_constraint (_, type_)} -> Some type_ + | _ -> None + in + + recursivelyTransformNamedArgsForMake expression + ((arg, default, pattern, alias, pattern.ppat_loc, type_) :: args) + newtypes + | Pexp_fun + ( Nolabel, + _, + {ppat_desc = Ppat_construct ({txt = Lident "()"}, _) | Ppat_any}, + _expression ) -> + (args, newtypes, None) + | Pexp_fun + ( Nolabel, + _, + { + ppat_desc = + Ppat_var {txt} | Ppat_constraint ({ppat_desc = Ppat_var {txt}}, _); + }, + _expression ) -> + (args, newtypes, Some txt) + | Pexp_fun (Nolabel, _, pattern, _expression) -> + Location.raise_errorf ~loc:pattern.ppat_loc + "React: react.component refs only support plain arguments and type \ + annotations." + | Pexp_newtype (label, expression) -> + recursivelyTransformNamedArgsForMake expression args (label :: newtypes) + | Pexp_constraint (expression, _typ) -> + recursivelyTransformNamedArgsForMake expression args newtypes + | _ -> (args, newtypes, None) + in + + let argToType types (name, default, _noLabelName, _alias, loc, type_) = + match (type_, name, default) with + | Some {ptyp_desc = Ptyp_constr ({txt = Lident "option"}, [type_])}, name, _ + when isOptional name -> + ( getLabel name, + [], + { + type_ with + ptyp_desc = + Ptyp_constr ({loc = type_.ptyp_loc; txt = optionIdent}, [type_]); + } ) + :: types + | Some type_, name, Some _default -> + ( getLabel name, + [], + { + ptyp_desc = Ptyp_constr ({loc; txt = optionIdent}, [type_]); + ptyp_loc = loc; + ptyp_attributes = []; + } ) + :: types + | Some type_, name, _ -> (getLabel name, [], type_) :: types + | None, name, _ when isOptional name -> + ( getLabel name, + [], + { + ptyp_desc = + Ptyp_constr + ( {loc; txt = optionIdent}, + [ + { + ptyp_desc = Ptyp_var (safeTypeFromValue name); + ptyp_loc = loc; + ptyp_attributes = []; + }; + ] ); + ptyp_loc = loc; + ptyp_attributes = []; + } ) + :: types + | None, name, _ when isLabelled name -> + ( getLabel name, + [], + { + ptyp_desc = Ptyp_var (safeTypeFromValue name); + ptyp_loc = loc; + ptyp_attributes = []; + } ) + :: types + | _ -> types + in + + let argToConcreteType types (name, loc, type_) = + match name with + | name when isLabelled name -> (getLabel name, [], type_) :: types + | name when isOptional name -> + (getLabel name, [], Typ.constr ~loc {loc; txt = optionIdent} [type_]) + :: types + | _ -> types + in + + let nestedModules = ref [] in + let transformStructureItem item = + match item with + (* external *) + | { + pstr_loc; + pstr_desc = + Pstr_primitive + ({pval_name = {txt = fnName}; pval_attributes; pval_type} as + value_description); + } as pstr -> ( + match List.filter React_jsx_common.hasAttr pval_attributes with + | [] -> [item] + | [_] -> + let rec getPropTypes types ({ptyp_loc; ptyp_desc} as fullType) = + match ptyp_desc with + | Ptyp_arrow (name, type_, ({ptyp_desc = Ptyp_arrow _} as rest)) + when isLabelled name || isOptional name -> + getPropTypes ((name, ptyp_loc, type_) :: types) rest + | Ptyp_arrow (Nolabel, _type, rest) -> getPropTypes types rest + | Ptyp_arrow (name, type_, returnValue) + when isLabelled name || isOptional name -> + (returnValue, (name, returnValue.ptyp_loc, type_) :: types) + | _ -> (fullType, types) + in + let innerType, propTypes = getPropTypes [] pval_type in + let namedTypeList = List.fold_left argToConcreteType [] propTypes in + let pluckLabelAndLoc (label, loc, type_) = + (label, None (* default *), loc, Some type_) + in + let retPropsType = makePropsType ~loc:pstr_loc namedTypeList in + let externalPropsDecl = + makePropsExternal fnName pstr_loc + ((optional "key", None, pstr_loc, Some (keyType pstr_loc)) + :: List.map pluckLabelAndLoc propTypes) + retPropsType + in + (* can't be an arrow because it will defensively uncurry *) + let newExternalType = + Ptyp_constr + ( {loc = pstr_loc; txt = Ldot (Lident "React", "componentLike")}, + [retPropsType; innerType] ) + in + let newStructure = + { + pstr with + pstr_desc = + Pstr_primitive + { + value_description with + pval_type = {pval_type with ptyp_desc = newExternalType}; + pval_attributes = List.filter otherAttrsPure pval_attributes; + }; + } + in + [externalPropsDecl; newStructure] + | _ -> + React_jsx_common.raiseError ~loc:pstr_loc + "Only one react.component call can exist on a component at one time") + (* let component = ... *) + | {pstr_loc; pstr_desc = Pstr_value (recFlag, valueBindings)} -> ( + let fileName = filenameFromLoc pstr_loc in + let emptyLoc = Location.in_file fileName in + let mapBinding binding = + if React_jsx_common.hasAttrOnBinding binding then + let bindingLoc = binding.pvb_loc in + let bindingPatLoc = binding.pvb_pat.ppat_loc in + let binding = + { + binding with + pvb_pat = {binding.pvb_pat with ppat_loc = emptyLoc}; + pvb_loc = emptyLoc; + } + in + let fnName = getFnName binding.pvb_pat in + let internalFnName = fnName ^ "$Internal" in + let fullModuleName = makeModuleName fileName !nestedModules fnName in + let modifiedBindingOld binding = + let expression = binding.pvb_expr in + (* TODO: there is a long-tail of unsupported features inside of blocks - Pexp_letmodule , Pexp_letexception , Pexp_ifthenelse *) + let rec spelunkForFunExpression expression = + match expression with + (* let make = (~prop) => ... *) + | {pexp_desc = Pexp_fun _} | {pexp_desc = Pexp_newtype _} -> + expression + (* let make = {let foo = bar in (~prop) => ...} *) + | {pexp_desc = Pexp_let (_recursive, _vbs, returnExpression)} -> + (* here's where we spelunk! *) + spelunkForFunExpression returnExpression + (* let make = React.forwardRef((~prop) => ...) *) + | { + pexp_desc = + Pexp_apply + (_wrapperExpression, [(Nolabel, innerFunctionExpression)]); + } -> + spelunkForFunExpression innerFunctionExpression + | { + pexp_desc = + Pexp_sequence (_wrapperExpression, innerFunctionExpression); + } -> + spelunkForFunExpression innerFunctionExpression + | {pexp_desc = Pexp_constraint (innerFunctionExpression, _typ)} -> + spelunkForFunExpression innerFunctionExpression + | {pexp_loc} -> + React_jsx_common.raiseError ~loc:pexp_loc + "react.component calls can only be on function definitions \ + or component wrappers (forwardRef, memo)." + in + spelunkForFunExpression expression + in + let modifiedBinding binding = + let hasApplication = ref false in + let wrapExpressionWithBinding expressionFn expression = + Vb.mk ~loc:bindingLoc + ~attrs:(List.filter otherAttrsPure binding.pvb_attributes) + (Pat.var ~loc:bindingPatLoc {loc = bindingPatLoc; txt = fnName}) + (expressionFn expression) + in + let expression = binding.pvb_expr in + let unerasableIgnoreExp exp = + { + exp with + pexp_attributes = + unerasableIgnore emptyLoc :: exp.pexp_attributes; + } + in + (* TODO: there is a long-tail of unsupported features inside of blocks - Pexp_letmodule , Pexp_letexception , Pexp_ifthenelse *) + let rec spelunkForFunExpression expression = + match expression with + (* let make = (~prop) => ... with no final unit *) + | { + pexp_desc = + Pexp_fun + ( ((Labelled _ | Optional _) as label), + default, + pattern, + ({pexp_desc = Pexp_fun _} as internalExpression) ); + } -> + let wrap, hasUnit, exp = + spelunkForFunExpression internalExpression + in + ( wrap, + hasUnit, + unerasableIgnoreExp + { + expression with + pexp_desc = Pexp_fun (label, default, pattern, exp); + } ) + (* let make = (()) => ... *) + (* let make = (_) => ... *) + | { + pexp_desc = + Pexp_fun + ( Nolabel, + _default, + { + ppat_desc = + Ppat_construct ({txt = Lident "()"}, _) | Ppat_any; + }, + _internalExpression ); + } -> + ((fun a -> a), true, expression) + (* let make = (~prop) => ... *) + | { + pexp_desc = + Pexp_fun + ( (Labelled _ | Optional _), + _default, + _pattern, + _internalExpression ); + } -> + ((fun a -> a), false, unerasableIgnoreExp expression) + (* let make = (prop) => ... *) + | { + pexp_desc = + Pexp_fun (_nolabel, _default, pattern, _internalExpression); + } -> + if hasApplication.contents then + ((fun a -> a), false, unerasableIgnoreExp expression) + else + Location.raise_errorf ~loc:pattern.ppat_loc + "React: props need to be labelled arguments.\n\ + \ If you are working with refs be sure to wrap with \ + React.forwardRef.\n\ + \ If your component doesn't have any props use () or _ \ + instead of a name." + (* let make = {let foo = bar in (~prop) => ...} *) + | {pexp_desc = Pexp_let (recursive, vbs, internalExpression)} -> + (* here's where we spelunk! *) + let wrap, hasUnit, exp = + spelunkForFunExpression internalExpression + in + ( wrap, + hasUnit, + {expression with pexp_desc = Pexp_let (recursive, vbs, exp)} + ) + (* let make = React.forwardRef((~prop) => ...) *) + | { + pexp_desc = + Pexp_apply (wrapperExpression, [(Nolabel, internalExpression)]); + } -> + let () = hasApplication := true in + let _, hasUnit, exp = + spelunkForFunExpression internalExpression + in + ( (fun exp -> Exp.apply wrapperExpression [(nolabel, exp)]), + hasUnit, + exp ) + | { + pexp_desc = Pexp_sequence (wrapperExpression, internalExpression); + } -> + let wrap, hasUnit, exp = + spelunkForFunExpression internalExpression + in + ( wrap, + hasUnit, + { + expression with + pexp_desc = Pexp_sequence (wrapperExpression, exp); + } ) + | e -> ((fun a -> a), false, e) + in + let wrapExpression, hasUnit, expression = + spelunkForFunExpression expression + in + (wrapExpressionWithBinding wrapExpression, hasUnit, expression) + in + let bindingWrapper, hasUnit, expression = modifiedBinding binding in + let reactComponentAttribute = + try Some (List.find React_jsx_common.hasAttr binding.pvb_attributes) + with Not_found -> None + in + let _attr_loc, payload = + match reactComponentAttribute with + | Some (loc, payload) -> (loc.loc, Some payload) + | None -> (emptyLoc, None) + in + let props = getPropsAttr payload in + (* do stuff here! *) + let namedArgList, newtypes, forwardRef = + recursivelyTransformNamedArgsForMake + (modifiedBindingOld binding) + [] [] + in + let namedArgListWithKeyAndRef = + ( optional "key", + None, + Pat.var {txt = "key"; loc = emptyLoc}, + "key", + emptyLoc, + Some (keyType emptyLoc) ) + :: namedArgList + in + let namedArgListWithKeyAndRef = + match forwardRef with + | Some _ -> + ( optional "ref", + None, + Pat.var {txt = "key"; loc = emptyLoc}, + "ref", + emptyLoc, + None ) + :: namedArgListWithKeyAndRef + | None -> namedArgListWithKeyAndRef + in + let namedArgListWithKeyAndRefForNew = + match forwardRef with + | Some txt -> + namedArgList + @ [ + ( nolabel, + None, + Pat.var {txt; loc = emptyLoc}, + txt, + emptyLoc, + None ); + ] + | None -> namedArgList + in + let pluckArg (label, _, _, alias, loc, _) = + let labelString = + match label with + | label when isOptional label || isLabelled label -> + getLabel label + | _ -> "" + in + ( label, + match labelString with + | "" -> Exp.ident ~loc {txt = Lident alias; loc} + | labelString -> + Exp.apply ~loc + (Exp.ident ~loc {txt = Lident "##"; loc}) + [ + (nolabel, Exp.ident ~loc {txt = Lident props.propsName; loc}); + (nolabel, Exp.ident ~loc {txt = Lident labelString; loc}); + ] ) + in + let namedTypeList = List.fold_left argToType [] namedArgList in + let loc = emptyLoc in + let externalArgs = + (* translate newtypes to type variables *) + List.fold_left + (fun args newtype -> + List.map + (fun (a, b, c, d, e, maybeTyp) -> + match maybeTyp with + | Some typ -> + (a, b, c, d, e, Some (newtypeToVar newtype.txt typ)) + | None -> (a, b, c, d, e, None)) + args) + namedArgListWithKeyAndRef newtypes + in + let externalTypes = + (* translate newtypes to type variables *) + List.fold_left + (fun args newtype -> + List.map + (fun (a, b, typ) -> (a, b, newtypeToVar newtype.txt typ)) + args) + namedTypeList newtypes + in + let externalDecl = + makeExternalDecl fnName loc externalArgs externalTypes + in + let innerExpressionArgs = + List.map pluckArg namedArgListWithKeyAndRefForNew + @ + if hasUnit then + [(Nolabel, Exp.construct {loc; txt = Lident "()"} None)] + else [] + in + let innerExpression = + Exp.apply + (Exp.ident + { + loc; + txt = + Lident + (match recFlag with + | Recursive -> internalFnName + | Nonrecursive -> fnName); + }) + innerExpressionArgs + in + let innerExpressionWithRef = + match forwardRef with + | Some txt -> + { + innerExpression with + pexp_desc = + Pexp_fun + ( nolabel, + None, + { + ppat_desc = Ppat_var {txt; loc = emptyLoc}; + ppat_loc = emptyLoc; + ppat_attributes = []; + }, + innerExpression ); + } + | None -> innerExpression + in + let fullExpression = + Exp.fun_ nolabel None + { + ppat_desc = + Ppat_constraint + ( makePropsName ~loc:emptyLoc props.propsName, + makePropsType ~loc:emptyLoc externalTypes ); + ppat_loc = emptyLoc; + ppat_attributes = []; + } + innerExpressionWithRef + in + let fullExpression = + match fullModuleName with + | "" -> fullExpression + | txt -> + Exp.let_ Nonrecursive + [ + Vb.mk ~loc:emptyLoc + (Pat.var ~loc:emptyLoc {loc = emptyLoc; txt}) + fullExpression; + ] + (Exp.ident ~loc:emptyLoc {loc = emptyLoc; txt = Lident txt}) + in + let bindings, newBinding = + match recFlag with + | Recursive -> + ( [ + bindingWrapper + (Exp.let_ ~loc:emptyLoc Recursive + [ + makeNewBinding binding expression internalFnName; + Vb.mk + (Pat.var {loc = emptyLoc; txt = fnName}) + fullExpression; + ] + (Exp.ident {loc = emptyLoc; txt = Lident fnName})); + ], + None ) + | Nonrecursive -> + ( [{binding with pvb_expr = expression}], + Some (bindingWrapper fullExpression) ) + in + (Some externalDecl, bindings, newBinding) + else (None, [binding], None) + in + let structuresAndBinding = List.map mapBinding valueBindings in + let otherStructures (extern, binding, newBinding) + (externs, bindings, newBindings) = + let externs = + match extern with + | Some extern -> extern :: externs + | None -> externs + in + let newBindings = + match newBinding with + | Some newBinding -> newBinding :: newBindings + | None -> newBindings + in + (externs, binding @ bindings, newBindings) + in + let externs, bindings, newBindings = + List.fold_right otherStructures structuresAndBinding ([], [], []) + in + externs + @ [{pstr_loc; pstr_desc = Pstr_value (recFlag, bindings)}] + @ + match newBindings with + | [] -> [] + | newBindings -> + [{pstr_loc = emptyLoc; pstr_desc = Pstr_value (recFlag, newBindings)}]) + | _ -> [item] + in + + let transformSignatureItem item = + match item with + | { + psig_loc; + psig_desc = + Psig_value + ({pval_name = {txt = fnName}; pval_attributes; pval_type} as + psig_desc); + } as psig -> ( + match List.filter React_jsx_common.hasAttr pval_attributes with + | [] -> [item] + | [_] -> + let rec getPropTypes types ({ptyp_loc; ptyp_desc} as fullType) = + match ptyp_desc with + | Ptyp_arrow (name, type_, ({ptyp_desc = Ptyp_arrow _} as rest)) + when isOptional name || isLabelled name -> + getPropTypes ((name, ptyp_loc, type_) :: types) rest + | Ptyp_arrow (Nolabel, _type, rest) -> getPropTypes types rest + | Ptyp_arrow (name, type_, returnValue) + when isOptional name || isLabelled name -> + (returnValue, (name, returnValue.ptyp_loc, type_) :: types) + | _ -> (fullType, types) + in + let innerType, propTypes = getPropTypes [] pval_type in + let namedTypeList = List.fold_left argToConcreteType [] propTypes in + let pluckLabelAndLoc (label, loc, type_) = + (label, None, loc, Some type_) + in + let retPropsType = makePropsType ~loc:psig_loc namedTypeList in + let externalPropsDecl = + makePropsExternalSig fnName psig_loc + ((optional "key", None, psig_loc, Some (keyType psig_loc)) + :: List.map pluckLabelAndLoc propTypes) + retPropsType + in + (* can't be an arrow because it will defensively uncurry *) + let newExternalType = + Ptyp_constr + ( {loc = psig_loc; txt = Ldot (Lident "React", "componentLike")}, + [retPropsType; innerType] ) + in + let newStructure = + { + psig with + psig_desc = + Psig_value + { + psig_desc with + pval_type = {pval_type with ptyp_desc = newExternalType}; + pval_attributes = List.filter otherAttrsPure pval_attributes; + }; + } + in + [externalPropsDecl; newStructure] + | _ -> + React_jsx_common.raiseError ~loc:psig_loc + "Only one react.component call can exist on a component at one time") + | _ -> [item] + in + + let transformJsxCall mapper callExpression callArguments attrs = + match callExpression.pexp_desc with + | Pexp_ident caller -> ( + match caller with + | {txt = Lident "createElement"; loc} -> + React_jsx_common.raiseError ~loc + "JSX: `createElement` should be preceeded by a module name." + (* Foo.createElement(~prop1=foo, ~prop2=bar, ~children=[], ()) *) + | {loc; txt = Ldot (modulePath, ("createElement" | "make"))} -> ( + match config.React_jsx_common.version with + | 3 -> + transformUppercaseCall3 modulePath mapper loc attrs callExpression + callArguments + | _ -> + React_jsx_common.raiseError ~loc "JSX: the JSX version must be 3") + (* div(~prop1=foo, ~prop2=bar, ~children=[bla], ()) *) + (* turn that into + ReactDOMRe.createElement(~props=ReactDOMRe.props(~props1=foo, ~props2=bar, ()), [|bla|]) *) + | {loc; txt = Lident id} -> ( + match config.version with + | 3 -> transformLowercaseCall3 mapper loc attrs callArguments id + | _ -> React_jsx_common.raiseError ~loc "JSX: the JSX version must be 3" + ) + | {txt = Ldot (_, anythingNotCreateElementOrMake); loc} -> + React_jsx_common.raiseError ~loc + "JSX: the JSX attribute should be attached to a \ + `YourModuleName.createElement` or `YourModuleName.make` call. We \ + saw `%s` instead" + anythingNotCreateElementOrMake + | {txt = Lapply _; loc} -> + (* don't think there's ever a case where this is reached *) + React_jsx_common.raiseError ~loc + "JSX: encountered a weird case while processing the code. Please \ + report this!") + | _ -> + React_jsx_common.raiseError ~loc:callExpression.pexp_loc + "JSX: `createElement` should be preceeded by a simple, direct module \ + name." + in + + let expr mapper expression = + match expression with + (* Does the function application have the @JSX attribute? *) + | {pexp_desc = Pexp_apply (callExpression, callArguments); pexp_attributes} + -> ( + let jsxAttribute, nonJSXAttributes = + List.partition + (fun (attribute, _) -> attribute.txt = "JSX") + pexp_attributes + in + match (jsxAttribute, nonJSXAttributes) with + (* no JSX attribute *) + | [], _ -> default_mapper.expr mapper expression + | _, nonJSXAttributes -> + transformJsxCall mapper callExpression callArguments nonJSXAttributes) + (* is it a list with jsx attribute? Reason <>foo desugars to [@JSX][foo]*) + | { + pexp_desc = + ( Pexp_construct + ({txt = Lident "::"; loc}, Some {pexp_desc = Pexp_tuple _}) + | Pexp_construct ({txt = Lident "[]"; loc}, None) ); + pexp_attributes; + } as listItems -> ( + let jsxAttribute, nonJSXAttributes = + List.partition + (fun (attribute, _) -> attribute.txt = "JSX") + pexp_attributes + in + match (jsxAttribute, nonJSXAttributes) with + (* no JSX attribute *) + | [], _ -> default_mapper.expr mapper expression + | _, nonJSXAttributes -> + let loc = {loc with loc_ghost = true} in + let fragment = + Exp.ident ~loc {loc; txt = Ldot (Lident "ReasonReact", "fragment")} + in + let childrenExpr = transformChildrenIfList ~loc ~mapper listItems in + let args = + [ + (* "div" *) + (nolabel, fragment); + (* [|moreCreateElementCallsHere|] *) + (nolabel, childrenExpr); + ] + in + Exp.apply + ~loc (* throw away the [@JSX] attribute and keep the others, if any *) + ~attrs:nonJSXAttributes + (* ReactDOMRe.createElement *) + (Exp.ident ~loc + {loc; txt = Ldot (Lident "ReactDOMRe", "createElement")}) + args) + (* Delegate to the default mapper, a deep identity traversal *) + | e -> default_mapper.expr mapper e + in + + let module_binding mapper module_binding = + let _ = nestedModules := module_binding.pmb_name.txt :: !nestedModules in + let mapped = default_mapper.module_binding mapper module_binding in + let () = + match !nestedModules with + | _ :: rest -> nestedModules := rest + | [] -> () + in + mapped + in + (expr, module_binding, transformSignatureItem, transformStructureItem) diff --git a/analysis/vendor/res_outcome_printer/reactjs_jsx_v4.ml b/analysis/vendor/res_outcome_printer/reactjs_jsx_v4.ml new file mode 100644 index 000000000..e2afe36d6 --- /dev/null +++ b/analysis/vendor/res_outcome_printer/reactjs_jsx_v4.ml @@ -0,0 +1,1409 @@ +open Ast_helper +open Ast_mapper +open Asttypes +open Parsetree +open Longident + +let nolabel = Nolabel + +let labelled str = Labelled str + +let isOptional str = + match str with + | Optional _ -> true + | _ -> false + +let isLabelled str = + match str with + | Labelled _ -> true + | _ -> false + +let isForwardRef = function + | {pexp_desc = Pexp_ident {txt = Ldot (Lident "React", "forwardRef")}} -> true + | _ -> false + +let getLabel str = + match str with + | Optional str | Labelled str -> str + | Nolabel -> "" + +let optionalAttrs = [React_jsx_common.optionalAttr] + +let constantString ~loc str = + Ast_helper.Exp.constant ~loc (Pconst_string (str, None)) + +(* {} empty record *) +let emptyRecord ~loc = Exp.record ~loc [] None + +let unitExpr ~loc = Exp.construct ~loc (Location.mkloc (Lident "()") loc) None + +let safeTypeFromValue valueStr = + let valueStr = getLabel valueStr in + if valueStr = "" || (valueStr.[0] [@doesNotRaise]) <> '_' then valueStr + else "T" ^ valueStr + +let refType loc = + Typ.constr ~loc + {loc; txt = Ldot (Ldot (Lident "ReactDOM", "Ref"), "currentDomRef")} + [] + +type 'a children = ListLiteral of 'a | Exact of 'a + +(* if children is a list, convert it to an array while mapping each element. If not, just map over it, as usual *) +let transformChildrenIfListUpper ~mapper theList = + let rec transformChildren_ theList accum = + (* not in the sense of converting a list to an array; convert the AST + reprensentation of a list to the AST reprensentation of an array *) + match theList with + | {pexp_desc = Pexp_construct ({txt = Lident "[]"}, None)} -> ( + match accum with + | [singleElement] -> Exact singleElement + | accum -> ListLiteral (Exp.array (List.rev accum))) + | { + pexp_desc = + Pexp_construct + ({txt = Lident "::"}, Some {pexp_desc = Pexp_tuple [v; acc]}); + } -> + transformChildren_ acc (mapper.expr mapper v :: accum) + | notAList -> Exact (mapper.expr mapper notAList) + in + transformChildren_ theList [] + +let transformChildrenIfList ~mapper theList = + let rec transformChildren_ theList accum = + (* not in the sense of converting a list to an array; convert the AST + reprensentation of a list to the AST reprensentation of an array *) + match theList with + | {pexp_desc = Pexp_construct ({txt = Lident "[]"}, None)} -> + Exp.array (List.rev accum) + | { + pexp_desc = + Pexp_construct + ({txt = Lident "::"}, Some {pexp_desc = Pexp_tuple [v; acc]}); + } -> + transformChildren_ acc (mapper.expr mapper v :: accum) + | notAList -> mapper.expr mapper notAList + in + transformChildren_ theList [] + +let extractChildren ?(removeLastPositionUnit = false) ~loc propsAndChildren = + let rec allButLast_ lst acc = + match lst with + | [] -> [] + | [(Nolabel, {pexp_desc = Pexp_construct ({txt = Lident "()"}, None)})] -> + acc + | (Nolabel, {pexp_loc}) :: _rest -> + React_jsx_common.raiseError ~loc:pexp_loc + "JSX: found non-labelled argument before the last position" + | arg :: rest -> allButLast_ rest (arg :: acc) + in + let allButLast lst = allButLast_ lst [] |> List.rev in + match + List.partition + (fun (label, _) -> label = labelled "children") + propsAndChildren + with + | [], props -> + (* no children provided? Place a placeholder list *) + ( Exp.construct {loc = Location.none; txt = Lident "[]"} None, + if removeLastPositionUnit then allButLast props else props ) + | [(_, childrenExpr)], props -> + (childrenExpr, if removeLastPositionUnit then allButLast props else props) + | _ -> + React_jsx_common.raiseError ~loc + "JSX: somehow there's more than one `children` label" + +let merlinFocus = ({loc = Location.none; txt = "merlin.focus"}, PStr []) + +(* Helper method to filter out any attribute that isn't [@react.component] *) +let otherAttrsPure (loc, _) = loc.txt <> "react.component" + +(* Finds the name of the variable the binding is assigned to, otherwise raises Invalid_argument *) +let rec getFnName binding = + match binding with + | {ppat_desc = Ppat_var {txt}} -> txt + | {ppat_desc = Ppat_constraint (pat, _)} -> getFnName pat + | {ppat_loc} -> + React_jsx_common.raiseError ~loc:ppat_loc + "react.component calls cannot be destructured." + +let makeNewBinding binding expression newName = + match binding with + | {pvb_pat = {ppat_desc = Ppat_var ppat_var} as pvb_pat} -> + { + binding with + pvb_pat = + {pvb_pat with ppat_desc = Ppat_var {ppat_var with txt = newName}}; + pvb_expr = expression; + pvb_attributes = [merlinFocus]; + } + | {pvb_loc} -> + React_jsx_common.raiseError ~loc:pvb_loc + "react.component calls cannot be destructured." + +(* Lookup the filename from the location information on the AST node and turn it into a valid module identifier *) +let filenameFromLoc (pstr_loc : Location.t) = + let fileName = + match pstr_loc.loc_start.pos_fname with + | "" -> !Location.input_name + | fileName -> fileName + in + let fileName = + try Filename.chop_extension (Filename.basename fileName) + with Invalid_argument _ -> fileName + in + let fileName = String.capitalize_ascii fileName in + fileName + +(* Build a string representation of a module name with segments separated by $ *) +let makeModuleName fileName nestedModules fnName = + let fullModuleName = + match (fileName, nestedModules, fnName) with + (* TODO: is this even reachable? It seems like the fileName always exists *) + | "", nestedModules, "make" -> nestedModules + | "", nestedModules, fnName -> List.rev (fnName :: nestedModules) + | fileName, nestedModules, "make" -> fileName :: List.rev nestedModules + | fileName, nestedModules, fnName -> + fileName :: List.rev (fnName :: nestedModules) + in + let fullModuleName = String.concat "$" fullModuleName in + fullModuleName + +(* + AST node builders + These functions help us build AST nodes that are needed when transforming a [@react.component] into a + constructor and a props external + *) + +(* make record from props and spread props if exists *) +let recordFromProps ~loc ~removeKey callArguments = + let spreadPropsLabel = "_spreadProps" in + let rec removeLastPositionUnitAux props acc = + match props with + | [] -> acc + | [(Nolabel, {pexp_desc = Pexp_construct ({txt = Lident "()"}, None)})] -> + acc + | (Nolabel, {pexp_loc}) :: _rest -> + React_jsx_common.raiseError ~loc:pexp_loc + "JSX: found non-labelled argument before the last position" + | ((Labelled txt, {pexp_loc}) as prop) :: rest + | ((Optional txt, {pexp_loc}) as prop) :: rest -> + if txt = spreadPropsLabel then + match acc with + | [] -> removeLastPositionUnitAux rest (prop :: acc) + | _ -> + React_jsx_common.raiseError ~loc:pexp_loc + "JSX: use {...p} {x: v} not {x: v} {...p} \n\ + \ multiple spreads {...p} {...p} not allowed." + else removeLastPositionUnitAux rest (prop :: acc) + in + let props, propsToSpread = + removeLastPositionUnitAux callArguments [] + |> List.rev + |> List.partition (fun (label, _) -> label <> labelled "_spreadProps") + in + let props = + if removeKey then + props |> List.filter (fun (arg_label, _) -> "key" <> getLabel arg_label) + else props + in + + let processProp (arg_label, ({pexp_loc} as pexpr)) = + (* In case filed label is "key" only then change expression to option *) + let id = getLabel arg_label in + if isOptional arg_label then + ( {txt = Lident id; loc = pexp_loc}, + {pexpr with pexp_attributes = optionalAttrs} ) + else ({txt = Lident id; loc = pexp_loc}, pexpr) + in + let fields = props |> List.map processProp in + let spreadFields = + propsToSpread |> List.map (fun (_, expression) -> expression) + in + match (fields, spreadFields) with + | [], [spreadProps] | [], spreadProps :: _ -> spreadProps + | _, [] -> + { + pexp_desc = Pexp_record (fields, None); + pexp_loc = loc; + pexp_attributes = []; + } + | _, [spreadProps] + (* take the first spreadProps only *) + | _, spreadProps :: _ -> + { + pexp_desc = Pexp_record (fields, Some spreadProps); + pexp_loc = loc; + pexp_attributes = []; + } + +(* make type params for make fn arguments *) +(* let make = ({id, name, children}: props<'id, 'name, 'children>) *) +let makePropsTypeParamsTvar namedTypeList = + namedTypeList + |> List.filter_map (fun (_isOptional, label, _, loc, _interiorType) -> + if label = "key" then None + else Some (Typ.var ~loc @@ safeTypeFromValue (Labelled label))) + +let stripOption coreType = + match coreType with + | {ptyp_desc = Ptyp_constr ({txt = Lident "option"}, coreTypes)} -> + List.nth_opt coreTypes 0 [@doesNotRaise] + | _ -> Some coreType + +let stripJsNullable coreType = + match coreType with + | { + ptyp_desc = + Ptyp_constr ({txt = Ldot (Ldot (Lident "Js", "Nullable"), "t")}, coreTypes); + } -> + List.nth_opt coreTypes 0 [@doesNotRaise] + | _ -> Some coreType + +(* Make type params of the props type *) +(* (Sig) let make: React.componentLike, React.element> *) +(* (Str) let make = ({x, _}: props<'x>) => body *) +(* (Str) external make: React.componentLike, React.element> = "default" *) +let makePropsTypeParams ?(stripExplicitOption = false) + ?(stripExplicitJsNullableOfRef = false) namedTypeList = + namedTypeList + |> List.filter_map (fun (isOptional, label, _, loc, interiorType) -> + if label = "key" then None + (* TODO: Worth thinking how about "ref_" or "_ref" usages *) + else if label = "ref" then + (* + If ref has a type annotation then use it, else `ReactDOM.Ref.currentDomRef. + For example, if JSX ppx is used for React Native, type would be different. + *) + match interiorType with + | {ptyp_desc = Ptyp_any} -> Some (refType loc) + | _ -> + (* Strip explicit Js.Nullable.t in case of forwardRef *) + if stripExplicitJsNullableOfRef then stripJsNullable interiorType + else Some interiorType + (* Strip the explicit option type in implementation *) + (* let make = (~x: option=?) => ... *) + else if isOptional && stripExplicitOption then stripOption interiorType + else Some interiorType) + +let makeLabelDecls namedTypeList = + let rec checkDuplicatedLabel l = + let rec mem_label ((_, (la : string), _, _, _) as x) = function + | [] -> false + | (_, (lb : string), _, _, _) :: l -> lb = la || mem_label x l + in + match l with + | [] -> () + | hd :: tl -> + if mem_label hd tl then + let _, label, _, loc, _ = hd in + React_jsx_common.raiseError ~loc "JSX: found the duplicated prop `%s`" + label + else checkDuplicatedLabel tl + in + let () = namedTypeList |> List.rev |> checkDuplicatedLabel in + + namedTypeList + |> List.map (fun (isOptional, label, attrs, loc, interiorType) -> + if label = "key" then + Type.field ~loc ~attrs:(optionalAttrs @ attrs) {txt = label; loc} + interiorType + else if isOptional then + Type.field ~loc ~attrs:(optionalAttrs @ attrs) {txt = label; loc} + (Typ.var @@ safeTypeFromValue @@ Labelled label) + else + Type.field ~loc ~attrs {txt = label; loc} + (Typ.var @@ safeTypeFromValue @@ Labelled label)) + +let makeTypeDecls propsName loc namedTypeList = + let labelDeclList = makeLabelDecls namedTypeList in + (* 'id, 'className, ... *) + let params = + makePropsTypeParamsTvar namedTypeList + |> List.map (fun coreType -> (coreType, Invariant)) + in + [ + Type.mk ~loc ~params {txt = propsName; loc} + ~kind:(Ptype_record labelDeclList); + ] + +let makeTypeDeclsWithCoreType propsName loc coreType typVars = + [ + Type.mk ~loc {txt = propsName; loc} ~kind:Ptype_abstract + ~params:(typVars |> List.map (fun v -> (v, Invariant))) + ~manifest:coreType; + ] + +(* type props<'x, 'y, ...> = { x: 'x, y?: 'y, ... } *) +let makePropsRecordType ~coreTypeOfAttr ~typVarsOfCoreType propsName loc + namedTypeList = + Str.type_ Nonrecursive + (match coreTypeOfAttr with + | None -> makeTypeDecls propsName loc namedTypeList + | Some coreType -> + makeTypeDeclsWithCoreType propsName loc coreType typVarsOfCoreType) + +(* type props<'x, 'y, ...> = { x: 'x, y?: 'y, ... } *) +let makePropsRecordTypeSig ~coreTypeOfAttr ~typVarsOfCoreType propsName loc + namedTypeList = + Sig.type_ Nonrecursive + (match coreTypeOfAttr with + | None -> makeTypeDecls propsName loc namedTypeList + | Some coreType -> + makeTypeDeclsWithCoreType propsName loc coreType typVarsOfCoreType) + +let transformUppercaseCall3 ~config modulePath mapper jsxExprLoc callExprLoc + attrs callArguments = + let children, argsWithLabels = + extractChildren ~removeLastPositionUnit:true ~loc:jsxExprLoc callArguments + in + let argsForMake = argsWithLabels in + let childrenExpr = transformChildrenIfListUpper ~mapper children in + let recursivelyTransformedArgsForMake = + argsForMake + |> List.map (fun (label, expression) -> + (label, mapper.expr mapper expression)) + in + let childrenArg = ref None in + let args = + recursivelyTransformedArgsForMake + @ + match childrenExpr with + | Exact children -> [(labelled "children", children)] + | ListLiteral {pexp_desc = Pexp_array list} when list = [] -> [] + | ListLiteral expression -> ( + (* this is a hack to support react components that introspect into their children *) + childrenArg := Some expression; + match config.React_jsx_common.mode with + | "automatic" -> + [ + ( labelled "children", + Exp.apply + (Exp.ident + {txt = Ldot (Lident "React", "array"); loc = Location.none}) + [(Nolabel, expression)] ); + ] + | _ -> + [ + ( labelled "children", + Exp.ident {loc = Location.none; txt = Ldot (Lident "React", "null")} + ); + ]) + in + + let isCap str = String.capitalize_ascii str = str in + let ident ~suffix = + match modulePath with + | Lident _ -> Ldot (modulePath, suffix) + | Ldot (_modulePath, value) as fullPath when isCap value -> + Ldot (fullPath, suffix) + | modulePath -> modulePath + in + let isEmptyRecord {pexp_desc} = + match pexp_desc with + | Pexp_record (labelDecls, _) when List.length labelDecls = 0 -> true + | _ -> false + in + + (* handle key, ref, children *) + (* React.createElement(Component.make, props, ...children) *) + let record = recordFromProps ~loc:jsxExprLoc ~removeKey:true args in + let props = + if isEmptyRecord record then emptyRecord ~loc:jsxExprLoc else record + in + let keyProp = + args |> List.filter (fun (arg_label, _) -> "key" = getLabel arg_label) + in + let makeID = + Exp.ident ~loc:callExprLoc {txt = ident ~suffix:"make"; loc = callExprLoc} + in + match config.mode with + (* The new jsx transform *) + | "automatic" -> + let jsxExpr, keyAndUnit = + match (!childrenArg, keyProp) with + | None, key :: _ -> + ( Exp.ident + {loc = Location.none; txt = Ldot (Lident "React", "jsxKeyed")}, + [key; (nolabel, unitExpr ~loc:Location.none)] ) + | None, [] -> + (Exp.ident {loc = Location.none; txt = Ldot (Lident "React", "jsx")}, []) + | Some _, key :: _ -> + ( Exp.ident + {loc = Location.none; txt = Ldot (Lident "React", "jsxsKeyed")}, + [key; (nolabel, unitExpr ~loc:Location.none)] ) + | Some _, [] -> + ( Exp.ident {loc = Location.none; txt = Ldot (Lident "React", "jsxs")}, + [] ) + in + Exp.apply ~loc:jsxExprLoc ~attrs jsxExpr + ([(nolabel, makeID); (nolabel, props)] @ keyAndUnit) + | _ -> ( + match (!childrenArg, keyProp) with + | None, key :: _ -> + Exp.apply ~loc:jsxExprLoc ~attrs + (Exp.ident + { + loc = Location.none; + txt = Ldot (Lident "JsxPPXReactSupport", "createElementWithKey"); + }) + [key; (nolabel, makeID); (nolabel, props)] + | None, [] -> + Exp.apply ~loc:jsxExprLoc ~attrs + (Exp.ident + {loc = Location.none; txt = Ldot (Lident "React", "createElement")}) + [(nolabel, makeID); (nolabel, props)] + | Some children, key :: _ -> + Exp.apply ~loc:jsxExprLoc ~attrs + (Exp.ident + { + loc = Location.none; + txt = + Ldot (Lident "JsxPPXReactSupport", "createElementVariadicWithKey"); + }) + [key; (nolabel, makeID); (nolabel, props); (nolabel, children)] + | Some children, [] -> + Exp.apply ~loc:jsxExprLoc ~attrs + (Exp.ident + { + loc = Location.none; + txt = Ldot (Lident "React", "createElementVariadic"); + }) + [(nolabel, makeID); (nolabel, props); (nolabel, children)]) + +let transformLowercaseCall3 ~config mapper jsxExprLoc callExprLoc attrs + callArguments id = + let componentNameExpr = constantString ~loc:callExprLoc id in + match config.React_jsx_common.mode with + (* the new jsx transform *) + | "automatic" -> + let children, nonChildrenProps = + extractChildren ~removeLastPositionUnit:true ~loc:jsxExprLoc callArguments + in + let argsForMake = nonChildrenProps in + let childrenExpr = transformChildrenIfListUpper ~mapper children in + let recursivelyTransformedArgsForMake = + argsForMake + |> List.map (fun (label, expression) -> + (label, mapper.expr mapper expression)) + in + let childrenArg = ref None in + let args = + recursivelyTransformedArgsForMake + @ + match childrenExpr with + | Exact children -> + [ + ( labelled "children", + Exp.apply ~attrs:optionalAttrs + (Exp.ident + { + txt = Ldot (Lident "ReactDOM", "someElement"); + loc = Location.none; + }) + [(Nolabel, children)] ); + ] + | ListLiteral {pexp_desc = Pexp_array list} when list = [] -> [] + | ListLiteral expression -> + (* this is a hack to support react components that introspect into their children *) + childrenArg := Some expression; + [ + ( labelled "children", + Exp.apply + (Exp.ident + {txt = Ldot (Lident "React", "array"); loc = Location.none}) + [(Nolabel, expression)] ); + ] + in + let isEmptyRecord {pexp_desc} = + match pexp_desc with + | Pexp_record (labelDecls, _) when List.length labelDecls = 0 -> true + | _ -> false + in + let record = recordFromProps ~loc:jsxExprLoc ~removeKey:true args in + let props = + if isEmptyRecord record then emptyRecord ~loc:jsxExprLoc else record + in + let keyProp = + args |> List.filter (fun (arg_label, _) -> "key" = getLabel arg_label) + in + let jsxExpr, keyAndUnit = + match (!childrenArg, keyProp) with + | None, key :: _ -> + ( Exp.ident + {loc = Location.none; txt = Ldot (Lident "ReactDOM", "jsxKeyed")}, + [key; (nolabel, unitExpr ~loc:Location.none)] ) + | None, [] -> + ( Exp.ident {loc = Location.none; txt = Ldot (Lident "ReactDOM", "jsx")}, + [] ) + | Some _, key :: _ -> + ( Exp.ident + {loc = Location.none; txt = Ldot (Lident "ReactDOM", "jsxsKeyed")}, + [key; (nolabel, unitExpr ~loc:Location.none)] ) + | Some _, [] -> + ( Exp.ident {loc = Location.none; txt = Ldot (Lident "ReactDOM", "jsxs")}, + [] ) + in + Exp.apply ~loc:jsxExprLoc ~attrs jsxExpr + ([(nolabel, componentNameExpr); (nolabel, props)] @ keyAndUnit) + | _ -> + let children, nonChildrenProps = + extractChildren ~loc:jsxExprLoc callArguments + in + let childrenExpr = transformChildrenIfList ~mapper children in + let createElementCall = + match children with + (* [@JSX] div(~children=[a]), coming from
a
*) + | { + pexp_desc = + ( Pexp_construct ({txt = Lident "::"}, Some {pexp_desc = Pexp_tuple _}) + | Pexp_construct ({txt = Lident "[]"}, None) ); + } -> + "createDOMElementVariadic" + (* [@JSX] div(~children= value), coming from
...(value)
*) + | {pexp_loc} -> + React_jsx_common.raiseError ~loc:pexp_loc + "A spread as a DOM element's children don't make sense written \ + together. You can simply remove the spread." + in + let args = + match nonChildrenProps with + | [_justTheUnitArgumentAtEnd] -> + [ + (* "div" *) + (nolabel, componentNameExpr); + (* [|moreCreateElementCallsHere|] *) + (nolabel, childrenExpr); + ] + | nonEmptyProps -> + let propsRecord = + recordFromProps ~loc:Location.none ~removeKey:false nonEmptyProps + in + [ + (* "div" *) + (nolabel, componentNameExpr); + (* ReactDOM.domProps(~className=blabla, ~foo=bar, ()) *) + (labelled "props", propsRecord); + (* [|moreCreateElementCallsHere|] *) + (nolabel, childrenExpr); + ] + in + Exp.apply ~loc:jsxExprLoc ~attrs + (* ReactDOM.createElement *) + (Exp.ident + { + loc = Location.none; + txt = Ldot (Lident "ReactDOM", createElementCall); + }) + args + +let rec recursivelyTransformNamedArgsForMake expr args newtypes coreType = + match expr.pexp_desc with + (* TODO: make this show up with a loc. *) + | Pexp_fun (Labelled "key", _, _, _) | Pexp_fun (Optional "key", _, _, _) -> + React_jsx_common.raiseError ~loc:expr.pexp_loc + "Key cannot be accessed inside of a component. Don't worry - you can \ + always key a component from its parent!" + | Pexp_fun (Labelled "ref", _, _, _) | Pexp_fun (Optional "ref", _, _, _) -> + React_jsx_common.raiseError ~loc:expr.pexp_loc + "Ref cannot be passed as a normal prop. Please use `forwardRef` API \ + instead." + | Pexp_fun (arg, default, pattern, expression) + when isOptional arg || isLabelled arg -> + let () = + match (isOptional arg, pattern, default) with + | true, {ppat_desc = Ppat_constraint (_, {ptyp_desc})}, None -> ( + match ptyp_desc with + | Ptyp_constr ({txt = Lident "option"}, [_]) -> () + | _ -> + let currentType = + match ptyp_desc with + | Ptyp_constr ({txt}, []) -> + String.concat "." (Longident.flatten txt) + | Ptyp_constr ({txt}, _innerTypeArgs) -> + String.concat "." (Longident.flatten txt) ^ "(...)" + | _ -> "..." + in + Location.prerr_warning pattern.ppat_loc + (Preprocessor + (Printf.sprintf + "React: optional argument annotations must have explicit \ + `option`. Did you mean `option(%s)=?`?" + currentType))) + | _ -> () + in + let alias = + match pattern with + | {ppat_desc = Ppat_alias (_, {txt}) | Ppat_var {txt}} -> txt + | {ppat_desc = Ppat_any} -> "_" + | _ -> getLabel arg + in + let type_ = + match pattern with + | {ppat_desc = Ppat_constraint (_, {ptyp_desc = Ptyp_package _})} -> None + | {ppat_desc = Ppat_constraint (_, type_)} -> Some type_ + | _ -> None + in + + recursivelyTransformNamedArgsForMake expression + ((arg, default, pattern, alias, pattern.ppat_loc, type_) :: args) + newtypes coreType + | Pexp_fun + ( Nolabel, + _, + {ppat_desc = Ppat_construct ({txt = Lident "()"}, _) | Ppat_any}, + _expression ) -> + (args, newtypes, coreType) + | Pexp_fun + ( Nolabel, + _, + ({ + ppat_desc = + Ppat_var {txt} | Ppat_constraint ({ppat_desc = Ppat_var {txt}}, _); + } as pattern), + _expression ) -> + if txt = "ref" then + let type_ = + match pattern with + | {ppat_desc = Ppat_constraint (_, type_)} -> Some type_ + | _ -> None + in + (* The ref arguement of forwardRef should be optional *) + ( (Optional "ref", None, pattern, txt, pattern.ppat_loc, type_) :: args, + newtypes, + coreType ) + else (args, newtypes, coreType) + | Pexp_fun (Nolabel, _, pattern, _expression) -> + Location.raise_errorf ~loc:pattern.ppat_loc + "React: react.component refs only support plain arguments and type \ + annotations." + | Pexp_newtype (label, expression) -> + recursivelyTransformNamedArgsForMake expression args (label :: newtypes) + coreType + | Pexp_constraint (expression, coreType) -> + recursivelyTransformNamedArgsForMake expression args newtypes + (Some coreType) + | _ -> (args, newtypes, coreType) + +let argToType types + ((name, default, {ppat_attributes = attrs}, _alias, loc, type_) : + arg_label * expression option * pattern * label * 'loc * core_type option) + = + match (type_, name, default) with + | Some type_, name, _ when isOptional name -> + (true, getLabel name, attrs, loc, type_) :: types + | Some type_, name, _ -> (false, getLabel name, attrs, loc, type_) :: types + | None, name, _ when isOptional name -> + (true, getLabel name, attrs, loc, Typ.any ~loc ()) :: types + | None, name, _ when isLabelled name -> + (false, getLabel name, attrs, loc, Typ.any ~loc ()) :: types + | _ -> types + +let hasDefaultValue nameArgList = + nameArgList + |> List.exists (fun (name, default, _, _, _, _) -> + Option.is_some default && isOptional name) + +let argToConcreteType types (name, attrs, loc, type_) = + match name with + | name when isLabelled name -> + (false, getLabel name, attrs, loc, type_) :: types + | name when isOptional name -> + (true, getLabel name, attrs, loc, type_) :: types + | _ -> types + +let check_string_int_attribute_iter = + let attribute _ ({txt; loc}, _) = + if txt = "string" || txt = "int" then + React_jsx_common.raiseError ~loc + "@string and @int attributes not supported. See \ + https://github.com/rescript-lang/rescript-compiler/issues/5724" + in + + {Ast_iterator.default_iterator with attribute} + +let checkMultipleReactComponents ~config ~loc = + (* If there is another @react.component, throw error *) + if config.React_jsx_common.hasReactComponent then + React_jsx_common.raiseErrorMultipleReactComponent ~loc + else config.hasReactComponent <- true + +let modifiedBindingOld binding = + let expression = binding.pvb_expr in + (* TODO: there is a long-tail of unsupported features inside of blocks - Pexp_letmodule , Pexp_letexception , Pexp_ifthenelse *) + let rec spelunkForFunExpression expression = + match expression with + (* let make = (~prop) => ... *) + | {pexp_desc = Pexp_fun _} | {pexp_desc = Pexp_newtype _} -> expression + (* let make = {let foo = bar in (~prop) => ...} *) + | {pexp_desc = Pexp_let (_recursive, _vbs, returnExpression)} -> + (* here's where we spelunk! *) + spelunkForFunExpression returnExpression + (* let make = React.forwardRef((~prop) => ...) *) + | { + pexp_desc = + Pexp_apply (_wrapperExpression, [(Nolabel, innerFunctionExpression)]); + } -> + spelunkForFunExpression innerFunctionExpression + | {pexp_desc = Pexp_sequence (_wrapperExpression, innerFunctionExpression)} + -> + spelunkForFunExpression innerFunctionExpression + | {pexp_desc = Pexp_constraint (innerFunctionExpression, _typ)} -> + spelunkForFunExpression innerFunctionExpression + | {pexp_loc} -> + React_jsx_common.raiseError ~loc:pexp_loc + "react.component calls can only be on function definitions or \ + component wrappers (forwardRef, memo)." + in + spelunkForFunExpression expression + +let modifiedBinding ~bindingLoc ~bindingPatLoc ~fnName binding = + let hasApplication = ref false in + let wrapExpressionWithBinding expressionFn expression = + Vb.mk ~loc:bindingLoc ~attrs:binding.pvb_attributes + (Pat.var ~loc:bindingPatLoc {loc = bindingPatLoc; txt = fnName}) + (expressionFn expression) + in + let expression = binding.pvb_expr in + (* TODO: there is a long-tail of unsupported features inside of blocks - Pexp_letmodule , Pexp_letexception , Pexp_ifthenelse *) + let rec spelunkForFunExpression expression = + match expression with + (* let make = (~prop) => ... with no final unit *) + | { + pexp_desc = + Pexp_fun + ( ((Labelled _ | Optional _) as label), + default, + pattern, + ({pexp_desc = Pexp_fun _} as internalExpression) ); + } -> + let wrap, hasForwardRef, exp = + spelunkForFunExpression internalExpression + in + ( wrap, + hasForwardRef, + {expression with pexp_desc = Pexp_fun (label, default, pattern, exp)} ) + (* let make = (()) => ... *) + (* let make = (_) => ... *) + | { + pexp_desc = + Pexp_fun + ( Nolabel, + _default, + {ppat_desc = Ppat_construct ({txt = Lident "()"}, _) | Ppat_any}, + _internalExpression ); + } -> + ((fun a -> a), false, expression) + (* let make = (~prop) => ... *) + | { + pexp_desc = + Pexp_fun + ((Labelled _ | Optional _), _default, _pattern, _internalExpression); + } -> + ((fun a -> a), false, expression) + (* let make = (prop) => ... *) + | {pexp_desc = Pexp_fun (_nolabel, _default, pattern, _internalExpression)} + -> + if !hasApplication then ((fun a -> a), false, expression) + else + Location.raise_errorf ~loc:pattern.ppat_loc + "React: props need to be labelled arguments.\n\ + \ If you are working with refs be sure to wrap with React.forwardRef.\n\ + \ If your component doesn't have any props use () or _ instead of a \ + name." + (* let make = {let foo = bar in (~prop) => ...} *) + | {pexp_desc = Pexp_let (recursive, vbs, internalExpression)} -> + (* here's where we spelunk! *) + let wrap, hasForwardRef, exp = + spelunkForFunExpression internalExpression + in + ( wrap, + hasForwardRef, + {expression with pexp_desc = Pexp_let (recursive, vbs, exp)} ) + (* let make = React.forwardRef((~prop) => ...) *) + | { + pexp_desc = Pexp_apply (wrapperExpression, [(Nolabel, internalExpression)]); + } -> + let () = hasApplication := true in + let _, _, exp = spelunkForFunExpression internalExpression in + let hasForwardRef = isForwardRef wrapperExpression in + ( (fun exp -> Exp.apply wrapperExpression [(nolabel, exp)]), + hasForwardRef, + exp ) + | {pexp_desc = Pexp_sequence (wrapperExpression, internalExpression)} -> + let wrap, hasForwardRef, exp = + spelunkForFunExpression internalExpression + in + ( wrap, + hasForwardRef, + {expression with pexp_desc = Pexp_sequence (wrapperExpression, exp)} ) + | e -> ((fun a -> a), false, e) + in + let wrapExpression, hasForwardRef, expression = + spelunkForFunExpression expression + in + (wrapExpressionWithBinding wrapExpression, hasForwardRef, expression) + +let vbMatch ~expr (name, default, _, alias, loc, _) = + let label = getLabel name in + match default with + | Some default -> + let value_binding = + Vb.mk + (Pat.var (Location.mkloc alias loc)) + (Exp.match_ + (Exp.ident {txt = Lident alias; loc = Location.none}) + [ + Exp.case + (Pat.construct + (Location.mknoloc @@ Lident "Some") + (Some (Pat.var (Location.mknoloc label)))) + (Exp.ident (Location.mknoloc @@ Lident label)); + Exp.case + (Pat.construct (Location.mknoloc @@ Lident "None") None) + default; + ]) + in + Exp.let_ Nonrecursive [value_binding] expr + | None -> expr + +let vbMatchExpr namedArgList expr = + let rec aux namedArgList = + match namedArgList with + | [] -> expr + | namedArg :: rest -> vbMatch namedArg ~expr:(aux rest) + in + aux (List.rev namedArgList) + +let mapBinding ~config ~emptyLoc ~pstr_loc ~fileName ~recFlag binding = + if React_jsx_common.hasAttrOnBinding binding then ( + checkMultipleReactComponents ~config ~loc:pstr_loc; + let binding = React_jsx_common.removeArity binding in + let coreTypeOfAttr = + React_jsx_common.coreTypeOfAttrs binding.pvb_attributes + in + let typVarsOfCoreType = + coreTypeOfAttr + |> Option.map React_jsx_common.typVarsOfCoreType + |> Option.value ~default:[] + in + let bindingLoc = binding.pvb_loc in + let bindingPatLoc = binding.pvb_pat.ppat_loc in + let binding = + { + binding with + pvb_pat = {binding.pvb_pat with ppat_loc = emptyLoc}; + pvb_loc = emptyLoc; + pvb_attributes = binding.pvb_attributes |> List.filter otherAttrsPure; + } + in + let fnName = getFnName binding.pvb_pat in + let internalFnName = fnName ^ "$Internal" in + let fullModuleName = makeModuleName fileName config.nestedModules fnName in + let bindingWrapper, hasForwardRef, expression = + modifiedBinding ~bindingLoc ~bindingPatLoc ~fnName binding + in + (* do stuff here! *) + let namedArgList, newtypes, _typeConstraints = + recursivelyTransformNamedArgsForMake + (modifiedBindingOld binding) + [] [] None + in + let namedTypeList = List.fold_left argToType [] namedArgList in + (* type props = { ... } *) + let propsRecordType = + makePropsRecordType ~coreTypeOfAttr ~typVarsOfCoreType "props" pstr_loc + namedTypeList + in + let innerExpression = + Exp.apply + (Exp.ident + (Location.mknoloc + @@ Lident + (match recFlag with + | Recursive -> internalFnName + | Nonrecursive -> fnName))) + ([(Nolabel, Exp.ident (Location.mknoloc @@ Lident "props"))] + @ + match hasForwardRef with + | true -> [(Nolabel, Exp.ident (Location.mknoloc @@ Lident "ref"))] + | false -> []) + in + let makePropsPattern = function + | [] -> Pat.var @@ Location.mknoloc "props" + | _ -> + Pat.constraint_ + (Pat.var @@ Location.mknoloc "props") + (Typ.constr (Location.mknoloc @@ Lident "props") [Typ.any ()]) + in + let fullExpression = + (* React component name should start with uppercase letter *) + (* let make = { let \"App" = props => make(props); \"App" } *) + (* let make = React.forwardRef({ + let \"App" = (props, ref) => make({...props, ref: @optional (Js.Nullabel.toOption(ref))}) + })*) + Exp.fun_ nolabel None + (match coreTypeOfAttr with + | None -> makePropsPattern namedTypeList + | Some _ -> makePropsPattern typVarsOfCoreType) + (if hasForwardRef then + Exp.fun_ nolabel None + (Pat.var @@ Location.mknoloc "ref") + innerExpression + else innerExpression) + in + let fullExpression = + match fullModuleName with + | "" -> fullExpression + | txt -> + Exp.let_ Nonrecursive + [ + Vb.mk ~loc:emptyLoc + (Pat.var ~loc:emptyLoc {loc = emptyLoc; txt}) + fullExpression; + ] + (Exp.ident ~loc:pstr_loc {loc = emptyLoc; txt = Lident txt}) + in + let rec stripConstraintUnpack ~label pattern = + match pattern with + | {ppat_desc = Ppat_constraint (_, {ptyp_desc = Ptyp_package _})} -> + pattern + | {ppat_desc = Ppat_constraint (pattern, _)} -> + stripConstraintUnpack ~label pattern + | _ -> pattern + in + let rec returnedExpression patternsWithLabel patternsWithNolabel + ({pexp_desc} as expr) = + match pexp_desc with + | Pexp_newtype (_, expr) -> + returnedExpression patternsWithLabel patternsWithNolabel expr + | Pexp_constraint (expr, _) -> + returnedExpression patternsWithLabel patternsWithNolabel expr + | Pexp_fun + ( _arg_label, + _default, + {ppat_desc = Ppat_construct ({txt = Lident "()"}, _)}, + expr ) -> + (patternsWithLabel, patternsWithNolabel, expr) + | Pexp_fun (arg_label, _default, ({ppat_loc; ppat_desc} as pattern), expr) + -> ( + let patternWithoutConstraint = + stripConstraintUnpack ~label:(getLabel arg_label) pattern + in + if isLabelled arg_label || isOptional arg_label then + returnedExpression + (( {loc = ppat_loc; txt = Lident (getLabel arg_label)}, + { + patternWithoutConstraint with + ppat_attributes = + (if isOptional arg_label then optionalAttrs else []) + @ pattern.ppat_attributes; + } ) + :: patternsWithLabel) + patternsWithNolabel expr + else + (* Special case of nolabel arg "ref" in forwardRef fn *) + (* let make = React.forwardRef(ref => body) *) + match ppat_desc with + | Ppat_var {txt} | Ppat_constraint ({ppat_desc = Ppat_var {txt}}, _) + -> + returnedExpression patternsWithLabel + (( {loc = ppat_loc; txt = Lident txt}, + { + pattern with + ppat_attributes = optionalAttrs @ pattern.ppat_attributes; + } ) + :: patternsWithNolabel) + expr + | _ -> returnedExpression patternsWithLabel patternsWithNolabel expr) + | _ -> (patternsWithLabel, patternsWithNolabel, expr) + in + let patternsWithLabel, patternsWithNolabel, expression = + returnedExpression [] [] expression + in + (* add pattern matching for optional prop value *) + let expression = + if hasDefaultValue namedArgList then vbMatchExpr namedArgList expression + else expression + in + (* (ref) => expr *) + let expression = + List.fold_left + (fun expr (_, pattern) -> Exp.fun_ Nolabel None pattern expr) + expression patternsWithNolabel + in + (* ({a, b, _}: props<'a, 'b>) *) + let recordPattern = + match patternsWithLabel with + | [] -> Pat.any () + | _ -> Pat.record (List.rev patternsWithLabel) Open + in + let expression = + Exp.fun_ Nolabel None + (Pat.constraint_ recordPattern + (Typ.constr ~loc:emptyLoc + {txt = Lident "props"; loc = emptyLoc} + (match coreTypeOfAttr with + | None -> + makePropsTypeParams ~stripExplicitOption:true + ~stripExplicitJsNullableOfRef:hasForwardRef namedTypeList + | Some _ -> ( + match typVarsOfCoreType with + | [] -> [] + | _ -> [Typ.any ()])))) + expression + in + let expression = + (* Add new tupes (type a,b,c) to make's definition *) + newtypes + |> List.fold_left (fun e newtype -> Exp.newtype newtype e) expression + in + (* let make = ({id, name, ...}: props<'id, 'name, ...>) => { ... } *) + let binding, newBinding = + match recFlag with + | Recursive -> + ( bindingWrapper + (Exp.let_ ~loc:emptyLoc Nonrecursive + [makeNewBinding binding expression internalFnName] + (Exp.let_ ~loc:emptyLoc Nonrecursive + [ + Vb.mk (Pat.var {loc = emptyLoc; txt = fnName}) fullExpression; + ] + (Exp.ident {loc = emptyLoc; txt = Lident fnName}))), + None ) + | Nonrecursive -> + ( { + binding with + pvb_expr = expression; + pvb_pat = Pat.var {txt = fnName; loc = Location.none}; + }, + Some (bindingWrapper fullExpression) ) + in + (Some propsRecordType, binding, newBinding)) + else (None, binding, None) + +let transformStructureItem ~config item = + match item with + (* external *) + | { + pstr_loc; + pstr_desc = + Pstr_primitive ({pval_attributes; pval_type} as value_description); + } as pstr -> ( + match List.filter React_jsx_common.hasAttr pval_attributes with + | [] -> [item] + | [_] -> + checkMultipleReactComponents ~config ~loc:pstr_loc; + check_string_int_attribute_iter.structure_item + check_string_int_attribute_iter item; + let pval_type = React_jsx_common.extractUncurried pval_type in + let coreTypeOfAttr = React_jsx_common.coreTypeOfAttrs pval_attributes in + let typVarsOfCoreType = + coreTypeOfAttr + |> Option.map React_jsx_common.typVarsOfCoreType + |> Option.value ~default:[] + in + let rec getPropTypes types + ({ptyp_loc; ptyp_desc; ptyp_attributes} as fullType) = + match ptyp_desc with + | Ptyp_arrow (name, type_, ({ptyp_desc = Ptyp_arrow _} as rest)) + when isLabelled name || isOptional name -> + getPropTypes ((name, ptyp_attributes, ptyp_loc, type_) :: types) rest + | Ptyp_arrow (Nolabel, _type, rest) -> getPropTypes types rest + | Ptyp_arrow (name, type_, returnValue) + when isLabelled name || isOptional name -> + ( returnValue, + (name, ptyp_attributes, returnValue.ptyp_loc, type_) :: types ) + | _ -> (fullType, types) + in + let innerType, propTypes = getPropTypes [] pval_type in + let namedTypeList = List.fold_left argToConcreteType [] propTypes in + let retPropsType = + Typ.constr ~loc:pstr_loc + (Location.mkloc (Lident "props") pstr_loc) + (match coreTypeOfAttr with + | None -> makePropsTypeParams namedTypeList + | Some _ -> ( + match typVarsOfCoreType with + | [] -> [] + | _ -> [Typ.any ()])) + in + (* type props<'x, 'y> = { x: 'x, y?: 'y, ... } *) + let propsRecordType = + makePropsRecordType ~coreTypeOfAttr ~typVarsOfCoreType "props" pstr_loc + namedTypeList + in + (* can't be an arrow because it will defensively uncurry *) + let newExternalType = + Ptyp_constr + ( {loc = pstr_loc; txt = Ldot (Lident "React", "componentLike")}, + [retPropsType; innerType] ) + in + let newStructure = + { + pstr with + pstr_desc = + Pstr_primitive + { + value_description with + pval_type = {pval_type with ptyp_desc = newExternalType}; + pval_attributes = List.filter otherAttrsPure pval_attributes; + }; + } + in + [propsRecordType; newStructure] + | _ -> + React_jsx_common.raiseError ~loc:pstr_loc + "Only one react.component call can exist on a component at one time") + (* let component = ... *) + | {pstr_loc; pstr_desc = Pstr_value (recFlag, valueBindings)} -> ( + let fileName = filenameFromLoc pstr_loc in + let emptyLoc = Location.in_file fileName in + let processBinding binding (newItems, bindings, newBindings) = + let newItem, binding, newBinding = + mapBinding ~config ~emptyLoc ~pstr_loc ~fileName ~recFlag binding + in + let newItems = + match newItem with + | Some item -> item :: newItems + | None -> newItems + in + let newBindings = + match newBinding with + | Some newBinding -> newBinding :: newBindings + | None -> newBindings + in + (newItems, binding :: bindings, newBindings) + in + let newItems, bindings, newBindings = + List.fold_right processBinding valueBindings ([], [], []) + in + newItems + @ [{pstr_loc; pstr_desc = Pstr_value (recFlag, bindings)}] + @ + match newBindings with + | [] -> [] + | newBindings -> + [{pstr_loc = emptyLoc; pstr_desc = Pstr_value (recFlag, newBindings)}]) + | _ -> [item] + +let transformSignatureItem ~config item = + match item with + | { + psig_loc; + psig_desc = Psig_value ({pval_attributes; pval_type} as psig_desc); + } as psig -> ( + match List.filter React_jsx_common.hasAttr pval_attributes with + | [] -> [item] + | [_] -> + checkMultipleReactComponents ~config ~loc:psig_loc; + let pval_type = React_jsx_common.extractUncurried pval_type in + check_string_int_attribute_iter.signature_item + check_string_int_attribute_iter item; + let hasForwardRef = ref false in + let coreTypeOfAttr = React_jsx_common.coreTypeOfAttrs pval_attributes in + let typVarsOfCoreType = + coreTypeOfAttr + |> Option.map React_jsx_common.typVarsOfCoreType + |> Option.value ~default:[] + in + let rec getPropTypes types ({ptyp_loc; ptyp_desc} as fullType) = + match ptyp_desc with + | Ptyp_arrow + ( name, + ({ptyp_attributes = attrs} as type_), + ({ptyp_desc = Ptyp_arrow _} as rest) ) + when isOptional name || isLabelled name -> + getPropTypes ((name, attrs, ptyp_loc, type_) :: types) rest + | Ptyp_arrow + (Nolabel, {ptyp_desc = Ptyp_constr ({txt = Lident "unit"}, _)}, rest) + -> + getPropTypes types rest + | Ptyp_arrow (Nolabel, _type, rest) -> + hasForwardRef := true; + getPropTypes types rest + | Ptyp_arrow (name, ({ptyp_attributes = attrs} as type_), returnValue) + when isOptional name || isLabelled name -> + (returnValue, (name, attrs, returnValue.ptyp_loc, type_) :: types) + | _ -> (fullType, types) + in + let innerType, propTypes = getPropTypes [] pval_type in + let namedTypeList = List.fold_left argToConcreteType [] propTypes in + let retPropsType = + Typ.constr + (Location.mkloc (Lident "props") psig_loc) + (match coreTypeOfAttr with + | None -> makePropsTypeParams namedTypeList + | Some _ -> ( + match typVarsOfCoreType with + | [] -> [] + | _ -> [Typ.any ()])) + in + let propsRecordType = + makePropsRecordTypeSig ~coreTypeOfAttr ~typVarsOfCoreType "props" + psig_loc + ((* If there is Nolabel arg, regard the type as ref in forwardRef *) + (if !hasForwardRef then + [(true, "ref", [], Location.none, refType Location.none)] + else []) + @ namedTypeList) + in + (* can't be an arrow because it will defensively uncurry *) + let newExternalType = + Ptyp_constr + ( {loc = psig_loc; txt = Ldot (Lident "React", "componentLike")}, + [retPropsType; innerType] ) + in + let newStructure = + { + psig with + psig_desc = + Psig_value + { + psig_desc with + pval_type = {pval_type with ptyp_desc = newExternalType}; + pval_attributes = List.filter otherAttrsPure pval_attributes; + }; + } + in + [propsRecordType; newStructure] + | _ -> + React_jsx_common.raiseError ~loc:psig_loc + "Only one react.component call can exist on a component at one time") + | _ -> [item] + +let transformJsxCall ~config mapper callExpression callArguments jsxExprLoc + attrs = + match callExpression.pexp_desc with + | Pexp_ident caller -> ( + match caller with + | {txt = Lident "createElement"; loc} -> + React_jsx_common.raiseError ~loc + "JSX: `createElement` should be preceeded by a module name." + (* Foo.createElement(~prop1=foo, ~prop2=bar, ~children=[], ()) *) + | {loc; txt = Ldot (modulePath, ("createElement" | "make"))} -> + transformUppercaseCall3 ~config modulePath mapper jsxExprLoc loc attrs + callArguments + (* div(~prop1=foo, ~prop2=bar, ~children=[bla], ()) *) + (* turn that into + ReactDOM.createElement(~props=ReactDOM.props(~props1=foo, ~props2=bar, ()), [|bla|]) *) + | {loc; txt = Lident id} -> + transformLowercaseCall3 ~config mapper jsxExprLoc loc attrs callArguments + id + | {txt = Ldot (_, anythingNotCreateElementOrMake); loc} -> + React_jsx_common.raiseError ~loc + "JSX: the JSX attribute should be attached to a \ + `YourModuleName.createElement` or `YourModuleName.make` call. We saw \ + `%s` instead" + anythingNotCreateElementOrMake + | {txt = Lapply _; loc} -> + (* don't think there's ever a case where this is reached *) + React_jsx_common.raiseError ~loc + "JSX: encountered a weird case while processing the code. Please \ + report this!") + | _ -> + React_jsx_common.raiseError ~loc:callExpression.pexp_loc + "JSX: `createElement` should be preceeded by a simple, direct module \ + name." + +let expr ~config mapper expression = + match expression with + (* Does the function application have the @JSX attribute? *) + | { + pexp_desc = Pexp_apply (callExpression, callArguments); + pexp_attributes; + pexp_loc; + } -> ( + let jsxAttribute, nonJSXAttributes = + List.partition + (fun (attribute, _) -> attribute.txt = "JSX") + pexp_attributes + in + match (jsxAttribute, nonJSXAttributes) with + (* no JSX attribute *) + | [], _ -> default_mapper.expr mapper expression + | _, nonJSXAttributes -> + transformJsxCall ~config mapper callExpression callArguments pexp_loc + nonJSXAttributes) + (* is it a list with jsx attribute? Reason <>foo desugars to [@JSX][foo]*) + | { + pexp_desc = + ( Pexp_construct + ({txt = Lident "::"; loc}, Some {pexp_desc = Pexp_tuple _}) + | Pexp_construct ({txt = Lident "[]"; loc}, None) ); + pexp_attributes; + } as listItems -> ( + let jsxAttribute, nonJSXAttributes = + List.partition + (fun (attribute, _) -> attribute.txt = "JSX") + pexp_attributes + in + match (jsxAttribute, nonJSXAttributes) with + (* no JSX attribute *) + | [], _ -> default_mapper.expr mapper expression + | _, nonJSXAttributes -> + let loc = {loc with loc_ghost = true} in + let fragment = + match config.mode with + | "automatic" -> + Exp.ident ~loc {loc; txt = Ldot (Lident "React", "jsxFragment")} + | "classic" | _ -> + Exp.ident ~loc {loc; txt = Ldot (Lident "React", "fragment")} + in + let childrenExpr = transformChildrenIfList ~mapper listItems in + let recordOfChildren children = + Exp.record [(Location.mknoloc (Lident "children"), children)] None + in + let args = + [ + (nolabel, fragment); + (match config.mode with + | "automatic" -> ( + ( nolabel, + match childrenExpr with + | {pexp_desc = Pexp_array children} -> ( + match children with + | [] -> emptyRecord ~loc:Location.none + | [child] -> recordOfChildren child + | _ -> recordOfChildren childrenExpr) + | _ -> recordOfChildren childrenExpr )) + | "classic" | _ -> (nolabel, childrenExpr)); + ] + in + let countOfChildren = function + | {pexp_desc = Pexp_array children} -> List.length children + | _ -> 0 + in + Exp.apply + ~loc (* throw away the [@JSX] attribute and keep the others, if any *) + ~attrs:nonJSXAttributes + (* ReactDOM.createElement *) + (match config.mode with + | "automatic" -> + if countOfChildren childrenExpr > 1 then + Exp.ident ~loc {loc; txt = Ldot (Lident "React", "jsxs")} + else Exp.ident ~loc {loc; txt = Ldot (Lident "React", "jsx")} + | "classic" | _ -> + Exp.ident ~loc {loc; txt = Ldot (Lident "ReactDOM", "createElement")}) + args) + (* Delegate to the default mapper, a deep identity traversal *) + | e -> default_mapper.expr mapper e + +let module_binding ~(config : React_jsx_common.jsxConfig) mapper module_binding + = + config.nestedModules <- module_binding.pmb_name.txt :: config.nestedModules; + let mapped = default_mapper.module_binding mapper module_binding in + let () = + match config.nestedModules with + | _ :: rest -> config.nestedModules <- rest + | [] -> () + in + mapped + +(* TODO: some line number might still be wrong *) +let jsxMapper ~config = + let expr = expr ~config in + let module_binding = module_binding ~config in + let transformStructureItem = transformStructureItem ~config in + let transformSignatureItem = transformSignatureItem ~config in + (expr, module_binding, transformSignatureItem, transformStructureItem) diff --git a/analysis/vendor/res_outcome_printer/res_cli.ml b/analysis/vendor/res_outcome_printer/res_cli.ml index d41ccc9f6..7af181f5b 100644 --- a/analysis/vendor/res_outcome_printer/res_cli.ml +++ b/analysis/vendor/res_outcome_printer/res_cli.ml @@ -162,7 +162,10 @@ module ResClflags : sig val origin : string ref val file : string ref val interface : bool ref - val ppx : string ref + val jsxVersion : int ref + val jsxModule : string ref + val jsxMode : string ref + val typechecker : bool ref val parse : unit -> unit end = struct @@ -172,16 +175,20 @@ end = struct let print = ref "res" let origin = ref "" let interface = ref false - let ppx = ref "" + let jsxVersion = ref (-1) + let jsxModule = ref "react" + let jsxMode = ref "classic" let file = ref "" + let typechecker = ref false let usage = "\n\ **This command line is for the repo developer's testing purpose only. DO \ NOT use it in production**!\n\n" - ^ "Usage:\n rescript \n\n" ^ "Examples:\n" - ^ " rescript myFile.res\n" ^ " rescript -parse ml -print res myFile.ml\n" - ^ " rescript -parse res -print binary -interface myFile.resi\n\n" + ^ "Usage:\n res_parser \n\n" ^ "Examples:\n" + ^ " res_parser myFile.res\n" + ^ " res_parser -parse ml -print res myFile.ml\n" + ^ " res_parser -parse res -print binary -interface myFile.resi\n\n" ^ "Options are:" let spec = @@ -189,20 +196,30 @@ end = struct ("-recover", Arg.Unit (fun () -> recover := true), "Emit partial ast"); ( "-parse", Arg.String (fun txt -> origin := txt), - "Parse reasonBinary, ml or res. Default: res" ); + "Parse ml or res. Default: res" ); ( "-print", Arg.String (fun txt -> print := txt), - "Print either binary, ml, ast, sexp or res. Default: res" ); + "Print either binary, ml, ast, sexp, comments or res. Default: res" ); ( "-width", Arg.Int (fun w -> width := w), "Specify the line length for the printer (formatter)" ); ( "-interface", Arg.Unit (fun () -> interface := true), "Parse as interface" ); - ( "-ppx", - Arg.String (fun txt -> ppx := txt), - "Apply a specific built-in ppx before parsing, none or jsx. Default: \ + ( "-jsx-version", + Arg.Int (fun i -> jsxVersion := i), + "Apply a specific built-in ppx before parsing, none or 3, 4. Default: \ none" ); + ( "-jsx-module", + Arg.String (fun txt -> jsxModule := txt), + "Specify the jsx module. Default: react" ); + ( "-jsx-mode", + Arg.String (fun txt -> jsxMode := txt), + "Specify the jsx mode, classic or automatic. Default: classic" ); + ( "-typechecker", + Arg.Unit (fun () -> typechecker := true), + "Parses the ast as it would be passed to the typechecker and not the \ + printer" ); ] let parse () = Arg.parse spec (fun f -> file := f) usage @@ -212,7 +229,8 @@ module CliArgProcessor = struct type backend = Parser : 'diagnostics Res_driver.parsingEngine -> backend [@@unboxed] - let processFile ~isInterface ~width ~recover ~origin ~target ~ppx filename = + let processFile ~isInterface ~width ~recover ~origin ~target ~jsxVersion + ~jsxModule ~jsxMode ~typechecker filename = let len = String.length filename in let processInterface = isInterface @@ -220,18 +238,15 @@ module CliArgProcessor = struct in let parsingEngine = match origin with - | "reasonBinary" -> Parser Res_driver_reason_binary.parsingEngine | "ml" -> Parser Res_driver_ml_parser.parsingEngine | "res" -> Parser Res_driver.parsingEngine | "" -> ( match Filename.extension filename with | ".ml" | ".mli" -> Parser Res_driver_ml_parser.parsingEngine - | ".re" | ".rei" -> Parser Res_driver_reason_binary.parsingEngine | _ -> Parser Res_driver.parsingEngine) | origin -> print_endline - ("-parse needs to be either reasonBinary, ml or res. You provided " - ^ origin); + ("-parse needs to be either ml or res. You provided " ^ origin); exit 1 in let printEngine = @@ -240,17 +255,18 @@ module CliArgProcessor = struct | "ml" -> Res_driver_ml_parser.printEngine | "ast" -> Res_ast_debugger.printEngine | "sexp" -> Res_ast_debugger.sexpPrintEngine + | "comments" -> Res_ast_debugger.commentsPrintEngine | "res" -> Res_driver.printEngine | target -> print_endline - ("-print needs to be either binary, ml, ast, sexp or res. You \ - provided " ^ target); + ("-print needs to be either binary, ml, ast, sexp, comments or res. \ + You provided " ^ target); exit 1 in let forPrinter = match target with - | "res" | "sexp" -> true + | ("res" | "sexp") when not typechecker -> true | _ -> false in @@ -268,9 +284,8 @@ module CliArgProcessor = struct else exit 1) else let parsetree = - match ppx with - | "jsx" -> Reactjs_jsx_ppx_v3.rewrite_signature parseResult.parsetree - | _ -> parseResult.parsetree + Reactjs_jsx_ppx.rewrite_signature ~jsxVersion ~jsxModule ~jsxMode + parseResult.parsetree in printEngine.printInterface ~width ~filename ~comments:parseResult.comments parsetree @@ -285,25 +300,21 @@ module CliArgProcessor = struct else exit 1) else let parsetree = - match ppx with - | "jsx" -> - Reactjs_jsx_ppx_v3.rewrite_implementation parseResult.parsetree - | _ -> parseResult.parsetree + Reactjs_jsx_ppx.rewrite_implementation ~jsxVersion ~jsxModule ~jsxMode + parseResult.parsetree in printEngine.printImplementation ~width ~filename ~comments:parseResult.comments parsetree - [@@raises Invalid_argument, Failure, exit] + [@@raises exit] end -(* let [@raises Invalid_argument, Failure, exit] () = - if not !Sys.interactive then begin - ResClflags.parse (); - CliArgProcessor.processFile - ~isInterface:!ResClflags.interface - ~width:!ResClflags.width - ~recover:!ResClflags.recover - ~target:!ResClflags.print - ~origin:!ResClflags.origin - ~ppx:!ResClflags.ppx - !ResClflags.file - end *) +(* let () = + if not !Sys.interactive then ( + ResClflags.parse (); + CliArgProcessor.processFile ~isInterface:!ResClflags.interface + ~width:!ResClflags.width ~recover:!ResClflags.recover + ~target:!ResClflags.print ~origin:!ResClflags.origin + ~jsxVersion:!ResClflags.jsxVersion ~jsxModule:!ResClflags.jsxModule + ~jsxMode:!ResClflags.jsxMode ~typechecker:!ResClflags.typechecker + !ResClflags.file) + [@@raises exit] *) diff --git a/analysis/vendor/res_outcome_printer/res_driver_reason_binary.ml b/analysis/vendor/res_outcome_printer/res_driver_reason_binary.ml deleted file mode 100644 index 0882a39bc..000000000 --- a/analysis/vendor/res_outcome_printer/res_driver_reason_binary.ml +++ /dev/null @@ -1,119 +0,0 @@ -module IO = Res_io - -let isReasonDocComment (comment : Res_comment.t) = - let content = Res_comment.txt comment in - let len = String.length content in - if len = 0 then true - else if - len >= 2 - && String.unsafe_get content 0 = '*' - && String.unsafe_get content 1 = '*' - then false - else if len >= 1 && String.unsafe_get content 0 = '*' then true - else false - -let extractConcreteSyntax filename = - let commentData = ref [] in - let stringData = ref [] in - let src = IO.readFile ~filename in - let scanner = Res_scanner.make src ~filename in - - let rec next prevEndPos scanner = - let startPos, endPos, token = Res_scanner.scan scanner in - match token with - | Eof -> () - | Comment c -> - Res_comment.setPrevTokEndPos c prevEndPos; - commentData := c :: !commentData; - next endPos scanner - | String _ -> - let loc = - {Location.loc_start = startPos; loc_end = endPos; loc_ghost = false} - in - let len = endPos.pos_cnum - startPos.pos_cnum in - let txt = (String.sub [@doesNotRaise]) src startPos.pos_cnum len in - stringData := (txt, loc) :: !stringData; - next endPos scanner - | Lbrace -> - (* handle {| |} or {sql||sql} quoted strings. We don't care about its contents. - Why? // abcdef inside the quoted string would otherwise be picked up as an extra comment *) - Res_scanner.tryAdvanceQuotedString scanner; - next endPos scanner - | _ -> next endPos scanner - in - next Lexing.dummy_pos scanner; - let comments = - !commentData - |> List.filter (fun c -> not (isReasonDocComment c)) - |> List.rev - in - (comments, !stringData) - -let parsingEngine = - { - Res_driver.parseImplementation = - (fun ~forPrinter:_ ~filename -> - let chan, close = - if String.length filename == 0 then (stdin, fun _ -> ()) - else - let file_chan = open_in_bin filename in - let () = seek_in file_chan 0 in - (file_chan, close_in_noerr) - in - let magic = Config.ast_impl_magic_number in - ignore - ((really_input_string [@doesNotRaise]) chan (String.length magic)); - let filename = input_value chan in - let comments, stringData = - if filename <> "" then extractConcreteSyntax filename else ([], []) - in - let ast = input_value chan in - close chan; - let structure = - ast - |> Res_ast_conversion.replaceStringLiteralStructure stringData - |> Res_ast_conversion.normalizeReasonArityStructure ~forPrinter:true - |> Res_ast_conversion.structure - in - { - Res_driver.filename; - source = ""; - parsetree = structure; - diagnostics = (); - invalid = false; - comments; - }); - parseInterface = - (fun ~forPrinter:_ ~filename -> - let chan, close = - if String.length filename == 0 then (stdin, fun _ -> ()) - else - let file_chan = open_in_bin filename in - let () = seek_in file_chan 0 in - (file_chan, close_in_noerr) - in - let magic = Config.ast_intf_magic_number in - ignore - ((really_input_string [@doesNotRaise]) chan (String.length magic)); - let filename = input_value chan in - let comments, stringData = - if filename <> "" then extractConcreteSyntax filename else ([], []) - in - let ast = input_value chan in - close chan; - let signature = - ast - |> Res_ast_conversion.replaceStringLiteralSignature stringData - |> Res_ast_conversion.normalizeReasonAritySignature ~forPrinter:true - |> Res_ast_conversion.signature - in - { - Res_driver.filename; - source = ""; - parsetree = signature; - diagnostics = (); - invalid = false; - comments; - }); - stringOfDiagnostics = (fun ~source:_ ~filename:_ _diagnostics -> ()); - } diff --git a/analysis/vendor/res_outcome_printer/res_driver_reason_binary.mli b/analysis/vendor/res_outcome_printer/res_driver_reason_binary.mli deleted file mode 100644 index bccfc4c19..000000000 --- a/analysis/vendor/res_outcome_printer/res_driver_reason_binary.mli +++ /dev/null @@ -1,3 +0,0 @@ -(* This module represents a general interface to parse marshalled reason ast *) - -val parsingEngine : unit Res_driver.parsingEngine diff --git a/analysis/vendor/res_outcome_printer/res_printer.ml b/analysis/vendor/res_outcome_printer/res_printer.ml index b6f2d9ddc..b22d5cc9a 100644 --- a/analysis/vendor/res_outcome_printer/res_printer.ml +++ b/analysis/vendor/res_outcome_printer/res_printer.ml @@ -510,7 +510,7 @@ let printConstant ?(templateLiteral = false) c = | Pconst_float (s, _) -> Doc.text s | Pconst_char c -> let str = - match c with + match Char.chr c with | '\'' -> "\\'" | '\\' -> "\\\\" | '\n' -> "\\n" diff --git a/analysis/vendor/res_outcome_printer/res_scanner.ml b/analysis/vendor/res_outcome_printer/res_scanner.ml index 6fbfac959..04a949121 100644 --- a/analysis/vendor/res_outcome_printer/res_scanner.ml +++ b/analysis/vendor/res_outcome_printer/res_scanner.ml @@ -165,13 +165,6 @@ let digitValue ch = | 'A' .. 'F' -> Char.code ch + 32 - Char.code 'a' + 10 | _ -> 16 (* larger than any legal value *) -let rec skipLowerCaseChars scanner = - match scanner.ch with - | 'a' .. 'z' -> - next scanner; - skipLowerCaseChars scanner - | _ -> () - (* scanning helpers *) let scanIdentifier scanner = @@ -464,24 +457,23 @@ let scanEscape scanner = next scanner done; let c = !x in - if Res_utf8.isValidCodePoint c then Char.unsafe_chr c - else Char.unsafe_chr Res_utf8.repl + if Res_utf8.isValidCodePoint c then c else Res_utf8.repl in let codepoint = match scanner.ch with | '0' .. '9' -> convertNumber scanner ~n:3 ~base:10 | 'b' -> next scanner; - '\008' + 8 | 'n' -> next scanner; - '\010' + 10 | 'r' -> next scanner; - '\013' + 13 | 't' -> next scanner; - '\009' + 009 | 'x' -> next scanner; convertNumber scanner ~n:2 ~base:16 @@ -508,14 +500,13 @@ let scanEscape scanner = | '}' -> next scanner | _ -> ()); let c = !x in - if Res_utf8.isValidCodePoint c then Char.unsafe_chr c - else Char.unsafe_chr Res_utf8.repl + if Res_utf8.isValidCodePoint c then c else Res_utf8.repl | _ -> (* unicode escape sequence: '\u007A', exactly 4 hex digits *) convertNumber scanner ~n:4 ~base:16) | ch -> next scanner; - ch + Char.code ch in let contents = (String.sub [@doesNotRaise]) scanner.src offset (scanner.offset - offset) @@ -849,7 +840,10 @@ let rec scan scanner = let offset = scanner.offset + 1 in next3 scanner; Token.Codepoint - {c = ch; original = (String.sub [@doesNotRaise]) scanner.src offset 1} + { + c = Char.code ch; + original = (String.sub [@doesNotRaise]) scanner.src offset 1; + } | ch, _ -> next scanner; let offset = scanner.offset in @@ -865,7 +859,7 @@ let rec scan scanner = (String.sub [@doesNotRaise]) scanner.src offset length in next scanner; - Token.Codepoint {c = Obj.magic codepoint; original = contents}) + Token.Codepoint {c = codepoint; original = contents}) else ( scanner.ch <- ch; scanner.offset <- offset; @@ -943,42 +937,3 @@ let isBinaryOp src startCnum endCnum = || isWhitespace (String.unsafe_get src endCnum) in leftOk && rightOk) - -(* Assume `{` consumed, advances the scanner towards the ends of Reason quoted strings. (for conversion) - * In {| foo bar |} the scanner will be advanced until after the `|}` *) -let tryAdvanceQuotedString scanner = - let rec scanContents tag = - match scanner.ch with - | '|' -> ( - next scanner; - match scanner.ch with - | 'a' .. 'z' -> - let startOff = scanner.offset in - skipLowerCaseChars scanner; - let suffix = - (String.sub [@doesNotRaise]) scanner.src startOff - (scanner.offset - startOff) - in - if tag = suffix then - if scanner.ch = '}' then next scanner else scanContents tag - else scanContents tag - | '}' -> next scanner - | _ -> scanContents tag) - | ch when ch == hackyEOFChar -> - (* TODO: why is this place checking EOF and not others? *) - () - | _ -> - next scanner; - scanContents tag - in - match scanner.ch with - | 'a' .. 'z' -> - let startOff = scanner.offset in - skipLowerCaseChars scanner; - let tag = - (String.sub [@doesNotRaise]) scanner.src startOff - (scanner.offset - startOff) - in - if scanner.ch = '|' then scanContents tag - | '|' -> scanContents "" - | _ -> () diff --git a/analysis/vendor/res_outcome_printer/res_scanner.mli b/analysis/vendor/res_outcome_printer/res_scanner.mli index e68020cfb..0b53a1c71 100644 --- a/analysis/vendor/res_outcome_printer/res_scanner.mli +++ b/analysis/vendor/res_outcome_printer/res_scanner.mli @@ -32,5 +32,3 @@ val reconsiderLessThan : t -> Res_token.t val scanTemplateLiteralToken : t -> Lexing.position * Lexing.position * Res_token.t - -val tryAdvanceQuotedString : t -> unit diff --git a/analysis/vendor/res_outcome_printer/res_token.ml b/analysis/vendor/res_outcome_printer/res_token.ml index a2dceeca1..f519af6f0 100644 --- a/analysis/vendor/res_outcome_printer/res_token.ml +++ b/analysis/vendor/res_outcome_printer/res_token.ml @@ -5,7 +5,7 @@ type t = | Open | True | False - | Codepoint of {c: char; original: string} + | Codepoint of {c: int; original: string} | Int of {i: string; suffix: char option} | Float of {f: string; suffix: char option} | String of string From 0a6a3da025180908e3c1139030173a139fd606b2 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Thu, 9 Mar 2023 15:57:23 +0100 Subject: [PATCH 2/5] Install cppo in CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41ddf4290..e186337a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: node-version: 16 - run: npm ci - - run: opam install dune + - run: opam install dune cppo - run: npm run compile # These 2 runs (or just the second?) are for when you have opam dependencies. We don't. From 93d3653b82a54624acbbf361bd72c9fcc0a0d283 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Thu, 9 Mar 2023 16:07:22 +0100 Subject: [PATCH 3/5] No need to wrap ext. --- analysis/reanalyze/src/dune | 1 - analysis/src/dune | 1 - analysis/vendor/ext/dune | 2 +- analysis/vendor/ml/dune | 3 +-- analysis/vendor/res_outcome_printer/dune | 3 +-- 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/analysis/reanalyze/src/dune b/analysis/reanalyze/src/dune index eb0057f6f..cd5cd7342 100644 --- a/analysis/reanalyze/src/dune +++ b/analysis/reanalyze/src/dune @@ -3,6 +3,5 @@ (flags (-w "+6+26+27+32+33+39") (-open Jsonlib) - (-open Ext) (-open Ml)) (libraries jsonlib ext ml str unix)) diff --git a/analysis/src/dune b/analysis/src/dune index 072f1db77..7db3756bd 100644 --- a/analysis/src/dune +++ b/analysis/src/dune @@ -7,7 +7,6 @@ (-w "+6+26+27+32+33+39") (-open Jsonlib) (-open Outcomeprinter) - (-open Ext) (-open Ml)) ; Depends on: (libraries unix str ext ml jsonlib outcomeprinter reanalyze)) diff --git a/analysis/vendor/ext/dune b/analysis/vendor/ext/dune index 78f08fc33..84c4383ee 100644 --- a/analysis/vendor/ext/dune +++ b/analysis/vendor/ext/dune @@ -1,6 +1,6 @@ (library (name ext) -; (wrapped false) + (wrapped false) (preprocess (action (run %{bin:cppo} %{env:CPPO_FLAGS=} %{input-file}))) diff --git a/analysis/vendor/ml/dune b/analysis/vendor/ml/dune index 2fcac2099..53cab478e 100644 --- a/analysis/vendor/ml/dune +++ b/analysis/vendor/ml/dune @@ -4,8 +4,7 @@ (action (run %{bin:cppo} %{env:CPPO_FLAGS=} %{input-file}))) (flags - (:standard -w +a-4-42-40-41-44-45-9-48-67-70) - (-open Ext)) + (:standard -w +a-4-42-40-41-44-45-9-48-67-70)) (libraries ext)) (ocamllex lexer) diff --git a/analysis/vendor/res_outcome_printer/dune b/analysis/vendor/res_outcome_printer/dune index 1503fe88e..fc19e368c 100644 --- a/analysis/vendor/res_outcome_printer/dune +++ b/analysis/vendor/res_outcome_printer/dune @@ -2,6 +2,5 @@ (name outcomeprinter) (flags (-w "+26+27+32+33+39") - (-open Ml) - (-open Ext)) + (-open Ml)) (libraries ml ext)) From aebd8381df12f29abc984a22c49b70d88c5d5155 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Thu, 9 Mar 2023 16:10:10 +0100 Subject: [PATCH 4/5] No need to wrap Ml. --- analysis/reanalyze/src/dune | 3 +-- analysis/src/dune | 3 +-- analysis/vendor/ml/dune | 1 + analysis/vendor/res_outcome_printer/dune | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/analysis/reanalyze/src/dune b/analysis/reanalyze/src/dune index cd5cd7342..cecbd56b5 100644 --- a/analysis/reanalyze/src/dune +++ b/analysis/reanalyze/src/dune @@ -2,6 +2,5 @@ (name reanalyze) (flags (-w "+6+26+27+32+33+39") - (-open Jsonlib) - (-open Ml)) + (-open Jsonlib)) (libraries jsonlib ext ml str unix)) diff --git a/analysis/src/dune b/analysis/src/dune index 7db3756bd..a5ee182e2 100644 --- a/analysis/src/dune +++ b/analysis/src/dune @@ -6,7 +6,6 @@ (flags (-w "+6+26+27+32+33+39") (-open Jsonlib) - (-open Outcomeprinter) - (-open Ml)) + (-open Outcomeprinter)) ; Depends on: (libraries unix str ext ml jsonlib outcomeprinter reanalyze)) diff --git a/analysis/vendor/ml/dune b/analysis/vendor/ml/dune index 53cab478e..2d5cb2106 100644 --- a/analysis/vendor/ml/dune +++ b/analysis/vendor/ml/dune @@ -1,5 +1,6 @@ (library (name ml) + (wrapped false) (preprocess (action (run %{bin:cppo} %{env:CPPO_FLAGS=} %{input-file}))) diff --git a/analysis/vendor/res_outcome_printer/dune b/analysis/vendor/res_outcome_printer/dune index fc19e368c..17b75e261 100644 --- a/analysis/vendor/res_outcome_printer/dune +++ b/analysis/vendor/res_outcome_printer/dune @@ -1,6 +1,5 @@ (library (name outcomeprinter) (flags - (-w "+26+27+32+33+39") - (-open Ml)) + (-w "+26+27+32+33+39")) (libraries ml ext)) From b83da9e401e66d230789c3ec31e6d47ec1a38270 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Thu, 9 Mar 2023 16:12:49 +0100 Subject: [PATCH 5/5] Remove the two remaining wrapped libraries. --- analysis/reanalyze/src/dune | 3 +-- analysis/src/dune | 4 +--- analysis/vendor/json/dune | 1 + analysis/vendor/res_outcome_printer/dune | 1 + 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/analysis/reanalyze/src/dune b/analysis/reanalyze/src/dune index cecbd56b5..e8b736446 100644 --- a/analysis/reanalyze/src/dune +++ b/analysis/reanalyze/src/dune @@ -1,6 +1,5 @@ (library (name reanalyze) (flags - (-w "+6+26+27+32+33+39") - (-open Jsonlib)) + (-w "+6+26+27+32+33+39")) (libraries jsonlib ext ml str unix)) diff --git a/analysis/src/dune b/analysis/src/dune index a5ee182e2..1c3d71145 100644 --- a/analysis/src/dune +++ b/analysis/src/dune @@ -4,8 +4,6 @@ ; The main module that will become the binary. (name Cli) (flags - (-w "+6+26+27+32+33+39") - (-open Jsonlib) - (-open Outcomeprinter)) + (-w "+6+26+27+32+33+39")) ; Depends on: (libraries unix str ext ml jsonlib outcomeprinter reanalyze)) diff --git a/analysis/vendor/json/dune b/analysis/vendor/json/dune index 27534cac6..32dbef0de 100644 --- a/analysis/vendor/json/dune +++ b/analysis/vendor/json/dune @@ -1,4 +1,5 @@ (library (name jsonlib) + (wrapped false) (flags -w "-9") (libraries)) diff --git a/analysis/vendor/res_outcome_printer/dune b/analysis/vendor/res_outcome_printer/dune index 17b75e261..c44781e52 100644 --- a/analysis/vendor/res_outcome_printer/dune +++ b/analysis/vendor/res_outcome_printer/dune @@ -1,5 +1,6 @@ (library (name outcomeprinter) + (wrapped false) (flags (-w "+26+27+32+33+39")) (libraries ml ext))