diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2609899a..257e36319 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,9 +43,9 @@ jobs: key: ${{matrix.os}}-rescript-vscode-v1 - name: Use OCaml - uses: ocaml/setup-ocaml@v1.1.11 + uses: ocaml/setup-ocaml@v2 with: - ocaml-version: 4.06.1 + ocaml-compiler: 4.12.x - name: Use Node.js uses: actions/setup-node@v2.1.5 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 747b9d82e..81d256ab1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ Thanks for your interest. Below is an informal spec of how the plugin's server c ## Install Dependencies - Run `npm install` at the root. This will also install the npm modules for both the `client` and `server` folders. -- `opam switch 4.06.1`. OPAM [here](https://opam.ocaml.org). This is needed for the `analysis` folder, which is native code. +- `opam switch 4.12.0`. OPAM [here](https://opam.ocaml.org). This is needed for the `analysis` folder, which is native code. - Optionally, you can `opam install ocamlformat` and format the `.ml` files in `analysis`. ## Build & Run diff --git a/analysis/.depend b/analysis/.depend index 62e4b4a32..03cacc6f4 100644 --- a/analysis/.depend +++ b/analysis/.depend @@ -1,43 +1,546 @@ -src/BuildSystem.cmx : src/ModuleResolution.cmx src/Log.cmx src/Files.cmx -src/Cli.cmx : src/Commands.cmx -src/Cmt.cmx : src/Utils.cmx src/Uri2.cmx src/SharedTypes.cmx \ - src/ProcessCmt.cmx src/Packages.cmx src/FindFiles.cmx src/BuildSystem.cmx -src/Commands.cmx : src/Utils.cmx src/Uri2.cmx src/SharedTypes.cmx \ - src/Shared.cmx src/References.cmx src/Protocol.cmx src/NewCompletions.cmx \ - src/Log.cmx src/Hover.cmx src/Files.cmx src/Cmt.cmx +src/BuildSystem.cmx : \ + src/ModuleResolution.cmx \ + src/Log.cmx \ + src/Files.cmx +src/Cli.cmx : \ + src/Commands.cmx +src/Cmt.cmx : \ + src/Utils.cmx \ + src/Uri2.cmx \ + src/SharedTypes.cmx \ + src/ProcessCmt.cmx \ + src/Packages.cmx \ + src/FindFiles.cmx \ + src/BuildSystem.cmx +src/Commands.cmx : \ + src/Utils.cmx \ + src/Uri2.cmx \ + src/SharedTypes.cmx \ + src/Shared.cmx \ + src/References.cmx \ + src/Protocol.cmx \ + src/NewCompletions.cmx \ + src/vendor/compiler-libs-406/misc.cmx \ + src/Log.cmx \ + src/Hover.cmx \ + src/Files.cmx \ + src/Cmt.cmx src/Files.cmx : -src/FindFiles.cmx : src/Utils.cmx src/SharedTypes.cmx \ - src/ModuleResolution.cmx src/Log.cmx src/vendor/Json.cmx src/Infix.cmx \ - src/Files.cmx src/BuildSystem.cmx -src/Hover.cmx : src/Utils.cmx src/SharedTypes.cmx src/Shared.cmx \ - src/References.cmx src/ProcessCmt.cmx +src/FindFiles.cmx : \ + src/Utils.cmx \ + src/SharedTypes.cmx \ + src/ModuleResolution.cmx \ + src/Log.cmx \ + src/vendor/Json.cmx \ + src/Infix.cmx \ + src/Files.cmx \ + src/BuildSystem.cmx +src/Hover.cmx : \ + src/Utils.cmx \ + src/SharedTypes.cmx \ + src/Shared.cmx \ + src/References.cmx \ + src/ProcessCmt.cmx \ + src/vendor/compiler-libs-406/path.cmx src/Infix.cmx : src/Log.cmx : -src/ModuleResolution.cmx : src/Files.cmx -src/NewCompletions.cmx : src/Utils.cmx src/Uri2.cmx src/SharedTypes.cmx \ - src/Shared.cmx src/Protocol.cmx src/ProcessCmt.cmx src/PartialParser.cmx \ - src/Log.cmx src/Hover.cmx -src/Packages.cmx : src/Utils.cmx src/Uri2.cmx src/SharedTypes.cmx \ - src/Log.cmx src/vendor/Json.cmx src/Infix.cmx src/FindFiles.cmx \ - src/Files.cmx src/BuildSystem.cmx -src/PartialParser.cmx : src/SharedTypes.cmx +src/ModuleResolution.cmx : \ + src/Files.cmx +src/NewCompletions.cmx : \ + src/Utils.cmx \ + src/Uri2.cmx \ + src/vendor/compiler-libs-406/types.cmx \ + src/SharedTypes.cmx \ + src/Shared.cmx \ + src/Protocol.cmx \ + src/ProcessCmt.cmx \ + src/vendor/compiler-libs-406/path.cmx \ + src/PartialParser.cmx \ + src/Log.cmx \ + src/vendor/compiler-libs-406/ident.cmx \ + src/Hover.cmx +src/Packages.cmx : \ + src/Utils.cmx \ + src/Uri2.cmx \ + src/SharedTypes.cmx \ + src/Log.cmx \ + src/vendor/Json.cmx \ + src/Infix.cmx \ + src/FindFiles.cmx \ + src/Files.cmx \ + src/BuildSystem.cmx +src/PartialParser.cmx : \ + src/SharedTypes.cmx src/PrepareUtils.cmx : -src/PrintType.cmx : src/vendor/res_outcome_printer/res_outcome_printer.cmx \ - src/vendor/res_outcome_printer/res_doc.cmx -src/ProcessAttributes.cmx : src/SharedTypes.cmx src/PrepareUtils.cmx -src/ProcessCmt.cmx : src/Utils.cmx src/SharedTypes.cmx src/Shared.cmx \ - src/ProcessAttributes.cmx src/Log.cmx src/Files.cmx -src/Protocol.cmx : src/vendor/Json.cmx -src/References.cmx : src/Utils.cmx src/Uri2.cmx src/SharedTypes.cmx \ - src/Shared.cmx src/ProcessCmt.cmx src/Log.cmx src/Infix.cmx src/Cmt.cmx -src/Shared.cmx : src/PrintType.cmx src/Log.cmx src/Files.cmx -src/SharedTypes.cmx : src/Utils.cmx src/Uri2.cmx src/Shared.cmx -src/Uri2.cmx : -src/Utils.cmx : src/Protocol.cmx +src/PrintType.cmx : \ + src/vendor/res_outcome_printer/res_outcome_printer.cmx \ + src/vendor/res_outcome_printer/res_doc.cmx \ + src/vendor/compiler-libs-406/printtyp.cmx \ + src/vendor/compiler-libs-406/ident.cmx +src/ProcessAttributes.cmx : \ + src/SharedTypes.cmx \ + src/PrepareUtils.cmx \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/asttypes.cmi +src/ProcessCmt.cmx : \ + src/vendor/compiler-libs-406/warnings.cmx \ + src/Utils.cmx \ + src/vendor/compiler-libs-406/types.cmx \ + src/vendor/compiler-libs-406/typedtreeIter.cmx \ + src/vendor/compiler-libs-406/typedtree.cmx \ + src/SharedTypes.cmx \ + src/Shared.cmx \ + src/ProcessAttributes.cmx \ + src/vendor/compiler-libs-406/path.cmx \ + src/vendor/compiler-libs-406/longident.cmx \ + src/Log.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/ident.cmx \ + src/Files.cmx \ + src/vendor/compiler-libs-406/cmt_format.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi +src/Protocol.cmx : \ + src/vendor/Json.cmx +src/References.cmx : \ + src/Utils.cmx \ + src/Uri2.cmx \ + src/SharedTypes.cmx \ + src/Shared.cmx \ + src/ProcessCmt.cmx \ + src/Log.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/Infix.cmx \ + src/Cmt.cmx +src/Shared.cmx : \ + src/vendor/compiler-libs-406/types.cmx \ + src/PrintType.cmx \ + src/Log.cmx \ + src/Files.cmx \ + src/vendor/compiler-libs-406/config.cmx \ + src/vendor/compiler-libs-406/cmt_format.cmx \ + src/vendor/compiler-libs-406/cmi_format.cmx +src/SharedTypes.cmx : \ + src/Utils.cmx \ + src/Uri2.cmx \ + src/vendor/compiler-libs-406/types.cmx \ + src/Shared.cmx \ + src/vendor/compiler-libs-406/path.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi +src/Uri2.cmx : \ + src/vendor/compiler-libs-406/location.cmx +src/Utils.cmx : \ + src/Protocol.cmx \ + src/vendor/compiler-libs-406/location.cmx src/vendor/Json.cmx : +src/vendor/compiler-libs-406/ast_helper.cmx : \ + src/vendor/compiler-libs-406/syntaxerr.cmx \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/longident.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/docstrings.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/ast_helper.cmi +src/vendor/compiler-libs-406/ast_helper.cmi : \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/longident.cmi \ + src/vendor/compiler-libs-406/location.cmi \ + src/vendor/compiler-libs-406/docstrings.cmi \ + src/vendor/compiler-libs-406/asttypes.cmi +src/vendor/compiler-libs-406/ast_mapper.cmx : \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/longident.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/config.cmx \ + src/vendor/compiler-libs-406/clflags.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/ast_helper.cmx \ + src/vendor/compiler-libs-406/ast_mapper.cmi +src/vendor/compiler-libs-406/ast_mapper.cmi : \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/location.cmi +src/vendor/compiler-libs-406/asttypes.cmi : \ + src/vendor/compiler-libs-406/location.cmi +src/vendor/compiler-libs-406/bsb_db_decode.cmx : \ + src/vendor/compiler-libs-406/ext_string.cmx \ + src/vendor/compiler-libs-406/ext_pervasives.cmx \ + src/vendor/compiler-libs-406/ext_io.cmx \ + src/vendor/compiler-libs-406/ext_digest.cmx \ + src/vendor/compiler-libs-406/bsb_db_decode.cmi +src/vendor/compiler-libs-406/bsb_db_decode.cmi : +src/vendor/compiler-libs-406/bsc_warnings.cmx : +src/vendor/compiler-libs-406/btype.cmx : \ + src/vendor/compiler-libs-406/types.cmx \ + src/vendor/compiler-libs-406/path.cmx \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/ident.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi +src/vendor/compiler-libs-406/builtin_attributes.cmx : \ + src/vendor/compiler-libs-406/warnings.cmx \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/builtin_attributes.cmi +src/vendor/compiler-libs-406/builtin_attributes.cmi : \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/location.cmi \ + src/vendor/compiler-libs-406/asttypes.cmi +src/vendor/compiler-libs-406/clflags.cmx : \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/clflags.cmi +src/vendor/compiler-libs-406/clflags.cmi : \ + src/vendor/compiler-libs-406/misc.cmx +src/vendor/compiler-libs-406/cmi_format.cmx : \ + src/vendor/compiler-libs-406/types.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/config.cmx \ + src/vendor/compiler-libs-406/cmi_format.cmi +src/vendor/compiler-libs-406/cmi_format.cmi : \ + src/vendor/compiler-libs-406/types.cmi +src/vendor/compiler-libs-406/cmt_format.cmx : \ + src/vendor/compiler-libs-406/types.cmx \ + src/vendor/compiler-libs-406/typedtree.cmx \ + src/vendor/compiler-libs-406/tast_mapper.cmx \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/lexer.cmx \ + src/vendor/compiler-libs-406/env.cmx \ + src/vendor/compiler-libs-406/config.cmx \ + src/vendor/compiler-libs-406/cmi_format.cmx \ + src/vendor/compiler-libs-406/clflags.cmx \ + src/vendor/compiler-libs-406/cmt_format.cmi +src/vendor/compiler-libs-406/cmt_format.cmi : \ + src/vendor/compiler-libs-406/types.cmi \ + src/vendor/compiler-libs-406/typedtree.cmi \ + src/vendor/compiler-libs-406/location.cmi \ + src/vendor/compiler-libs-406/env.cmi \ + src/vendor/compiler-libs-406/cmi_format.cmi +src/vendor/compiler-libs-406/config.cmx : \ + src/vendor/compiler-libs-406/config.cmi +src/vendor/compiler-libs-406/config.cmi : +src/vendor/compiler-libs-406/consistbl.cmx : \ + src/vendor/compiler-libs-406/consistbl.cmi +src/vendor/compiler-libs-406/consistbl.cmi : +src/vendor/compiler-libs-406/ctype.cmx : \ + src/vendor/compiler-libs-406/types.cmx \ + src/vendor/compiler-libs-406/subst.cmx \ + src/vendor/compiler-libs-406/predef.cmx \ + src/vendor/compiler-libs-406/path.cmx \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/longident.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/ident.cmx \ + src/vendor/compiler-libs-406/ext_pervasives.cmx \ + src/vendor/compiler-libs-406/env.cmx \ + src/vendor/compiler-libs-406/config.cmx \ + src/vendor/compiler-libs-406/clflags.cmx \ + src/vendor/compiler-libs-406/btype.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/ctype.cmi +src/vendor/compiler-libs-406/ctype.cmi : \ + src/vendor/compiler-libs-406/types.cmi \ + src/vendor/compiler-libs-406/path.cmi \ + src/vendor/compiler-libs-406/longident.cmi \ + src/vendor/compiler-libs-406/ident.cmi \ + src/vendor/compiler-libs-406/env.cmi \ + src/vendor/compiler-libs-406/asttypes.cmi +src/vendor/compiler-libs-406/datarepr.cmx : \ + src/vendor/compiler-libs-406/types.cmx \ + src/vendor/compiler-libs-406/path.cmx \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/ident.cmx \ + src/vendor/compiler-libs-406/btype.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/datarepr.cmi +src/vendor/compiler-libs-406/datarepr.cmi : \ + src/vendor/compiler-libs-406/types.cmi \ + src/vendor/compiler-libs-406/path.cmi \ + src/vendor/compiler-libs-406/ident.cmi +src/vendor/compiler-libs-406/docstrings.cmx : \ + src/vendor/compiler-libs-406/warnings.cmx \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/docstrings.cmi +src/vendor/compiler-libs-406/docstrings.cmi : \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/location.cmi +src/vendor/compiler-libs-406/env.cmx : \ + src/vendor/compiler-libs-406/warnings.cmx \ + src/vendor/compiler-libs-406/types.cmx \ + src/vendor/compiler-libs-406/tbl.cmx \ + src/vendor/compiler-libs-406/subst.cmx \ + src/vendor/compiler-libs-406/predef.cmx \ + src/vendor/compiler-libs-406/path.cmx \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/longident.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/ident.cmx \ + src/vendor/compiler-libs-406/datarepr.cmx \ + src/vendor/compiler-libs-406/consistbl.cmx \ + src/vendor/compiler-libs-406/config.cmx \ + src/vendor/compiler-libs-406/cmi_format.cmx \ + src/vendor/compiler-libs-406/clflags.cmx \ + src/vendor/compiler-libs-406/builtin_attributes.cmx \ + src/vendor/compiler-libs-406/btype.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/env.cmi +src/vendor/compiler-libs-406/env.cmi : \ + src/vendor/compiler-libs-406/warnings.cmx \ + src/vendor/compiler-libs-406/types.cmi \ + src/vendor/compiler-libs-406/subst.cmi \ + src/vendor/compiler-libs-406/path.cmi \ + src/vendor/compiler-libs-406/longident.cmi \ + src/vendor/compiler-libs-406/location.cmi \ + src/vendor/compiler-libs-406/ident.cmi \ + src/vendor/compiler-libs-406/consistbl.cmi \ + src/vendor/compiler-libs-406/cmi_format.cmi \ + src/vendor/compiler-libs-406/asttypes.cmi +src/vendor/compiler-libs-406/ext_array.cmx : \ + src/vendor/compiler-libs-406/ext_array.cmi +src/vendor/compiler-libs-406/ext_array.cmi : +src/vendor/compiler-libs-406/ext_bytes.cmx : \ + src/vendor/compiler-libs-406/ext_bytes.cmi +src/vendor/compiler-libs-406/ext_bytes.cmi : +src/vendor/compiler-libs-406/ext_digest.cmx : +src/vendor/compiler-libs-406/ext_io.cmx : \ + src/vendor/compiler-libs-406/ext_pervasives.cmx \ + src/vendor/compiler-libs-406/ext_io.cmi +src/vendor/compiler-libs-406/ext_io.cmi : +src/vendor/compiler-libs-406/ext_json_parse.cmx : \ + src/vendor/compiler-libs-406/string_map.cmx \ + src/vendor/compiler-libs-406/ext_position.cmx \ + src/vendor/compiler-libs-406/ext_json_types.cmx \ + src/vendor/compiler-libs-406/ext_array.cmx \ + src/vendor/compiler-libs-406/ext_json_parse.cmi +src/vendor/compiler-libs-406/ext_json_parse.cmi : \ + src/vendor/compiler-libs-406/ext_json_types.cmx +src/vendor/compiler-libs-406/ext_json_types.cmx : \ + src/vendor/compiler-libs-406/string_map.cmx +src/vendor/compiler-libs-406/ext_json_write.cmx : \ + src/vendor/compiler-libs-406/string_map.cmx \ + src/vendor/compiler-libs-406/ext_json_types.cmx \ + src/vendor/compiler-libs-406/ext_json_write.cmi +src/vendor/compiler-libs-406/ext_json_write.cmi : \ + src/vendor/compiler-libs-406/ext_json_types.cmx +src/vendor/compiler-libs-406/ext_pervasives.cmx : \ + src/vendor/compiler-libs-406/ext_pervasives.cmi +src/vendor/compiler-libs-406/ext_pervasives.cmi : +src/vendor/compiler-libs-406/ext_position.cmx : \ + src/vendor/compiler-libs-406/ext_position.cmi +src/vendor/compiler-libs-406/ext_position.cmi : +src/vendor/compiler-libs-406/ext_string.cmx : \ + src/vendor/compiler-libs-406/ext_bytes.cmx \ + src/vendor/compiler-libs-406/ext_string.cmi +src/vendor/compiler-libs-406/ext_string.cmi : +src/vendor/compiler-libs-406/ident.cmx : \ + src/vendor/compiler-libs-406/identifiable.cmx \ + src/vendor/compiler-libs-406/ident.cmi +src/vendor/compiler-libs-406/ident.cmi : \ + src/vendor/compiler-libs-406/identifiable.cmi +src/vendor/compiler-libs-406/identifiable.cmx : \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/identifiable.cmi +src/vendor/compiler-libs-406/identifiable.cmi : +src/vendor/compiler-libs-406/lexer.cmx : \ + src/vendor/compiler-libs-406/warnings.cmx \ + src/vendor/compiler-libs-406/parser.cmx \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/docstrings.cmx \ + src/vendor/compiler-libs-406/config.cmx \ + src/vendor/compiler-libs-406/lexer.cmi +src/vendor/compiler-libs-406/lexer.cmi : \ + src/vendor/compiler-libs-406/parser.cmi \ + src/vendor/compiler-libs-406/location.cmi +src/vendor/compiler-libs-406/location.cmx : \ + src/vendor/compiler-libs-406/warnings.cmx \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/clflags.cmx \ + src/vendor/compiler-libs-406/location.cmi +src/vendor/compiler-libs-406/location.cmi : \ + src/vendor/compiler-libs-406/warnings.cmx +src/vendor/compiler-libs-406/longident.cmx : \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/longident.cmi +src/vendor/compiler-libs-406/longident.cmi : +src/vendor/compiler-libs-406/map_gen.cmx : +src/vendor/compiler-libs-406/misc.cmx : +src/vendor/compiler-libs-406/oprint.cmx : \ + src/vendor/compiler-libs-406/outcometree.cmi \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/oprint.cmi +src/vendor/compiler-libs-406/oprint.cmi : \ + src/vendor/compiler-libs-406/outcometree.cmi +src/vendor/compiler-libs-406/outcometree.cmi : \ + src/vendor/compiler-libs-406/asttypes.cmi +src/vendor/compiler-libs-406/parser.cmx : \ + src/vendor/compiler-libs-406/syntaxerr.cmx \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/longident.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/docstrings.cmx \ + src/vendor/compiler-libs-406/clflags.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/ast_helper.cmx \ + src/vendor/compiler-libs-406/parser.cmi +src/vendor/compiler-libs-406/parser.cmi : \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/location.cmi \ + src/vendor/compiler-libs-406/docstrings.cmi +src/vendor/compiler-libs-406/parsetree.cmi : \ + src/vendor/compiler-libs-406/longident.cmi \ + src/vendor/compiler-libs-406/location.cmi \ + src/vendor/compiler-libs-406/asttypes.cmi +src/vendor/compiler-libs-406/path.cmx : \ + src/vendor/compiler-libs-406/ident.cmx \ + src/vendor/compiler-libs-406/ext_pervasives.cmx \ + src/vendor/compiler-libs-406/path.cmi +src/vendor/compiler-libs-406/path.cmi : \ + src/vendor/compiler-libs-406/ident.cmi +src/vendor/compiler-libs-406/predef.cmx : \ + src/vendor/compiler-libs-406/types.cmx \ + src/vendor/compiler-libs-406/path.cmx \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/ident.cmx \ + src/vendor/compiler-libs-406/btype.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/predef.cmi +src/vendor/compiler-libs-406/predef.cmi : \ + src/vendor/compiler-libs-406/types.cmi \ + src/vendor/compiler-libs-406/path.cmi \ + src/vendor/compiler-libs-406/ident.cmi +src/vendor/compiler-libs-406/primitive.cmx : \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/outcometree.cmi \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/primitive.cmi +src/vendor/compiler-libs-406/primitive.cmi : \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/outcometree.cmi +src/vendor/compiler-libs-406/printtyp.cmx : \ + src/vendor/compiler-libs-406/types.cmx \ + src/vendor/compiler-libs-406/primitive.cmx \ + src/vendor/compiler-libs-406/predef.cmx \ + src/vendor/compiler-libs-406/path.cmx \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/outcometree.cmi \ + src/vendor/compiler-libs-406/oprint.cmx \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/longident.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/ident.cmx \ + src/vendor/compiler-libs-406/env.cmx \ + src/vendor/compiler-libs-406/ctype.cmx \ + src/vendor/compiler-libs-406/clflags.cmx \ + src/vendor/compiler-libs-406/builtin_attributes.cmx \ + src/vendor/compiler-libs-406/btype.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/printtyp.cmi +src/vendor/compiler-libs-406/printtyp.cmi : \ + src/vendor/compiler-libs-406/types.cmi \ + src/vendor/compiler-libs-406/path.cmi \ + src/vendor/compiler-libs-406/outcometree.cmi \ + src/vendor/compiler-libs-406/longident.cmi \ + src/vendor/compiler-libs-406/ident.cmi \ + src/vendor/compiler-libs-406/env.cmi \ + src/vendor/compiler-libs-406/asttypes.cmi +src/vendor/compiler-libs-406/string_map.cmx : \ + src/vendor/compiler-libs-406/map_gen.cmx \ + src/vendor/compiler-libs-406/ext_string.cmx \ + src/vendor/compiler-libs-406/string_map.cmi +src/vendor/compiler-libs-406/string_map.cmi : \ + src/vendor/compiler-libs-406/map_gen.cmx +src/vendor/compiler-libs-406/subst.cmx : \ + src/vendor/compiler-libs-406/types.cmx \ + src/vendor/compiler-libs-406/tbl.cmx \ + src/vendor/compiler-libs-406/path.cmx \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/ident.cmx \ + src/vendor/compiler-libs-406/clflags.cmx \ + src/vendor/compiler-libs-406/btype.cmx \ + src/vendor/compiler-libs-406/ast_mapper.cmx \ + src/vendor/compiler-libs-406/subst.cmi +src/vendor/compiler-libs-406/subst.cmi : \ + src/vendor/compiler-libs-406/types.cmi \ + src/vendor/compiler-libs-406/path.cmi \ + src/vendor/compiler-libs-406/ident.cmi +src/vendor/compiler-libs-406/syntaxerr.cmx : \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/syntaxerr.cmi +src/vendor/compiler-libs-406/syntaxerr.cmi : \ + src/vendor/compiler-libs-406/location.cmi +src/vendor/compiler-libs-406/tast_mapper.cmx : \ + src/vendor/compiler-libs-406/typedtree.cmx \ + src/vendor/compiler-libs-406/env.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/tast_mapper.cmi +src/vendor/compiler-libs-406/tast_mapper.cmi : \ + src/vendor/compiler-libs-406/typedtree.cmi \ + src/vendor/compiler-libs-406/env.cmi \ + src/vendor/compiler-libs-406/asttypes.cmi +src/vendor/compiler-libs-406/tbl.cmx : \ + src/vendor/compiler-libs-406/tbl.cmi +src/vendor/compiler-libs-406/tbl.cmi : +src/vendor/compiler-libs-406/typedtree.cmx : \ + src/vendor/compiler-libs-406/types.cmx \ + src/vendor/compiler-libs-406/primitive.cmx \ + src/vendor/compiler-libs-406/path.cmx \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/longident.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/ident.cmx \ + src/vendor/compiler-libs-406/env.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/typedtree.cmi +src/vendor/compiler-libs-406/typedtree.cmi : \ + src/vendor/compiler-libs-406/types.cmi \ + src/vendor/compiler-libs-406/primitive.cmi \ + src/vendor/compiler-libs-406/path.cmi \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/longident.cmi \ + src/vendor/compiler-libs-406/location.cmi \ + src/vendor/compiler-libs-406/ident.cmi \ + src/vendor/compiler-libs-406/env.cmi \ + src/vendor/compiler-libs-406/asttypes.cmi +src/vendor/compiler-libs-406/typedtreeIter.cmx : \ + src/vendor/compiler-libs-406/typedtree.cmx \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/typedtreeIter.cmi +src/vendor/compiler-libs-406/typedtreeIter.cmi : \ + src/vendor/compiler-libs-406/typedtree.cmi \ + src/vendor/compiler-libs-406/asttypes.cmi +src/vendor/compiler-libs-406/types.cmx : \ + src/vendor/compiler-libs-406/primitive.cmx \ + src/vendor/compiler-libs-406/path.cmx \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/longident.cmx \ + src/vendor/compiler-libs-406/location.cmx \ + src/vendor/compiler-libs-406/ident.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi \ + src/vendor/compiler-libs-406/types.cmi +src/vendor/compiler-libs-406/types.cmi : \ + src/vendor/compiler-libs-406/primitive.cmi \ + src/vendor/compiler-libs-406/path.cmi \ + src/vendor/compiler-libs-406/parsetree.cmi \ + src/vendor/compiler-libs-406/longident.cmi \ + src/vendor/compiler-libs-406/location.cmi \ + src/vendor/compiler-libs-406/ident.cmi \ + src/vendor/compiler-libs-406/asttypes.cmi +src/vendor/compiler-libs-406/warnings.cmx : \ + src/vendor/compiler-libs-406/misc.cmx \ + src/vendor/compiler-libs-406/config.cmx \ + src/vendor/compiler-libs-406/bsc_warnings.cmx src/vendor/res_outcome_printer/res_comment.cmx : \ + src/vendor/compiler-libs-406/location.cmx \ src/vendor/res_outcome_printer/res_comment.cmi -src/vendor/res_outcome_printer/res_comment.cmi : +src/vendor/res_outcome_printer/res_comment.cmi : \ + src/vendor/compiler-libs-406/location.cmi src/vendor/res_outcome_printer/res_doc.cmx : \ src/vendor/res_outcome_printer/res_minibuffer.cmx \ src/vendor/res_outcome_printer/res_doc.cmi @@ -47,6 +550,9 @@ src/vendor/res_outcome_printer/res_minibuffer.cmx : \ src/vendor/res_outcome_printer/res_minibuffer.cmi : src/vendor/res_outcome_printer/res_outcome_printer.cmx : \ src/vendor/res_outcome_printer/res_token.cmx \ - src/vendor/res_outcome_printer/res_doc.cmx + src/vendor/res_outcome_printer/res_doc.cmx \ + src/vendor/compiler-libs-406/outcometree.cmi \ + src/vendor/compiler-libs-406/oprint.cmx \ + src/vendor/compiler-libs-406/asttypes.cmi src/vendor/res_outcome_printer/res_token.cmx : \ src/vendor/res_outcome_printer/res_comment.cmx diff --git a/analysis/.merlin b/analysis/.merlin index 86059c117..285e16e82 100644 --- a/analysis/.merlin +++ b/analysis/.merlin @@ -3,6 +3,7 @@ B src/vendor B src/vendor/odoc_parser B src/vendor/omd B src/vendor/res_outcome_printer +B src/vendor/compiler-libs-406 B ../../../.opam/4.06.1/lib/ocaml/compiler-libs/ S src @@ -10,6 +11,7 @@ S src/vendor S src/vendor/odoc_parser S src/vendor/omd S src/vendor/res_outcome_printer +S src/vendor/compiler-libs-406 S ../../../.opam/4.06.1/lib/ocaml/compiler-libs/ FLG -w +26+27+32+33+39 diff --git a/analysis/Makefile b/analysis/Makefile index 324a42ee1..5e429f051 100644 --- a/analysis/Makefile +++ b/analysis/Makefile @@ -1,9 +1,9 @@ SHELL = /bin/bash MAKEFLAGS += --jobs 4 -INCLUDES = -I src -I src/vendor/res_outcome_printer -I src/vendor +INCLUDES = -I src -I src/vendor/res_outcome_printer -I src/vendor -I src/vendor/compiler-libs-406 OCAMLOPT = ocamlopt.opt -OCAMLFLAGS = -g -w +26+27+32+33+39 -bin-annot -I +compiler-libs $(INCLUDES) +OCAMLFLAGS = -g -w +26+27+32+33+39 -bin-annot $(INCLUDES) OCAMLDEP = ocamldep.opt OUTPUT = rescript-editor-analysis.exe @@ -24,18 +24,18 @@ SOURCE_FILES = $(shell $(OCAMLDEP) -sort `find src -name "*.ml"` | sed -E "s/\.m $(OUTPUT): $(SOURCE_FILES) @echo Linking... @$(OCAMLOPT) $(OCAMLFLAGS) -O2 -o $(OUTPUT) \ - unix.cmxa str.cmxa ocamlcommon.cmxa $(INCLUDES) $(SOURCE_FILES) + unix.cmxa str.cmxa $(INCLUDES) $(SOURCE_FILES) @echo Done! build-native: $(OUTPUT) depend dce: build-native - ../node_modules/.bin/reanalyze -dce-cmt src -suppress src/vendor + ../../reanalyze/_build/install/default/bin/reanalyze.exe -dce-cmt src -suppress src/vendor tests/node_modules/.bin/rescript: @cd tests && npm install -test: dce tests/node_modules/.bin/rescript +test: build-native tests/node_modules/.bin/rescript @cd tests && node_modules/.bin/rescript ./test.sh diff --git a/analysis/src/ProcessCmt.ml b/analysis/src/ProcessCmt.ml index f51661c9b..809682c90 100644 --- a/analysis/src/ProcessCmt.ml +++ b/analysis/src/ProcessCmt.ml @@ -1146,7 +1146,7 @@ let extraForStructureItems ~(file : File.t) | Partial_signature_item str -> Iter.iter_signature_item str | Partial_expression expression -> Iter.iter_expression expression | Partial_pattern pattern -> Iter.iter_pattern pattern - | Partial_class_expr class_expr -> Iter.iter_class_expr class_expr + | Partial_class_expr () -> () | Partial_module_type module_type -> Iter.iter_module_type module_type | Partial_structure _ | Partial_structure_item _ -> ()); extra @@ -1183,7 +1183,7 @@ let extraForSignatureItems ~(file : File.t) | Partial_signature_item str -> Iter.iter_signature_item str | Partial_expression expression -> Iter.iter_expression expression | Partial_pattern pattern -> Iter.iter_pattern pattern - | Partial_class_expr class_expr -> Iter.iter_class_expr class_expr + | Partial_class_expr () -> () | Partial_module_type module_type -> Iter.iter_module_type module_type | Partial_structure _ | Partial_structure_item _ -> ()); extra @@ -1278,7 +1278,9 @@ let rec resolvePath ~env ~path ~package = match result with | `Local (env, name) -> Some (env, name) | `Global (moduleName, fullPath) -> ( - Log.log ("resolvePath Global path:" ^ pathToString fullPath ^ " module:" ^ moduleName); + Log.log + ("resolvePath Global path:" ^ pathToString fullPath ^ " module:" + ^ moduleName); match fileForModule ~package moduleName with | None -> None | Some file -> diff --git a/analysis/src/vendor/compiler-libs-406/ast_helper.ml b/analysis/src/vendor/compiler-libs-406/ast_helper.ml new file mode 100644 index 000000000..365471e33 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ast_helper.ml @@ -0,0 +1,560 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Alain Frisch, LexiFi *) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(** Helpers to produce Parsetree fragments *) + +open Asttypes +open Parsetree +open Docstrings + +type lid = Longident.t loc +type str = string loc +type loc = Location.t +type attrs = attribute list + +let default_loc = ref Location.none + +let with_default_loc l f = + let old = !default_loc in + default_loc := l; + try let r = f () in default_loc := old; r + with exn -> default_loc := old; raise exn + +module Const = struct + let integer ?suffix i = Pconst_integer (i, suffix) + let int ?suffix i = integer ?suffix (string_of_int i) + let int32 ?(suffix='l') i = integer ~suffix (Int32.to_string i) + 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 string ?quotation_delimiter s = Pconst_string (s, quotation_delimiter) +end + +module Typ = struct + let mk ?(loc = !default_loc) ?(attrs = []) d = + {ptyp_desc = d; ptyp_loc = loc; ptyp_attributes = attrs} + let attr d a = {d with ptyp_attributes = d.ptyp_attributes @ [a]} + + let any ?loc ?attrs () = mk ?loc ?attrs Ptyp_any + let var ?loc ?attrs a = mk ?loc ?attrs (Ptyp_var a) + let arrow ?loc ?attrs a b c = mk ?loc ?attrs (Ptyp_arrow (a, b, c)) + let tuple ?loc ?attrs a = mk ?loc ?attrs (Ptyp_tuple a) + let constr ?loc ?attrs a b = mk ?loc ?attrs (Ptyp_constr (a, b)) + let object_ ?loc ?attrs a b = mk ?loc ?attrs (Ptyp_object (a, b)) + let class_ ?loc ?attrs a b = mk ?loc ?attrs (Ptyp_class (a, b)) + let alias ?loc ?attrs a b = mk ?loc ?attrs (Ptyp_alias (a, b)) + let variant ?loc ?attrs a b c = mk ?loc ?attrs (Ptyp_variant (a, b, c)) + let poly ?loc ?attrs a b = mk ?loc ?attrs (Ptyp_poly (a, b)) + let package ?loc ?attrs a b = mk ?loc ?attrs (Ptyp_package (a, b)) + let extension ?loc ?attrs a = mk ?loc ?attrs (Ptyp_extension a) + + let force_poly t = + match t.ptyp_desc with + | Ptyp_poly _ -> t + | _ -> poly ~loc:t.ptyp_loc [] t (* -> ghost? *) + + let varify_constructors var_names t = + let check_variable vl loc v = + if List.mem v vl then + raise Syntaxerr.(Error(Variable_in_scope(loc,v))) in + let var_names = List.map (fun v -> v.txt) var_names in + let rec loop t = + let desc = + match t.ptyp_desc with + | Ptyp_any -> Ptyp_any + | Ptyp_var x -> + check_variable var_names t.ptyp_loc x; + Ptyp_var x + | Ptyp_arrow (label,core_type,core_type') -> + Ptyp_arrow(label, loop core_type, loop core_type') + | Ptyp_tuple lst -> Ptyp_tuple (List.map loop lst) + | Ptyp_constr( { txt = Longident.Lident s }, []) + when List.mem s var_names -> + Ptyp_var s + | Ptyp_constr(longident, lst) -> + Ptyp_constr(longident, List.map loop lst) + | Ptyp_object (lst, o) -> + Ptyp_object (List.map loop_object_field lst, o) + | Ptyp_class (longident, lst) -> + Ptyp_class (longident, List.map loop lst) + | Ptyp_alias(core_type, string) -> + check_variable var_names t.ptyp_loc string; + Ptyp_alias(loop core_type, string) + | Ptyp_variant(row_field_list, flag, lbl_lst_option) -> + Ptyp_variant(List.map loop_row_field row_field_list, + flag, lbl_lst_option) + | Ptyp_poly(string_lst, core_type) -> + List.iter (fun v -> + check_variable var_names t.ptyp_loc v.txt) string_lst; + Ptyp_poly(string_lst, loop core_type) + | Ptyp_package(longident,lst) -> + Ptyp_package(longident,List.map (fun (n,typ) -> (n,loop typ) ) lst) + | Ptyp_extension (s, arg) -> + Ptyp_extension (s, arg) + in + {t with ptyp_desc = desc} + and loop_row_field = + function + | Rtag(label,attrs,flag,lst) -> + Rtag(label,attrs,flag,List.map loop lst) + | Rinherit t -> + Rinherit (loop t) + and loop_object_field = + function + | Otag(label, attrs, t) -> + Otag(label, attrs, loop t) + | Oinherit t -> + Oinherit (loop t) + in + loop t + +end + +module Pat = struct + let mk ?(loc = !default_loc) ?(attrs = []) d = + {ppat_desc = d; ppat_loc = loc; ppat_attributes = attrs} + let attr d a = {d with ppat_attributes = d.ppat_attributes @ [a]} + + let any ?loc ?attrs () = mk ?loc ?attrs Ppat_any + let var ?loc ?attrs a = mk ?loc ?attrs (Ppat_var a) + let alias ?loc ?attrs a b = mk ?loc ?attrs (Ppat_alias (a, b)) + let constant ?loc ?attrs a = mk ?loc ?attrs (Ppat_constant a) + let interval ?loc ?attrs a b = mk ?loc ?attrs (Ppat_interval (a, b)) + let tuple ?loc ?attrs a = mk ?loc ?attrs (Ppat_tuple a) + let construct ?loc ?attrs a b = mk ?loc ?attrs (Ppat_construct (a, b)) + let variant ?loc ?attrs a b = mk ?loc ?attrs (Ppat_variant (a, b)) + let record ?loc ?attrs a b = mk ?loc ?attrs (Ppat_record (a, b)) + let array ?loc ?attrs a = mk ?loc ?attrs (Ppat_array a) + let or_ ?loc ?attrs a b = mk ?loc ?attrs (Ppat_or (a, b)) + let constraint_ ?loc ?attrs a b = mk ?loc ?attrs (Ppat_constraint (a, b)) + let type_ ?loc ?attrs a = mk ?loc ?attrs (Ppat_type a) + let lazy_ ?loc ?attrs a = mk ?loc ?attrs (Ppat_lazy a) + let unpack ?loc ?attrs a = mk ?loc ?attrs (Ppat_unpack a) + let open_ ?loc ?attrs a b = mk ?loc ?attrs (Ppat_open (a, b)) + let exception_ ?loc ?attrs a = mk ?loc ?attrs (Ppat_exception a) + let extension ?loc ?attrs a = mk ?loc ?attrs (Ppat_extension a) +end + +module Exp = struct + let mk ?(loc = !default_loc) ?(attrs = []) d = + {pexp_desc = d; pexp_loc = loc; pexp_attributes = attrs} + let attr d a = {d with pexp_attributes = d.pexp_attributes @ [a]} + + let ident ?loc ?attrs a = mk ?loc ?attrs (Pexp_ident a) + let constant ?loc ?attrs a = mk ?loc ?attrs (Pexp_constant a) + let let_ ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_let (a, b, c)) + let fun_ ?loc ?attrs a b c d = mk ?loc ?attrs (Pexp_fun (a, b, c, d)) + let function_ ?loc ?attrs a = mk ?loc ?attrs (Pexp_function a) + let apply ?loc ?attrs a b = mk ?loc ?attrs (Pexp_apply (a, b)) + let match_ ?loc ?attrs a b = mk ?loc ?attrs (Pexp_match (a, b)) + let try_ ?loc ?attrs a b = mk ?loc ?attrs (Pexp_try (a, b)) + let tuple ?loc ?attrs a = mk ?loc ?attrs (Pexp_tuple a) + let construct ?loc ?attrs a b = mk ?loc ?attrs (Pexp_construct (a, b)) + let variant ?loc ?attrs a b = mk ?loc ?attrs (Pexp_variant (a, b)) + let record ?loc ?attrs a b = mk ?loc ?attrs (Pexp_record (a, b)) + let field ?loc ?attrs a b = mk ?loc ?attrs (Pexp_field (a, b)) + let setfield ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_setfield (a, b, c)) + let array ?loc ?attrs a = mk ?loc ?attrs (Pexp_array a) + let ifthenelse ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_ifthenelse (a, b, c)) + let sequence ?loc ?attrs a b = mk ?loc ?attrs (Pexp_sequence (a, b)) + let while_ ?loc ?attrs a b = mk ?loc ?attrs (Pexp_while (a, b)) + let for_ ?loc ?attrs a b c d e = mk ?loc ?attrs (Pexp_for (a, b, c, d, e)) + let constraint_ ?loc ?attrs a b = mk ?loc ?attrs (Pexp_constraint (a, b)) + let coerce ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_coerce (a, b, c)) + let send ?loc ?attrs a b = mk ?loc ?attrs (Pexp_send (a, b)) + let new_ ?loc ?attrs a = mk ?loc ?attrs (Pexp_new a) + let setinstvar ?loc ?attrs a b = mk ?loc ?attrs (Pexp_setinstvar (a, b)) + let override ?loc ?attrs a = mk ?loc ?attrs (Pexp_override a) + let letmodule ?loc ?attrs a b c= mk ?loc ?attrs (Pexp_letmodule (a, b, c)) + let letexception ?loc ?attrs a b = mk ?loc ?attrs (Pexp_letexception (a, b)) + let assert_ ?loc ?attrs a = mk ?loc ?attrs (Pexp_assert a) + let lazy_ ?loc ?attrs a = mk ?loc ?attrs (Pexp_lazy a) + let poly ?loc ?attrs a b = mk ?loc ?attrs (Pexp_poly (a, b)) + let object_ ?loc ?attrs a = mk ?loc ?attrs (Pexp_object a) + let newtype ?loc ?attrs a b = mk ?loc ?attrs (Pexp_newtype (a, b)) + let pack ?loc ?attrs a = mk ?loc ?attrs (Pexp_pack a) + let open_ ?loc ?attrs a b c = mk ?loc ?attrs (Pexp_open (a, b, c)) + let extension ?loc ?attrs a = mk ?loc ?attrs (Pexp_extension a) + let unreachable ?loc ?attrs () = mk ?loc ?attrs Pexp_unreachable + + let case lhs ?guard rhs = + { + pc_lhs = lhs; + pc_guard = guard; + pc_rhs = rhs; + } +end + +module Mty = struct + let mk ?(loc = !default_loc) ?(attrs = []) d = + {pmty_desc = d; pmty_loc = loc; pmty_attributes = attrs} + let attr d a = {d with pmty_attributes = d.pmty_attributes @ [a]} + + let ident ?loc ?attrs a = mk ?loc ?attrs (Pmty_ident a) + let alias ?loc ?attrs a = mk ?loc ?attrs (Pmty_alias a) + let signature ?loc ?attrs a = mk ?loc ?attrs (Pmty_signature a) + let functor_ ?loc ?attrs a b c = mk ?loc ?attrs (Pmty_functor (a, b, c)) + let with_ ?loc ?attrs a b = mk ?loc ?attrs (Pmty_with (a, b)) + let typeof_ ?loc ?attrs a = mk ?loc ?attrs (Pmty_typeof a) + let extension ?loc ?attrs a = mk ?loc ?attrs (Pmty_extension a) +end + +module Mod = struct +let mk ?(loc = !default_loc) ?(attrs = []) d = + {pmod_desc = d; pmod_loc = loc; pmod_attributes = attrs} + let attr d a = {d with pmod_attributes = d.pmod_attributes @ [a]} + + let ident ?loc ?attrs x = mk ?loc ?attrs (Pmod_ident x) + let structure ?loc ?attrs x = mk ?loc ?attrs (Pmod_structure x) + let functor_ ?loc ?attrs arg arg_ty body = + mk ?loc ?attrs (Pmod_functor (arg, arg_ty, body)) + let apply ?loc ?attrs m1 m2 = mk ?loc ?attrs (Pmod_apply (m1, m2)) + let constraint_ ?loc ?attrs m mty = mk ?loc ?attrs (Pmod_constraint (m, mty)) + let unpack ?loc ?attrs e = mk ?loc ?attrs (Pmod_unpack e) + let extension ?loc ?attrs a = mk ?loc ?attrs (Pmod_extension a) +end + +module Sig = struct + let mk ?(loc = !default_loc) d = {psig_desc = d; psig_loc = loc} + + let value ?loc a = mk ?loc (Psig_value a) + let type_ ?loc rec_flag a = mk ?loc (Psig_type (rec_flag, a)) + let type_extension ?loc a = mk ?loc (Psig_typext a) + let exception_ ?loc a = mk ?loc (Psig_exception a) + let module_ ?loc a = mk ?loc (Psig_module a) + let rec_module ?loc a = mk ?loc (Psig_recmodule a) + 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 + List.map + (fun ds -> attribute ~loc:(docstring_loc ds) (text_attr ds)) + f_txt +end + +module Str = struct + let mk ?(loc = !default_loc) d = {pstr_desc = d; pstr_loc = loc} + + let eval ?loc ?(attrs = []) a = mk ?loc (Pstr_eval (a, attrs)) + let value ?loc a b = mk ?loc (Pstr_value (a, b)) + let primitive ?loc a = mk ?loc (Pstr_primitive a) + let type_ ?loc rec_flag a = mk ?loc (Pstr_type (rec_flag, a)) + let type_extension ?loc a = mk ?loc (Pstr_typext a) + let exception_ ?loc a = mk ?loc (Pstr_exception a) + let module_ ?loc a = mk ?loc (Pstr_module a) + 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_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 + List.map + (fun ds -> attribute ~loc:(docstring_loc ds) (text_attr ds)) + f_txt +end + +module Cl = struct + let mk ?(loc = !default_loc) ?(attrs = []) d = + { + pcl_desc = d; + pcl_loc = loc; + pcl_attributes = attrs; + } + let attr d a = {d with pcl_attributes = d.pcl_attributes @ [a]} + + let constr ?loc ?attrs a b = mk ?loc ?attrs (Pcl_constr (a, b)) + let structure ?loc ?attrs a = mk ?loc ?attrs (Pcl_structure a) + let fun_ ?loc ?attrs a b c d = mk ?loc ?attrs (Pcl_fun (a, b, c, d)) + let apply ?loc ?attrs a b = mk ?loc ?attrs (Pcl_apply (a, b)) + let let_ ?loc ?attrs a b c = mk ?loc ?attrs (Pcl_let (a, b, c)) + let constraint_ ?loc ?attrs a b = mk ?loc ?attrs (Pcl_constraint (a, b)) + let extension ?loc ?attrs a = mk ?loc ?attrs (Pcl_extension a) + let open_ ?loc ?attrs a b c = mk ?loc ?attrs (Pcl_open (a, b, c)) +end + +module Cty = struct + let mk ?(loc = !default_loc) ?(attrs = []) d = + { + pcty_desc = d; + pcty_loc = loc; + pcty_attributes = attrs; + } + let attr d a = {d with pcty_attributes = d.pcty_attributes @ [a]} + + let constr ?loc ?attrs a b = mk ?loc ?attrs (Pcty_constr (a, b)) + let signature ?loc ?attrs a = mk ?loc ?attrs (Pcty_signature a) + let arrow ?loc ?attrs a b c = mk ?loc ?attrs (Pcty_arrow (a, b, c)) + let extension ?loc ?attrs a = mk ?loc ?attrs (Pcty_extension a) + let open_ ?loc ?attrs a b c = mk ?loc ?attrs (Pcty_open (a, b, c)) +end + +module Ctf = struct + let mk ?(loc = !default_loc) ?(attrs = []) + ?(docs = empty_docs) d = + { + pctf_desc = d; + pctf_loc = loc; + pctf_attributes = add_docs_attrs docs attrs; + } + + let inherit_ ?loc ?attrs a = mk ?loc ?attrs (Pctf_inherit a) + let val_ ?loc ?attrs a b c d = mk ?loc ?attrs (Pctf_val (a, b, c, d)) + let method_ ?loc ?attrs a b c d = mk ?loc ?attrs (Pctf_method (a, b, c, d)) + let constraint_ ?loc ?attrs a b = mk ?loc ?attrs (Pctf_constraint (a, b)) + 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 + List.map + (fun ds -> attribute ~loc:(docstring_loc ds) (text_attr ds)) + f_txt + + let attr d a = {d with pctf_attributes = d.pctf_attributes @ [a]} + +end + +module Cf = struct + let mk ?(loc = !default_loc) ?(attrs = []) + ?(docs = empty_docs) d = + { + pcf_desc = d; + pcf_loc = loc; + pcf_attributes = add_docs_attrs docs attrs; + } + + + 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)) + let initializer_ ?loc ?attrs a = mk ?loc ?attrs (Pcf_initializer a) + 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 + List.map + (fun ds -> attribute ~loc:(docstring_loc ds) (text_attr ds)) + f_txt + + let virtual_ ct = Cfk_virtual ct + let concrete o e = Cfk_concrete (o, e) + + let attr d a = {d with pcf_attributes = d.pcf_attributes @ [a]} + +end + +module Val = struct + let mk ?(loc = !default_loc) ?(attrs = []) ?(docs = empty_docs) + ?(prim = []) name typ = + { + pval_name = name; + pval_type = typ; + pval_attributes = add_docs_attrs docs attrs; + pval_loc = loc; + pval_prim = prim; + } +end + +module Md = struct + let mk ?(loc = !default_loc) ?(attrs = []) + ?(docs = empty_docs) ?(text = []) name typ = + { + pmd_name = name; + pmd_type = typ; + pmd_attributes = + add_text_attrs text (add_docs_attrs docs attrs); + pmd_loc = loc; + } +end + +module Mtd = struct + let mk ?(loc = !default_loc) ?(attrs = []) + ?(docs = empty_docs) ?(text = []) ?typ name = + { + pmtd_name = name; + pmtd_type = typ; + pmtd_attributes = + add_text_attrs text (add_docs_attrs docs attrs); + pmtd_loc = loc; + } +end + +module Mb = struct + let mk ?(loc = !default_loc) ?(attrs = []) + ?(docs = empty_docs) ?(text = []) name expr = + { + pmb_name = name; + pmb_expr = expr; + pmb_attributes = + add_text_attrs text (add_docs_attrs docs attrs); + pmb_loc = loc; + } +end + +module Opn = struct + let mk ?(loc = !default_loc) ?(attrs = []) ?(docs = empty_docs) + ?(override = Fresh) lid = + { + popen_lid = lid; + popen_override = override; + popen_loc = loc; + popen_attributes = add_docs_attrs docs attrs; + } +end + +module Incl = struct + let mk ?(loc = !default_loc) ?(attrs = []) ?(docs = empty_docs) mexpr = + { + pincl_mod = mexpr; + pincl_loc = loc; + pincl_attributes = add_docs_attrs docs attrs; + } + +end + +module Vb = struct + let mk ?(loc = !default_loc) ?(attrs = []) ?(docs = empty_docs) + ?(text = []) pat expr = + { + pvb_pat = pat; + pvb_expr = expr; + pvb_attributes = + add_text_attrs text (add_docs_attrs docs attrs); + pvb_loc = loc; + } +end + +module Ci = struct + let mk ?(loc = !default_loc) ?(attrs = []) + ?(docs = empty_docs) ?(text = []) + ?(virt = Concrete) ?(params = []) name expr = + { + pci_virt = virt; + pci_params = params; + pci_name = name; + pci_expr = expr; + pci_attributes = + add_text_attrs text (add_docs_attrs docs attrs); + pci_loc = loc; + } +end + +module Type = struct + let mk ?(loc = !default_loc) ?(attrs = []) + ?(docs = empty_docs) ?(text = []) + ?(params = []) + ?(cstrs = []) + ?(kind = Ptype_abstract) + ?(priv = Public) + ?manifest + name = + { + ptype_name = name; + ptype_params = params; + ptype_cstrs = cstrs; + ptype_kind = kind; + ptype_private = priv; + ptype_manifest = manifest; + ptype_attributes = + add_text_attrs text (add_docs_attrs docs attrs); + ptype_loc = loc; + } + + let constructor ?(loc = !default_loc) ?(attrs = []) ?(info = empty_info) + ?(args = Pcstr_tuple []) ?res name = + { + pcd_name = name; + pcd_args = args; + pcd_res = res; + pcd_loc = loc; + pcd_attributes = add_info_attrs info attrs; + } + + let field ?(loc = !default_loc) ?(attrs = []) ?(info = empty_info) + ?(mut = Immutable) name typ = + { + pld_name = name; + pld_mutable = mut; + pld_type = typ; + pld_loc = loc; + pld_attributes = add_info_attrs info attrs; + } + +end + +(** Type extensions *) +module Te = struct + let mk ?(attrs = []) ?(docs = empty_docs) + ?(params = []) ?(priv = Public) path constructors = + { + ptyext_path = path; + ptyext_params = params; + ptyext_constructors = constructors; + ptyext_private = priv; + ptyext_attributes = add_docs_attrs docs attrs; + } + + let constructor ?(loc = !default_loc) ?(attrs = []) + ?(docs = empty_docs) ?(info = empty_info) name kind = + { + pext_name = name; + pext_kind = kind; + pext_loc = loc; + pext_attributes = add_docs_attrs docs (add_info_attrs info attrs); + } + + let decl ?(loc = !default_loc) ?(attrs = []) ?(docs = empty_docs) + ?(info = empty_info) ?(args = Pcstr_tuple []) ?res name = + { + pext_name = name; + pext_kind = Pext_decl(args, res); + pext_loc = loc; + pext_attributes = add_docs_attrs docs (add_info_attrs info attrs); + } + + let rebind ?(loc = !default_loc) ?(attrs = []) + ?(docs = empty_docs) ?(info = empty_info) name lid = + { + pext_name = name; + pext_kind = Pext_rebind lid; + pext_loc = loc; + pext_attributes = add_docs_attrs docs (add_info_attrs info attrs); + } + +end + +module Csig = struct + let mk self fields = + { + pcsig_self = self; + pcsig_fields = fields; + } +end + +module Cstr = struct + let mk self fields = + { + pcstr_self = self; + pcstr_fields = fields; + } +end diff --git a/analysis/src/vendor/compiler-libs-406/ast_helper.mli b/analysis/src/vendor/compiler-libs-406/ast_helper.mli new file mode 100644 index 000000000..455e225bd --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ast_helper.mli @@ -0,0 +1,439 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Alain Frisch, LexiFi *) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(** Helpers to produce Parsetree fragments *) + +open Asttypes +open Docstrings +open Parsetree + +type lid = Longident.t loc +type str = string loc +type loc = Location.t +type attrs = attribute list + +(** {1 Default locations} *) + +val default_loc: loc ref + (** Default value for all optional location arguments. *) + +val with_default_loc: loc -> (unit -> 'a) -> 'a + (** Set the [default_loc] within the scope of the execution + of the provided function. *) + +(** {1 Constants} *) + +module Const : sig + val char : char -> constant + val string : ?quotation_delimiter:string -> string -> constant + val integer : ?suffix:char -> string -> constant + val int : ?suffix:char -> int -> constant + val int32 : ?suffix:char -> int32 -> constant + val int64 : ?suffix:char -> int64 -> constant + val nativeint : ?suffix:char -> nativeint -> constant + val float : ?suffix:char -> string -> constant +end + +(** {1 Core language} *) + +(** Type expressions *) +module Typ : + sig + val mk: ?loc:loc -> ?attrs:attrs -> core_type_desc -> core_type + val attr: core_type -> attribute -> core_type + + val any: ?loc:loc -> ?attrs:attrs -> unit -> core_type + val var: ?loc:loc -> ?attrs:attrs -> string -> core_type + val arrow: ?loc:loc -> ?attrs:attrs -> arg_label -> core_type -> core_type + -> core_type + val tuple: ?loc:loc -> ?attrs:attrs -> core_type list -> core_type + val constr: ?loc:loc -> ?attrs:attrs -> lid -> core_type list -> core_type + val object_: ?loc:loc -> ?attrs:attrs -> object_field list + -> closed_flag -> core_type + val class_: ?loc:loc -> ?attrs:attrs -> lid -> core_type list -> core_type + val alias: ?loc:loc -> ?attrs:attrs -> core_type -> string -> core_type + val variant: ?loc:loc -> ?attrs:attrs -> row_field list -> closed_flag + -> label list option -> core_type + val poly: ?loc:loc -> ?attrs:attrs -> str list -> core_type -> core_type + val package: ?loc:loc -> ?attrs:attrs -> lid -> (lid * core_type) list + -> core_type + val extension: ?loc:loc -> ?attrs:attrs -> extension -> core_type + + val force_poly: core_type -> core_type + + val varify_constructors: str list -> core_type -> core_type + (** [varify_constructors newtypes te] is type expression [te], of which + any of nullary type constructor [tc] is replaced by type variable of + the same name, if [tc]'s name appears in [newtypes]. + Raise [Syntaxerr.Variable_in_scope] if any type variable inside [te] + appears in [newtypes]. + @since 4.05 + *) + end + +(** Patterns *) +module Pat: + sig + val mk: ?loc:loc -> ?attrs:attrs -> pattern_desc -> pattern + val attr:pattern -> attribute -> pattern + + val any: ?loc:loc -> ?attrs:attrs -> unit -> pattern + val var: ?loc:loc -> ?attrs:attrs -> str -> pattern + val alias: ?loc:loc -> ?attrs:attrs -> pattern -> str -> pattern + val constant: ?loc:loc -> ?attrs:attrs -> constant -> pattern + val interval: ?loc:loc -> ?attrs:attrs -> constant -> constant -> pattern + val tuple: ?loc:loc -> ?attrs:attrs -> pattern list -> pattern + val construct: ?loc:loc -> ?attrs:attrs -> lid -> pattern option -> pattern + val variant: ?loc:loc -> ?attrs:attrs -> label -> pattern option -> pattern + val record: ?loc:loc -> ?attrs:attrs -> (lid * pattern) list -> closed_flag + -> pattern + val array: ?loc:loc -> ?attrs:attrs -> pattern list -> pattern + val or_: ?loc:loc -> ?attrs:attrs -> pattern -> pattern -> pattern + val constraint_: ?loc:loc -> ?attrs:attrs -> pattern -> core_type -> pattern + val type_: ?loc:loc -> ?attrs:attrs -> lid -> pattern + val lazy_: ?loc:loc -> ?attrs:attrs -> pattern -> pattern + val unpack: ?loc:loc -> ?attrs:attrs -> str -> pattern + val open_: ?loc:loc -> ?attrs:attrs -> lid -> pattern -> pattern + val exception_: ?loc:loc -> ?attrs:attrs -> pattern -> pattern + val extension: ?loc:loc -> ?attrs:attrs -> extension -> pattern + end + +(** Expressions *) +module Exp: + sig + val mk: ?loc:loc -> ?attrs:attrs -> expression_desc -> expression + val attr: expression -> attribute -> expression + + val ident: ?loc:loc -> ?attrs:attrs -> lid -> expression + val constant: ?loc:loc -> ?attrs:attrs -> constant -> expression + val let_: ?loc:loc -> ?attrs:attrs -> rec_flag -> value_binding list + -> expression -> expression + val fun_: ?loc:loc -> ?attrs:attrs -> arg_label -> expression option + -> pattern -> expression -> expression + val function_: ?loc:loc -> ?attrs:attrs -> case list -> expression + val apply: ?loc:loc -> ?attrs:attrs -> expression + -> (arg_label * expression) list -> expression + val match_: ?loc:loc -> ?attrs:attrs -> expression -> case list + -> expression + val try_: ?loc:loc -> ?attrs:attrs -> expression -> case list -> expression + val tuple: ?loc:loc -> ?attrs:attrs -> expression list -> expression + val construct: ?loc:loc -> ?attrs:attrs -> lid -> expression option + -> expression + val variant: ?loc:loc -> ?attrs:attrs -> label -> expression option + -> expression + val record: ?loc:loc -> ?attrs:attrs -> (lid * expression) list + -> expression option -> expression + val field: ?loc:loc -> ?attrs:attrs -> expression -> lid -> expression + val setfield: ?loc:loc -> ?attrs:attrs -> expression -> lid -> expression + -> expression + val array: ?loc:loc -> ?attrs:attrs -> expression list -> expression + val ifthenelse: ?loc:loc -> ?attrs:attrs -> expression -> expression + -> expression option -> expression + val sequence: ?loc:loc -> ?attrs:attrs -> expression -> expression + -> expression + val while_: ?loc:loc -> ?attrs:attrs -> expression -> expression + -> expression + val for_: ?loc:loc -> ?attrs:attrs -> pattern -> expression -> expression + -> direction_flag -> expression -> expression + val coerce: ?loc:loc -> ?attrs:attrs -> expression -> core_type option + -> core_type -> expression + val constraint_: ?loc:loc -> ?attrs:attrs -> expression -> core_type + -> expression + val send: ?loc:loc -> ?attrs:attrs -> expression -> str -> expression + val new_: ?loc:loc -> ?attrs:attrs -> lid -> expression + val setinstvar: ?loc:loc -> ?attrs:attrs -> str -> expression -> expression + val override: ?loc:loc -> ?attrs:attrs -> (str * expression) list + -> expression + val letmodule: ?loc:loc -> ?attrs:attrs -> str -> module_expr -> expression + -> expression + val letexception: + ?loc:loc -> ?attrs:attrs -> extension_constructor -> expression + -> expression + val assert_: ?loc:loc -> ?attrs:attrs -> expression -> expression + val lazy_: ?loc:loc -> ?attrs:attrs -> expression -> expression + val poly: ?loc:loc -> ?attrs:attrs -> expression -> core_type option + -> expression + val object_: ?loc:loc -> ?attrs:attrs -> class_structure -> expression + val newtype: ?loc:loc -> ?attrs:attrs -> str -> expression -> expression + val pack: ?loc:loc -> ?attrs:attrs -> module_expr -> expression + val open_: ?loc:loc -> ?attrs:attrs -> override_flag -> lid -> expression + -> expression + val extension: ?loc:loc -> ?attrs:attrs -> extension -> expression + val unreachable: ?loc:loc -> ?attrs:attrs -> unit -> expression + + val case: pattern -> ?guard:expression -> expression -> case + end + +(** Value declarations *) +module Val: + sig + val mk: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> + ?prim:string list -> str -> core_type -> value_description + end + +(** Type declarations *) +module Type: + sig + val mk: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> ?text:text -> + ?params:(core_type * variance) list -> + ?cstrs:(core_type * core_type * loc) list -> + ?kind:type_kind -> ?priv:private_flag -> ?manifest:core_type -> str -> + type_declaration + + val constructor: ?loc:loc -> ?attrs:attrs -> ?info:info -> + ?args:constructor_arguments -> ?res:core_type -> str -> + constructor_declaration + val field: ?loc:loc -> ?attrs:attrs -> ?info:info -> + ?mut:mutable_flag -> str -> core_type -> label_declaration + end + +(** Type extensions *) +module Te: + sig + val mk: ?attrs:attrs -> ?docs:docs -> + ?params:(core_type * variance) list -> ?priv:private_flag -> + lid -> extension_constructor list -> type_extension + + val constructor: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> ?info:info -> + str -> extension_constructor_kind -> extension_constructor + + val decl: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> ?info:info -> + ?args:constructor_arguments -> ?res:core_type -> str -> + extension_constructor + val rebind: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> ?info:info -> + str -> lid -> extension_constructor + end + +(** {1 Module language} *) + +(** Module type expressions *) +module Mty: + sig + val mk: ?loc:loc -> ?attrs:attrs -> module_type_desc -> module_type + val attr: module_type -> attribute -> module_type + + val ident: ?loc:loc -> ?attrs:attrs -> lid -> module_type + val alias: ?loc:loc -> ?attrs:attrs -> lid -> module_type + val signature: ?loc:loc -> ?attrs:attrs -> signature -> module_type + val functor_: ?loc:loc -> ?attrs:attrs -> + str -> module_type option -> module_type -> module_type + val with_: ?loc:loc -> ?attrs:attrs -> module_type -> + with_constraint list -> module_type + val typeof_: ?loc:loc -> ?attrs:attrs -> module_expr -> module_type + val extension: ?loc:loc -> ?attrs:attrs -> extension -> module_type + end + +(** Module expressions *) +module Mod: + sig + val mk: ?loc:loc -> ?attrs:attrs -> module_expr_desc -> module_expr + val attr: module_expr -> attribute -> module_expr + + val ident: ?loc:loc -> ?attrs:attrs -> lid -> module_expr + val structure: ?loc:loc -> ?attrs:attrs -> structure -> module_expr + val functor_: ?loc:loc -> ?attrs:attrs -> + str -> module_type option -> module_expr -> module_expr + val apply: ?loc:loc -> ?attrs:attrs -> module_expr -> module_expr -> + module_expr + val constraint_: ?loc:loc -> ?attrs:attrs -> module_expr -> module_type -> + module_expr + val unpack: ?loc:loc -> ?attrs:attrs -> expression -> module_expr + val extension: ?loc:loc -> ?attrs:attrs -> extension -> module_expr + end + +(** Signature items *) +module Sig: + sig + val mk: ?loc:loc -> signature_item_desc -> signature_item + + val value: ?loc:loc -> value_description -> signature_item + val type_: ?loc:loc -> rec_flag -> type_declaration list -> signature_item + val type_extension: ?loc:loc -> type_extension -> signature_item + val exception_: ?loc:loc -> extension_constructor -> signature_item + val module_: ?loc:loc -> module_declaration -> signature_item + val rec_module: ?loc:loc -> module_declaration list -> signature_item + 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 + val text: text -> signature_item list + end + +(** Structure items *) +module Str: + sig + val mk: ?loc:loc -> structure_item_desc -> structure_item + + val eval: ?loc:loc -> ?attrs:attributes -> expression -> structure_item + val value: ?loc:loc -> rec_flag -> value_binding list -> structure_item + val primitive: ?loc:loc -> value_description -> structure_item + val type_: ?loc:loc -> rec_flag -> type_declaration list -> structure_item + val type_extension: ?loc:loc -> type_extension -> structure_item + val exception_: ?loc:loc -> extension_constructor -> structure_item + val module_: ?loc:loc -> module_binding -> structure_item + 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_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 + val attribute: ?loc:loc -> attribute -> structure_item + val text: text -> structure_item list + end + +(** Module declarations *) +module Md: + sig + val mk: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> ?text:text -> + str -> module_type -> module_declaration + end + +(** Module type declarations *) +module Mtd: + sig + val mk: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> ?text:text -> + ?typ:module_type -> str -> module_type_declaration + end + +(** Module bindings *) +module Mb: + sig + val mk: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> ?text:text -> + str -> module_expr -> module_binding + end + +(** Opens *) +module Opn: + sig + val mk: ?loc: loc -> ?attrs:attrs -> ?docs:docs -> + ?override:override_flag -> lid -> open_description + end + +(** Includes *) +module Incl: + sig + val mk: ?loc: loc -> ?attrs:attrs -> ?docs:docs -> 'a -> 'a include_infos + end + +(** Value bindings *) +module Vb: + sig + val mk: ?loc: loc -> ?attrs:attrs -> ?docs:docs -> ?text:text -> + pattern -> expression -> value_binding + end + + +(** {1 Class language} *) + +(** Class type expressions *) +module Cty: + sig + val mk: ?loc:loc -> ?attrs:attrs -> class_type_desc -> class_type + val attr: class_type -> attribute -> class_type + + val constr: ?loc:loc -> ?attrs:attrs -> lid -> core_type list -> class_type + val signature: ?loc:loc -> ?attrs:attrs -> class_signature -> class_type + val arrow: ?loc:loc -> ?attrs:attrs -> arg_label -> core_type -> + class_type -> class_type + val extension: ?loc:loc -> ?attrs:attrs -> extension -> class_type + val open_: ?loc:loc -> ?attrs:attrs -> override_flag -> lid -> class_type + -> class_type + end + +(** Class type fields *) +module Ctf: + sig + val mk: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> + class_type_field_desc -> class_type_field + val attr: class_type_field -> attribute -> class_type_field + + val inherit_: ?loc:loc -> ?attrs:attrs -> class_type -> class_type_field + val val_: ?loc:loc -> ?attrs:attrs -> str -> mutable_flag -> + virtual_flag -> core_type -> class_type_field + val method_: ?loc:loc -> ?attrs:attrs -> str -> private_flag -> + virtual_flag -> core_type -> class_type_field + val constraint_: ?loc:loc -> ?attrs:attrs -> core_type -> core_type -> + class_type_field + val extension: ?loc:loc -> ?attrs:attrs -> extension -> class_type_field + val attribute: ?loc:loc -> attribute -> class_type_field + val text: text -> class_type_field list + end + +(** Class expressions *) +module Cl: + sig + val mk: ?loc:loc -> ?attrs:attrs -> class_expr_desc -> class_expr + val attr: class_expr -> attribute -> class_expr + + val constr: ?loc:loc -> ?attrs:attrs -> lid -> core_type list -> class_expr + val structure: ?loc:loc -> ?attrs:attrs -> class_structure -> class_expr + val fun_: ?loc:loc -> ?attrs:attrs -> arg_label -> expression option -> + pattern -> class_expr -> class_expr + val apply: ?loc:loc -> ?attrs:attrs -> class_expr -> + (arg_label * expression) list -> class_expr + val let_: ?loc:loc -> ?attrs:attrs -> rec_flag -> value_binding list -> + class_expr -> class_expr + val constraint_: ?loc:loc -> ?attrs:attrs -> class_expr -> class_type -> + class_expr + val extension: ?loc:loc -> ?attrs:attrs -> extension -> class_expr + val open_: ?loc:loc -> ?attrs:attrs -> override_flag -> lid -> class_expr + -> class_expr + end + +(** Class fields *) +module Cf: + sig + val mk: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> class_field_desc -> + class_field + val attr: class_field -> attribute -> 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 -> + class_field_kind -> class_field + val constraint_: ?loc:loc -> ?attrs:attrs -> core_type -> core_type -> + class_field + val initializer_: ?loc:loc -> ?attrs:attrs -> expression -> class_field + val extension: ?loc:loc -> ?attrs:attrs -> extension -> class_field + val attribute: ?loc:loc -> attribute -> class_field + val text: text -> class_field list + + val virtual_: core_type -> class_field_kind + val concrete: override_flag -> expression -> class_field_kind + + end + +(** Classes *) +module Ci: + sig + val mk: ?loc:loc -> ?attrs:attrs -> ?docs:docs -> ?text:text -> + ?virt:virtual_flag -> ?params:(core_type * variance) list -> + str -> 'a -> 'a class_infos + end + +(** Class signatures *) +module Csig: + sig + val mk: core_type -> class_type_field list -> class_signature + end + +(** Class structures *) +module Cstr: + sig + val mk: pattern -> class_field list -> class_structure + end diff --git a/analysis/src/vendor/compiler-libs-406/ast_mapper.ml b/analysis/src/vendor/compiler-libs-406/ast_mapper.ml new file mode 100644 index 000000000..439717d3d --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ast_mapper.ml @@ -0,0 +1,918 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Alain Frisch, LexiFi *) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* A generic Parsetree mapping class *) + +(* +[@@@ocaml.warning "+9"] + (* Ensure that record patterns don't miss any field. *) +*) + + +open Parsetree +open Ast_helper +open Location + +type mapper = { + attribute: mapper -> attribute -> attribute; + attributes: mapper -> attribute list -> attribute list; + case: mapper -> case -> case; + cases: mapper -> case list -> case list; + 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; + class_type_field: mapper -> class_type_field -> class_type_field; + constructor_declaration: mapper -> constructor_declaration + -> constructor_declaration; + expr: mapper -> expression -> expression; + extension: mapper -> extension -> extension; + extension_constructor: mapper -> extension_constructor + -> extension_constructor; + include_declaration: mapper -> include_declaration -> include_declaration; + include_description: mapper -> include_description -> include_description; + label_declaration: mapper -> label_declaration -> label_declaration; + location: mapper -> Location.t -> Location.t; + module_binding: mapper -> module_binding -> module_binding; + module_declaration: mapper -> module_declaration -> module_declaration; + module_expr: mapper -> module_expr -> module_expr; + module_type: mapper -> module_type -> module_type; + module_type_declaration: mapper -> module_type_declaration + -> module_type_declaration; + open_description: mapper -> open_description -> open_description; + pat: mapper -> pattern -> pattern; + payload: mapper -> payload -> payload; + signature: mapper -> signature -> signature; + signature_item: mapper -> signature_item -> signature_item; + structure: mapper -> structure -> structure; + structure_item: mapper -> structure_item -> structure_item; + typ: mapper -> core_type -> core_type; + type_declaration: mapper -> type_declaration -> type_declaration; + type_extension: mapper -> type_extension -> type_extension; + type_kind: mapper -> type_kind -> type_kind; + value_binding: mapper -> value_binding -> value_binding; + value_description: mapper -> value_description -> value_description; + with_constraint: mapper -> with_constraint -> with_constraint; +} + +let map_fst f (x, y) = (f x, y) +let map_snd f (x, y) = (x, f y) +let map_tuple f1 f2 (x, y) = (f1 x, f2 y) +let map_tuple3 f1 f2 f3 (x, y, z) = (f1 x, f2 y, f3 z) +let map_opt f = function None -> None | Some x -> Some (f x) + +let map_loc sub {loc; txt} = {loc = sub.location sub loc; txt} + +module T = struct + (* Type expressions for the core language *) + + let row_field sub = function + | Rtag (l, attrs, b, tl) -> + Rtag (map_loc sub l, sub.attributes sub attrs, + b, List.map (sub.typ sub) tl) + | Rinherit t -> Rinherit (sub.typ sub t) + + let object_field sub = function + | Otag (l, attrs, t) -> + Otag (map_loc sub l, sub.attributes sub attrs, sub.typ sub t) + | Oinherit t -> Oinherit (sub.typ sub t) + + let map sub {ptyp_desc = desc; ptyp_loc = loc; ptyp_attributes = attrs} = + let open Typ in + let loc = sub.location sub loc in + let attrs = sub.attributes sub attrs in + match desc with + | Ptyp_any -> any ~loc ~attrs () + | Ptyp_var s -> var ~loc ~attrs s + | Ptyp_arrow (lab, t1, t2) -> + arrow ~loc ~attrs lab (sub.typ sub t1) (sub.typ sub t2) + | Ptyp_tuple tyl -> tuple ~loc ~attrs (List.map (sub.typ sub) tyl) + | Ptyp_constr (lid, tl) -> + constr ~loc ~attrs (map_loc sub lid) (List.map (sub.typ sub) tl) + | Ptyp_object (l, o) -> + object_ ~loc ~attrs (List.map (object_field sub) l) o + | Ptyp_class (lid, tl) -> + class_ ~loc ~attrs (map_loc sub lid) (List.map (sub.typ sub) tl) + | Ptyp_alias (t, s) -> alias ~loc ~attrs (sub.typ sub t) s + | Ptyp_variant (rl, b, ll) -> + variant ~loc ~attrs (List.map (row_field sub) rl) b ll + | Ptyp_poly (sl, t) -> poly ~loc ~attrs + (List.map (map_loc sub) sl) (sub.typ sub t) + | Ptyp_package (lid, l) -> + package ~loc ~attrs (map_loc sub lid) + (List.map (map_tuple (map_loc sub) (sub.typ sub)) l) + | Ptyp_extension x -> extension ~loc ~attrs (sub.extension sub x) + + let map_type_declaration sub + {ptype_name; ptype_params; ptype_cstrs; + ptype_kind; + ptype_private; + ptype_manifest; + ptype_attributes; + ptype_loc} = + Type.mk (map_loc sub ptype_name) + ~params:(List.map (map_fst (sub.typ sub)) ptype_params) + ~priv:ptype_private + ~cstrs:(List.map + (map_tuple3 (sub.typ sub) (sub.typ sub) (sub.location sub)) + ptype_cstrs) + ~kind:(sub.type_kind sub ptype_kind) + ?manifest:(map_opt (sub.typ sub) ptype_manifest) + ~loc:(sub.location sub ptype_loc) + ~attrs:(sub.attributes sub ptype_attributes) + + let map_type_kind sub = function + | Ptype_abstract -> Ptype_abstract + | Ptype_variant l -> + Ptype_variant (List.map (sub.constructor_declaration sub) l) + | Ptype_record l -> Ptype_record (List.map (sub.label_declaration sub) l) + | Ptype_open -> Ptype_open + + let map_constructor_arguments sub = function + | Pcstr_tuple l -> Pcstr_tuple (List.map (sub.typ sub) l) + | Pcstr_record l -> + Pcstr_record (List.map (sub.label_declaration sub) l) + + let map_type_extension sub + {ptyext_path; ptyext_params; + ptyext_constructors; + ptyext_private; + ptyext_attributes} = + Te.mk + (map_loc sub ptyext_path) + (List.map (sub.extension_constructor sub) ptyext_constructors) + ~params:(List.map (map_fst (sub.typ sub)) ptyext_params) + ~priv:ptyext_private + ~attrs:(sub.attributes sub ptyext_attributes) + + let map_extension_constructor_kind sub = function + Pext_decl(ctl, cto) -> + Pext_decl(map_constructor_arguments sub ctl, map_opt (sub.typ sub) cto) + | Pext_rebind li -> + Pext_rebind (map_loc sub li) + + let map_extension_constructor sub + {pext_name; + pext_kind; + pext_loc; + pext_attributes} = + Te.constructor + (map_loc sub pext_name) + (map_extension_constructor_kind sub pext_kind) + ~loc:(sub.location sub pext_loc) + ~attrs:(sub.attributes sub pext_attributes) + +end + +module CT = struct + (* Type expressions for the class language *) + + let map sub {pcty_loc = loc; pcty_desc = desc; pcty_attributes = attrs} = + let open Cty in + let loc = sub.location sub loc in + let attrs = sub.attributes sub attrs in + match desc with + | Pcty_constr (lid, tys) -> + constr ~loc ~attrs (map_loc sub lid) (List.map (sub.typ sub) tys) + | Pcty_signature x -> signature ~loc ~attrs (sub.class_signature sub x) + | Pcty_arrow (lab, t, ct) -> + arrow ~loc ~attrs lab (sub.typ sub t) (sub.class_type sub ct) + | Pcty_extension x -> extension ~loc ~attrs (sub.extension sub x) + | Pcty_open (ovf, lid, ct) -> + open_ ~loc ~attrs ovf (map_loc sub lid) (sub.class_type sub ct) + + let map_field sub {pctf_desc = desc; pctf_loc = loc; pctf_attributes = attrs} + = + let open Ctf in + let loc = sub.location sub loc in + let attrs = sub.attributes sub attrs in + match desc with + | Pctf_inherit ct -> inherit_ ~loc ~attrs (sub.class_type sub ct) + | Pctf_val (s, m, v, t) -> + val_ ~loc ~attrs (map_loc sub s) m v (sub.typ sub t) + | Pctf_method (s, p, v, t) -> + method_ ~loc ~attrs (map_loc sub s) p v (sub.typ sub t) + | Pctf_constraint (t1, t2) -> + constraint_ ~loc ~attrs (sub.typ sub t1) (sub.typ sub t2) + | Pctf_attribute x -> attribute ~loc (sub.attribute sub x) + | Pctf_extension x -> extension ~loc ~attrs (sub.extension sub x) + + let map_signature sub {pcsig_self; pcsig_fields} = + Csig.mk + (sub.typ sub pcsig_self) + (List.map (sub.class_type_field sub) pcsig_fields) +end + +module MT = struct + (* Type expressions for the module language *) + + let map sub {pmty_desc = desc; pmty_loc = loc; pmty_attributes = attrs} = + let open Mty in + let loc = sub.location sub loc in + let attrs = sub.attributes sub attrs in + match desc with + | Pmty_ident s -> ident ~loc ~attrs (map_loc sub s) + | Pmty_alias s -> alias ~loc ~attrs (map_loc sub s) + | Pmty_signature sg -> signature ~loc ~attrs (sub.signature sub sg) + | Pmty_functor (s, mt1, mt2) -> + functor_ ~loc ~attrs (map_loc sub s) + (Misc.may_map (sub.module_type sub) mt1) + (sub.module_type sub mt2) + | Pmty_with (mt, l) -> + with_ ~loc ~attrs (sub.module_type sub mt) + (List.map (sub.with_constraint sub) l) + | Pmty_typeof me -> typeof_ ~loc ~attrs (sub.module_expr sub me) + | Pmty_extension x -> extension ~loc ~attrs (sub.extension sub x) + + let map_with_constraint sub = function + | Pwith_type (lid, d) -> + Pwith_type (map_loc sub lid, sub.type_declaration sub d) + | Pwith_module (lid, lid2) -> + Pwith_module (map_loc sub lid, map_loc sub lid2) + | Pwith_typesubst (lid, d) -> + Pwith_typesubst (map_loc sub lid, sub.type_declaration sub d) + | Pwith_modsubst (s, lid) -> + Pwith_modsubst (map_loc sub s, map_loc sub lid) + + let map_signature_item sub {psig_desc = desc; psig_loc = loc} = + let open Sig in + let loc = sub.location sub loc in + match desc with + | Psig_value vd -> value ~loc (sub.value_description sub vd) + | Psig_type (rf, l) -> type_ ~loc rf (List.map (sub.type_declaration sub) l) + | Psig_typext te -> type_extension ~loc (sub.type_extension sub te) + | Psig_exception ed -> exception_ ~loc (sub.extension_constructor sub ed) + | Psig_module x -> module_ ~loc (sub.module_declaration sub x) + | Psig_recmodule l -> + rec_module ~loc (List.map (sub.module_declaration sub) l) + | 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_type l -> + class_type ~loc (List.map (sub.class_type_declaration sub) l) + | Psig_extension (x, attrs) -> + extension ~loc (sub.extension sub x) ~attrs:(sub.attributes sub attrs) + | Psig_attribute x -> attribute ~loc (sub.attribute sub x) +end + + +module M = struct + (* Value expressions for the module language *) + + let map sub {pmod_loc = loc; pmod_desc = desc; pmod_attributes = attrs} = + let open Mod in + let loc = sub.location sub loc in + let attrs = sub.attributes sub attrs in + match desc with + | Pmod_ident x -> ident ~loc ~attrs (map_loc sub x) + | Pmod_structure str -> structure ~loc ~attrs (sub.structure sub str) + | Pmod_functor (arg, arg_ty, body) -> + functor_ ~loc ~attrs (map_loc sub arg) + (Misc.may_map (sub.module_type sub) arg_ty) + (sub.module_expr sub body) + | Pmod_apply (m1, m2) -> + apply ~loc ~attrs (sub.module_expr sub m1) (sub.module_expr sub m2) + | Pmod_constraint (m, mty) -> + constraint_ ~loc ~attrs (sub.module_expr sub m) + (sub.module_type sub mty) + | Pmod_unpack e -> unpack ~loc ~attrs (sub.expr sub e) + | Pmod_extension x -> extension ~loc ~attrs (sub.extension sub x) + + let map_structure_item sub {pstr_loc = loc; pstr_desc = desc} = + let open Str in + let loc = sub.location sub loc in + match desc with + | Pstr_eval (x, attrs) -> + eval ~loc ~attrs:(sub.attributes sub attrs) (sub.expr sub x) + | Pstr_value (r, vbs) -> value ~loc r (List.map (sub.value_binding sub) vbs) + | Pstr_primitive vd -> primitive ~loc (sub.value_description sub vd) + | Pstr_type (rf, l) -> type_ ~loc rf (List.map (sub.type_declaration sub) l) + | Pstr_typext te -> type_extension ~loc (sub.type_extension sub te) + | Pstr_exception ed -> exception_ ~loc (sub.extension_constructor sub ed) + | Pstr_module x -> module_ ~loc (sub.module_binding sub x) + | 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 () -> {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) + | Pstr_extension (x, attrs) -> + extension ~loc (sub.extension sub x) ~attrs:(sub.attributes sub attrs) + | Pstr_attribute x -> attribute ~loc (sub.attribute sub x) +end + +module E = struct + (* Value expressions for the core language *) + + let map sub {pexp_loc = loc; pexp_desc = desc; pexp_attributes = attrs} = + let open Exp in + let loc = sub.location sub loc in + let attrs = sub.attributes sub attrs in + match desc with + | Pexp_ident x -> ident ~loc ~attrs (map_loc sub x) + | Pexp_constant x -> constant ~loc ~attrs x + | Pexp_let (r, vbs, e) -> + let_ ~loc ~attrs r (List.map (sub.value_binding sub) vbs) + (sub.expr sub e) + | Pexp_fun (lab, def, p, e) -> + fun_ ~loc ~attrs lab (map_opt (sub.expr sub) def) (sub.pat sub p) + (sub.expr sub e) + | Pexp_function pel -> function_ ~loc ~attrs (sub.cases sub pel) + | Pexp_apply (e, l) -> + apply ~loc ~attrs (sub.expr sub e) (List.map (map_snd (sub.expr sub)) l) + | Pexp_match (e, pel) -> + match_ ~loc ~attrs (sub.expr sub e) (sub.cases sub pel) + | Pexp_try (e, pel) -> try_ ~loc ~attrs (sub.expr sub e) (sub.cases sub pel) + | Pexp_tuple el -> tuple ~loc ~attrs (List.map (sub.expr sub) el) + | Pexp_construct (lid, arg) -> + construct ~loc ~attrs (map_loc sub lid) (map_opt (sub.expr sub) arg) + | Pexp_variant (lab, eo) -> + variant ~loc ~attrs lab (map_opt (sub.expr sub) eo) + | Pexp_record (l, eo) -> + record ~loc ~attrs (List.map (map_tuple (map_loc sub) (sub.expr sub)) l) + (map_opt (sub.expr sub) eo) + | Pexp_field (e, lid) -> + field ~loc ~attrs (sub.expr sub e) (map_loc sub lid) + | Pexp_setfield (e1, lid, e2) -> + setfield ~loc ~attrs (sub.expr sub e1) (map_loc sub lid) + (sub.expr sub e2) + | Pexp_array el -> array ~loc ~attrs (List.map (sub.expr sub) el) + | Pexp_ifthenelse (e1, e2, e3) -> + ifthenelse ~loc ~attrs (sub.expr sub e1) (sub.expr sub e2) + (map_opt (sub.expr sub) e3) + | Pexp_sequence (e1, e2) -> + sequence ~loc ~attrs (sub.expr sub e1) (sub.expr sub e2) + | Pexp_while (e1, e2) -> + while_ ~loc ~attrs (sub.expr sub e1) (sub.expr sub e2) + | Pexp_for (p, e1, e2, d, e3) -> + for_ ~loc ~attrs (sub.pat sub p) (sub.expr sub e1) (sub.expr sub e2) d + (sub.expr sub e3) + | Pexp_coerce (e, t1, t2) -> + coerce ~loc ~attrs (sub.expr sub e) (map_opt (sub.typ sub) t1) + (sub.typ sub t2) + | Pexp_constraint (e, t) -> + constraint_ ~loc ~attrs (sub.expr sub e) (sub.typ sub t) + | Pexp_send (e, s) -> + send ~loc ~attrs (sub.expr sub e) (map_loc sub s) + | Pexp_new lid -> new_ ~loc ~attrs (map_loc sub lid) + | Pexp_setinstvar (s, e) -> + setinstvar ~loc ~attrs (map_loc sub s) (sub.expr sub e) + | Pexp_override sel -> + override ~loc ~attrs + (List.map (map_tuple (map_loc sub) (sub.expr sub)) sel) + | Pexp_letmodule (s, me, e) -> + letmodule ~loc ~attrs (map_loc sub s) (sub.module_expr sub me) + (sub.expr sub e) + | Pexp_letexception (cd, e) -> + letexception ~loc ~attrs + (sub.extension_constructor sub cd) + (sub.expr sub e) + | Pexp_assert e -> assert_ ~loc ~attrs (sub.expr sub e) + | Pexp_lazy e -> lazy_ ~loc ~attrs (sub.expr sub e) + | Pexp_poly (e, t) -> + poly ~loc ~attrs (sub.expr sub e) (map_opt (sub.typ sub) t) + | Pexp_object cls -> object_ ~loc ~attrs (sub.class_structure sub cls) + | Pexp_newtype (s, e) -> + newtype ~loc ~attrs (map_loc sub s) (sub.expr sub e) + | Pexp_pack me -> pack ~loc ~attrs (sub.module_expr sub me) + | Pexp_open (ovf, lid, e) -> + open_ ~loc ~attrs ovf (map_loc sub lid) (sub.expr sub e) + | Pexp_extension x -> extension ~loc ~attrs (sub.extension sub x) + | Pexp_unreachable -> unreachable ~loc ~attrs () +end + +module P = struct + (* Patterns *) + + let map sub {ppat_desc = desc; ppat_loc = loc; ppat_attributes = attrs} = + let open Pat in + let loc = sub.location sub loc in + let attrs = sub.attributes sub attrs in + match desc with + | Ppat_any -> any ~loc ~attrs () + | Ppat_var s -> var ~loc ~attrs (map_loc sub s) + | Ppat_alias (p, s) -> alias ~loc ~attrs (sub.pat sub p) (map_loc sub s) + | Ppat_constant c -> constant ~loc ~attrs c + | Ppat_interval (c1, c2) -> interval ~loc ~attrs c1 c2 + | Ppat_tuple pl -> tuple ~loc ~attrs (List.map (sub.pat sub) pl) + | Ppat_construct (l, p) -> + construct ~loc ~attrs (map_loc sub l) (map_opt (sub.pat sub) p) + | Ppat_variant (l, p) -> variant ~loc ~attrs l (map_opt (sub.pat sub) p) + | Ppat_record (lpl, cf) -> + record ~loc ~attrs + (List.map (map_tuple (map_loc sub) (sub.pat sub)) lpl) cf + | Ppat_array pl -> array ~loc ~attrs (List.map (sub.pat sub) pl) + | Ppat_or (p1, p2) -> or_ ~loc ~attrs (sub.pat sub p1) (sub.pat sub p2) + | Ppat_constraint (p, t) -> + constraint_ ~loc ~attrs (sub.pat sub p) (sub.typ sub t) + | Ppat_type s -> type_ ~loc ~attrs (map_loc sub s) + | Ppat_lazy p -> lazy_ ~loc ~attrs (sub.pat sub p) + | Ppat_unpack s -> unpack ~loc ~attrs (map_loc sub s) + | Ppat_open (lid,p) -> open_ ~loc ~attrs (map_loc sub lid) (sub.pat sub p) + | Ppat_exception p -> exception_ ~loc ~attrs (sub.pat sub p) + | Ppat_extension x -> extension ~loc ~attrs (sub.extension sub x) +end + +module CE = struct + (* Value expressions for the class language *) + + let map sub {pcl_loc = loc; pcl_desc = desc; pcl_attributes = attrs} = + let open Cl in + let loc = sub.location sub loc in + let attrs = sub.attributes sub attrs in + match desc with + | Pcl_constr (lid, tys) -> + constr ~loc ~attrs (map_loc sub lid) (List.map (sub.typ sub) tys) + | Pcl_structure s -> + structure ~loc ~attrs (sub.class_structure sub s) + | Pcl_fun (lab, e, p, ce) -> + fun_ ~loc ~attrs lab + (map_opt (sub.expr sub) e) + (sub.pat sub p) + (sub.class_expr sub ce) + | Pcl_apply (ce, l) -> + apply ~loc ~attrs (sub.class_expr sub ce) + (List.map (map_snd (sub.expr sub)) l) + | Pcl_let (r, vbs, ce) -> + let_ ~loc ~attrs r (List.map (sub.value_binding sub) vbs) + (sub.class_expr sub ce) + | Pcl_constraint (ce, ct) -> + constraint_ ~loc ~attrs (sub.class_expr sub ce) (sub.class_type sub ct) + | Pcl_extension x -> extension ~loc ~attrs (sub.extension sub x) + | Pcl_open (ovf, lid, ce) -> + open_ ~loc ~attrs ovf (map_loc sub lid) (sub.class_expr sub ce) + + let map_kind sub = function + | Cfk_concrete (o, e) -> Cfk_concrete (o, sub.expr sub e) + | Cfk_virtual t -> Cfk_virtual (sub.typ sub t) + + let map_field sub {pcf_desc = desc; pcf_loc = loc; pcf_attributes = attrs} = + let open Cf in + let loc = sub.location sub loc in + let attrs = sub.attributes sub attrs in + match desc with + | 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) + | Pcf_constraint (t1, t2) -> + constraint_ ~loc ~attrs (sub.typ sub t1) (sub.typ sub t2) + | Pcf_initializer e -> initializer_ ~loc ~attrs (sub.expr sub e) + | Pcf_attribute x -> attribute ~loc (sub.attribute sub x) + | Pcf_extension x -> extension ~loc ~attrs (sub.extension sub x) + + let map_structure sub {pcstr_self; pcstr_fields} = + { + pcstr_self = sub.pat sub pcstr_self; + pcstr_fields = List.map (sub.class_field sub) pcstr_fields; + } + + let class_infos sub f {pci_virt; pci_params = pl; pci_name; pci_expr; + pci_loc; pci_attributes} = + Ci.mk + ~virt:pci_virt + ~params:(List.map (map_fst (sub.typ sub)) pl) + (map_loc sub pci_name) + (f pci_expr) + ~loc:(sub.location sub pci_loc) + ~attrs:(sub.attributes sub pci_attributes) +end + +(* Now, a generic AST mapper, to be extended to cover all kinds and + cases of the OCaml grammar. The default behavior of the mapper is + the identity. *) + +let default_mapper = + { + structure = (fun this l -> List.map (this.structure_item this) l); + structure_item = M.map_structure_item; + module_expr = M.map; + signature = (fun this l -> List.map (this.signature_item this) l); + signature_item = MT.map_signature_item; + module_type = MT.map; + with_constraint = MT.map_with_constraint; + class_expr = CE.map; + class_field = CE.map_field; + class_structure = CE.map_structure; + class_type = CT.map; + class_type_field = CT.map_field; + 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; + type_extension = T.map_type_extension; + extension_constructor = T.map_extension_constructor; + value_description = + (fun this {pval_name; pval_type; pval_prim; pval_loc; + pval_attributes} -> + Val.mk + (map_loc this pval_name) + (this.typ this pval_type) + ~attrs:(this.attributes this pval_attributes) + ~loc:(this.location this pval_loc) + ~prim:pval_prim + ); + + pat = P.map; + expr = E.map; + + module_declaration = + (fun this {pmd_name; pmd_type; pmd_attributes; pmd_loc} -> + Md.mk + (map_loc this pmd_name) + (this.module_type this pmd_type) + ~attrs:(this.attributes this pmd_attributes) + ~loc:(this.location this pmd_loc) + ); + + module_type_declaration = + (fun this {pmtd_name; pmtd_type; pmtd_attributes; pmtd_loc} -> + Mtd.mk + (map_loc this pmtd_name) + ?typ:(map_opt (this.module_type this) pmtd_type) + ~attrs:(this.attributes this pmtd_attributes) + ~loc:(this.location this pmtd_loc) + ); + + module_binding = + (fun this {pmb_name; pmb_expr; pmb_attributes; pmb_loc} -> + Mb.mk (map_loc this pmb_name) (this.module_expr this pmb_expr) + ~attrs:(this.attributes this pmb_attributes) + ~loc:(this.location this pmb_loc) + ); + + + open_description = + (fun this {popen_lid; popen_override; popen_attributes; popen_loc} -> + Opn.mk (map_loc this popen_lid) + ~override:popen_override + ~loc:(this.location this popen_loc) + ~attrs:(this.attributes this popen_attributes) + ); + + + include_description = + (fun this {pincl_mod; pincl_attributes; pincl_loc} -> + Incl.mk (this.module_type this pincl_mod) + ~loc:(this.location this pincl_loc) + ~attrs:(this.attributes this pincl_attributes) + ); + + include_declaration = + (fun this {pincl_mod; pincl_attributes; pincl_loc} -> + Incl.mk (this.module_expr this pincl_mod) + ~loc:(this.location this pincl_loc) + ~attrs:(this.attributes this pincl_attributes) + ); + + + value_binding = + (fun this {pvb_pat; pvb_expr; pvb_attributes; pvb_loc} -> + Vb.mk + (this.pat this pvb_pat) + (this.expr this pvb_expr) + ~loc:(this.location this pvb_loc) + ~attrs:(this.attributes this pvb_attributes) + ); + + + constructor_declaration = + (fun this {pcd_name; pcd_args; pcd_res; pcd_loc; pcd_attributes} -> + Type.constructor + (map_loc this pcd_name) + ~args:(T.map_constructor_arguments this pcd_args) + ?res:(map_opt (this.typ this) pcd_res) + ~loc:(this.location this pcd_loc) + ~attrs:(this.attributes this pcd_attributes) + ); + + label_declaration = + (fun this {pld_name; pld_type; pld_loc; pld_mutable; pld_attributes} -> + Type.field + (map_loc this pld_name) + (this.typ this pld_type) + ~mut:pld_mutable + ~loc:(this.location this pld_loc) + ~attrs:(this.attributes this pld_attributes) + ); + + cases = (fun this l -> List.map (this.case this) l); + case = + (fun this {pc_lhs; pc_guard; pc_rhs} -> + { + pc_lhs = this.pat this pc_lhs; + pc_guard = map_opt (this.expr this) pc_guard; + pc_rhs = this.expr this pc_rhs; + } + ); + + + + location = (fun _this l -> l); + + extension = (fun this (s, e) -> (map_loc this s, this.payload this e)); + attribute = (fun this (s, e) -> (map_loc this s, this.payload this e)); + attributes = (fun this l -> List.map (this.attribute this) l); + payload = + (fun this -> function + | PStr x -> PStr (this.structure this x) + | PSig x -> PSig (this.signature this x) + | PTyp x -> PTyp (this.typ this x) + | PPat (x, g) -> PPat (this.pat this x, map_opt (this.expr this) g) + ); + } + +let rec extension_of_error {loc; msg; if_highlight; sub} = + { loc; txt = "ocaml.error" }, + PStr ([Str.eval (Exp.constant (Pconst_string (msg, None))); + Str.eval (Exp.constant (Pconst_string (if_highlight, None)))] @ + (List.map (fun ext -> Str.extension (extension_of_error ext)) sub)) + +let attribute_of_warning loc s = + { loc; txt = "ocaml.ppwarning" }, + PStr ([Str.eval ~loc (Exp.constant (Pconst_string (s, None)))]) + +module StringMap = Map.Make(struct + type t = string + let compare = compare +end) + +let cookies = ref StringMap.empty + +let get_cookie k = + try Some (StringMap.find k !cookies) + with Not_found -> None + +let set_cookie k v = + cookies := StringMap.add k v !cookies + +let tool_name_ref = ref "_none_" + +let tool_name () = !tool_name_ref + + +module PpxContext = struct + open Longident + open Asttypes + open Ast_helper + + let lid name = { txt = Lident name; loc = Location.none } + + let make_string x = Exp.constant (Pconst_string (x, None)) + + let make_bool x = + if x + then Exp.construct (lid "true") None + else Exp.construct (lid "false") None + + let rec make_list f lst = + match lst with + | x :: rest -> + Exp.construct (lid "::") (Some (Exp.tuple [f x; make_list f rest])) + | [] -> + Exp.construct (lid "[]") None + + let make_pair f1 f2 (x1, x2) = + Exp.tuple [f1 x1; f2 x2] + + + let get_cookies () = + lid "cookies", + make_list (make_pair make_string (fun x -> x)) + (StringMap.bindings !cookies) + + let mk fields = + { txt = "ocaml.ppx.context"; loc = Location.none }, + Parsetree.PStr [Str.eval (Exp.record fields None)] + + let make ~tool_name () = + let fields = + [ + lid "tool_name", make_string tool_name; + 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 "debug", make_bool !Clflags.debug; + get_cookies () + ] + in + mk fields + + let get_fields = function + | PStr [{pstr_desc = Pstr_eval + ({ pexp_desc = Pexp_record (fields, None) }, [])}] -> + fields + | _ -> + raise_errorf "Internal error: invalid [@@@ocaml.ppx.context] syntax" + + let restore fields = + let field name payload = + let rec get_string = function + | { pexp_desc = Pexp_constant (Pconst_string (str, None)) } -> str + | _ -> raise_errorf "Internal error: invalid [@@@ocaml.ppx.context \ + { %s }] string syntax" name + and get_bool pexp = + match pexp with + | {pexp_desc = Pexp_construct ({txt = Longident.Lident "true"}, + None)} -> + true + | {pexp_desc = Pexp_construct ({txt = Longident.Lident "false"}, + None)} -> + false + | _ -> raise_errorf "Internal error: invalid [@@@ocaml.ppx.context \ + { %s }] bool syntax" name + and get_list elem = function + | {pexp_desc = + Pexp_construct ({txt = Longident.Lident "::"}, + Some {pexp_desc = Pexp_tuple [exp; rest]}) } -> + elem exp :: get_list elem rest + | {pexp_desc = + Pexp_construct ({txt = Longident.Lident "[]"}, None)} -> + [] + | _ -> raise_errorf "Internal error: invalid [@@@ocaml.ppx.context \ + { %s }] list syntax" name + and get_pair f1 f2 = function + | {pexp_desc = Pexp_tuple [e1; e2]} -> + (f1 e1, f2 e2) + | _ -> raise_errorf "Internal error: invalid [@@@ocaml.ppx.context \ + { %s }] pair syntax" name + in + match name with + | "tool_name" -> + tool_name_ref := get_string payload + | "include_dirs" -> + Clflags.include_dirs := get_list get_string payload + | "load_path" -> + Config.load_path := get_list get_string payload + | "open_modules" -> + Clflags.open_modules := get_list get_string payload + | "debug" -> + Clflags.debug := get_bool payload + | "cookies" -> + let l = get_list (get_pair get_string (fun x -> x)) payload in + cookies := + List.fold_left + (fun s (k, v) -> StringMap.add k v s) StringMap.empty + l + | _ -> + () + in + List.iter (function ({txt=Lident name}, x) -> field name x | _ -> ()) fields + + let update_cookies fields = + let fields = + List.filter + (function ({txt=Lident "cookies"}, _) -> false | _ -> true) + fields + in + fields @ [get_cookies ()] +end + +let ppx_context = PpxContext.make + +let extension_of_exn exn = + match error_of_exn exn with + | Some (`Ok error) -> extension_of_error error + | Some `Already_displayed -> { loc = Location.none; txt = "ocaml.error" }, PStr [] + | None -> raise exn + + +let apply_lazy ~source ~target mapper = + let implem ast = + let fields, ast = + match ast with + | {pstr_desc = Pstr_attribute ({txt = "ocaml.ppx.context"}, x)} :: l -> + PpxContext.get_fields x, l + | _ -> [], ast + in + PpxContext.restore fields; + let ast = + try + let mapper = mapper () in + mapper.structure mapper ast + with exn -> + [{pstr_desc = Pstr_extension (extension_of_exn exn, []); + pstr_loc = Location.none}] + in + let fields = PpxContext.update_cookies fields in + Str.attribute (PpxContext.mk fields) :: ast + in + let iface ast = + let fields, ast = + match ast with + | {psig_desc = Psig_attribute ({txt = "ocaml.ppx.context"}, x)} :: l -> + PpxContext.get_fields x, l + | _ -> [], ast + in + PpxContext.restore fields; + let ast = + try + let mapper = mapper () in + mapper.signature mapper ast + with exn -> + [{psig_desc = Psig_extension (extension_of_exn exn, []); + psig_loc = Location.none}] + in + let fields = PpxContext.update_cookies fields in + Sig.attribute (PpxContext.mk fields) :: ast + in + + let ic = open_in_bin source in + let magic = + really_input_string ic (String.length Config.ast_impl_magic_number) + in + + let rewrite transform = + Location.set_input_name @@ input_value ic; + let ast = input_value ic in + close_in ic; + let ast = transform ast in + let oc = open_out_bin target in + output_string oc magic; + output_value oc !Location.input_name; + output_value oc ast; + close_out oc + and fail () = + close_in ic; + failwith "Ast_mapper: OCaml version mismatch or malformed input"; + in + + if magic = Config.ast_impl_magic_number then + rewrite (implem : structure -> structure) + else if magic = Config.ast_intf_magic_number then + rewrite (iface : signature -> signature) + else fail () + +let drop_ppx_context_str ~restore = function + | {pstr_desc = Pstr_attribute({Location.txt = "ocaml.ppx.context"}, a)} + :: items -> + if restore then + PpxContext.restore (PpxContext.get_fields a); + items + | items -> items + +let drop_ppx_context_sig ~restore = function + | {psig_desc = Psig_attribute({Location.txt = "ocaml.ppx.context"}, a)} + :: items -> + if restore then + PpxContext.restore (PpxContext.get_fields a); + items + | items -> items + +let add_ppx_context_str ~tool_name ast = + Ast_helper.Str.attribute (ppx_context ~tool_name ()) :: ast + +let add_ppx_context_sig ~tool_name ast = + Ast_helper.Sig.attribute (ppx_context ~tool_name ()) :: ast + + +let apply ~source ~target mapper = + apply_lazy ~source ~target (fun () -> mapper) + +let run_main mapper = + try + let a = Sys.argv in + let n = Array.length a in + if n > 2 then + let mapper () = + try mapper (Array.to_list (Array.sub a 1 (n - 3))) + with exn -> + (* PR#6463 *) + let f _ _ = raise exn in + {default_mapper with structure = f; signature = f} + in + apply_lazy ~source:a.(n - 2) ~target:a.(n - 1) mapper + else begin + Printf.eprintf "Usage: %s [extra_args] \n%!" + Sys.executable_name; + exit 2 + end + with exn -> + prerr_endline (Printexc.to_string exn); + exit 2 + +let register_function = ref (fun _name f -> run_main f) +let register name f = !register_function name f diff --git a/analysis/src/vendor/compiler-libs-406/ast_mapper.mli b/analysis/src/vendor/compiler-libs-406/ast_mapper.mli new file mode 100644 index 000000000..75d33e61c --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ast_mapper.mli @@ -0,0 +1,199 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Alain Frisch, LexiFi *) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(** The interface of a -ppx rewriter + + A -ppx rewriter is a program that accepts a serialized abstract syntax + tree and outputs another, possibly modified, abstract syntax tree. + This module encapsulates the interface between the compiler and + the -ppx rewriters, handling such details as the serialization format, + forwarding of command-line flags, and storing state. + + {!mapper} allows to implement AST rewriting using open recursion. + A typical mapper would be based on {!default_mapper}, a deep + identity mapper, and will fall back on it for handling the syntax it + does not modify. For example: + + {[ +open Asttypes +open Parsetree +open Ast_mapper + +let test_mapper argv = + { default_mapper with + expr = fun mapper expr -> + match expr with + | { pexp_desc = Pexp_extension ({ txt = "test" }, PStr [])} -> + Ast_helper.Exp.constant (Const_int 42) + | other -> default_mapper.expr mapper other; } + +let () = + register "ppx_test" test_mapper]} + + This -ppx rewriter, which replaces [[%test]] in expressions with + the constant [42], can be compiled using + [ocamlc -o ppx_test -I +compiler-libs ocamlcommon.cma ppx_test.ml]. + + *) + +open Parsetree + +(** {1 A generic Parsetree mapper} *) + +type mapper = { + attribute: mapper -> attribute -> attribute; + attributes: mapper -> attribute list -> attribute list; + case: mapper -> case -> case; + cases: mapper -> case list -> case list; + 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; + class_type_field: mapper -> class_type_field -> class_type_field; + constructor_declaration: mapper -> constructor_declaration + -> constructor_declaration; + expr: mapper -> expression -> expression; + extension: mapper -> extension -> extension; + extension_constructor: mapper -> extension_constructor + -> extension_constructor; + include_declaration: mapper -> include_declaration -> include_declaration; + include_description: mapper -> include_description -> include_description; + label_declaration: mapper -> label_declaration -> label_declaration; + location: mapper -> Location.t -> Location.t; + module_binding: mapper -> module_binding -> module_binding; + module_declaration: mapper -> module_declaration -> module_declaration; + module_expr: mapper -> module_expr -> module_expr; + module_type: mapper -> module_type -> module_type; + module_type_declaration: mapper -> module_type_declaration + -> module_type_declaration; + open_description: mapper -> open_description -> open_description; + pat: mapper -> pattern -> pattern; + payload: mapper -> payload -> payload; + signature: mapper -> signature -> signature; + signature_item: mapper -> signature_item -> signature_item; + structure: mapper -> structure -> structure; + structure_item: mapper -> structure_item -> structure_item; + typ: mapper -> core_type -> core_type; + type_declaration: mapper -> type_declaration -> type_declaration; + type_extension: mapper -> type_extension -> type_extension; + type_kind: mapper -> type_kind -> type_kind; + value_binding: mapper -> value_binding -> value_binding; + value_description: mapper -> value_description -> value_description; + with_constraint: mapper -> with_constraint -> with_constraint; +} +(** A mapper record implements one "method" per syntactic category, + using an open recursion style: each method takes as its first + argument the mapper to be applied to children in the syntax + tree. *) + +val default_mapper: mapper +(** A default mapper, which implements a "deep identity" mapping. *) + +(** {1 Apply mappers to compilation units} *) + +val tool_name: unit -> string +(** Can be used within a ppx preprocessor to know which tool is + calling it ["ocamlc"], ["ocamlopt"], ["ocamldoc"], ["ocamldep"], + ["ocaml"], ... Some global variables that reflect command-line + options are automatically synchronized between the calling tool + and the ppx preprocessor: {!Clflags.include_dirs}, + {!Config.load_path}, {!Clflags.open_modules}, {!Clflags.for_package}, + {!Clflags.debug}. *) + + +val apply: source:string -> target:string -> mapper -> unit +(** Apply a mapper (parametrized by the unit name) to a dumped + parsetree found in the [source] file and put the result in the + [target] file. The [structure] or [signature] field of the mapper + is applied to the implementation or interface. *) + +val run_main: (string list -> mapper) -> unit +(** Entry point to call to implement a standalone -ppx rewriter from a + mapper, parametrized by the command line arguments. The current + unit name can be obtained from {!Location.input_name}. This + function implements proper error reporting for uncaught + exceptions. *) + +(** {1 Registration API} *) + +val register_function: (string -> (string list -> mapper) -> unit) ref + +val register: string -> (string list -> mapper) -> unit +(** Apply the [register_function]. The default behavior is to run the + mapper immediately, taking arguments from the process command + line. This is to support a scenario where a mapper is linked as a + stand-alone executable. + + It is possible to overwrite the [register_function] to define + "-ppx drivers", which combine several mappers in a single process. + Typically, a driver starts by defining [register_function] to a + custom implementation, then lets ppx rewriters (linked statically + or dynamically) register themselves, and then run all or some of + them. It is also possible to have -ppx drivers apply rewriters to + only specific parts of an AST. + + The first argument to [register] is a symbolic name to be used by + the ppx driver. *) + + +(** {1 Convenience functions to write mappers} *) + +val map_opt: ('a -> 'b) -> 'a option -> 'b option + +val extension_of_error: Location.error -> extension +(** Encode an error into an 'ocaml.error' extension node which can be + inserted in a generated Parsetree. The compiler will be + responsible for reporting the error. *) + +val attribute_of_warning: Location.t -> string -> attribute +(** Encode a warning message into an 'ocaml.ppwarning' attribute which can be + inserted in a generated Parsetree. The compiler will be + responsible for reporting the warning. *) + +(** {1 Helper functions to call external mappers} *) + +val add_ppx_context_str: + tool_name:string -> Parsetree.structure -> Parsetree.structure +(** Extract information from the current environment and encode it + into an attribute which is prepended to the list of structure + items in order to pass the information to an external + processor. *) + +val add_ppx_context_sig: + tool_name:string -> Parsetree.signature -> Parsetree.signature +(** Same as [add_ppx_context_str], but for signatures. *) + +val drop_ppx_context_str: + restore:bool -> Parsetree.structure -> Parsetree.structure +(** Drop the ocaml.ppx.context attribute from a structure. If + [restore] is true, also restore the associated data in the current + process. *) + +val drop_ppx_context_sig: + restore:bool -> Parsetree.signature -> Parsetree.signature +(** Same as [drop_ppx_context_str], but for signatures. *) + +(** {1 Cookies} *) + +(** Cookies are used to pass information from a ppx processor to + a further invocation of itself, when called from the OCaml + toplevel (or other tools that support cookies). *) + +val set_cookie: string -> Parsetree.expression -> unit +val get_cookie: string -> Parsetree.expression option diff --git a/analysis/src/vendor/compiler-libs-406/asttypes.mli b/analysis/src/vendor/compiler-libs-406/asttypes.mli new file mode 100644 index 000000000..8cab1c6b8 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/asttypes.mli @@ -0,0 +1,58 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(** Auxiliary AST types used by parsetree and typedtree. *) + +type constant = + Const_int of int + | Const_char of char + | Const_string of string * string option + | Const_float of string + | Const_int32 of int32 + | Const_int64 of int64 + | Const_nativeint of nativeint + +type rec_flag = Nonrecursive | Recursive + +type direction_flag = Upto | Downto + +(* Order matters, used in polymorphic comparison *) +type private_flag = Private | Public + +type mutable_flag = Immutable | Mutable + +type virtual_flag = Virtual | Concrete + +type override_flag = Override | Fresh + +type closed_flag = Closed | Open + +type label = string + +type arg_label = + Nolabel + | Labelled of string (* label:T -> ... *) + | Optional of string (* ?label:T -> ... *) + +type 'a loc = 'a Location.loc = { + txt : 'a; + loc : Location.t; +} + + +type variance = + | Covariant + | Contravariant + | Invariant diff --git a/analysis/src/vendor/compiler-libs-406/bsb_db_decode.ml b/analysis/src/vendor/compiler-libs-406/bsb_db_decode.ml new file mode 100644 index 000000000..de74fdb27 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/bsb_db_decode.ml @@ -0,0 +1,165 @@ +(* 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/src/vendor/compiler-libs-406/bsb_db_decode.mli b/analysis/src/vendor/compiler-libs-406/bsb_db_decode.mli new file mode 100644 index 000000000..c19c6c18b --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/bsb_db_decode.mli @@ -0,0 +1,58 @@ +(* 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 t + +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 module_info = { + case : bool (* Bsb_db.case*); + dir_name : string +} + +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 diff --git a/analysis/src/vendor/compiler-libs-406/bsc_warnings.ml b/analysis/src/vendor/compiler-libs-406/bsc_warnings.ml new file mode 100644 index 000000000..1dc1fe285 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/bsc_warnings.ml @@ -0,0 +1,77 @@ +(* 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 + + * + * 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. *) + + + +(** + See the meanings of the warning codes here: https://caml.inria.fr/pub/docs/manual-ocaml/comp.html#sec281 + + - 30 Two labels or constructors of the same name are defined in two mutually recursive types. + - 40 Constructor or label name used out of scope. + + - 6 Label omitted in function application. + - 7 Method overridden. + - 9 Missing fields in a record pattern. (*Not always desired, in some cases need [@@@warning "+9"] *) + - 27 Innocuous unused variable: unused variable that is not bound with let nor as, and doesn’t start with an underscore (_) character. + - 29 Unescaped end-of-line in a string constant (non-portable code). + - 32 .. 39 Unused blabla + - 44 Open statement shadows an already defined identifier. + - 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 + not annoy user too much + + -4 Fragile pattern matching: matching that will remain complete even if additional con- structors are added to one of the variant types matched. + We turn it off since common pattern + {[ + match x with | A -> .. | _ -> false + ]} + + -9 Missing fields in a record pattern. + only in some special cases that we need all fields being listed + + We encourage people to write code based on type based disambigution + 40,41,42 are enabled for compatiblity reasons + -40 Constructor or label name used out of scope + This is intentional, we should never warn it + - 41 Ambiguous constructor or label name. + It is turned off since it prevents such cases below: + {[ + type a = A |B + type b = A | B | C + ]} + - 42 Disambiguated constructor or label name (compatibility warning). + + - 50 Unexpected documentation comment. + + - 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 diff --git a/analysis/src/vendor/compiler-libs-406/btype.ml b/analysis/src/vendor/compiler-libs-406/btype.ml new file mode 100644 index 000000000..d94693b1e --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/btype.ml @@ -0,0 +1,737 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy and 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. *) +(* *) +(**************************************************************************) + +(* Basic operations on core types *) + +open Misc +open Asttypes +open Types + +(**** Sets, maps and hashtables of types ****) + +module TypeSet = Set.Make(TypeOps) +module TypeMap = Map.Make (TypeOps) +module TypeHash = Hashtbl.Make(TypeOps) + +(**** Forward declarations ****) + +let print_raw = + ref (fun _ -> assert false : Format.formatter -> type_expr -> unit) + +(**** Type level management ****) + +let generic_level = 100000000 + +(* Used to mark a type during a traversal. *) +let lowest_level = 0 +let pivot_level = 2 * lowest_level - 1 + (* pivot_level - lowest_level < lowest_level *) + +(**** Some type creators ****) + +let new_id = ref (-1) + +let newty2 level desc = + incr new_id; { desc; level; id = !new_id } +let newgenty desc = newty2 generic_level desc +let newgenvar ?name () = newgenty (Tvar name) +(* +let newmarkedvar level = + incr new_id; { desc = Tvar; level = pivot_level - level; id = !new_id } +let newmarkedgenvar () = + incr new_id; + { desc = Tvar; level = pivot_level - generic_level; id = !new_id } +*) + +(**** Check some types ****) + +let is_Tvar = function {desc=Tvar _} -> true | _ -> false +let is_Tunivar = function {desc=Tunivar _} -> true | _ -> false +let is_Tconstr = function {desc=Tconstr _} -> true | _ -> false + +let dummy_method = "*dummy method*" +let default_mty = function + Some mty -> mty + | None -> Mty_signature [] + +(**** Definitions for backtracking ****) + +type change = + Ctype of type_expr * type_desc + | Ccompress of type_expr * type_desc * type_desc + | Clevel of type_expr * int + | Cname of + (Path.t * type_expr list) option ref * (Path.t * type_expr list) option + | Crow of row_field option ref * row_field option + | Ckind of field_kind option ref * field_kind option + | Ccommu of commutable ref * commutable + | Cuniv of type_expr option ref * type_expr option + | Ctypeset of TypeSet.t ref * TypeSet.t + +type changes = + Change of change * changes ref + | Unchanged + | Invalid + +let trail = Weak.create 1 + +let log_change ch = + match Weak.get trail 0 with None -> () + | Some r -> + let r' = ref Unchanged in + r := Change (ch, r'); + Weak.set trail 0 (Some r') + +(**** Representative of a type ****) + +let rec field_kind_repr = + function + Fvar {contents = Some kind} -> field_kind_repr kind + | kind -> kind + +let rec repr_link compress t d = + function + {desc = Tlink t' as d'} -> + repr_link true t d' t' + | {desc = Tfield (_, k, _, t') as d'} when field_kind_repr k = Fabsent -> + repr_link true t d' t' + | t' -> + if compress then begin + log_change (Ccompress (t, t.desc, d)); t.desc <- d + end; + t' + +let repr t = + match t.desc with + Tlink t' as d -> + repr_link false t d t' + | Tfield (_, k, _, t') as d when field_kind_repr k = Fabsent -> + repr_link false t d t' + | _ -> t + +let rec commu_repr = function + Clink r when !r <> Cunknown -> commu_repr !r + | c -> c + +let rec row_field_repr_aux tl = function + Reither(_, tl', _, {contents = Some fi}) -> + row_field_repr_aux (tl@tl') fi + | Reither(c, tl', m, r) -> + Reither(c, tl@tl', m, r) + | Rpresent (Some _) when tl <> [] -> + Rpresent (Some (List.hd tl)) + | fi -> fi + +let row_field_repr fi = row_field_repr_aux [] fi + +let rec rev_concat l ll = + match ll with + [] -> l + | l'::ll -> rev_concat (l'@l) ll + +let rec row_repr_aux ll row = + match (repr row.row_more).desc with + | Tvariant row' -> + let f = row.row_fields in + row_repr_aux (if f = [] then ll else f::ll) row' + | _ -> + if ll = [] then row else + {row with row_fields = rev_concat row.row_fields ll} + +let row_repr row = row_repr_aux [] row + +let rec row_field tag row = + let rec find = function + | (tag',f) :: fields -> + if tag = tag' then row_field_repr f else find fields + | [] -> + match repr row.row_more with + | {desc=Tvariant row'} -> row_field tag row' + | _ -> Rabsent + in find row.row_fields + +let rec row_more row = + match repr row.row_more with + | {desc=Tvariant row'} -> row_more row' + | ty -> ty + +let row_fixed row = + let row = row_repr row in + row.row_fixed || + match (repr row.row_more).desc with + Tvar _ | Tnil -> false + | Tunivar _ | Tconstr _ -> true + | _ -> assert false + +let static_row row = + let row = row_repr row in + row.row_closed && + List.for_all + (fun (_,f) -> match row_field_repr f with Reither _ -> false | _ -> true) + row.row_fields + +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 proxy ty = + let ty0 = repr ty in + match ty0.desc with + | Tvariant row when not (static_row row) -> + row_more row + | Tobject (ty, _) -> + let rec proxy_obj ty = + match ty.desc with + Tfield (_, _, _, ty) | Tlink ty -> proxy_obj ty + | Tvar _ | Tunivar _ | Tconstr _ -> ty + | Tnil -> ty0 + | _ -> assert false + in proxy_obj ty + | _ -> ty0 + +(**** Utilities for fixed row private types ****) + +let row_of_type t = + match (repr t).desc with + Tobject(t,_) -> + let rec get_row t = + let t = repr t in + match t.desc with + Tfield(_,_,_,t) -> get_row t + | _ -> t + in get_row t + | Tvariant row -> + row_more row + | _ -> + t + +let has_constr_row t = + not (is_Tconstr t) && is_Tconstr (row_of_type t) + +let is_row_name s = + let l = String.length s in + if l < 4 then false else String.sub s (l-4) 4 = "#row" + +let is_constr_row ~allow_ident t = + match t.desc with + Tconstr (Path.Pident id, _, _) when allow_ident -> + is_row_name (Ident.name id) + | Tconstr (Path.Pdot (_, s, _), _, _) -> is_row_name s + | _ -> false + + + (**********************************) + (* Utilities for type traversal *) + (**********************************) + +let rec iter_row f row = + List.iter + (fun (_, fi) -> + match row_field_repr fi with + | Rpresent(Some ty) -> f ty + | Reither(_, tl, _, _) -> List.iter f tl + | _ -> ()) + row.row_fields; + match (repr row.row_more).desc with + Tvariant row -> iter_row f row + | Tvar _ | Tunivar _ | Tsubst _ | Tconstr _ | Tnil -> + Misc.may (fun (_,l) -> List.iter f l) row.row_name + | _ -> assert false + +let iter_type_expr f ty = + match ty.desc with + Tvar _ -> () + | Tarrow (_, ty1, ty2, _) -> f ty1; f ty2 + | Ttuple l -> List.iter f l + | Tconstr (_, l, _) -> List.iter f l + | Tobject(ty, {contents = Some (_, p)}) + -> f ty; List.iter f p + | Tobject (ty, _) -> f ty + | Tvariant row -> iter_row f row; f (row_more row) + | Tfield (_, _, ty1, ty2) -> f ty1; f ty2 + | Tnil -> () + | Tlink ty -> f ty + | Tsubst ty -> f ty + | Tunivar _ -> () + | Tpoly (ty, tyl) -> f ty; List.iter f tyl + | Tpackage (_, _, l) -> List.iter f l + +let rec iter_abbrev f = function + Mnil -> () + | Mcons(_, _, ty, ty', rem) -> f ty; f ty'; iter_abbrev f rem + | Mlink rem -> iter_abbrev f !rem + +type type_iterators = + { it_signature: type_iterators -> signature -> unit; + it_signature_item: type_iterators -> signature_item -> unit; + it_value_description: type_iterators -> value_description -> unit; + it_type_declaration: type_iterators -> type_declaration -> unit; + it_extension_constructor: type_iterators -> extension_constructor -> unit; + it_module_declaration: type_iterators -> module_declaration -> unit; + it_modtype_declaration: type_iterators -> modtype_declaration -> unit; + it_class_declaration: type_iterators -> class_declaration -> unit; + it_class_type_declaration: type_iterators -> class_type_declaration -> unit; + it_module_type: type_iterators -> module_type -> unit; + it_class_type: type_iterators -> class_type -> unit; + it_type_kind: type_iterators -> type_kind -> unit; + it_do_type_expr: type_iterators -> type_expr -> unit; + it_type_expr: type_iterators -> type_expr -> unit; + it_path: Path.t -> unit; } + +let iter_type_expr_cstr_args f = function + | Cstr_tuple tl -> List.iter f tl + | Cstr_record lbls -> List.iter (fun d -> f d.ld_type) lbls + +let map_type_expr_cstr_args f = function + | Cstr_tuple tl -> Cstr_tuple (List.map f tl) + | Cstr_record lbls -> + Cstr_record (List.map (fun d -> {d with ld_type=f d.ld_type}) lbls) + +let iter_type_expr_kind f = function + | Type_abstract -> () + | Type_variant cstrs -> + List.iter + (fun cd -> + iter_type_expr_cstr_args f cd.cd_args; + Misc.may f cd.cd_res + ) + cstrs + | Type_record(lbls, _) -> + List.iter (fun d -> f d.ld_type) lbls + | Type_open -> + () + + +let type_iterators = + let it_signature it = + List.iter (it.it_signature_item it) + and it_signature_item it = function + Sig_value (_, vd) -> it.it_value_description it vd + | Sig_type (_, td, _) -> it.it_type_declaration it td + | 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_type (_, ctd, _) -> it.it_class_type_declaration it ctd + and it_value_description it vd = + it.it_type_expr it vd.val_type + and it_type_declaration it td = + List.iter (it.it_type_expr it) td.type_params; + may (it.it_type_expr it) td.type_manifest; + it.it_type_kind it td.type_kind + and it_extension_constructor it td = + it.it_path td.ext_type_path; + List.iter (it.it_type_expr it) td.ext_type_params; + iter_type_expr_cstr_args (it.it_type_expr it) td.ext_args; + may (it.it_type_expr it) td.ext_ret_type + and it_module_declaration it md = + it.it_module_type it md.md_type + and it_modtype_declaration it mtd = + may (it.it_module_type it) mtd.mtd_type + and it_class_declaration it cd = + List.iter (it.it_type_expr it) cd.cty_params; + it.it_class_type it cd.cty_type; + may (it.it_type_expr it) cd.cty_new; + it.it_path cd.cty_path + and it_class_type_declaration it ctd = + List.iter (it.it_type_expr it) ctd.clty_params; + it.it_class_type it ctd.clty_type; + it.it_path ctd.clty_path + and it_module_type it = function + Mty_ident p + | Mty_alias(_, p) -> it.it_path p + | Mty_signature sg -> it.it_signature it sg + | Mty_functor (_, mto, mt) -> + may (it.it_module_type it) mto; + it.it_module_type it mt + and it_class_type it = function + Cty_constr (p, tyl, cty) -> + it.it_path p; + List.iter (it.it_type_expr it) tyl; + it.it_class_type it cty + | Cty_signature cs -> + it.it_type_expr it cs.csig_self; + Vars.iter (fun _ (_,_,ty) -> it.it_type_expr it ty) cs.csig_vars; + List.iter + (fun (p, tl) -> it.it_path p; List.iter (it.it_type_expr it) tl) + cs.csig_inher + | Cty_arrow (_, ty, cty) -> + it.it_type_expr it ty; + it.it_class_type it cty + and it_type_kind it kind = + iter_type_expr_kind (it.it_type_expr it) kind + and it_do_type_expr it ty = + iter_type_expr (it.it_type_expr it) ty; + match ty.desc with + Tconstr (p, _, _) + | Tobject (_, {contents=Some (p, _)}) + | Tpackage (p, _, _) -> + it.it_path p + | Tvariant row -> + may (fun (p,_) -> it.it_path p) (row_repr row).row_name + | _ -> () + and it_path _p = () + in + { it_path; it_type_expr = it_do_type_expr; it_do_type_expr; + it_type_kind; it_class_type; it_module_type; + it_signature; it_class_type_declaration; it_class_declaration; + it_modtype_declaration; it_module_declaration; it_extension_constructor; + it_type_declaration; it_value_description; it_signature_item; } + +let copy_row f fixed row keep more = + let fields = List.map + (fun (l, fi) -> l, + match row_field_repr fi with + | Rpresent(Some ty) -> Rpresent(Some(f ty)) + | Reither(c, tl, m, e) -> + let e = if keep then e else ref None in + let m = if row.row_fixed then fixed else m in + let tl = List.map f tl in + Reither(c, tl, m, e) + | _ -> fi) + row.row_fields in + let name = + match row.row_name with None -> None + | Some (path, tl) -> Some (path, List.map f tl) in + { row_fields = fields; row_more = more; + row_bound = (); row_fixed = row.row_fixed && fixed; + row_closed = row.row_closed; row_name = name; } + +let rec copy_kind = function + Fvar{contents = Some k} -> copy_kind k + | Fvar _ -> Fvar (ref None) + | Fpresent -> Fpresent + | Fabsent -> assert false + +let copy_commu c = + if commu_repr c = Cok then Cok else Clink (ref Cunknown) + +(* Since univars may be used as row variables, we need to do some + encoding during substitution *) +let rec norm_univar ty = + match ty.desc with + Tunivar _ | Tsubst _ -> ty + | Tlink ty -> norm_univar ty + | Ttuple (ty :: _) -> norm_univar ty + | _ -> assert false + +let rec copy_type_desc ?(keep_names=false) f = function + Tvar _ as ty -> if keep_names then ty else Tvar None + | Tarrow (p, ty1, ty2, c)-> Tarrow (p, f ty1, f ty2, copy_commu c) + | Ttuple l -> Ttuple (List.map f l) + | Tconstr (p, l, _) -> Tconstr (p, List.map f l, ref Mnil) + | Tobject(ty, {contents = Some (p, tl)}) + -> Tobject (f ty, ref (Some(p, List.map f tl))) + | Tobject (ty, _) -> Tobject (f ty, ref None) + | Tvariant _ -> assert false (* too ambiguous *) + | Tfield (p, k, ty1, ty2) -> (* the kind is kept shared *) + Tfield (p, field_kind_repr k, f ty1, f ty2) + | Tnil -> Tnil + | Tlink ty -> copy_type_desc f ty.desc + | Tsubst _ -> assert false + | Tunivar _ as ty -> ty (* always keep the name *) + | Tpoly (ty, tyl) -> + let tyl = List.map (fun x -> norm_univar (f x)) tyl in + Tpoly (f ty, tyl) + | Tpackage (p, n, l) -> Tpackage (p, n, List.map f l) + +(* Utilities for copying *) + +let saved_desc = ref [] + (* Saved association of generic nodes with their description. *) + +let save_desc ty desc = + saved_desc := (ty, desc)::!saved_desc + +let saved_kinds = ref [] (* duplicated kind variables *) +let new_kinds = ref [] (* new kind variables *) +let dup_kind r = + (match !r with None -> () | Some _ -> assert false); + if not (List.memq r !new_kinds) then begin + saved_kinds := r :: !saved_kinds; + let r' = ref None in + new_kinds := r' :: !new_kinds; + r := Some (Fvar r') + end + +(* Restored type descriptions. *) +let cleanup_types () = + List.iter (fun (ty, desc) -> ty.desc <- desc) !saved_desc; + List.iter (fun r -> r := None) !saved_kinds; + saved_desc := []; saved_kinds := []; new_kinds := [] + +(* Mark a type. *) +let rec mark_type ty = + let ty = repr ty in + if ty.level >= lowest_level then begin + ty.level <- pivot_level - ty.level; + iter_type_expr mark_type ty + end + +let mark_type_node ty = + let ty = repr ty in + if ty.level >= lowest_level then begin + ty.level <- pivot_level - ty.level; + end + +let mark_type_params ty = + iter_type_expr mark_type ty + +let type_iterators = + let it_type_expr it ty = + let ty = repr ty in + if ty.level >= lowest_level then begin + mark_type_node ty; + it.it_do_type_expr it ty; + end + in + {type_iterators with it_type_expr} + + +(* Remove marks from a type. *) +let rec unmark_type ty = + let ty = repr ty in + if ty.level < lowest_level then begin + ty.level <- pivot_level - ty.level; + iter_type_expr unmark_type ty + end + +let unmark_iterators = + let it_type_expr _it ty = unmark_type ty in + {type_iterators with it_type_expr} + +let unmark_type_decl decl = + unmark_iterators.it_type_declaration unmark_iterators decl + +let unmark_extension_constructor ext = + List.iter unmark_type ext.ext_type_params; + iter_type_expr_cstr_args unmark_type ext.ext_args; + Misc.may unmark_type ext.ext_ret_type + +let unmark_class_signature sign = + unmark_type sign.csig_self; + Vars.iter (fun _l (_m, _v, t) -> unmark_type t) sign.csig_vars + +let unmark_class_type cty = + unmark_iterators.it_class_type unmark_iterators cty + + + (*******************************************) + (* Memorization of abbreviation expansion *) + (*******************************************) + +(* Search whether the expansion has been memorized. *) + +let lte_public p1 p2 = (* Private <= Public *) + match p1, p2 with + | Private, _ | _, Public -> true + | Public, Private -> false + +let rec find_expans priv p1 = function + Mnil -> None + | Mcons (priv', p2, _ty0, ty, _) + when lte_public priv priv' && Path.same p1 p2 -> Some ty + | Mcons (_, _, _, _, rem) -> find_expans priv p1 rem + | Mlink {contents = rem} -> find_expans priv p1 rem + +(* debug: check for cycles in abbreviation. only works with -principal +let rec check_expans visited ty = + let ty = repr ty in + assert (not (List.memq ty visited)); + match ty.desc with + Tconstr (path, args, abbrev) -> + begin match find_expans path !abbrev with + Some ty' -> check_expans (ty :: visited) ty' + | None -> () + end + | _ -> () +*) + +let memo = ref [] + (* Contains the list of saved abbreviation expansions. *) + +let cleanup_abbrev () = + (* Remove all memorized abbreviation expansions. *) + List.iter (fun abbr -> abbr := Mnil) !memo; + memo := [] + +let memorize_abbrev mem priv path v v' = + (* Memorize the expansion of an abbreviation. *) + mem := Mcons (priv, path, v, v', !mem); + (* check_expans [] v; *) + memo := mem :: !memo + +let rec forget_abbrev_rec mem path = + match mem with + Mnil -> + assert false + | Mcons (_, path', _, _, rem) when Path.same path path' -> + rem + | Mcons (priv, path', v, v', rem) -> + Mcons (priv, path', v, v', forget_abbrev_rec rem path) + | Mlink mem' -> + mem' := forget_abbrev_rec !mem' path; + raise Exit + +let forget_abbrev mem path = + try mem := forget_abbrev_rec !mem path with Exit -> () + +(* debug: check for invalid abbreviations +let rec check_abbrev_rec = function + Mnil -> true + | Mcons (_, ty1, ty2, rem) -> + repr ty1 != repr ty2 + | Mlink mem' -> + check_abbrev_rec !mem' + +let check_memorized_abbrevs () = + List.for_all (fun mem -> check_abbrev_rec !mem) !memo +*) + + (**********************************) + (* Utilities for labels *) + (**********************************) + +let is_optional = function Optional _ -> true | _ -> false + +let label_name = function + Nolabel -> "" + | Labelled s + | Optional s -> s + +let prefixed_label_name = function + Nolabel -> "" + | Labelled s -> "~" ^ s + | Optional s -> "?" ^ s + +let rec extract_label_aux hd l = function + [] -> raise Not_found + | (l',t as p) :: ls -> + if label_name l' = l then (l', t, List.rev hd, ls) + else extract_label_aux (p::hd) l ls + +let extract_label l ls = extract_label_aux [] l ls + + + (**********************************) + (* Utilities for backtracking *) + (**********************************) + +let undo_change = function + Ctype (ty, desc) -> ty.desc <- desc + | Ccompress (ty, desc, _) -> ty.desc <- desc + | Clevel (ty, level) -> ty.level <- level + | Cname (r, v) -> r := v + | Crow (r, v) -> r := v + | Ckind (r, v) -> r := v + | Ccommu (r, v) -> r := v + | Cuniv (r, v) -> r := v + | Ctypeset (r, v) -> r := v + +type snapshot = changes ref * int +let last_snapshot = ref 0 + +let log_type ty = + if ty.id <= !last_snapshot then log_change (Ctype (ty, ty.desc)) +let link_type ty ty' = + log_type ty; + let desc = ty.desc in + ty.desc <- Tlink ty'; + (* Name is a user-supplied name for this unification variable (obtained + * through a type annotation for instance). *) + match desc, ty'.desc with + Tvar name, Tvar name' -> + begin match name, name' with + | Some _, None -> log_type ty'; ty'.desc <- Tvar name + | None, Some _ -> () + | Some _, Some _ -> + if ty.level < ty'.level then (log_type ty'; ty'.desc <- Tvar name) + | None, None -> () + end + | _ -> () + (* ; assert (check_memorized_abbrevs ()) *) + (* ; check_expans [] ty' *) +let set_level ty level = + if ty.id <= !last_snapshot then log_change (Clevel (ty, ty.level)); + ty.level <- level +let set_univar rty ty = + log_change (Cuniv (rty, !rty)); rty := Some ty +let set_name nm v = + log_change (Cname (nm, !nm)); nm := v +let set_row_field e v = + log_change (Crow (e, !e)); e := Some v +let set_kind rk k = + log_change (Ckind (rk, !rk)); rk := Some k +let set_commu rc c = + log_change (Ccommu (rc, !rc)); rc := c +let set_typeset rs s = + log_change (Ctypeset (rs, !rs)); rs := s + +let snapshot () = + let old = !last_snapshot in + last_snapshot := !new_id; + match Weak.get trail 0 with Some r -> (r, old) + | None -> + let r = ref Unchanged in + Weak.set trail 0 (Some r); + (r, old) + +let rec rev_log accu = function + Unchanged -> accu + | Invalid -> assert false + | Change (ch, next) -> + let d = !next in + next := Invalid; + rev_log (ch::accu) d + +let backtrack (changes, old) = + match !changes with + Unchanged -> last_snapshot := old + | Invalid -> failwith "Btype.backtrack" + | Change _ as change -> + cleanup_abbrev (); + let backlog = rev_log [] change in + List.iter undo_change backlog; + changes := Unchanged; + last_snapshot := old; + Weak.set trail 0 (Some changes) + +let rec rev_compress_log log r = + match !r with + Unchanged | Invalid -> + log + | Change (Ccompress _, next) -> + rev_compress_log (r::log) next + | Change (_, next) -> + rev_compress_log log next + +let undo_compress (changes, _old) = + match !changes with + Unchanged + | Invalid -> () + | Change _ -> + let log = rev_compress_log [] changes in + List.iter + (fun r -> match !r with + Change (Ccompress (ty, desc, d), next) when ty.desc == d -> + ty.desc <- desc; r := !next + | _ -> ()) + log diff --git a/analysis/src/vendor/compiler-libs-406/builtin_attributes.ml b/analysis/src/vendor/compiler-libs-406/builtin_attributes.ml new file mode 100755 index 000000000..84503189e --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/builtin_attributes.ml @@ -0,0 +1,206 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Alain Frisch, LexiFi *) +(* *) +(* 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 Asttypes +open Parsetree + +let string_of_cst = function + | Pconst_string(s, _) -> Some s + | _ -> None + +let string_of_payload = function + | PStr[{pstr_desc=Pstr_eval({pexp_desc=Pexp_constant c},_)}] -> + string_of_cst c + | _ -> None + +let string_of_opt_payload p = + match string_of_payload p with + | Some s -> s + | None -> "" + +let rec error_of_extension ext = + match ext with + | ({txt = ("ocaml.error"|"error") as txt; loc}, p) -> + let rec sub_from inner = + match inner with + | {pstr_desc=Pstr_extension (ext, _)} :: rest -> + error_of_extension ext :: sub_from rest + | _ :: rest -> + (Location.errorf ~loc + "Invalid syntax for sub-error of extension '%s'." txt) :: + sub_from rest + | [] -> [] + in + begin match p with + | PStr [] -> raise Location.Already_displayed_error + | PStr({pstr_desc=Pstr_eval + ({pexp_desc=Pexp_constant(Pconst_string(msg,_))}, _)}:: + {pstr_desc=Pstr_eval + ({pexp_desc=Pexp_constant(Pconst_string(if_highlight,_))}, _)}:: + inner) -> + Location.error ~loc ~if_highlight ~sub:(sub_from inner) msg + | PStr({pstr_desc=Pstr_eval + ({pexp_desc=Pexp_constant(Pconst_string(msg,_))}, _)}::inner) -> + Location.error ~loc ~sub:(sub_from inner) msg + | _ -> Location.errorf ~loc "Invalid syntax for extension '%s'." txt + end + | ({txt; loc}, _) -> + Location.errorf ~loc "Uninterpreted extension '%s'." txt + +let cat s1 s2 = + if s2 = "" then s1 else + s1 ^ "\n" ^ s2 + +let rec deprecated_of_attrs = function + | [] -> None + | ({txt = "ocaml.deprecated"|"deprecated"; _}, p) :: _ -> + Some (string_of_opt_payload p) + | _ :: tl -> deprecated_of_attrs tl + +let check_deprecated loc attrs s = + match deprecated_of_attrs attrs with + | None -> () + | Some txt -> Location.deprecated loc (cat s txt) + +let check_deprecated_inclusion ~def ~use loc attrs1 attrs2 s = + match deprecated_of_attrs attrs1, deprecated_of_attrs attrs2 with + | None, _ | Some _, Some _ -> () + | Some txt, None -> Location.deprecated ~def ~use loc (cat s txt) + +let rec deprecated_mutable_of_attrs = function + | [] -> None + | ({txt = "ocaml.deprecated_mutable"|"deprecated_mutable"; _}, p) :: _ -> + Some (string_of_opt_payload p) + | _ :: tl -> deprecated_mutable_of_attrs tl + +let check_deprecated_mutable loc attrs s = + match deprecated_mutable_of_attrs attrs with + | None -> () + | Some txt -> + Location.deprecated loc (Printf.sprintf "mutating field %s" (cat s txt)) + +let check_deprecated_mutable_inclusion ~def ~use loc attrs1 attrs2 s = + match deprecated_mutable_of_attrs attrs1, + deprecated_mutable_of_attrs attrs2 + with + | None, _ | Some _, Some _ -> () + | Some txt, None -> + Location.deprecated ~def ~use loc + (Printf.sprintf "mutating field %s" (cat s txt)) + +let check_bs_attributes_inclusion = + ref (fun _attrs1 _attrs2 _s -> + None + ) + +let check_duplicated_labels : (_ -> _ option ) ref = ref (fun _lbls -> + None +) + +let rec deprecated_of_sig = function + | {psig_desc = Psig_attribute a} :: tl -> + begin match deprecated_of_attrs [a] with + | None -> deprecated_of_sig tl + | Some _ as r -> r + end + | _ -> None + + +let rec deprecated_of_str = function + | {pstr_desc = Pstr_attribute a} :: tl -> + begin match deprecated_of_attrs [a] with + | None -> deprecated_of_str tl + | Some _ as r -> r + end + | _ -> None + + +let warning_attribute ?(ppwarning = true) = + let process loc txt errflag payload = + match string_of_payload payload with + | Some s -> + begin try Warnings.parse_options errflag s + with Arg.Bad _ -> + Location.prerr_warning loc + (Warnings.Attribute_payload + (txt, "Ill-formed list of warnings")) + end + | None -> + Location.prerr_warning loc + (Warnings.Attribute_payload + (txt, "A single string literal is expected")) + in + function + | ({txt = ("ocaml.warning"|"warning") as txt; loc}, payload) -> + process loc txt false payload + | ({txt = ("ocaml.warnerror"|"warnerror") as txt; loc}, payload) -> + process loc txt true payload + | {txt="ocaml.ppwarning"|"ppwarning"}, + PStr[{pstr_desc=Pstr_eval({pexp_desc=Pexp_constant + (Pconst_string (s, _))},_); + pstr_loc}] when ppwarning -> + Location.prerr_warning pstr_loc (Warnings.Preprocessor s) + | _ -> + () + +let warning_scope ?ppwarning attrs f = + let prev = Warnings.backup () in + try + List.iter (warning_attribute ?ppwarning) (List.rev attrs); + let ret = f () in + Warnings.restore prev; + ret + with exn -> + Warnings.restore prev; + raise exn + + +let warn_on_literal_pattern = + List.exists + (function + | ({txt="ocaml.warn_on_literal_pattern"|"warn_on_literal_pattern"; _}, _) + -> true + | _ -> false + ) + +let explicit_arity = + List.exists + (function + | ({txt="ocaml.explicit_arity"|"explicit_arity"; _}, _) -> true + | _ -> false + ) + +let immediate = + List.exists + (function + | ({txt="ocaml.immediate"|"immediate"; _}, _) -> true + | _ -> false + ) + +(* The "ocaml.boxed (default)" and "ocaml.unboxed (default)" + attributes cannot be input by the user, they are added by the + compiler when applying the default setting. This is done to record + in the .cmi the default used by the compiler when compiling the + source file because the default can change between compiler + invocations. *) + +let check l (x, _) = List.mem x.txt l + +let has_unboxed attr = + List.exists (check ["ocaml.unboxed"; "unboxed"]) + attr + +let has_boxed attr = + List.exists (check ["ocaml.boxed"; "boxed"]) attr diff --git a/analysis/src/vendor/compiler-libs-406/builtin_attributes.mli b/analysis/src/vendor/compiler-libs-406/builtin_attributes.mli new file mode 100755 index 000000000..7282dbbe2 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/builtin_attributes.mli @@ -0,0 +1,84 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Alain Frisch, LexiFi *) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Support for some of the builtin attributes: + + ocaml.deprecated + ocaml.error + ocaml.ppwarning + ocaml.warning + ocaml.warnerror + ocaml.explicit_arity (for camlp4/camlp5) + ocaml.warn_on_literal_pattern + ocaml.deprecated_mutable + ocaml.immediate + ocaml.boxed / ocaml.unboxed +*) + + +val check_deprecated: Location.t -> Parsetree.attributes -> string -> unit +val check_deprecated_inclusion: + def:Location.t -> use:Location.t -> Location.t -> Parsetree.attributes -> + Parsetree.attributes -> string -> unit +val deprecated_of_attrs: Parsetree.attributes -> string option +val deprecated_of_sig: Parsetree.signature -> string option +val deprecated_of_str: Parsetree.structure -> string option + +val check_deprecated_mutable: + Location.t -> Parsetree.attributes -> string -> unit +val check_deprecated_mutable_inclusion: + def:Location.t -> use:Location.t -> Location.t -> Parsetree.attributes -> + Parsetree.attributes -> string -> unit + +val check_bs_attributes_inclusion: + (Parsetree.attributes -> + Parsetree.attributes -> string -> (string*string) option ) ref + +val check_duplicated_labels: + (Parsetree.label_declaration list -> + string Asttypes.loc option + ) ref +val error_of_extension: Parsetree.extension -> Location.error + +val warning_attribute: ?ppwarning:bool -> Parsetree.attribute -> unit + (** Apply warning settings from the specified attribute. + "ocaml.warning"/"ocaml.warnerror" (and variants without the prefix) + are processed and other attributes are ignored. + + Also implement ocaml.ppwarning (unless ~ppwarning:false is + passed). + *) + +val warning_scope: + ?ppwarning:bool -> + Parsetree.attributes -> (unit -> 'a) -> 'a + (** Execute a function in a new scope for warning settings. This + means that the effect of any call to [warning_attribute] during + the execution of this function will be discarded after + execution. + + The function also takes a list of attributes which are processed + with [warning_attribute] in the fresh scope before the function + is executed. + *) + +val warn_on_literal_pattern: Parsetree.attributes -> bool +val explicit_arity: Parsetree.attributes -> bool + + +val immediate: Parsetree.attributes -> bool + +val has_unboxed: Parsetree.attributes -> bool +val has_boxed: Parsetree.attributes -> bool diff --git a/analysis/src/vendor/compiler-libs-406/clflags.ml b/analysis/src/vendor/compiler-libs-406/clflags.ml new file mode 100644 index 000000000..1385d41c5 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/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 principal = ref false (* -principal *) +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 *) + + +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 None +let no_assert_false = ref false +let dump_location = ref true diff --git a/analysis/src/vendor/compiler-libs-406/clflags.mli b/analysis/src/vendor/compiler-libs-406/clflags.mli new file mode 100644 index 000000000..b0859b4a1 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/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 principal : 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 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 : string option ref +val no_assert_false : bool ref +val dump_location : bool ref + diff --git a/analysis/src/vendor/compiler-libs-406/cmi_format.ml b/analysis/src/vendor/compiler-libs-406/cmi_format.ml new file mode 100644 index 000000000..1b21d3621 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/cmi_format.ml @@ -0,0 +1,141 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +type pers_flags = + | Rectypes + | Deprecated of string + | Opaque + | Unsafe_string + +type error = + Not_an_interface of string + | Wrong_version_interface of string * string + | Corrupted_interface of string + +exception Error of error + +type cmi_infos = { + cmi_name : string; + cmi_sign : Types.signature_item list; + cmi_crcs : (string * Digest.t option) list; + cmi_flags : pers_flags list; +} + +let input_cmi ic = + let (name, sign) = input_value ic in + let crcs = input_value ic in + let flags = input_value ic in + { + cmi_name = name; + cmi_sign = sign; + cmi_crcs = crcs; + cmi_flags = flags; + } + +let read_cmi filename = + let ic = open_in_bin filename in + try + let buffer = + really_input_string ic (String.length Config.cmi_magic_number) + in + if buffer <> Config.cmi_magic_number then begin + close_in ic; + let pre_len = String.length Config.cmi_magic_number - 3 in + if String.sub buffer 0 pre_len + = String.sub Config.cmi_magic_number 0 pre_len then + begin + let msg = + if buffer < Config.cmi_magic_number then "an older" else "a newer" in + raise (Error (Wrong_version_interface (filename, msg))) + end else begin + raise(Error(Not_an_interface filename)) + end + end; + let cmi = input_cmi ic in + close_in ic; + cmi + with End_of_file | Failure _ -> + close_in ic; + raise(Error(Corrupted_interface(filename))) + | Error e -> + close_in ic; + raise (Error e) + +let output_cmi filename oc cmi = +(* beware: the provided signature must have been substituted for saving *) + output_string oc Config.cmi_magic_number; + output_value oc (cmi.cmi_name, cmi.cmi_sign); + flush oc; + let crc = Digest.file filename in + let crcs = (cmi.cmi_name, Some crc) :: cmi.cmi_crcs in + output_value oc crcs; + 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 +*) +let create_cmi ?check_exists filename (cmi : cmi_infos) = + (* beware: the provided signature must have been substituted for saving *) + let content = + Config.cmi_magic_number ^ Marshal.to_string (cmi.cmi_name, cmi.cmi_sign) [] + (* checkout [output_value] in {!Pervasives} module *) + in + let crc = Digest.string content in + let cmi_infos = + if check_exists <> None && Sys.file_exists filename then + Some (read_cmi filename) + else None in + match cmi_infos with + | Some {cmi_name = _; cmi_sign = _; cmi_crcs = (old_name, Some old_crc)::rest ; cmi_flags} + (* TODO: design the cmi format so that we don't need read the whole cmi *) + when + cmi.cmi_name = old_name && + crc = old_crc && + cmi.cmi_crcs = rest && + cmi_flags = cmi.cmi_flags -> + crc + | _ -> + let crcs = (cmi.cmi_name, Some crc) :: cmi.cmi_crcs in + let oc = open_out_bin filename in + output_string oc content; + output_value oc crcs; + output_value oc cmi.cmi_flags; + close_out oc; + crc + +(* Error report *) + +open Format + +let report_error ppf = function + | Not_an_interface filename -> + fprintf ppf "%a@ is not a compiled interface" + Location.print_filename filename + | Wrong_version_interface (filename, older_newer) -> + fprintf ppf + "%a@ is not a compiled interface for this version of OCaml.@.\ + It seems to be for %s version of OCaml." + Location.print_filename filename older_newer + | Corrupted_interface filename -> + fprintf ppf "Corrupted compiled interface@ %a" + Location.print_filename filename + +let () = + Location.register_error_of_exn + (function + | Error err -> Some (Location.error_of_printer_file report_error err) + | _ -> None + ) diff --git a/analysis/src/vendor/compiler-libs-406/cmi_format.mli b/analysis/src/vendor/compiler-libs-406/cmi_format.mli new file mode 100644 index 000000000..9385deb5b --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/cmi_format.mli @@ -0,0 +1,51 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +type pers_flags = + | Rectypes + | Deprecated of string + | Opaque + | Unsafe_string + +type cmi_infos = { + cmi_name : string; + cmi_sign : Types.signature_item list; + cmi_crcs : (string * Digest.t option) list; + cmi_flags : pers_flags list; +} + +(* write the magic + the cmi information *) +val output_cmi : string -> out_channel -> cmi_infos -> Digest.t + +val create_cmi : ?check_exists:unit -> string -> cmi_infos -> Digest.t + +(* read the cmi information (the magic is supposed to have already been read) *) +val input_cmi : in_channel -> cmi_infos + +(* read a cmi from a filename, checking the magic *) +val read_cmi : string -> cmi_infos + +(* Error report *) + +type error = + Not_an_interface of string + | Wrong_version_interface of string * string + | Corrupted_interface of string + +exception Error of error + +open Format + +val report_error: formatter -> error -> unit diff --git a/analysis/src/vendor/compiler-libs-406/cmt_format.ml b/analysis/src/vendor/compiler-libs-406/cmt_format.ml new file mode 100644 index 000000000..911111c16 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/cmt_format.ml @@ -0,0 +1,197 @@ +(**************************************************************************) +(* *) +(* 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 Cmi_format +open Typedtree + +(* Note that in Typerex, there is an awful hack to save a cmt file + together with the interface file that was generated by ocaml (this + is because the installed version of ocaml might differ from the one + integrated in Typerex). +*) + + + +let read_magic_number ic = + let len_magic_number = String.length Config.cmt_magic_number in + really_input_string ic len_magic_number + +type binary_annots = + | Packed of Types.signature * string list + | Implementation of structure + | Interface of signature + | Partial_implementation of binary_part array + | Partial_interface of binary_part array + +and binary_part = +| Partial_structure of structure +| Partial_structure_item of structure_item +| Partial_expression of expression +| Partial_pattern of pattern +| Partial_class_expr of unit +| Partial_signature of signature +| Partial_signature_item of signature_item +| Partial_module_type of module_type + +type cmt_infos = { + cmt_modname : string; + cmt_annots : binary_annots; + cmt_value_dependencies : + (Types.value_description * Types.value_description) list; + cmt_comments : (string * Location.t) list; + cmt_args : string array; + cmt_sourcefile : string option; + cmt_builddir : string; + cmt_loadpath : string list; + cmt_source_digest : Digest.t option; + cmt_initial_env : Env.t; + cmt_imports : (string * Digest.t option) list; + cmt_interface_digest : Digest.t option; + cmt_use_summaries : bool; +} + +type error = + Not_a_typedtree of string + +let need_to_clear_env = + try ignore (Sys.getenv "OCAML_BINANNOT_WITHENV"); false + with Not_found -> true + +let keep_only_summary = Env.keep_only_summary + +open Tast_mapper + +let cenv = + {Tast_mapper.default with env = fun _sub env -> keep_only_summary env} + +let clear_part = function + | Partial_structure s -> Partial_structure (cenv.structure cenv s) + | Partial_structure_item s -> + 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 () -> assert false + | Partial_signature s -> Partial_signature (cenv.signature cenv s) + | Partial_signature_item s -> + Partial_signature_item (cenv.signature_item cenv s) + | Partial_module_type s -> Partial_module_type (cenv.module_type cenv s) + +let clear_env binary_annots = + if need_to_clear_env then + match binary_annots with + | Implementation s -> Implementation (cenv.structure cenv s) + | Interface s -> Interface (cenv.signature cenv s) + | Packed _ -> binary_annots + | Partial_implementation array -> + Partial_implementation (Array.map clear_part array) + | Partial_interface array -> + Partial_interface (Array.map clear_part array) + + else binary_annots + +exception Error of error + +let input_cmt ic = (input_value ic : cmt_infos) + +let output_cmt oc cmt = + output_string oc Config.cmt_magic_number; + output_value oc (cmt : cmt_infos) + +let read filename = +(* Printf.fprintf stderr "Cmt_format.read %s\n%!" filename; *) + let ic = open_in_bin filename in + try + let magic_number = read_magic_number ic in + let cmi, cmt = + if magic_number = Config.cmt_magic_number then + None, Some (input_cmt ic) + else if magic_number = Config.cmi_magic_number then + let cmi = Cmi_format.input_cmi ic in + let cmt = try + let magic_number = read_magic_number ic in + if magic_number = Config.cmt_magic_number then + let cmt = input_cmt ic in + Some cmt + else None + with _ -> None + in + Some cmi, cmt + else + raise(Cmi_format.Error(Cmi_format.Not_an_interface filename)) + in + close_in ic; +(* Printf.fprintf stderr "Cmt_format.read done\n%!"; *) + cmi, cmt + with e -> + close_in ic; + raise e + +let read_cmt filename = + match read filename with + _, None -> raise (Error (Not_a_typedtree filename)) + | _, Some cmt -> cmt + +let read_cmi filename = + match read filename with + None, _ -> + raise (Cmi_format.Error (Cmi_format.Not_an_interface filename)) + | Some cmi, _ -> cmi + +let saved_types = ref [] +let value_deps = ref [] + +let clear () = + saved_types := []; + value_deps := [] + +let add_saved_type b = saved_types := b :: !saved_types +let get_saved_types () = !saved_types +let set_saved_types l = saved_types := l + +let record_value_dependency vd1 vd2 = + if vd1.Types.val_loc <> vd2.Types.val_loc then + value_deps := (vd1, vd2) :: !value_deps + +let save_cmt filename modname binary_annots sourcefile initial_env cmi = + 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 + (fun temp_file_name oc -> + let this_crc = + match cmi with + | None -> None + | Some cmi -> Some (output_cmi temp_file_name oc cmi) + in + let source_digest = Misc.may_map Digest.file sourcefile in + let cmt = { + cmt_modname = modname; + cmt_annots = clear_env binary_annots; + cmt_value_dependencies = !value_deps; + cmt_comments = Lexer.comments (); + cmt_args = Sys.argv; + cmt_sourcefile = sourcefile; + cmt_builddir = Sys.getcwd (); + cmt_loadpath = !Config.load_path; + cmt_source_digest = source_digest; + cmt_initial_env = if need_to_clear_env then + keep_only_summary initial_env else initial_env; + cmt_imports = List.sort compare (Env.imports ()); + cmt_interface_digest = this_crc; + cmt_use_summaries = need_to_clear_env; + } in + output_cmt oc cmt) + end; + clear () diff --git a/analysis/src/vendor/compiler-libs-406/cmt_format.mli b/analysis/src/vendor/compiler-libs-406/cmt_format.mli new file mode 100644 index 000000000..6daf64339 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/cmt_format.mli @@ -0,0 +1,121 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(** cmt and cmti files format. *) + +(** The layout of a cmt file is as follows: + := \{\} \{cmt infos\} \{\} + where is the cmi file format: + := . + More precisely, the optional part must be present if and only if + the file is: + - a cmti, or + - a cmt, for a ml file which has no corresponding mli (hence no + corresponding cmti). + + Thus, we provide a common reading function for cmi and cmt(i) + files which returns an option for each of the three parts: cmi + info, cmt info, source info. *) + +open Typedtree + +type binary_annots = + | Packed of Types.signature * string list + | Implementation of structure + | Interface of signature + | Partial_implementation of binary_part array + | Partial_interface of binary_part array + +and binary_part = + | Partial_structure of structure + | Partial_structure_item of structure_item + | Partial_expression of expression + | Partial_pattern of pattern + | Partial_class_expr of unit + | Partial_signature of signature + | Partial_signature_item of signature_item + | Partial_module_type of module_type + +type cmt_infos = { + cmt_modname : string; + cmt_annots : binary_annots; + cmt_value_dependencies : + (Types.value_description * Types.value_description) list; + cmt_comments : (string * Location.t) list; + cmt_args : string array; + cmt_sourcefile : string option; + cmt_builddir : string; + cmt_loadpath : string list; + cmt_source_digest : string option; + cmt_initial_env : Env.t; + cmt_imports : (string * Digest.t option) list; + cmt_interface_digest : Digest.t option; + cmt_use_summaries : bool; +} + +type error = + Not_a_typedtree of string + +exception Error of error + +(** [read filename] opens filename, and extract both the cmi_infos, if + it exists, and the cmt_infos, if it exists. Thus, it can be used + with .cmi, .cmt and .cmti files. + + .cmti files always contain a cmi_infos at the beginning. .cmt files + only contain a cmi_infos at the beginning if there is no associated + .cmti file. +*) +val read : string -> Cmi_format.cmi_infos option * cmt_infos option + +val read_cmt : string -> cmt_infos +val read_cmi : string -> Cmi_format.cmi_infos + +(** [save_cmt filename modname binary_annots sourcefile initial_env cmi] + writes a cmt(i) file. *) +val save_cmt : + string -> (* filename.cmt to generate *) + string -> (* module name *) + binary_annots -> + string option -> (* source file *) + Env.t -> (* initial env *) + Cmi_format.cmi_infos option -> (* if a .cmi was generated *) + unit + +(* Miscellaneous functions *) + +val read_magic_number : in_channel -> string + +val clear: unit -> unit + +val add_saved_type : binary_part -> unit +val get_saved_types : unit -> binary_part list +val set_saved_types : binary_part list -> unit + +val record_value_dependency: + Types.value_description -> Types.value_description -> unit + + +(* + + val is_magic_number : string -> bool + val read : in_channel -> Env.cmi_infos option * t + val write_magic_number : out_channel -> unit + val write : out_channel -> t -> unit + + val find : string list -> string -> string + val read_signature : 'a -> string -> Types.signature * 'b list * 'c list + +*) diff --git a/analysis/src/vendor/compiler-libs-406/config.ml b/analysis/src/vendor/compiler-libs-406/config.ml new file mode 100644 index 000000000..e82d154a2 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/config.ml @@ -0,0 +1,42 @@ +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 true + + +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 default_uncurry = ref false + +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/src/vendor/compiler-libs-406/config.mli b/analysis/src/vendor/compiler-libs-406/config.mli new file mode 100644 index 000000000..362ca062d --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/config.mli @@ -0,0 +1,50 @@ +(**************************************************************************) +(* *) +(* 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 syntax_kind : [ `ml | `reason | `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 default_uncurry : bool ref +val print_config : out_channel -> unit;; + + diff --git a/analysis/src/vendor/compiler-libs-406/consistbl.ml b/analysis/src/vendor/compiler-libs-406/consistbl.ml new file mode 100644 index 000000000..dbba5d1f5 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/consistbl.ml @@ -0,0 +1,66 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Consistency tables: for checking consistency of module CRCs *) + +type t = (string, Digest.t * string) Hashtbl.t + +let create () = Hashtbl.create 13 + +let clear = Hashtbl.clear + +exception Inconsistency of string * string * string + +exception Not_available of string + +let check tbl name crc source = + try + let (old_crc, old_source) = Hashtbl.find tbl name in + if crc <> old_crc then raise(Inconsistency(name, source, old_source)) + with Not_found -> + Hashtbl.add tbl name (crc, source) + +let check_noadd tbl name crc source = + try + let (old_crc, old_source) = Hashtbl.find tbl name in + if crc <> old_crc then raise(Inconsistency(name, source, old_source)) + with Not_found -> + raise (Not_available name) + +let set tbl name crc source = Hashtbl.add tbl name (crc, source) + +let source tbl name = snd (Hashtbl.find tbl name) + +let extract l tbl = + let l = List.sort_uniq String.compare l in + List.fold_left + (fun assc name -> + try + let (crc, _) = Hashtbl.find tbl name in + (name, Some crc) :: assc + with Not_found -> + (name, None) :: assc) + [] l + +let filter p tbl = + let to_remove = ref [] in + Hashtbl.iter + (fun name _ -> + if not (p name) then to_remove := name :: !to_remove) + tbl; + List.iter + (fun name -> + while Hashtbl.mem tbl name do Hashtbl.remove tbl name done) + !to_remove diff --git a/analysis/src/vendor/compiler-libs-406/consistbl.mli b/analysis/src/vendor/compiler-libs-406/consistbl.mli new file mode 100644 index 000000000..c532bddfe --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/consistbl.mli @@ -0,0 +1,62 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Consistency tables: for checking consistency of module CRCs *) + +type t + +val create: unit -> t + +val clear: t -> unit + +val check: t -> string -> Digest.t -> string -> unit + (* [check tbl name crc source] + checks consistency of ([name], [crc]) with infos previously + stored in [tbl]. If no CRC was previously associated with + [name], record ([name], [crc]) in [tbl]. + [source] is the name of the file from which the information + comes from. This is used for error reporting. *) + +val check_noadd: t -> string -> Digest.t -> string -> unit + (* Same as [check], but raise [Not_available] if no CRC was previously + associated with [name]. *) + +val set: t -> string -> Digest.t -> string -> unit + (* [set tbl name crc source] forcefully associates [name] with + [crc] in [tbl], even if [name] already had a different CRC + associated with [name] in [tbl]. *) + +val source: t -> string -> string + (* [source tbl name] returns the file name associated with [name] + if the latter has an associated CRC in [tbl]. + Raise [Not_found] otherwise. *) + +val extract: string list -> t -> (string * Digest.t option) list + (* [extract tbl names] returns an associative list mapping each string + in [names] to the CRC associated with it in [tbl]. If no CRC is + associated with a name then it is mapped to [None]. *) + +val filter: (string -> bool) -> t -> unit + (* [filter pred tbl] removes from [tbl] table all (name, CRC) pairs + such that [pred name] is [false]. *) + +exception Inconsistency of string * string * string + (* Raised by [check] when a CRC mismatch is detected. + First string is the name of the compilation unit. + Second string is the source that caused the inconsistency. + Third string is the source that set the CRC. *) + +exception Not_available of string + (* Raised by [check_noadd] when a name doesn't have an associated CRC. *) diff --git a/analysis/src/vendor/compiler-libs-406/ctype.ml b/analysis/src/vendor/compiler-libs-406/ctype.ml new file mode 100644 index 000000000..02e7d5f3a --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ctype.ml @@ -0,0 +1,4586 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy and 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 core types *) + +open Misc +open Asttypes +open Types +open Btype + +(* + Type manipulation after type inference + ====================================== + If one wants to manipulate a type after type inference (for + instance, during code generation or in the debugger), one must + first make sure that the type levels are correct, using the + function [correct_levels]. Then, this type can be correctly + manipulated by [apply], [expand_head] and [moregeneral]. +*) + +(* + General notes + ============= + - As much sharing as possible should be kept : it makes types + smaller and better abbreviated. + When necessary, some sharing can be lost. Types will still be + printed correctly (+++ TO DO...), and abbreviations defined by a + class do not depend on sharing thanks to constrained + abbreviations. (Of course, even if some sharing is lost, typing + will still be correct.) + - All nodes of a type have a level : that way, one know whether a + node need to be duplicated or not when instantiating a type. + - Levels of a type are decreasing (generic level being considered + as greatest). + - The level of a type constructor is superior to the binding + time of its path. + - Recursive types without limitation should be handled (even if + there is still an occur check). This avoid treating specially the + case for objects, for instance. Furthermore, the occur check + policy can then be easily changed. +*) + +(**** Errors ****) + +exception Unify of (type_expr * type_expr) list + +exception Tags of label * label + +let () = + Location.register_error_of_exn + (function + | Tags (l, l') -> + Some + Location. + (errorf ~loc:(in_file !input_name) + "In this program,@ variant constructors@ `%s and `%s@ \ + have the same hash value.@ Change one of them." l l' + ) + | _ -> None + ) + +exception Subtype of + (type_expr * type_expr) list * (type_expr * type_expr) list + +exception Cannot_expand + +exception Cannot_apply + +exception Recursive_abbrev + +(* GADT: recursive abbrevs can appear as a result of local constraints *) +exception Unification_recursive_abbrev of (type_expr * type_expr) list + +(**** Type level management ****) + +let current_level = ref 0 +let nongen_level = ref 0 +let global_level = ref 1 +let saved_level = ref [] + +type levels = + { current_level: int; nongen_level: int; global_level: int; + saved_level: (int * int) list; } +let save_levels () = + { current_level = !current_level; + nongen_level = !nongen_level; + global_level = !global_level; + saved_level = !saved_level } +let set_levels l = + current_level := l.current_level; + nongen_level := l.nongen_level; + global_level := l.global_level; + saved_level := l.saved_level + +let get_current_level () = !current_level +let init_def level = current_level := level; nongen_level := level +let begin_def () = + saved_level := (!current_level, !nongen_level) :: !saved_level; + incr current_level; nongen_level := !current_level +let begin_class_def () = + saved_level := (!current_level, !nongen_level) :: !saved_level; + incr current_level +let raise_nongen_level () = + saved_level := (!current_level, !nongen_level) :: !saved_level; + nongen_level := !current_level +let end_def () = + let (cl, nl) = List.hd !saved_level in + saved_level := List.tl !saved_level; + current_level := cl; nongen_level := nl + +let reset_global_level () = + global_level := !current_level + 1 +let increase_global_level () = + let gl = !global_level in + global_level := !current_level; + gl +let restore_global_level gl = + global_level := gl + +(**** Whether a path points to an object type (with hidden row variable) ****) +let is_object_type path = + let name = + match path with Path.Pident id -> Ident.name id + | Path.Pdot(_, s,_) -> s + | Path.Papply _ -> assert false + in name.[0] = '#' + +(**** Control tracing of GADT instances *) + +let trace_gadt_instances = ref false +let check_trace_gadt_instances env = + not !trace_gadt_instances && Env.has_local_constraints env && + (trace_gadt_instances := true; cleanup_abbrev (); true) + +let reset_trace_gadt_instances b = + if b then trace_gadt_instances := false + +let wrap_trace_gadt_instances env f x = + let b = check_trace_gadt_instances env in + let y = f x in + reset_trace_gadt_instances b; + y + +(**** Abbreviations without parameters ****) +(* Shall reset after generalizing *) + +let simple_abbrevs = ref Mnil + +let proper_abbrevs path tl abbrev = + if tl <> [] || !trace_gadt_instances || !Clflags.principal || + is_object_type path + then abbrev + else simple_abbrevs + +(**** Some type creators ****) + +(* Re-export generic type creators *) + +let newty2 = Btype.newty2 +let newty desc = newty2 !current_level desc + +let newvar ?name () = newty2 !current_level (Tvar name) +let newvar2 ?name level = newty2 level (Tvar name) +let new_global_var ?name () = newty2 !global_level (Tvar name) + +let newobj fields = newty (Tobject (fields, ref None)) + +let newconstr path tyl = newty (Tconstr (path, tyl, ref Mnil)) + +let none = newty (Ttuple []) (* Clearly ill-formed type *) + +(**** Representative of a type ****) + +(* Re-export repr *) +let repr = repr + +(**** Type maps ****) + +module TypePairs = + Hashtbl.Make (struct + type t = type_expr * type_expr + let equal (t1, t1') (t2, t2') = (t1 == t2) && (t1' == t2') + let hash (t, t') = t.id + 93 * t'.id + end) + + +(**** unification mode ****) + +type unification_mode = + | Expression (* unification in expression *) + | Pattern (* unification in pattern which may add local constraints *) + +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 + and old_inj = !assume_injective in + try + umode := Pattern; + generate_equations := generate; + assume_injective := injective; + let ret = f () in + umode := old_unification_mode; + generate_equations := old_gen; + assume_injective := old_inj; + ret + with e -> + umode := old_unification_mode; + generate_equations := old_gen; + assume_injective := old_inj; + raise e + +(*** Checks for type definitions ***) + +let in_current_module = function + | Path.Pident _ -> true + | Path.Pdot _ | Path.Papply _ -> false + +let in_pervasives p = + in_current_module p && + try ignore (Env.find_type p Env.initial_safe_string); true + with Not_found -> false + +let is_datatype decl= + match decl.type_kind with + Type_record _ | Type_variant _ | Type_open -> true + | Type_abstract -> false + + + (**********************************************) + (* Miscellaneous operations on object types *) + (**********************************************) + +(* Note: + We need to maintain some invariants: + * cty_self must be a Tobject + * ... +*) +type fields = (string * Types.field_kind * Types.type_expr) list +(**** Object field manipulation. ****) + +let object_fields ty = + match (repr ty).desc with + Tobject (fields, _) -> fields + | _ -> assert false + +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) -> + flatten ((s, k, ty1)::l) ty2 + | _ -> + (l, ty) + in + let (l, r) = flatten [] ty in + (List.sort (fun (n, _, _) (n', _, _) -> compare n n') l, r) + +let build_fields level = + List.fold_right + (fun (s, k, ty1) ty2 -> newty2 level (Tfield(s, k, ty1, ty2))) + + +let associate_fields + (fields1 : fields ) + (fields2 : fields ) : _ * fields * fields = + let rec associate p s s' = + function + (l, []) -> + (List.rev p, (List.rev s) @ l, List.rev s') + | ([], l') -> + (List.rev p, List.rev s, (List.rev s') @ l') + | ((n, k, t)::r, (n', k', t')::r') when n = n' -> + associate ((n, k, t, k', t')::p) s s' (r, r') + | ((n, k, t)::r, ((n', _k', _t')::_ as l')) when n < n' -> + associate p ((n, k, t)::s) s' (r, l') + | (((_n, _k, _t)::_ as l), (n', k', t')::r') (* when n > n' *) -> + associate p s ((n', k', t')::s') (l, r') + in + associate [] [] [] (fields1, fields2) + +(**** Check whether an object is open ****) + +(* +++ The abbreviation should eventually be expanded *) +let rec object_row ty = + let ty = repr ty in + match ty.desc with + Tobject (t, _) -> object_row t + | Tfield(_, _, _, t) -> object_row t + | _ -> ty + +let opened_object ty = + match (object_row ty).desc with + | Tvar _ | Tunivar _ | Tconstr _ -> true + | _ -> false + +let concrete_object ty = + match (object_row ty).desc with + | Tvar _ -> false + | _ -> true + +(**** Close an object ****) + +let close_object ty = + let rec close ty = + let ty = repr ty in + match ty.desc with + Tvar _ -> + link_type ty (newty2 ty.level Tnil) + | Tfield(_, _, _, ty') -> close ty' + | _ -> assert false + in + match (repr ty).desc with + Tobject (ty, _) -> close ty + | _ -> assert false + +(**** Row variable of an object type ****) + +let row_variable ty = + let rec find ty = + let ty = repr ty in + match ty.desc with + Tfield (_, _, _, ty) -> find ty + | Tvar _ -> ty + | _ -> assert false + in + match (repr ty).desc with + Tobject (fi, _) -> find fi + | _ -> assert false + +(**** Object name manipulation ****) +(* +++ Bientot obsolete *) + +let set_object_name id rv params ty = + match (repr ty).desc with + Tobject (_fi, nm) -> + set_name nm (Some (Path.Pident id, rv::params)) + | _ -> + assert false + +let remove_object_name ty = + match (repr ty).desc with + Tobject (_, nm) -> set_name nm None + | Tconstr (_, _, _) -> () + | _ -> fatal_error "Ctype.remove_object_name" + +(**** Hiding of private methods ****) + +let hide_private_methods ty = + match (repr ty).desc with + Tobject (fi, nm) -> + nm := None; + let (fl, _) = flatten_fields fi in + List.iter + (function (_, k, _) -> + match field_kind_repr k with + Fvar r -> set_kind r Fabsent + | _ -> ()) + fl + | _ -> + assert false + + + (*******************************) + (* Operations on class types *) + (*******************************) + + +let rec signature_of_class_type = + function + Cty_constr (_, _, cty) -> signature_of_class_type cty + | Cty_signature sign -> sign + | Cty_arrow (_, _, cty) -> signature_of_class_type cty + +let self_type cty = + repr (signature_of_class_type cty).csig_self + +let rec class_type_arity = + function + Cty_constr (_, _, cty) -> class_type_arity cty + | Cty_signature _ -> 0 + | Cty_arrow (_, _, cty) -> 1 + class_type_arity cty + + + (*******************************************) + (* 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 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 + if l1 < l2 then merge_rf (p1::r1) r2 pairs fi1' fi2 else + merge_rf r1 (p2::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 : 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, []) + | _, [p2] when not (List.mem_assoc (fst p2) fi1) -> (fi1, fi2, []) + | _ -> merge_rf [] [] [] (sort_row_fields fi1) (sort_row_fields fi2) + +let rec filter_row_fields erase = function + [] -> [] + | (_l,f as p)::fi -> + let fi = filter_row_fields erase fi in + match row_field_repr f with + Rabsent -> fi + | Reither(_,_,false,e) when erase -> set_row_field e Rabsent; fi + | _ -> p :: fi + + (**************************************) + (* Check genericity of type schemes *) + (**************************************) + + +exception Non_closed of type_expr * bool + +let free_variables = ref [] +let really_closed = ref None + +let rec free_vars_rec real ty = + let ty = repr ty in + if ty.level >= lowest_level then begin + ty.level <- pivot_level - ty.level; + begin match ty.desc, !really_closed with + Tvar _, _ -> + free_variables := (ty, real) :: !free_variables + | Tconstr (path, tl, _), Some env -> + begin try + let (_, body, _) = Env.find_type_expansion path env in + if (repr body).level <> generic_level then + free_variables := (ty, real) :: !free_variables + with Not_found -> () + end; + List.iter (free_vars_rec true) tl +(* Do not count "virtual" free variables + | Tobject(ty, {contents = Some (_, p)}) -> + free_vars_rec false ty; List.iter (free_vars_rec true) p +*) + | Tobject (ty, _), _ -> + free_vars_rec false ty + | Tfield (_, _, ty1, ty2), _ -> + free_vars_rec true ty1; free_vars_rec false ty2 + | Tvariant row, _ -> + let row = row_repr row in + iter_row (free_vars_rec true) row; + if not (static_row row) then free_vars_rec false row.row_more + | _ -> + iter_type_expr (free_vars_rec true) ty + end; + end + +let free_vars ?env ty = + free_variables := []; + really_closed := env; + free_vars_rec true ty; + let res = !free_variables in + free_variables := []; + really_closed := None; + res + +let free_variables ?env ty = + let tl = List.map fst (free_vars ?env ty) in + unmark_type ty; + tl + +let closed_type ty = + match free_vars ty with + [] -> () + | (v, real) :: _ -> raise (Non_closed (v, real)) + +let closed_parameterized_type params ty = + List.iter mark_type params; + let ok = + try closed_type ty; true with Non_closed _ -> false in + List.iter unmark_type params; + unmark_type ty; + ok + +let closed_type_decl decl = + try + List.iter mark_type decl.type_params; + begin match decl.type_kind with + Type_abstract -> + () + | Type_variant v -> + List.iter + (fun {cd_args; cd_res; _} -> + match cd_res with + | Some _ -> () + | None -> + match cd_args with + | Cstr_tuple l -> List.iter closed_type l + | Cstr_record l -> List.iter (fun l -> closed_type l.ld_type) l + ) + v + | Type_record(r, _rep) -> + List.iter (fun l -> closed_type l.ld_type) r + | Type_open -> () + end; + begin match decl.type_manifest with + None -> () + | Some ty -> closed_type ty + end; + unmark_type_decl decl; + None + with Non_closed (ty, _) -> + unmark_type_decl decl; + Some ty + +let closed_extension_constructor ext = + try + List.iter mark_type ext.ext_type_params; + begin match ext.ext_ret_type with + | Some _ -> () + | None -> iter_type_expr_cstr_args closed_type ext.ext_args + end; + unmark_extension_constructor ext; + None + with Non_closed (ty, _) -> + unmark_extension_constructor ext; + Some ty + +type closed_class_failure = + CC_Method of type_expr * bool * string * type_expr + | CC_Value of type_expr * bool * string * type_expr + +exception CCFailure of closed_class_failure + +let closed_class params sign = + let ty = object_fields (repr sign.csig_self) in + let (fields, rest) = flatten_fields ty in + List.iter mark_type params; + mark_type rest; + List.iter + (fun (lab, _, ty) -> if lab = dummy_method then mark_type ty) + fields; + try + mark_type_node (repr sign.csig_self); + List.iter + (fun (lab, kind, ty) -> + if field_kind_repr kind = Fpresent then + try closed_type ty with Non_closed (ty0, real) -> + raise (CCFailure (CC_Method (ty0, real, lab, ty)))) + fields; + mark_type_params (repr sign.csig_self); + List.iter unmark_type params; + unmark_class_signature sign; + None + with CCFailure reason -> + mark_type_params (repr sign.csig_self); + List.iter unmark_type params; + unmark_class_signature sign; + Some reason + + + (**********************) + (* Type duplication *) + (**********************) + + +(* Duplicate a type, preserving only type variables *) +let duplicate_type ty = + Subst.type_expr Subst.identity ty + +(* Same, for class types *) +let duplicate_class_type ty = + Subst.class_type Subst.identity ty + + + (*****************************) + (* Type level manipulation *) + (*****************************) + +(* + It would be a bit more efficient to remove abbreviation expansions + rather than generalizing them: these expansions will usually not be + used anymore. However, this is not possible in the general case, as + [expand_abbrev] (via [subst]) requires these expansions to be + preserved. Does it worth duplicating this code ? +*) +let rec generalize ty = + let ty = repr ty in + if (ty.level > !current_level) && (ty.level <> generic_level) then begin + set_level ty generic_level; + begin match ty.desc with + Tconstr (_, _, abbrev) -> + iter_abbrev generalize !abbrev + | _ -> () + end; + iter_type_expr generalize ty + end + +let generalize ty = + simple_abbrevs := Mnil; + generalize ty + +(* Generalize the structure and lower the variables *) + +let rec generalize_structure var_level ty = + let ty = repr ty in + if ty.level <> generic_level then begin + if is_Tvar ty && ty.level > var_level then + set_level ty var_level + else if + ty.level > !current_level && + match ty.desc with + Tconstr (p, _, abbrev) -> + not (is_object_type p) && (abbrev := Mnil; true) + | _ -> true + then begin + set_level ty generic_level; + iter_type_expr (generalize_structure var_level) ty + end + end + +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) + +(* + Lower the levels of a type (assume [level] is not + [generic_level]). +*) +(* + The level of a type constructor must be greater than its binding + time. That way, a type constructor cannot escape the scope of its + definition, as would be the case in + let x = ref [] + module M = struct type t let _ = (x : t list ref) end + (without this constraint, the type system would actually be unsound.) +*) +let get_level env p = + try + match (Env.find_type p env).type_newtype_level with + | None -> Path.binding_time p + | Some (x, _) -> x + with + | Not_found -> + (* no newtypes in predef *) + Path.binding_time p + +let rec normalize_package_path env p = + let t = + try (Env.find_modtype p env).mtd_type + with Not_found -> None + in + match t with + | Some (Mty_ident p) -> normalize_package_path env p + | Some (Mty_signature _ | Mty_functor _ | Mty_alias _) | None -> + match p with + Path.Pdot (p1, s, n) -> + (* For module aliases *) + let p1' = Env.normalize_path None env p1 in + if Path.same p1 p1' then p else + normalize_package_path env (Path.Pdot (p1', s, n)) + | _ -> p + +let rec update_level env level expand ty = + let ty = repr ty in + if ty.level > level then begin + begin match Env.gadt_instance_level env ty with + Some lv -> if level < lv then raise (Unify [(ty, newvar2 level)]) + | None -> () + end; + match ty.desc with + Tconstr(p, _tl, _abbrev) when level < get_level env p -> + (* Try first to replace an abbreviation by its expansion. *) + begin try + (* if is_newtype env p then raise Cannot_expand; *) + link_type ty (!forward_try_expand_once env ty); + update_level env level expand ty + with Cannot_expand -> + (* +++ Levels should be restored... *) + (* Format.printf "update_level: %i < %i@." level (get_level env p); *) + if level < get_level env p then raise (Unify [(ty, newvar2 level)]); + iter_type_expr (update_level env level expand) ty + end + | Tconstr(_, _ :: _, _) when expand -> + begin try + link_type ty (!forward_try_expand_once env ty); + update_level env level expand ty + with Cannot_expand -> + set_level ty level; + iter_type_expr (update_level env level expand) ty + end + | Tpackage (p, nl, tl) when level < Path.binding_time p -> + let p' = normalize_package_path env p in + if Path.same p p' then raise (Unify [(ty, newvar2 level)]); + log_type ty; ty.desc <- Tpackage (p', nl, tl); + update_level env level expand ty + | Tobject(_, ({contents=Some(p, _tl)} as nm)) + when level < get_level env p -> + set_name nm None; + update_level env level expand ty + | Tvariant row -> + let row = row_repr row in + begin match row.row_name with + | Some (p, _tl) when level < get_level env p -> + log_type ty; + ty.desc <- Tvariant {row with row_name = None} + | _ -> () + end; + set_level ty level; + iter_type_expr (update_level env level expand) ty + | Tfield(lab, _, ty1, _) + when lab = dummy_method && (repr ty1).level > level -> + raise (Unify [(ty1, newvar2 level)]) + | _ -> + set_level ty level; + (* XXX what about abbreviations in Tconstr ? *) + iter_type_expr (update_level env level expand) ty + end + +(* First try without expanding, then expand everything, + to avoid combinatorial blow-up *) +let update_level env level ty = + let ty = repr ty in + if ty.level > level then begin + let snap = snapshot () in + try + update_level env level false ty + with Unify _ -> + backtrack snap; + update_level env level true ty + end + +(* Generalize and lower levels of contravariant branches simultaneously *) + +let rec generalize_expansive env var_level visited ty = + let ty = repr ty in + if ty.level = generic_level || ty.level <= var_level then () else + if not (Hashtbl.mem visited ty.id) then begin + Hashtbl.add visited ty.id (); + match ty.desc with + Tconstr (path, tyl, abbrev) -> + let variance = + try (Env.find_type path env).type_variance + with Not_found -> List.map (fun _ -> Variance.may_inv) tyl in + abbrev := Mnil; + List.iter2 + (fun v t -> + if Variance.(mem May_weak v) + then generalize_structure var_level t + else generalize_expansive env var_level visited t) + variance tyl + | Tpackage (_, _, tyl) -> + List.iter (generalize_structure var_level) tyl + | Tarrow (_, t1, t2, _) -> + generalize_structure var_level t1; + generalize_expansive env var_level visited t2 + | _ -> + iter_type_expr (generalize_expansive env var_level visited) ty + end + +let generalize_expansive env ty = + simple_abbrevs := Mnil; + try + generalize_expansive env !nongen_level (Hashtbl.create 7) ty + with Unify ([_, ty'] as tr) -> + raise (Unify ((ty, ty') :: tr)) + +let generalize_global ty = generalize_structure !global_level ty +let generalize_structure ty = generalize_structure !current_level ty + +(* Correct the levels of type [ty]. *) +let correct_levels ty = + duplicate_type ty + +(* Only generalize the type ty0 in ty *) +let limited_generalize ty0 ty = + let ty0 = repr ty0 in + + let graph = Hashtbl.create 17 in + let idx = ref lowest_level in + let roots = ref [] in + + let rec inverse pty ty = + let ty = repr ty in + if (ty.level > !current_level) || (ty.level = generic_level) then begin + decr idx; + Hashtbl.add graph !idx (ty, ref pty); + if (ty.level = generic_level) || (ty == ty0) then + roots := ty :: !roots; + set_level ty !idx; + iter_type_expr (inverse [ty]) ty + end else if ty.level < lowest_level then begin + let (_, parents) = Hashtbl.find graph ty.level in + parents := pty @ !parents + end + + and generalize_parents ty = + let idx = ty.level in + if idx <> generic_level then begin + set_level ty generic_level; + List.iter generalize_parents !(snd (Hashtbl.find graph idx)); + (* Special case for rows: must generalize the row variable *) + match ty.desc with + Tvariant row -> + let more = row_more row in + let lv = more.level in + if (lv < lowest_level || lv > !current_level) + && lv <> generic_level then set_level more generic_level + | _ -> () + end + in + + inverse [] ty; + if ty0.level < lowest_level then + iter_type_expr (inverse []) ty0; + List.iter generalize_parents !roots; + Hashtbl.iter + (fun _ (ty, _) -> + if ty.level <> generic_level then set_level ty !current_level) + graph + + +(* Compute statically the free univars of all nodes in a type *) +(* This avoids doing it repeatedly during instantiation *) + +type inv_type_expr = + { inv_type : type_expr; + mutable inv_parents : inv_type_expr list } + +let rec inv_type hash pty ty = + let ty = repr ty in + try + let inv = TypeHash.find hash ty in + inv.inv_parents <- pty @ inv.inv_parents + with Not_found -> + let inv = { inv_type = ty; inv_parents = pty } in + TypeHash.add hash ty inv; + iter_type_expr (inv_type hash [inv]) ty + +let compute_univars ty = + let inverted = TypeHash.create 17 in + inv_type inverted [] ty; + let node_univars = TypeHash.create 17 in + let rec add_univar univ inv = + match inv.inv_type.desc with + Tpoly (_ty, tl) when List.memq univ (List.map repr tl) -> () + | _ -> + try + let univs = TypeHash.find node_univars inv.inv_type in + if not (TypeSet.mem univ !univs) then begin + univs := TypeSet.add univ !univs; + List.iter (add_univar univ) inv.inv_parents + end + with Not_found -> + TypeHash.add node_univars inv.inv_type (ref(TypeSet.singleton univ)); + List.iter (add_univar univ) inv.inv_parents + in + TypeHash.iter (fun ty inv -> if is_Tunivar ty then add_univar ty inv) + inverted; + fun ty -> + try !(TypeHash.find node_univars ty) with Not_found -> TypeSet.empty + + + (*******************) + (* Instantiation *) + (*******************) + + +let rec find_repr p1 = + function + Mnil -> + None + | Mcons (Public, p2, ty, _, _) when Path.same p1 p2 -> + Some ty + | Mcons (_, _, _, _, rem) -> + find_repr p1 rem + | Mlink {contents = rem} -> + find_repr p1 rem + +(* + Generic nodes are duplicated, while non-generic nodes are left + as-is. + During instantiation, the description of a generic node is first + replaced by a link to a stub ([Tsubst (newvar ())]). Once the + copy is made, it replaces the stub. + After instantiation, the description of generic node, which was + stored by [save_desc], must be put back, using [cleanup_types]. +*) + +let abbreviations = ref (ref Mnil) + (* Abbreviation memorized. *) + +(* partial: we may not wish to copy the non generic types + before we call type_pat *) +let rec copy ?env ?partial ?keep_names ty = + let copy = copy ?env ?partial ?keep_names in + let ty = repr ty in + match ty.desc with + Tsubst ty -> ty + | _ -> + if ty.level <> generic_level && partial = None then ty else + (* We only forget types that are non generic and do not contain + free univars *) + let forget = + if ty.level = generic_level then generic_level else + match partial with + None -> assert false + | Some (free_univars, keep) -> + if TypeSet.is_empty (free_univars ty) then + if keep then ty.level else !current_level + else generic_level + in + if forget <> generic_level then newty2 forget (Tvar None) else + let desc = ty.desc in + save_desc ty desc; + let t = newvar() in (* Stub *) + begin match env with + Some env when Env.has_local_constraints env -> + begin match Env.gadt_instance_level env ty with + Some lv -> Env.add_gadt_instances env lv [t] + | None -> () + end + | _ -> () + end; + ty.desc <- Tsubst t; + t.desc <- + begin match desc with + | Tconstr (p, tl, _) -> + let abbrevs = proper_abbrevs p tl !abbreviations in + begin match find_repr p !abbrevs with + Some ty when repr ty != t -> + Tlink ty + | _ -> + (* + One must allocate a new reference, so that abbrevia- + tions belonging to different branches of a type are + independent. + Moreover, a reference containing a [Mcons] must be + shared, so that the memorized expansion of an abbrevi- + ation can be released by changing the content of just + one reference. + *) + Tconstr (p, List.map copy tl, + ref (match !(!abbreviations) with + Mcons _ -> Mlink !abbreviations + | abbrev -> abbrev)) + end + | Tvariant row0 -> + let row = row_repr row0 in + let more = repr row.row_more in + (* We must substitute in a subtle way *) + (* Tsubst takes a tuple containing the row var and the variant *) + begin match more.desc with + Tsubst {desc = Ttuple [_;ty2]} -> + (* This variant type has been already copied *) + ty.desc <- Tsubst ty2; (* avoid Tlink in the new type *) + Tlink ty2 + | _ -> + (* If the row variable is not generic, we must keep it *) + let keep = more.level <> generic_level in + let more' = + match more.desc with + Tsubst ty -> ty + | Tconstr _ | Tnil -> + if keep then save_desc more more.desc; + copy more + | Tvar _ | Tunivar _ -> + save_desc more more.desc; + if keep then more else newty more.desc + | _ -> assert false + in + let row = + match repr more' with (* PR#6163 *) + {desc=Tconstr _} when not row.row_fixed -> + {row with row_fixed = true} + | _ -> row + in + (* Open row if partial for pattern and contains Reither *) + let more', row = + match partial with + Some (free_univars, false) -> + let more' = + if more.id != more'.id then more' else + let lv = if keep then more.level else !current_level in + newty2 lv (Tvar None) + in + let not_reither (_, f) = + match row_field_repr f with + Reither _ -> false + | _ -> true + in + if row.row_closed && not row.row_fixed + && 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_more = more'; row_bound = (); + row_closed = false; row_fixed = false; row_name = None}) + else (more', row) + | _ -> (more', row) + in + (* Register new type first for recursion *) + more.desc <- Tsubst(newgenty(Ttuple[more';t])); + (* Return a new copy *) + Tvariant (copy_row copy true row keep more') + end + | Tfield (_p, k, _ty1, ty2) -> + begin match field_kind_repr k with + Fabsent -> Tlink (copy ty2) + | Fpresent -> copy_type_desc copy desc + | Fvar r -> + dup_kind r; + copy_type_desc copy desc + end + | Tobject (ty1, _) when partial <> None -> + Tobject (copy ty1, ref None) + | _ -> copy_type_desc ?keep_names copy desc + end; + t + +let simple_copy t = copy t + +(**** Variants of instantiations ****) + +let gadt_env env = + if Env.has_local_constraints env + then Some env + else None + +let instance ?partial env sch = + let env = gadt_env env in + let partial = + match partial with + None -> None + | Some keep -> Some (compute_univars sch, keep) + in + let ty = copy ?env ?partial sch in + cleanup_types (); + ty + +let instance_def sch = + let ty = copy sch in + cleanup_types (); + ty + +let generic_instance env sch = + let old = !current_level in + current_level := generic_level; + let ty = instance env sch in + current_level := old; + ty + +let instance_list env schl = + let env = gadt_env env in + let tyl = List.map (fun t -> copy ?env t) schl in + cleanup_types (); + tyl + +let reified_var_counter = ref Vars.empty +let reset_reified_var_counter () = + reified_var_counter := Vars.empty + +(* names given to new type constructors. + Used for existential types and + local constraints *) +let get_new_abstract_name s = + let index = + try Vars.find s !reified_var_counter + 1 + with Not_found -> 0 in + reified_var_counter := Vars.add s index !reified_var_counter; + if index = 0 && s <> "" && s.[String.length s - 1] <> '$' then s else + Printf.sprintf "%s%d" s index + +let new_declaration newtype manifest = + { + type_params = []; + type_arity = 0; + type_kind = Type_abstract; + type_private = Public; + type_manifest = manifest; + type_variance = []; + type_newtype_level = newtype; + type_loc = Location.none; + type_attributes = []; + type_immediate = false; + type_unboxed = unboxed_false_default_false; + } + +let instance_constructor ?in_pattern cstr = + begin match in_pattern with + | None -> () + | Some (env, newtype_lev) -> + let process existential = + let decl = new_declaration (Some (newtype_lev, newtype_lev)) None in + let name = + match repr existential with + {desc = Tvar (Some name)} -> "$" ^ cstr.cstr_name ^ "_'" ^ name + | _ -> "$" ^ cstr.cstr_name + in + let path = Path.Pident (Ident.create (get_new_abstract_name name)) in + let new_env = Env.add_local_type path decl !env in + env := new_env; + let to_unify = newty (Tconstr (path,[],ref Mnil)) in + let tv = copy existential in + assert (is_Tvar tv); + link_type tv to_unify + in + List.iter process cstr.cstr_existentials + end; + let ty_res = copy cstr.cstr_res in + let ty_args = List.map simple_copy cstr.cstr_args in + cleanup_types (); + (ty_args, ty_res) + +let instance_parameterized_type ?keep_names sch_args sch = + let ty_args = List.map (fun t -> copy ?keep_names t) sch_args in + let ty = copy sch in + cleanup_types (); + (ty_args, ty) + +let instance_parameterized_type_2 sch_args sch_lst sch = + let ty_args = List.map simple_copy sch_args in + let ty_lst = List.map simple_copy sch_lst in + let ty = copy sch in + cleanup_types (); + (ty_args, ty_lst, ty) + +let map_kind f = function + | Type_abstract -> Type_abstract + | Type_open -> Type_open + | Type_variant cl -> + Type_variant ( + List.map + (fun c -> + {c with + cd_args = map_type_expr_cstr_args f c.cd_args; + cd_res = may_map f c.cd_res + }) + cl) + | Type_record (fl, rr) -> + Type_record ( + List.map + (fun l -> + {l with ld_type = f l.ld_type} + ) fl, rr) + + +let instance_declaration decl = + let decl = + {decl with type_params = List.map simple_copy decl.type_params; + type_manifest = may_map simple_copy decl.type_manifest; + type_kind = map_kind simple_copy decl.type_kind; + } + in + cleanup_types (); + decl + +let instance_class params cty = + let rec copy_class_type = + function + Cty_constr (path, tyl, cty) -> + Cty_constr (path, List.map simple_copy tyl, copy_class_type cty) + | Cty_signature sign -> + Cty_signature + {csig_self = copy sign.csig_self; + csig_vars = + Vars.map (function (m, v, ty) -> (m, v, copy ty)) sign.csig_vars; + csig_concr = sign.csig_concr; + csig_inher = + List.map (fun (p,tl) -> (p, List.map simple_copy tl)) + sign.csig_inher} + | Cty_arrow (l, ty, cty) -> + Cty_arrow (l, copy ty, copy_class_type cty) + in + let params' = List.map simple_copy params in + let cty' = copy_class_type cty in + cleanup_types (); + (params', cty') + +(**** Instantiation for types with free universal variables ****) + +let rec diff_list l1 l2 = + if l1 == l2 then [] else + match l1 with [] -> invalid_arg "Ctype.diff_list" + | a :: l1 -> a :: diff_list l1 l2 + +let conflicts free bound = + let bound = List.map repr bound in + TypeSet.exists (fun t -> List.memq (repr t) bound) free + +let delayed_copy = ref [] + (* copying to do later *) + +(* Copy without sharing until there are no free univars left *) +(* all free univars must be included in [visited] *) +let rec copy_sep fixed free bound visited ty = + let ty = repr ty in + let univars = free ty in + if TypeSet.is_empty univars then + if ty.level <> generic_level then ty else + let t = newvar () in + delayed_copy := + lazy (t.desc <- Tlink (copy ty)) + :: !delayed_copy; + t + else try + let t, bound_t = List.assq ty visited in + let dl = if is_Tunivar ty then [] else diff_list bound bound_t in + if dl <> [] && conflicts univars dl then raise Not_found; + t + with Not_found -> begin + let t = newvar() in (* Stub *) + let visited = + match ty.desc with + Tarrow _ | Ttuple _ | Tvariant _ | Tconstr _ | Tobject _ | Tpackage _ -> + (ty,(t,bound)) :: visited + | _ -> visited in + let copy_rec = copy_sep fixed free bound visited in + t.desc <- + begin match ty.desc with + | Tvariant row0 -> + let row = row_repr row0 in + let more = repr row.row_more in + (* We shall really check the level on the row variable *) + let keep = is_Tvar more && more.level <> generic_level in + let more' = copy_rec more in + let fixed' = fixed && is_Tvar (repr more') in + let row = copy_row copy_rec fixed' row keep more' in + Tvariant row + | Tpoly (t1, tl) -> + let tl = List.map repr tl in + let tl' = List.map (fun t -> newty t.desc) tl in + let bound = tl @ bound in + let visited = + List.map2 (fun ty t -> ty,(t,bound)) tl tl' @ visited in + Tpoly (copy_sep fixed free bound visited t1, tl') + | _ -> copy_type_desc copy_rec ty.desc + end; + t + end + +let instance_poly ?(keep_names=false) fixed univars sch = + let univars = List.map repr univars in + let copy_var ty = + match ty.desc with + Tunivar name -> if keep_names then newty (Tvar name) else newvar () + | _ -> assert false + in + let vars = List.map copy_var univars in + let pairs = List.map2 (fun u v -> u, (v, [])) univars vars in + delayed_copy := []; + let ty = copy_sep fixed (compute_univars sch) [] pairs sch in + List.iter Lazy.force !delayed_copy; + delayed_copy := []; + cleanup_types (); + vars, ty + +let instance_label fixed lbl = + let ty_res = copy lbl.lbl_res in + let vars, ty_arg = + match repr lbl.lbl_arg with + {desc = Tpoly (ty, tl)} -> + instance_poly fixed tl ty + | _ -> + [], copy lbl.lbl_arg + in + cleanup_types (); + (vars, ty_arg, ty_res) + +(**** Instantiation with parameter substitution ****) + +let unify' = (* Forward declaration *) + ref (fun _env _ty1 _ty2 -> raise (Unify [])) + +let subst env level priv abbrev ty params args body = + if List.length params <> List.length args then raise (Unify []); + let old_level = !current_level in + current_level := level; + try + let body0 = newvar () in (* Stub *) + begin match ty with + None -> () + | Some ({desc = Tconstr (path, tl, _)} as ty) -> + let abbrev = proper_abbrevs path tl abbrev in + memorize_abbrev abbrev priv path ty body0 + | _ -> + assert false + end; + abbreviations := abbrev; + let (params', body') = instance_parameterized_type params body in + abbreviations := ref Mnil; + !unify' env body0 body'; + List.iter2 (!unify' env) params' args; + current_level := old_level; + body' + with Unify _ as exn -> + current_level := old_level; + raise exn + +(* + Only the shape of the type matters, not whether it is generic or + not. [generic_level] might be somewhat slower, but it ensures + invariants on types are enforced (decreasing levels), and we don't + care about efficiency here. +*) +let apply env params body args = + try + subst env generic_level Public (ref Mnil) None params args body + with + Unify _ -> raise Cannot_apply + +let () = Subst.ctype_apply_env_empty := apply Env.empty + + (****************************) + (* Abbreviation expansion *) + (****************************) + +(* + If the environment has changed, memorized expansions might not + be correct anymore, and so we flush the cache. This is safe but + quite pessimistic: it would be enough to flush the cache when a + type or module definition is overridden in the environment. +*) +let previous_env = ref Env.empty +(*let string_of_kind = function Public -> "public" | Private -> "private"*) +let check_abbrev_env env = + if env != !previous_env then begin + (* prerr_endline "cleanup expansion cache"; *) + cleanup_abbrev (); + previous_env := env + end + + +(* Expand an abbreviation. The expansion is memorized. *) +(* + Assume the level is greater than the path binding time of the + expanded abbreviation. +*) +(* + An abbreviation expansion will fail in either of these cases: + 1. The type constructor does not correspond to a manifest type. + 2. The type constructor is defined in an external file, and this + file is not in the path (missing -I options). + 3. The type constructor is not in the "local" environment. This can + happens when a non-generic type variable has been instantiated + afterwards to the not yet defined type constructor. (Actually, + this cannot happen at the moment due to the strong constraints + between type levels and constructor binding time.) + 4. The expansion requires the expansion of another abbreviation, + and this other expansion fails. +*) +let expand_abbrev_gen kind find_type_expansion env ty = + check_abbrev_env env; + match ty with + {desc = Tconstr (path, args, abbrev); level = level} -> + let lookup_abbrev = proper_abbrevs path args abbrev in + begin match find_expans kind path !lookup_abbrev with + Some ty' -> + (* prerr_endline + ("found a "^string_of_kind kind^" expansion for "^Path.name path);*) + if level <> generic_level then + begin try + update_level env level ty' + with Unify _ -> + (* XXX This should not happen. + However, levels are not correctly restored after a + typing error *) + () + end; + let ty' = repr ty' in + (* assert (ty != ty'); *) (* PR#7324 *) + ty' + | None -> + match find_type_expansion path env with + | exception Not_found -> + (* another way to expand is to normalize the path itself *) + let path' = Env.normalize_path None env path in + if Path.same path path' then raise Cannot_expand + else newty2 level (Tconstr (path', args, abbrev)) + | (params, body, lv) -> + (* prerr_endline + ("add a "^string_of_kind kind^" expansion for "^Path.name path);*) + let ty' = subst env level kind abbrev (Some ty) params args body in + (* For gadts, remember type as non exportable *) + (* The ambiguous level registered for ty' should be the highest *) + if !trace_gadt_instances then begin + 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)]); + Env.add_gadt_instances env lv [ty; ty'] + end; + ty' + end + | _ -> + assert false + +(* Expand respecting privacy *) +let expand_abbrev env ty = + expand_abbrev_gen Public Env.find_type_expansion env ty + +(* Expand once the head of a type *) +let expand_head_once env ty = + try expand_abbrev env (repr ty) with Cannot_expand -> assert false + +(* Check whether a type can be expanded *) +let safe_abbrev env ty = + let snap = Btype.snapshot () in + try ignore (expand_abbrev env ty); true + with Cannot_expand | Unify _ -> + Btype.backtrack snap; + false + +(* Expand the head of a type once. + Raise Cannot_expand if the type cannot be expanded. + May raise Unify, if a recursion was hidden in the type. *) +let try_expand_once env ty = + let ty = repr ty in + match ty.desc with + Tconstr _ -> repr (expand_abbrev env ty) + | _ -> raise Cannot_expand + +(* This one only raises Cannot_expand *) +let try_expand_safe env ty = + let snap = Btype.snapshot () in + try try_expand_once env ty + with Unify _ -> + Btype.backtrack snap; raise Cannot_expand + +(* Fully expand the head of a type. *) +let rec try_expand_head try_once env ty = + let ty' = try_once env ty in + try try_expand_head try_once env ty' + with Cannot_expand -> ty' + +let try_expand_head try_once env ty = + let ty' = try_expand_head try_once env ty in + begin match Env.gadt_instance_level env ty' with + None -> () + | Some lv -> Env.add_gadt_instance_chain env lv ty + end; + ty' + +(* Unsafe full expansion, may raise Unify. *) +let expand_head_unif env ty = + try try_expand_head try_expand_once env ty with Cannot_expand -> repr ty + +(* Safe version of expand_head, never fails *) +let expand_head env ty = + try try_expand_head try_expand_safe env ty with Cannot_expand -> repr ty + +let _ = forward_try_expand_once := try_expand_safe + + +(* Expand until we find a non-abstract type declaration *) + +let rec extract_concrete_typedecl env ty = + let ty = repr ty in + match ty.desc with + Tconstr (p, _, _) -> + let decl = Env.find_type p env in + if decl.type_kind <> Type_abstract then (p, p, decl) else + let ty = + try try_expand_once env ty with Cannot_expand -> raise Not_found + in + let (_, p', decl) = extract_concrete_typedecl env ty in + (p, p', decl) + | _ -> raise Not_found + +(* Implementing function [expand_head_opt], the compiler's own version of + [expand_head] used for type-based optimisations. + [expand_head_opt] uses [Env.find_type_expansion_opt] to access the + manifest type information of private abstract data types which is + normally hidden to the type-checker out of the implementation module of + the private abbreviation. *) + +let expand_abbrev_opt = + expand_abbrev_gen Private Env.find_type_expansion_opt + +let try_expand_once_opt env ty = + let ty = repr ty in + match ty.desc with + Tconstr _ -> repr (expand_abbrev_opt env ty) + | _ -> raise Cannot_expand + +let rec try_expand_head_opt env ty = + let ty' = try_expand_once_opt env ty in + begin try + try_expand_head_opt env ty' + with Cannot_expand -> + ty' + end + +let expand_head_opt env ty = + let snap = Btype.snapshot () in + try try_expand_head_opt env ty + with Cannot_expand | Unify _ -> (* expand_head shall never fail *) + Btype.backtrack snap; + repr ty + +(* Make sure that the type parameters of the type constructor [ty] + respect the type constraints *) +let enforce_constraints env ty = + match ty with + {desc = Tconstr (path, args, _abbrev); level = level} -> + begin try + let decl = Env.find_type path env in + ignore + (subst env level Public (ref Mnil) None decl.type_params args + (newvar2 level)) + with Not_found -> () + end + | _ -> + assert false + +(* Recursively expand the head of a type. + Also expand #-types. *) +let full_expand env ty = + let ty = repr (expand_head env ty) in + match ty.desc with + Tobject (fi, {contents = Some (_, v::_)}) when is_Tvar (repr v) -> + newty2 ty.level (Tobject (fi, ref None)) + | _ -> + ty + +(* + Check whether the abbreviation expands to a well-defined type. + During the typing of a class, abbreviations for correspondings + types expand to non-generic types. +*) +let generic_abbrev env path = + try + let (_, body, _) = Env.find_type_expansion path env in + (repr body).level = generic_level + with + Not_found -> + false + +let generic_private_abbrev env path = + try + match Env.find_type path env with + {type_kind = Type_abstract; + type_private = Private; + type_manifest = Some body} -> + (repr body).level = generic_level + | _ -> false + with Not_found -> false + +let is_contractive env p = + try + let decl = Env.find_type p env in + in_pervasives p && decl.type_manifest = None || is_datatype decl + with Not_found -> false + + + (*****************) + (* Occur check *) + (*****************) + + +exception Occur + +let rec occur_rec env allow_recursive visited ty0 = function + | {desc=Tlink ty} -> + occur_rec env allow_recursive visited ty0 ty + | ty -> + if ty == ty0 then raise Occur; + match ty.desc with + Tconstr(p, _tl, _abbrev) -> + if allow_recursive && is_contractive env p then () else + begin try + if TypeSet.mem ty visited then raise Occur; + let visited = TypeSet.add ty visited in + iter_type_expr (occur_rec env allow_recursive visited ty0) ty + with Occur -> try + let ty' = try_expand_head try_expand_once env ty in + (* This call used to be inlined, but there seems no reason for it. + Message was referring to change in rev. 1.58 of the CVS repo. *) + occur_rec env allow_recursive visited ty0 ty' + with Cannot_expand -> + raise Occur + end + | Tobject _ | Tvariant _ -> + () + | _ -> + if allow_recursive || TypeSet.mem ty visited then () else begin + let visited = TypeSet.add ty visited in + iter_type_expr (occur_rec env allow_recursive visited ty0) ty + end + +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 old = !type_changed in + try + while + type_changed := false; + occur_rec env allow_recursive TypeSet.empty ty0 ty; + !type_changed + do () (* prerr_endline "changed" *) done; + merge type_changed old + with exn -> + merge type_changed old; + raise (match exn with Occur -> Unify [] | _ -> exn) + +let occur_in env ty0 t = + try occur env ty0 t; false with Unify _ -> true + +(* Check that a local constraint is well-founded *) +(* PR#6405: not needed since we allow recursion and work on normalized types *) +(* PR#6992: we actually need it for contractiveness *) +(* This is a simplified version of occur, only for the rectypes case *) + +let rec local_non_recursive_abbrev strict visited env p ty = + (*Format.eprintf "@[Check %s =@ %a@]@." (Path.name p) !Btype.print_raw ty;*) + let ty = repr ty in + if not (List.memq ty visited) then begin + match ty.desc with + Tconstr(p', args, _abbrev) -> + if Path.same p p' then raise Occur; + if not strict && is_contractive env p' then () else + let visited = ty :: visited in + begin try + (* try expanding, since [p] could be hidden *) + local_non_recursive_abbrev strict visited env p + (try_expand_head try_expand_once env ty) + with Cannot_expand -> + let params = + try (Env.find_type p' env).type_params + with Not_found -> args + in + List.iter2 + (fun tv ty -> + let strict = strict || not (is_Tvar (repr tv)) in + local_non_recursive_abbrev strict visited env p ty) + params args + end + | _ -> + if strict then (* PR#7374 *) + let visited = ty :: visited in + iter_type_expr (local_non_recursive_abbrev true visited env p) ty + end + +let local_non_recursive_abbrev env p ty = + try (* PR#7397: need to check trace_gadt_instances *) + wrap_trace_gadt_instances env + (local_non_recursive_abbrev false [] env p) ty; + true + with Occur -> false + + + (*****************************) + (* Polymorphic Unification *) + (*****************************) + +(* Since we cannot duplicate universal variables, unification must + be done at meta-level, using bindings in univar_pairs *) +let rec unify_univar t1 t2 = function + (cl1, cl2) :: rem -> + let find_univ t cl = + try + let (_, r) = List.find (fun (t',_) -> t == repr t') cl in + Some r + with Not_found -> None + in + begin match find_univ t1 cl1, find_univ t2 cl2 with + Some {contents=Some t'2}, Some _ when t2 == repr t'2 -> + () + | Some({contents=None} as r1), Some({contents=None} as r2) -> + set_univar r1 t2; set_univar r2 t1 + | None, None -> + unify_univar t1 t2 rem + | _ -> + raise (Unify []) + end + | [] -> raise (Unify []) + +(* Test the occurrence of free univars in a type *) +(* that's way too expensive. Must do some kind of caching *) +let occur_univar env ty = + let visited = ref TypeMap.empty in + let rec occur_rec bound ty = + let ty = repr ty in + if ty.level >= lowest_level && + if TypeSet.is_empty bound then + (ty.level <- pivot_level - ty.level; true) + else try + let bound' = TypeMap.find ty !visited in + if TypeSet.exists (fun x -> not (TypeSet.mem x bound)) bound' then + (visited := TypeMap.add ty (TypeSet.inter bound bound') !visited; + true) + else false + with Not_found -> + visited := TypeMap.add ty bound !visited; + true + then + match ty.desc with + Tunivar _ -> + if not (TypeSet.mem ty bound) then raise (Unify [ty, newgenvar ()]) + | Tpoly (ty, tyl) -> + let bound = List.fold_right TypeSet.add (List.map repr tyl) bound in + occur_rec bound ty + | Tconstr (_, [], _) -> () + | Tconstr (p, tl, _) -> + begin try + let td = Env.find_type p env in + List.iter2 + (fun t v -> + if Variance.(mem May_pos v || mem May_neg v) + then occur_rec bound t) + tl td.type_variance + with Not_found -> + List.iter (occur_rec bound) tl + end + | _ -> iter_type_expr (occur_rec bound) ty + in + try + occur_rec TypeSet.empty ty; unmark_type ty + with exn -> + unmark_type ty; raise exn + +(* Grouping univars by families according to their binders *) +let add_univars = + List.fold_left (fun s (t,_) -> TypeSet.add (repr t) s) + +let get_univar_family univar_pairs univars = + if univars = [] then TypeSet.empty else + let insert s = function + cl1, (_::_ as cl2) -> + if List.exists (fun (t1,_) -> TypeSet.mem (repr t1) s) cl1 then + add_univars s cl2 + else s + | _ -> s + in + let s = List.fold_right TypeSet.add univars TypeSet.empty in + List.fold_left insert s univar_pairs + +(* Whether a family of univars escapes from a type *) +let univars_escape env univar_pairs vl ty = + let family = get_univar_family univar_pairs vl in + let visited = ref TypeSet.empty in + let rec occur t = + let t = repr t in + if TypeSet.mem t !visited then () else begin + visited := TypeSet.add t !visited; + match t.desc with + Tpoly (t, tl) -> + if List.exists (fun t -> TypeSet.mem (repr t) family) tl then () + else occur t + | Tunivar _ -> + if TypeSet.mem t family then raise Occur + | Tconstr (_, [], _) -> () + | Tconstr (p, tl, _) -> + begin try + let td = Env.find_type p env in + List.iter2 + (fun t v -> + if Variance.(mem May_pos v || mem May_neg v) then occur t) + tl td.type_variance + with Not_found -> + List.iter occur tl + end + | _ -> + iter_type_expr occur t + end + in + try occur ty; false with Occur -> true + +(* Wrapper checking that no variable escapes and updating univar_pairs *) +let enter_poly env univar_pairs t1 tl1 t2 tl2 f = + let old_univars = !univar_pairs in + let known_univars = + List.fold_left (fun s (cl,_) -> add_univars s cl) + TypeSet.empty old_univars + in + let tl1 = List.map repr tl1 and tl2 = List.map repr tl2 in + if List.exists (fun t -> TypeSet.mem t known_univars) tl1 && + univars_escape env old_univars tl1 (newty(Tpoly(t2,tl2))) + || List.exists (fun t -> TypeSet.mem t known_univars) tl2 && + univars_escape env old_univars tl2 (newty(Tpoly(t1,tl1))) + then raise (Unify []); + let cl1 = List.map (fun t -> t, ref None) tl1 + and cl2 = List.map (fun t -> t, ref None) tl2 in + univar_pairs := (cl1,cl2) :: (cl2,cl1) :: old_univars; + try let res = f t1 t2 in univar_pairs := old_univars; res + with exn -> univar_pairs := old_univars; raise exn + +let univar_pairs = ref [] + + + (*****************) + (* Unification *) + (*****************) + + + +let rec has_cached_expansion p abbrev = + match abbrev with + Mnil -> false + | Mcons(_, p', _, _, rem) -> Path.same p p' || has_cached_expansion p rem + | Mlink rem -> has_cached_expansion p !rem + +(**** Transform error trace ****) +(* +++ Move it to some other place ? *) + +let expand_trace env trace = + List.fold_right + (fun (t1, t2) rem -> + (repr t1, full_expand env t1)::(repr t2, full_expand env t2)::rem) + trace [] + +(* build a dummy variant type *) +let mkvariant fields closed = + newgenty + (Tvariant + {row_fields = fields; row_closed = closed; row_more = newvar(); + row_bound = (); row_fixed = false; row_name = None }) + +(**** Unification ****) + +(* Return whether [t0] occurs in [ty]. Objects are also traversed. *) +let deep_occur t0 ty = + let rec occur_rec ty = + let ty = repr ty in + if ty.level >= lowest_level then begin + if ty == t0 then raise Occur; + ty.level <- pivot_level - ty.level; + iter_type_expr occur_rec ty + end + in + try + occur_rec ty; unmark_type ty; false + with Occur -> + unmark_type ty; true + +(* + 1. When unifying two non-abbreviated types, one type is made a link + to the other. When unifying an abbreviated type with a + non-abbreviated type, the non-abbreviated type is made a link to + the other one. When unifying to abbreviated types, these two + types are kept distincts, but they are made to (temporally) + expand to the same type. + 2. Abbreviations with at least one parameter are systematically + expanded. The overhead does not seem too high, and that way + abbreviations where some parameters does not appear in the + expansion, such as ['a t = int], are correctly handled. In + particular, for this example, unifying ['a t] with ['b t] keeps + ['a] and ['b] distincts. (Is it really important ?) + 3. Unifying an abbreviation ['a t = 'a] with ['a] should not yield + ['a t as 'a]. Indeed, the type variable would otherwise be lost. + This problem occurs for abbreviations expanding to a type + variable, but also to many other constrained abbreviations (for + instance, [(< x : 'a > -> unit) t = ]). The solution is + that, if an abbreviation is unified with some subpart of its + parameters, then the parameter actually does not get + abbreviated. It would be possible to check whether some + information is indeed lost, but it probably does not worth it. +*) + +let newtype_level = ref None + +let get_newtype_level () = + match !newtype_level with + | None -> assert false + | Some x -> x + +(* a local constraint can be added only if the rhs + of the constraint does not contain any Tvars. + They need to be removed using this function *) +let reify env t = + let newtype_level = get_newtype_level () in + let create_fresh_constr lev name = + let decl = new_declaration (Some (newtype_level, newtype_level)) None in + let name = match name with Some s -> "$'"^s | _ -> "$" in + let path = Path.Pident (Ident.create (get_new_abstract_name name)) in + let new_env = Env.add_local_type path decl !env in + let t = newty2 lev (Tconstr (path,[],ref Mnil)) in + env := new_env; + t + in + let visited = ref TypeSet.empty in + let rec iterator ty = + let ty = repr ty in + if TypeSet.mem ty !visited then () else begin + visited := TypeSet.add ty !visited; + match ty.desc with + Tvar o -> + let t = create_fresh_constr ty.level o in + link_type ty t; + if ty.level < newtype_level then + raise (Unify [t, newvar2 ty.level]) + | Tvariant r -> + let r = row_repr r in + if not (static_row r) then begin + if r.row_fixed then iterator (row_more r) else + let m = r.row_more in + match m.desc with + Tvar o -> + let t = create_fresh_constr m.level o in + let row = + {r with row_fields=[]; row_fixed=true; row_more = t} in + link_type m (newty2 m.level (Tvariant row)); + if m.level < newtype_level then + raise (Unify [t, newvar2 m.level]) + | _ -> assert false + end; + iter_row iterator r + | Tconstr (p, _, _) when is_object_type p -> + iter_type_expr iterator (full_expand !env ty) + | _ -> + iter_type_expr iterator ty + end + in + iterator t + +let is_newtype env p = + try + let decl = Env.find_type p env in + decl.type_newtype_level <> None && + decl.type_kind = Type_abstract && + decl.type_private = Public + with Not_found -> false + +let non_aliasable p decl = + (* in_pervasives p || (subsumed by in_current_module) *) + in_current_module p && decl.type_newtype_level = None + +let is_instantiable env p = + try + let decl = Env.find_type p env in + decl.type_kind = Type_abstract && + decl.type_private = Public && + decl.type_arity = 0 && + decl.type_manifest = None && + not (non_aliasable p decl) + with Not_found -> false + + +(* PR#7113: -safe-string should be a global property *) +let compatible_paths p1 p2 = + let open Predef in + Path.same p1 p2 || + Path.same p1 path_bytes && Path.same p2 path_string || + Path.same p1 path_string && Path.same p2 path_bytes + +(* Check for datatypes carefully; see PR#6348 *) +let rec expands_to_datatype env ty = + let ty = repr ty in + match ty.desc with + Tconstr (p, _, _) -> + begin try + is_datatype (Env.find_type p env) || + expands_to_datatype env (try_expand_once env ty) + with Not_found | Cannot_expand -> false + end + | _ -> false + +(* mcomp type_pairs subst env t1 t2 does not raise an + exception if it is possible that t1 and t2 are actually + equal, assuming the types in type_pairs are equal and + that the mapping subst holds. + Assumes that both t1 and t2 do not contain any tvars + and that both their objects and variants are closed + *) + +let rec mcomp type_pairs env t1 t2 = + if t1 == t2 then () else + let t1 = repr t1 in + let t2 = repr t2 in + if t1 == t2 then () else + match (t1.desc, t2.desc) with + | (Tvar _, _) + | (_, Tvar _) -> + () + | (Tconstr (p1, [], _), Tconstr (p2, [], _)) when Path.same p1 p2 -> + () + | _ -> + let t1' = expand_head_opt env t1 in + let t2' = expand_head_opt env t2 in + (* Expansion may have changed the representative of the types... *) + let t1' = repr t1' and t2' = repr t2' in + if t1' == t2' then () else + begin try TypePairs.find type_pairs (t1', t2') + with Not_found -> + TypePairs.add type_pairs (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) -> + mcomp type_pairs env t1 t2; + mcomp type_pairs env u1 u2; + | (Ttuple tl1, Ttuple tl2) -> + mcomp_list type_pairs env tl1 tl2 + | (Tconstr (p1, tl1, _), Tconstr (p2, tl2, _)) -> + mcomp_type_decl type_pairs env p1 p2 tl1 tl2 + | (Tconstr (p, _, _), _) | (_, Tconstr (p, _, _)) -> + begin try + let decl = Env.find_type p env in + if non_aliasable p decl || is_datatype decl then raise (Unify []) + with Not_found -> () + end + (* + | (Tpackage (p1, n1, tl1), Tpackage (p2, n2, tl2)) when n1 = n2 -> + mcomp_list type_pairs env tl1 tl2 + *) + | (Tpackage _, Tpackage _) -> () + | (Tvariant row1, Tvariant row2) -> + mcomp_row type_pairs env row1 row2 + | (Tobject (fi1, _), Tobject (fi2, _)) -> + mcomp_fields type_pairs env fi1 fi2 + | (Tfield _, Tfield _) -> (* Actually unused *) + mcomp_fields type_pairs env t1' t2' + | (Tnil, Tnil) -> + () + | (Tpoly (t1, []), Tpoly (t2, [])) -> + mcomp type_pairs env t1 t2 + | (Tpoly (t1, tl1), Tpoly (t2, tl2)) -> + enter_poly env univar_pairs t1 tl1 t2 tl2 + (mcomp type_pairs env) + | (Tunivar _, Tunivar _) -> + unify_univar t1' t2' !univar_pairs + | (_, _) -> + raise (Unify []) + end + +and mcomp_list type_pairs env tl1 tl2 = + if List.length tl1 <> List.length tl2 then + raise (Unify []); + List.iter2 (mcomp type_pairs env) tl1 tl2 + +and mcomp_fields type_pairs env ty1 ty2 = + if not (concrete_object ty1 && concrete_object ty2) then assert false; + let (fields2, rest2) = flatten_fields ty2 in + let (fields1, rest1) = flatten_fields ty1 in + let (pairs, miss1, miss2) = associate_fields fields1 fields2 in + let has_present = + List.exists (fun (_, k, _) -> field_kind_repr k = Fpresent) in + mcomp type_pairs env rest1 rest2; + if has_present miss1 && (object_row ty2).desc = Tnil + || has_present miss2 && (object_row ty1).desc = Tnil then raise (Unify []); + List.iter + (function (_n, k1, t1, k2, t2) -> + mcomp_kind k1 k2; + mcomp type_pairs env t1 t2) + pairs + +and mcomp_kind k1 k2 = + let k1 = field_kind_repr k1 in + let k2 = field_kind_repr k2 in + match k1, k2 with + (Fpresent, Fabsent) + | (Fabsent, Fpresent) -> raise (Unify []) + | _ -> () + +and mcomp_row type_pairs env row1 row2 = + let row1 = row_repr row1 and row2 = row_repr row2 in + let r1, r2, pairs = merge_row_fields row1.row_fields row2.row_fields in + let cannot_erase (_,f) = + match row_field_repr f with + Rpresent _ -> true + | Rabsent | Reither _ -> false + in + if row1.row_closed && List.exists cannot_erase r2 + || row2.row_closed && List.exists cannot_erase r1 then raise (Unify []); + List.iter + (fun (_,f1,f2) -> + match row_field_repr f1, row_field_repr f2 with + | Rpresent None, (Rpresent (Some _) | Reither (_, _::_, _, _) | Rabsent) + | Rpresent (Some _), (Rpresent None | Reither (true, _, _, _) | Rabsent) + | (Reither (_, _::_, _, _) | Rabsent), Rpresent None + | (Reither (true, _, _, _) | Rabsent), Rpresent (Some _) -> + raise (Unify []) + | Rpresent(Some t1), Rpresent(Some t2) -> + mcomp type_pairs env t1 t2 + | Rpresent(Some t1), Reither(false, tl2, _, _) -> + List.iter (mcomp type_pairs env t1) tl2 + | Reither(false, tl1, _, _), Rpresent(Some t2) -> + List.iter (mcomp type_pairs env t2) tl1 + | _ -> ()) + pairs + +and mcomp_type_decl type_pairs env p1 p2 tl1 tl2 = + try + let decl = Env.find_type p1 env in + let decl' = Env.find_type p2 env in + if compatible_paths p1 p2 then begin + let inj = + try List.map Variance.(mem Inj) (Env.find_type p1 env).type_variance + with Not_found -> List.map (fun _ -> false) tl1 + in + List.iter2 + (fun i (t1,t2) -> if i then mcomp type_pairs env t1 t2) + inj (List.combine tl1 tl2) + end else if non_aliasable p1 decl && non_aliasable p2 decl' then + raise (Unify []) + else + match decl.type_kind, decl'.type_kind with + | Type_record (lst,r), Type_record (lst',r') when r = r' -> + mcomp_list type_pairs env tl1 tl2; + mcomp_record_description type_pairs env lst lst' + | Type_variant v1, Type_variant v2 -> + mcomp_list type_pairs env tl1 tl2; + mcomp_variant_description type_pairs env v1 v2 + | Type_open, Type_open -> + mcomp_list type_pairs env tl1 tl2 + | Type_abstract, Type_abstract -> () + | Type_abstract, _ when not (non_aliasable p1 decl)-> () + | _, Type_abstract when not (non_aliasable p2 decl') -> () + | _ -> raise (Unify []) + with Not_found -> () + +and mcomp_type_option type_pairs env t t' = + match t, t' with + None, None -> () + | Some t, Some t' -> mcomp type_pairs env t t' + | _ -> raise (Unify []) + +and mcomp_variant_description type_pairs env xs ys = + let rec iter = fun x y -> + match x, y with + | c1 :: xs, c2 :: ys -> + mcomp_type_option type_pairs env c1.cd_res c2.cd_res; + begin match c1.cd_args, c2.cd_args with + | Cstr_tuple l1, Cstr_tuple l2 -> mcomp_list type_pairs env l1 l2 + | Cstr_record l1, Cstr_record l2 -> + mcomp_record_description type_pairs env l1 l2 + | _ -> raise (Unify []) + end; + if Ident.name c1.cd_id = Ident.name c2.cd_id + then iter xs ys + else raise (Unify []) + | [],[] -> () + | _ -> raise (Unify []) + in + iter xs ys + +and mcomp_record_description type_pairs env = + let rec iter x y = + match x, y with + | l1 :: xs, l2 :: ys -> + mcomp type_pairs env l1.ld_type l2.ld_type; + if Ident.name l1.ld_id = Ident.name l2.ld_id && + l1.ld_mutable = l2.ld_mutable + then iter xs ys + else raise (Unify []) + | [], [] -> () + | _ -> raise (Unify []) + in + iter + +let mcomp env t1 t2 = + mcomp (TypePairs.create 4) 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 + Some x -> x + | None -> raise Not_found + with Not_found -> let lev = Path.binding_time path in (lev, lev) + +let add_gadt_equation env source destination = + if local_non_recursive_abbrev !env source destination then begin + let destination = duplicate_type destination in + let source_lev = find_newtype_level !env source in + let decl = new_declaration (Some source_lev) (Some destination) in + let newtype_level = get_newtype_level () in + env := Env.add_local_constraint source decl newtype_level !env; + cleanup_abbrev () + end + +let unify_eq_set = TypePairs.create 11 + +let order_type_pair t1 t2 = + if t1.id <= t2.id then (t1, t2) else (t2, t1) + +let add_type_equality t1 t2 = + TypePairs.add unify_eq_set (order_type_pair t1 t2) () + +let eq_package_path env p1 p2 = + Path.same p1 p2 || + Path.same (normalize_package_path env p1) (normalize_package_path env p2) + +let nondep_type' = ref (fun _ _ _ -> assert false) +let package_subtype = ref (fun _ _ _ _ _ _ _ -> assert false) + +let rec concat_longident lid1 = + let open Longident in + function + Lident s -> Ldot (lid1, s) + | Ldot (lid2, s) -> Ldot (concat_longident lid1 lid2, s) + | Lapply (lid2, lid) -> Lapply (concat_longident lid1 lid2, lid) + +let nondep_instance env level id ty = + let ty = !nondep_type' env id ty in + if level = generic_level then duplicate_type ty else + let old = !current_level in + current_level := level; + let ty = instance env ty in + current_level := old; + ty + +(* Find the type paths nl1 in the module type mty2, and add them to the + list (nl2, tl2). raise Not_found if impossible *) +let complete_type_list ?(allow_absent=false) env nl1 lv2 mty2 nl2 tl2 = + let id2 = Ident.create "Pkg" in + let env' = Env.add_module id2 mty2 env in + 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, _ -> + try + let path = + Env.lookup_type (concat_longident (Longident.Lident "Pkg") n) env' + in + match Env.find_type path env' with + {type_arity = 0; type_kind = Type_abstract; + type_private = Public; type_manifest = Some t2} -> + (n, nondep_instance env' lv2 id2 t2) :: complete nl ntl2 + | {type_arity = 0; type_kind = Type_abstract; + type_private = Public; type_manifest = None} when allow_absent -> + complete nl ntl2 + | _ -> raise Exit + with + | Not_found when allow_absent -> complete nl ntl2 + | Exit -> raise Not_found + in + complete nl1 (List.combine nl2 tl2) + +(* raise Not_found rather than Unify if the module types are incompatible *) +let unify_package env unify_list lv1 p1 n1 tl1 lv2 p2 n2 tl2 = + let ntl2 = complete_type_list env n1 lv2 (Mty_ident p2) n2 tl2 + and ntl1 = complete_type_list env n2 lv1 (Mty_ident p1) n1 tl1 in + unify_list (List.map snd ntl1) (List.map snd ntl2); + if eq_package_path env p1 p2 + || !package_subtype env p1 n1 tl1 p2 n2 tl2 + && !package_subtype env p2 n2 tl2 p1 n1 tl1 then () else raise Not_found + + +(* force unification in Reither when one side has a non-conjunctive type *) +let rigid_variants = ref false + +(* drop not force unification in Reither, even in fixed case + (not sound, only use it when checking exhaustiveness) *) +let passive_variants = ref false +let with_passive_variants f x = + if !passive_variants then f x else + match passive_variants := true; f x with + | r -> passive_variants := false; r + | exception e -> passive_variants := false; raise e + +let unify_eq t1 t2 = + t1 == t2 || + match !umode with + | Expression -> false + | Pattern -> + try TypePairs.find unify_eq_set (order_type_pair t1 t2); true + with Not_found -> false + +let unify1_var env t1 t2 = + assert (is_Tvar t1); + occur env t1 t2; + occur_univar env t2; + let d1 = t1.desc in + link_type t1 t2; + try + update_level env t1.level t2 + with Unify _ as e -> + t1.desc <- d1; + raise e + +let rec unify (env:Env.t ref) t1 t2 = + (* First step: special cases (optimizations) *) + if t1 == t2 then () else + let t1 = repr t1 in + let t2 = repr t2 in + if unify_eq t1 t2 then () else + let reset_tracing = check_trace_gadt_instances !env in + + try + type_changed := true; + begin match (t1.desc, t2.desc) with + (Tvar _, Tconstr _) when deep_occur t1 t2 -> + unify2 env t1 t2 + | (Tconstr _, Tvar _) when deep_occur t2 t1 -> + unify2 env t1 t2 + | (Tvar _, _) -> + unify1_var !env t1 t2 + | (_, Tvar _) -> + unify1_var !env t2 t1 + | (Tunivar _, Tunivar _) -> + unify_univar t1 t2 !univar_pairs; + update_level !env t1.level t2; + link_type t1 t2 + | (Tconstr (p1, [], a1), Tconstr (p2, [], a2)) + when Path.same p1 p2 (* && actual_mode !env = Old *) + (* This optimization assumes that t1 does not expand to t2 + (and conversely), so we fall back to the general case + when any of the types has a cached expansion. *) + && not (has_cached_expansion p1 !a1 + || has_cached_expansion p2 !a2) -> + update_level !env t1.level t2; + link_type t1 t2 + | (Tconstr (p1, [], _), Tconstr (p2, [], _)) + when Env.has_local_constraints !env + && is_newtype !env p1 && is_newtype !env p2 -> + (* Do not use local constraints more than necessary *) + begin try + if find_newtype_level !env p1 < find_newtype_level !env p2 then + unify env t1 (try_expand_once !env t2) + else + unify env (try_expand_once !env t1) t2 + with Cannot_expand -> + unify2 env t1 t2 + end + | _ -> + unify2 env t1 t2 + end; + reset_trace_gadt_instances reset_tracing; + with Unify trace -> + reset_trace_gadt_instances reset_tracing; + raise (Unify ((t1, t2)::trace)) + +and unify2 env t1 t2 = + (* Second step: expansion of abbreviations *) + (* Expansion may change the representative of the types. *) + ignore (expand_head_unif !env t1); + ignore (expand_head_unif !env t2); + let t1' = expand_head_unif !env t1 in + let t2' = expand_head_unif !env t2 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 + + let t1 = repr t1 and t2 = repr t2 in + if !trace_gadt_instances then begin + (* All types in chains already have the same ambiguity levels *) + let ilevel t = + match Env.gadt_instance_level !env t with None -> 0 | Some lv -> lv in + let lv1 = ilevel t1 and lv2 = ilevel t2 in + 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 + try unify3 env t2 t2' t1 t1' with Unify trace -> + raise (Unify (List.map (fun (x, y) -> (y, x)) trace)) + +and unify3 env t1 t1' t2 t2' = + (* Third step: truly unification *) + (* Assumes either [t1 == t1'] or [t2 != t2'] *) + let d1 = t1'.desc and d2 = t2'.desc in + let create_recursion = (t2 != t2') && (deep_occur t1' t2) in + + begin match (d1, d2) with (* handle vars and univars specially *) + (Tunivar _, Tunivar _) -> + unify_univar t1' t2' !univar_pairs; + link_type t1' t2' + | (Tvar _, _) -> + occur !env t1' t2; + occur_univar !env t2; + link_type t1' t2; + | (_, Tvar _) -> + occur !env t2' t1; + occur_univar !env t1; + link_type t2' t1; + | (Tfield _, Tfield _) -> (* special case for GADTs *) + unify_fields env t1' t2' + | _ -> + begin match !umode with + | Expression -> + occur !env t1' t2'; + link_type t1' t2 + | Pattern -> + add_type_equality t1' t2' + end; + try + begin match (d1, d2) with + (Tarrow (l1, t1, u1, c1), Tarrow (l2, t2, u2, c2)) when 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 + Clink r, c2 -> set_commu r c2 + | c1, Clink r -> set_commu r c1 + | _ -> () + end + | (Ttuple tl1, Ttuple tl2) -> + unify_list env tl1 tl2 + | (Tconstr (p1, tl1, _), Tconstr (p2, tl2, _)) when Path.same p1 p2 -> + if !umode = Expression || not !generate_equations then + unify_list env tl1 tl2 + else if !assume_injective then + set_mode_pattern ~generate:true ~injective:false + (fun () -> unify_list env tl1 tl2) + else if in_current_module p1 (* || in_pervasives p1 *) + || List.exists (expands_to_datatype !env) [t1'; t1; t2] then + unify_list env tl1 tl2 + else + let inj = + try List.map Variance.(mem Inj) + (Env.find_type p1 !env).type_variance + with Not_found -> List.map (fun _ -> false) tl1 + in + List.iter2 + (fun i (t1, t2) -> + if i then unify env t1 t2 else + set_mode_pattern ~generate:false ~injective:false + begin fun () -> + let snap = snapshot () in + try unify env t1 t2 with Unify _ -> + backtrack snap; + reify env t1; reify env t2 + end) + inj (List.combine tl1 tl2) + | (Tconstr (path,[],_), + Tconstr (path',[],_)) + when is_instantiable !env path && is_instantiable !env path' + && !generate_equations -> + let source, destination = + if find_newtype_level !env path > find_newtype_level !env path' + then path , t2' + else path', t1' + in + add_gadt_equation env source destination + | (Tconstr (path,[],_), _) + when is_instantiable !env path && !generate_equations -> + reify env t2'; + add_gadt_equation env path t2' + | (_, Tconstr (path,[],_)) + when is_instantiable !env path && !generate_equations -> + reify env t1'; + add_gadt_equation env path t1' + | (Tconstr (_,_,_), _) | (_, Tconstr (_,_,_)) when !umode = Pattern -> + reify env t1'; + reify env t2'; + if !generate_equations then mcomp !env t1' t2' + | (Tobject (fi1, nm1), Tobject (fi2, _)) -> + unify_fields env fi1 fi2; + (* Type [t2'] may have been instantiated by [unify_fields] *) + (* XXX One should do some kind of unification... *) + begin match (repr t2').desc with + Tobject (_, {contents = Some (_, va::_)}) when + (match (repr va).desc with + Tvar _|Tunivar _|Tnil -> true | _ -> false) -> () + | Tobject (_, nm2) -> set_name nm2 !nm1 + | _ -> () + end + | (Tvariant row1, Tvariant row2) -> + if !umode = Expression then + unify_row env row1 row2 + else begin + let snap = snapshot () in + try unify_row env row1 row2 + with Unify _ -> + backtrack snap; + reify env t1'; + reify env t2'; + if !generate_equations then mcomp !env t1' t2' + end + | (Tfield(f,kind,_,rem), Tnil) | (Tnil, Tfield(f,kind,_,rem)) -> + begin match field_kind_repr kind with + Fvar r when f <> dummy_method -> + set_kind r Fabsent; + if d2 = Tnil then unify env rem t2' + else unify env (newty2 rem.level Tnil) rem + | _ -> raise (Unify []) + end + | (Tnil, Tnil) -> + () + | (Tpoly (t1, []), Tpoly (t2, [])) -> + unify env t1 t2 + | (Tpoly (t1, tl1), Tpoly (t2, tl2)) -> + enter_poly !env univar_pairs t1 tl1 t2 tl2 (unify env) + | (Tpackage (p1, n1, tl1), Tpackage (p2, n2, tl2)) -> + begin try + unify_package !env (unify_list env) + t1.level p1 n1 tl1 t2.level p2 n2 tl2 + with Not_found -> + if !umode = Expression then raise (Unify []); + List.iter (reify env) (tl1 @ tl2); + (* if !generate_equations then List.iter2 (mcomp !env) tl1 tl2 *) + end + | (_, _) -> + raise (Unify []) + end; + (* XXX Commentaires + changer "create_recursion" + ||| Comments + change "create_recursion" *) + if create_recursion then + match t2.desc with + Tconstr (p, tl, abbrev) -> + forget_abbrev abbrev p; + let t2'' = expand_head_unif !env t2 in + if not (closed_parameterized_type tl t2'') then + link_type (repr t2) (repr t2') + | _ -> + () (* t2 has already been expanded by update_level *) + with Unify trace -> + t1'.desc <- d1; + raise (Unify trace) + end + +and unify_list env tl1 tl2 = + if List.length tl1 <> List.length tl2 then + raise (Unify []); + List.iter2 (unify env) tl1 tl2 + +(* Build a fresh row variable for unification *) +and make_rowvar level use1 rest1 use2 rest2 = + let set_name ty name = + match ty.desc with + Tvar None -> log_type ty; ty.desc <- Tvar name + | _ -> () + in + let name = + match rest1.desc, rest2.desc with + Tvar (Some _ as name1), Tvar (Some _ as name2) -> + if rest1.level <= rest2.level then name1 else name2 + | Tvar (Some _ as name), _ -> + if use2 then set_name rest2 name; name + | _, Tvar (Some _ as name) -> + if use1 then set_name rest2 name; name + | _ -> None + in + if use1 then rest1 else + if use2 then rest2 else newvar2 ?name level + +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 (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; + unify env rest1 (build_fields l2 miss2 va); + List.iter + (fun (n, k1, t1, k2, t2) -> + unify_kind k1 k2; + try + if !trace_gadt_instances then update_level !env va.level t1; + unify env t1 t2 + with Unify trace -> + raise (Unify ((newty (Tfield(n, k1, t1, newty Tnil)), + newty (Tfield(n, k2, t2, newty Tnil)))::trace))) + pairs + with exn -> + log_type rest1; rest1.desc <- d1; + log_type rest2; rest2.desc <- d2; + raise exn + +and unify_kind k1 k2 = + let k1 = field_kind_repr k1 in + let k2 = field_kind_repr k2 in + if k1 == k2 then () else + match k1, k2 with + (Fvar r, (Fvar _ | Fpresent)) -> set_kind r k2 + | (Fpresent, Fvar r) -> set_kind r k1 + | (Fpresent, Fpresent) -> () + | _ -> assert false + +and unify_row env row1 row2 = + let row1 = row_repr row1 and row2 = row_repr row2 in + 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 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 + (fun (l,_) -> + try raise (Tags(l, Hashtbl.find ht (hash_variant l))) + with Not_found -> ()) + r2 + end; + let fixed1 = row_fixed row1 and fixed2 = row_fixed row2 in + let more = + if fixed1 then rm1 else + if fixed2 then rm2 else + 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 = + List.for_all + (fun (_,f1,f2) -> + let f1, f2 = switch f1 f2 in + row_field_repr f1 = Rabsent || row_field_repr f2 <> Rabsent) + pairs + in + let empty fields = + List.for_all (fun (_,f) -> row_field_repr f = Rabsent) fields in + (* Check whether we are going to build an empty type *) + if closed && (empty r1 || row2.row_closed) && (empty r2 || row1.row_closed) + && List.for_all + (fun (_,f1,f2) -> + row_field_repr f1 = Rabsent || row_field_repr f2 = Rabsent) + pairs + then raise (Unify [mkvariant [] true, mkvariant [] true]); + let name = + if row1.row_name <> None && (row1.row_closed || empty r2) && + (not row2.row_closed || keep (fun f1 f2 -> f1, f2) && empty r1) + then row1.row_name + else if row2.row_name <> None && (row2.row_closed || empty r1) && + (not row1.row_closed || keep (fun f1 f2 -> f2, f1) && empty r2) + then row2.row_name + else None + in + let row0 = {row_fields = []; row_more = more; row_bound = (); + row_closed = closed; row_fixed = fixed; row_name = name} in + let set_more row rest = + let rest = + if closed then + filter_row_fields row.row_closed rest + else rest in + if rest <> [] && (row.row_closed || row_fixed row) + || closed && row_fixed row && not row.row_closed then begin + let t1 = mkvariant [] true and t2 = mkvariant rest false in + raise (Unify [if row == row1 then (t1,t2) else (t2,t1)]) + end; + (* The following test is not principal... should rather use Tnil *) + let rm = row_more row in + (*if !trace_gadt_instances && rm.desc = Tnil then () else*) + if !trace_gadt_instances then + update_level !env rm.level (newgenty (Tvariant row)); + if row_fixed row then + if more == rm then () else + if is_Tvar rm then link_type rm more else unify env rm more + else + let ty = newgenty (Tvariant {row0 with row_fields = rest}) in + update_level !env rm.level ty; + link_type rm ty + in + let md1 = rm1.desc and md2 = rm2.desc in + begin try + set_more row2 r1; + set_more row1 r2; + List.iter + (fun (l,f1,f2) -> + try unify_row_field env fixed1 fixed2 more l f1 f2 + with Unify trace -> + raise (Unify ((mkvariant [l,f1] true, + mkvariant [l,f2] true) :: trace))) + pairs; + if static_row row1 then begin + let rm = row_more row1 in + if is_Tvar rm then link_type rm (newty2 rm.level Tnil) + end + with exn -> + log_type rm1; rm1.desc <- md1; log_type rm2; rm2.desc <- md2; raise exn + end + +and unify_row_field env fixed1 fixed2 more l f1 f2 = + let f1 = row_field_repr f1 and f2 = row_field_repr f2 in + if f1 == f2 then () else + match f1, f2 with + Rpresent(Some t1), Rpresent(Some t2) -> unify env t1 t2 + | Rpresent None, Rpresent None -> () + | Reither(c1, tl1, m1, e1), Reither(c2, tl2, m2, e2) -> + if e1 == e2 then () else + if (fixed1 || fixed2) && not (c1 || c2) + && List.length tl1 = List.length tl2 then begin + (* PR#7496 *) + let f = Reither (c1 || c2, [], m1 || m2, ref None) in + set_row_field e1 f; set_row_field e2 f; + List.iter2 (unify env) tl1 tl2 + end + else let redo = + not !passive_variants && + (m1 || m2 || fixed1 || fixed2 || + !rigid_variants && (List.length tl1 = 1 || List.length tl2 = 1)) && + begin match tl1 @ tl2 with [] -> false + | t1 :: tl -> + if c1 || c2 then raise (Unify []); + List.iter (unify env t1) tl; + !e1 <> None || !e2 <> None + end in + if redo then unify_row_field env fixed1 fixed2 more l f1 f2 else + let tl1 = List.map repr tl1 and tl2 = List.map repr tl2 in + let rec remq tl = function [] -> [] + | ty :: tl' -> + if List.memq ty tl then remq tl tl' else ty :: remq tl tl' + in + let tl2' = remq tl2 tl1 and tl1' = remq tl1 tl2 in + (* PR#6744 *) + let split_univars = + List.partition + (fun ty -> try occur_univar !env ty; true with Unify _ -> false) in + let (tl1',tlu1) = split_univars tl1' + and (tl2',tlu2) = split_univars tl2' in + begin match tlu1, tlu2 with + [], [] -> () + | (tu1::tlu1), _ :: _ -> + (* Attempt to merge all the types containing univars *) + if not !passive_variants then + List.iter (unify env tu1) (tlu1@tlu2) + | (tu::_, []) | ([], tu::_) -> occur_univar !env tu + end; + (* Is this handling of levels really principal? *) + List.iter (update_level !env (repr more).level) (tl1' @ tl2'); + let e = ref None in + let f1' = Reither(c1 || c2, tl1', m1 || m2, e) + and f2' = Reither(c1 || c2, tl2', m1 || m2, e) in + set_row_field e1 f1'; set_row_field e2 f2'; + | Reither(_, _, false, e1), Rabsent when not fixed1 -> set_row_field e1 f2 + | Rabsent, Reither(_, _, false, e2) when not fixed2 -> set_row_field e2 f1 + | Rabsent, Rabsent -> () + | Reither(false, tl, _, e1), Rpresent(Some t2) when not fixed1 -> + set_row_field e1 f2; + update_level !env (repr more).level t2; + (try List.iter (fun t1 -> unify env t1 t2) tl + with exn -> e1 := None; raise exn) + | Rpresent(Some t1), Reither(false, tl, _, e2) when not fixed2 -> + set_row_field e2 f1; + update_level !env (repr more).level t1; + (try List.iter (unify env t1) tl + with exn -> e2 := None; raise exn) + | Reither(true, [], _, e1), Rpresent None when not fixed1 -> + set_row_field e1 f2 + | Rpresent None, Reither(true, [], _, e2) when not fixed2 -> + set_row_field e2 f1 + | _ -> raise (Unify []) + + +let unify env ty1 ty2 = + let snap = Btype.snapshot () in + try + unify env ty1 ty2 + with + Unify trace -> + undo_compress snap; + raise (Unify (expand_trace !env trace)) + | Recursive_abbrev -> + undo_compress snap; + raise (Unification_recursive_abbrev (expand_trace !env [(ty1,ty2)])) + +let unify_gadt ~newtype_level:lev (env:Env.t ref) ty1 ty2 = + try + univar_pairs := []; + newtype_level := Some lev; + set_mode_pattern ~generate:true ~injective:true + (fun () -> unify env ty1 ty2); + newtype_level := None; + TypePairs.clear unify_eq_set; + with e -> + newtype_level := None; + TypePairs.clear unify_eq_set; + raise e + +let unify_var env t1 t2 = + let t1 = repr t1 and t2 = repr t2 in + if t1 == t2 then () else + match t1.desc, t2.desc with + Tvar _, Tconstr _ when deep_occur t1 t2 -> + unify (ref env) t1 t2 + | Tvar _, _ -> + let reset_tracing = check_trace_gadt_instances env in + begin try + occur env t1 t2; + update_level env t1.level t2; + link_type t1 t2; + reset_trace_gadt_instances reset_tracing; + with Unify trace -> + reset_trace_gadt_instances reset_tracing; + let expanded_trace = expand_trace env ((t1,t2)::trace) in + raise (Unify expanded_trace) + end + | _ -> + unify (ref env) t1 t2 + +let _ = unify' := unify_var + +let unify_pairs env ty1 ty2 pairs = + univar_pairs := pairs; + unify env ty1 ty2 + +let unify env ty1 ty2 = + unify_pairs (ref env) ty1 ty2 [] + + + +(**** Special cases of unification ****) + +let expand_head_trace env t = + let reset_tracing = check_trace_gadt_instances env in + let t = expand_head_unif env t in + reset_trace_gadt_instances reset_tracing; + t + +(* + Unify [t] and [l:'a -> 'b]. Return ['a] and ['b]. + In label mode, label mismatch is accepted when + (1) the requested label is "" + (2) the original label is not optional +*) + +let filter_arrow env t l = + let t = expand_head_trace env t in + match t.desc with + Tvar _ -> + let lv = t.level in + let t1 = newvar2 lv and t2 = newvar2 lv in + let t' = newty2 lv (Tarrow (l, t1, t2, Cok)) in + link_type t t'; + (t1, t2) + | Tarrow(l', t1, t2, _) + when l = l' -> + (t1, t2) + | _ -> + raise (Unify []) + +(* Used by [filter_method]. *) +let rec filter_method_field env name priv ty = + let ty = expand_head_trace env ty in + match ty.desc with + Tvar _ -> + let level = ty.level in + let ty1 = newvar2 level and ty2 = newvar2 level in + let ty' = newty2 level (Tfield (name, + begin match priv with + Private -> Fvar (ref None) + | Public -> Fpresent + end, + ty1, ty2)) + in + link_type ty ty'; + ty1 + | Tfield(n, kind, ty1, ty2) -> + let kind = field_kind_repr kind in + if (n = name) && (kind <> Fabsent) then begin + if priv = Public then + unify_kind kind Fpresent; + ty1 + end else + filter_method_field env name priv ty2 + | _ -> + raise (Unify []) + +(* Unify [ty] and [< name : 'a; .. >]. Return ['a]. *) +let filter_method env name priv ty = + let ty = expand_head_trace env ty in + match ty.desc with + Tvar _ -> + let ty1 = newvar () in + let ty' = newobj ty1 in + update_level env ty.level ty'; + link_type ty ty'; + filter_method_field env name priv ty1 + | Tobject(f, _) -> + filter_method_field env name priv f + | _ -> + raise (Unify []) + +let check_filter_method env name priv ty = + ignore(filter_method env name priv ty) + +let filter_self_method env lab priv meths ty = + let ty' = filter_method env lab priv ty in + try + Meths.find lab !meths + with Not_found -> + let pair = (Ident.create lab, ty') in + meths := Meths.add lab pair !meths; + pair + + + (***********************************) + (* Matching between type schemes *) + (***********************************) + +(* + Update the level of [ty]. First check that the levels of generic + variables from the subject are not lowered. +*) +let moregen_occur env level ty = + let rec occur ty = + let ty = repr ty in + if ty.level > level then begin + if is_Tvar ty && ty.level >= generic_level - 1 then raise Occur; + ty.level <- pivot_level - ty.level; + match ty.desc with + Tvariant row when static_row row -> + iter_row occur row + | _ -> + iter_type_expr occur ty + end + in + begin try + occur ty; unmark_type ty + with Occur -> + unmark_type ty; raise (Unify []) + end; + (* also check for free univars *) + occur_univar env ty; + update_level env level ty + +let may_instantiate inst_nongen t1 = + if inst_nongen then t1.level <> generic_level - 1 + else t1.level = generic_level + +let rec moregen inst_nongen type_pairs env t1 t2 = + if t1 == t2 then () else + let t1 = repr t1 in + let t2 = repr t2 in + if t1 == t2 then () else + + try + match (t1.desc, t2.desc) with + (Tvar _, _) when may_instantiate inst_nongen t1 -> + moregen_occur env t1.level t2; + occur env t1 t2; + link_type t1 t2 + | (Tconstr (p1, [], _), Tconstr (p2, [], _)) when Path.same p1 p2 -> + () + | _ -> + let t1' = expand_head env t1 in + let t2' = expand_head env t2 in + (* Expansion may have changed the representative of the types... *) + let t1' = repr t1' and t2' = repr t2' in + if t1' == t2' then () else + begin try + TypePairs.find type_pairs (t1', t2') + with Not_found -> + TypePairs.add type_pairs (t1', t2') (); + match (t1'.desc, t2'.desc) with + (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 + -> + moregen inst_nongen type_pairs env t1 t2; + moregen inst_nongen type_pairs env u1 u2 + | (Ttuple tl1, Ttuple tl2) -> + moregen_list inst_nongen type_pairs env tl1 tl2 + | (Tconstr (p1, tl1, _), Tconstr (p2, tl2, _)) + when Path.same p1 p2 -> + moregen_list inst_nongen type_pairs env tl1 tl2 + | (Tpackage (p1, n1, tl1), Tpackage (p2, n2, tl2)) -> + begin try + unify_package env (moregen_list inst_nongen type_pairs env) + t1'.level p1 n1 tl1 t2'.level p2 n2 tl2 + with Not_found -> raise (Unify []) + end + | (Tvariant row1, Tvariant row2) -> + moregen_row inst_nongen type_pairs env row1 row2 + | (Tobject (fi1, _nm1), Tobject (fi2, _nm2)) -> + moregen_fields inst_nongen type_pairs env fi1 fi2 + | (Tfield _, Tfield _) -> (* Actually unused *) + moregen_fields inst_nongen type_pairs env t1' t2' + | (Tnil, Tnil) -> + () + | (Tpoly (t1, []), Tpoly (t2, [])) -> + moregen inst_nongen type_pairs env t1 t2 + | (Tpoly (t1, tl1), Tpoly (t2, tl2)) -> + enter_poly env univar_pairs t1 tl1 t2 tl2 + (moregen inst_nongen type_pairs env) + | (Tunivar _, Tunivar _) -> + unify_univar t1' t2' !univar_pairs + | (_, _) -> + raise (Unify []) + end + with Unify trace -> + raise (Unify ((t1, t2)::trace)) + +and moregen_list inst_nongen type_pairs env tl1 tl2 = + if List.length tl1 <> List.length tl2 then + raise (Unify []); + List.iter2 (moregen inst_nongen type_pairs env) tl1 tl2 + +and moregen_fields inst_nongen type_pairs env ty1 ty2 = + let (fields1, rest1) = flatten_fields ty1 + and (fields2, rest2) = flatten_fields ty2 in + let (pairs, miss1, miss2) = associate_fields fields1 fields2 in + if miss1 <> [] then raise (Unify []); + moregen inst_nongen type_pairs env rest1 + (build_fields (repr ty2).level miss2 rest2); + List.iter + (fun (n, k1, t1, k2, t2) -> + moregen_kind k1 k2; + try moregen inst_nongen type_pairs env t1 t2 with Unify trace -> + raise (Unify ((newty (Tfield(n, k1, t1, rest2)), + newty (Tfield(n, k2, t2, rest2)))::trace))) + pairs + +and moregen_kind k1 k2 = + let k1 = field_kind_repr k1 in + let k2 = field_kind_repr k2 in + if k1 == k2 then () else + match k1, k2 with + (Fvar r, (Fvar _ | Fpresent)) -> set_kind r k2 + | (Fpresent, Fpresent) -> () + | _ -> raise (Unify []) + +and moregen_row inst_nongen type_pairs env row1 row2 = + let row1 = row_repr row1 and row2 = row_repr row2 in + let rm1 = repr row1.row_more and rm2 = repr row2.row_more in + if rm1 == rm2 then () else + let may_inst = + is_Tvar rm1 && may_instantiate inst_nongen rm1 || rm1.desc = Tnil in + let r1, r2, pairs = merge_row_fields row1.row_fields row2.row_fields in + let r1, r2 = + if row2.row_closed then + filter_row_fields may_inst r1, filter_row_fields false r2 + else r1, r2 + in + if r1 <> [] || row1.row_closed && (not row2.row_closed || r2 <> []) + then raise (Unify []); + begin match rm1.desc, rm2.desc with + Tunivar _, Tunivar _ -> + unify_univar rm1 rm2 !univar_pairs + | Tunivar _, _ | _, Tunivar _ -> + raise (Unify []) + | _ when static_row row1 -> () + | _ when may_inst -> + let ext = + newgenty (Tvariant {row2 with row_fields = r2; row_name = None}) + in + moregen_occur env rm1.level ext; + link_type rm1 ext + | Tconstr _, Tconstr _ -> + moregen inst_nongen type_pairs env rm1 rm2 + | _ -> raise (Unify []) + end; + List.iter + (fun (_l,f1,f2) -> + let f1 = row_field_repr f1 and f2 = row_field_repr f2 in + if f1 == f2 then () else + match f1, f2 with + Rpresent(Some t1), Rpresent(Some t2) -> + moregen inst_nongen type_pairs env t1 t2 + | Rpresent None, Rpresent None -> () + | Reither(false, tl1, _, e1), Rpresent(Some t2) when may_inst -> + set_row_field e1 f2; + List.iter (fun t1 -> moregen inst_nongen type_pairs env t1 t2) tl1 + | Reither(c1, tl1, _, e1), Reither(c2, tl2, m2, e2) -> + if e1 != e2 then begin + if c1 && not c2 then raise(Unify []); + set_row_field e1 (Reither (c2, [], m2, e2)); + if List.length tl1 = List.length tl2 then + List.iter2 (moregen inst_nongen type_pairs env) tl1 tl2 + else match tl2 with + t2 :: _ -> + List.iter (fun t1 -> moregen inst_nongen type_pairs env t1 t2) + tl1 + | [] -> + if tl1 <> [] then raise (Unify []) + end + | Reither(true, [], _, e1), Rpresent None when may_inst -> + set_row_field e1 f2 + | Reither(_, _, _, e1), Rabsent when may_inst -> + set_row_field e1 f2 + | Rabsent, Rabsent -> () + | _ -> raise (Unify [])) + pairs + +(* Must empty univar_pairs first *) +let moregen inst_nongen type_pairs env patt subj = + univar_pairs := []; + moregen inst_nongen type_pairs env patt subj + +(* + Non-generic variable can be instantiated only if [inst_nongen] is + true. So, [inst_nongen] should be set to false if the subject might + contain non-generic variables (and we do not want them to be + instantiated). + Usually, the subject is given by the user, and the pattern + is unimportant. So, no need to propagate abbreviations. +*) +let moregeneral env inst_nongen pat_sch subj_sch = + let old_level = !current_level in + current_level := generic_level - 1; + (* + Generic variables are first duplicated with [instance]. So, + their levels are lowered to [generic_level - 1]. The subject is + then copied with [duplicate_type]. That way, its levels won't be + changed. + *) + let subj = duplicate_type (instance env subj_sch) in + current_level := generic_level; + (* Duplicate generic variables *) + let patt = instance env pat_sch in + let res = + try moregen inst_nongen (TypePairs.create 13) env patt subj; true with + Unify _ -> false + in + current_level := old_level; + res + + +(* Alternative approach: "rigidify" a type scheme, + and check validity after unification *) +(* Simpler, no? *) + +let rec rigidify_rec vars ty = + let ty = repr ty in + if ty.level >= lowest_level then begin + ty.level <- pivot_level - ty.level; + match ty.desc with + | Tvar _ -> + if not (List.memq ty !vars) then vars := ty :: !vars + | Tvariant row -> + let row = row_repr row in + let more = repr row.row_more in + if is_Tvar more && not (row_fixed row) then begin + let more' = newty2 more.level more.desc in + let row' = {row with row_fixed=true; row_fields=[]; row_more=more'} + in link_type more (newty2 ty.level (Tvariant row')) + end; + iter_row (rigidify_rec vars) row; + (* only consider the row variable if the variant is not static *) + if not (static_row row) then rigidify_rec vars (row_more row) + | _ -> + iter_type_expr (rigidify_rec vars) ty + end + +let rigidify ty = + let vars = ref [] in + rigidify_rec vars ty; + unmark_type ty; + !vars + +let all_distinct_vars env vars = + let tyl = ref [] in + List.for_all + (fun ty -> + let ty = expand_head env ty in + if List.memq ty !tyl then false else + (tyl := ty :: !tyl; is_Tvar ty)) + vars + +let matches env ty ty' = + let snap = snapshot () in + let vars = rigidify ty in + cleanup_abbrev (); + let ok = + try unify env ty ty'; all_distinct_vars env vars + with Unify _ -> false + in + backtrack snap; + ok + + + (*********************************************) + (* Equivalence between parameterized types *) + (*********************************************) + +let expand_head_rigid env ty = + let old = !rigid_variants in + rigid_variants := true; + let ty' = expand_head env ty in + rigid_variants := old; ty' + +let normalize_subst subst = + if List.exists + (function {desc=Tlink _}, _ | _, {desc=Tlink _} -> true | _ -> false) + !subst + then subst := List.map (fun (t1,t2) -> repr t1, repr t2) !subst + +let rec eqtype rename type_pairs subst env t1 t2 = + if t1 == t2 then () else + let t1 = repr t1 in + let t2 = repr t2 in + if t1 == t2 then () else + + try + match (t1.desc, t2.desc) with + (Tvar _, Tvar _) when rename -> + begin try + normalize_subst subst; + if List.assq t1 !subst != t2 then raise (Unify []) + with Not_found -> + if List.exists (fun (_, t) -> t == t2) !subst then raise (Unify []); + subst := (t1, t2) :: !subst + end + | (Tconstr (p1, [], _), Tconstr (p2, [], _)) when Path.same p1 p2 -> + () + | _ -> + let t1' = expand_head_rigid env t1 in + let t2' = expand_head_rigid env t2 in + (* Expansion may have changed the representative of the types... *) + let t1' = repr t1' and t2' = repr t2' in + if t1' == t2' then () else + begin try + TypePairs.find type_pairs (t1', t2') + with Not_found -> + TypePairs.add type_pairs (t1', t2') (); + match (t1'.desc, t2'.desc) with + (Tvar _, Tvar _) when rename -> + begin try + normalize_subst subst; + if List.assq t1' !subst != t2' then raise (Unify []) + with Not_found -> + if List.exists (fun (_, t) -> t == t2') !subst + then raise (Unify []); + subst := (t1', t2') :: !subst + end + | (Tarrow (l1, t1, u1, _), Tarrow (l2, t2, u2, _)) when l1 = l2 + -> + eqtype rename type_pairs subst env t1 t2; + eqtype rename type_pairs subst env u1 u2; + | (Ttuple tl1, Ttuple tl2) -> + eqtype_list rename type_pairs subst env tl1 tl2 + | (Tconstr (p1, tl1, _), Tconstr (p2, tl2, _)) + when Path.same p1 p2 -> + eqtype_list rename type_pairs subst env tl1 tl2 + | (Tpackage (p1, n1, tl1), Tpackage (p2, n2, tl2)) -> + begin try + unify_package env (eqtype_list rename type_pairs subst env) + t1'.level p1 n1 tl1 t2'.level p2 n2 tl2 + with Not_found -> raise (Unify []) + end + | (Tvariant row1, Tvariant row2) -> + eqtype_row rename type_pairs subst env row1 row2 + | (Tobject (fi1, _nm1), Tobject (fi2, _nm2)) -> + eqtype_fields rename type_pairs subst env fi1 fi2 + | (Tfield _, Tfield _) -> (* Actually unused *) + eqtype_fields rename type_pairs subst env t1' t2' + | (Tnil, Tnil) -> + () + | (Tpoly (t1, []), Tpoly (t2, [])) -> + eqtype rename type_pairs subst env t1 t2 + | (Tpoly (t1, tl1), Tpoly (t2, tl2)) -> + enter_poly env univar_pairs t1 tl1 t2 tl2 + (eqtype rename type_pairs subst env) + | (Tunivar _, Tunivar _) -> + unify_univar t1' t2' !univar_pairs + | (_, _) -> + raise (Unify []) + end + with Unify trace -> + raise (Unify ((t1, t2)::trace)) + +and eqtype_list rename type_pairs subst env tl1 tl2 = + if List.length tl1 <> List.length tl2 then + raise (Unify []); + List.iter2 (eqtype rename type_pairs subst env) tl1 tl2 + +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 *) + let same_row = + rest1 == rest2 || TypePairs.mem type_pairs (rest1,rest2) || + (rename && List.mem (rest1, rest2) !subst) + in + if same_row then () else + (* Try expansion, needed when called from Includecore.type_manifest *) + match expand_head_rigid env rest2 with + {desc=Tobject(ty2,_)} -> eqtype_fields rename type_pairs subst env ty1 ty2 + | _ -> + let (pairs, miss1, miss2) = associate_fields fields1 fields2 in + eqtype rename type_pairs subst env rest1 rest2; + if (miss1 <> []) || (miss2 <> []) then raise (Unify []); + List.iter + (function (n, k1, t1, k2, t2) -> + eqtype_kind k1 k2; + try eqtype rename type_pairs subst env t1 t2 with Unify trace -> + raise (Unify ((newty (Tfield(n, k1, t1, rest2)), + newty (Tfield(n, k2, t2, rest2)))::trace))) + pairs + +and eqtype_kind k1 k2 = + let k1 = field_kind_repr k1 in + let k2 = field_kind_repr k2 in + match k1, k2 with + (Fvar _, Fvar _) + | (Fpresent, Fpresent) -> () + | _ -> raise (Unify []) + +and eqtype_row rename type_pairs subst env row1 row2 = + (* Try expansion, needed when called from Includecore.type_manifest *) + match expand_head_rigid env (row_more row2) with + {desc=Tvariant row2} -> eqtype_row rename type_pairs subst env row1 row2 + | _ -> + let row1 = row_repr row1 and row2 = row_repr row2 in + let r1, r2, pairs = merge_row_fields row1.row_fields row2.row_fields in + if row1.row_closed <> row2.row_closed + || not row1.row_closed && (r1 <> [] || r2 <> []) + || filter_row_fields false (r1 @ r2) <> [] + then raise (Unify []); + if not (static_row row1) then + eqtype rename type_pairs subst env row1.row_more row2.row_more; + List.iter + (fun (_,f1,f2) -> + match row_field_repr f1, row_field_repr f2 with + Rpresent(Some t1), Rpresent(Some t2) -> + eqtype rename type_pairs subst env t1 t2 + | Reither(c1, [], _, _), Reither(c2, [], _, _) when c1 = c2 -> + () + | Reither(c1, t1::tl1, _, _), Reither(c2, t2::tl2, _, _) when c1 = c2 -> + eqtype rename type_pairs subst env t1 t2; + if List.length tl1 = List.length tl2 then + (* if same length allow different types (meaning?) *) + List.iter2 (eqtype rename type_pairs subst env) tl1 tl2 + else begin + (* otherwise everything must be equal *) + List.iter (eqtype rename type_pairs subst env t1) tl2; + List.iter (fun t1 -> eqtype rename type_pairs subst env t1 t2) tl1 + end + | Rpresent None, Rpresent None -> () + | Rabsent, Rabsent -> () + | _ -> raise (Unify [])) + pairs + +(* Must empty univar_pairs first *) +let eqtype_list rename type_pairs subst env tl1 tl2 = + univar_pairs := []; + let snap = Btype.snapshot () in + try eqtype_list rename type_pairs subst env tl1 tl2; backtrack snap + with exn -> backtrack snap; raise exn + +let eqtype rename type_pairs subst env t1 t2 = + eqtype_list rename type_pairs subst env [t1] [t2] + +(* Two modes: with or without renaming of variables *) +let equal env rename tyl1 tyl2 = + try + eqtype_list rename (TypePairs.create 11) (ref []) env tyl1 tyl2; true + with + Unify _ -> false + + + (*************************) + (* Class type matching *) + (*************************) + + +type class_match_failure = + CM_Virtual_class + | CM_Parameter_arity_mismatch of int * int + | CM_Type_parameter_mismatch of Env.t * (type_expr * type_expr) list + | CM_Class_type_mismatch of Env.t * class_type * class_type + | CM_Parameter_mismatch of Env.t * (type_expr * type_expr) list + | CM_Val_type_mismatch of string * Env.t * (type_expr * type_expr) list + | CM_Meth_type_mismatch of string * Env.t * (type_expr * type_expr) list + | CM_Non_mutable_value of string + | CM_Non_concrete_value of string + | CM_Missing_value of string + | CM_Missing_method of string + | CM_Hide_public of string + | CM_Hide_virtual of string * string + | CM_Public_method of string + | CM_Private_method of string + | CM_Virtual_method of string + +exception Failure of class_match_failure list + +let rec moregen_clty trace type_pairs env cty1 cty2 = + try + match cty1, cty2 with + Cty_constr (_, _, cty1), _ -> + 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 -> + begin try moregen true type_pairs env ty1 ty2 with Unify trace -> + raise (Failure [CM_Parameter_mismatch (env, expand_trace env trace)]) + end; + moregen_clty false type_pairs env cty1' cty2' + | Cty_signature sign1, Cty_signature sign2 -> + let ty1 = object_fields (repr sign1.csig_self) in + let ty2 = object_fields (repr sign2.csig_self) in + let (fields1, _rest1) = flatten_fields ty1 + and (fields2, _rest2) = flatten_fields ty2 in + let (pairs, _miss1, _miss2) = associate_fields fields1 fields2 in + List.iter + (fun (lab, _k1, t1, _k2, t2) -> + begin try moregen true type_pairs env t1 t2 with Unify trace -> + raise (Failure [CM_Meth_type_mismatch + (lab, env, expand_trace env trace)]) + end) + pairs; + Vars.iter + (fun lab (_mut, _v, ty) -> + let (_mut', _v', ty') = Vars.find lab sign1.csig_vars in + try moregen true type_pairs env ty' ty with Unify trace -> + raise (Failure [CM_Val_type_mismatch + (lab, env, expand_trace env trace)])) + sign2.csig_vars + | _ -> + raise (Failure []) + with + Failure error when trace || error = [] -> + raise (Failure (CM_Class_type_mismatch (env, cty1, cty2)::error)) + +let match_class_types ?(trace=true) env pat_sch subj_sch = + let type_pairs = TypePairs.create 53 in + let old_level = !current_level in + current_level := generic_level - 1; + (* + Generic variables are first duplicated with [instance]. So, + their levels are lowered to [generic_level - 1]. The subject is + then copied with [duplicate_type]. That way, its levels won't be + changed. + *) + let (_, subj_inst) = instance_class [] subj_sch in + let subj = duplicate_class_type subj_inst in + current_level := generic_level; + (* Duplicate generic variables *) + let (_, patt) = instance_class [] pat_sch in + let res = + let sign1 = signature_of_class_type patt in + let sign2 = signature_of_class_type subj in + let t1 = repr sign1.csig_self in + let t2 = repr sign2.csig_self in + TypePairs.add type_pairs (t1, t2) (); + let (fields1, rest1) = flatten_fields (object_fields t1) + and (fields2, rest2) = flatten_fields (object_fields t2) in + let (pairs, miss1, miss2) = associate_fields fields1 fields2 in + let error = + List.fold_right + (fun (lab, k, _) err -> + let err = + let k = field_kind_repr k in + begin match k with + Fvar r -> set_kind r Fabsent; err + | _ -> CM_Hide_public lab::err + end + in + if Concr.mem lab sign1.csig_concr then err + else CM_Hide_virtual ("method", lab) :: err) + miss1 [] + in + let missing_method = List.map (fun (m, _, _) -> m) miss2 in + let error = + (List.map (fun m -> CM_Missing_method m) missing_method) @ error + in + (* Always succeeds *) + moregen true type_pairs env rest1 rest2; + let error = + List.fold_right + (fun (lab, k1, _t1, k2, _t2) err -> + try moregen_kind k1 k2; err with + Unify _ -> CM_Public_method lab::err) + pairs error + in + let error = + Vars.fold + (fun lab (mut, vr, _ty) err -> + try + let (mut', vr', _ty') = Vars.find lab sign1.csig_vars in + if mut = Mutable && mut' <> Mutable then + CM_Non_mutable_value lab::err + else if vr = Concrete && vr' <> Concrete then + CM_Non_concrete_value lab::err + else + err + with Not_found -> + CM_Missing_value lab::err) + sign2.csig_vars error + in + let error = + Vars.fold + (fun lab (_,vr,_) err -> + if vr = Virtual && not (Vars.mem lab sign2.csig_vars) then + CM_Hide_virtual ("instance variable", lab) :: err + else err) + sign1.csig_vars error + in + let error = + List.fold_right + (fun e l -> + if List.mem e missing_method then l else CM_Virtual_method e::l) + (Concr.elements (Concr.diff sign2.csig_concr sign1.csig_concr)) + error + in + match error with + [] -> + begin try + moregen_clty trace type_pairs env patt subj; + [] + with + Failure r -> r + end + | error -> + CM_Class_type_mismatch (env, patt, subj)::error + in + current_level := old_level; + res + +let rec equal_clty trace type_pairs subst env cty1 cty2 = + try + match cty1, cty2 with + Cty_constr (_, _, cty1), Cty_constr (_, _, cty2) -> + equal_clty true type_pairs subst env cty1 cty2 + | Cty_constr (_, _, cty1), _ -> + 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 -> + begin try eqtype true type_pairs subst env ty1 ty2 with Unify trace -> + raise (Failure [CM_Parameter_mismatch (env, expand_trace env trace)]) + end; + equal_clty false type_pairs subst env cty1' cty2' + | Cty_signature sign1, Cty_signature sign2 -> + let ty1 = object_fields (repr sign1.csig_self) in + let ty2 = object_fields (repr sign2.csig_self) in + let (fields1, _rest1) = flatten_fields ty1 + and (fields2, _rest2) = flatten_fields ty2 in + let (pairs, _miss1, _miss2) = associate_fields fields1 fields2 in + List.iter + (fun (lab, _k1, t1, _k2, t2) -> + begin try eqtype true type_pairs subst env t1 t2 with + Unify trace -> + raise (Failure [CM_Meth_type_mismatch + (lab, env, expand_trace env trace)]) + end) + pairs; + Vars.iter + (fun lab (_, _, ty) -> + let (_, _, ty') = Vars.find lab sign1.csig_vars in + try eqtype true type_pairs subst env ty' ty with Unify trace -> + raise (Failure [CM_Val_type_mismatch + (lab, env, expand_trace env trace)])) + sign2.csig_vars + | _ -> + raise + (Failure (if trace then [] + else [CM_Class_type_mismatch (env, cty1, cty2)])) + with + Failure error when trace -> + raise (Failure (CM_Class_type_mismatch (env, cty1, cty2)::error)) + +let match_class_declarations env patt_params patt_type subj_params subj_type = + let type_pairs = TypePairs.create 53 in + let subst = ref [] in + let sign1 = signature_of_class_type patt_type in + let sign2 = signature_of_class_type subj_type in + let t1 = repr sign1.csig_self in + let t2 = repr sign2.csig_self in + TypePairs.add type_pairs (t1, t2) (); + let (fields1, rest1) = flatten_fields (object_fields t1) + and (fields2, rest2) = flatten_fields (object_fields t2) in + let (pairs, miss1, miss2) = associate_fields fields1 fields2 in + let error = + List.fold_right + (fun (lab, k, _) err -> + let err = + let k = field_kind_repr k in + begin match k with + Fvar _ -> err + | _ -> CM_Hide_public lab::err + end + in + if Concr.mem lab sign1.csig_concr then err + else CM_Hide_virtual ("method", lab) :: err) + miss1 [] + in + let missing_method = List.map (fun (m, _, _) -> m) miss2 in + let error = + (List.map (fun m -> CM_Missing_method m) missing_method) @ error + in + (* Always succeeds *) + eqtype true type_pairs subst env rest1 rest2; + let error = + List.fold_right + (fun (lab, k1, _t1, k2, _t2) err -> + let k1 = field_kind_repr k1 in + let k2 = field_kind_repr k2 in + match k1, k2 with + (Fvar _, Fvar _) + | (Fpresent, Fpresent) -> err + | (Fvar _, Fpresent) -> CM_Private_method lab::err + | (Fpresent, Fvar _) -> CM_Public_method lab::err + | _ -> assert false) + pairs error + in + let error = + Vars.fold + (fun lab (mut, vr, _ty) err -> + try + let (mut', vr', _ty') = Vars.find lab sign1.csig_vars in + if mut = Mutable && mut' <> Mutable then + CM_Non_mutable_value lab::err + else if vr = Concrete && vr' <> Concrete then + CM_Non_concrete_value lab::err + else + err + with Not_found -> + CM_Missing_value lab::err) + sign2.csig_vars error + in + let error = + Vars.fold + (fun lab (_,vr,_) err -> + if vr = Virtual && not (Vars.mem lab sign2.csig_vars) then + CM_Hide_virtual ("instance variable", lab) :: err + else err) + sign1.csig_vars error + in + let error = + List.fold_right + (fun e l -> + if List.mem e missing_method then l else CM_Virtual_method e::l) + (Concr.elements (Concr.diff sign2.csig_concr sign1.csig_concr)) + error + in + match error with + [] -> + begin try + let lp = List.length patt_params in + let ls = List.length subj_params in + if lp <> ls then + raise (Failure [CM_Parameter_arity_mismatch (lp, ls)]); + List.iter2 (fun p s -> + try eqtype true type_pairs subst env p s with Unify trace -> + raise (Failure [CM_Type_parameter_mismatch + (env, expand_trace env trace)])) + patt_params subj_params; + (* old code: equal_clty false type_pairs subst env patt_type subj_type; *) + equal_clty false type_pairs subst env + (Cty_signature sign1) (Cty_signature sign2); + (* Use moregeneral for class parameters, need to recheck everything to + keeps relationships (PR#4824) *) + let clty_params = + List.fold_right (fun ty cty -> Cty_arrow (Labelled "*",ty,cty)) in + match_class_types ~trace:false env + (clty_params patt_params patt_type) + (clty_params subj_params subj_type) + with + Failure r -> r + end + | error -> + error + + + (***************) + (* Subtyping *) + (***************) + + +(**** Build a subtype of a given type. ****) + +(* build_subtype: + [visited] traces traversed object and variant types + [loops] is a mapping from variables to variables, to reproduce + positive loops in a class type + [posi] true if the current variance is positive + [level] number of expansions/enlargement allowed on this branch *) + +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 +let collect l = List.fold_left (fun c1 (_, c2) -> max c1 c2) Unchanged l + +let rec filter_visited = function + [] -> [] + | {desc=Tobject _|Tvariant _} :: _ as l -> l + | _ :: l -> filter_visited l + +let memq_warn t visited = + if List.memq t visited then (warn := true; true) else false + +let rec lid_of_path ?(hash="") = function + Path.Pident id -> + Longident.Lident (hash ^ Ident.name id) + | Path.Pdot (p1, s, _) -> + Longident.Ldot (lid_of_path p1, hash ^ s) + | Path.Papply (p1, p2) -> + Longident.Lapply (lid_of_path ~hash p1, lid_of_path p2) + +let find_cltype_for_path env p = + let cl_path = Env.lookup_type (lid_of_path ~hash:"#" p) env in + let cl_abbr = Env.find_type cl_path env in + + match cl_abbr.type_manifest with + Some ty -> + begin match (repr ty).desc with + Tobject(_,{contents=Some(p',_)}) when Path.same p p' -> cl_abbr, ty + | _ -> raise Not_found + end + | None -> assert false + +let has_constr_row' env t = + has_constr_row (expand_abbrev env t) + +let rec build_subtype env visited loops posi level t = + let t = repr t in + match t.desc with + Tvar _ -> + if posi then + try + let t' = List.assq t loops in + warn := true; + (t', Equiv) + with Not_found -> + (t, Unchanged) + else + (t, Unchanged) + | Tarrow(l, t1, t2, _) -> + if memq_warn t visited then (t, Unchanged) else + let visited = t :: visited in + let (t1', c1) = build_subtype env visited loops (not posi) level t1 in + let (t2', c2) = build_subtype env visited loops posi level t2 in + let c = max c1 c2 in + if c > Unchanged then (newty (Tarrow(l, t1', t2', Cok)), c) + else (t, Unchanged) + | Ttuple tlist -> + if memq_warn t visited then (t, Unchanged) else + let visited = t :: visited in + let tlist' = + List.map (build_subtype env visited loops posi level) tlist + in + let c = collect tlist' in + if c > Unchanged then (newty (Ttuple (List.map fst tlist')), c) + else (t, Unchanged) + | Tconstr(p, tl, abbrev) + when level > 0 && generic_abbrev env p && safe_abbrev env t + && not (has_constr_row' env t) -> + let t' = repr (expand_abbrev env t) in + let level' = pred_expand level in + begin try match t'.desc with + Tobject _ when posi && not (opened_object t') -> + let cl_abbr, body = find_cltype_for_path env p in + let ty = + subst env !current_level Public abbrev None + cl_abbr.type_params tl body in + let ty = repr ty in + let ty1, tl1 = + match ty.desc with + Tobject(ty1,{contents=Some(p',tl1)}) when Path.same p p' -> + ty1, tl1 + | _ -> raise Not_found + in + (* Fix PR#4505: do not set ty to Tvar when it appears in tl1, + as this occurrence might break the occur check. + XXX not clear whether this correct anyway... *) + if List.exists (deep_occur ty) tl1 then raise Not_found; + ty.desc <- Tvar None; + let t'' = newvar () in + let loops = (ty, t'') :: loops in + (* May discard [visited] as level is going down *) + let (ty1', c) = + build_subtype env [t'] loops posi (pred_enlarge level') ty1 in + assert (is_Tvar t''); + let nm = + if c > Equiv || deep_occur ty ty1' then None else Some(p,tl1) in + t''.desc <- Tobject (ty1', ref nm); + (try unify_var env ty t with Unify _ -> assert false); + (t'', Changed) + | _ -> raise Not_found + with Not_found -> + let (t'',c) = build_subtype env visited loops posi level' t' in + if c > Unchanged then (t'',c) + else (t, Unchanged) + end + | Tconstr(p, tl, _abbrev) -> + (* Must check recursion on constructors, since we do not always + expand them *) + if memq_warn t visited then (t, Unchanged) else + let visited = t :: visited in + begin try + let decl = Env.find_type p env in + if level = 0 && generic_abbrev env p && safe_abbrev env t + && not (has_constr_row' env t) + then warn := true; + let tl' = + List.map2 + (fun v t -> + let (co,cn) = Variance.get_upper v in + if cn then + if co then (t, Unchanged) + else build_subtype env visited loops (not posi) level t + else + if co then build_subtype env visited loops posi level t + else (newvar(), Changed)) + decl.type_variance tl + in + let c = collect tl' in + if c > Unchanged then (newconstr p (List.map fst tl'), c) + else (t, Unchanged) + with Not_found -> + (t, Unchanged) + end + | Tvariant row -> + let row = row_repr row in + if memq_warn t visited || not (static_row row) then (t, Unchanged) else + let level' = pred_enlarge level in + let visited = + t :: if level' < level then [] else filter_visited visited in + let fields = filter_row_fields false row.row_fields in + let fields = + List.map + (fun (l,f as orig) -> match row_field_repr f with + Rpresent None -> + if posi then + (l, Reither(true, [], false, ref None)), Unchanged + else + orig, Unchanged + | Rpresent(Some t) -> + let (t', c) = build_subtype env visited loops posi level' t in + let f = + if posi && level > 0 + then Reither(false, [t'], false, ref None) + else Rpresent(Some t') + in (l, f), c + | _ -> assert false) + fields + in + let c = collect fields in + let row = + { row_fields = List.map fst fields; row_more = newvar(); + row_bound = (); row_closed = posi; row_fixed = false; + row_name = if c > Unchanged then None else row.row_name } + in + (newty (Tvariant row), Changed) + | Tobject (t1, _) -> + if memq_warn t visited || opened_object t1 then (t, Unchanged) else + let level' = pred_enlarge level in + let visited = + t :: if level' < level then [] else filter_visited visited in + let (t1', c) = build_subtype env visited loops posi level' t1 in + if c > Unchanged then (newty (Tobject (t1', ref None)), c) + else (t, Unchanged) + | Tfield(s, _, t1, t2) (* Always present *) -> + let (t1', c1) = build_subtype env visited loops posi level t1 in + let (t2', c2) = build_subtype env visited loops posi level t2 in + let c = max c1 c2 in + if c > Unchanged then (newty (Tfield(s, Fpresent, t1', t2')), c) + else (t, Unchanged) + | Tnil -> + if posi then + let v = newvar () in + (v, Changed) + else begin + warn := true; + (t, Unchanged) + end + | Tsubst _ | Tlink _ -> + assert false + | Tpoly(t1, tl) -> + let (t1', c) = build_subtype env visited loops posi level t1 in + if c > Unchanged then (newty (Tpoly(t1', tl)), c) + else (t, Unchanged) + | Tunivar _ | Tpackage _ -> + (t, Unchanged) + +let enlarge_type env ty = + warn := false; + (* [level = 4] allows 2 expansions involving objects/variants *) + let (ty', _) = build_subtype env [] [] true 4 ty in + (ty', !warn) + +(**** Check whether a type is a subtype of another type. ****) + +(* + During the traversal, a trace of visited types is maintained. It + is printed in case of error. + Constraints (pairs of types that must be equals) are accumulated + rather than being enforced straight. Indeed, the result would + otherwise depend on the order in which these constraints are + enforced. + A function enforcing these constraints is returned. That way, type + variables can be bound to their actual values before this function + is called (see Typecore). + Only well-defined abbreviations are expanded (hence the tests + [generic_abbrev ...]). +*) + +let subtypes = TypePairs.create 17 + +let subtype_error env trace = + raise (Subtype (expand_trace env (List.rev trace), [])) + +let rec subtype_rec env trace t1 t2 cstrs = + let t1 = repr t1 in + let t2 = repr t2 in + if t1 == t2 then cstrs else + + begin try + TypePairs.find subtypes (t1, t2); + cstrs + with Not_found -> + TypePairs.add subtypes (t1, t2) (); + 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 + -> + 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) -> + subtype_list env trace tl1 tl2 cstrs + | (Tconstr(p1, [], _), Tconstr(p2, [], _)) when Path.same p1 p2 -> + cstrs + | (Tconstr(p1, _tl1, _abbrev1), _) + when generic_abbrev env p1 && safe_abbrev env t1 -> + subtype_rec env trace (expand_abbrev env t1) t2 cstrs + | (_, Tconstr(p2, _tl2, _abbrev2)) + when generic_abbrev env p2 && safe_abbrev env t2 -> + subtype_rec env trace t1 (expand_abbrev env t2) cstrs + | (Tconstr(p1, tl1, _), Tconstr(p2, tl2, _)) when Path.same p1 p2 -> + begin try + let decl = Env.find_type p1 env in + List.fold_left2 + (fun cstrs v (t1, t2) -> + let (co, cn) = Variance.get_upper v in + if co then + if cn then + (trace, newty2 t1.level (Ttuple[t1]), + newty2 t2.level (Ttuple[t2]), !univar_pairs) :: cstrs + else subtype_rec env ((t1, t2)::trace) t1 t2 cstrs + else + if cn then subtype_rec env ((t2, t1)::trace) t2 t1 cstrs + else cstrs) + cstrs decl.type_variance (List.combine tl1 tl2) + with Not_found -> + (trace, t1, t2, !univar_pairs)::cstrs + end + | (Tconstr(p1, _, _), _) when generic_private_abbrev env p1 -> + subtype_rec env trace (expand_abbrev_opt env t1) t2 cstrs +(* | (_, Tconstr(p2, _, _)) when generic_private_abbrev false env p2 -> + subtype_rec env trace t1 (expand_abbrev_opt env t2) cstrs *) + | (Tobject (f1, _), Tobject (f2, _)) + when is_Tvar (object_row f1) && is_Tvar (object_row f2) -> + (* Same row variable implies same object. *) + (trace, t1, t2, !univar_pairs)::cstrs + | (Tobject (f1, _), Tobject (f2, _)) -> + subtype_fields env trace f1 f2 cstrs + | (Tvariant row1, Tvariant row2) -> + begin try + subtype_row env trace row1 row2 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, [])) -> + let _, u1' = instance_poly false tl1 u1 in + subtype_rec env trace u1' u2 cstrs + | (Tpoly (u1, tl1), Tpoly (u2,tl2)) -> + begin try + enter_poly env univar_pairs u1 tl1 u2 tl2 + (fun t1 t2 -> subtype_rec env trace t1 t2 cstrs) + with Unify _ -> + (trace, t1, t2, !univar_pairs)::cstrs + end + | (Tpackage (p1, nl1, tl1), Tpackage (p2, nl2, tl2)) -> + begin try + let ntl1 = complete_type_list env nl2 t1.level (Mty_ident p1) nl1 tl1 + and ntl2 = complete_type_list env nl1 t2.level (Mty_ident p2) nl2 tl2 + ~allow_absent:true in + let cstrs' = + List.map + (fun (n2,t2) -> (trace, List.assoc n2 ntl1, t2, !univar_pairs)) + ntl2 + in + if eq_package_path env p1 p2 then cstrs' @ cstrs + else begin + (* need to check module subtyping *) + let snap = Btype.snapshot () in + try + List.iter (fun (_, t1, t2, _) -> unify env t1 t2) cstrs'; + if !package_subtype env p1 nl1 tl1 p2 nl2 tl2 + then (Btype.backtrack snap; cstrs' @ cstrs) + else raise (Unify []) + with Unify _ -> + Btype.backtrack snap; raise Not_found + end + with Not_found -> + (trace, t1, t2, !univar_pairs)::cstrs + end + | (_, _) -> + (trace, t1, t2, !univar_pairs)::cstrs + end + +and subtype_list env trace tl1 tl2 cstrs = + if List.length tl1 <> List.length tl2 then + subtype_error env trace; + List.fold_left2 + (fun cstrs t1 t2 -> subtype_rec env ((t1, t2)::trace) t1 t2 cstrs) + cstrs tl1 tl2 + +and subtype_fields env trace ty1 ty2 cstrs = + (* Assume that either rest1 or rest2 is not Tvar *) + let (fields1, rest1) = flatten_fields ty1 in + let (fields2, rest2) = flatten_fields ty2 in + let (pairs, miss1, miss2) = associate_fields fields1 fields2 in + let cstrs = + if rest2.desc = Tnil then cstrs else + if miss1 = [] then + subtype_rec env ((rest1, rest2)::trace) rest1 rest2 cstrs + else + (trace, build_fields (repr ty1).level miss1 rest1, rest2, + !univar_pairs) :: cstrs + in + let cstrs = + if miss2 = [] then cstrs else + (trace, rest1, build_fields (repr ty2).level miss2 (newvar ()), + !univar_pairs) :: cstrs + in + List.fold_left + (fun cstrs (_, _k1, t1, _k2, t2) -> + (* These fields are always present *) + subtype_rec env ((t1, t2)::trace) t1 t2 cstrs) + cstrs pairs + +and subtype_row env trace row1 row2 cstrs = + let row1 = row_repr row1 and row2 = row_repr row2 in + let r1, r2, pairs = + merge_row_fields row1.row_fields row2.row_fields in + let more1 = repr row1.row_more + and more2 = repr row2.row_more in + match more1.desc, more2.desc with + Tconstr(p1,_,_), Tconstr(p2,_,_) when Path.same p1 p2 -> + subtype_rec env ((more1,more2)::trace) more1 more2 cstrs + | (Tvar _|Tconstr _|Tnil), (Tvar _|Tconstr _|Tnil) + when row1.row_closed && r1 = [] -> + List.fold_left + (fun cstrs (_,f1,f2) -> + match row_field_repr f1, row_field_repr f2 with + (Rpresent None|Reither(true,_,_,_)), Rpresent None -> + cstrs + | Rpresent(Some t1), Rpresent(Some t2) -> + subtype_rec env ((t1, t2)::trace) t1 t2 cstrs + | Reither(false, t1::_, _, _), Rpresent(Some t2) -> + subtype_rec env ((t1, t2)::trace) t1 t2 cstrs + | Rabsent, _ -> cstrs + | _ -> raise Exit) + cstrs pairs + | Tunivar _, Tunivar _ + when row1.row_closed = row2.row_closed && r1 = [] && r2 = [] -> + let cstrs = + subtype_rec env ((more1,more2)::trace) more1 more2 cstrs in + List.fold_left + (fun cstrs (_,f1,f2) -> + match row_field_repr f1, row_field_repr f2 with + Rpresent None, Rpresent None + | Reither(true,[],_,_), Reither(true,[],_,_) + | Rabsent, Rabsent -> + cstrs + | Rpresent(Some t1), Rpresent(Some t2) + | Reither(false,[t1],_,_), Reither(false,[t2],_,_) -> + subtype_rec env ((t1, t2)::trace) t1 t2 cstrs + | _ -> raise Exit) + cstrs pairs + | _ -> + raise Exit + +let subtype env ty1 ty2 = + TypePairs.clear subtypes; + univar_pairs := []; + (* Build constraint set. *) + let cstrs = subtype_rec env [(ty1, ty2)] ty1 ty2 [] in + TypePairs.clear subtypes; + (* Enforce constraints. *) + function () -> + List.iter + (function (trace0, t1, t2, pairs) -> + try unify_pairs (ref env) t1 t2 pairs with Unify trace -> + raise (Subtype (expand_trace env (List.rev trace0), + List.tl (List.tl trace)))) + (List.rev cstrs) + + (*******************) + (* Miscellaneous *) + (*******************) + +(* Utility for printing. The resulting type is not used in computation. *) +let rec unalias_object ty = + let ty = repr ty in + match ty.desc with + Tfield (s, k, t1, t2) -> + newty2 ty.level (Tfield (s, k, t1, unalias_object t2)) + | Tvar _ | Tnil -> + newty2 ty.level ty.desc + | Tunivar _ -> + ty + | Tconstr _ -> + newvar2 ty.level + | _ -> + assert false + +let unalias ty = + let ty = repr ty in + match ty.desc with + Tvar _ | Tunivar _ -> + ty + | Tvariant row -> + let row = row_repr row in + let more = row.row_more in + newty2 ty.level + (Tvariant {row with row_more = newty2 more.level more.desc}) + | Tobject (ty, nm) -> + newty2 ty.level (Tobject (unalias_object ty, nm)) + | _ -> + newty2 ty.level ty.desc + +(* Return the arity (as for curried functions) of the given type. *) +let rec arity ty = + match (repr ty).desc with + Tarrow(_, _t1, t2, _) -> 1 + arity t2 + | _ -> 0 + +(* Check whether an abbreviation expands to itself. *) +let cyclic_abbrev env id ty = + let rec check_cycle seen ty = + let ty = repr ty in + match ty.desc with + Tconstr (p, _tl, _abbrev) -> + p = Path.Pident id || List.memq ty seen || + begin try + check_cycle (ty :: seen) (expand_abbrev_opt env ty) + with + Cannot_expand -> false + | Unify _ -> true + end + | _ -> + false + in check_cycle [] ty + +(* Check for non-generalizable type variables *) +exception Non_closed0 +let visited = ref TypeSet.empty + +let rec closed_schema_rec env ty = + let ty = repr ty in + if TypeSet.mem ty !visited then () else begin + visited := TypeSet.add ty !visited; + match ty.desc with + Tvar _ when ty.level <> generic_level -> + raise Non_closed0 + | Tconstr _ -> + let old = !visited in + begin try iter_type_expr (closed_schema_rec env) ty + with Non_closed0 -> try + visited := old; + closed_schema_rec env (try_expand_head try_expand_safe env ty) + with Cannot_expand -> + raise Non_closed0 + end + | Tfield(_, kind, t1, t2) -> + if field_kind_repr kind = Fpresent then + closed_schema_rec env t1; + closed_schema_rec env t2 + | Tvariant row -> + let row = row_repr row in + iter_row (closed_schema_rec env) row; + if not (static_row row) then closed_schema_rec env row.row_more + | _ -> + iter_type_expr (closed_schema_rec env) ty + end + +(* Return whether all variables of type [ty] are generic. *) +let closed_schema env ty = + visited := TypeSet.empty; + try + closed_schema_rec env ty; + visited := TypeSet.empty; + true + with Non_closed0 -> + visited := TypeSet.empty; + false + +(* Normalize a type before printing, saving... *) +(* Cannot use mark_type because deep_occur uses it too *) +let rec normalize_type_rec env visited ty = + let ty = repr ty in + if not (TypeSet.mem ty !visited) then begin + visited := TypeSet.add ty !visited; + let tm = row_of_type ty in + begin if not (is_Tconstr ty) && is_constr_row ~allow_ident:false tm then + match tm.desc with (* PR#7348 *) + Tconstr (Path.Pdot(m,i,pos), tl, _abbrev) -> + let i' = String.sub i 0 (String.length i - 4) in + log_type ty; + ty.desc <- Tconstr(Path.Pdot(m,i',pos), tl, ref Mnil) + | _ -> assert false + else match ty.desc with + | Tvariant row -> + let row = row_repr row in + let fields = List.map + (fun (l,f0) -> + let f = row_field_repr f0 in l, + match f with Reither(b, ty::(_::_ as tyl), m, e) -> + let tyl' = + List.fold_left + (fun tyl ty -> + if List.exists (fun ty' -> equal env false [ty] [ty']) tyl + then tyl else ty::tyl) + [ty] tyl + in + if f != f0 || List.length tyl' < List.length tyl then + Reither(b, List.rev tyl', m, e) + else f + | _ -> f) + row.row_fields in + let fields = + List.sort (fun (p,_) (q,_) -> compare p q) + (List.filter (fun (_,fi) -> fi <> Rabsent) fields) in + log_type ty; + ty.desc <- Tvariant {row with row_fields = fields} + | Tobject (fi, nm) -> + begin match !nm with + | None -> () + | Some (n, v :: l) -> + if deep_occur ty (newgenty (Ttuple l)) then + (* The abbreviation may be hiding something, so remove it *) + set_name nm None + else let v' = repr v in + begin match v'.desc with + | Tvar _ | Tunivar _ -> + if v' != v then set_name nm (Some (n, v' :: l)) + | Tnil -> + log_type ty; ty.desc <- Tconstr (n, l, ref Mnil) + | _ -> set_name nm None + end + | _ -> + fatal_error "Ctype.normalize_type_rec" + end; + let fi = repr fi in + if fi.level < lowest_level then () else + let fields, row = flatten_fields fi in + let fi' = build_fields fi.level fields row in + log_type ty; fi.desc <- fi'.desc + | _ -> () + end; + iter_type_expr (normalize_type_rec env visited) ty + end + +let normalize_type env ty = + normalize_type_rec env (ref TypeSet.empty) ty + + + (*************************) + (* Remove dependencies *) + (*************************) + + +(* + Variables are left unchanged. Other type nodes are duplicated, with + levels set to generic level. + We cannot use Tsubst here, because unification may be called by + expand_abbrev. +*) + +let nondep_hash = TypeHash.create 47 +let nondep_variants = TypeHash.create 17 +let clear_hash () = + TypeHash.clear nondep_hash; TypeHash.clear nondep_variants + +let rec nondep_type_rec env id ty = + match ty.desc with + Tvar _ | Tunivar _ -> ty + | Tlink ty -> nondep_type_rec env id ty + | _ -> try TypeHash.find nondep_hash ty + with Not_found -> + let ty' = newgenvar () in (* Stub *) + TypeHash.add nondep_hash ty ty'; + ty'.desc <- + begin match ty.desc with + | Tconstr(p, tl, _abbrev) -> + if Path.isfree id p then + begin try + Tlink (nondep_type_rec env id + (expand_abbrev env (newty2 ty.level ty.desc))) + (* + The [Tlink] is important. The expanded type may be a + variable, or may not be completely copied yet + (recursive type), so one cannot just take its + description. + *) + with Cannot_expand | Unify _ -> + raise Not_found + end + else + Tconstr(p, List.map (nondep_type_rec env id) tl, ref Mnil) + | Tpackage(p, nl, tl) when Path.isfree id p -> + let p' = normalize_package_path env p in + if Path.isfree id p' then raise Not_found; + Tpackage (p', nl, List.map (nondep_type_rec env id) tl) + | Tobject (t1, name) -> + Tobject (nondep_type_rec env id t1, + ref (match !name with + None -> None + | Some (p, tl) -> + if Path.isfree id p then None + else Some (p, List.map (nondep_type_rec env id) tl))) + | Tvariant row -> + let row = row_repr row in + let more = repr row.row_more in + (* We must keep sharing according to the row variable *) + begin try + let ty2 = TypeHash.find nondep_variants more in + (* This variant type has been already copied *) + TypeHash.add nondep_hash ty ty2; + Tlink ty2 + with Not_found -> + (* Register new type first for recursion *) + TypeHash.add nondep_variants more ty'; + let static = static_row row in + let more' = if static then newgenty Tnil else more in + (* Return a new copy *) + let row = + copy_row (nondep_type_rec env id) true row true more' in + match row.row_name with + Some (p, _tl) when Path.isfree id p -> + Tvariant {row with row_name = None} + | _ -> Tvariant row + end + | _ -> copy_type_desc (nondep_type_rec env id) ty.desc + end; + ty' + +let nondep_type env id ty = + try + let ty' = nondep_type_rec env id ty in + clear_hash (); + ty' + with Not_found -> + clear_hash (); + raise Not_found + +let () = nondep_type' := nondep_type + +let unroll_abbrev id tl ty = + let ty = repr ty and path = Path.Pident id in + if is_Tvar ty || (List.exists (deep_occur ty) tl) + || is_object_type path then + ty + else + let ty' = newty2 ty.level ty.desc in + link_type ty (newty2 ty.level (Tconstr (path, tl, ref Mnil))); + ty' + +(* Preserve sharing inside type declarations. *) +let nondep_type_decl env mid id is_covariant decl = + try + let params = List.map (nondep_type_rec env mid) decl.type_params in + let tk = + try map_kind (nondep_type_rec env mid) decl.type_kind + with Not_found when is_covariant -> Type_abstract + and tm = + try match decl.type_manifest with + None -> None + | Some ty -> + Some (unroll_abbrev id params (nondep_type_rec env mid ty)) + with Not_found when is_covariant -> + None + in + clear_hash (); + let priv = + match tm with + | Some ty when Btype.has_constr_row ty -> Private + | _ -> decl.type_private + in + { type_params = params; + type_arity = decl.type_arity; + type_kind = tk; + type_manifest = tm; + type_private = priv; + type_variance = decl.type_variance; + type_newtype_level = None; + type_loc = decl.type_loc; + type_attributes = decl.type_attributes; + type_immediate = decl.type_immediate; + type_unboxed = decl.type_unboxed; + } + with Not_found -> + clear_hash (); + raise Not_found + +(* Preserve sharing inside extension constructors. *) +let nondep_extension_constructor env mid ext = + try + let type_path, type_params = + if Path.isfree mid ext.ext_type_path then + begin + let ty = + newgenty (Tconstr(ext.ext_type_path, ext.ext_type_params, ref Mnil)) + in + let ty' = nondep_type_rec env mid ty in + match (repr ty').desc with + Tconstr(p, tl, _) -> p, tl + | _ -> raise Not_found + end + else + let type_params = + List.map (nondep_type_rec env mid) ext.ext_type_params + in + ext.ext_type_path, type_params + in + let args = map_type_expr_cstr_args (nondep_type_rec env mid) ext.ext_args in + let ret_type = may_map (nondep_type_rec env mid) ext.ext_ret_type in + clear_hash (); + { ext_type_path = type_path; + ext_type_params = type_params; + ext_args = args; + ext_ret_type = ret_type; + ext_private = ext.ext_private; + ext_attributes = ext.ext_attributes; + ext_loc = ext.ext_loc; + } + with Not_found -> + clear_hash (); + raise Not_found + + +(* Preserve sharing inside class types. *) +let nondep_class_signature env id sign = + { csig_self = nondep_type_rec env id sign.csig_self; + csig_vars = + Vars.map (function (m, v, t) -> (m, v, nondep_type_rec env id t)) + sign.csig_vars; + csig_concr = sign.csig_concr; + csig_inher = + List.map (fun (p,tl) -> (p, List.map (nondep_type_rec env id) tl)) + sign.csig_inher } + +let rec nondep_class_type env id = + function + Cty_constr (p, _, cty) when Path.isfree id p -> + nondep_class_type env id cty + | Cty_constr (p, tyl, cty) -> + Cty_constr (p, List.map (nondep_type_rec env id) tyl, + nondep_class_type env id cty) + | Cty_signature sign -> + Cty_signature (nondep_class_signature env id sign) + | Cty_arrow (l, ty, cty) -> + Cty_arrow (l, nondep_type_rec env id ty, nondep_class_type env id cty) + +let nondep_class_declaration env id decl = + assert (not (Path.isfree id decl.cty_path)); + let decl = + { cty_params = List.map (nondep_type_rec env id) decl.cty_params; + cty_variance = decl.cty_variance; + cty_type = nondep_class_type env id decl.cty_type; + cty_path = decl.cty_path; + cty_new = + begin match decl.cty_new with + None -> None + | Some ty -> Some (nondep_type_rec env id ty) + end; + cty_loc = decl.cty_loc; + cty_attributes = decl.cty_attributes; + } + in + clear_hash (); + decl + +let nondep_cltype_declaration env id decl = + assert (not (Path.isfree id decl.clty_path)); + let decl = + { clty_params = List.map (nondep_type_rec env id) decl.clty_params; + clty_variance = decl.clty_variance; + clty_type = nondep_class_type env id decl.clty_type; + clty_path = decl.clty_path; + clty_loc = decl.clty_loc; + clty_attributes = decl.clty_attributes; + } + in + clear_hash (); + decl + +(* collapse conjunctive types in class parameters *) +let rec collapse_conj env visited ty = + let ty = repr ty in + if List.memq ty visited then () else + let visited = ty :: visited in + match ty.desc with + Tvariant row -> + let row = row_repr row in + List.iter + (fun (_l,fi) -> + match row_field_repr fi with + Reither (c, t1::(_::_ as tl), m, e) -> + List.iter (unify env t1) tl; + set_row_field e (Reither (c, [t1], m, ref None)) + | _ -> + ()) + row.row_fields; + iter_row (collapse_conj env visited) row + | _ -> + iter_type_expr (collapse_conj env visited) ty + +let collapse_conj_params env params = + List.iter (collapse_conj env []) params + +let same_constr env t1 t2 = + let t1 = expand_head env t1 in + let t2 = expand_head env t2 in + match t1.desc, t2.desc with + | Tconstr (p1, _, _), Tconstr (p2, _, _) -> Path.same p1 p2 + | _ -> false + +let () = + Env.same_constr := same_constr + +let maybe_pointer_type env typ = + match (repr typ).desc with + | Tconstr(p, _args, _abbrev) -> + begin try + let type_decl = Env.find_type p env in + not type_decl.type_immediate + with Not_found -> true + (* This can happen due to e.g. missing -I options, + causing some .cmi files to be unavailable. + Maybe we should emit a warning. *) + end + | Tvariant row -> + let row = Btype.row_repr row in + (* if all labels are devoid of arguments, not a pointer *) + not row.row_closed + || List.exists + (function + | _, (Rpresent (Some _) | Reither (false, _, _, _)) -> true + | _ -> false) + row.row_fields + | _ -> true diff --git a/analysis/src/vendor/compiler-libs-406/ctype.mli b/analysis/src/vendor/compiler-libs-406/ctype.mli new file mode 100644 index 000000000..456659f4d --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ctype.mli @@ -0,0 +1,295 @@ +(**************************************************************************) +(* *) +(* 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 core types *) + +open Asttypes +open Types + +exception Unify of (type_expr * type_expr) list +exception Tags of label * label +exception Subtype of + (type_expr * type_expr) list * (type_expr * type_expr) list +exception Cannot_expand +exception Cannot_apply +exception Recursive_abbrev +exception Unification_recursive_abbrev of (type_expr * type_expr) list + +val init_def: int -> unit + (* Set the initial variable level *) +val begin_def: unit -> unit + (* Raise the variable level by one at the beginning of a definition. *) +val end_def: unit -> unit + (* Lower the variable level by one at the end of a definition *) +val begin_class_def: unit -> unit +val raise_nongen_level: unit -> unit +val reset_global_level: unit -> unit + (* Reset the global level before typing an expression *) +val increase_global_level: unit -> int +val restore_global_level: int -> unit + (* This pair of functions is only used in Typetexp *) +type levels = + { current_level: int; nongen_level: int; global_level: int; + saved_level: (int * int) list; } +val save_levels: unit -> levels +val set_levels: levels -> unit + +val newty: type_desc -> type_expr +val newvar: ?name:string -> unit -> type_expr +val newvar2: ?name:string -> int -> type_expr + (* Return a fresh variable *) +val new_global_var: ?name:string -> unit -> type_expr + (* Return a fresh variable, bound at toplevel + (as type variables ['a] in type constraints). *) +val newobj: type_expr -> type_expr +val newconstr: Path.t -> type_expr list -> type_expr +val none: type_expr + (* A dummy type expression *) + +val repr: type_expr -> type_expr + (* Return the canonical representative of a type. *) + +val object_fields: type_expr -> type_expr +val flatten_fields: + type_expr -> (string * field_kind * type_expr) list * type_expr + (* Transform a field type into a list of pairs label-type *) + (* The fields are sorted *) +val associate_fields: + (string * field_kind * type_expr) list -> + (string * field_kind * type_expr) list -> + (string * field_kind * type_expr * field_kind * type_expr) list * + (string * field_kind * type_expr) list * + (string * field_kind * type_expr) list +val opened_object: type_expr -> bool +val close_object: type_expr -> unit +val row_variable: type_expr -> type_expr + (* Return the row variable of an open object type *) +val set_object_name: + Ident.t -> type_expr -> type_expr list -> type_expr -> unit +val remove_object_name: type_expr -> unit +val hide_private_methods: type_expr -> unit +val find_cltype_for_path: Env.t -> Path.t -> type_declaration * type_expr +val lid_of_path: ?hash:string -> Path.t -> Longident.t + +val sort_row_fields: (label * row_field) list -> (label * row_field) list +val merge_row_fields: + (label * row_field) list -> (label * row_field) list -> + (label * row_field) list * (label * row_field) list * + (label * row_field * row_field) list +val filter_row_fields: + bool -> (label * row_field) list -> (label * row_field) list + +val generalize: type_expr -> unit + (* Generalize in-place the given type *) +val generalize_expansive: Env.t -> type_expr -> unit + (* Generalize the covariant part of a type, making + contravariant branches non-generalizable *) +val generalize_global: type_expr -> unit + (* Generalize the structure of a type, lowering variables + 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 + (* Only generalize some part of the type + Make the remaining of the type non-generalizable *) + +val instance: ?partial:bool -> Env.t -> type_expr -> type_expr + (* Take an instance of a type scheme *) + (* partial=None -> normal + partial=false -> newvar() for non generic subterms + partial=true -> newty2 ty.level Tvar for non generic subterms *) +val instance_def: type_expr -> type_expr + (* use defaults *) +val generic_instance: Env.t -> type_expr -> type_expr + (* Same as instance, but new nodes at generic_level *) +val instance_list: Env.t -> type_expr list -> type_expr list + (* Take an instance of a list of type schemes *) +val instance_constructor: + ?in_pattern:Env.t ref * int -> + constructor_description -> type_expr list * type_expr + (* Same, for a constructor *) +val instance_parameterized_type: + ?keep_names:bool -> + type_expr list -> type_expr -> type_expr list * type_expr +val instance_parameterized_type_2: + type_expr list -> type_expr list -> type_expr -> + type_expr list * type_expr list * type_expr +val instance_declaration: type_declaration -> type_declaration +val instance_class: + type_expr list -> class_type -> type_expr list * class_type +val instance_poly: + ?keep_names:bool -> + bool -> type_expr list -> type_expr -> type_expr list * type_expr + (* Take an instance of a type scheme containing free univars *) +val instance_label: + bool -> label_description -> type_expr list * type_expr * type_expr + (* Same, for a label *) +val apply: + Env.t -> type_expr list -> type_expr -> type_expr list -> type_expr + (* [apply [p1...pN] t [a1...aN]] match the arguments [ai] to + the parameters [pi] and returns the corresponding instance of + [t]. Exception [Cannot_apply] is raised in case of failure. *) + +val expand_head_once: Env.t -> type_expr -> type_expr +val expand_head: Env.t -> type_expr -> type_expr +val try_expand_once_opt: Env.t -> type_expr -> type_expr +val expand_head_opt: Env.t -> type_expr -> type_expr +(** The compiler's own version of [expand_head] necessary for type-based + optimisations. *) + +val full_expand: Env.t -> type_expr -> type_expr +val extract_concrete_typedecl: + Env.t -> type_expr -> Path.t * Path.t * type_declaration + (* Return the original path of the types, and the first concrete + type declaration found expanding it. + Raise [Not_found] if none appears or not a type constructor. *) + +val enforce_constraints: Env.t -> type_expr -> unit + +val unify: Env.t -> type_expr -> type_expr -> unit + (* Unify the two types given. Raise [Unify] if not possible. *) +val unify_gadt: newtype_level:int -> Env.t ref -> type_expr -> type_expr -> unit + (* Unify the two types given and update the environment with the + local constraints. Raise [Unify] if not possible. *) +val unify_var: Env.t -> type_expr -> type_expr -> unit + (* Same as [unify], but allow free univars when first type + is a variable. *) +val with_passive_variants: ('a -> 'b) -> ('a -> 'b) + (* Call [f] in passive_variants mode, for exhaustiveness check. *) +val filter_arrow: Env.t -> type_expr -> arg_label -> type_expr * type_expr + (* A special case of unification (with l:'a -> 'b). *) +val filter_method: Env.t -> string -> private_flag -> type_expr -> type_expr + (* A special case of unification (with {m : 'a; 'b}). *) +val check_filter_method: Env.t -> string -> private_flag -> type_expr -> unit + (* A special case of unification (with {m : 'a; 'b}), returning unit. *) +val occur_in: Env.t -> type_expr -> type_expr -> bool +val deep_occur: type_expr -> type_expr -> bool +val filter_self_method: + Env.t -> string -> private_flag -> (Ident.t * type_expr) Meths.t ref -> + type_expr -> Ident.t * type_expr +val moregeneral: Env.t -> bool -> type_expr -> type_expr -> bool + (* Check if the first type scheme is more general than the second. *) + +val rigidify: type_expr -> type_expr list + (* "Rigidify" a type and return its type variable *) +val all_distinct_vars: Env.t -> type_expr list -> bool + (* Check those types are all distinct type variables *) +val matches: Env.t -> type_expr -> type_expr -> bool + (* Same as [moregeneral false], implemented using the two above + functions and backtracking. Ignore levels *) + +type class_match_failure = + CM_Virtual_class + | CM_Parameter_arity_mismatch of int * int + | CM_Type_parameter_mismatch of Env.t * (type_expr * type_expr) list + | CM_Class_type_mismatch of Env.t * class_type * class_type + | CM_Parameter_mismatch of Env.t * (type_expr * type_expr) list + | CM_Val_type_mismatch of string * Env.t * (type_expr * type_expr) list + | CM_Meth_type_mismatch of string * Env.t * (type_expr * type_expr) list + | CM_Non_mutable_value of string + | CM_Non_concrete_value of string + | CM_Missing_value of string + | CM_Missing_method of string + | CM_Hide_public of string + | CM_Hide_virtual of string * string + | CM_Public_method of string + | CM_Private_method of string + | CM_Virtual_method of string +val match_class_types: + ?trace:bool -> Env.t -> class_type -> class_type -> class_match_failure list + (* Check if the first class type is more general than the second. *) +val equal: Env.t -> bool -> type_expr list -> type_expr list -> bool + (* [equal env [x1...xn] tau [y1...yn] sigma] + checks whether the parameterized types + [/\x1.../\xn.tau] and [/\y1.../\yn.sigma] are equivalent. *) +val match_class_declarations: + Env.t -> type_expr list -> class_type -> type_expr list -> + class_type -> class_match_failure list + (* Check if the first class type is more general than the second. *) + +val enlarge_type: Env.t -> type_expr -> type_expr * bool + (* Make a type larger, flag is true if some pruning had to be done *) +val subtype: Env.t -> type_expr -> type_expr -> unit -> unit + (* [subtype env t1 t2] checks that [t1] is a subtype of [t2]. + It accumulates the constraints the type variables must + enforce and returns a function that enforces this + constraints. *) + +val nondep_type: Env.t -> Ident.t -> type_expr -> type_expr + (* Return a type equivalent to the given type but without + references to the given module identifier. Raise [Not_found] + if no such type exists. *) +val nondep_type_decl: + Env.t -> Ident.t -> Ident.t -> bool -> type_declaration -> + type_declaration + (* Same for type declarations. *) +val nondep_extension_constructor: + Env.t -> Ident.t -> extension_constructor -> + extension_constructor + (* Same for extension constructor *) +val nondep_class_declaration: + Env.t -> Ident.t -> class_declaration -> class_declaration + (* Same for class declarations. *) +val nondep_cltype_declaration: + Env.t -> Ident.t -> class_type_declaration -> class_type_declaration + (* Same for class type declarations. *) +(*val correct_abbrev: Env.t -> Path.t -> type_expr list -> type_expr -> unit*) +val cyclic_abbrev: Env.t -> Ident.t -> type_expr -> bool +val is_contractive: Env.t -> Path.t -> bool +val normalize_type: Env.t -> type_expr -> unit + +val closed_schema: Env.t -> type_expr -> bool + (* Check whether the given type scheme contains no non-generic + type variables *) + +val free_variables: ?env:Env.t -> type_expr -> type_expr list + (* If env present, then check for incomplete definitions too *) +val closed_type_decl: type_declaration -> type_expr option +val closed_extension_constructor: extension_constructor -> type_expr option +type closed_class_failure = + CC_Method of type_expr * bool * string * type_expr + | CC_Value of type_expr * bool * string * type_expr +val closed_class: + type_expr list -> class_signature -> closed_class_failure option + (* Check whether all type variables are bound *) + +val unalias: type_expr -> type_expr +val signature_of_class_type: class_type -> class_signature +val self_type: class_type -> type_expr +val class_type_arity: class_type -> int +val arity: type_expr -> int + (* Return the arity (as for curried functions) of the given type. *) + +val collapse_conj_params: Env.t -> type_expr list -> unit + (* Collapse conjunctive types in class parameters *) + +val get_current_level: unit -> int +val wrap_trace_gadt_instances: Env.t -> ('a -> 'b) -> 'a -> 'b +val reset_reified_var_counter: unit -> unit + +val maybe_pointer_type : Env.t -> type_expr -> bool + (* True if type is possibly pointer, false if definitely not a pointer *) + +(* Stubs *) +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/src/vendor/compiler-libs-406/datarepr.ml b/analysis/src/vendor/compiler-libs-406/datarepr.ml new file mode 100644 index 000000000..9310573ef --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/datarepr.ml @@ -0,0 +1,279 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Compute constructor and label descriptions from type declarations, + determining their representation. *) + +open Asttypes +open Types +open Btype + +(* Simplified version of Ctype.free_vars *) +let free_vars ?(param=false) ty = + let ret = ref TypeSet.empty in + let rec loop ty = + let ty = repr ty in + if ty.level >= lowest_level then begin + ty.level <- pivot_level - ty.level; + match ty.desc with + | Tvar _ -> + ret := TypeSet.add ty !ret + | Tvariant row -> + let row = row_repr row in + iter_row loop row; + if not (static_row row) then begin + match row.row_more.desc with + | Tvar _ when param -> ret := TypeSet.add ty !ret + | _ -> loop row.row_more + end + (* XXX: What about Tobject ? *) + | _ -> + iter_type_expr loop ty + end + in + loop ty; + unmark_type ty; + !ret + +let newgenconstr path tyl = newgenty (Tconstr (path, tyl, ref Mnil)) + +let constructor_existentials cd_args cd_res = + let tyl = + match cd_args with + | Cstr_tuple l -> l + | Cstr_record l -> List.map (fun l -> l.ld_type) l + in + let existentials = + match cd_res with + | None -> [] + | Some type_ret -> + let arg_vars_set = free_vars (newgenty (Ttuple tyl)) in + let res_vars = free_vars type_ret in + TypeSet.elements (TypeSet.diff arg_vars_set res_vars) + in + (tyl, existentials) + +let constructor_args priv cd_args cd_res path rep = + let tyl, existentials = constructor_existentials cd_args cd_res in + match cd_args with + | Cstr_tuple l -> existentials, l, None + | Cstr_record lbls -> + let arg_vars_set = free_vars ~param:true (newgenty (Ttuple tyl)) in + let type_params = TypeSet.elements arg_vars_set in + let type_unboxed = + match rep with + | Record_unboxed _ -> unboxed_true_default_false + | _ -> unboxed_false_default_false + in + let tdecl = + { + type_params; + type_arity = List.length type_params; + type_kind = Type_record (lbls, rep); + type_private = priv; + type_manifest = None; + type_variance = List.map (fun _ -> Variance.full) type_params; + type_newtype_level = None; + type_loc = Location.none; + type_attributes = []; + type_immediate = false; + type_unboxed; + } + in + existentials, + [ 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 + List.iter + (fun {cd_args; cd_res; _} -> + if cd_args = Cstr_tuple [] then incr num_consts else incr num_nonconsts; + if cd_res = None then incr num_normal) + cstrs; + let rec describe_constructors idx_const idx_nonconst = function + [] -> [] + | {cd_id; cd_args; cd_res; cd_loc; cd_attributes} :: rem -> + let ty_res = + match cd_res with + | Some ty_res' -> ty_res' + | None -> ty_res + in + let (tag, descr_rem) = + match cd_args with + | _ when decl.type_unboxed.unboxed -> + assert (rem = []); + (Cstr_unboxed, []) + | Cstr_tuple [] -> (Cstr_constant idx_const, + describe_constructors (idx_const+1) idx_nonconst rem) + | _ -> (Cstr_block idx_nonconst, + describe_constructors idx_const (idx_nonconst+1) rem) in + let cstr_name = Ident.name cd_id in + let existentials, cstr_args, cstr_inlined = + let representation = + if decl.type_unboxed.unboxed + then Record_unboxed true + else Record_inlined {tag = idx_nonconst; name = cstr_name; num_nonconsts = !num_nonconsts} + in + constructor_args decl.type_private cd_args cd_res + (Path.Pdot (ty_path, cstr_name, Path.nopos)) representation + in + let cstr = + { cstr_name; + cstr_res = ty_res; + cstr_existentials = existentials; + cstr_args; + cstr_arity = List.length cstr_args; + cstr_tag = tag; + cstr_consts = !num_consts; + cstr_nonconsts = !num_nonconsts; + cstr_normal = !num_normal; + cstr_private = decl.type_private; + cstr_generalized = cd_res <> None; + cstr_loc = cd_loc; + cstr_attributes = cd_attributes; + cstr_inlined; + } in + (cd_id, cstr) :: descr_rem in + 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 = + match ext.ext_ret_type with + Some type_ret -> type_ret + | None -> newgenconstr ext.ext_type_path ext.ext_type_params + in + let existentials, cstr_args, cstr_inlined = + constructor_args ext.ext_private ext.ext_args ext.ext_ret_type + path_ext Record_extension + in + { cstr_name = Path.last path_ext; + cstr_res = ty_res; + cstr_existentials = existentials; + cstr_args; + cstr_arity = List.length cstr_args; + cstr_tag = Cstr_extension(path_ext, cstr_args = []); + cstr_consts = -1; + cstr_nonconsts = -1; + cstr_private = ext.ext_private; + cstr_normal = -1; + cstr_generalized = ext.ext_ret_type <> None; + cstr_loc = ext.ext_loc; + cstr_attributes = ext.ext_attributes; + cstr_inlined; + } + +let none = {desc = Ttuple []; level = -1; id = -1} + (* Clearly ill-formed type *) +let dummy_label = + { lbl_name = ""; lbl_res = none; lbl_arg = none; lbl_mut = Immutable; + lbl_pos = (-1); lbl_all = [||]; lbl_repres = Record_regular; + lbl_private = Public; + lbl_loc = Location.none; + lbl_attributes = []; + } + +let label_descrs ty_res lbls repres priv = + let all_labels = Array.make (List.length lbls) dummy_label in + let rec describe_labels num = function + [] -> [] + | l :: rest -> + let lbl = + { lbl_name = Ident.name l.ld_id; + lbl_res = ty_res; + lbl_arg = l.ld_type; + lbl_mut = l.ld_mutable; + lbl_pos = num; + lbl_all = all_labels; + lbl_repres = repres; + lbl_private = priv; + lbl_loc = l.ld_loc; + lbl_attributes = l.ld_attributes; + } in + all_labels.(num) <- lbl; + (l.ld_id, lbl) :: describe_labels (num+1) rest in + describe_labels 0 lbls + +exception Constr_not_found + +let rec find_constr tag num_const num_nonconst = function + [] -> + raise Constr_not_found + | {cd_args = Cstr_tuple []; _} as c :: rem -> + if Types.equal_tag tag (Cstr_constant num_const) + then c + else find_constr tag (num_const + 1) num_nonconst rem + | c :: rem -> + if Types.equal_tag tag (Cstr_block num_nonconst) || tag = Cstr_unboxed + then c + else find_constr tag num_const (num_nonconst + 1) rem + +let find_constr_by_tag tag cstrlist = + find_constr tag 0 0 cstrlist + +let constructors_of_type ty_path decl = + match decl.type_kind with + | Type_variant cstrs -> constructor_descrs ty_path decl cstrs + | Type_record _ | Type_abstract | Type_open -> [] + +let labels_of_type ty_path decl = + match decl.type_kind with + | Type_record(labels, rep) -> + label_descrs (newgenconstr ty_path decl.type_params) + labels rep decl.type_private + | Type_variant _ | Type_abstract | Type_open -> [] + +(* Set row_name in Env, cf. GPR#1204/1329 *) +let set_row_name decl path = + match decl.type_manifest with + None -> () + | Some ty -> + let ty = repr ty in + match ty.desc with + Tvariant row when static_row row -> + let row = {(row_repr row) with + row_name = Some (path, decl.type_params)} in + ty.desc <- Tvariant row + | _ -> () diff --git a/analysis/src/vendor/compiler-libs-406/datarepr.mli b/analysis/src/vendor/compiler-libs-406/datarepr.mli new file mode 100644 index 000000000..f6bc50f08 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/datarepr.mli @@ -0,0 +1,51 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Compute constructor and label descriptions from type declarations, + determining their representation. *) + +open Types + +val constructor_has_optional_shape: + Types.constructor_description -> bool + +val extension_descr: + Path.t -> extension_constructor -> constructor_description + +val labels_of_type: + Path.t -> type_declaration -> + (Ident.t * label_description) list +val constructors_of_type: + Path.t -> type_declaration -> + (Ident.t * constructor_description) list + + +exception Constr_not_found + +val find_constr_by_tag: + constructor_tag -> constructor_declaration list -> + constructor_declaration + +val constructor_existentials : + constructor_arguments -> type_expr option -> type_expr list * type_expr list +(** Takes [cd_args] and [cd_res] from a [constructor_declaration] and + returns: + - the types of the constructor's arguments + - the existential variables introduced by the constructor + *) + + +(* Set the polymorphic variant row_name field *) +val set_row_name : type_declaration -> Path.t -> unit diff --git a/analysis/src/vendor/compiler-libs-406/docstrings.ml b/analysis/src/vendor/compiler-libs-406/docstrings.ml new file mode 100644 index 000000000..5de6d4d4f --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/docstrings.ml @@ -0,0 +1,343 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Leo White *) +(* *) +(* 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 Location + +(* Docstrings *) + +(* A docstring is "attached" if it has been inserted in the AST. This + is used for generating unexpected docstring warnings. *) +type ds_attached = + | Unattached (* Not yet attached anything.*) + | Info (* Attached to a field or constructor. *) + | Docs (* Attached to an item or as floating text. *) + +(* A docstring is "associated" with an item if there are no blank lines between + them. This is used for generating docstring ambiguity warnings. *) +type ds_associated = + | Zero (* Not associated with an item *) + | One (* Associated with one item *) + | Many (* Associated with multiple items (ambiguity) *) + +type docstring = + { ds_body: string; + ds_loc: Location.t; + mutable ds_attached: ds_attached; + mutable ds_associated: ds_associated; } + +(* List of docstrings *) + +let docstrings : docstring list ref = ref [] + +(* Warn for unused and ambiguous docstrings *) + +let warn_bad_docstrings () = + if Warnings.is_active (Warnings.Bad_docstring true) then begin + List.iter + (fun ds -> + match ds.ds_attached with + | Info -> () + | Unattached -> + prerr_warning ds.ds_loc (Warnings.Bad_docstring true) + | Docs -> + match ds.ds_associated with + | Zero | One -> () + | Many -> + prerr_warning ds.ds_loc (Warnings.Bad_docstring false)) + (List.rev !docstrings) +end + +(* Docstring constructors and destructors *) + +let docstring body loc = + let ds = + { ds_body = body; + ds_loc = loc; + ds_attached = Unattached; + ds_associated = Zero; } + in + ds + +let register ds = + docstrings := ds :: !docstrings + +let docstring_body ds = ds.ds_body + +let docstring_loc ds = ds.ds_loc + +(* Docstrings attached to items *) + +type docs = + { docs_pre: docstring option; + docs_post: docstring option; } + +let empty_docs = { docs_pre = None; docs_post = None } + +let doc_loc = {txt = "ocaml.doc"; loc = Location.none} + +let docs_attr ds = + let open Parsetree in + let exp = + { pexp_desc = Pexp_constant (Pconst_string(ds.ds_body, None)); + pexp_loc = ds.ds_loc; + pexp_attributes = []; } + in + let item = + { pstr_desc = Pstr_eval (exp, []); pstr_loc = exp.pexp_loc } + in + (doc_loc, PStr [item]) + +let add_docs_attrs docs attrs = + let attrs = + match docs.docs_pre with + | None | Some { ds_body=""; _ } -> attrs + | Some ds -> docs_attr ds :: attrs + in + let attrs = + match docs.docs_post with + | None | Some { ds_body=""; _ } -> attrs + | Some ds -> attrs @ [docs_attr ds] + in + attrs + +(* Docstrings attached to constructors or fields *) + +type info = docstring option + +let empty_info = None + +let info_attr = docs_attr + +let add_info_attrs info attrs = + match info with + | None | Some {ds_body=""; _} -> attrs + | Some ds -> attrs @ [info_attr ds] + +(* Docstrings not attached to a specific item *) + +type text = docstring list + +let empty_text = [] +let empty_text_lazy = lazy [] + +let text_loc = {txt = "ocaml.text"; loc = Location.none} + +let text_attr ds = + let open Parsetree in + let exp = + { pexp_desc = Pexp_constant (Pconst_string(ds.ds_body, None)); + pexp_loc = ds.ds_loc; + pexp_attributes = []; } + in + let item = + { pstr_desc = Pstr_eval (exp, []); pstr_loc = exp.pexp_loc } + in + (text_loc, PStr [item]) + +let add_text_attrs dsl attrs = + let fdsl = List.filter (function {ds_body=""} -> false| _ ->true) dsl in + (List.map text_attr fdsl) @ attrs + +(* Find the first non-info docstring in a list, attach it and return it *) +let get_docstring ~info dsl = + let rec loop = function + | [] -> None + | {ds_attached = Info; _} :: rest -> loop rest + | ds :: _ -> + ds.ds_attached <- if info then Info else Docs; + Some ds + in + loop dsl + +(* Find all the non-info docstrings in a list, attach them and return them *) +let get_docstrings dsl = + let rec loop acc = function + | [] -> List.rev acc + | {ds_attached = Info; _} :: rest -> loop acc rest + | ds :: rest -> + ds.ds_attached <- Docs; + loop (ds :: acc) rest + in + loop [] dsl + +(* "Associate" all the docstrings in a list *) +let associate_docstrings dsl = + List.iter + (fun ds -> + match ds.ds_associated with + | Zero -> ds.ds_associated <- One + | (One | Many) -> ds.ds_associated <- Many) + dsl + +(* Map from positions to pre docstrings *) + +let pre_table : (Lexing.position, docstring list) Hashtbl.t = + Hashtbl.create 50 + +let set_pre_docstrings pos dsl = + if dsl <> [] then Hashtbl.add pre_table pos dsl + +let get_pre_docs pos = + try + let dsl = Hashtbl.find pre_table pos in + associate_docstrings dsl; + get_docstring ~info:false dsl + with Not_found -> None + +let mark_pre_docs pos = + try + let dsl = Hashtbl.find pre_table pos in + associate_docstrings dsl + with Not_found -> () + +(* Map from positions to post docstrings *) + +let post_table : (Lexing.position, docstring list) Hashtbl.t = + Hashtbl.create 50 + +let set_post_docstrings pos dsl = + if dsl <> [] then Hashtbl.add post_table pos dsl + +let get_post_docs pos = + try + let dsl = Hashtbl.find post_table pos in + associate_docstrings dsl; + get_docstring ~info:false dsl + with Not_found -> None + +let mark_post_docs pos = + try + let dsl = Hashtbl.find post_table pos in + associate_docstrings dsl + with Not_found -> () + +let get_info pos = + try + let dsl = Hashtbl.find post_table pos in + get_docstring ~info:true dsl + with Not_found -> None + +(* Map from positions to floating docstrings *) + +let floating_table : (Lexing.position, docstring list) Hashtbl.t = + Hashtbl.create 50 + +let set_floating_docstrings pos dsl = + if dsl <> [] then Hashtbl.add floating_table pos dsl + +let get_text pos = + try + let dsl = Hashtbl.find floating_table pos in + get_docstrings dsl + with Not_found -> [] + +(* Maps from positions to extra docstrings *) + +let pre_extra_table : (Lexing.position, docstring list) Hashtbl.t = + Hashtbl.create 50 + +let set_pre_extra_docstrings pos dsl = + if dsl <> [] then Hashtbl.add pre_extra_table pos dsl + +let get_pre_extra_text pos = + try + let dsl = Hashtbl.find pre_extra_table pos in + get_docstrings dsl + with Not_found -> [] + +let post_extra_table : (Lexing.position, docstring list) Hashtbl.t = + Hashtbl.create 50 + +let set_post_extra_docstrings pos dsl = + if dsl <> [] then Hashtbl.add post_extra_table pos dsl + +let get_post_extra_text pos = + try + let dsl = Hashtbl.find post_extra_table pos in + get_docstrings dsl + with Not_found -> [] + +(* Docstrings from parser actions *) + +let symbol_docs () = + { docs_pre = get_pre_docs (Parsing.symbol_start_pos ()); + docs_post = get_post_docs (Parsing.symbol_end_pos ()); } + +let symbol_docs_lazy () = + let p1 = Parsing.symbol_start_pos () in + let p2 = Parsing.symbol_end_pos () in + lazy { docs_pre = get_pre_docs p1; + docs_post = get_post_docs p2; } + +let rhs_docs pos1 pos2 = + { docs_pre = get_pre_docs (Parsing.rhs_start_pos pos1); + docs_post = get_post_docs (Parsing.rhs_end_pos pos2); } + +let rhs_docs_lazy pos1 pos2 = + let p1 = Parsing.rhs_start_pos pos1 in + let p2 = Parsing.rhs_end_pos pos2 in + lazy { docs_pre = get_pre_docs p1; + docs_post = get_post_docs p2; } + +let mark_symbol_docs () = + mark_pre_docs (Parsing.symbol_start_pos ()); + mark_post_docs (Parsing.symbol_end_pos ()) + +let mark_rhs_docs pos1 pos2 = + mark_pre_docs (Parsing.rhs_start_pos pos1); + mark_post_docs (Parsing.rhs_end_pos pos2) + +let symbol_info () = + get_info (Parsing.symbol_end_pos ()) + +let rhs_info pos = + get_info (Parsing.rhs_end_pos pos) + +let symbol_text () = + get_text (Parsing.symbol_start_pos ()) + +let symbol_text_lazy () = + let pos = Parsing.symbol_start_pos () in + lazy (get_text pos) + +let rhs_text pos = + get_text (Parsing.rhs_start_pos pos) + +let rhs_text_lazy pos = + let pos = Parsing.rhs_start_pos pos in + lazy (get_text pos) + +let symbol_pre_extra_text () = + get_pre_extra_text (Parsing.symbol_start_pos ()) + +let symbol_post_extra_text () = + get_post_extra_text (Parsing.symbol_end_pos ()) + +let rhs_pre_extra_text pos = + get_pre_extra_text (Parsing.rhs_start_pos pos) + +let rhs_post_extra_text pos = + get_post_extra_text (Parsing.rhs_end_pos pos) + + +(* (Re)Initialise all comment state *) + +let init () = + docstrings := []; + Hashtbl.reset pre_table; + Hashtbl.reset post_table; + Hashtbl.reset floating_table; + Hashtbl.reset pre_extra_table; + Hashtbl.reset post_extra_table diff --git a/analysis/src/vendor/compiler-libs-406/docstrings.mli b/analysis/src/vendor/compiler-libs-406/docstrings.mli new file mode 100644 index 000000000..892a80e27 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/docstrings.mli @@ -0,0 +1,157 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Leo White *) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(** Documentation comments *) + +(** (Re)Initialise all docstring state *) +val init : unit -> unit + +(** Emit warnings for unattached and ambiguous docstrings *) +val warn_bad_docstrings : unit -> unit + +(** {2 Docstrings} *) + +(** Documentation comments *) +type docstring + +(** Create a docstring *) +val docstring : string -> Location.t -> docstring + +(** Register a docstring *) +val register : docstring -> unit + +(** Get the text of a docstring *) +val docstring_body : docstring -> string + +(** Get the location of a docstring *) +val docstring_loc : docstring -> Location.t + +(** {2 Set functions} + + These functions are used by the lexer to associate docstrings to + the locations of tokens. *) + +(** Docstrings immediately preceding a token *) +val set_pre_docstrings : Lexing.position -> docstring list -> unit + +(** Docstrings immediately following a token *) +val set_post_docstrings : Lexing.position -> docstring list -> unit + +(** Docstrings not immediately adjacent to a token *) +val set_floating_docstrings : Lexing.position -> docstring list -> unit + +(** Docstrings immediately following the token which precedes this one *) +val set_pre_extra_docstrings : Lexing.position -> docstring list -> unit + +(** Docstrings immediately preceding the token which follows this one *) +val set_post_extra_docstrings : Lexing.position -> docstring list -> unit + +(** {2 Items} + + The {!docs} type represents documentation attached to an item. *) + +type docs = + { docs_pre: docstring option; + docs_post: docstring option; } + +val empty_docs : docs + +val docs_attr : docstring -> Parsetree.attribute + +(** Convert item documentation to attributes and add them to an + attribute list *) +val add_docs_attrs : docs -> Parsetree.attributes -> Parsetree.attributes + +(** Fetch the item documentation for the current symbol. This also + marks this documentation (for ambiguity warnings). *) +val symbol_docs : unit -> docs +val symbol_docs_lazy : unit -> docs Lazy.t + +(** Fetch the item documentation for the symbols between two + positions. This also marks this documentation (for ambiguity + warnings). *) +val rhs_docs : int -> int -> docs +val rhs_docs_lazy : int -> int -> docs Lazy.t + +(** Mark the item documentation for the current symbol (for ambiguity + warnings). *) +val mark_symbol_docs : unit -> unit + +(** Mark as associated the item documentation for the symbols between + two positions (for ambiguity warnings) *) +val mark_rhs_docs : int -> int -> unit + +(** {2 Fields and constructors} + + The {!info} type represents documentation attached to a field or + constructor. *) + +type info = docstring option + +val empty_info : info + +val info_attr : docstring -> Parsetree.attribute + +(** Convert field info to attributes and add them to an + attribute list *) +val add_info_attrs : info -> Parsetree.attributes -> Parsetree.attributes + +(** Fetch the field info for the current symbol. *) +val symbol_info : unit -> info + +(** Fetch the field info following the symbol at a given position. *) +val rhs_info : int -> info + +(** {2 Unattached comments} + + The {!text} type represents documentation which is not attached to + anything. *) + +type text = docstring list + +val empty_text : text +val empty_text_lazy : text Lazy.t + +val text_attr : docstring -> Parsetree.attribute + +(** Convert text to attributes and add them to an attribute list *) +val add_text_attrs : text -> Parsetree.attributes -> Parsetree.attributes + +(** Fetch the text preceding the current symbol. *) +val symbol_text : unit -> text +val symbol_text_lazy : unit -> text Lazy.t + +(** Fetch the text preceding the symbol at the given position. *) +val rhs_text : int -> text +val rhs_text_lazy : int -> text Lazy.t + +(** {2 Extra text} + + There may be additional text attached to the delimiters of a block + (e.g. [struct] and [end]). This is fetched by the following + functions, which are applied to the contents of the block rather + than the delimiters. *) + +(** Fetch additional text preceding the current symbol *) +val symbol_pre_extra_text : unit -> text + +(** Fetch additional text following the current symbol *) +val symbol_post_extra_text : unit -> text + +(** Fetch additional text preceding the symbol at the given position *) +val rhs_pre_extra_text : int -> text + +(** Fetch additional text following the symbol at the given position *) +val rhs_post_extra_text : int -> text diff --git a/analysis/src/vendor/compiler-libs-406/env.ml b/analysis/src/vendor/compiler-libs-406/env.ml new file mode 100644 index 000000000..469d552d6 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/env.ml @@ -0,0 +1,2373 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Environment handling *) + +open Cmi_format +open Config +open Misc +open Asttypes +open Longident +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 + (* This table is used to usage of value declarations. A declaration is + identified with its name and location. The callback attached to a + declaration is called whenever the value is used explicitly + (lookup_value) or implicitly (inclusion test between signatures, + cf Includemod.value_descriptions). *) + +let type_declarations = Hashtbl.create 16 +let module_declarations = Hashtbl.create 16 + +type constructor_usage = Positive | Pattern | Privatize +type constructor_usages = + { + mutable cu_positive: bool; + mutable cu_pattern: bool; + mutable cu_privatize: bool; + } +let add_constructor_usage cu = function + | Positive -> cu.cu_positive <- true + | Pattern -> cu.cu_pattern <- true + | Privatize -> cu.cu_privatize <- true +let constructor_usages () = + {cu_positive = false; cu_pattern = false; cu_privatize = false} + +let used_constructors : + (string * Location.t * string, (constructor_usage -> unit)) Hashtbl.t + = Hashtbl.create 16 + +let prefixed_sg = Hashtbl.create 113 + +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 + +exception Error of error + +let error err = raise (Error err) + +module EnvLazy : sig + type ('a,'b) t + + type log + + val force : ('a -> 'b) -> ('a,'b) t -> 'b + val create : 'a -> ('a,'b) t + val get_arg : ('a,'b) t -> 'a option + + (* [force_logged log f t] is equivalent to [force f t] but if [f] returns [None] then + [t] is recorded in [log]. [backtrack log] will then reset all the recorded [t]s back + to their original state. *) + val log : unit -> log + val force_logged : log -> ('a -> 'b option) -> ('a,'b option) t -> 'b option + val backtrack : log -> unit + +end = struct + + type ('a,'b) t = ('a,'b) eval ref + + and ('a,'b) eval = + | Done of 'b + | Raise of exn + | Thunk of 'a + + type undo = + | Nil + | Cons : ('a, 'b) t * 'a * undo -> undo + + type log = undo ref + + let force f x = + match !x with + | Done x -> x + | Raise e -> raise e + | Thunk e -> + match f e with + | y -> + x := Done y; + y + | exception e -> + x := Raise e; + raise e + + let get_arg x = + match !x with Thunk a -> Some a | _ -> None + + let create x = + ref (Thunk x) + + let log () = + ref Nil + + let force_logged log f x = + match !x with + | Done x -> x + | Raise e -> raise e + | Thunk e -> + match f e with + | None -> + x := Done None; + log := Cons(x, e, !log); + None + | Some _ as y -> + x := Done y; + y + | exception e -> + x := Raise e; + raise e + + let backtrack log = + let rec loop = function + | Nil -> () + | Cons(x, e, rest) -> + x := Thunk e; + loop rest + in + loop !log + +end + +module PathMap = Map.Make(Path) + +type summary = + Env_empty + | Env_value of summary * Ident.t * value_description + | Env_type of summary * Ident.t * type_declaration + | 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_cltype of summary * Ident.t * class_type_declaration + | Env_open of summary * Path.t + | Env_functor_arg of summary * Ident.t + | Env_constraints of summary * type_declaration PathMap.t + | Env_copy_types of summary * string list + +module TycompTbl = + struct + (** This module is used to store components of types (i.e. labels + and constructors). We keep a representation of each nested + "open" and the set of local bindings between each of them. *) + + type 'a t = { + current: 'a Ident.tbl; + (** Local bindings since the last open. *) + + opened: 'a opened option; + (** Symbolic representation of the last (innermost) open, if any. *) + } + + and 'a opened = { + components: (string, 'a list) Tbl.t; + (** Components from the opened module. We keep a list of + bindings for each name, as in comp_labels and + comp_constrs. *) + + using: (string -> ('a * 'a) option -> unit) option; + (** A callback to be applied when a component is used from this + "open". This is used to detect unused "opens". The + arguments are used to detect shadowing. *) + + next: 'a t; + (** The table before opening the module. *) + } + + let empty = { current = Ident.empty; opened = None } + + let add id x tbl = + {tbl with current = Ident.add id x tbl.current} + + let add_open slot wrap components next = + let using = + match slot with + | None -> None + | Some f -> Some (fun s x -> f s (wrap x)) + in + { + current = Ident.empty; + opened = Some {using; components; next}; + } + + let rec find_same id tbl = + try Ident.find_same id tbl.current + with Not_found as exn -> + begin match tbl.opened with + | Some {next; _} -> find_same id next + | None -> raise exn + end + + let nothing = fun () -> () + + let mk_callback rest name desc = function + | None -> nothing + | Some f -> + (fun () -> + match rest with + | [] -> f name None + | (hidden, _) :: _ -> f name (Some (desc, hidden)) + ) + + let rec find_all name tbl = + List.map (fun (_id, desc) -> desc, nothing) + (Ident.find_all name tbl.current) @ + match tbl.opened with + | None -> [] + | Some {using; next; components} -> + let rest = find_all name next in + match Tbl.find_str name components with + | exception Not_found -> rest + | opened -> + List.map + (fun desc -> desc, mk_callback rest name desc using) + opened + @ rest + + let rec fold_name f tbl acc = + let acc = Ident.fold_name (fun _id d -> f d) tbl.current acc in + match tbl.opened with + | Some {using = _; next; components} -> + acc + |> Tbl.fold + (fun _name -> List.fold_right (fun desc -> f desc)) + components + |> fold_name f next + | None -> + acc + + let rec local_keys tbl acc = + let acc = Ident.fold_all (fun k _ accu -> k::accu) tbl.current acc in + match tbl.opened with + | Some o -> local_keys o.next acc + | None -> acc + + let diff_keys is_local tbl1 tbl2 = + let keys2 = local_keys tbl2 [] in + List.filter + (fun id -> + is_local (find_same id tbl2) && + try ignore (find_same id tbl1); false + with Not_found -> true) + keys2 + + end + + +module IdTbl = + struct + (** This module is used to store all kinds of components except + (labels and constructors) in environments. We keep a + representation of each nested "open" and the set of local + bindings between each of them. *) + + + type 'a t = { + current: 'a Ident.tbl; + (** Local bindings since the last open *) + + opened: 'a opened option; + (** Symbolic representation of the last (innermost) open, if any. *) + } + + and 'a opened = { + root: Path.t; + (** The path of the opened module, to be prefixed in front of + its local names to produce a valid path in the current + environment. *) + + components: (string, 'a * int) Tbl.t; + (** Components from the opened module. *) + + using: (string -> ('a * 'a) option -> unit) option; + (** A callback to be applied when a component is used from this + "open". This is used to detect unused "opens". The + arguments are used to detect shadowing. *) + + next: 'a t; + (** The table before opening the module. *) + } + + let empty = { current = Ident.empty; opened = None } + + let add id x tbl = + {tbl with current = Ident.add id x tbl.current} + + let add_open slot wrap root components next = + let using = + match slot with + | None -> None + | Some f -> Some (fun s x -> f s (wrap x)) + in + { + current = Ident.empty; + opened = Some {using; root; components; next}; + } + + let rec find_same id tbl = + try Ident.find_same id tbl.current + with Not_found as exn -> + begin match tbl.opened with + | Some {next; _} -> find_same id next + | None -> raise exn + end + + let rec find_name mark name tbl = + try + let (id, desc) = Ident.find_name name tbl.current in + Pident id, desc + with Not_found as exn -> + begin match tbl.opened with + | Some {using; root; next; components} -> + begin try + let (descr, pos) = Tbl.find_str name components in + let res = Pdot (root, name, pos), descr in + if mark then begin match using with + | None -> () + | Some f -> + begin try f name (Some (snd (find_name false name next), snd res)) + with Not_found -> f name None + end + end; + res + with Not_found -> + find_name mark name next + end + | None -> + raise exn + end + + let find_name name tbl = find_name true name tbl + + let rec update name f tbl = + try + let (id, desc) = Ident.find_name name tbl.current in + let new_desc = f desc in + {tbl with current = Ident.add id new_desc tbl.current} + with Not_found -> + begin match tbl.opened with + | Some {root; using; next; components} -> + begin try + let (desc, pos) = Tbl.find_str name components in + let new_desc = f desc in + let components = Tbl.add name (new_desc, pos) components in + {tbl with opened = Some {root; using; next; components}} + with Not_found -> + let next = update name f next in + {tbl with opened = Some {root; using; next; components}} + end + | None -> + tbl + end + + + + let rec find_all name tbl = + List.map (fun (id, desc) -> Pident id, desc) (Ident.find_all name tbl.current) @ + match tbl.opened with + | None -> [] + | Some {root; using = _; next; components} -> + try + let (desc, pos) = Tbl.find_str name components in + (Pdot (root, name, pos), desc) :: find_all name next + with Not_found -> + find_all name next + + let rec fold_name f tbl acc = + let acc = Ident.fold_name (fun id d -> f (Ident.name id) (Pident id, d)) tbl.current acc in + match tbl.opened with + | Some {root; using = _; next; components} -> + acc + |> Tbl.fold + (fun name (desc, pos) -> f name (Pdot (root, name, pos), desc)) + components + |> fold_name f next + | None -> + acc + + let rec local_keys tbl acc = + let acc = Ident.fold_all (fun k _ accu -> k::accu) tbl.current acc in + match tbl.opened with + | Some o -> local_keys o.next acc + | None -> acc + + + let rec iter f tbl = + Ident.iter (fun id desc -> f id (Pident id, desc)) tbl.current; + match tbl.opened with + | Some {root; using = _; next; components} -> + Tbl.iter + (fun s (x, pos) -> f (Ident.hide (Ident.create s) (* ??? *)) (Pdot (root, s, pos), x)) + components; + iter f next + | None -> () + + let diff_keys tbl1 tbl2 = + let keys2 = local_keys tbl2 [] in + List.filter + (fun id -> + try ignore (find_same id tbl1); false + with Not_found -> true) + keys2 + + + end + +type type_descriptions = + constructor_description list * label_description list + +let in_signature_flag = 0x01 +let implicit_coercion_flag = 0x02 + +type t = { + values: value_description IdTbl.t; + constrs: constructor_description TycompTbl.t; + labels: label_description TycompTbl.t; + types: (type_declaration * type_descriptions) IdTbl.t; + modules: (Subst.t * module_declaration, module_declaration) EnvLazy.t IdTbl.t; + modtypes: modtype_declaration IdTbl.t; + components: module_components IdTbl.t; + classes: class_declaration IdTbl.t; + cltypes: class_type_declaration IdTbl.t; + functor_args: unit Ident.tbl; + summary: summary; + local_constraints: type_declaration PathMap.t; + gadt_instances: (int * TypeSet.t ref) list; + flags: int; +} + +and module_components = + { + deprecated: string option; + loc: Location.t; + comps: + (t * Subst.t * Path.t * Types.module_type, module_components_repr option) + EnvLazy.t; + } + +and module_components_repr = + Structure_comps of structure_components + | Functor_comps of functor_components + +and 'a comp_tbl = (string, ('a * int)) Tbl.t + +and structure_components = { + mutable comp_values: value_description comp_tbl; + mutable comp_constrs: (string, constructor_description list) Tbl.t; + mutable comp_labels: (string, label_description list) Tbl.t; + mutable comp_types: (type_declaration * type_descriptions) comp_tbl; + mutable comp_modules: + (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; + mutable comp_cltypes: class_type_declaration comp_tbl; +} + +and functor_components = { + fcomp_param: Ident.t; (* Formal parameter *) + fcomp_arg: module_type option; (* Argument signature *) + fcomp_res: module_type; (* Result signature *) + fcomp_cache: (Path.t, module_components) Hashtbl.t; (* For memoization *) + fcomp_subst_cache: (Path.t, module_type) Hashtbl.t +} + +let copy_local ~from env = + { env with + local_constraints = from.local_constraints; + gadt_instances = from.gadt_instances; + flags = from.flags } + +let same_constr = ref (fun _ _ _ -> assert false) + +(* Helper to decide whether to report an identifier shadowing + by some 'open'. For labels and constructors, we do not report + if the two elements are from the same re-exported declaration. + + Later, one could also interpret some attributes on value and + type declarations to silence the shadowing warnings. *) + +let check_shadowing env = function + | `Constructor (Some (c1, c2)) + when not (!same_constr env c1.cstr_res c2.cstr_res) -> + Some "constructor" + | `Label (Some (l1, l2)) + when not (!same_constr env l1.lbl_res l2.lbl_res) -> + Some "label" + | `Value (Some _) -> Some "value" + | `Type (Some _) -> Some "type" + | `Module (Some _) | `Component (Some _) -> Some "module" + | `Module_type (Some _) -> Some "module type" + | `Class (Some _) -> Some "class" + | `Class_type (Some _) -> Some "class type" + | `Constructor _ | `Label _ + | `Value None | `Type None | `Module None | `Module_type None + | `Class None | `Class_type None | `Component None -> + None + +let subst_modtype_maker (subst, md) = + if subst == Subst.identity then md + else {md with md_type = Subst.modtype subst md.md_type} + +let empty = { + values = IdTbl.empty; constrs = TycompTbl.empty; + labels = TycompTbl.empty; types = IdTbl.empty; + modules = IdTbl.empty; modtypes = IdTbl.empty; + components = IdTbl.empty; classes = IdTbl.empty; + cltypes = IdTbl.empty; + summary = Env_empty; local_constraints = PathMap.empty; gadt_instances = []; + flags = 0; + functor_args = Ident.empty; + } + +let in_signature b env = + let flags = + if b then env.flags lor in_signature_flag + else env.flags land (lnot in_signature_flag) + in + {env with flags} + +let implicit_coercion env = + {env with flags = env.flags lor implicit_coercion_flag} + +let is_in_signature env = env.flags land in_signature_flag <> 0 +let is_implicit_coercion env = env.flags land implicit_coercion_flag <> 0 + +let is_ident = function + Pident _ -> true + | Pdot _ | Papply _ -> false + +let is_local_ext = function + | {cstr_tag = Cstr_extension(p, _)} -> is_ident p + | _ -> false + +let diff env1 env2 = + IdTbl.diff_keys env1.values env2.values @ + TycompTbl.diff_keys is_local_ext env1.constrs env2.constrs @ + IdTbl.diff_keys env1.modules env2.modules @ + IdTbl.diff_keys env1.classes env2.classes + +type can_load_cmis = + | Can_load_cmis + | Cannot_load_cmis of EnvLazy.log + +let can_load_cmis = ref Can_load_cmis + +let without_cmis f x = + let log = EnvLazy.log () in + let res = + Misc.(protect_refs + [R (can_load_cmis, Cannot_load_cmis log)] + (fun () -> f x)) + in + EnvLazy.backtrack log; + res + +(* Forward declarations *) + +let components_of_module' = + ref ((fun ~deprecated:_ ~loc:_ _env _sub _path _mty -> assert false) : + deprecated:string option -> loc:Location.t -> t -> Subst.t -> + Path.t -> module_type -> + module_components) +let components_of_module_maker' = + ref ((fun (_env, _sub, _path, _mty) -> assert false) : + t * Subst.t * Path.t * module_type -> module_components_repr option) +let components_of_functor_appl' = + ref ((fun _f _env _p1 _p2 -> assert false) : + functor_components -> t -> Path.t -> Path.t -> module_components) +let check_modtype_inclusion = + (* to be filled with Includemod.check_modtype_inclusion *) + ref ((fun ~loc:_ _env _mty1 _path1 _mty2 -> assert false) : + loc:Location.t -> t -> module_type -> Path.t -> module_type -> unit) +let strengthen = + (* to be filled with Mtype.strengthen *) + ref ((fun ~aliasable:_ _env _mty _path -> assert false) : + aliasable:bool -> t -> module_type -> Path.t -> module_type) + +let md md_type = + {md_type; md_attributes=[]; md_loc=Location.none} + +let get_components_opt c = + match !can_load_cmis with + | Can_load_cmis -> + EnvLazy.force !components_of_module_maker' c.comps + | Cannot_load_cmis log -> + EnvLazy.force_logged log !components_of_module_maker' c.comps + +let empty_structure = + Structure_comps { + comp_values = Tbl.empty; + comp_constrs = Tbl.empty; + comp_labels = Tbl.empty; + comp_types = Tbl.empty; + comp_modules = Tbl.empty; comp_modtypes = Tbl.empty; + comp_components = Tbl.empty; comp_classes = Tbl.empty; + comp_cltypes = Tbl.empty } + +let get_components c = + match get_components_opt c with + | None -> empty_structure + | Some c -> c + +(* The name of the compilation unit currently compiled. + "" if outside a compilation unit. *) + +let current_unit = ref "" + +(* Persistent structure descriptions *) + +type pers_struct = + { ps_name: string; + ps_sig: signature Lazy.t; + ps_comps: module_components; + ps_crcs: (string * Digest.t option) list; + ps_filename: string; + ps_flags: pers_flags list } + +let persistent_structures = + (Hashtbl.create 17 : (string, pers_struct option) Hashtbl.t) + +(* Consistency between persistent structures *) + +let crc_units = Consistbl.create() + +module StringSet = + Set.Make(struct type t = string let compare = String.compare end) + +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 + +let check_consistency ps = + try + List.iter + (fun (name, crco) -> + match crco with + None -> () + | Some crc -> + add_import name; + Consistbl.check crc_units name crc ps.ps_filename) + ps.ps_crcs; + with Consistbl.Inconsistency(name, source, auth) -> + error (Inconsistent_import(name, auth, source)) + +(* Reading persistent structures from .cmi files *) + +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 + +module Persistent_signature = struct + type t = + { filename : string; + cmi : Cmi_format.cmi_infos } + + let load = ref (fun ~unit_name -> + match find_in_path_uncap !load_path (unit_name ^ ".cmi") with + | filename -> Some { filename; cmi = read_cmi filename } + | exception Not_found -> None) +end + +let acknowledge_pers_struct check modname + { Persistent_signature.filename; cmi } = + let name = cmi.cmi_name in + let sign = cmi.cmi_sign in + 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 + flags + in + let comps = + !components_of_module' ~deprecated ~loc:Location.none + empty Subst.identity + (Pident(Ident.create_persistent name)) + (Mty_signature sign) + in + let ps = { ps_name = name; + ps_sig = lazy (Subst.signature Subst.identity sign); + ps_comps = comps; + ps_crcs = crcs; + ps_filename = filename; + ps_flags = flags; + } in + if ps.ps_name <> modname then + error (Illegal_renaming(modname, ps.ps_name, filename)); + + List.iter + (function + | Rectypes -> + error (Need_recursive_types(ps.ps_name, !current_unit)) + | Unsafe_string -> + 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 + +let read_pers_struct check modname filename = + add_import modname; + let cmi = read_cmi filename in + acknowledge_pers_struct check modname + { Persistent_signature.filename; cmi } + +let find_pers_struct check name = + if name = "*predef*" then raise Not_found; + match Hashtbl.find persistent_structures name with + | Some ps -> ps + | None -> raise Not_found + | exception Not_found -> + match !can_load_cmis with + | Cannot_load_cmis _ -> raise Not_found + | Can_load_cmis -> + let ps = + match !Persistent_signature.load ~unit_name:name with + | Some ps -> ps + | None -> + Hashtbl.add persistent_structures name None; + raise Not_found + in + add_import name; + acknowledge_pers_struct check name ps + +(* Emits a warning if there is no valid cmi for name *) +let check_pers_struct name = + try + ignore (find_pers_struct false name) + with + | Not_found -> + let warn = Warnings.No_cmi_file(name, None) in + Location.prerr_warning Location.none warn + | Cmi_format.Error err -> + let msg = Format.asprintf "%a" Cmi_format.report_error err in + let warn = Warnings.No_cmi_file(name, Some msg) in + Location.prerr_warning Location.none warn + | Error err -> + let msg = + match err with + | Illegal_renaming(name, ps_name, filename) -> + Format.asprintf + " %a@ contains the compiled interface for @ \ + %s when %s was expected" + Location.print_filename filename ps_name name + | Inconsistent_import _ -> assert false + | Need_recursive_types(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 + let warn = Warnings.No_cmi_file(name, Some msg) in + Location.prerr_warning Location.none warn + +let read_pers_struct modname filename = + read_pers_struct true modname filename + +let find_pers_struct name = + find_pers_struct true name + +let check_pers_struct name = + if not (Hashtbl.mem persistent_structures name) then begin + (* PR#6843: record the weak dependency ([add_import]) regardless of + whether the check succeeds, to help make builds more + deterministic. *) + add_import name; + if (Warnings.is_active (Warnings.No_cmi_file("", None))) then + !add_delayed_check_forward + (fun () -> check_pers_struct name) + end + +let reset_cache () = + current_unit := ""; + Hashtbl.clear persistent_structures; + clear_imports (); + Hashtbl.clear value_declarations; + Hashtbl.clear type_declarations; + Hashtbl.clear module_declarations; + Hashtbl.clear used_constructors; + Hashtbl.clear prefixed_sg + +let reset_cache_toplevel () = + (* Delete 'missing cmi' entries from the cache. *) + let l = + Hashtbl.fold + (fun name r acc -> if r = None then name :: acc else acc) + persistent_structures [] + in + List.iter (Hashtbl.remove persistent_structures) l; + Hashtbl.clear value_declarations; + Hashtbl.clear type_declarations; + Hashtbl.clear module_declarations; + Hashtbl.clear used_constructors; + Hashtbl.clear prefixed_sg + + +let set_unit_name name = + current_unit := name + +let get_unit_name () = + !current_unit + +(* Lookup by identifier *) + +let rec find_module_descr path env = + match path with + Pident id -> + begin try + IdTbl.find_same id env.components + with Not_found -> + if Ident.persistent id && not (Ident.name id = !current_unit) + then (find_pers_struct (Ident.name id)).ps_comps + else raise Not_found + end + | Pdot(p, s, _pos) -> + begin match get_components (find_module_descr p env) with + Structure_comps c -> + let (descr, _pos) = Tbl.find_str s c.comp_components in + descr + | Functor_comps _ -> + raise Not_found + end + | Papply(p1, p2) -> + begin match get_components (find_module_descr p1 env) with + Functor_comps f -> + !components_of_functor_appl' f env p1 p2 + | Structure_comps _ -> + raise Not_found + end + +let find proj1 proj2 path env = + match path with + Pident id -> + IdTbl.find_same id (proj1 env) + | Pdot(p, s, _pos) -> + begin match get_components (find_module_descr p env) with + Structure_comps c -> + let (data, _pos) = Tbl.find_str s (proj2 c) in data + | Functor_comps _ -> + raise Not_found + end + | Papply _ -> + raise Not_found + +let find_value = + find (fun env -> env.values) (fun sc -> sc.comp_values) +and find_type_full = + find (fun env -> env.types) (fun sc -> sc.comp_types) +and find_modtype = + find (fun env -> env.modtypes) (fun sc -> sc.comp_modtypes) +and find_class = + find (fun env -> env.classes) (fun sc -> sc.comp_classes) +and find_cltype = + find (fun env -> env.cltypes) (fun sc -> sc.comp_cltypes) + +let type_of_cstr path = function + | {cstr_inlined = Some d; _} -> + (d, ([], List.map snd (Datarepr.labels_of_type path d))) + | _ -> + assert false + +let find_type_full path env = + match Path.constructor_typath path with + | Regular p -> + (try (PathMap.find p env.local_constraints, ([], [])) + with Not_found -> find_type_full p env) + | Cstr (ty_path, s) -> + let (_, (cstrs, _)) = + try find_type_full ty_path env + with Not_found -> assert false + in + let cstr = + try List.find (fun cstr -> cstr.cstr_name = s) cstrs + with Not_found -> assert false + in + type_of_cstr path cstr + | LocalExt id -> + let cstr = + try TycompTbl.find_same id env.constrs + with Not_found -> assert false + in + type_of_cstr path cstr + | Ext (mod_path, s) -> + let comps = + try find_module_descr mod_path env + with Not_found -> assert false + in + let comps = + match get_components comps with + | Structure_comps c -> c + | Functor_comps _ -> assert false + in + let exts = + List.filter + (function {cstr_tag=Cstr_extension _} -> true | _ -> false) + (try Tbl.find_str s comps.comp_constrs + with Not_found -> assert false) + in + match exts with + | [cstr] -> type_of_cstr path cstr + | _ -> assert false + +let find_type p env = + fst (find_type_full p env) +let find_type_descrs p env = + snd (find_type_full p env) + +let find_module ~alias path env = + match path with + Pident id -> + begin try + let data = IdTbl.find_same id env.modules in + EnvLazy.force subst_modtype_maker data + with Not_found -> + if Ident.persistent id && not (Ident.name id = !current_unit) then + let ps = find_pers_struct (Ident.name id) in + md (Mty_signature(Lazy.force ps.ps_sig)) + else raise Not_found + end + | Pdot(p, s, _pos) -> + begin match get_components (find_module_descr p env) with + Structure_comps c -> + let (data, _pos) = Tbl.find_str s c.comp_modules in + EnvLazy.force subst_modtype_maker data + | Functor_comps _ -> + raise Not_found + end + | Papply(p1, p2) -> + let desc1 = find_module_descr p1 env in + begin match get_components desc1 with + Functor_comps f -> + md begin match f.fcomp_res with + | Mty_alias _ as mty -> mty + | mty -> + if alias then mty else + try + Hashtbl.find f.fcomp_subst_cache p2 + with Not_found -> + let mty = + Subst.modtype + (Subst.add_module f.fcomp_param p2 Subst.identity) + f.fcomp_res in + Hashtbl.add f.fcomp_subst_cache p2 mty; + mty + end + | Structure_comps _ -> + 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 = + match path with + Pdot(p, s, pos) -> + Pdot(normalize_path lax env p, s, pos) + | Papply(p1, p2) -> + Papply(normalize_path lax env p1, normalize_path true env p2) + | _ -> 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' + | _ -> path + with Not_found when lax + || (match path with Pident id -> not (Ident.persistent id) | _ -> true) -> + path + +let normalize_path oloc env path = + try normalize_path (oloc = None) env path + with Not_found -> + match oloc with None -> assert false + | Some loc -> + raise (Error(Missing_module(loc, path, normalize_path true env path))) + +let normalize_path_prefix oloc env path = + match path with + Pdot(p, s, pos) -> + Pdot(normalize_path oloc env p, s, pos) + | Pident _ -> + path + | Papply _ -> + assert false + + +let find_module = find_module ~alias:false + +(* Find the manifest type associated to a type when appropriate: + - the type should be public or should have a private row, + - the type should have an associated manifest type. *) +let find_type_expansion path env = + let decl = find_type path env in + match decl.type_manifest with + | Some body when decl.type_private = Public + || decl.type_kind <> Type_abstract + || Btype.has_constr_row body -> + (decl.type_params, body, may_map snd decl.type_newtype_level) + (* The manifest type of Private abstract data types without + private row are still considered unknown to the type system. + Hence, this case is caught by the following clause that also handles + purely abstract data types without manifest type definition. *) + | _ -> raise Not_found + +(* Find the manifest type information associated to a type, i.e. + the necessary information for the compiler's type-based optimisations. + In particular, the manifest type associated to a private abstract type + is revealed for the sake of compiler's type-based optimisations. *) +let find_type_expansion_opt path env = + let decl = find_type path env in + match decl.type_manifest with + (* The manifest type of Private abstract data types can still get + an approximation using their manifest type. *) + | Some body -> (decl.type_params, body, may_map snd decl.type_newtype_level) + | _ -> raise Not_found + +let find_modtype_expansion path env = + match (find_modtype path env).mtd_type with + | None -> raise Not_found + | Some mty -> mty + +let rec is_functor_arg path env = + match path with + Pident id -> + begin try Ident.find_same id env.functor_args; true + with Not_found -> false + end + | Pdot (p, _s, _) -> is_functor_arg p env + | Papply _ -> true + +(* Lookup by name *) + +exception Recmodule + +let report_deprecated ?loc p deprecated = + match loc, deprecated with + | Some loc, Some txt -> + let txt = if txt = "" then "" else "\n" ^ txt in + Location.deprecated loc (Printf.sprintf "module %s%s" (Path.name p) txt) + | _ -> () + +let mark_module_used env name loc = + if not (is_implicit_coercion env) then + try Hashtbl.find module_declarations (name, loc) () + with Not_found -> () + +let rec lookup_module_descr_aux ?loc lid env = + match lid with + Lident s -> + begin try + IdTbl.find_name s env.components + with Not_found -> + if s = !current_unit then raise Not_found; + let ps = find_pers_struct s in + (Pident(Ident.create_persistent s), ps.ps_comps) + end + | Ldot(l, s) -> + let (p, descr) = lookup_module_descr ?loc l env in + begin match get_components descr with + Structure_comps c -> + let (descr, pos) = Tbl.find_str s c.comp_components in + (Pdot(p, s, pos), descr) + | Functor_comps _ -> + raise Not_found + end + | Lapply(l1, l2) -> + let (p1, desc1) = lookup_module_descr ?loc l1 env in + let p2 = lookup_module ~load:true ?loc l2 env in + let {md_type=mty2} = find_module p2 env in + begin match get_components desc1 with + Functor_comps f -> + let loc = match loc with Some l -> l | None -> Location.none in + Misc.may (!check_modtype_inclusion ~loc env mty2 p2) f.fcomp_arg; + (Papply(p1, p2), !components_of_functor_appl' f env p1 p2) + | Structure_comps _ -> + raise Not_found + end + +and lookup_module_descr ?loc lid env = + let (p, comps) as res = lookup_module_descr_aux ?loc lid env in + mark_module_used env (Path.last p) comps.loc; +(* + Format.printf "USE module %s at %a@." (Path.last p) + Location.print comps.loc; +*) + report_deprecated ?loc p comps.deprecated; + res + +and lookup_module ~load ?loc lid env : Path.t = + match lid with + Lident s -> + begin try + let (p, data) = IdTbl.find_name s env.modules in + let {md_loc; md_attributes; md_type} = + EnvLazy.force subst_modtype_maker data + in + mark_module_used env s md_loc; + begin match md_type with + | 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 + (Builtin_attributes.deprecated_of_attrs md_attributes); + p + with Not_found -> + if s = !current_unit then raise Not_found; + let p = Pident(Ident.create_persistent s) in + if !Clflags.transparent_modules && not load then check_pers_struct s + else begin + let ps = find_pers_struct s in + report_deprecated ?loc p ps.ps_comps.deprecated + end; + p + end + | Ldot(l, s) -> + let (p, descr) = lookup_module_descr ?loc l env in + begin match get_components descr with + Structure_comps c -> + let (_data, pos) = Tbl.find_str s c.comp_modules in + let (comps, _) = Tbl.find_str s c.comp_components in + mark_module_used env s comps.loc; + let p = Pdot(p, s, pos) in + report_deprecated ?loc p comps.deprecated; + p + | Functor_comps _ -> + raise Not_found + end + | Lapply(l1, l2) -> + let (p1, desc1) = lookup_module_descr ?loc l1 env in + let p2 = lookup_module ~load:true ?loc l2 env in + let {md_type=mty2} = find_module p2 env in + let p = Papply(p1, p2) in + begin match get_components desc1 with + Functor_comps f -> + let loc = match loc with Some l -> l | None -> Location.none in + Misc.may (!check_modtype_inclusion ~loc env mty2 p2) f.fcomp_arg; + p + | Structure_comps _ -> + raise Not_found + end + +let lookup proj1 proj2 ?loc lid env = + match lid with + Lident s -> + IdTbl.find_name s (proj1 env) + | Ldot(l, s) -> + let (p, desc) = lookup_module_descr ?loc l env in + begin match get_components desc with + Structure_comps c -> + let (data, pos) = Tbl.find_str s (proj2 c) in + (Pdot(p, s, pos), data) + | Functor_comps _ -> + raise Not_found + end + | Lapply _ -> + raise Not_found + +let lookup_all_simple proj1 proj2 shadow ?loc lid env = + match lid with + Lident s -> + let xl = TycompTbl.find_all s (proj1 env) in + let rec do_shadow = + function + | [] -> [] + | ((x, f) :: xs) -> + (x, f) :: + (do_shadow (List.filter (fun (y, _) -> not (shadow x y)) xs)) + in + do_shadow xl + | Ldot(l, s) -> + let (_p, desc) = lookup_module_descr ?loc l env in + begin match get_components desc with + Structure_comps c -> + let comps = + try Tbl.find_str s (proj2 c) with Not_found -> [] + in + List.map + (fun data -> (data, (fun () -> ()))) + comps + | Functor_comps _ -> + raise Not_found + end + | Lapply _ -> + raise Not_found + +let has_local_constraints env = not (PathMap.is_empty env.local_constraints) + +let cstr_shadow cstr1 cstr2 = + match cstr1.cstr_tag, cstr2.cstr_tag with + | Cstr_extension _, Cstr_extension _ -> true + | _ -> false + +let lbl_shadow _lbl1 _lbl2 = false + +let lookup_value = + lookup (fun env -> env.values) (fun sc -> sc.comp_values) +let lookup_all_constructors = + lookup_all_simple (fun env -> env.constrs) (fun sc -> sc.comp_constrs) + cstr_shadow +let lookup_all_labels = + lookup_all_simple (fun env -> env.labels) (fun sc -> sc.comp_labels) + lbl_shadow +let lookup_type = + lookup (fun env -> env.types) (fun sc -> sc.comp_types) +let lookup_modtype = + lookup (fun env -> env.modtypes) (fun sc -> sc.comp_modtypes) +let lookup_class = + lookup (fun env -> env.classes) (fun sc -> sc.comp_classes) +let lookup_cltype = + lookup (fun env -> env.cltypes) (fun sc -> sc.comp_cltypes) + +let copy_types l env = + let f desc = {desc with val_type = Subst.type_expr Subst.identity desc.val_type} in + let values = List.fold_left (fun env s -> IdTbl.update s f env) env.values l in + {env with values; summary = Env_copy_types (env.summary, l)} + +let mark_value_used env name vd = + if not (is_implicit_coercion env) then + try Hashtbl.find value_declarations (name, vd.val_loc) () + with Not_found -> () + +let mark_type_used env name vd = + if not (is_implicit_coercion env) then + try Hashtbl.find type_declarations (name, vd.type_loc) () + with Not_found -> () + +let mark_constructor_used usage env name vd constr = + if not (is_implicit_coercion env) then + try Hashtbl.find used_constructors (name, vd.type_loc, constr) usage + with Not_found -> () + +let mark_extension_used usage env ext name = + if not (is_implicit_coercion env) then + let ty_name = Path.last ext.ext_type_path in + try Hashtbl.find used_constructors (ty_name, ext.ext_loc, name) usage + with Not_found -> () + +let set_value_used_callback name vd callback = + let key = (name, vd.val_loc) in + try + let old = Hashtbl.find value_declarations key in + Hashtbl.replace value_declarations key (fun () -> old (); callback ()) + (* this is to support cases like: + let x = let x = 1 in x in x + where the two declarations have the same location + (e.g. resulting from Camlp4 expansion of grammar entries) *) + with Not_found -> + Hashtbl.add value_declarations key callback + +let set_type_used_callback name td callback = + let loc = td.type_loc in + if loc.Location.loc_ghost then () + else let key = (name, loc) in + let old = + try Hashtbl.find type_declarations key + with Not_found -> assert false + in + Hashtbl.replace type_declarations key (fun () -> callback old) + +let lookup_value ?loc lid env = + let (_, desc) as r = lookup_value ?loc lid env in + mark_value_used env (Longident.last lid) desc; + r + +let lookup_type ?loc lid env = + let (path, (decl, _)) = lookup_type ?loc lid env in + mark_type_used env (Longident.last lid) decl; + path + +let mark_type_path env path = + try + let decl = find_type path env in + mark_type_used env (Path.last path) decl + with Not_found -> () + +let ty_path t = + match repr t with + | {desc=Tconstr(path, _, _)} -> path + | _ -> assert false + +let lookup_constructor ?loc lid env = + match lookup_all_constructors ?loc lid env with + [] -> raise Not_found + | (desc, use) :: _ -> + mark_type_path env (ty_path desc.cstr_res); + use (); + desc + +let is_lident = function + Lident _ -> true + | _ -> false + +let lookup_all_constructors ?loc lid env = + try + let cstrs = lookup_all_constructors ?loc lid env in + let wrap_use desc use () = + mark_type_path env (ty_path desc.cstr_res); + use () + in + List.map (fun (cstr, use) -> (cstr, wrap_use cstr use)) cstrs + with + Not_found when is_lident lid -> [] + +let mark_constructor usage env name desc = + if not (is_implicit_coercion env) + then match desc.cstr_tag with + | Cstr_extension _ -> + begin + let ty_path = ty_path desc.cstr_res in + let ty_name = Path.last ty_path in + try Hashtbl.find used_constructors (ty_name, desc.cstr_loc, name) usage + with Not_found -> () + end + | _ -> + let ty_path = ty_path desc.cstr_res in + let ty_decl = try find_type ty_path env with Not_found -> assert false in + let ty_name = Path.last ty_path in + mark_constructor_used usage env ty_name ty_decl name + +let lookup_label ?loc lid env = + match lookup_all_labels ?loc lid env with + [] -> raise Not_found + | (desc, use) :: _ -> + mark_type_path env (ty_path desc.lbl_res); + use (); + desc + +let lookup_all_labels ?loc lid env = + try + let lbls = lookup_all_labels ?loc lid env in + let wrap_use desc use () = + mark_type_path env (ty_path desc.lbl_res); + use () + in + List.map (fun (lbl, use) -> (lbl, wrap_use lbl use)) lbls + with + Not_found when is_lident lid -> [] + +let lookup_class ?loc lid env = + let (_, desc) as r = lookup_class ?loc lid env in + (* special support for Typeclass.unbound_class *) + if Path.name desc.cty_path = "" then ignore (lookup_type ?loc lid env) + else mark_type_path env desc.cty_path; + r + +let lookup_cltype ?loc lid env = + let (_, desc) as r = lookup_cltype ?loc lid env in + if Path.name desc.clty_path = "" then ignore (lookup_type ?loc lid env) + else mark_type_path env desc.clty_path; + mark_type_path env desc.clty_path; + r + +(* Iter on an environment (ignoring the body of functors and + not yet evaluated structures) *) + +type iter_cont = unit -> unit +let iter_env_cont = ref [] + +let rec scrape_alias_for_visit env mty = + match mty with + | Mty_alias(_, Pident id) + when Ident.persistent id + && not (Hashtbl.mem persistent_structures (Ident.name id)) -> false + | Mty_alias(_, path) -> (* PR#6600: find_module may raise Not_found *) + begin try scrape_alias_for_visit env (find_module path env).md_type + with Not_found -> false + end + | _ -> true + +let iter_env proj1 proj2 f env () = + IdTbl.iter (fun id x -> f (Pident id) x) (proj1 env); + let rec iter_components path path' mcomps = + let cont () = + let visit = + match EnvLazy.get_arg mcomps.comps with + | None -> true + | Some (env, _sub, _path, mty) -> scrape_alias_for_visit env mty + in + if not visit then () else + match get_components mcomps with + Structure_comps comps -> + Tbl.iter + (fun s (d, n) -> f (Pdot (path, s, n)) (Pdot (path', s, n), d)) + (proj2 comps); + Tbl.iter + (fun s (c, n) -> + iter_components (Pdot (path, s, n)) (Pdot (path', s, n)) c) + comps.comp_components + | Functor_comps _ -> () + in iter_env_cont := (path, cont) :: !iter_env_cont + in + Hashtbl.iter + (fun s pso -> + match pso with None -> () + | Some ps -> + let id = Pident (Ident.create_persistent s) in + iter_components id id ps.ps_comps) + persistent_structures; + IdTbl.iter + (fun id (path, comps) -> iter_components (Pident id) path comps) + env.components + +let run_iter_cont l = + iter_env_cont := []; + List.iter (fun c -> c ()) l; + let cont = List.rev !iter_env_cont in + iter_env_cont := []; + cont + +let iter_types f = iter_env (fun env -> env.types) (fun sc -> sc.comp_types) f + +let same_types env1 env2 = + env1.types == env2.types && env1.components == env2.components + +let used_persistent () = + let r = ref Concr.empty in + Hashtbl.iter (fun s pso -> if pso != None then r := Concr.add s !r) + persistent_structures; + !r + +let find_all_comps proj s (p,mcomps) = + match get_components mcomps with + Functor_comps _ -> [] + | Structure_comps comps -> + try let (c,n) = Tbl.find_str s (proj comps) in [Pdot(p,s,n), c] + with Not_found -> [] + +let rec find_shadowed_comps path env = + match path with + Pident id -> + IdTbl.find_all (Ident.name id) env.components + | Pdot (p, s, _) -> + let l = find_shadowed_comps p env in + let l' = + List.map (find_all_comps (fun comps -> comps.comp_components) s) l in + List.flatten l' + | Papply _ -> [] + +let find_shadowed proj1 proj2 path env = + match path with + Pident id -> + IdTbl.find_all (Ident.name id) (proj1 env) + | Pdot (p, s, _) -> + let l = find_shadowed_comps p env in + let l' = List.map (find_all_comps proj2 s) l in + List.flatten l' + | Papply _ -> [] + +let find_shadowed_types path env = + List.map fst + (find_shadowed + (fun env -> env.types) (fun comps -> comps.comp_types) path env) + + +(* GADT instance tracking *) + +let add_gadt_instance_level lv env = + {env with + gadt_instances = (lv, ref TypeSet.empty) :: env.gadt_instances} + +let is_Tlink = function {desc = Tlink _} -> true | _ -> false + +let gadt_instance_level env t = + let rec find_instance = function + [] -> None + | (lv, r) :: rem -> + if TypeSet.exists is_Tlink !r then + (* Should we use set_typeset ? *) + r := TypeSet.fold (fun ty -> TypeSet.add (repr ty)) !r TypeSet.empty; + if TypeSet.mem t !r then Some lv else find_instance rem + in find_instance env.gadt_instances + +let add_gadt_instances env lv tl = + let r = + try List.assoc lv env.gadt_instances with Not_found -> assert false in + (* Format.eprintf "Added"; + List.iter (fun ty -> Format.eprintf "@ %a" !Btype.print_raw ty) tl; + Format.eprintf "@."; *) + set_typeset r (List.fold_right TypeSet.add tl !r) + +(* Only use this after expand_head! *) +let add_gadt_instance_chain env lv t = + let r = + try List.assoc lv env.gadt_instances with Not_found -> assert false in + let rec add_instance t = + let t = repr t in + if not (TypeSet.mem t !r) then begin + (* Format.eprintf "@ %a" !Btype.print_raw t; *) + set_typeset r (TypeSet.add t !r); + match t.desc with + Tconstr (p, _, memo) -> + may add_instance (find_expans Private p !memo) + | _ -> () + end + in + (* Format.eprintf "Added chain"; *) + add_instance t + (* Format.eprintf "@." *) + +(* Expand manifest module type names at the top of the given module type *) + +let rec scrape_alias env ?path mty = + match mty, path with + Mty_ident p, _ -> + begin try + scrape_alias env (find_modtype_expansion p env) ?path + with Not_found -> + mty + end + | Mty_alias(_, path), _ -> + begin try + scrape_alias env (find_module path env).md_type ~path + with Not_found -> + (*Location.prerr_warning Location.none + (Warnings.No_cmi_file (Path.name path));*) + mty + end + | mty, Some path -> + !strengthen ~aliasable:true env mty path + | _ -> mty + +let scrape_alias env mty = scrape_alias env mty + +(* Given a signature and a root path, prefix all idents in the signature + by the root path and build the corresponding substitution. *) + +let rec prefix_idents root pos sub = function + [] -> ([], sub) + | Sig_value(id, decl) :: rem -> + let p = Pdot(root, Ident.name id, pos) in + let nextpos = match decl.val_kind with Val_prim _ -> pos | _ -> pos+1 in + let (pl, final_sub) = prefix_idents root nextpos sub rem in + (p::pl, final_sub) + | Sig_type(id, _, _) :: rem -> + let p = Pdot(root, Ident.name id, nopos) in + let (pl, final_sub) = + prefix_idents root pos (Subst.add_type id p sub) rem in + (p::pl, final_sub) + | Sig_typext(id, _, _) :: rem -> + let p = Pdot(root, Ident.name id, pos) in + (* we extend the substitution in case of an inlined record *) + let (pl, final_sub) = + prefix_idents root (pos+1) (Subst.add_type id p sub) rem in + (p::pl, final_sub) + | Sig_module(id, _, _) :: rem -> + let p = Pdot(root, Ident.name id, pos) in + let (pl, final_sub) = + prefix_idents root (pos+1) (Subst.add_module id p sub) rem in + (p::pl, final_sub) + | Sig_modtype(id, _) :: rem -> + let p = Pdot(root, Ident.name id, nopos) in + let (pl, final_sub) = + 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_type(id, _, _) :: rem -> + let p = Pdot(root, Ident.name id, nopos) in + let (pl, final_sub) = + prefix_idents root pos (Subst.add_type id p sub) rem in + (p::pl, final_sub) + +let prefix_idents root sub sg = + if sub = Subst.identity then + let sgs = + try + Hashtbl.find prefixed_sg root + with Not_found -> + let sgs = ref [] in + Hashtbl.add prefixed_sg root sgs; + sgs + in + try + List.assq sg !sgs + with Not_found -> + let r = prefix_idents root 0 sub sg in + sgs := (sg, r) :: !sgs; + r + else + prefix_idents root 0 sub sg + +(* Compute structure descriptions *) + +let add_to_tbl id decl tbl = + let decls = + try Tbl.find_str id tbl with Not_found -> [] in + Tbl.add id (decl :: decls) tbl + +let rec components_of_module ~deprecated ~loc env sub path mty = + { + deprecated; + loc; + comps = EnvLazy.create (env, sub, path, mty) + } + +and components_of_module_maker (env, sub, path, mty) = + match scrape_alias env mty with + Mty_signature sg -> + let c = + { comp_values = Tbl.empty; + comp_constrs = Tbl.empty; + comp_labels = Tbl.empty; comp_types = Tbl.empty; + comp_modules = Tbl.empty; comp_modtypes = Tbl.empty; + comp_components = Tbl.empty; comp_classes = Tbl.empty; + comp_cltypes = Tbl.empty } in + let pl, sub = prefix_idents path sub sg in + let env = ref env in + let pos = ref 0 in + List.iter2 (fun item path -> + match item with + Sig_value(id, decl) -> + let decl' = Subst.value_description sub decl in + c.comp_values <- + Tbl.add (Ident.name id) (decl', !pos) c.comp_values; + begin match decl.val_kind with + Val_prim _ -> () | _ -> incr pos + end + | Sig_type(id, decl, _) -> + let decl' = Subst.type_declaration sub decl in + Datarepr.set_row_name decl' (Subst.type_path sub (Path.Pident id)); + let constructors = + List.map snd (Datarepr.constructors_of_type path decl') in + let labels = + List.map snd (Datarepr.labels_of_type path decl') in + c.comp_types <- + Tbl.add (Ident.name id) + ((decl', (constructors, labels)), nopos) + c.comp_types; + List.iter + (fun descr -> + c.comp_constrs <- + add_to_tbl descr.cstr_name descr c.comp_constrs) + constructors; + List.iter + (fun descr -> + c.comp_labels <- + add_to_tbl descr.lbl_name descr c.comp_labels) + labels; + env := store_type_infos id decl !env + | Sig_typext(id, ext, _) -> + let ext' = Subst.extension_constructor sub ext in + let descr = Datarepr.extension_descr path ext' in + c.comp_constrs <- + add_to_tbl (Ident.name id) descr c.comp_constrs; + incr pos + | Sig_module(id, md, _) -> + let md' = EnvLazy.create (sub, md) in + c.comp_modules <- + Tbl.add (Ident.name id) (md', !pos) c.comp_modules; + let deprecated = + Builtin_attributes.deprecated_of_attrs md.md_attributes + in + let comps = + components_of_module ~deprecated ~loc:md.md_loc !env sub path + md.md_type + in + c.comp_components <- + Tbl.add (Ident.name id) (comps, !pos) c.comp_components; + env := store_module ~check:false id md !env; + incr pos + | Sig_modtype(id, decl) -> + let decl' = Subst.modtype_declaration sub decl in + 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_type(id, decl, _) -> + let decl' = Subst.cltype_declaration sub decl in + c.comp_cltypes <- + Tbl.add (Ident.name id) (decl', !pos) c.comp_cltypes) + sg pl; + Some (Structure_comps c) + | Mty_functor(param, ty_arg, ty_res) -> + Some (Functor_comps { + fcomp_param = param; + (* fcomp_arg and fcomp_res must be prefixed eagerly, because + they are interpreted in the outer environment *) + fcomp_arg = may_map (Subst.modtype sub) ty_arg; + fcomp_res = Subst.modtype sub ty_res; + fcomp_cache = Hashtbl.create 17; + fcomp_subst_cache = Hashtbl.create 17 }) + | Mty_ident _ + | Mty_alias _ -> None + +(* Insertion of bindings by identifier + path *) + +and check_usage loc id warn tbl = + if not loc.Location.loc_ghost && Warnings.is_active (warn "") then begin + let name = Ident.name id in + let key = (name, loc) in + if Hashtbl.mem tbl key then () + else let used = ref false in + Hashtbl.add tbl key (fun () -> used := true); + if not (name = "" || name.[0] = '_' || name.[0] = '#') + then + !add_delayed_check_forward + (fun () -> if not !used then Location.prerr_warning loc (warn name)) + end; + +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 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))) + done + + +and store_value ?check id decl env = + check_value_name (Ident.name id) decl.val_loc; + may (fun f -> check_usage decl.val_loc id f value_declarations) check; + { env with + values = IdTbl.add id decl env.values; + summary = Env_value(env.summary, id, decl) } + +and store_type ~check id info env = + let loc = info.type_loc in + if check then + check_usage loc id (fun s -> Warnings.Unused_type_declaration s) + type_declarations; + let path = Pident id in + let constructors = Datarepr.constructors_of_type path info in + let labels = Datarepr.labels_of_type path info in + let descrs = (List.map snd constructors, List.map snd labels) in + + if check && not loc.Location.loc_ghost && + Warnings.is_active (Warnings.Unused_constructor ("", false, false)) + then begin + let ty = Ident.name id in + List.iter + begin fun (_, {cstr_name = c; _}) -> + let k = (ty, loc, c) in + if not (Hashtbl.mem used_constructors k) then + let used = constructor_usages () in + Hashtbl.add used_constructors k (add_constructor_usage used); + if not (ty = "" || ty.[0] = '_') + then !add_delayed_check_forward + (fun () -> + if not (is_in_signature env) && not used.cu_positive then + Location.prerr_warning loc + (Warnings.Unused_constructor + (c, used.cu_pattern, used.cu_privatize))) + end + constructors + end; + { env with + constrs = + List.fold_right + (fun (id, descr) constrs -> TycompTbl.add id descr constrs) + constructors + env.constrs; + labels = + List.fold_right + (fun (id, descr) labels -> TycompTbl.add id descr labels) + labels + env.labels; + types = + IdTbl.add id (info, descrs) env.types; + summary = Env_type(env.summary, id, info) } + +and store_type_infos id info env = + (* Simplified version of store_type that doesn't compute and store + constructor and label infos, but simply record the arity and + manifest-ness of the type. Used in components_of_module to + keep track of type abbreviations (e.g. type t = float) in the + computation of label representations. *) + { env with + types = IdTbl.add id (info,([],[])) + env.types; + summary = Env_type(env.summary, id, info) } + +and store_extension ~check id ext env = + let loc = ext.ext_loc in + if check && not loc.Location.loc_ghost && + Warnings.is_active (Warnings.Unused_extension ("", false, false, false)) + then begin + let is_exception = Path.same ext.ext_type_path Predef.path_exn in + let ty = Path.last ext.ext_type_path in + let n = Ident.name id in + let k = (ty, loc, n) in + 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 + (fun () -> + if not (is_in_signature env) && not used.cu_positive then + Location.prerr_warning loc + (Warnings.Unused_extension + (n, is_exception, used.cu_pattern, used.cu_privatize) + ) + ) + end; + end; + { env with + constrs = TycompTbl.add id + (Datarepr.extension_descr (Pident id) ext) + env.constrs; + summary = Env_extension(env.summary, id, ext) } + +and store_module ~check id md env = + let loc = md.md_loc in + if check then + check_usage loc id (fun s -> Warnings.Unused_module s) + module_declarations; + + let deprecated = Builtin_attributes.deprecated_of_attrs md.md_attributes in + { env with + modules = IdTbl.add id (EnvLazy.create (Subst.identity, md)) env.modules; + components = + IdTbl.add id + (components_of_module ~deprecated ~loc:md.md_loc + env Subst.identity (Pident id) md.md_type) + env.components; + summary = Env_module(env.summary, id, md) } + +and store_modtype id info env = + { env with + 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 + cltypes = IdTbl.add id desc env.cltypes; + summary = Env_cltype(env.summary, id, desc) } + +(* Compute the components of a functor application in a path. *) + +let components_of_functor_appl f env p1 p2 = + try + Hashtbl.find f.fcomp_cache p2 + with Not_found -> + let p = Papply(p1, p2) in + let sub = Subst.add_module f.fcomp_param p2 Subst.identity in + let mty = Subst.modtype sub f.fcomp_res in + let comps = components_of_module ~deprecated:None ~loc:Location.none + (*???*) + env Subst.identity p mty in + Hashtbl.add f.fcomp_cache p2 comps; + comps + +(* Define forward functions *) + +let _ = + components_of_module' := components_of_module; + components_of_functor_appl' := components_of_functor_appl; + components_of_module_maker' := components_of_module_maker + +(* Insertion of bindings by identifier *) + +let add_functor_arg id env = + {env with + functor_args = Ident.add id () env.functor_args; + summary = Env_functor_arg (env.summary, id)} + +let add_value ?check id desc env = + store_value ?check id desc env + +let add_type ~check id info env = + store_type ~check id info env + +and add_extension ~check id ext env = + store_extension ~check id ext env + +and add_module_declaration ?(arg=false) ~check id md env = + let env = store_module ~check id md env in + if arg then add_functor_arg id env else 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 + +let add_module ?arg id mty env = + add_module_declaration ~check:false ?arg id (md mty) env + +let add_local_type path info env = + { env with + local_constraints = PathMap.add path info env.local_constraints } + +let add_local_constraint path info elv env = + match info with + {type_manifest = Some _; type_newtype_level = Some (lv, _)} -> + (* elv is the expansion level, lv is the definition level *) + let info = {info with type_newtype_level = Some (lv, elv)} in + add_local_type path info env + | _ -> assert false + + +(* Insertion of bindings by name *) + +let enter store_fun name data env = + let id = Ident.create name in (id, store_fun id data env) + +let enter_value ?check = enter (store_value ?check) +and enter_type = enter (store_type ~check:true) +and enter_extension = enter (store_extension ~check:true) +and enter_module_declaration ?arg id md env = + add_module_declaration ?arg ~check:true 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 = + let id = Ident.create s in + (id, enter_module_declaration ?arg id (md mty) env) + +(* Insertion of all components of a signature *) + +let add_item comp env = + match comp with + Sig_value(id, decl) -> add_value id decl env + | Sig_type(id, decl, _) -> add_type ~check:false id decl 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_type(id, decl, _) -> add_cltype id decl env + +let rec add_signature sg env = + match sg with + [] -> env + | comp :: rem -> add_signature rem (add_item comp env) + +(* Open a signature path *) + +let add_components slot root env0 comps = + let add_l w comps env0 = + TycompTbl.add_open slot w comps env0 + in + + let add w comps env0 = IdTbl.add_open slot w root comps env0 in + + let constrs = + add_l (fun x -> `Constructor x) comps.comp_constrs env0.constrs + in + let labels = + add_l (fun x -> `Label x) comps.comp_labels env0.labels + in + + let values = + add (fun x -> `Value x) comps.comp_values env0.values + in + let types = + add (fun x -> `Type x) comps.comp_types env0.types + in + let modtypes = + add (fun x -> `Module_type x) comps.comp_modtypes env0.modtypes + in + let classes = + add (fun x -> `Class x) comps.comp_classes env0.classes + in + let cltypes = + add (fun x -> `Class_type x) comps.comp_cltypes env0.cltypes + in + let components = + add (fun x -> `Component x) comps.comp_components env0.components + in + + let modules = + add (fun x -> `Module x) comps.comp_modules env0.modules + in + + { env0 with + summary = Env_open(env0.summary, root); + constrs; + labels; + values; + types; + modtypes; + classes; + cltypes; + components; + modules; + } + +let open_signature slot root env0 = + match get_components (find_module_descr root env0) with + | Functor_comps _ -> None + | Structure_comps comps -> Some (add_components slot root env0 comps) + + +(* Open a signature from a file *) + +let open_pers_signature name env = + match open_signature None (Pident(Ident.create_persistent name)) env with + | Some env -> env + | None -> assert false (* a compilation unit cannot refer to a functor *) + +let open_signature + ?(used_slot = ref false) + ?(loc = Location.none) ?(toplevel = false) ovf root env = + if not toplevel && ovf = Asttypes.Fresh && not loc.Location.loc_ghost + && (Warnings.is_active (Warnings.Unused_open "") + || Warnings.is_active (Warnings.Open_shadow_identifier ("", "")) + || Warnings.is_active (Warnings.Open_shadow_label_constructor ("",""))) + then begin + let used = used_slot in + !add_delayed_check_forward + (fun () -> + if not !used then begin + used := true; + Location.prerr_warning loc (Warnings.Unused_open (Path.name root)) + end + ); + let shadowed = ref [] in + let slot s b = + begin match check_shadowing env b with + | Some kind when not (List.mem (kind, s) !shadowed) -> + shadowed := (kind, s) :: !shadowed; + let w = + match kind with + | "label" | "constructor" -> + Warnings.Open_shadow_label_constructor (kind, s) + | _ -> Warnings.Open_shadow_identifier (kind, s) + in + Location.prerr_warning loc w + | _ -> () + end; + used := true + in + open_signature (Some slot) root env + end + else open_signature None root env + +(* Read a signature from a file *) + +let read_signature modname filename = + let ps = read_pers_struct modname filename in + Lazy.force ps.ps_sig + +(* Return the CRC of the interface of the given compilation unit *) + +let crc_of_unit name = + let ps = find_pers_struct name in + let crco = + try + List.assoc name ps.ps_crcs + with Not_found -> + assert false + in + match crco with + None -> assert false + | Some crc -> crc + +(* Return the list of imported interfaces with their CRCs *) + +let imports () = + 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 +(* Returns true if [s] is an opaque imported module *) +let is_imported_opaque s = + StringSet.mem s !imported_opaque_units + +(* Save a signature to a file *) + +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 = + (match deprecated with Some s -> [Deprecated s] | None -> []) + in + try + let cmi = { + cmi_name = modname; + cmi_sign = sg; + cmi_crcs = imports; + cmi_flags = flags; + } in + let crc = + create_cmi ?check_exists filename cmi in + (* Enter signature in persistent table so that imported_unit() + will also return its crc *) + let comps = + components_of_module ~deprecated ~loc:Location.none + empty Subst.identity + (Pident(Ident.create_persistent modname)) (Mty_signature sg) in + let ps = + { ps_name = modname; + ps_sig = lazy (Subst.signature Subst.identity sg); + ps_comps = comps; + ps_crcs = (cmi.cmi_name, Some crc) :: imports; + ps_filename = filename; + ps_flags = cmi.cmi_flags; + } in + save_pers_struct crc ps; + cmi + with exn -> + remove_file filename; + raise exn + +let save_signature ?check_exists ~deprecated sg modname filename = + save_signature_with_imports ?check_exists ~deprecated sg modname filename (imports()) + +(* Folding on environments *) + +let find_all proj1 proj2 f lid env acc = + match lid with + | None -> + IdTbl.fold_name + (fun name (p, data) acc -> f name p data acc) + (proj1 env) acc + | Some l -> + let p, desc = lookup_module_descr l env in + begin match get_components desc with + Structure_comps c -> + Tbl.fold + (fun s (data, pos) acc -> f s (Pdot (p, s, pos)) data acc) + (proj2 c) acc + | Functor_comps _ -> + acc + end + +let find_all_simple_list proj1 proj2 f lid env acc = + match lid with + | None -> + TycompTbl.fold_name + (fun data acc -> f data acc) + (proj1 env) acc + | Some l -> + let (_p, desc) = lookup_module_descr l env in + begin match get_components desc with + Structure_comps c -> + Tbl.fold + (fun _s comps acc -> + match comps with + [] -> acc + | data :: _ -> + f data acc) + (proj2 c) acc + | Functor_comps _ -> + acc + end + +let fold_modules f lid env acc = + match lid with + | None -> + let acc = + IdTbl.fold_name + (fun name (p, data) acc -> + let data = EnvLazy.force subst_modtype_maker data in + f name p data acc + ) + env.modules + acc + in + Hashtbl.fold + (fun name ps acc -> + match ps with + None -> acc + | Some ps -> + f name (Pident(Ident.create_persistent name)) + (md (Mty_signature (Lazy.force ps.ps_sig))) acc) + persistent_structures + acc + | Some l -> + let p, desc = lookup_module_descr l env in + begin match get_components desc with + Structure_comps c -> + Tbl.fold + (fun s (data, pos) acc -> + f s (Pdot (p, s, pos)) + (EnvLazy.force subst_modtype_maker data) acc) + c.comp_modules + acc + | Functor_comps _ -> + acc + end + +let fold_values f = + find_all (fun env -> env.values) (fun sc -> sc.comp_values) f +and fold_constructors f = + find_all_simple_list (fun env -> env.constrs) (fun sc -> sc.comp_constrs) f +and fold_labels f = + find_all_simple_list (fun env -> env.labels) (fun sc -> sc.comp_labels) f +and fold_types f = + find_all (fun env -> env.types) (fun sc -> sc.comp_types) f +and fold_modtypes f = + find_all (fun env -> env.modtypes) (fun sc -> sc.comp_modtypes) f +and fold_classs f = + find_all (fun env -> env.classes) (fun sc -> sc.comp_classes) f +and fold_cltypes f = + find_all (fun env -> env.cltypes) (fun sc -> sc.comp_cltypes) f + + +(* Make the initial environment *) +let initial_safe_string = + Predef.build_initial_env + (add_type ~check:false) + (add_extension ~check:false) + empty + +(* Return the environment summary *) + +let summary env = + if PathMap.is_empty env.local_constraints then env.summary + else Env_constraints (env.summary, env.local_constraints) + +let last_env = ref empty +let last_reduced_env = ref empty + +let keep_only_summary env = + if !last_env == env then !last_reduced_env + else begin + let new_env = + { + empty with + summary = env.summary; + local_constraints = env.local_constraints; + flags = env.flags; + } + in + last_env := env; + last_reduced_env := new_env; + new_env + end + + +let env_of_only_summary env_from_summary env = + let new_env = env_from_summary env.summary Subst.identity in + { new_env with + local_constraints = env.local_constraints; + flags = env.flags; + } + +(* Error report *) + +open Format + +let report_error ppf = function + | Illegal_renaming(modname, ps_name, filename) -> fprintf ppf + "Wrong file naming: %a@ contains the compiled interface for @ \ + %s when %s was expected" + Location.print_filename filename ps_name modname + | Inconsistent_import(name, source1, source2) -> fprintf ppf + "@[The files %a@ and %a@ \ + make inconsistent assumptions@ over interface %s@]" + Location.print_filename source1 Location.print_filename source2 name + | Need_recursive_types(import, export) -> + 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 + fprintf ppf "Internal path@ %s@ is dangling." (Path.name path1) + else + fprintf ppf "Internal path@ %s@ expands to@ %s@ which is dangling." + (Path.name path1) (Path.name path2); + fprintf ppf "@]@ @[%s@ %s@ %s.@]@]" + "The compiled interface for module" (Ident.name (Path.head path2)) + "was not found" + | Illegal_value_name(_loc, name) -> + fprintf ppf "'%s' is not a valid value identifier." + name + +let () = + Location.register_error_of_exn + (function + | Error (Missing_module (loc, _, _) + | Illegal_value_name (loc, _) + as err) when loc <> Location.none -> + Some (Location.error_of_printer loc report_error err) + | Error err -> Some (Location.error_of_printer_file report_error err) + | _ -> None + ) diff --git a/analysis/src/vendor/compiler-libs-406/env.mli b/analysis/src/vendor/compiler-libs-406/env.mli new file mode 100644 index 000000000..7bde230a2 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/env.mli @@ -0,0 +1,326 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Environment handling *) + +open Types + +module PathMap : Map.S with type key = Path.t + and type 'a t = 'a Map.Make(Path).t + +type summary = + Env_empty + | Env_value of summary * Ident.t * value_description + | Env_type of summary * Ident.t * type_declaration + | 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_cltype of summary * Ident.t * class_type_declaration + | Env_open of summary * Path.t + | Env_functor_arg of summary * Ident.t + | Env_constraints of summary * type_declaration PathMap.t + | Env_copy_types of summary * string list + +type t + +val empty: t +val initial_safe_string: t + +val diff: t -> t -> Ident.t list +val copy_local: from:t -> t -> t + +type type_descriptions = + constructor_description list * label_description list + +(* For short-paths *) +type iter_cont +val iter_types: + (Path.t -> Path.t * (type_declaration * type_descriptions) -> unit) -> + t -> iter_cont +val run_iter_cont: iter_cont list -> (Path.t * iter_cont) list +val same_types: t -> t -> bool +val used_persistent: unit -> Concr.t +val find_shadowed_types: Path.t -> t -> Path.t list +val without_cmis: ('a -> 'b) -> 'a -> 'b + (* [without_cmis f arg] applies [f] to [arg], but does not + allow opening cmis during its execution *) + +(* Lookup by paths *) + +val find_value: Path.t -> t -> value_description +val find_type: Path.t -> t -> type_declaration +val find_type_descrs: Path.t -> t -> type_descriptions +val find_module: Path.t -> t -> module_declaration +val find_modtype: Path.t -> t -> modtype_declaration +val find_class: Path.t -> t -> class_declaration +val find_cltype: Path.t -> t -> class_type_declaration + +val find_type_expansion: + Path.t -> t -> type_expr list * type_expr * int option +val find_type_expansion_opt: + Path.t -> t -> type_expr list * type_expr * int option +(* Find the manifest type information associated to a type for the sake + of the compiler's type-based optimisations. *) +val find_modtype_expansion: Path.t -> t -> module_type +val add_functor_arg: Ident.t -> t -> t +val is_functor_arg: Path.t -> t -> bool +val normalize_path: Location.t option -> t -> Path.t -> Path.t +(* Normalize the path to a concrete value or module. + If the option is None, allow returning dangling paths. + Otherwise raise a Missing_module error, and may add forgotten + 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 +val gadt_instance_level: t -> type_expr -> int option +val add_gadt_instances: t -> int -> type_expr list -> unit +val add_gadt_instance_chain: t -> int -> type_expr -> unit + +(* Lookup by long identifiers *) + +(* ?loc is used to report 'deprecated module' warnings *) + +val lookup_value: + ?loc:Location.t -> Longident.t -> t -> Path.t * value_description +val lookup_constructor: + ?loc:Location.t -> Longident.t -> t -> constructor_description +val lookup_all_constructors: + ?loc:Location.t -> + Longident.t -> t -> (constructor_description * (unit -> unit)) list +val lookup_label: + ?loc:Location.t -> Longident.t -> t -> label_description +val lookup_all_labels: + ?loc:Location.t -> + Longident.t -> t -> (label_description * (unit -> unit)) list +val lookup_type: + ?loc:Location.t -> Longident.t -> t -> Path.t + (* Since 4.04, this function no longer returns [type_description]. + To obtain it, you should either call [Env.find_type], or replace + it by [Typetexp.find_type] *) +val lookup_module: + load:bool -> ?loc:Location.t -> Longident.t -> t -> Path.t +val lookup_modtype: + ?loc:Location.t -> Longident.t -> t -> Path.t * modtype_declaration +val lookup_class: + ?loc:Location.t -> Longident.t -> t -> Path.t * class_declaration +val lookup_cltype: + ?loc:Location.t -> Longident.t -> t -> Path.t * class_type_declaration + +val copy_types: string list -> t -> t + (* Used only in Typecore.duplicate_ident_types. *) + +exception Recmodule + (* Raise by lookup_module when the identifier refers + to one of the modules of a recursive definition + during the computation of its approximation (see #5965). *) + +(* Insertion by identifier *) + +val add_value: + ?check:(string -> Warnings.t) -> Ident.t -> value_description -> t -> t +val add_type: check:bool -> Ident.t -> type_declaration -> t -> t +val add_extension: check:bool -> Ident.t -> extension_constructor -> t -> t +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 + +(* Insertion of all fields of a signature. *) + +val add_item: signature_item -> t -> t +val add_signature: signature -> t -> t + +(* Insertion of all fields of a signature, relative to the given path. + Used to implement open. Returns None if the path refers to a functor, + not a structure. *) +val open_signature: + ?used_slot:bool ref -> + ?loc:Location.t -> ?toplevel:bool -> Asttypes.override_flag -> Path.t -> + t -> t option + +val open_pers_signature: string -> t -> t + +(* Insertion by name *) + +val enter_value: + ?check:(string -> Warnings.t) -> + string -> value_description -> t -> Ident.t * t +val enter_type: string -> type_declaration -> t -> Ident.t * t +val enter_extension: string -> extension_constructor -> t -> Ident.t * t +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. *) +val reset_cache: unit -> unit + +(* To be called before each toplevel phrase. *) +val reset_cache_toplevel: unit -> unit + +(* Remember the name of the current compilation unit. *) +val set_unit_name: string -> unit +val get_unit_name: unit -> string + +(* Read, save a signature to/from a file *) + +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 + (* Arguments: signature, module name, file name, + imported units with their CRCs. *) + +(* Return the CRC of the interface of the given compilation unit *) + +val crc_of_unit: string -> Digest.t + +(* Return the set of compilation units imported, with their CRC *) + +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 *) + +val crc_units: Consistbl.t +val add_import: string -> unit + +(* Summaries -- compact representation of an environment, to be + exported in debugging information. *) + +val summary: t -> summary + +(* Return an equivalent environment where all fields have been reset, + except the summary. The initial environment can be rebuilt from the + summary, using Envaux.env_of_only_summary. *) + +val keep_only_summary : t -> t +val env_of_only_summary : (summary -> Subst.t -> t) -> t -> t + +(* Error report *) + +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 + +exception Error of error + +open Format + +val report_error: formatter -> error -> unit + + +val mark_value_used: t -> string -> value_description -> unit +val mark_module_used: t -> string -> Location.t -> unit +val mark_type_used: t -> string -> type_declaration -> unit + +type constructor_usage = Positive | Pattern | Privatize +val mark_constructor_used: + constructor_usage -> t -> string -> type_declaration -> string -> unit +val mark_constructor: + constructor_usage -> t -> string -> constructor_description -> unit +val mark_extension_used: + constructor_usage -> t -> extension_constructor -> string -> unit + +val in_signature: bool -> t -> t +val implicit_coercion: t -> t + +val is_in_signature: t -> bool + +val set_value_used_callback: + string -> value_description -> (unit -> unit) -> unit +val set_type_used_callback: + string -> type_declaration -> ((unit -> unit) -> unit) -> unit + +(* 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 +(* Forward declaration to break mutual recursion with Ctype. *) +val same_constr: (t -> type_expr -> type_expr -> bool) ref + +(** Folding over all identifiers (for analysis purpose) *) + +val fold_values: + (string -> Path.t -> value_description -> 'a -> 'a) -> + Longident.t option -> t -> 'a -> 'a +val fold_types: + (string -> Path.t -> type_declaration * type_descriptions -> 'a -> 'a) -> + Longident.t option -> t -> 'a -> 'a +val fold_constructors: + (constructor_description -> 'a -> 'a) -> + Longident.t option -> t -> 'a -> 'a +val fold_labels: + (label_description -> 'a -> 'a) -> + Longident.t option -> t -> 'a -> 'a + +(** Persistent structures are only traversed if they are already loaded. *) +val fold_modules: + (string -> Path.t -> module_declaration -> 'a -> 'a) -> + Longident.t option -> t -> 'a -> 'a + +val fold_modtypes: + (string -> Path.t -> modtype_declaration -> 'a -> 'a) -> + Longident.t option -> t -> 'a -> 'a +val fold_classs: + (string -> Path.t -> class_declaration -> 'a -> 'a) -> + Longident.t option -> t -> 'a -> 'a +val fold_cltypes: + (string -> Path.t -> class_type_declaration -> 'a -> 'a) -> + Longident.t option -> t -> 'a -> 'a + +(** Utilities *) +val scrape_alias: t -> module_type -> module_type +val check_value_name: string -> Location.t -> unit + +module Persistent_signature : sig + type t = + { filename : string; (** Name of the file containing the signature. *) + cmi : Cmi_format.cmi_infos } + + (** Function used to load a persistent signature. The default is to look for + the .cmi file in the load path. This function can be overridden to load + it from memory, for instance to build a self-contained toplevel. *) + val load : (unit_name:string -> t option) ref +end diff --git a/analysis/src/vendor/compiler-libs-406/ext_array.ml b/analysis/src/vendor/compiler-libs-406/ext_array.ml new file mode 100644 index 000000000..e33de2b9e --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_array.ml @@ -0,0 +1,241 @@ +(* 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/src/vendor/compiler-libs-406/ext_array.mli b/analysis/src/vendor/compiler-libs-406/ext_array.mli new file mode 100644 index 000000000..a2272630a --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_array.mli @@ -0,0 +1,78 @@ +(* 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. *) + + + + + + +(** 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_map : ('a -> 'b option) -> 'a array -> 'b array + +val range : int -> int -> int array + +val map2i : (int -> 'a -> 'b -> 'c ) -> 'a array -> 'b array -> 'c array + +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_acc : + ('a -> 'b option) -> + 'a array -> + 'b list -> + 'b list + +val of_list_map : ('a -> 'b) -> 'a list -> '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 rfind_and_split : + 'a array -> + ('a -> 'b -> bool) -> + 'b -> 'a split + +val find_and_split : + 'a array -> + ('a -> 'b -> bool) -> + 'b -> 'a split + +val exists : ('a -> bool) -> 'a array -> bool + +val is_empty : 'a array -> bool + +val for_all2_no_exn : + ('a -> 'b -> bool) -> + 'a array -> + 'b array -> + bool \ No newline at end of file diff --git a/analysis/src/vendor/compiler-libs-406/ext_bytes.ml b/analysis/src/vendor/compiler-libs-406/ext_bytes.ml new file mode 100644 index 000000000..fdd24211c --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_bytes.ml @@ -0,0 +1,76 @@ +(* 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/src/vendor/compiler-libs-406/ext_bytes.mli b/analysis/src/vendor/compiler-libs-406/ext_bytes.mli new file mode 100644 index 000000000..f08a1104f --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_bytes.mli @@ -0,0 +1,37 @@ +(* 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] + + + +(** Port the {!Bytes.escaped} from trunk to make it not locale sensitive *) + +val escaped : bytes -> bytes diff --git a/analysis/src/vendor/compiler-libs-406/ext_digest.ml b/analysis/src/vendor/compiler-libs-406/ext_digest.ml new file mode 100644 index 000000000..4a134830f --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_digest.ml @@ -0,0 +1,28 @@ +(* Copyright (C) 2019- 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. *) + + + let length = 16 + + let hex_length = 32 \ No newline at end of file diff --git a/analysis/src/vendor/compiler-libs-406/ext_io.ml b/analysis/src/vendor/compiler-libs-406/ext_io.ml new file mode 100644 index 000000000..d98177754 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_io.ml @@ -0,0 +1,54 @@ +(* 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. *) + + +(** 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 diff --git a/analysis/src/vendor/compiler-libs-406/ext_io.mli b/analysis/src/vendor/compiler-libs-406/ext_io.mli new file mode 100644 index 000000000..edbebfca7 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_io.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. *) + +val load_file : string -> string + +val rev_lines_of_file : string -> string list + +val rev_lines_of_chann : in_channel -> string list + +val write_file : string -> string -> unit diff --git a/analysis/src/vendor/compiler-libs-406/ext_json_parse.ml b/analysis/src/vendor/compiler-libs-406/ext_json_parse.ml new file mode 100644 index 000000000..b4e3993d6 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_json_parse.ml @@ -0,0 +1,601 @@ + +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 ({ 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 +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 + +and comment buf lexbuf = + __ocaml_lex_comment_rec buf lexbuf 40 +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 + +and scan_string buf start lexbuf = + __ocaml_lex_scan_string_rec buf start lexbuf 45 +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 + if v > 255 then + error lexbuf (Illegal_escape s) ; + Buffer.add_char buf (Char.chr v); + + 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 + Buffer.add_char buf (Char.chr v); + + 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 + +;; + + + + + + + + +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 String_map.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 = String_map.add key value acc ; loc = loc_start} + | Comma -> + parse_map loc_start (String_map.add key value acc) 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/src/vendor/compiler-libs-406/ext_json_parse.mli b/analysis/src/vendor/compiler-libs-406/ext_json_parse.mli new file mode 100644 index 000000000..b753f1fa9 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_json_parse.mli @@ -0,0 +1,37 @@ +(* 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/src/vendor/compiler-libs-406/ext_json_types.ml b/analysis/src/vendor/compiler-libs-406/ext_json_types.ml new file mode 100644 index 000000000..1a71e403c --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_json_types.ml @@ -0,0 +1,47 @@ +(* Copyright (C) 2015-2017 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 loc = Lexing.position +type json_str = + { str : string ; loc : loc} + +type json_flo = + { flo : string ; loc : loc} +type json_array = + { content : t array ; + loc_start : loc ; + loc_end : loc ; + } + +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 + diff --git a/analysis/src/vendor/compiler-libs-406/ext_json_write.ml b/analysis/src/vendor/compiler-libs-406/ext_json_write.ml new file mode 100644 index 000000000..601f3eea7 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_json_write.ml @@ -0,0 +1,86 @@ +(* 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. *) + +(** poor man's serialization *) + +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 (* + 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 + | [||] -> a "[]" + | _ -> + a "[ "; + encode_aux + (Array.unsafe_get content 0) + buf ; + for i = 1 to Array.length content - 1 do + a " , "; + encode_aux + (Array.unsafe_get content i) + buf + done; + a " ]" + end + | True _ -> a "true" + | False _ -> a "false" + | Obj {map; _} -> + if String_map.is_empty map then + a "{}" + else + begin + (*prerr_endline "WEIRD"; + prerr_endline (string_of_int @@ String_map.cardinal map ); *) + a "{ "; + let _ : int = String_map.fold (fun k v i -> + if i <> 0 then begin + a " , " + end; + a (quot k); + a " : "; + encode_aux v buf ; + i + 1 + ) map 0 in + a " }" + end + + +let to_string (x : Ext_json_types.t) = + let buf = Buffer.create 1024 in + encode_aux x buf ; + Buffer.contents buf + +let to_channel (oc : out_channel) x = + let buf = Buffer.create 1024 in + encode_aux x buf ; + Buffer.output_buffer oc buf diff --git a/analysis/src/vendor/compiler-libs-406/ext_json_write.mli b/analysis/src/vendor/compiler-libs-406/ext_json_write.mli new file mode 100644 index 000000000..d9cddb001 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_json_write.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. *) + + +val to_string : Ext_json_types.t -> string + +val to_channel : out_channel -> Ext_json_types.t -> unit \ No newline at end of file diff --git a/analysis/src/vendor/compiler-libs-406/ext_pervasives.ml b/analysis/src/vendor/compiler-libs-406/ext_pervasives.ml new file mode 100644 index 000000000..8682641af --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_pervasives.ml @@ -0,0 +1,109 @@ +(* 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/src/vendor/compiler-libs-406/ext_pervasives.mli b/analysis/src/vendor/compiler-libs-406/ext_pervasives.mli new file mode 100644 index 000000000..89c17ee17 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_pervasives.mli @@ -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. *) + + + + + + + + +(** Extension to standard library [Pervavives] module, safe to open +*) + +external reraise: exn -> 'a = "%reraise" + +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 min_int : int -> int -> int +val max_int_option : + int option -> + int option -> + int option + + + + + + +(* external id : 'a -> 'a = "%identity" *) + +(** Copied from {!Btype.hash_variant}: + need sync up and add test case +*) +(* val hash_variant : string -> int *) + +(* val todo : string -> 'a *) + +val nat_of_string_exn : string -> int + +val parse_nat_of_string: + string -> + int ref -> + int \ No newline at end of file diff --git a/analysis/src/vendor/compiler-libs-406/ext_position.ml b/analysis/src/vendor/compiler-libs-406/ext_position.ml new file mode 100644 index 000000000..356bf0929 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_position.ml @@ -0,0 +1,62 @@ +(* 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 = 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 + diff --git a/analysis/src/vendor/compiler-libs-406/ext_position.mli b/analysis/src/vendor/compiler-libs-406/ext_position.mli new file mode 100644 index 000000000..14f310286 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_position.mli @@ -0,0 +1,46 @@ +(* 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 = Lexing.position = { + pos_fname : string ; + pos_lnum : int ; + pos_bol : int ; + pos_cnum : int +} + +(** [offset pos newpos] + return a new position + here [newpos] is zero based, the use case is that + at position [pos], we get a string and Lexing from that string, + 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 print : Format.formatter -> t -> unit \ No newline at end of file diff --git a/analysis/src/vendor/compiler-libs-406/ext_string.ml b/analysis/src/vendor/compiler-libs-406/ext_string.ml new file mode 100644 index 000000000..a644a4241 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_string.ml @@ -0,0 +1,504 @@ +(* 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. *) + + + + + + + +(* + {[ split " test_unsafe_obj_ffi_ppx.cmi" ~keep_empty:false ' ']} +*) +let split_by ?(keep_empty=false) is_delim str = + let len = String.length str in + let rec loop acc last_pos pos = + if pos = -1 then + if last_pos = 0 && not keep_empty then + + acc + else + String.sub str 0 last_pos :: acc + else + if is_delim str.[pos] then + let new_len = (last_pos - pos - 1) in + if new_len <> 0 || keep_empty then + let v = String.sub str (pos + 1) new_len in + loop ( v :: acc) + pos (pos - 1) + else loop acc pos (pos - 1) + else loop acc last_pos (pos - 1) + in + loop [] len (len - 1) + +let trim s = + let i = ref 0 in + let j = String.length s in + while !i < j && + let u = String.unsafe_get s !i in + u = '\t' || u = '\n' || u = ' ' + do + incr i; + done; + let k = ref (j - 1) in + while !k >= !i && + let u = String.unsafe_get s !k in + u = '\t' || u = '\n' || u = ' ' do + decr k ; + done; + String.sub s !i (!k - !i + 1) + +let split ?keep_empty str on = + if str = "" then [] else + split_by ?keep_empty (fun x -> (x : char) = on) str ;; + +let quick_split_by_ws str : string list = + split_by ~keep_empty:false (fun x -> x = '\t' || x = '\n' || x = ' ') str + +let starts_with s beg = + let beg_len = String.length beg in + let s_len = String.length s in + beg_len <= s_len && + (let i = ref 0 in + while !i < beg_len + && String.unsafe_get s !i = + String.unsafe_get beg !i do + incr i + done; + !i = beg_len + ) + +let rec ends_aux s end_ j k = + if k < 0 then (j + 1) + else if String.unsafe_get s j = String.unsafe_get end_ k then + ends_aux s end_ (j - 1) (k - 1) + else -1 + +(** return an index which is minus when [s] does not + end with [beg] +*) +let ends_with_index s end_ : int = + let s_finish = String.length s - 1 in + let s_beg = String.length end_ - 1 in + if s_beg > s_finish then -1 + else + ends_aux s end_ s_finish s_beg + +let ends_with s end_ = ends_with_index s end_ >= 0 + +let ends_with_then_chop s beg = + let i = ends_with_index s beg in + if i >= 0 then Some (String.sub s 0 i) + else None + + +(** 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 + +*) +let rec unsafe_for_all_range s ~start ~finish p = + start > finish || + p (String.unsafe_get s start) && + unsafe_for_all_range s ~start:(start + 1) ~finish p + +let for_all_from s start p = + let len = String.length s in + if start < 0 then invalid_arg "Ext_string.for_all_from" + else unsafe_for_all_range s ~start ~finish:(len - 1) p + + +let for_all s (p : char -> bool) = + unsafe_for_all_range s ~start:0 ~finish:(String.length s - 1) p + +let is_empty s = String.length s = 0 + + +let repeat n s = + let len = String.length s in + let res = Bytes.create(n * len) in + for i = 0 to pred n do + String.blit s 0 res (i * len) len + done; + Bytes.to_string res + + + +let unsafe_is_sub ~sub i s j ~len = + let rec check k = + if k = len + then true + else + String.unsafe_get sub (i+k) = + String.unsafe_get s (j+k) && check (k+1) + in + j+len <= String.length s && check 0 + + +exception Local_exit +let find ?(start=0) ~sub s = + let n = String.length sub in + let s_len = String.length s in + let i = ref start in + try + while !i + n <= s_len do + if unsafe_is_sub ~sub 0 s !i ~len:n then + raise_notrace Local_exit; + incr i + done; + -1 + with Local_exit -> + !i + +let contain_substring s sub = + find s ~sub >= 0 + +(** TODO: optimize + avoid nonterminating when string is empty +*) +let non_overlap_count ~sub s = + let sub_len = String.length sub in + let rec aux acc off = + let i = find ~start:off ~sub s in + if i < 0 then acc + else aux (acc + 1) (i + sub_len) in + if String.length sub = 0 then invalid_arg "Ext_string.non_overlap_count" + else aux 0 0 + + +let rfind ~sub s = + 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 + raise_notrace Local_exit; + decr i + done; + -1 + with Local_exit -> + !i + +let tail_from s x = + let len = String.length s in + if x > len then invalid_arg ("Ext_string.tail_from " ^s ^ " : "^ string_of_int x ) + else String.sub s x (len - 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 *) + + + +let rec index_rec_count s lim i c count = + if i >= lim then -1 else + if String.unsafe_get s i = c then + if count = 1 then i + else index_rec_count s lim (i + 1) c (count - 1) + else index_rec_count s lim (i + 1) c count + +let index_count s i c count = + let lim = String.length s in + if i < 0 || i >= lim || count < 1 then + invalid_arg ("index_count: ( " ^string_of_int i ^ "," ^string_of_int count ^ ")" ); + index_rec_count s lim i c count + +(* let index_next s i c = + 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 ( + cursor := -1; + "" + ) + else + let i = index_rec s len start c in + let finish = + if i < 0 then ( + cursor := -1 ; + len + ) + else ( + cursor := i + 1; + 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;; + +let rec rindex_rec_opt s i c = + if i < 0 then None else + if String.unsafe_get s i = c then Some i else rindex_rec_opt s (i - 1) c;; + +let rindex_neg s c = + rindex_rec s (String.length s - 1) c;; + +let rindex_opt s c = + rindex_rec_opt s (String.length s - 1) c;; + + +(** TODO: can be improved to return a positive integer instead *) +let rec unsafe_no_char x ch i last_idx = + i > last_idx || + (String.unsafe_get x i <> ch && unsafe_no_char x ch (i + 1) last_idx) + +let rec unsafe_no_char_idx x ch i last_idx = + if i > last_idx then -1 + else + if String.unsafe_get x i <> ch then + unsafe_no_char_idx x ch (i + 1) last_idx + else i + +let no_char x ch i len : bool = + let str_len = String.length x in + if i < 0 || i >= str_len || len >= str_len then invalid_arg "Ext_string.no_char" + else unsafe_no_char x ch i len + + +let no_slash x = + unsafe_no_char x '/' 0 (String.length x - 1) + +let no_slash_idx x = + unsafe_no_char_idx x '/' 0 (String.length x - 1) + +let no_slash_idx_from x from = + let last_idx = String.length x - 1 in + assert (from >= 0); + unsafe_no_char_idx x '/' from last_idx + +let replace_slash_backward (x : string ) = + let len = String.length x in + if unsafe_no_char x '/' 0 (len - 1) then x + else + String.map (function + | '/' -> '\\' + | x -> x ) x + +let replace_backward_slash (x : string)= + let len = String.length x in + if unsafe_no_char x '\\' 0 (len -1) then x + else + String.map (function + |'\\'-> '/' + | x -> x) x + +let empty = "" + +let compare : string -> string -> int = compare;; + +let single_space = " " +let single_colon = ":" + +let concat_array sep (s : string array) = + let s_len = Array.length s in + match s_len with + | 0 -> empty + | 1 -> Array.unsafe_get s 0 + | _ -> + let sep_len = String.length sep in + let len = ref 0 in + for i = 0 to s_len - 1 do + len := !len + String.length (Array.unsafe_get s i) + done; + let target = + Bytes.create + (!len + (s_len - 1) * sep_len ) in + let hd = (Array.unsafe_get s 0) in + let hd_len = String.length hd in + String.unsafe_blit hd 0 target 0 hd_len; + let current_offset = ref hd_len in + for i = 1 to s_len - 1 do + String.unsafe_blit sep 0 target !current_offset sep_len; + let cur = Array.unsafe_get s i in + let cur_len = String.length cur in + let new_off_set = (!current_offset + sep_len ) in + String.unsafe_blit cur 0 target new_off_set cur_len; + current_offset := + new_off_set + cur_len ; + done; + Bytes.unsafe_to_string target + +let concat3 a b c = + let a_len = String.length a in + let b_len = String.length b in + let c_len = String.length c in + let len = a_len + b_len + c_len in + let target = Bytes.create len in + String.unsafe_blit a 0 target 0 a_len ; + String.unsafe_blit b 0 target a_len b_len; + String.unsafe_blit c 0 target (a_len + b_len) c_len; + Bytes.unsafe_to_string target + +let concat4 a b c d = + let a_len = String.length a in + let b_len = String.length b in + let c_len = String.length c in + let d_len = String.length d in + let len = a_len + b_len + c_len + d_len in + + let target = Bytes.create len in + String.unsafe_blit a 0 target 0 a_len ; + String.unsafe_blit b 0 target a_len b_len; + String.unsafe_blit c 0 target (a_len + b_len) c_len; + String.unsafe_blit d 0 target (a_len + b_len + c_len) d_len; + Bytes.unsafe_to_string target + + +let concat5 a b c d e = + let a_len = String.length a in + let b_len = String.length b in + let c_len = String.length c in + let d_len = String.length d in + let e_len = String.length e in + let len = a_len + b_len + c_len + d_len + e_len in + + let target = Bytes.create len in + String.unsafe_blit a 0 target 0 a_len ; + String.unsafe_blit b 0 target a_len b_len; + String.unsafe_blit c 0 target (a_len + b_len) c_len; + String.unsafe_blit d 0 target (a_len + b_len + c_len) d_len; + String.unsafe_blit e 0 target (a_len + b_len + c_len + d_len) e_len; + Bytes.unsafe_to_string target + + + +let inter2 a b = + concat3 a single_space b + + +let inter3 a b c = + concat5 a single_space b single_space c + + + + + +let inter4 a b c d = + concat_array single_space [| a; b ; c; d|] + + +let parent_dir_lit = ".." +let current_dir_lit = "." + + +(* reference {!Bytes.unppercase} *) +let capitalize_ascii (s : string) : string = + if String.length s = 0 then s + else + begin + let c = String.unsafe_get s 0 in + if (c >= 'a' && c <= 'z') + || (c >= '\224' && c <= '\246') + || (c >= '\248' && c <= '\254') then + let uc = Char.unsafe_chr (Char.code c - 32) in + let bytes = Bytes.of_string s in + Bytes.unsafe_set bytes 0 uc; + Bytes.unsafe_to_string bytes + else s + end + +let capitalize_sub (s : string) len : string = + let slen = String.length s in + if len < 0 || len > slen then invalid_arg "Ext_string.capitalize_sub" + else + if len = 0 then "" + else + let bytes = Bytes.create len in + let uc = + let c = String.unsafe_get s 0 in + if (c >= 'a' && c <= 'z') + || (c >= '\224' && c <= '\246') + || (c >= '\248' && c <= '\254') then + Char.unsafe_chr (Char.code c - 32) else c in + Bytes.unsafe_set bytes 0 uc; + for i = 1 to len - 1 do + Bytes.unsafe_set bytes i (String.unsafe_get s i) + done ; + Bytes.unsafe_to_string bytes + + + +let uncapitalize_ascii = + String.uncapitalize_ascii + + +let lowercase_ascii (s : string) = + Bytes.unsafe_to_string + (Bytes.map Char.lowercase_ascii (Bytes.unsafe_of_string s)) + + + +let get_int_1 (x : string) off : int = + Char.code x.[off] + +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_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 + 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 diff --git a/analysis/src/vendor/compiler-libs-406/ext_string.mli b/analysis/src/vendor/compiler-libs-406/ext_string.mli new file mode 100644 index 000000000..c44649fa7 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ext_string.mli @@ -0,0 +1,211 @@ +(* 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 [String] module, fixed some bugs like + avoiding locale sensitivity *) + +(** default is false *) +val split_by : ?keep_empty:bool -> (char -> bool) -> string -> string list + + +(** remove whitespace letters ('\t', '\n', ' ') on both side*) +val trim : string -> string + + +(** default is false *) +val split : ?keep_empty:bool -> string -> char -> string list + +(** split by space chars for quick scripting *) +val quick_split_by_ws : string -> string list + + + +val starts_with : string -> string -> bool + +(** + return [-1] when not found, the returned index is useful + see [ends_with_then_chop] +*) +val ends_with_index : string -> string -> int + +val ends_with : string -> string -> bool + +(** + [ends_with_then_chop name ext] + @example: + {[ + ends_with_then_chop "a.cmj" ".cmj" + "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 +*) +val for_all_from: + string -> + int -> + (char -> bool) -> + bool + +val for_all : + string -> + (char -> bool) -> + bool + +val is_empty : string -> bool + +val repeat : int -> string -> string + +val equal : string -> string -> bool + +(** + [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 + telling the return string is empty since + "\n\n" would result in an empty string too. +*) +(* val extract_until: + string -> + int ref -> (* cursor to be updated *) + char -> + string *) + +val index_count: + string -> + int -> + char -> + int -> + int + +(* val index_next : + string -> + int -> + char -> + int *) + + +(** + [find ~start ~sub s] + returns [-1] if not found +*) +val find : ?start:int -> sub:string -> string -> int + +val contain_substring : string -> string -> bool + +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) +*) +val tail_from : string -> int -> string + + +(** returns negative number if not found *) +val rindex_neg : string -> char -> int + +val rindex_opt : string -> char -> int option + + +val no_char : string -> char -> int -> int -> bool + + +val no_slash : string -> bool + +(** return negative means no slash, otherwise [i] means the place for first slash *) +val no_slash_idx : string -> int + +val no_slash_idx_from : string -> int -> int + +(** if no conversion happens, reference equality holds *) +val replace_slash_backward : string -> string + +(** if no conversion happens, reference equality holds *) +val replace_backward_slash : string -> string + +val empty : string + +val compare : string -> string -> int;; + +val single_space : string + +val concat3 : string -> string -> string -> string +val concat4 : string -> string -> string -> string -> string +val concat5 : string -> string -> string -> string -> string -> string +val inter2 : string -> string -> string +val inter3 : string -> string -> string -> string +val inter4 : string -> string -> string -> string -> string +val concat_array : string -> string array -> string + +val single_colon : string + +val parent_dir_lit : string +val current_dir_lit : string + +val capitalize_ascii : string -> string + +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_1_2_3_4 : + string -> + off:int -> + int -> + int + +val unsafe_sub : + string -> + int -> + int -> + string \ No newline at end of file diff --git a/analysis/src/vendor/compiler-libs-406/ident.ml b/analysis/src/vendor/compiler-libs-406/ident.ml new file mode 100644 index 000000000..1041fb51c --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ident.ml @@ -0,0 +1,249 @@ +(**************************************************************************) +(* *) +(* 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 + +type t = { stamp: int; name: string; mutable flags: int } + +let global_flag = 1 +let predef_exn_flag = 2 + +(* A stamp of 0 denotes a persistent identifier *) + +let currentstamp = ref 0 + +let create s = + incr currentstamp; + { name = s; stamp = !currentstamp; flags = 0 } + +let create_predef_exn s = + incr currentstamp; + { name = s; stamp = !currentstamp; flags = predef_exn_flag } + +let create_persistent s = + { name = s; stamp = 0; flags = global_flag } + +let rename i = + incr currentstamp; + { i with stamp = !currentstamp } + +let name i = i.name + +let unique_name i = i.name ^ "_" ^ string_of_int i.stamp + +let unique_toplevel_name i = i.name ^ "/" ^ string_of_int i.stamp + +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 compare i1 i2 = Stdlib.compare i1 i2 + +let binding_time i = i.stamp + +let current_time() = !currentstamp +let set_current_time t = currentstamp := max !currentstamp t + +let reinit_level = ref (-1) + +let reinit () = + if !reinit_level < 0 + then reinit_level := !currentstamp + else currentstamp := !reinit_level + +let hide i = + { i with stamp = -1 } + +let make_global i = + i.flags <- i.flags lor global_flag + +let global i = + (i.flags land global_flag) <> 0 + +let is_predef_exn i = + (i.flags land predef_exn_flag) <> 0 + +let print ppf i = + match i.stamp with + | 0 -> fprintf ppf "%s!" i.name + | -1 -> fprintf ppf "%s#" i.name + | n -> fprintf ppf "%s/%i%s" i.name n (if global i then "g" else "") + +type 'a tbl = + Empty + | Node of 'a tbl * 'a data * 'a tbl * int + +and 'a data = + { ident: t; + data: 'a; + previous: 'a data option } + +let empty = Empty + +(* Inline expansion of height for better speed + * let height = function + * Empty -> 0 + * | Node(_,_,_,h) -> h + *) + +let mknode l d r = + let hl = match l with Empty -> 0 | Node(_,_,_,h) -> h + and hr = match r with Empty -> 0 | Node(_,_,_,h) -> h in + Node(l, d, r, (if hl >= hr then hl + 1 else hr + 1)) + +let balance l d r = + let hl = match l with Empty -> 0 | Node(_,_,_,h) -> h + and hr = match r with Empty -> 0 | Node(_,_,_,h) -> h in + if hl > hr + 1 then + match l with + | Node (ll, ld, lr, _) + when (match ll with Empty -> 0 | Node(_,_,_,h) -> h) >= + (match lr with Empty -> 0 | Node(_,_,_,h) -> h) -> + mknode ll ld (mknode lr d r) + | Node (ll, ld, Node(lrl, lrd, lrr, _), _) -> + mknode (mknode ll ld lrl) lrd (mknode lrr d r) + | _ -> assert false + else if hr > hl + 1 then + match r with + | Node (rl, rd, rr, _) + when (match rr with Empty -> 0 | Node(_,_,_,h) -> h) >= + (match rl with Empty -> 0 | Node(_,_,_,h) -> h) -> + mknode (mknode l d rl) rd rr + | Node (Node (rll, rld, rlr, _), rd, rr, _) -> + mknode (mknode l d rll) rld (mknode rlr rd rr) + | _ -> assert false + else + mknode l d r + +let rec add id data = function + Empty -> + Node(Empty, {ident = id; data = data; previous = None}, Empty, 1) + | Node(l, k, r, h) -> + let c = compare id.name k.ident.name in + if c = 0 then + Node(l, {ident = id; data = data; previous = Some k}, r, h) + else if c < 0 then + balance (add id data l) k r + else + balance l k (add id data r) + +let rec find_stamp s = function + None -> + raise Not_found + | Some k -> + if k.ident.stamp = s then k.data else find_stamp s k.previous + +let rec find_same id = function + Empty -> + raise Not_found + | Node(l, k, r, _) -> + let c = compare id.name k.ident.name in + if c = 0 then + if id.stamp = k.ident.stamp + then k.data + else find_stamp id.stamp k.previous + else + find_same id (if c < 0 then l else r) + +let rec find_name name = function + Empty -> + raise Not_found + | Node(l, k, r, _) -> + let c = compare name k.ident.name in + if c = 0 then + k.ident, k.data + else + find_name name (if c < 0 then l else r) + +let rec get_all = function + | None -> [] + | Some k -> (k.ident, k.data) :: get_all k.previous + +let rec find_all name = function + Empty -> + [] + | Node(l, k, r, _) -> + let c = compare name k.ident.name in + if c = 0 then + (k.ident, k.data) :: get_all k.previous + else + find_all name (if c < 0 then l else r) + +let rec fold_aux f stack accu = function + Empty -> + begin match stack with + [] -> accu + | a :: l -> fold_aux f l accu a + end + | Node(l, k, r, _) -> + fold_aux f (l :: stack) (f k accu) r + +let fold_name f tbl accu = fold_aux (fun k -> f k.ident k.data) [] accu tbl + +let rec fold_data f d accu = + match d with + None -> accu + | Some k -> f k.ident k.data (fold_data f k.previous accu) + +let fold_all f tbl accu = + fold_aux (fun k -> fold_data f (Some k)) [] accu tbl + +(* let keys tbl = fold_name (fun k _ accu -> k::accu) tbl [] *) + +let rec iter f = function + Empty -> () + | Node(l, k, r, _) -> + iter f l; f k.ident k.data; iter f r + +(* Idents for sharing keys *) + +(* They should be 'totally fresh' -> neg numbers *) +let key_name = "" + +let make_key_generator () = + let c = ref 1 in + fun id -> + let stamp = !c in + decr c ; + { id with name = key_name; stamp = stamp; } + +let compare x y = + let c = x.stamp - y.stamp in + if c <> 0 then c + else + let c = compare x.name y.name in + if c <> 0 then c + else + compare x.flags y.flags + +let output oc id = output_string oc (unique_name id) +let hash i = (Char.code i.name.[0]) lxor i.stamp + +let original_equal = equal +include Identifiable.Make (struct + type nonrec t = t + let compare = compare + let output = output + let print = print + let hash = hash + let equal = same +end) +let equal = original_equal diff --git a/analysis/src/vendor/compiler-libs-406/ident.mli b/analysis/src/vendor/compiler-libs-406/ident.mli new file mode 100644 index 000000000..c2983edbe --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/ident.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. *) +(* *) +(**************************************************************************) + +(* Identifiers (unique names) *) + +type t = { stamp: int; name: string; mutable flags: int } + +include Identifiable.S with type t := t +(* Notes: + - [equal] compares identifiers by name + - [compare x y] is 0 if [same x y] is true. + - [compare] compares identifiers by binding location +*) + + +val create: string -> t +val create_persistent: string -> t +val create_predef_exn: string -> t +val rename: t -> t +val name: t -> string +val unique_name: t -> string +val unique_toplevel_name: t -> string +val persistent: t -> bool +val same: t -> t -> bool + (* Compare identifiers by binding location. + Two identifiers are the same either if they are both + non-persistent and have been created by the same call to + [new], or if they are both persistent and have the same + name. *) +val compare: t -> t -> int +val hide: t -> t + (* Return an identifier with same name as the given identifier, + but stamp different from any stamp returned by new. + When put in a 'a tbl, this identifier can only be looked + up by name. *) + +val make_global: t -> unit +val global: t -> bool +val is_predef_exn: t -> bool + +val binding_time: t -> int +val current_time: unit -> int +val set_current_time: int -> unit +val reinit: unit -> unit + +type 'a tbl + (* Association tables from identifiers to type 'a. *) + +val empty: 'a tbl +val add: t -> 'a -> 'a tbl -> 'a tbl +val find_same: t -> 'a tbl -> 'a +val find_name: string -> 'a tbl -> t * 'a +val find_all: string -> 'a tbl -> (t * 'a) list +val fold_name: (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b +val fold_all: (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b +val iter: (t -> 'a -> unit) -> 'a tbl -> unit + + +(* Idents for sharing keys *) + +val make_key_generator : unit -> (t -> t) diff --git a/analysis/src/vendor/compiler-libs-406/identifiable.ml b/analysis/src/vendor/compiler-libs-406/identifiable.ml new file mode 100644 index 000000000..6ee0519a9 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/identifiable.ml @@ -0,0 +1,254 @@ +(**************************************************************************) +(* *) +(* 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 type Thing = sig + type t + + include Hashtbl.HashedType with type t := t + include Map.OrderedType with type t := t + + val output : out_channel -> t -> unit + val print : Format.formatter -> t -> unit +end + +module type Set = sig + module T : Set.OrderedType + include Set.S + with type elt = T.t + and type t = Set.Make (T).t + + val output : out_channel -> t -> unit + val print : Format.formatter -> t -> unit + val to_string : t -> string + val of_list : elt list -> t + val map : (elt -> elt) -> t -> t +end + +module type Map = sig + module T : Map.OrderedType + include Map.S + with type key = T.t + and type 'a t = 'a Map.Make (T).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 + + val union_right : 'a t -> 'a t -> 'a t + + val union_left : 'a t -> 'a t -> 'a t + + val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t + val rename : key t -> key -> key + val map_keys : (key -> key) -> 'a t -> 'a t + val keys : 'a t -> Set.Make(T).t + val data : 'a t -> 'a list + val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t + val transpose_keys_and_data : key t -> key t + val transpose_keys_and_data_set : key t -> Set.Make(T).t t + val print : + (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> unit +end + +module type Tbl = sig + module T : sig + type t + include Map.OrderedType with type t := t + include Hashtbl.HashedType with type t := t + end + include Hashtbl.S + with type key = T.t + and type 'a t = 'a Hashtbl.Make (T).t + + val to_list : 'a t -> (T.t * 'a) list + val of_list : (T.t * 'a) list -> 'a t + + val to_map : 'a t -> 'a Map.Make(T).t + val of_map : 'a Map.Make(T).t -> 'a t + val memoize : 'a t -> (key -> 'a) -> key -> 'a + val map : 'a t -> ('a -> 'b) -> 'b t +end + +module Pair (A : Thing) (B : Thing) : Thing with type t = A.t * B.t = struct + type t = A.t * B.t + + let compare (a1, b1) (a2, b2) = + let c = A.compare a1 a2 in + if c <> 0 then c + else B.compare b1 b2 + + let output oc (a, b) = Printf.fprintf oc " (%a, %a)" A.output a B.output b + let hash (a, b) = Hashtbl.hash (A.hash a, B.hash b) + let equal (a1, b1) (a2, b2) = A.equal a1 a2 && B.equal b1 b2 + let print ppf (a, b) = Format.fprintf ppf " (%a, @ %a)" A.print a B.print b +end + +module Make_map (T : Thing) = struct + include Map.Make (T) + + let filter_map f t = + fold (fun id v map -> + match f id v with + | None -> map + | Some r -> add id r map) t empty + + let of_list l = + List.fold_left (fun map (id, v) -> add id v map) empty l + + let disjoint_union ?eq ?print m1 m2 = + union (fun id v1 v2 -> + let ok = match eq with + | None -> false + | Some eq -> eq v1 v2 + in + if not ok then + let err = + match print with + | None -> + Format.asprintf "Map.disjoint_union %a" T.print id + | Some print -> + Format.asprintf "Map.disjoint_union %a => %a <> %a" + T.print id print v1 print v2 + in + Misc.fatal_error err + else Some v1) + m1 m2 + + let union_right m1 m2 = + merge (fun _id x y -> match x, y with + | None, None -> None + | None, Some v + | Some v, None + | Some _, Some v -> Some v) + m1 m2 + + let union_left m1 m2 = union_right m2 m1 + + let union_merge f m1 m2 = + let aux _ m1 m2 = + match m1, m2 with + | None, m | m, None -> m + | Some m1, Some m2 -> Some (f m1 m2) + in + merge aux m1 m2 + + let rename m v = + try find v m + with Not_found -> v + + let map_keys f m = + of_list (List.map (fun (k, v) -> f k, v) (bindings m)) + + let print f ppf s = + let elts ppf s = iter (fun id v -> + Format.fprintf ppf "@ (@[%a@ %a@])" T.print id f v) s in + Format.fprintf ppf "@[<1>{@[%a@ @]}@]" elts s + + module T_set = Set.Make (T) + + let keys map = fold (fun k _ set -> T_set.add k set) map T_set.empty + + let data t = List.map snd (bindings t) + + let of_set f set = T_set.fold (fun e map -> add e (f e) map) set empty + + let transpose_keys_and_data map = fold (fun k v m -> add v k m) map empty + let transpose_keys_and_data_set map = + fold (fun k v m -> + let set = + match find v m with + | exception Not_found -> + T_set.singleton k + | set -> + T_set.add k set + in + add v set m) + map empty +end + +module Make_set (T : Thing) = struct + include Set.Make (T) + + let output oc s = + Printf.fprintf oc " ( "; + iter (fun v -> Printf.fprintf oc "%a " T.output v) s; + Printf.fprintf oc ")" + + let print ppf s = + let elts ppf s = iter (fun e -> Format.fprintf ppf "@ %a" T.print e) s in + Format.fprintf ppf "@[<1>{@[%a@ @]}@]" elts s + + let to_string s = Format.asprintf "%a" print s + + let of_list l = match l with + | [] -> empty + | [t] -> singleton t + | t :: q -> List.fold_left (fun acc e -> add e acc) (singleton t) q + + let map f s = of_list (List.map f (elements s)) +end + +module Make_tbl (T : Thing) = struct + include Hashtbl.Make (T) + + module T_map = Make_map (T) + + let to_list t = + fold (fun key datum elts -> (key, datum)::elts) t [] + + let of_list elts = + let t = create 42 in + List.iter (fun (key, datum) -> add t key datum) elts; + t + + let to_map v = fold T_map.add v T_map.empty + + let of_map m = + let t = create (T_map.cardinal m) in + T_map.iter (fun k v -> add t k v) m; + t + + let memoize t f = fun key -> + try find t key with + | Not_found -> + let r = f key in + add t key r; + r + + let map t f = + of_map (T_map.map f (to_map t)) +end + +module type S = sig + type t + + module T : Thing with type t = t + include Thing with type t := T.t + + module Set : Set with module T := T + module Map : Map with module T := T + module Tbl : Tbl with module T := T +end + +module Make (T : Thing) = struct + module T = T + include T + + module Set = Make_set (T) + module Map = Make_map (T) + module Tbl = Make_tbl (T) +end diff --git a/analysis/src/vendor/compiler-libs-406/identifiable.mli b/analysis/src/vendor/compiler-libs-406/identifiable.mli new file mode 100644 index 000000000..46e145451 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/identifiable.mli @@ -0,0 +1,107 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(** Uniform interface for common data structures over various things. *) + +module type Thing = sig + type t + + include Hashtbl.HashedType with type t := t + include Map.OrderedType with type t := t + + val output : out_channel -> t -> unit + val print : Format.formatter -> t -> unit +end + +module Pair : functor (A : Thing) (B : Thing) -> Thing with type t = A.t * B.t + +module type Set = sig + module T : Set.OrderedType + include Set.S + with type elt = T.t + and type t = Set.Make (T).t + + val output : out_channel -> t -> unit + val print : Format.formatter -> t -> unit + val to_string : t -> string + val of_list : elt list -> t + val map : (elt -> elt) -> t -> t +end + +module type Map = sig + module T : Map.OrderedType + include Map.S + with type key = T.t + and type 'a t = 'a Map.Make (T).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 + [m2]. If some binding is present in both and the associated + value is not equal, a Fatal_error is raised *) + val disjoint_union : ?eq:('a -> 'a -> bool) -> ?print:(Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t + + (** [union_right m1 m2] contains all bindings from [m1] and [m2]. If + some binding is present in both, the one from [m2] is taken *) + val union_right : 'a t -> 'a t -> 'a t + + (** [union_left m1 m2 = union_right m2 m1] *) + val union_left : 'a t -> 'a t -> 'a t + + val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t + val rename : key t -> key -> key + val map_keys : (key -> key) -> 'a t -> 'a t + val keys : 'a t -> Set.Make(T).t + val data : 'a t -> 'a list + val of_set : (key -> 'a) -> Set.Make(T).t -> 'a t + val transpose_keys_and_data : key t -> key t + val transpose_keys_and_data_set : key t -> Set.Make(T).t t + val print : + (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a t -> unit +end + +module type Tbl = sig + module T : sig + type t + include Map.OrderedType with type t := t + include Hashtbl.HashedType with type t := t + end + include Hashtbl.S + with type key = T.t + and type 'a t = 'a Hashtbl.Make (T).t + + val to_list : 'a t -> (T.t * 'a) list + val of_list : (T.t * 'a) list -> 'a t + + val to_map : 'a t -> 'a Map.Make(T).t + val of_map : 'a Map.Make(T).t -> 'a t + val memoize : 'a t -> (key -> 'a) -> key -> 'a + val map : 'a t -> ('a -> 'b) -> 'b t +end + +module type S = sig + type t + + module T : Thing with type t = t + include Thing with type t := T.t + + module Set : Set with module T := T + module Map : Map with module T := T + module Tbl : Tbl with module T := T +end + +module Make (T : Thing) : S with type t := T.t diff --git a/analysis/src/vendor/compiler-libs-406/lexer.ml b/analysis/src/vendor/compiler-libs-406/lexer.ml new file mode 100644 index 000000000..c615b58e6 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/lexer.ml @@ -0,0 +1,3105 @@ +# 18 "ml/lexer.mll" + +open Lexing +open Misc +open Parser + +type directive_value = + | Dir_bool of bool + | Dir_float of float + | Dir_int of int + | Dir_string of string + | Dir_null + +type directive_type = + | Dir_type_bool + | Dir_type_float + | Dir_type_int + | Dir_type_string + | Dir_type_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" + +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 + | 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 Error of error * Location.t;; + +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 (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_int k v = + Hashtbl.replace directive_built_in_values k (Dir_int v) + +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); + replace_directive_built_in_value "BIG_ENDIAN" + (Dir_bool Sys.big_endian) + +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 + +(* + {[ + # 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 (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 (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 (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 = + begin match find_directive_built_in_value str with + | Dir_null -> false + | _ -> true + | exception _ -> + try ignore @@ Sys.getenv str; true with _ -> false + end + +let query _loc str = + begin match find_directive_built_in_value str with + | Dir_null -> Dir_bool false + | v -> v + | exception Not_found -> + begin match Sys.getenv str with + | v -> + begin + try Dir_bool (bool_of_string v) with + _ -> + begin + try Dir_int (int_of_string v ) + with + _ -> + begin try (Dir_float (float_of_string v)) + with _ -> Dir_string v + end + end + end + | exception Not_found -> + Dir_bool false + end + end + + +let define_key_value key v = + if String.length key > 0 + && Char.uppercase_ascii (key.[0]) = key.[0] then + begin + replace_directive_built_in_value key + begin + (* NEED Sync up across {!lexer.mll} {!bspp.ml} and here, + TODO: put it in {!lexer.mll} + *) + try Dir_bool (bool_of_string v) with + _ -> + begin + try Dir_int (int_of_string v ) + with + _ -> + begin try (Dir_float (float_of_string v)) + with _ -> Dir_string v + end + end + end; + true + end + 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 (Error (Unexpected_token_in_conditional, loc)) + + +let directive_parse token_with_comments 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 (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 || + begin match lhs with + | Dir_string s -> + let curr_loc = Location.curr lexbuf in + let rhs = value_of_token curr_loc (token ()) in + begin match rhs with + | Dir_string rhs -> + semver curr_loc s rhs + | _ -> + raise + (Error + ( Conditional_expr_expected_type + (Dir_type_string, type_of_directive lhs), Location.curr lexbuf)) + end + | _ -> raise + (Error + ( Conditional_expr_expected_type + (Dir_type_string, type_of_directive lhs), Location.curr lexbuf)) + end + | 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 + (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 (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 (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 + begin match t with + | UIDENT s -> + not calc || + if r.[0] = 'u' then + not @@ defined s + else defined s + | _ -> raise (Error (Unexpected_token_in_conditional, loc)) + end + | LPAREN -> + let v = parse_or calc in + begin match token () with + | RPAREN -> v + | _ -> raise (Error(Unterminated_paren_in_conditional, Location.curr lexbuf)) + end + + | _ -> raise (Error (Unexpected_token_in_conditional, curr_loc)) + in + let v = parse_or true in + begin match token () with + | THEN | EOL -> v + | _ -> raise (Error (Expect_hash_then_in_conditional, Location.curr lexbuf)) + end + + +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 is_elif (i : Parser.token ) = + match i with + | LIDENT "elif" -> true + | _ -> false (* avoid polymorphic equal *) + + +(* 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 +let if_then_else = ref Dir_out +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 + +(* 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 + | Unterminated_if -> + fprintf ppf "#if not terminated" + | Unterminated_else -> + fprintf ppf "#else not terminated" + | Unexpected_directive -> fprintf ppf "Unexpected directive" + | Unexpected_token_in_conditional -> + fprintf ppf "Unexpected token in conditional predicate" + | Unterminated_paren_in_conditional -> + fprintf ppf "Unterminated parens in conditional predicate" + | Expect_hash_then_in_conditional -> + fprintf ppf "Expect `then` after conditional predicate" + | Conditional_expr_expected_type (a,b) -> + fprintf ppf "Conditional expression type mismatch (%s,%s)" + (string_of_type_directive a ) + (string_of_type_directive b ) + | Illegal_semver s -> + fprintf ppf "Illegal semantic version string %s" s + +let () = + Location.register_error_of_exn + (function + | Error (err, loc) -> + Some (Location.error_of_printer loc report_error err) + | _ -> + None + ) + + +# 702 "ml/lexer.ml" +let __ocaml_lex_tables = { + Lexing.lex_base = + "\000\000\166\255\167\255\094\000\129\000\164\000\199\000\234\000\ + \013\001\190\255\048\001\085\001\198\255\041\001\124\001\159\001\ + \069\000\084\000\193\001\228\001\216\255\218\255\221\255\007\002\ + \102\002\137\002\087\000\125\000\167\002\240\255\251\002\079\003\ + \163\003\247\003\081\004\173\004\001\005\138\000\254\255\001\000\ + \005\000\255\255\006\000\007\000\091\005\121\005\250\255\205\005\ + \248\255\033\006\117\006\201\006\029\007\113\007\197\007\025\008\ + \109\008\193\008\021\009\105\009\129\000\189\009\017\010\101\010\ + \185\010\013\011\024\002\196\255\239\255\135\002\104\011\094\000\ + \095\000\011\000\238\255\237\255\232\255\138\011\164\000\034\002\ + \104\000\236\255\064\002\105\000\235\255\054\002\074\002\109\000\ + \234\255\177\011\110\000\233\255\118\000\228\255\127\000\227\255\ + \153\000\222\011\226\255\001\012\022\012\137\002\225\255\012\000\ + \013\000\241\000\020\001\017\000\225\255\018\000\051\012\086\012\ + \121\012\156\012\191\012\213\255\208\255\209\255\210\255\206\255\ + \226\012\114\000\089\000\199\255\200\255\201\255\097\000\186\255\ + \184\255\193\255\005\013\189\255\191\255\040\013\075\013\110\013\ + \145\013\125\004\243\255\244\255\186\000\245\255\141\001\143\013\ + \253\255\122\000\131\000\255\255\254\255\252\255\175\013\010\014\ + \159\000\164\000\195\000\251\255\250\255\249\255\044\014\154\002\ + \165\000\248\255\164\002\177\000\247\255\083\014\180\000\246\255\ + \220\000\142\001\245\255\246\255\247\255\221\000\154\014\255\255\ + \248\255\098\000\188\014\199\000\098\004\253\255\220\000\230\000\ + \255\000\173\004\252\255\155\003\239\003\251\255\227\014\250\255\ + \250\014\032\015\249\255\018\001\051\001\252\255\061\015\254\255\ + \255\255\034\001\035\001\253\255\090\015\203\000\206\000\012\001\ + \016\001\231\000\025\001\231\000\019\000\255\255"; + Lexing.lex_backtrk = + "\255\255\255\255\255\255\086\000\085\000\082\000\081\000\074\000\ + \072\000\255\255\063\000\060\000\255\255\053\000\052\000\050\000\ + \048\000\044\000\041\000\077\000\255\255\255\255\255\255\032\000\ + \031\000\038\000\036\000\035\000\058\000\255\255\010\000\010\000\ + \009\000\008\000\006\000\004\000\003\000\002\000\255\255\089\000\ + \089\000\255\255\255\255\255\255\080\000\255\255\255\255\255\255\ + \255\255\014\000\014\000\012\000\011\000\014\000\011\000\011\000\ + \010\000\012\000\011\000\012\000\255\255\013\000\013\000\010\000\ + \010\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\023\000\023\000\023\000\ + \023\000\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\025\000\255\255\ + \026\000\084\000\255\255\087\000\255\255\255\255\255\255\255\255\ + \255\255\255\255\255\255\255\255\255\255\255\255\033\000\083\000\ + \078\000\040\000\043\000\255\255\255\255\255\255\255\255\255\255\ + \051\000\070\000\067\000\255\255\255\255\255\255\068\000\255\255\ + \255\255\255\255\061\000\255\255\255\255\079\000\073\000\076\000\ + \075\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\071\000\255\255\000\000\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\000\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\255\255\255\255\255\255\255\255\255\255\ + \255\255\255\255\255\255\000\000\000\000\255\255\076\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\104\000\255\255\000\000\255\255\ + \104\000\105\000\104\000\107\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\138\000\000\000\000\000\255\255\000\000\152\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\170\000\000\000\000\000\000\000\255\255\176\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\197\000\000\000\255\255\000\000\ + \000\000\255\255\255\255\000\000\255\255\255\255\255\255\207\000\ + \210\000\255\255\210\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\037\000\038\000\038\000\037\000\039\000\043\000\041\000\ + \041\000\038\000\042\000\042\000\043\000\072\000\102\000\102\000\ + \073\000\103\000\103\000\108\000\108\000\213\000\109\000\109\000\ + \037\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\034\000\ + \005\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\013\000\040\000\012\000\005\000\036\000\ + \022\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\028\000\011\000\009\000\035\000\003\000\ + \119\000\092\000\003\000\003\000\003\000\075\000\074\000\072\000\ + \003\000\003\000\073\000\003\000\003\000\003\000\118\000\081\000\ + \084\000\117\000\116\000\037\000\088\000\091\000\037\000\128\000\ + \003\000\126\000\003\000\003\000\003\000\003\000\003\000\093\000\ + \094\000\127\000\003\000\148\000\255\255\003\000\003\000\003\000\ + \095\000\096\000\037\000\003\000\003\000\147\000\003\000\003\000\ + \003\000\059\000\059\000\059\000\059\000\059\000\059\000\059\000\ + \059\000\059\000\059\000\003\000\003\000\003\000\003\000\003\000\ + \003\000\003\000\095\000\096\000\139\000\005\000\157\000\168\000\ + \005\000\005\000\005\000\156\000\161\000\153\000\005\000\005\000\ + \154\000\005\000\005\000\005\000\085\000\085\000\085\000\085\000\ + \164\000\070\000\003\000\167\000\003\000\192\000\005\000\003\000\ + \005\000\005\000\005\000\005\000\005\000\182\000\139\000\172\000\ + \006\000\168\000\195\000\006\000\006\000\006\000\206\000\207\000\ + \182\000\006\000\006\000\184\000\006\000\006\000\006\000\187\000\ + \187\000\187\000\187\000\102\000\182\000\003\000\103\000\003\000\ + \002\000\006\000\005\000\006\000\006\000\006\000\006\000\006\000\ + \211\000\182\000\212\000\111\000\184\000\255\255\111\000\111\000\ + \111\000\255\255\000\000\107\000\111\000\111\000\208\000\111\000\ + \136\000\111\000\209\000\000\000\172\000\106\000\102\000\195\000\ + \005\000\103\000\005\000\209\000\111\000\006\000\111\000\135\000\ + \111\000\111\000\111\000\000\000\200\000\200\000\133\000\202\000\ + \202\000\133\000\133\000\133\000\106\000\000\000\105\000\133\000\ + \133\000\000\000\133\000\133\000\133\000\200\000\000\000\000\000\ + \201\000\000\000\000\000\006\000\000\000\006\000\000\000\133\000\ + \111\000\133\000\134\000\133\000\133\000\133\000\121\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\124\000\111\000\123\000\ + \111\000\122\000\006\000\133\000\006\000\006\000\006\000\006\000\ + \006\000\000\000\000\000\000\000\000\000\000\000\006\000\000\000\ + \000\000\006\000\006\000\006\000\000\000\255\255\000\000\006\000\ + \006\000\000\000\006\000\006\000\006\000\000\000\000\000\000\000\ + \000\000\133\000\000\000\133\000\000\000\132\000\006\000\006\000\ + \000\000\006\000\006\000\006\000\006\000\006\000\000\000\153\000\ + \172\000\000\000\154\000\173\000\000\000\006\000\000\000\000\000\ + \006\000\006\000\006\000\000\000\000\000\125\000\006\000\006\000\ + \000\000\006\000\006\000\006\000\006\000\131\000\006\000\198\000\ + \175\000\000\000\129\000\006\000\155\000\000\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\000\000\000\000\ + \000\000\006\000\006\000\000\000\120\000\006\000\006\000\000\000\ + \000\000\130\000\000\000\006\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\ + \000\000\000\000\114\000\000\000\000\000\114\000\114\000\114\000\ + \000\000\151\000\174\000\114\000\114\000\000\000\114\000\115\000\ + \114\000\255\255\000\000\000\000\000\000\000\000\000\000\000\000\ + \006\000\000\000\006\000\114\000\000\000\006\000\114\000\114\000\ + \114\000\114\000\000\000\000\000\000\000\111\000\000\000\000\000\ + \111\000\111\000\111\000\000\000\255\255\000\000\111\000\111\000\ + \255\255\111\000\112\000\111\000\255\255\000\000\000\000\000\000\ + \000\000\255\255\000\000\006\000\000\000\006\000\111\000\114\000\ + \111\000\111\000\113\000\111\000\111\000\000\000\000\000\000\000\ + \006\000\000\000\000\000\006\000\006\000\110\000\000\000\000\000\ + \000\000\006\000\006\000\199\000\006\000\006\000\006\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\114\000\000\000\114\000\ + \000\000\006\000\111\000\006\000\006\000\006\000\006\000\006\000\ + \065\000\065\000\065\000\065\000\065\000\065\000\065\000\065\000\ + \065\000\065\000\082\000\082\000\082\000\082\000\082\000\082\000\ + \082\000\082\000\082\000\082\000\000\000\000\000\000\000\000\000\ + \111\000\000\000\111\000\000\000\000\000\006\000\086\000\086\000\ + \086\000\086\000\086\000\086\000\086\000\086\000\000\000\101\000\ + \083\000\083\000\083\000\083\000\083\000\083\000\083\000\083\000\ + \083\000\083\000\087\000\087\000\087\000\087\000\087\000\087\000\ + \087\000\087\000\000\000\006\000\000\000\006\000\101\000\099\000\ + \000\000\099\000\099\000\099\000\099\000\255\255\171\000\000\000\ + \099\000\099\000\101\000\099\000\099\000\099\000\100\000\100\000\ + \100\000\100\000\100\000\100\000\100\000\100\000\100\000\100\000\ + \099\000\000\000\099\000\099\000\099\000\099\000\099\000\000\000\ + \000\000\101\000\003\000\000\000\000\000\003\000\003\000\003\000\ + \000\000\000\000\098\000\097\000\003\000\000\000\003\000\003\000\ + \003\000\100\000\100\000\100\000\100\000\100\000\100\000\100\000\ + \100\000\100\000\100\000\003\000\099\000\003\000\003\000\003\000\ + \003\000\003\000\162\000\162\000\162\000\162\000\162\000\162\000\ + \162\000\162\000\162\000\162\000\163\000\163\000\163\000\163\000\ + \163\000\163\000\163\000\163\000\163\000\163\000\000\000\000\000\ + \000\000\000\000\099\000\067\000\099\000\000\000\069\000\003\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\069\000\000\000\068\000\000\000\003\000\069\000\003\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\069\000\049\000\068\000\000\000\000\000\000\000\000\000\ + \000\000\051\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\049\000\049\000\049\000\049\000\ + \050\000\049\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\030\000\000\000\049\000\049\000\049\000\049\000\ + \050\000\049\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\049\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\051\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\ + \049\000\053\000\049\000\049\000\050\000\049\000\052\000\052\000\ + \052\000\052\000\052\000\052\000\052\000\052\000\054\000\052\000\ + \052\000\052\000\052\000\052\000\052\000\052\000\052\000\055\000\ + \052\000\052\000\000\000\000\000\000\000\000\000\030\000\000\000\ + \049\000\053\000\049\000\049\000\050\000\049\000\052\000\052\000\ + \052\000\052\000\052\000\052\000\052\000\052\000\054\000\052\000\ + \052\000\052\000\052\000\052\000\052\000\052\000\052\000\055\000\ + \052\000\052\000\032\000\188\000\188\000\188\000\188\000\188\000\ + \188\000\188\000\188\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\033\000\189\000\ + \189\000\189\000\189\000\189\000\189\000\189\000\189\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\044\000\000\000\000\000\044\000\044\000\044\000\ + \000\000\000\000\000\000\044\000\044\000\000\000\044\000\044\000\ + \044\000\000\000\000\000\000\000\000\000\000\000\000\000\139\000\ + \000\000\000\000\140\000\044\000\000\000\044\000\044\000\044\000\ + \044\000\044\000\185\000\185\000\185\000\185\000\185\000\185\000\ + \185\000\185\000\185\000\185\000\000\000\000\000\000\000\144\000\ + \000\000\000\000\000\000\000\000\142\000\146\000\000\000\145\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\044\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\000\000\044\000\044\000\044\000\ + \000\000\044\000\044\000\044\000\000\000\000\000\000\000\044\000\ + \044\000\000\000\044\000\044\000\044\000\186\000\186\000\186\000\ + \186\000\186\000\186\000\186\000\186\000\186\000\186\000\044\000\ + \000\000\044\000\044\000\044\000\044\000\044\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \143\000\000\000\000\000\000\000\000\000\000\000\000\000\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\000\045\000\000\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \033\000\044\000\000\000\044\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\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\044\000\141\000\000\000\044\000\ + \044\000\044\000\000\000\000\000\000\000\044\000\044\000\000\000\ + \044\000\044\000\044\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\044\000\000\000\044\000\ + \044\000\044\000\044\000\044\000\000\000\000\000\000\000\000\000\ + \045\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\045\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\046\000\000\000\000\000\000\000\000\000\ + \000\000\044\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\000\000\000\000\000\000\044\000\ + \045\000\044\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\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\048\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\047\000\047\000\047\000\ + \000\000\000\000\000\000\000\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\ + \049\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\000\000\000\000\000\000\000\000\ + \049\000\000\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\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\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \000\000\000\000\000\000\000\000\049\000\000\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\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\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\049\000\049\000\049\000\049\000\050\000\049\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\000\000\000\000\000\000\000\000\ + \051\000\000\000\049\000\049\000\049\000\049\000\050\000\049\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\049\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \000\000\000\000\000\000\000\000\049\000\000\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\064\000\064\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\000\000\000\000\000\000\000\000\ + \049\000\000\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\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\049\000\049\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \000\000\000\000\000\000\000\000\049\000\000\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\056\000\056\000\056\000\056\000\056\000\056\000\056\000\ + \056\000\056\000\056\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\056\000\056\000\056\000\056\000\056\000\056\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\000\000\000\000\000\000\000\000\ + \049\000\000\000\056\000\056\000\056\000\056\000\056\000\056\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\057\000\000\000\056\000\056\000\056\000\ + \056\000\056\000\056\000\056\000\056\000\056\000\056\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\056\000\056\000\ + \056\000\056\000\056\000\056\000\052\000\052\000\052\000\052\000\ + \052\000\052\000\052\000\052\000\052\000\058\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\056\000\000\000\056\000\056\000\ + \056\000\056\000\056\000\056\000\052\000\052\000\052\000\052\000\ + \052\000\052\000\052\000\052\000\052\000\058\000\052\000\052\000\ + \052\000\052\000\052\000\052\000\052\000\052\000\052\000\052\000\ + \049\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\057\000\057\000\057\000\057\000\057\000\057\000\ + \061\000\061\000\061\000\061\000\061\000\061\000\061\000\061\000\ + \061\000\062\000\061\000\061\000\061\000\061\000\061\000\061\000\ + \061\000\061\000\061\000\061\000\000\000\000\000\000\000\000\000\ + \057\000\000\000\057\000\057\000\057\000\057\000\057\000\057\000\ + \061\000\061\000\061\000\061\000\061\000\061\000\061\000\061\000\ + \061\000\062\000\061\000\061\000\061\000\061\000\061\000\061\000\ + \061\000\061\000\061\000\061\000\049\000\000\000\000\000\000\000\ + \060\000\000\000\060\000\000\000\000\000\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\000\000\000\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \000\000\000\000\000\000\000\000\049\000\000\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\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\ + \000\000\000\000\049\000\049\000\049\000\049\000\049\000\049\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\000\000\000\000\000\000\000\000\ + \059\000\000\000\049\000\049\000\049\000\049\000\049\000\049\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\049\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \000\000\000\000\000\000\000\000\049\000\000\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\000\000\000\000\000\000\060\000\000\000\060\000\000\000\ + \000\000\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\ + \000\000\000\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\000\000\000\000\000\000\000\000\ + \049\000\000\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\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\049\000\049\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\049\000\049\000\ + \049\000\049\000\049\000\049\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\063\000\000\000\049\000\049\000\ + \049\000\049\000\049\000\049\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\ + \049\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\064\000\064\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\049\000\049\000\049\000\049\000\049\000\049\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\ + \064\000\000\000\049\000\049\000\049\000\049\000\049\000\049\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\049\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\049\000\049\000\ + \049\000\049\000\049\000\049\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\ + \000\000\000\000\000\000\000\000\065\000\000\000\049\000\049\000\ + \049\000\049\000\049\000\049\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\ + \080\000\000\000\080\000\000\000\000\000\000\000\000\000\080\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \079\000\079\000\079\000\079\000\079\000\079\000\079\000\079\000\ + \079\000\079\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\089\000\089\000\089\000\089\000\089\000\089\000\ + \089\000\089\000\089\000\089\000\080\000\000\000\000\000\000\000\ + \000\000\000\000\080\000\089\000\089\000\089\000\089\000\089\000\ + \089\000\000\000\000\000\000\000\000\000\000\000\080\000\078\000\ + \000\000\000\000\080\000\000\000\080\000\000\000\000\000\000\000\ + \077\000\090\000\090\000\090\000\090\000\090\000\090\000\090\000\ + \090\000\090\000\090\000\089\000\089\000\089\000\089\000\089\000\ + \089\000\000\000\090\000\090\000\090\000\090\000\090\000\090\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\097\000\ + \000\000\000\000\097\000\097\000\097\000\000\000\000\000\000\000\ + \097\000\097\000\000\000\097\000\097\000\097\000\000\000\000\000\ + \000\000\000\000\090\000\090\000\090\000\090\000\090\000\090\000\ + \097\000\000\000\097\000\097\000\097\000\097\000\097\000\106\000\ + \102\000\000\000\099\000\103\000\099\000\099\000\099\000\099\000\ + \000\000\000\000\000\000\099\000\099\000\000\000\099\000\099\000\ + \099\000\000\000\000\000\000\000\000\000\000\000\106\000\000\000\ + \105\000\000\000\000\000\099\000\097\000\099\000\099\000\099\000\ + \099\000\099\000\000\000\000\000\000\000\000\000\100\000\100\000\ + \100\000\100\000\100\000\100\000\100\000\100\000\100\000\100\000\ + \000\000\000\000\000\000\000\000\006\000\000\000\000\000\006\000\ + \006\000\006\000\097\000\000\000\097\000\006\000\006\000\099\000\ + \006\000\006\000\006\000\000\000\000\000\000\000\000\000\000\000\ + \255\255\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\111\000\ + \000\000\000\000\111\000\111\000\111\000\099\000\000\000\099\000\ + \111\000\111\000\000\000\111\000\111\000\111\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \111\000\006\000\111\000\111\000\111\000\111\000\111\000\000\000\ + \000\000\000\000\111\000\000\000\000\000\111\000\111\000\111\000\ + \000\000\000\000\000\000\111\000\111\000\000\000\111\000\111\000\ + \111\000\000\000\000\000\000\000\000\000\000\000\000\000\006\000\ + \000\000\006\000\000\000\111\000\111\000\111\000\111\000\111\000\ + \111\000\111\000\000\000\000\000\000\000\111\000\000\000\000\000\ + \111\000\111\000\111\000\000\000\000\000\000\000\111\000\111\000\ + \000\000\111\000\111\000\111\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\111\000\000\000\111\000\000\000\111\000\111\000\ + \111\000\111\000\111\000\111\000\111\000\000\000\000\000\000\000\ + \114\000\000\000\000\000\114\000\114\000\114\000\000\000\000\000\ + \000\000\114\000\114\000\000\000\114\000\114\000\114\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\111\000\000\000\111\000\ + \000\000\114\000\111\000\114\000\114\000\114\000\114\000\114\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\255\255\000\000\ + \111\000\000\000\111\000\000\000\006\000\114\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\114\000\000\000\114\000\000\000\006\000\ + \006\000\006\000\006\000\006\000\006\000\006\000\000\000\000\000\ + \000\000\133\000\000\000\000\000\133\000\133\000\133\000\000\000\ + \000\000\000\000\133\000\133\000\000\000\133\000\133\000\133\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\006\000\000\000\ + \006\000\000\000\133\000\006\000\133\000\133\000\133\000\133\000\ + \133\000\000\000\000\000\000\000\133\000\000\000\000\000\133\000\ + \133\000\133\000\000\000\000\000\000\000\133\000\133\000\000\000\ + \133\000\133\000\133\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\006\000\000\000\006\000\000\000\133\000\133\000\133\000\ + \133\000\133\000\133\000\133\000\000\000\000\000\000\000\111\000\ + \000\000\000\000\111\000\111\000\111\000\000\000\000\000\000\000\ + \111\000\111\000\000\000\111\000\111\000\111\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\133\000\000\000\133\000\000\000\ + \111\000\133\000\111\000\111\000\111\000\111\000\111\000\000\000\ + \000\000\000\000\111\000\000\000\000\000\111\000\111\000\111\000\ + \000\000\000\000\000\000\111\000\111\000\000\000\111\000\111\000\ + \111\000\000\000\000\000\000\000\000\000\000\000\000\000\133\000\ + \000\000\133\000\000\000\111\000\111\000\111\000\111\000\111\000\ + \111\000\111\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\111\000\000\000\111\000\000\000\150\000\111\000\ + \150\000\150\000\150\000\150\000\150\000\150\000\150\000\150\000\ + \150\000\150\000\150\000\150\000\150\000\150\000\150\000\150\000\ + \150\000\150\000\150\000\150\000\150\000\150\000\150\000\150\000\ + \150\000\150\000\000\000\149\000\000\000\111\000\150\000\111\000\ + \150\000\150\000\150\000\150\000\150\000\150\000\150\000\150\000\ + \150\000\150\000\150\000\150\000\150\000\150\000\150\000\150\000\ + \150\000\150\000\150\000\150\000\150\000\150\000\150\000\150\000\ + \150\000\150\000\160\000\149\000\160\000\000\000\000\000\000\000\ + \000\000\160\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\159\000\159\000\159\000\159\000\159\000\159\000\ + \159\000\159\000\159\000\159\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\165\000\165\000\165\000\165\000\ + \165\000\165\000\165\000\165\000\165\000\165\000\160\000\000\000\ + \000\000\000\000\000\000\000\000\160\000\165\000\165\000\165\000\ + \165\000\165\000\165\000\000\000\000\000\000\000\000\000\000\000\ + \160\000\000\000\000\000\000\000\160\000\000\000\160\000\000\000\ + \000\000\000\000\158\000\166\000\166\000\166\000\166\000\166\000\ + \166\000\166\000\166\000\166\000\166\000\165\000\165\000\165\000\ + \165\000\165\000\165\000\000\000\166\000\166\000\166\000\166\000\ + \166\000\166\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\000\000\183\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\166\000\166\000\166\000\166\000\ + \166\000\166\000\181\000\000\000\181\000\000\000\000\000\000\000\ + \000\000\181\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\180\000\180\000\180\000\180\000\180\000\180\000\ + \180\000\180\000\180\000\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\000\000\000\000\000\000\190\000\190\000\190\000\190\000\ + \190\000\190\000\190\000\190\000\190\000\190\000\181\000\000\000\ + \000\000\000\000\000\000\000\000\181\000\190\000\190\000\190\000\ + \190\000\190\000\190\000\000\000\000\000\000\000\000\000\000\000\ + \181\000\179\000\000\000\000\000\181\000\000\000\181\000\177\000\ + \000\000\000\000\178\000\191\000\191\000\191\000\191\000\191\000\ + \191\000\191\000\191\000\191\000\191\000\190\000\190\000\190\000\ + \190\000\190\000\190\000\000\000\191\000\191\000\191\000\191\000\ + \191\000\191\000\193\000\193\000\193\000\193\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\000\000\193\000\193\000\193\000\193\000\193\000\ + \193\000\000\000\000\000\000\000\191\000\191\000\191\000\191\000\ + \191\000\191\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \193\000\193\000\193\000\193\000\193\000\193\000\193\000\193\000\ + \193\000\193\000\000\000\193\000\193\000\193\000\193\000\193\000\ + \193\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\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\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\193\000\193\000\193\000\193\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\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\204\000\194\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\204\000\ + \000\000\204\000\203\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\204\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\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\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\039\000\000\000\000\000\039\000\040\000\ + \042\000\043\000\040\000\042\000\043\000\073\000\103\000\104\000\ + \073\000\103\000\104\000\107\000\109\000\212\000\107\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\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ + \000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\000\ + \016\000\026\000\003\000\003\000\003\000\071\000\072\000\027\000\ + \003\000\003\000\027\000\003\000\003\000\003\000\017\000\080\000\ + \083\000\017\000\017\000\037\000\087\000\090\000\037\000\121\000\ + \003\000\122\000\003\000\003\000\003\000\003\000\003\000\092\000\ + \092\000\126\000\004\000\145\000\027\000\004\000\004\000\004\000\ + \094\000\094\000\037\000\004\000\004\000\146\000\004\000\004\000\ + \004\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\ + \060\000\060\000\060\000\004\000\003\000\004\000\004\000\004\000\ + \004\000\004\000\096\000\096\000\140\000\005\000\152\000\140\000\ + \005\000\005\000\005\000\153\000\160\000\154\000\005\000\005\000\ + \154\000\005\000\005\000\005\000\078\000\078\000\078\000\078\000\ + \163\000\027\000\003\000\166\000\003\000\177\000\005\000\004\000\ + \005\000\005\000\005\000\005\000\005\000\182\000\168\000\173\000\ + \006\000\168\000\173\000\006\000\006\000\006\000\205\000\206\000\ + \183\000\006\000\006\000\183\000\006\000\006\000\006\000\179\000\ + \179\000\179\000\179\000\105\000\182\000\004\000\105\000\004\000\ + \000\000\006\000\005\000\006\000\006\000\006\000\006\000\006\000\ + \209\000\184\000\211\000\007\000\184\000\104\000\007\000\007\000\ + \007\000\107\000\255\255\105\000\007\000\007\000\207\000\007\000\ + \007\000\007\000\208\000\255\255\195\000\106\000\106\000\195\000\ + \005\000\106\000\005\000\210\000\007\000\006\000\007\000\007\000\ + \007\000\007\000\007\000\255\255\201\000\202\000\008\000\201\000\ + \202\000\008\000\008\000\008\000\106\000\255\255\106\000\008\000\ + \008\000\255\255\008\000\008\000\008\000\196\000\255\255\255\255\ + \196\000\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\013\000\255\255\ + \255\255\010\000\255\255\255\255\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\013\000\007\000\013\000\ + \007\000\013\000\010\000\008\000\010\000\010\000\010\000\010\000\ + \010\000\255\255\255\255\255\255\255\255\255\255\011\000\255\255\ + \255\255\011\000\011\000\011\000\255\255\027\000\255\255\011\000\ + \011\000\255\255\011\000\011\000\011\000\255\255\255\255\255\255\ + \255\255\008\000\255\255\008\000\255\255\010\000\010\000\011\000\ + \255\255\011\000\011\000\011\000\011\000\011\000\255\255\142\000\ + \169\000\255\255\142\000\169\000\255\255\014\000\255\255\255\255\ + \014\000\014\000\014\000\255\255\255\255\013\000\014\000\014\000\ + \255\255\014\000\014\000\014\000\010\000\010\000\010\000\196\000\ + \169\000\255\255\011\000\011\000\142\000\255\255\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\255\255\255\255\ + \255\255\015\000\015\000\255\255\015\000\015\000\015\000\255\255\ + \255\255\011\000\255\255\011\000\255\255\255\255\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\142\000\169\000\018\000\018\000\255\255\018\000\018\000\ + \018\000\105\000\255\255\255\255\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\255\255\255\255\255\255\019\000\255\255\255\255\ + \019\000\019\000\019\000\255\255\207\000\255\255\019\000\019\000\ + \208\000\019\000\019\000\019\000\106\000\255\255\255\255\255\255\ + \255\255\210\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\255\255\255\255\ + \255\255\023\000\023\000\196\000\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\ + \066\000\066\000\066\000\066\000\066\000\066\000\066\000\066\000\ + \066\000\066\000\079\000\079\000\079\000\079\000\079\000\079\000\ + \079\000\079\000\079\000\079\000\255\255\255\255\255\255\255\255\ + \019\000\255\255\019\000\255\255\255\255\023\000\085\000\085\000\ + \085\000\085\000\085\000\085\000\085\000\085\000\255\255\024\000\ + \082\000\082\000\082\000\082\000\082\000\082\000\082\000\082\000\ + \082\000\082\000\086\000\086\000\086\000\086\000\086\000\086\000\ + \086\000\086\000\255\255\023\000\255\255\023\000\024\000\024\000\ + \255\255\024\000\024\000\024\000\024\000\142\000\169\000\255\255\ + \024\000\024\000\101\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\101\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\101\000\101\000\101\000\101\000\101\000\101\000\101\000\ + \101\000\101\000\101\000\025\000\024\000\025\000\025\000\025\000\ + \025\000\025\000\159\000\159\000\159\000\159\000\159\000\159\000\ + \159\000\159\000\159\000\159\000\162\000\162\000\162\000\162\000\ + \162\000\162\000\162\000\162\000\162\000\162\000\255\255\255\255\ + \255\255\255\255\024\000\028\000\024\000\255\255\069\000\025\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\069\000\255\255\069\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\187\000\187\000\187\000\187\000\187\000\ + \187\000\187\000\187\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\033\000\188\000\ + \188\000\188\000\188\000\188\000\188\000\188\000\188\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\034\000\255\255\255\255\034\000\034\000\034\000\ + \255\255\255\255\255\255\034\000\034\000\255\255\034\000\034\000\ + \034\000\255\255\255\255\255\255\255\255\255\255\255\255\137\000\ + \255\255\255\255\137\000\034\000\255\255\034\000\034\000\034\000\ + \034\000\034\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\137\000\ + \255\255\255\255\255\255\255\255\137\000\137\000\255\255\137\000\ + \255\255\255\255\255\255\255\255\255\255\255\255\255\255\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\255\255\034\000\035\000\034\000\ + \255\255\035\000\035\000\035\000\255\255\255\255\255\255\035\000\ + \035\000\255\255\035\000\035\000\035\000\185\000\185\000\185\000\ + \185\000\185\000\185\000\185\000\185\000\185\000\185\000\035\000\ + \255\255\035\000\035\000\035\000\035\000\035\000\255\255\255\255\ + \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ + \137\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\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\ + \036\000\035\000\255\255\035\000\255\255\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\255\255\255\255\255\255\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\036\000\036\000\255\255\255\255\255\255\255\255\ + \036\000\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\036\000\036\000\044\000\137\000\255\255\044\000\ + \044\000\044\000\255\255\255\255\255\255\044\000\044\000\255\255\ + \044\000\044\000\044\000\255\255\255\255\255\255\255\255\255\255\ + \255\255\255\255\255\255\255\255\255\255\044\000\255\255\044\000\ + \044\000\044\000\044\000\044\000\255\255\255\255\255\255\255\255\ + \045\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ + \255\255\045\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\255\255\255\255\255\255\255\255\ + \255\255\044\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\255\255\255\255\255\255\044\000\ + \045\000\044\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\045\000\045\000\045\000\045\000\ + \045\000\045\000\045\000\045\000\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\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\ + \255\255\255\255\255\255\255\255\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\ + \049\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ + \255\255\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\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\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\ + \049\000\255\255\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\049\000\049\000\049\000\049\000\ + \049\000\049\000\049\000\049\000\050\000\255\255\255\255\255\255\ + \050\000\255\255\050\000\255\255\255\255\050\000\050\000\050\000\ + \050\000\050\000\050\000\050\000\050\000\050\000\050\000\255\255\ + \255\255\255\255\255\255\255\255\255\255\255\255\050\000\050\000\ + \050\000\050\000\050\000\050\000\050\000\050\000\050\000\050\000\ + \050\000\050\000\050\000\050\000\050\000\050\000\050\000\050\000\ + \050\000\050\000\050\000\050\000\050\000\050\000\050\000\050\000\ + \255\255\255\255\255\255\255\255\050\000\255\255\050\000\050\000\ + \050\000\050\000\050\000\050\000\050\000\050\000\050\000\050\000\ + \050\000\050\000\050\000\050\000\050\000\050\000\050\000\050\000\ + \050\000\050\000\050\000\050\000\050\000\050\000\050\000\050\000\ + \051\000\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\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\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\052\000\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\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\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\ + \053\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ + \255\255\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\053\000\053\000\053\000\053\000\053\000\053\000\ + \053\000\053\000\053\000\053\000\053\000\053\000\053\000\053\000\ + \053\000\053\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\ + \053\000\255\255\053\000\053\000\053\000\053\000\053\000\053\000\ + \053\000\053\000\053\000\053\000\053\000\053\000\053\000\053\000\ + \053\000\053\000\053\000\053\000\053\000\053\000\053\000\053\000\ + \053\000\053\000\053\000\053\000\054\000\255\255\255\255\255\255\ + \255\255\255\255\255\255\255\255\255\255\054\000\054\000\054\000\ + \054\000\054\000\054\000\054\000\054\000\054\000\054\000\255\255\ + \255\255\255\255\255\255\255\255\255\255\255\255\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\054\000\054\000\054\000\ + \054\000\054\000\054\000\054\000\054\000\054\000\054\000\054\000\ + \255\255\255\255\255\255\255\255\054\000\255\255\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\054\000\054\000\054\000\ + \054\000\054\000\054\000\054\000\054\000\054\000\054\000\054\000\ + \055\000\255\255\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\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\ + \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\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\ + \058\000\255\255\058\000\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\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\062\000\255\255\062\000\255\255\ + \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\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\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\ + \070\000\255\255\070\000\255\255\255\255\255\255\255\255\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\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ + \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ + \255\255\255\255\077\000\077\000\077\000\077\000\077\000\077\000\ + \077\000\077\000\077\000\077\000\070\000\255\255\255\255\255\255\ + \255\255\255\255\070\000\077\000\077\000\077\000\077\000\077\000\ + \077\000\255\255\255\255\255\255\255\255\255\255\070\000\070\000\ + \255\255\255\255\070\000\255\255\070\000\255\255\255\255\255\255\ + \070\000\089\000\089\000\089\000\089\000\089\000\089\000\089\000\ + \089\000\089\000\089\000\077\000\077\000\077\000\077\000\077\000\ + \077\000\255\255\089\000\089\000\089\000\089\000\089\000\089\000\ + \255\255\255\255\255\255\255\255\255\255\255\255\255\255\097\000\ + \255\255\255\255\097\000\097\000\097\000\255\255\255\255\255\255\ + \097\000\097\000\255\255\097\000\097\000\097\000\255\255\255\255\ + \255\255\255\255\089\000\089\000\089\000\089\000\089\000\089\000\ + \097\000\255\255\097\000\097\000\097\000\097\000\097\000\100\000\ + \100\000\255\255\099\000\100\000\099\000\099\000\099\000\099\000\ + \255\255\255\255\255\255\099\000\099\000\255\255\099\000\099\000\ + \099\000\255\255\255\255\255\255\255\255\255\255\100\000\255\255\ + \100\000\255\255\255\255\099\000\097\000\099\000\099\000\099\000\ + \099\000\099\000\255\255\255\255\255\255\255\255\100\000\100\000\ + \100\000\100\000\100\000\100\000\100\000\100\000\100\000\100\000\ + \255\255\255\255\255\255\255\255\110\000\255\255\255\255\110\000\ + \110\000\110\000\097\000\255\255\097\000\110\000\110\000\099\000\ + \110\000\110\000\110\000\255\255\255\255\255\255\255\255\255\255\ + \070\000\255\255\255\255\255\255\255\255\110\000\255\255\110\000\ + \110\000\110\000\110\000\110\000\255\255\255\255\255\255\111\000\ + \255\255\255\255\111\000\111\000\111\000\099\000\255\255\099\000\ + \111\000\111\000\255\255\111\000\111\000\111\000\255\255\255\255\ + \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ + \111\000\110\000\111\000\111\000\111\000\111\000\111\000\255\255\ + \255\255\255\255\112\000\255\255\255\255\112\000\112\000\112\000\ + \255\255\255\255\255\255\112\000\112\000\255\255\112\000\112\000\ + \112\000\255\255\255\255\255\255\255\255\255\255\255\255\110\000\ + \255\255\110\000\255\255\112\000\111\000\112\000\112\000\112\000\ + \112\000\112\000\255\255\255\255\255\255\113\000\255\255\255\255\ + \113\000\113\000\113\000\255\255\255\255\255\255\113\000\113\000\ + \255\255\113\000\113\000\113\000\255\255\255\255\255\255\255\255\ + \255\255\255\255\111\000\255\255\111\000\255\255\113\000\112\000\ + \113\000\113\000\113\000\113\000\113\000\255\255\255\255\255\255\ + \114\000\255\255\255\255\114\000\114\000\114\000\255\255\255\255\ + \255\255\114\000\114\000\255\255\114\000\114\000\114\000\255\255\ + \255\255\255\255\255\255\255\255\255\255\112\000\255\255\112\000\ + \255\255\114\000\113\000\114\000\114\000\114\000\114\000\114\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\255\255\100\000\255\255\ + \113\000\255\255\113\000\255\255\120\000\114\000\120\000\120\000\ + \120\000\120\000\120\000\255\255\255\255\255\255\130\000\255\255\ + \255\255\130\000\130\000\130\000\255\255\255\255\255\255\130\000\ + \130\000\255\255\130\000\130\000\130\000\255\255\255\255\255\255\ + \255\255\255\255\255\255\114\000\255\255\114\000\255\255\130\000\ + \120\000\130\000\130\000\130\000\130\000\130\000\255\255\255\255\ + \255\255\133\000\255\255\255\255\133\000\133\000\133\000\255\255\ + \255\255\255\255\133\000\133\000\255\255\133\000\133\000\133\000\ + \255\255\255\255\255\255\255\255\255\255\255\255\120\000\255\255\ + \120\000\255\255\133\000\130\000\133\000\133\000\133\000\133\000\ + \133\000\255\255\255\255\255\255\134\000\255\255\255\255\134\000\ + \134\000\134\000\255\255\255\255\255\255\134\000\134\000\255\255\ + \134\000\134\000\134\000\255\255\255\255\255\255\255\255\255\255\ + \255\255\130\000\255\255\130\000\255\255\134\000\133\000\134\000\ + \134\000\134\000\134\000\134\000\255\255\255\255\255\255\135\000\ + \255\255\255\255\135\000\135\000\135\000\255\255\255\255\255\255\ + \135\000\135\000\255\255\135\000\135\000\135\000\255\255\255\255\ + \255\255\255\255\255\255\255\255\133\000\255\255\133\000\255\255\ + \135\000\134\000\135\000\135\000\135\000\135\000\135\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\134\000\ + \255\255\134\000\255\255\136\000\135\000\136\000\136\000\136\000\ + \136\000\136\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\135\000\255\255\135\000\255\255\143\000\136\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\143\000\143\000\ + \143\000\143\000\255\255\143\000\255\255\136\000\150\000\136\000\ + \150\000\150\000\150\000\150\000\150\000\150\000\150\000\150\000\ + \150\000\150\000\150\000\150\000\150\000\150\000\150\000\150\000\ + \150\000\150\000\150\000\150\000\150\000\150\000\150\000\150\000\ + \150\000\150\000\151\000\150\000\151\000\255\255\255\255\255\255\ + \255\255\151\000\255\255\255\255\255\255\255\255\255\255\255\255\ + \255\255\255\255\151\000\151\000\151\000\151\000\151\000\151\000\ + \151\000\151\000\151\000\151\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\158\000\158\000\158\000\158\000\ + \158\000\158\000\158\000\158\000\158\000\158\000\151\000\255\255\ + \255\255\255\255\255\255\255\255\151\000\158\000\158\000\158\000\ + \158\000\158\000\158\000\255\255\255\255\255\255\255\255\255\255\ + \151\000\255\255\255\255\255\255\151\000\255\255\151\000\255\255\ + \255\255\255\255\151\000\165\000\165\000\165\000\165\000\165\000\ + \165\000\165\000\165\000\165\000\165\000\158\000\158\000\158\000\ + \158\000\158\000\158\000\255\255\165\000\165\000\165\000\165\000\ + \165\000\165\000\255\255\255\255\255\255\255\255\255\255\255\255\ + \255\255\255\255\255\255\255\255\174\000\255\255\255\255\174\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\165\000\165\000\165\000\165\000\ + \165\000\165\000\174\000\255\255\174\000\255\255\255\255\255\255\ + \255\255\174\000\255\255\255\255\255\255\255\255\255\255\255\255\ + \255\255\255\255\174\000\174\000\174\000\174\000\174\000\174\000\ + \174\000\174\000\174\000\174\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\178\000\178\000\178\000\178\000\ + \178\000\178\000\178\000\178\000\178\000\178\000\174\000\255\255\ + \255\255\255\255\255\255\255\255\174\000\178\000\178\000\178\000\ + \178\000\178\000\178\000\255\255\255\255\255\255\255\255\255\255\ + \174\000\174\000\255\255\255\255\174\000\255\255\174\000\174\000\ + \255\255\255\255\174\000\190\000\190\000\190\000\190\000\190\000\ + \190\000\190\000\190\000\190\000\190\000\178\000\178\000\178\000\ + \178\000\178\000\178\000\255\255\190\000\190\000\190\000\190\000\ + \190\000\190\000\192\000\192\000\192\000\192\000\192\000\192\000\ + \192\000\192\000\192\000\192\000\255\255\255\255\255\255\255\255\ + \255\255\255\255\255\255\192\000\192\000\192\000\192\000\192\000\ + \192\000\255\255\255\255\255\255\190\000\190\000\190\000\190\000\ + \190\000\190\000\255\255\255\255\255\255\255\255\255\255\255\255\ + \193\000\193\000\193\000\193\000\193\000\193\000\193\000\193\000\ + \193\000\193\000\255\255\192\000\192\000\192\000\192\000\192\000\ + \192\000\193\000\193\000\193\000\193\000\193\000\193\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\193\000\193\000\193\000\193\000\193\000\193\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\174\000\255\255\198\000\193\000\198\000\198\000\ + \198\000\198\000\198\000\198\000\198\000\198\000\198\000\198\000\ + \198\000\198\000\198\000\198\000\198\000\198\000\198\000\198\000\ + \198\000\198\000\198\000\198\000\198\000\198\000\198\000\198\000\ + \255\255\204\000\198\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\204\000\255\255\255\255\204\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"; + 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\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\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\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\105\000\174\000\183\000\105\000\106\000\184\000\ + \255\255\255\255\255\255\100\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\105\000\000\000\255\255\106\000\255\255\106\000\ + \255\255\255\255\100\000\255\255\100\000\101\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\100\000\100\000\100\000\100\000\100\000\100\000\ + \100\000\100\000\100\000\100\000\101\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\101\000\101\000\101\000\101\000\ + \101\000\101\000\101\000\101\000\101\000\101\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\ + \105\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 -> +# 751 "ml/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 ) +# 2017 "ml/lexer.ml" + + | 1 -> +# 758 "ml/lexer.mll" + ( update_loc lexbuf None 1 false 0; + EOL ) +# 2023 "ml/lexer.ml" + + | 2 -> +# 761 "ml/lexer.mll" + ( token lexbuf ) +# 2028 "ml/lexer.ml" + + | 3 -> +# 763 "ml/lexer.mll" + ( UNDERSCORE ) +# 2033 "ml/lexer.ml" + + | 4 -> +# 765 "ml/lexer.mll" + ( TILDE ) +# 2038 "ml/lexer.ml" + + | 5 -> +# 767 "ml/lexer.mll" + ( LABEL (get_label_name lexbuf) ) +# 2043 "ml/lexer.ml" + + | 6 -> +# 769 "ml/lexer.mll" + ( QUESTION ) +# 2048 "ml/lexer.ml" + + | 7 -> +# 771 "ml/lexer.mll" + ( OPTLABEL (get_label_name lexbuf) ) +# 2053 "ml/lexer.ml" + + | 8 -> +# 773 "ml/lexer.mll" + ( let s = Lexing.lexeme lexbuf in + try Hashtbl.find keyword_table s + with Not_found -> LIDENT s ) +# 2060 "ml/lexer.ml" + + | 9 -> +# 777 "ml/lexer.mll" + ( UIDENT(Lexing.lexeme lexbuf) ) +# 2065 "ml/lexer.ml" + + | 10 -> +# 778 "ml/lexer.mll" + ( INT (Lexing.lexeme lexbuf, None) ) +# 2070 "ml/lexer.ml" + + | 11 -> +let +# 779 "ml/lexer.mll" + lit +# 2076 "ml/lexer.ml" += Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_start_pos (lexbuf.Lexing.lex_curr_pos + -1) +and +# 779 "ml/lexer.mll" + modif +# 2081 "ml/lexer.ml" += Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_curr_pos + -1) in +# 780 "ml/lexer.mll" + ( INT (lit, Some modif) ) +# 2085 "ml/lexer.ml" + + | 12 -> +# 782 "ml/lexer.mll" + ( FLOAT (Lexing.lexeme lexbuf, None) ) +# 2090 "ml/lexer.ml" + + | 13 -> +let +# 783 "ml/lexer.mll" + lit +# 2096 "ml/lexer.ml" += Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_start_pos (lexbuf.Lexing.lex_curr_pos + -1) +and +# 783 "ml/lexer.mll" + modif +# 2101 "ml/lexer.ml" += Lexing.sub_lexeme_char lexbuf (lexbuf.Lexing.lex_curr_pos + -1) in +# 784 "ml/lexer.mll" + ( FLOAT (lit, Some modif) ) +# 2105 "ml/lexer.ml" + + | 14 -> +# 786 "ml/lexer.mll" + ( raise (Error(Invalid_literal (Lexing.lexeme lexbuf), + Location.curr lexbuf)) ) +# 2111 "ml/lexer.ml" + + | 15 -> +# 789 "ml/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) ) +# 2123 "ml/lexer.ml" + + | 16 -> +# 798 "ml/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) ) +# 2137 "ml/lexer.ml" + + | 17 -> +# 809 "ml/lexer.mll" + ( update_loc lexbuf None 1 false 1; + CHAR (Lexing.lexeme_char lexbuf 1) ) +# 2143 "ml/lexer.ml" + + | 18 -> +# 812 "ml/lexer.mll" + ( CHAR(Lexing.lexeme_char lexbuf 1) ) +# 2148 "ml/lexer.ml" + + | 19 -> +# 814 "ml/lexer.mll" + ( CHAR(char_for_backslash (Lexing.lexeme_char lexbuf 2)) ) +# 2153 "ml/lexer.ml" + + | 20 -> +# 816 "ml/lexer.mll" + ( CHAR(char_for_decimal_code lexbuf 2) ) +# 2158 "ml/lexer.ml" + + | 21 -> +# 818 "ml/lexer.mll" + ( CHAR(char_for_octal_code lexbuf 3) ) +# 2163 "ml/lexer.ml" + + | 22 -> +# 820 "ml/lexer.mll" + ( CHAR(char_for_hexadecimal_code lexbuf 3) ) +# 2168 "ml/lexer.ml" + + | 23 -> +# 822 "ml/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)) + ) +# 2176 "ml/lexer.ml" + + | 24 -> +# 827 "ml/lexer.mll" + ( let s, loc = with_comment_buffer comment lexbuf in + COMMENT (s, loc) ) +# 2182 "ml/lexer.ml" + + | 25 -> +# 830 "ml/lexer.mll" + ( let s, loc = with_comment_buffer comment lexbuf in + if !handle_docstrings then + DOCSTRING (Docstrings.docstring s loc) + else + COMMENT ("*" ^ s, loc) + ) +# 2192 "ml/lexer.ml" + + | 26 -> +let +# 836 "ml/lexer.mll" + stars +# 2198 "ml/lexer.ml" += Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 3) lexbuf.Lexing.lex_curr_pos in +# 837 "ml/lexer.mll" + ( let s, loc = + with_comment_buffer + (fun lexbuf -> + store_string ("*" ^ stars); + comment lexbuf) + lexbuf + in + COMMENT (s, loc) ) +# 2209 "ml/lexer.ml" + + | 27 -> +# 846 "ml/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) ) +# 2217 "ml/lexer.ml" + + | 28 -> +let +# 850 "ml/lexer.mll" + stars +# 2223 "ml/lexer.ml" += Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 2) (lexbuf.Lexing.lex_curr_pos + -2) in +# 851 "ml/lexer.mll" + ( if !handle_docstrings && stars="" then + (* (**) is an empty docstring *) + DOCSTRING(Docstrings.docstring "" (Location.curr lexbuf)) + else + COMMENT (stars, Location.curr lexbuf) ) +# 2231 "ml/lexer.ml" + + | 29 -> +# 857 "ml/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 + ) +# 2242 "ml/lexer.ml" + + | 30 -> +let +# 864 "ml/lexer.mll" + num +# 2248 "ml/lexer.ml" += Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_mem.(1) +and +# 865 "ml/lexer.mll" + name +# 2253 "ml/lexer.ml" += Lexing.sub_lexeme_opt lexbuf lexbuf.Lexing.lex_mem.(4) lexbuf.Lexing.lex_mem.(3) +and +# 865 "ml/lexer.mll" + directive +# 2258 "ml/lexer.ml" += Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_start_pos lexbuf.Lexing.lex_mem.(2) in +# 867 "ml/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 + ) +# 2276 "ml/lexer.ml" + + | 31 -> +# 882 "ml/lexer.mll" + ( HASH ) +# 2281 "ml/lexer.ml" + + | 32 -> +# 883 "ml/lexer.mll" + ( AMPERSAND ) +# 2286 "ml/lexer.ml" + + | 33 -> +# 884 "ml/lexer.mll" + ( AMPERAMPER ) +# 2291 "ml/lexer.ml" + + | 34 -> +# 885 "ml/lexer.mll" + ( BACKQUOTE ) +# 2296 "ml/lexer.ml" + + | 35 -> +# 886 "ml/lexer.mll" + ( QUOTE ) +# 2301 "ml/lexer.ml" + + | 36 -> +# 887 "ml/lexer.mll" + ( LPAREN ) +# 2306 "ml/lexer.ml" + + | 37 -> +# 888 "ml/lexer.mll" + ( RPAREN ) +# 2311 "ml/lexer.ml" + + | 38 -> +# 889 "ml/lexer.mll" + ( STAR ) +# 2316 "ml/lexer.ml" + + | 39 -> +# 890 "ml/lexer.mll" + ( COMMA ) +# 2321 "ml/lexer.ml" + + | 40 -> +# 891 "ml/lexer.mll" + ( MINUSGREATER ) +# 2326 "ml/lexer.ml" + + | 41 -> +# 892 "ml/lexer.mll" + ( DOT ) +# 2331 "ml/lexer.ml" + + | 42 -> +# 893 "ml/lexer.mll" + ( DOTDOT ) +# 2336 "ml/lexer.ml" + + | 43 -> +let +# 894 "ml/lexer.mll" + s +# 2342 "ml/lexer.ml" += Lexing.sub_lexeme lexbuf (lexbuf.Lexing.lex_start_pos + 1) lexbuf.Lexing.lex_curr_pos in +# 894 "ml/lexer.mll" + ( DOTOP s ) +# 2346 "ml/lexer.ml" + + | 44 -> +# 895 "ml/lexer.mll" + ( COLON ) +# 2351 "ml/lexer.ml" + + | 45 -> +# 896 "ml/lexer.mll" + ( COLONCOLON ) +# 2356 "ml/lexer.ml" + + | 46 -> +# 897 "ml/lexer.mll" + ( COLONEQUAL ) +# 2361 "ml/lexer.ml" + + | 47 -> +# 898 "ml/lexer.mll" + ( COLONGREATER ) +# 2366 "ml/lexer.ml" + + | 48 -> +# 899 "ml/lexer.mll" + ( SEMI ) +# 2371 "ml/lexer.ml" + + | 49 -> +# 900 "ml/lexer.mll" + ( SEMISEMI ) +# 2376 "ml/lexer.ml" + + | 50 -> +# 901 "ml/lexer.mll" + ( LESS ) +# 2381 "ml/lexer.ml" + + | 51 -> +# 902 "ml/lexer.mll" + ( LESSMINUS ) +# 2386 "ml/lexer.ml" + + | 52 -> +# 903 "ml/lexer.mll" + ( EQUAL ) +# 2391 "ml/lexer.ml" + + | 53 -> +# 904 "ml/lexer.mll" + ( LBRACKET ) +# 2396 "ml/lexer.ml" + + | 54 -> +# 905 "ml/lexer.mll" + ( LBRACKETBAR ) +# 2401 "ml/lexer.ml" + + | 55 -> +# 906 "ml/lexer.mll" + ( LBRACKETLESS ) +# 2406 "ml/lexer.ml" + + | 56 -> +# 907 "ml/lexer.mll" + ( LBRACKETGREATER ) +# 2411 "ml/lexer.ml" + + | 57 -> +# 908 "ml/lexer.mll" + ( RBRACKET ) +# 2416 "ml/lexer.ml" + + | 58 -> +# 909 "ml/lexer.mll" + ( LBRACE ) +# 2421 "ml/lexer.ml" + + | 59 -> +# 910 "ml/lexer.mll" + ( LBRACELESS ) +# 2426 "ml/lexer.ml" + + | 60 -> +# 911 "ml/lexer.mll" + ( BAR ) +# 2431 "ml/lexer.ml" + + | 61 -> +# 912 "ml/lexer.mll" + ( BARBAR ) +# 2436 "ml/lexer.ml" + + | 62 -> +# 913 "ml/lexer.mll" + ( BARRBRACKET ) +# 2441 "ml/lexer.ml" + + | 63 -> +# 914 "ml/lexer.mll" + ( GREATER ) +# 2446 "ml/lexer.ml" + + | 64 -> +# 915 "ml/lexer.mll" + ( GREATERRBRACKET ) +# 2451 "ml/lexer.ml" + + | 65 -> +# 916 "ml/lexer.mll" + ( RBRACE ) +# 2456 "ml/lexer.ml" + + | 66 -> +# 917 "ml/lexer.mll" + ( GREATERRBRACE ) +# 2461 "ml/lexer.ml" + + | 67 -> +# 918 "ml/lexer.mll" + ( LBRACKETAT ) +# 2466 "ml/lexer.ml" + + | 68 -> +# 919 "ml/lexer.mll" + ( LBRACKETATAT ) +# 2471 "ml/lexer.ml" + + | 69 -> +# 920 "ml/lexer.mll" + ( LBRACKETATATAT ) +# 2476 "ml/lexer.ml" + + | 70 -> +# 921 "ml/lexer.mll" + ( LBRACKETPERCENT ) +# 2481 "ml/lexer.ml" + + | 71 -> +# 922 "ml/lexer.mll" + ( LBRACKETPERCENTPERCENT ) +# 2486 "ml/lexer.ml" + + | 72 -> +# 923 "ml/lexer.mll" + ( BANG ) +# 2491 "ml/lexer.ml" + + | 73 -> +# 924 "ml/lexer.mll" + ( INFIXOP0 "!=" ) +# 2496 "ml/lexer.ml" + + | 74 -> +# 925 "ml/lexer.mll" + ( PLUS ) +# 2501 "ml/lexer.ml" + + | 75 -> +# 926 "ml/lexer.mll" + ( PLUSDOT ) +# 2506 "ml/lexer.ml" + + | 76 -> +# 927 "ml/lexer.mll" + ( PLUSEQ ) +# 2511 "ml/lexer.ml" + + | 77 -> +# 928 "ml/lexer.mll" + ( MINUS ) +# 2516 "ml/lexer.ml" + + | 78 -> +# 929 "ml/lexer.mll" + ( MINUSDOT ) +# 2521 "ml/lexer.ml" + + | 79 -> +# 932 "ml/lexer.mll" + ( PREFIXOP(Lexing.lexeme lexbuf) ) +# 2526 "ml/lexer.ml" + + | 80 -> +# 934 "ml/lexer.mll" + ( PREFIXOP(Lexing.lexeme lexbuf) ) +# 2531 "ml/lexer.ml" + + | 81 -> +# 936 "ml/lexer.mll" + ( INFIXOP0(Lexing.lexeme lexbuf) ) +# 2536 "ml/lexer.ml" + + | 82 -> +# 938 "ml/lexer.mll" + ( INFIXOP1(Lexing.lexeme lexbuf) ) +# 2541 "ml/lexer.ml" + + | 83 -> +# 940 "ml/lexer.mll" + ( INFIXOP2(Lexing.lexeme lexbuf) ) +# 2546 "ml/lexer.ml" + + | 84 -> +# 942 "ml/lexer.mll" + ( INFIXOP4(Lexing.lexeme lexbuf) ) +# 2551 "ml/lexer.ml" + + | 85 -> +# 943 "ml/lexer.mll" + ( PERCENT ) +# 2556 "ml/lexer.ml" + + | 86 -> +# 945 "ml/lexer.mll" + ( INFIXOP3(Lexing.lexeme lexbuf) ) +# 2561 "ml/lexer.ml" + + | 87 -> +# 947 "ml/lexer.mll" + ( HASHOP(Lexing.lexeme lexbuf) ) +# 2566 "ml/lexer.ml" + + | 88 -> +# 948 "ml/lexer.mll" + ( + if !if_then_else <> Dir_out then + if !if_then_else = Dir_if_true then + raise (Error (Unterminated_if, Location.curr lexbuf)) + else raise (Error(Unterminated_else, Location.curr lexbuf)) + else + EOF + + ) +# 2579 "ml/lexer.ml" + + | 89 -> +# 958 "ml/lexer.mll" + ( raise (Error(Illegal_character (Lexing.lexeme_char lexbuf 0), + Location.curr lexbuf)) + ) +# 2586 "ml/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 137 +and __ocaml_lex_comment_rec lexbuf __ocaml_lex_state = + match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with + | 0 -> +# 964 "ml/lexer.mll" + ( comment_start_loc := (Location.curr lexbuf) :: !comment_start_loc; + store_lexeme lexbuf; + comment lexbuf + ) +# 2601 "ml/lexer.ml" + + | 1 -> +# 969 "ml/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 + ) +# 2612 "ml/lexer.ml" + + | 2 -> +# 977 "ml/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 ) +# 2633 "ml/lexer.ml" + + | 3 -> +# 995 "ml/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 ) +# 2658 "ml/lexer.ml" + + | 4 -> +# 1018 "ml/lexer.mll" + ( store_lexeme lexbuf; comment lexbuf ) +# 2663 "ml/lexer.ml" + + | 5 -> +# 1020 "ml/lexer.mll" + ( update_loc lexbuf None 1 false 1; + store_lexeme lexbuf; + comment lexbuf + ) +# 2671 "ml/lexer.ml" + + | 6 -> +# 1025 "ml/lexer.mll" + ( store_lexeme lexbuf; comment lexbuf ) +# 2676 "ml/lexer.ml" + + | 7 -> +# 1027 "ml/lexer.mll" + ( store_lexeme lexbuf; comment lexbuf ) +# 2681 "ml/lexer.ml" + + | 8 -> +# 1029 "ml/lexer.mll" + ( store_lexeme lexbuf; comment lexbuf ) +# 2686 "ml/lexer.ml" + + | 9 -> +# 1031 "ml/lexer.mll" + ( store_lexeme lexbuf; comment lexbuf ) +# 2691 "ml/lexer.ml" + + | 10 -> +# 1033 "ml/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)) + ) +# 2702 "ml/lexer.ml" + + | 11 -> +# 1041 "ml/lexer.mll" + ( update_loc lexbuf None 1 false 0; + store_lexeme lexbuf; + comment lexbuf + ) +# 2710 "ml/lexer.ml" + + | 12 -> +# 1046 "ml/lexer.mll" + ( store_lexeme lexbuf; comment lexbuf ) +# 2715 "ml/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 169 +and __ocaml_lex_string_rec lexbuf __ocaml_lex_state = + match Lexing.new_engine __ocaml_lex_tables __ocaml_lex_state lexbuf with + | 0 -> +# 1050 "ml/lexer.mll" + ( () ) +# 2727 "ml/lexer.ml" + + | 1 -> +let +# 1051 "ml/lexer.mll" + space +# 2733 "ml/lexer.ml" += Lexing.sub_lexeme lexbuf lexbuf.Lexing.lex_mem.(0) lexbuf.Lexing.lex_curr_pos in +# 1052 "ml/lexer.mll" + ( update_loc lexbuf None 1 false (String.length space); + if in_comment () then store_lexeme lexbuf; + string lexbuf + ) +# 2740 "ml/lexer.ml" + + | 2 -> +# 1057 "ml/lexer.mll" + ( store_escaped_char lexbuf + (char_for_backslash(Lexing.lexeme_char lexbuf 1)); + string lexbuf ) +# 2747 "ml/lexer.ml" + + | 3 -> +# 1061 "ml/lexer.mll" + ( store_escaped_char lexbuf (char_for_decimal_code lexbuf 1); + string lexbuf ) +# 2753 "ml/lexer.ml" + + | 4 -> +# 1064 "ml/lexer.mll" + ( store_escaped_char lexbuf (char_for_octal_code lexbuf 2); + string lexbuf ) +# 2759 "ml/lexer.ml" + + | 5 -> +# 1067 "ml/lexer.mll" + ( store_escaped_char lexbuf (char_for_hexadecimal_code lexbuf 2); + string lexbuf ) +# 2765 "ml/lexer.ml" + + | 6 -> +# 1070 "ml/lexer.mll" + ( store_escaped_uchar lexbuf (uchar_for_uchar_escape lexbuf); + string lexbuf ) +# 2771 "ml/lexer.ml" + + | 7 -> +# 1073 "ml/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 + ) +# 2786 "ml/lexer.ml" + + | 8 -> +# 1085 "ml/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 + ) +# 2796 "ml/lexer.ml" + + | 9 -> +# 1092 "ml/lexer.mll" + ( is_in_string := false; + raise (Error (Unterminated_string, !string_start_loc)) ) +# 2802 "ml/lexer.ml" + + | 10 -> +# 1095 "ml/lexer.mll" + ( store_string_char(Lexing.lexeme_char lexbuf 0); + string lexbuf ) +# 2808 "ml/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 196 +and __ocaml_lex_quoted_string_rec delim lexbuf __ocaml_lex_state = + match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with + | 0 -> +# 1100 "ml/lexer.mll" + ( update_loc lexbuf None 1 false 0; + store_lexeme lexbuf; + quoted_string delim lexbuf + ) +# 2823 "ml/lexer.ml" + + | 1 -> +# 1105 "ml/lexer.mll" + ( is_in_string := false; + raise (Error (Unterminated_string, !string_start_loc)) ) +# 2829 "ml/lexer.ml" + + | 2 -> +# 1108 "ml/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) + ) +# 2839 "ml/lexer.ml" + + | 3 -> +# 1115 "ml/lexer.mll" + ( store_string_char(Lexing.lexeme_char lexbuf 0); + quoted_string delim lexbuf ) +# 2845 "ml/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 205 +and __ocaml_lex_skip_hash_bang_rec lexbuf __ocaml_lex_state = + match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with + | 0 -> +# 1120 "ml/lexer.mll" + ( update_loc lexbuf None 3 false 0 ) +# 2857 "ml/lexer.ml" + + | 1 -> +# 1122 "ml/lexer.mll" + ( update_loc lexbuf None 1 false 0 ) +# 2862 "ml/lexer.ml" + + | 2 -> +# 1123 "ml/lexer.mll" + ( () ) +# 2867 "ml/lexer.ml" + + | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; + __ocaml_lex_skip_hash_bang_rec lexbuf __ocaml_lex_state + +;; + +# 1125 "ml/lexer.mll" + + let at_bol lexbuf = + let pos = Lexing.lexeme_start_p lexbuf in + pos.pos_cnum = pos.pos_bol + + 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 interpret_directive lexbuf cont look_ahead = + let if_then_else = !if_then_else in + begin match token_with_comments lexbuf, if_then_else with + | IF, Dir_out -> + let rec skip_from_if_false () = + let token = token_with_comments lexbuf in + if token = EOF then + raise (Error (Unterminated_if, Location.curr lexbuf)) else + if token = HASH && at_bol lexbuf then + begin + let token = token_with_comments lexbuf in + match token with + | END -> + begin + update_if_then_else Dir_out; + cont lexbuf + end + | ELSE -> + begin + update_if_then_else Dir_if_false; + cont lexbuf + end + | IF -> + raise (Error (Unexpected_directive, Location.curr lexbuf)) + | _ -> + if is_elif token && + directive_parse token_with_comments lexbuf then + begin + update_if_then_else Dir_if_true; + cont lexbuf + end + else skip_from_if_false () + end + else skip_from_if_false () in + if directive_parse token_with_comments lexbuf then + begin + update_if_then_else Dir_if_true (* Next state: ELSE *); + cont lexbuf + end + else + skip_from_if_false () + | IF, (Dir_if_false | Dir_if_true)-> + raise (Error(Unexpected_directive, Location.curr lexbuf)) + | LIDENT "elif", (Dir_if_false | Dir_out) + -> (* when the predicate is false, it will continue eating `elif` *) + raise (Error(Unexpected_directive, Location.curr lexbuf)) + | (LIDENT "elif" | ELSE as token), Dir_if_true -> + (* looking for #end, however, it can not see #if anymore *) + let rec skip_from_if_true else_seen = + let token = token_with_comments lexbuf in + if token = EOF then + raise (Error (Unterminated_else, Location.curr lexbuf)) else + if token = HASH && at_bol lexbuf then + begin + let token = token_with_comments lexbuf in + match token with + | END -> + begin + update_if_then_else Dir_out; + cont lexbuf + end + | IF -> + raise (Error (Unexpected_directive, Location.curr lexbuf)) + | ELSE -> + if else_seen then + raise (Error (Unexpected_directive, Location.curr lexbuf)) + else + skip_from_if_true true + | _ -> + if else_seen && is_elif token then + raise (Error (Unexpected_directive, Location.curr lexbuf)) + else + skip_from_if_true else_seen + end + else skip_from_if_true else_seen in + skip_from_if_true (token = ELSE) + | ELSE, Dir_if_false + | ELSE, Dir_out -> + raise (Error(Unexpected_directive, Location.curr lexbuf)) + | END, (Dir_if_false | Dir_if_true ) -> + update_if_then_else Dir_out; + cont lexbuf + | END, Dir_out -> + raise (Error(Unexpected_directive, Location.curr lexbuf)) + | token, (Dir_if_true | Dir_if_false | Dir_out) -> + look_ahead token + end + + 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 at_bol lexbuf -> + interpret_directive lexbuf + (fun lexbuf -> loop lines docs lexbuf) + (fun token -> sharp_look_ahead := Some token; HASH) + | 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 + match !sharp_look_ahead with + | None -> + loop NoLine Initial lexbuf + | Some token -> + sharp_look_ahead := None ; + token + + let init () = + sharp_look_ahead := None; + update_if_then_else Dir_out; + is_in_string := false; + comment_start_loc := []; + comment_list := []; + match !preprocessor with + | None -> () + | Some (init, _preprocess) -> init () + + let rec filter_directive 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 lexbuf + (fun lexbuf -> + filter_directive + (Lexing.lexeme_end lexbuf) + ((pos, start_pos) :: acc) + lexbuf + + ) + (fun _token -> filter_directive pos acc lexbuf ) + | EOF -> (pos, Lexing.lexeme_end lexbuf) :: acc + | _ -> filter_directive pos acc lexbuf + + let filter_directive_from_lexbuf lexbuf = + List.rev (filter_directive 0 [] lexbuf ) + + let set_preprocessor init preprocess = + escaped_newlines := true; + preprocessor := Some (init, preprocess) + + +# 3106 "ml/lexer.ml" diff --git a/analysis/src/vendor/compiler-libs-406/lexer.mli b/analysis/src/vendor/compiler-libs-406/lexer.mli new file mode 100644 index 000000000..16da20297 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/lexer.mli @@ -0,0 +1,84 @@ +(**************************************************************************) +(* *) +(* 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 lexical analyzer *) + +val init : unit -> unit +val token: Lexing.lexbuf -> Parser.token +val skip_hash_bang: Lexing.lexbuf -> unit + +type directive_type + +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 + | 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 Error of error * Location.t + + + +val in_comment : unit -> bool;; +val in_string : unit -> bool;; + + +val print_warnings : bool ref +val handle_docstrings: bool ref +val comments : unit -> (string * Location.t) list +val token_with_comments : Lexing.lexbuf -> Parser.token + +(* + [set_preprocessor init preprocessor] registers [init] as the function +to call to initialize the preprocessor when the lexer is initialized, +and [preprocessor] a function that is called when a new token is needed +by the parser, as [preprocessor lexer lexbuf] where [lexer] is the +lexing function. + +When a preprocessor is configured by calling [set_preprocessor], the lexer +changes its behavior to accept backslash-newline as a token-separating blank. +*) + +val set_preprocessor : + (unit -> unit) -> + ((Lexing.lexbuf -> Parser.token) -> Lexing.lexbuf -> Parser.token) -> + unit + +(** semantic version predicate *) +val semver : Location.t -> string -> string -> bool + +val filter_directive_from_lexbuf : Lexing.lexbuf -> (int * int) list + +val replace_directive_int : string -> int -> unit +val replace_directive_string : string -> string -> unit +val replace_directive_bool : string -> bool -> unit +val remove_directive_built_in_value : string -> unit + +(** @return false means failed to define *) +val define_key_value : string -> string -> bool +val list_variables : Format.formatter -> unit diff --git a/analysis/src/vendor/compiler-libs-406/location.ml b/analysis/src/vendor/compiler-libs-406/location.ml new file mode 100644 index 000000000..9578b071a --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/location.ml @@ -0,0 +1,330 @@ +(**************************************************************************) +(* *) +(* 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 Lexing + +let absname = ref false + (* This reference should be in Clflags, but it would create an additional + dependency and make bootstrapping Camlp4 more difficult. *) + +type t = Warnings.loc = { loc_start: position; loc_end: position; loc_ghost: bool };; + +let in_file name = + let loc = { + pos_fname = name; + pos_lnum = 1; + pos_bol = 0; + pos_cnum = -1; + } in + { loc_start = loc; loc_end = loc; loc_ghost = true } +;; + +let none = in_file "_none_";; + +let curr lexbuf = { + loc_start = lexbuf.lex_start_p; + loc_end = lexbuf.lex_curr_p; + loc_ghost = false +};; + +let init lexbuf fname = + lexbuf.lex_curr_p <- { + pos_fname = fname; + pos_lnum = 1; + pos_bol = 0; + pos_cnum = 0; + } +;; + +let symbol_rloc () = { + loc_start = Parsing.symbol_start_pos (); + loc_end = Parsing.symbol_end_pos (); + loc_ghost = false; +};; + +let symbol_gloc () = { + loc_start = Parsing.symbol_start_pos (); + loc_end = Parsing.symbol_end_pos (); + loc_ghost = true; +};; + +let rhs_loc n = { + loc_start = Parsing.rhs_start_pos n; + loc_end = Parsing.rhs_end_pos n; + loc_ghost = false; +};; + +let input_name = ref "_none_" +let input_lexbuf = ref (None : lexbuf option) +let set_input_name name = + if name <> "" then input_name := name +(* Terminal info *) + + + +let num_loc_lines = ref 0 (* number of lines already printed after input *) + +(* Print the location in some way or another *) + +open Format + +let absolute_path s = (* This function could go into Filename *) + let open Filename in + let s = if is_relative s then concat (Sys.getcwd ()) s else s in + (* Now simplify . and .. components *) + let rec aux s = + let base = basename s in + let dir = dirname s in + if dir = s then dir + else if base = current_dir_name then aux dir + else if base = parent_dir_name then dirname (aux dir) + else concat (aux dir) base + in + aux s + +let show_filename file = + let file = if file = "_none_" then !input_name else file in + if !absname then absolute_path file else file + +let print_filename ppf file = + Format.fprintf ppf "%s" (show_filename file) + +let reset () = + num_loc_lines := 0 + +let (msg_file, msg_line, msg_chars, msg_to, msg_colon) = + ("File \"", "\", line ", ", characters ", "-", ":") + +(* return file, line, char from the given position *) +let get_pos_info pos = + (pos.pos_fname, pos.pos_lnum, pos.pos_cnum - pos.pos_bol) +;; + +let setup_colors () = + Misc.Color.setup !Clflags.color + +let print_loc ppf loc = + setup_colors (); + 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 + 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; + fprintf ppf "@}" + end +;; + +let default_printer ppf loc = + setup_colors (); + fprintf ppf "@{%a@}%s@," print_loc loc msg_colon +;; + +let printer = ref default_printer +let print ppf loc = !printer ppf loc + +let error_prefix = "Error" +let warning_prefix = "Warning" + +let print_error_prefix ppf = + setup_colors (); + fprintf ppf "@{%s@}" error_prefix; +;; + +let print_compact ppf loc = + begin + let (file, line, startchar) = get_pos_info loc.loc_start in + let endchar = loc.loc_end.pos_cnum - loc.loc_start.pos_cnum + startchar in + fprintf ppf "%a:%i" print_filename file line; + if startchar >= 0 then fprintf ppf ",%i--%i" startchar endchar + end +;; + +let print_error ppf loc = + fprintf ppf "%a%t:" print loc print_error_prefix; +;; + +let print_error_cur_file ppf () = print_error ppf (in_file !input_name);; + +let default_warning_printer loc ppf w = + match Warnings.report w with + | `Inactive -> () + | `Active { Warnings. number; message; is_error; sub_locs } -> + setup_colors (); + fprintf ppf "@["; + print ppf loc; + if is_error + then + fprintf ppf "%t (%s %d): %s@," print_error_prefix + (String.uncapitalize_ascii warning_prefix) number message + else fprintf ppf "@{%s@} %d: %s@," warning_prefix number message; + List.iter + (fun (loc, msg) -> + if loc <> none then fprintf ppf " %a %s@," print loc msg + ) + sub_locs; + fprintf ppf "@]" +;; + +let warning_printer = ref default_warning_printer ;; + +let print_warning loc ppf w = + !warning_printer loc ppf w +;; + +let formatter_for_warnings = ref err_formatter;; +let prerr_warning loc w = + print_warning loc !formatter_for_warnings w;; + +let echo_eof () = + print_newline (); + incr num_loc_lines + +type 'a loc = { + txt : 'a; + loc : t; +} + +let mkloc txt loc = { txt ; loc } +let mknoloc txt = mkloc txt none + + +type error = + { + loc: t; + msg: string; + sub: error list; + if_highlight: string; (* alternative message if locations are highlighted *) + } + +let pp_ksprintf ?before k fmt = + let buf = Buffer.create 64 in + let ppf = Format.formatter_of_buffer buf in + Misc.Color.set_color_tag_handling ppf; + begin match before with + | None -> () + | Some f -> f ppf + end; + kfprintf + (fun _ -> + pp_print_flush ppf (); + let msg = Buffer.contents buf in + k msg) + ppf fmt + +(* Shift the formatter's offset by the length of the error prefix, which + is always added by the compiler after the message has been formatted *) +let print_phanton_error_prefix ppf = + Format.pp_print_as ppf (String.length error_prefix + 2 (* ": " *)) "" + +let errorf ?(loc = none) ?(sub = []) ?(if_highlight = "") fmt = + pp_ksprintf + ~before:print_phanton_error_prefix + (fun msg -> {loc; msg; sub; if_highlight}) + fmt + +let error ?(loc = none) ?(sub = []) ?(if_highlight = "") msg = + {loc; msg; sub; if_highlight} + +let error_of_exn : (exn -> error option) list ref = ref [] + +let register_error_of_exn f = error_of_exn := f :: !error_of_exn + +exception Already_displayed_error = Warnings.Errors + +let error_of_exn exn = + match exn with + | Already_displayed_error -> Some `Already_displayed + | _ -> + let rec loop = function + | [] -> None + | f :: rest -> + match f exn with + | Some error -> Some (`Ok error) + | None -> loop rest + in + loop !error_of_exn + + +let rec default_error_reporter ppf ({loc; msg; sub}) = + fprintf ppf "@[%a %s" print_error loc msg; + List.iter (Format.fprintf ppf "@,@[<2>%a@]" default_error_reporter) sub; + fprintf ppf "@]" + +let error_reporter = ref default_error_reporter + +let report_error ppf err = + !error_reporter ppf err +;; + +let error_of_printer loc print x = + errorf ~loc "%a@?" print x + +let error_of_printer_file print x = + error_of_printer (in_file !input_name) print x + +let () = + register_error_of_exn + (function + | Sys_error msg -> + Some (errorf ~loc:(in_file !input_name) + "I/O error: %s" msg) + + | Misc.HookExnWrapper {error = e; hook_name; + hook_info={Misc.sourcefile}} -> + let sub = match error_of_exn e with + | None | Some `Already_displayed -> error (Printexc.to_string e) + | Some (`Ok err) -> err + in + Some + (errorf ~loc:(in_file sourcefile) + "In hook %S:" hook_name + ~sub:[sub]) + | _ -> None + ) + +external reraise : exn -> 'a = "%reraise" + +let rec report_exception_rec n ppf exn = + try + match error_of_exn exn with + | None -> reraise exn + | Some `Already_displayed -> () + | Some (`Ok err) -> fprintf ppf "@[%a@]@." report_error err + with exn when n > 0 -> report_exception_rec (n-1) ppf exn + +let report_exception ppf exn = report_exception_rec 5 ppf exn + + +exception Error of error + +let () = + register_error_of_exn + (function + | Error e -> Some e + | _ -> None + ) + +let raise_errorf ?(loc = none) ?(sub = []) ?(if_highlight = "") = + pp_ksprintf + ~before:print_phanton_error_prefix + (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 diff --git a/analysis/src/vendor/compiler-libs-406/location.mli b/analysis/src/vendor/compiler-libs-406/location.mli new file mode 100644 index 000000000..7bea184dd --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/location.mli @@ -0,0 +1,145 @@ +(**************************************************************************) +(* *) +(* 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 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/src/vendor/compiler-libs-406/longident.ml b/analysis/src/vendor/compiler-libs-406/longident.ml new file mode 100644 index 000000000..6f5d53983 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/longident.ml @@ -0,0 +1,49 @@ +(**************************************************************************) +(* *) +(* 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 t = + Lident of string + | Ldot of t * string + | Lapply of t * t + +let rec flat accu = function + Lident s -> s :: accu + | Ldot(lid, s) -> flat (s :: accu) lid + | Lapply(_, _) -> Misc.fatal_error "Longident.flat" + +let flatten lid = flat [] lid + +let last = function + Lident s -> s + | Ldot(_, s) -> s + | Lapply(_, _) -> Misc.fatal_error "Longident.last" + +let rec split_at_dots s pos = + try + let dot = String.index_from s pos '.' in + String.sub s pos (dot - pos) :: split_at_dots s (dot + 1) + with Not_found -> + [String.sub s pos (String.length s - pos)] + +let unflatten l = + match l with + | [] -> None + | hd :: tl -> Some (List.fold_left (fun p s -> Ldot(p, s)) (Lident hd) tl) + +let parse s = + match unflatten (split_at_dots s 0) with + | None -> Lident "" (* should not happen, but don't put assert false + so as not to crash the toplevel (see Genprintval) *) + | Some v -> v diff --git a/analysis/src/vendor/compiler-libs-406/longident.mli b/analysis/src/vendor/compiler-libs-406/longident.mli new file mode 100644 index 000000000..5ffb16a81 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/longident.mli @@ -0,0 +1,26 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(** Long identifiers, used in parsetree. *) + +type t = + Lident of string + | Ldot of t * string + | Lapply of t * t + +val flatten: t -> string list +val unflatten: string list -> t option +val last: t -> string +val parse: string -> t diff --git a/analysis/src/vendor/compiler-libs-406/map_gen.ml b/analysis/src/vendor/compiler-libs-406/map_gen.ml new file mode 100644 index 000000000..bdc15ca7e --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/map_gen.ml @@ -0,0 +1,380 @@ +(***********************************************************************) +(* *) +(* 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/src/vendor/compiler-libs-406/misc.ml b/analysis/src/vendor/compiler-libs-406/misc.ml new file mode 100644 index 000000000..446bcf317 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/misc.ml @@ -0,0 +1,745 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Errors *) + +exception Fatal_error + + + +let fatal_error msg = + prerr_string ">> Fatal error: "; prerr_endline msg; raise Fatal_error + +let fatal_errorf fmt = Format.kasprintf fatal_error fmt + +(* Exceptions *) + +let try_finally work cleanup = + let result = (try work () with e -> cleanup (); raise e) in + cleanup (); + result +;; + +type ref_and_value = R : 'a ref * 'a -> ref_and_value + +let protect_refs = + let set_refs l = List.iter (fun (R (r, v)) -> r := v) l in + fun refs f -> + let backup = List.map (fun (R (r, _)) -> R (r, !r)) refs in + set_refs refs; + match f () with + | x -> set_refs backup; x + | exception e -> set_refs backup; raise e + +(* List functions *) + +let rec map_end f l1 l2 = + match l1 with + [] -> l2 + | hd::tl -> f hd :: map_end f tl l2 + +let rec map_left_right f = function + [] -> [] + | hd::tl -> let res = f hd in res :: map_left_right f tl + +let rec for_all2 pred l1 l2 = + match (l1, l2) with + ([], []) -> true + | (hd1::tl1, hd2::tl2) -> pred hd1 hd2 && for_all2 pred tl1 tl2 + | (_, _) -> false + +let rec replicate_list elem n = + if n <= 0 then [] else elem :: replicate_list elem (n-1) + +let rec list_remove x = function + [] -> [] + | hd :: tl -> + if hd = x then tl else hd :: list_remove x tl + +let rec split_last = function + [] -> assert false + | [x] -> ([], x) + | hd :: tl -> + let (lst, last) = split_last tl in + (hd :: lst, last) + +module Stdlib = struct + module List = struct + type 'a t = 'a list + + let rec compare cmp l1 l2 = + match l1, l2 with + | [], [] -> 0 + | [], _::_ -> -1 + | _::_, [] -> 1 + | h1::t1, h2::t2 -> + let c = cmp h1 h2 in + if c <> 0 then c + else compare cmp t1 t2 + + let rec equal eq l1 l2 = + match l1, l2 with + | ([], []) -> true + | (hd1 :: tl1, hd2 :: tl2) -> eq hd1 hd2 && equal eq tl1 tl2 + | (_, _) -> false + + let filter_map f l = + let rec aux acc l = + match l with + | [] -> List.rev acc + | h :: t -> + match f h with + | None -> aux acc t + | Some v -> aux (v :: acc) t + in + aux [] l + + let map2_prefix f l1 l2 = + let rec aux acc l1 l2 = + match l1, l2 with + | [], _ -> (List.rev acc, l2) + | _ :: _, [] -> raise (Invalid_argument "map2_prefix") + | h1::t1, h2::t2 -> + let h = f h1 h2 in + aux (h :: acc) t1 t2 + in + aux [] l1 l2 + + let some_if_all_elements_are_some l = + let rec aux acc l = + match l with + | [] -> Some (List.rev acc) + | None :: _ -> None + | Some h :: t -> aux (h :: acc) t + in + aux [] l + + let split_at n l = + let rec aux n acc l = + if n = 0 + then List.rev acc, l + else + match l with + | [] -> raise (Invalid_argument "split_at") + | t::q -> aux (n-1) (t::acc) q + in + aux n [] l + end + + module Option = struct + type 'a t = 'a option + + let equal eq o1 o2 = + match o1, o2 with + | None, None -> true + | Some e1, Some e2 -> eq e1 e2 + | _, _ -> false + + let iter f = function + | Some x -> f x + | None -> () + + let map f = function + | Some x -> Some (f x) + | None -> None + + let fold f a b = + match a with + | None -> b + | Some a -> f a b + + let value_default f ~default a = + match a with + | None -> default + | Some a -> f a + end + + module Array = struct + let exists2 p a1 a2 = + let n = Array.length a1 in + if Array.length a2 <> n then invalid_arg "Misc.Stdlib.Array.exists2"; + let rec loop i = + if i = n then false + else if p (Array.unsafe_get a1 i) (Array.unsafe_get a2 i) then true + else loop (succ i) in + loop 0 + end +end + +let may = Stdlib.Option.iter +let may_map = Stdlib.Option.map + +(* File functions *) + +let find_in_path path name = + if not (Filename.is_implicit name) then + if Sys.file_exists name then name else raise Not_found + else begin + let rec try_dir = function + [] -> raise Not_found + | dir::rem -> + let fullname = Filename.concat dir name in + if Sys.file_exists fullname then fullname else try_dir rem + in try_dir path + end + +let find_in_path_rel path name = + let rec simplify s = + let open Filename in + let base = basename s in + let dir = dirname s in + if dir = s then dir + else if base = current_dir_name then simplify dir + else concat (simplify dir) base + in + let rec try_dir = function + [] -> raise Not_found + | dir::rem -> + let fullname = simplify (Filename.concat dir name) in + if Sys.file_exists fullname then fullname else try_dir rem + in try_dir path + +let find_in_path_uncap path name = + let uname = String.uncapitalize_ascii name in + let rec try_dir = function + [] -> raise Not_found + | dir::rem -> + let fullname = Filename.concat dir name + and ufullname = Filename.concat dir uname in + if Sys.file_exists ufullname then ufullname + else if Sys.file_exists fullname then fullname + else try_dir rem + in try_dir path + +let remove_file filename = + try + if Sys.file_exists filename + then Sys.remove filename + with Sys_error _msg -> + () + +(* Expand a -I option: if it starts with +, make it relative to the standard + library directory *) + +let expand_directory alt s = + if String.length s > 0 && s.[0] = '+' + then Filename.concat alt + (String.sub s 1 (String.length s - 1)) + else s + +(* Hashtable functions *) + +let create_hashtable size init = + let tbl = Hashtbl.create size in + List.iter (fun (key, data) -> Hashtbl.add tbl key data) init; + tbl + +(* File copy *) + +let copy_file ic oc = + let buff = Bytes.create 0x1000 in + let rec copy () = + let n = input ic buff 0 0x1000 in + if n = 0 then () else (output oc buff 0 n; copy()) + in copy() + +let copy_file_chunk ic oc len = + let buff = Bytes.create 0x1000 in + let rec copy n = + if n <= 0 then () else begin + let r = input ic buff 0 (min n 0x1000) in + if r = 0 then raise End_of_file else (output oc buff 0 r; copy(n-r)) + end + in copy len + +let string_of_file ic = + let b = Buffer.create 0x10000 in + let buff = Bytes.create 0x1000 in + let rec copy () = + let n = input ic buff 0 0x1000 in + if n = 0 then Buffer.contents b else + (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 + ~mode ~perms:0o666 ~temp_dir:(Filename.dirname filename) + (Filename.basename filename) ".tmp" in + (* The 0o666 permissions will be modified by the umask. It's just + like what [open_out] and [open_out_bin] do. + With temp_dir = dirname filename, we ensure that the returned + temp file is in the same directory as filename itself, making + it safe to rename temp_filename to filename later. + With prefix = basename filename, we are almost certain that + the first generated name will be unique. A fixed prefix + would work too but might generate more collisions if many + files are being produced simultaneously in the same directory. *) + match fn temp_filename oc with + | res -> + close_out oc; + begin try + Sys.rename temp_filename filename; res + with exn -> + remove_file temp_filename; raise exn + end + | exception exn -> + close_out oc; remove_file temp_filename; raise exn + +(* Integer operations *) + +let rec log2 n = + if n <= 1 then 0 else 1 + log2(n asr 1) + +let align n a = + if n >= 0 then (n + a - 1) land (-a) else n land (-a) + +let no_overflow_add a b = (a lxor b) lor (a lxor (lnot (a+b))) < 0 + +let no_overflow_sub a b = (a lxor (lnot b)) lor (b lxor (a-b)) < 0 + +let no_overflow_mul a b = b <> 0 && (a * b) / b = a + +let no_overflow_lsl a k = + 0 <= k && k < Sys.word_size && min_int asr k <= a && a <= max_int asr k + +module Int_literal_converter = struct + (* To convert integer literals, allowing max_int + 1 (PR#4210) *) + let cvt_int_aux str neg of_string = + if String.length str = 0 || str.[0]= '-' + then of_string str + else neg (of_string ("-" ^ str)) + let int s = cvt_int_aux s (~-) int_of_string + let int32 s = cvt_int_aux s Int32.neg Int32.of_string + let int64 s = cvt_int_aux s Int64.neg Int64.of_string + let nativeint s = cvt_int_aux s Nativeint.neg Nativeint.of_string +end + +(* String operations *) + +let chop_extensions file = + let dirname = Filename.dirname file and basename = Filename.basename file in + try + let pos = String.index basename '.' in + let basename = String.sub basename 0 pos in + if Filename.is_implicit file && dirname = Filename.current_dir_name then + basename + else + Filename.concat dirname basename + with Not_found -> file + +let search_substring pat str start = + let rec search i j = + if j >= String.length pat then i + else if i + j >= String.length str then raise Not_found + else if str.[i + j] = pat.[j] then search i (j+1) + else search (i+1) 0 + in search start 0 + +let replace_substring ~before ~after str = + let rec search acc curr = + match search_substring before str curr with + | next -> + let prefix = String.sub str curr (next - curr) in + search (prefix :: acc) (next + String.length before) + | exception Not_found -> + let suffix = String.sub str curr (String.length str - curr) in + List.rev (suffix :: acc) + in String.concat after (search [] 0) + +let rev_split_words s = + let rec split1 res i = + if i >= String.length s then res else begin + match s.[i] with + ' ' | '\t' | '\r' | '\n' -> split1 res (i+1) + | _ -> split2 res i (i+1) + end + and split2 res i j = + if j >= String.length s then String.sub s i (j-i) :: res else begin + match s.[j] with + ' ' | '\t' | '\r' | '\n' -> split1 (String.sub s i (j-i) :: res) (j+1) + | _ -> split2 res i (j+1) + end + in split1 [] 0 + +let get_ref r = + let v = !r in + r := []; v + +let fst3 (x, _, _) = x +let snd3 (_,x,_) = x +let thd3 (_,_,x) = x + +let fst4 (x, _, _, _) = x +let snd4 (_,x,_, _) = x +let thd4 (_,_,x,_) = x +let for4 (_,_,_,x) = x + + +module LongString = struct + type t = bytes array + + let create str_size = + let tbl_size = str_size / Sys.max_string_length + 1 in + let tbl = Array.make tbl_size Bytes.empty in + for i = 0 to tbl_size - 2 do + tbl.(i) <- Bytes.create Sys.max_string_length; + done; + tbl.(tbl_size - 1) <- Bytes.create (str_size mod Sys.max_string_length); + tbl + + let length tbl = + let tbl_size = Array.length tbl in + Sys.max_string_length * (tbl_size - 1) + Bytes.length tbl.(tbl_size - 1) + + let get tbl ind = + Bytes.get tbl.(ind / Sys.max_string_length) (ind mod Sys.max_string_length) + + let set tbl ind c = + Bytes.set tbl.(ind / Sys.max_string_length) (ind mod Sys.max_string_length) + c + + let blit src srcoff dst dstoff len = + for i = 0 to len - 1 do + set dst (dstoff + i) (get src (srcoff + i)) + done + + let output oc tbl pos len = + for i = pos to pos + len - 1 do + output_char oc (get tbl i) + done + + let unsafe_blit_to_bytes src srcoff dst dstoff len = + for i = 0 to len - 1 do + Bytes.unsafe_set dst (dstoff + i) (get src (srcoff + i)) + done + + let input_bytes ic len = + let tbl = create len in + Array.iter (fun str -> really_input ic str 0 (Bytes.length str)) tbl; + tbl +end + + +let edit_distance a b cutoff = + let la, lb = String.length a, String.length b in + let cutoff = + (* using max_int for cutoff would cause overflows in (i + cutoff + 1); + we bring it back to the (max la lb) worstcase *) + min (max la lb) cutoff in + if abs (la - lb) > cutoff then None + else begin + (* initialize with 'cutoff + 1' so that not-yet-written-to cases have + the worst possible cost; this is useful when computing the cost of + a case just at the boundary of the cutoff diagonal. *) + let m = Array.make_matrix (la + 1) (lb + 1) (cutoff + 1) in + m.(0).(0) <- 0; + for i = 1 to la do + m.(i).(0) <- i; + done; + for j = 1 to lb do + m.(0).(j) <- j; + done; + for i = 1 to la do + for j = max 1 (i - cutoff - 1) to min lb (i + cutoff + 1) do + let cost = if a.[i-1] = b.[j-1] then 0 else 1 in + let best = + (* insert, delete or substitute *) + min (1 + min m.(i-1).(j) m.(i).(j-1)) (m.(i-1).(j-1) + cost) + in + let best = + (* swap two adjacent letters; we use "cost" again in case of + a swap between two identical letters; this is slightly + redundant as this is a double-substitution case, but it + was done this way in most online implementations and + imitation has its virtues *) + if not (i > 1 && j > 1 && a.[i-1] = b.[j-2] && a.[i-2] = b.[j-1]) + then best + else min best (m.(i-2).(j-2) + cost) + in + m.(i).(j) <- best + done; + done; + let result = m.(la).(lb) in + if result > cutoff + then None + else Some result + end + +let spellcheck env name = + let cutoff = + match String.length name with + | 1 | 2 -> 0 + | 3 | 4 -> 1 + | 5 | 6 -> 2 + | _ -> 3 + in + let compare target acc head = + match edit_distance target head cutoff with + | None -> acc + | Some dist -> + let (best_choice, best_dist) = acc in + if dist < best_dist then ([head], dist) + else if dist = best_dist then (head :: best_choice, dist) + else acc + in + fst (List.fold_left (compare name) ([], max_int) env) + +let did_you_mean ppf get_choices = + (* flush now to get the error report early, in the (unheard of) case + where the search in the get_choices function would take a bit of + time; in the worst case, the user has seen the error, she can + interrupt the process before the spell-checking terminates. *) + Format.fprintf ppf "@?"; + match get_choices () with + | [] -> () + | choices -> + let rest, last = split_last choices in + Format.fprintf ppf "@\nHint: Did you mean %s%s%s?@?" + (String.concat ", " rest) + (if rest = [] then "" else " or ") + last + +let cut_at s c = + let pos = String.index s c in + String.sub s 0 pos, String.sub s (pos+1) (String.length s - pos - 1) + + +module StringSet = Set.Make(struct type t = string let compare = compare end) +module StringMap = Map.Make(struct type t = string let compare = compare end) + +(* Color handling *) +module Color = struct + (* use ANSI color codes, see https://en.wikipedia.org/wiki/ANSI_escape_code *) + type color = + | Black + | Red + | Green + | Yellow + | Blue + | Magenta + | Cyan + | White + ;; + + type style = + | FG of color (* foreground *) + | BG of color (* background *) + | Bold + | Reset + | 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 c -> "3" ^ ansi_of_color c + | BG c -> "4" ^ ansi_of_color c + | Bold -> "1" + | Reset -> "0" + | Dim -> "2" + + let ansi_of_style_l l = + let s = match l with + | [] -> code_of_style Reset + | [s] -> code_of_style s + | _ -> String.concat ";" (List.map code_of_style l) + in + "\x1b[" ^ s ^ "m" + + type styles = { + error: style list; + warning: style list; + loc: style list; + } + + let default_styles = { + warning = [Bold; FG Magenta]; + error = [Bold; FG Red]; + loc = [Bold]; + } + + let cur_styles = ref default_styles + let get_styles () = !cur_styles + let set_styles s = cur_styles := s + + (* map a tag to a style, if the tag is known. + @raise Not_found otherwise *) + let style_of_stag s = match s with + | 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 + + (* either prints the tag of [s] or delegates to [or_else] *) + let mark_open_stag ~or_else s = + try + let style = style_of_stag s in + if !color_enabled then ansi_of_style_l style else "" + with Not_found -> or_else s + + let mark_close_stag ~or_else s = + try + let _ = style_of_stag s in + if !color_enabled then ansi_of_style_l [Reset] else "" + with Not_found -> or_else s + + (* add color handling to formatter [ppf] *) + let set_color_tag_handling ppf = + let open Format in + let functions = pp_get_formatter_stag_functions ppf () in + let functions' = {functions with + mark_open_stag=(mark_open_stag ~or_else:functions.mark_open_stag); + mark_close_stag=(mark_close_stag ~or_else:functions.mark_close_stag); + } in + pp_set_mark_tags ppf true; (* enable tags *) + pp_set_formatter_stag_functions ppf functions'; + (* also setup margins *) + pp_set_margin ppf (pp_get_margin std_formatter()); + () + + external isatty : out_channel -> bool = "caml_sys_isatty" + + (* reasonable heuristic on whether colors should be enabled *) + let should_enable_color () = + let term = try Sys.getenv "TERM" with Not_found -> "" in + term <> "dumb" + && term <> "" + && isatty stderr + + type setting = Auto | Always | Never + + let setup = + let first = ref true in (* initialize only once *) + let formatter_l = + [Format.std_formatter; Format.err_formatter; Format.str_formatter] + in + fun o -> + if !first then ( + first := false; + Format.set_mark_tags true; + List.iter set_color_tag_handling formatter_l; + color_enabled := (match o with + | Some Always -> true + | Some Auto -> should_enable_color () + | Some Never -> false + | None -> should_enable_color ()) + ); + () +end + +let normalise_eol s = + let b = Buffer.create 80 in + for i = 0 to String.length s - 1 do + if s.[i] <> '\r' then Buffer.add_char b s.[i] + done; + Buffer.contents b + +let delete_eol_spaces src = + let len_src = String.length src in + let dst = Bytes.create len_src in + let rec loop i_src i_dst = + if i_src = len_src then + i_dst + else + match src.[i_src] with + | ' ' | '\t' -> + loop_spaces 1 (i_src + 1) i_dst + | c -> + Bytes.set dst i_dst c; + loop (i_src + 1) (i_dst + 1) + and loop_spaces spaces i_src i_dst = + if i_src = len_src then + i_dst + else + match src.[i_src] with + | ' ' | '\t' -> + loop_spaces (spaces + 1) (i_src + 1) i_dst + | '\n' -> + Bytes.set dst i_dst '\n'; + loop (i_src + 1) (i_dst + 1) + | _ -> + for n = 0 to spaces do + Bytes.set dst (i_dst + n) src.[i_src - spaces + n] + done; + loop (i_src + 1) (i_dst + spaces + 1) + in + let stop = loop 0 0 in + Bytes.sub_string dst 0 stop + +type hook_info = { + sourcefile : string; +} + +exception HookExnWrapper of + { + error: exn; + hook_name: string; + hook_info: hook_info; + } + +exception HookExn of exn + +let raise_direct_hook_exn e = raise (HookExn e) + +let fold_hooks list hook_info ast = + List.fold_left (fun ast (hook_name,f) -> + try + f hook_info ast + with + | HookExn e -> raise e + | error -> raise (HookExnWrapper {error; hook_name; hook_info}) + (* when explicit reraise with backtrace will be available, + it should be used here *) + + ) ast (List.sort compare list) + +module type HookSig = sig + type t + + val add_hook : string -> (hook_info -> t -> t) -> unit + val apply_hooks : hook_info -> t -> t +end + +module MakeHooks(M: sig + type t + end) : HookSig with type t = M.t += struct + + type t = M.t + + let hooks = ref [] + let add_hook name f = hooks := (name, f) :: !hooks + let apply_hooks sourcefile intf = + fold_hooks !hooks sourcefile intf +end diff --git a/analysis/src/vendor/compiler-libs-406/oprint.ml b/analysis/src/vendor/compiler-libs-406/oprint.ml new file mode 100644 index 000000000..5e8b9b9a6 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/oprint.ml @@ -0,0 +1,773 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* 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 Format +open Outcometree + +exception Ellipsis + +let cautious f ppf arg = + try f ppf arg with + Ellipsis -> fprintf ppf "..." + +let out_ident = ref pp_print_string +let map_primitive_name = ref (fun x -> x) + +let print_lident ppf = function + | "::" -> !out_ident ppf "(::)" + | s -> !out_ident ppf s + +let rec print_ident ppf = + function + Oide_ident s -> print_lident ppf s + | Oide_dot (id, s) -> + print_ident ppf id; pp_print_char ppf '.'; print_lident ppf s + | Oide_apply (id1, id2) -> + fprintf ppf "%a(%a)" print_ident id1 print_ident id2 + +let parenthesized_ident name = + (List.mem name ["or"; "mod"; "land"; "lor"; "lxor"; "lsl"; "lsr"; "asr"]) + || + (match name.[0] with + 'a'..'z' | 'A'..'Z' | '\223'..'\246' | '\248'..'\255' | '_' -> + false + | _ -> true) + +let value_ident ppf name = + if parenthesized_ident name then + fprintf ppf "( %s )" name + else + pp_print_string ppf name + +(* Values *) + +let valid_float_lexeme s = + let l = String.length s in + let rec loop i = + if i >= l then s ^ "." else + match s.[i] with + | '0' .. '9' | '-' -> loop (i+1) + | _ -> s + in loop 0 + +let float_repres f = + match classify_float f with + FP_nan -> "nan" + | FP_infinite -> + if f < 0.0 then "neg_infinity" else "infinity" + | _ -> + let float_val = + let s1 = Printf.sprintf "%.12g" f in + if f = float_of_string s1 then s1 else + let s2 = Printf.sprintf "%.15g" f in + if f = float_of_string s2 then s2 else + Printf.sprintf "%.18g" f + in valid_float_lexeme float_val + +let parenthesize_if_neg ppf fmt v isneg = + if isneg then pp_print_char ppf '('; + fprintf ppf fmt v; + if isneg then pp_print_char ppf ')' + +let escape_string s = + (* Escape only C0 control characters (bytes <= 0x1F), DEL(0x7F), '\\' and '"' *) + let n = ref 0 in + for i = 0 to String.length s - 1 do + n := !n + + (match String.unsafe_get s i with + | '\"' | '\\' | '\n' | '\t' | '\r' | '\b' -> 2 + | '\x00' .. '\x1F' + | '\x7F' -> 4 + | _ -> 1) + done; + if !n = String.length s then s else begin + let s' = Bytes.create !n in + n := 0; + for i = 0 to String.length s - 1 do + begin match String.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' + | '\x00' .. '\x1F' | '\x7F' as 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)); + | c -> Bytes.unsafe_set s' !n c + end; + incr n + done; + Bytes.to_string s' + end + + +let print_out_string ppf s = + let not_escaped = + (* let the user dynamically choose if strings should be escaped: *) + match Sys.getenv_opt "OCAMLTOP_UTF_8" with + | None -> true + | Some x -> + match bool_of_string_opt x with + | None -> true + | Some f -> f in + if not_escaped then + fprintf ppf "\"%s\"" (escape_string s) + else + fprintf ppf "%S" s + +let print_out_value ppf tree = + let rec print_tree_1 ppf = + function + | Oval_constr (name, [param]) -> + fprintf ppf "@[<1>%a@ %a@]" print_ident name print_constr_param param + | Oval_constr (name, (_ :: _ as params)) -> + fprintf ppf "@[<1>%a@ (%a)@]" print_ident name + (print_tree_list print_tree_1 ",") params + | Oval_variant (name, Some param) -> + fprintf ppf "@[<2>`%s@ %a@]" name print_constr_param param + | tree -> print_simple_tree ppf tree + and print_constr_param ppf = function + | Oval_int i -> parenthesize_if_neg ppf "%i" i (i < 0) + | Oval_int32 i -> parenthesize_if_neg ppf "%lil" i (i < 0l) + | Oval_int64 i -> parenthesize_if_neg ppf "%LiL" i (i < 0L) + | Oval_nativeint i -> parenthesize_if_neg ppf "%nin" i (i < 0n) + | Oval_float f -> parenthesize_if_neg ppf "%s" (float_repres f) (f < 0.0) + | Oval_string (_,_, Ostr_bytes) as tree -> + pp_print_char ppf '('; + print_simple_tree ppf tree; + pp_print_char ppf ')'; + | tree -> print_simple_tree ppf tree + and print_simple_tree ppf = + function + Oval_int i -> fprintf ppf "%i" i + | Oval_int32 i -> fprintf ppf "%lil" i + | Oval_int64 i -> fprintf ppf "%LiL" i + | Oval_nativeint i -> fprintf ppf "%nin" i + | Oval_float f -> pp_print_string ppf (float_repres f) + | Oval_char c -> fprintf ppf "%C" c + | Oval_string (s, maxlen, kind) -> + begin try + let len = String.length s in + let s = if len > maxlen then String.sub s 0 maxlen else s in + begin match kind with + | Ostr_bytes -> fprintf ppf "Bytes.of_string %S" s + | Ostr_string -> print_out_string ppf s + end; + (if len > maxlen then + fprintf ppf + "... (* string length %d; truncated *)" len + ) + with + Invalid_argument _ (* "String.create" *)-> fprintf ppf "" + end + | Oval_list tl -> + fprintf ppf "@[<1>[%a]@]" (print_tree_list print_tree_1 ";") tl + | Oval_array tl -> + fprintf ppf "@[<2>[|%a|]@]" (print_tree_list print_tree_1 ";") tl + | Oval_constr (name, []) -> print_ident ppf name + | Oval_variant (name, None) -> fprintf ppf "`%s" name + | Oval_stuff s -> pp_print_string ppf s + | Oval_record fel -> + fprintf ppf "@[<1>{%a}@]" (cautious (print_fields true)) fel + | Oval_ellipsis -> raise Ellipsis + | Oval_printer f -> f ppf + | Oval_tuple tree_list -> + fprintf ppf "@[<1>(%a)@]" (print_tree_list print_tree_1 ",") tree_list + | tree -> fprintf ppf "@[<1>(%a)@]" (cautious print_tree_1) tree + and print_fields first ppf = + function + [] -> () + | (name, tree) :: fields -> + if not first then fprintf ppf ";@ "; + fprintf ppf "@[<1>%a@ =@ %a@]" print_ident name (cautious print_tree_1) + tree; + print_fields false ppf fields + and print_tree_list print_item sep ppf tree_list = + let rec print_list first ppf = + function + [] -> () + | tree :: tree_list -> + if not first then fprintf ppf "%s@ " sep; + print_item ppf tree; + print_list false ppf tree_list + in + cautious (print_list true) ppf tree_list + in + cautious print_tree_1 ppf tree + +let out_value = ref print_out_value + +(* Types *) + +let rec print_list_init pr sep ppf = + function + [] -> () + | a :: l -> sep ppf; pr ppf a; print_list_init pr sep ppf l + +let rec print_list pr sep ppf = + function + [] -> () + | [a] -> pr ppf a + | a :: l -> pr ppf a; sep ppf; print_list pr sep ppf l + +let pr_present = + print_list (fun ppf s -> fprintf ppf "`%s" s) (fun ppf -> fprintf ppf "@ ") + +let pr_vars = + print_list (fun ppf s -> fprintf ppf "'%s" s) (fun ppf -> fprintf ppf "@ ") + +let rec print_out_type ppf = + function + | Otyp_alias (ty, s) -> + fprintf ppf "@[%a@ as '%s@]" print_out_type ty s + | Otyp_poly (sl, ty) -> + fprintf ppf "@[%a.@ %a@]" + pr_vars sl + print_out_type ty + | ty -> + print_out_type_1 ppf ty + +and print_out_type_1 ppf = + function + Otyp_arrow (lab, ty1, ty2) -> + pp_open_box ppf 0; + if lab <> "" then (pp_print_string ppf lab; pp_print_char ppf ':'); + print_out_type_2 ppf ty1; + pp_print_string ppf " ->"; + pp_print_space ppf (); + print_out_type_1 ppf ty2; + pp_close_box ppf () + | ty -> print_out_type_2 ppf ty +and print_out_type_2 ppf = + function + Otyp_tuple tyl -> + fprintf ppf "@[<0>%a@]" (print_typlist print_simple_out_type " *") tyl + | ty -> print_simple_out_type ppf ty +and print_simple_out_type ppf = + function + Otyp_class (ng, id, tyl) -> + fprintf ppf "@[%a%s#%a@]" print_typargs tyl (if ng then "_" else "") + print_ident id + | Otyp_constr (Oide_dot (Oide_dot (Oide_ident "Js", "Fn"), name ), + [tyl]) + -> + let res = + if name = "arity0" then + Otyp_arrow ("", Otyp_constr (Oide_ident "unit", []),tyl) + else tyl + in + fprintf ppf "@[<0>(%a@ [@bs])@]" print_out_type_1 res + | Otyp_constr (Oide_dot (Oide_dot (Oide_ident "Js_OO", "Meth" ),name), + [tyl]) + -> + let res = + if name = "arity0" then + Otyp_arrow ("", Otyp_constr (Oide_ident "unit", []),tyl) + else tyl + in + fprintf ppf "@[<0>(%a@ [@bs.meth])@]" print_out_type_1 res + | Otyp_constr (Oide_dot (Oide_dot (Oide_ident "Js_OO", "Callback" ), _), + [tyl]) + -> + fprintf ppf "@[<0>(%a@ [@bs.this])@]" print_out_type_1 tyl + | Otyp_constr (id, tyl) -> + pp_open_box ppf 0; + print_typargs ppf tyl; + print_ident ppf id; + pp_close_box ppf () + | Otyp_object (fields, rest) -> + fprintf ppf "@[<2>< %a >@]" (print_fields rest) fields + | Otyp_stuff s -> pp_print_string ppf s + | Otyp_var (ng, s) -> fprintf ppf "'%s%s" (if ng then "_" else "") s + | Otyp_variant (non_gen, row_fields, closed, tags) -> + let print_present ppf = + function + None | Some [] -> () + | Some l -> fprintf ppf "@;<1 -2>> @[%a@]" pr_present l + in + let print_fields ppf = + function + Ovar_fields fields -> + print_list print_row_field (fun ppf -> fprintf ppf "@;<1 -2>| ") + ppf fields + | Ovar_typ typ -> + print_simple_out_type ppf typ + in + fprintf ppf "%s[%s@[@[%a@]%a ]@]" (if non_gen then "_" else "") + (if closed then if tags = None then " " else "< " + else if tags = None then "> " else "? ") + print_fields row_fields + print_present tags + | Otyp_alias _ | Otyp_poly _ | Otyp_arrow _ | Otyp_tuple _ as ty -> + pp_open_box ppf 1; + pp_print_char ppf '('; + print_out_type ppf ty; + pp_print_char ppf ')'; + pp_close_box ppf () + | Otyp_abstract | Otyp_open + | Otyp_sum _ | Otyp_manifest (_, _) -> () + | Otyp_record lbls -> print_record_decl ppf lbls + | Otyp_module (p, n, tyl) -> + fprintf ppf "@[<1>(module %s" p; + let first = ref true in + List.iter2 + (fun s t -> + let sep = if !first then (first := false; "with") else "and" in + fprintf ppf " %s type %s = %a" sep s print_out_type t + ) + n tyl; + fprintf ppf ")@]" + | Otyp_attribute (t, attr) -> + fprintf ppf "@[<1>(%a [@@%s])@]" print_out_type t attr.oattr_name +and print_record_decl ppf lbls = + fprintf ppf "{%a@;<1 -2>}" + (print_list_init print_out_label (fun ppf -> fprintf ppf "@ ")) lbls +and print_fields rest ppf = + function + [] -> + begin match rest with + Some non_gen -> fprintf ppf "%s.." (if non_gen then "_" else "") + | None -> () + end + | [s, t] -> + fprintf ppf "%s : %a" s print_out_type t; + begin match rest with + Some _ -> fprintf ppf ";@ " + | None -> () + end; + print_fields rest ppf [] + | (s, t) :: l -> + fprintf ppf "%s : %a;@ %a" s print_out_type t (print_fields rest) l +and print_row_field ppf (l, opt_amp, tyl) = + let pr_of ppf = + if opt_amp then fprintf ppf " of@ &@ " + else if tyl <> [] then fprintf ppf " of@ " + else fprintf ppf "" + in + fprintf ppf "@[`%s%t%a@]" l pr_of (print_typlist print_out_type " &") + tyl +and print_typlist print_elem sep ppf = + function + [] -> () + | [ty] -> print_elem ppf ty + | ty :: tyl -> + print_elem ppf ty; + pp_print_string ppf sep; + pp_print_space ppf (); + print_typlist print_elem sep ppf tyl +and print_typargs ppf = + function + [] -> () + | [ty1] -> print_simple_out_type ppf ty1; pp_print_space ppf () + | tyl -> + pp_open_box ppf 1; + pp_print_char ppf '('; + print_typlist print_out_type "," ppf tyl; + pp_print_char ppf ')'; + pp_close_box ppf (); + pp_print_space ppf () +and print_out_label ppf (name, mut, arg) = + fprintf ppf "@[<2>%s%s :@ %a@];" (if mut then "mutable " else "") name + print_out_type arg + +let out_type = ref print_out_type + +(* Class types *) + +let type_parameter ppf (ty, (co, cn)) = + fprintf ppf "%s%s" + (if not cn then "+" else if not co then "-" else "") + (if ty = "_" then ty else "'"^ty) + +let print_out_class_params ppf = + function + [] -> () + | tyl -> + fprintf ppf "@[<1>[%a]@]@ " + (print_list type_parameter (fun ppf -> fprintf ppf ", ")) + tyl + +let rec print_out_class_type ppf = + function + Octy_constr (id, tyl) -> + let pr_tyl ppf = + function + [] -> () + | tyl -> + fprintf ppf "@[<1>[%a]@]@ " (print_typlist !out_type ",") tyl + in + fprintf ppf "@[%a%a@]" pr_tyl tyl print_ident id + | Octy_arrow (lab, ty, cty) -> + fprintf ppf "@[%s%a ->@ %a@]" (if lab <> "" then lab ^ ":" else "") + print_out_type_2 ty print_out_class_type cty + | Octy_signature (self_ty, csil) -> + let pr_param ppf = + function + Some ty -> fprintf ppf "@ @[(%a)@]" !out_type ty + | None -> () + in + fprintf ppf "@[@[<2>object%a@]@ %a@;<1 -2>end@]" pr_param self_ty + (print_list print_out_class_sig_item (fun ppf -> fprintf ppf "@ ")) + csil +and print_out_class_sig_item ppf = + function + Ocsg_constraint (ty1, ty2) -> + fprintf ppf "@[<2>constraint %a =@ %a@]" !out_type ty1 + !out_type ty2 + | Ocsg_method (name, priv, virt, ty) -> + fprintf ppf "@[<2>method %s%s%s :@ %a@]" + (if priv then "private " else "") (if virt then "virtual " else "") + name !out_type ty + | Ocsg_value (name, mut, vr, ty) -> + fprintf ppf "@[<2>val %s%s%s :@ %a@]" + (if mut then "mutable " else "") + (if vr then "virtual " else "") + name !out_type ty + +let out_class_type = ref print_out_class_type + +(* Signature *) + +let out_module_type = ref (fun _ -> failwith "Oprint.out_module_type") +let out_sig_item = ref (fun _ -> failwith "Oprint.out_sig_item") +let out_signature = ref (fun _ -> failwith "Oprint.out_signature") +let out_type_extension = ref (fun _ -> failwith "Oprint.out_type_extension") + +let rec print_out_functor funct ppf = + function + Omty_functor (_, None, mty_res) -> + if funct then fprintf ppf "() %a" (print_out_functor true) mty_res + else fprintf ppf "functor@ () %a" (print_out_functor true) mty_res + | Omty_functor (name, Some mty_arg, mty_res) -> begin + match name, funct with + | "_", true -> + fprintf ppf "->@ %a ->@ %a" + print_out_module_type mty_arg (print_out_functor false) mty_res + | "_", false -> + fprintf ppf "%a ->@ %a" + print_out_module_type mty_arg (print_out_functor false) mty_res + | name, true -> + fprintf ppf "(%s : %a) %a" name + print_out_module_type mty_arg (print_out_functor true) mty_res + | name, false -> + fprintf ppf "functor@ (%s : %a) %a" name + print_out_module_type mty_arg (print_out_functor true) mty_res + end + | m -> + if funct then fprintf ppf "->@ %a" print_out_module_type m + else print_out_module_type ppf m + +and print_out_module_type ppf = + function + Omty_abstract -> () + | Omty_functor _ as t -> + fprintf ppf "@[<2>%a@]" (print_out_functor false) t + | Omty_ident id -> fprintf ppf "%a" print_ident id + | Omty_signature sg -> + fprintf ppf "@[sig@ %a@;<1 -2>end@]" !out_signature sg + | Omty_alias id -> fprintf ppf "(module %a)" print_ident id +and print_out_signature ppf = + function + [] -> () + | [item] -> !out_sig_item ppf item + | Osig_typext(ext, Oext_first) :: items -> + (* Gather together the extension constructors *) + let rec gather_extensions acc items = + match items with + Osig_typext(ext, Oext_next) :: items -> + gather_extensions + ((ext.oext_name, ext.oext_args, ext.oext_ret_type) :: acc) + items + | _ -> (List.rev acc, items) + in + let exts, items = + gather_extensions + [(ext.oext_name, ext.oext_args, ext.oext_ret_type)] + items + in + let te = + { otyext_name = ext.oext_type_name; + otyext_params = ext.oext_type_params; + otyext_constructors = exts; + otyext_private = ext.oext_private } + in + fprintf ppf "%a@ %a" !out_type_extension te print_out_signature items + | item :: items -> + fprintf ppf "%a@ %a" !out_sig_item item print_out_signature items +and print_out_sig_item ppf = + function + Osig_class (vir_flag, name, params, clt, rs) -> + fprintf ppf "@[<2>%s%s@ %a%s@ :@ %a@]" + (if rs = Orec_next then "and" else "class") + (if vir_flag then " virtual" else "") print_out_class_params params + name !out_class_type clt + | Osig_class_type (vir_flag, name, params, clt, rs) -> + fprintf ppf "@[<2>%s%s@ %a%s@ =@ %a@]" + (if rs = Orec_next then "and" else "class type") + (if vir_flag then " virtual" else "") print_out_class_params params + name !out_class_type clt + | Osig_typext (ext, Oext_exception) -> + fprintf ppf "@[<2>exception %a@]" + print_out_constr (ext.oext_name, ext.oext_args, ext.oext_ret_type) + | Osig_typext (ext, _es) -> + print_out_extension_constructor ppf ext + | Osig_modtype (name, Omty_abstract) -> + fprintf ppf "@[<2>module type %s@]" name + | Osig_modtype (name, mty) -> + fprintf ppf "@[<2>module type %s =@ %a@]" name !out_module_type mty + | Osig_module (name, Omty_alias id, _) -> + fprintf ppf "@[<2>module %s =@ %a@]" name print_ident id + | Osig_module (name, mty, rs) -> + fprintf ppf "@[<2>%s %s :@ %a@]" + (match rs with Orec_not -> "module" + | Orec_first -> "module rec" + | Orec_next -> "and") + name !out_module_type mty + | Osig_type(td, rs) -> + print_out_type_decl + (match rs with + | Orec_not -> "type nonrec" + | Orec_first -> "type" + | Orec_next -> "and") + ppf td + | Osig_value vd -> + let kwd = if vd.oval_prims = [] then "val" else "external" in + let pr_prims ppf = + function + [] -> () + | s :: sl -> + fprintf ppf "@ = \"%s\"" s; + List.iter (fun s -> +(* TODO: in general, we should print bs attributes, some attributes like + bs.splice does need it *) + fprintf ppf "@ \"%s\"" (!map_primitive_name s) + ) sl + in + fprintf ppf "@[<2>%s %a :@ %a%a%a@]" kwd value_ident vd.oval_name + !out_type vd.oval_type pr_prims vd.oval_prims + (fun ppf -> List.iter (fun a -> fprintf ppf "@ [@@@@%s]" a.oattr_name)) + vd.oval_attributes + | Osig_ellipsis -> + fprintf ppf "..." + +and print_out_type_decl kwd ppf td = + let print_constraints ppf = + List.iter + (fun (ty1, ty2) -> + fprintf ppf "@ @[<2>constraint %a =@ %a@]" !out_type ty1 + !out_type ty2) + td.otype_cstrs + in + let type_defined ppf = + match td.otype_params with + [] -> pp_print_string ppf td.otype_name + | [param] -> fprintf ppf "@[%a@ %s@]" type_parameter param td.otype_name + | _ -> + fprintf ppf "@[(@[%a)@]@ %s@]" + (print_list type_parameter (fun ppf -> fprintf ppf ",@ ")) + td.otype_params + td.otype_name + in + let print_manifest ppf = + function + Otyp_manifest (ty, _) -> fprintf ppf " =@ %a" !out_type ty + | _ -> () + in + let print_name_params ppf = + fprintf ppf "%s %t%a" kwd type_defined print_manifest td.otype_type + in + let ty = + match td.otype_type with + Otyp_manifest (_, ty) -> ty + | _ -> td.otype_type + in + let print_private ppf = function + Asttypes.Private -> fprintf ppf " private" + | Asttypes.Public -> () + in + let print_immediate ppf = + if td.otype_immediate then fprintf ppf " [%@%@immediate]" else () + in + let print_unboxed ppf = + if td.otype_unboxed then fprintf ppf " [%@%@unboxed]" else () + in + let print_out_tkind ppf = function + | Otyp_abstract -> () + | Otyp_record lbls -> + fprintf ppf " =%a %a" + print_private td.otype_private + print_record_decl lbls + | Otyp_sum constrs -> + fprintf ppf " =%a@;<1 2>%a" + print_private td.otype_private + (print_list print_out_constr (fun ppf -> fprintf ppf "@ | ")) constrs + | Otyp_open -> + fprintf ppf " =%a .." + print_private td.otype_private + | ty -> + fprintf ppf " =%a@;<1 2>%a" + print_private td.otype_private + !out_type ty + in + fprintf ppf "@[<2>@[%t%a@]%t%t%t@]" + print_name_params + print_out_tkind ty + print_constraints + print_immediate + print_unboxed + +and print_out_constr ppf (name, tyl,ret_type_opt) = + let name = + match name with + | "::" -> "(::)" (* #7200 *) + | s -> s + in + match ret_type_opt with + | None -> + begin match tyl with + | [] -> + pp_print_string ppf name + | _ -> + fprintf ppf "@[<2>%s of@ %a@]" name + (print_typlist print_simple_out_type " *") tyl + end + | Some ret_type -> + begin match tyl with + | [] -> + fprintf ppf "@[<2>%s :@ %a@]" name print_simple_out_type ret_type + | _ -> + fprintf ppf "@[<2>%s :@ %a -> %a@]" name + (print_typlist print_simple_out_type " *") + tyl print_simple_out_type ret_type + end + +and print_out_extension_constructor ppf ext = + let print_extended_type ppf = + let print_type_parameter ppf ty = + fprintf ppf "%s" + (if ty = "_" then ty else "'"^ty) + in + match ext.oext_type_params with + [] -> fprintf ppf "%s" ext.oext_type_name + | [ty_param] -> + fprintf ppf "@[%a@ %s@]" + print_type_parameter + ty_param + ext.oext_type_name + | _ -> + fprintf ppf "@[(@[%a)@]@ %s@]" + (print_list print_type_parameter (fun ppf -> fprintf ppf ",@ ")) + ext.oext_type_params + ext.oext_type_name + in + fprintf ppf "@[type %t +=%s@;<1 2>%a@]" + print_extended_type + (if ext.oext_private = Asttypes.Private then " private" else "") + print_out_constr (ext.oext_name, ext.oext_args, ext.oext_ret_type) + +and print_out_type_extension ppf te = + let print_extended_type ppf = + let print_type_parameter ppf ty = + fprintf ppf "%s" + (if ty = "_" then ty else "'"^ty) + in + match te.otyext_params with + [] -> fprintf ppf "%s" te.otyext_name + | [param] -> + fprintf ppf "@[%a@ %s@]" + print_type_parameter param + te.otyext_name + | _ -> + fprintf ppf "@[(@[%a)@]@ %s@]" + (print_list print_type_parameter (fun ppf -> fprintf ppf ",@ ")) + te.otyext_params + te.otyext_name + in + fprintf ppf "@[type %t +=%s@;<1 2>%a@]" + print_extended_type + (if te.otyext_private = Asttypes.Private then " private" else "") + (print_list print_out_constr (fun ppf -> fprintf ppf "@ | ")) + te.otyext_constructors + +let _ = out_module_type := print_out_module_type +let _ = out_signature := print_out_signature +let _ = out_sig_item := print_out_sig_item +let _ = out_type_extension := print_out_type_extension + +(* Phrases *) + +let print_out_exception ppf exn outv = + match exn with + Sys.Break -> fprintf ppf "Interrupted.@." + | Out_of_memory -> fprintf ppf "Out of memory during evaluation.@." + | Stack_overflow -> + fprintf ppf "Stack overflow during evaluation (looping recursion?).@." + | _ -> fprintf ppf "@[Exception:@ %a.@]@." !out_value outv + +let rec print_items ppf = + function + [] -> () + | (Osig_typext(ext, Oext_first), None) :: items -> + (* Gather together extension constructors *) + let rec gather_extensions acc items = + match items with + (Osig_typext(ext, Oext_next), None) :: items -> + gather_extensions + ((ext.oext_name, ext.oext_args, ext.oext_ret_type) :: acc) + items + | _ -> (List.rev acc, items) + in + let exts, items = + gather_extensions + [(ext.oext_name, ext.oext_args, ext.oext_ret_type)] + items + in + let te = + { otyext_name = ext.oext_type_name; + otyext_params = ext.oext_type_params; + otyext_constructors = exts; + otyext_private = ext.oext_private } + in + fprintf ppf "@[%a@]" !out_type_extension te; + if items <> [] then fprintf ppf "@ %a" print_items items + | (tree, valopt) :: items -> + begin match valopt with + Some v -> + fprintf ppf "@[<2>%a =@ %a@]" !out_sig_item tree + !out_value v + | None -> fprintf ppf "@[%a@]" !out_sig_item tree + end; + if items <> [] then fprintf ppf "@ %a" print_items items + +let print_out_phrase ppf = + function + Ophr_eval (outv, ty) -> + fprintf ppf "@[- : %a@ =@ %a@]@." !out_type ty !out_value outv + | Ophr_signature [] -> () + | Ophr_signature items -> fprintf ppf "@[%a@]@." print_items items + | Ophr_exception (exn, outv) -> print_out_exception ppf exn outv + +let out_phrase = ref print_out_phrase diff --git a/analysis/src/vendor/compiler-libs-406/oprint.mli b/analysis/src/vendor/compiler-libs-406/oprint.mli new file mode 100644 index 000000000..cf594d164 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/oprint.mli @@ -0,0 +1,30 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* 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 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 +val out_module_type : (formatter -> out_module_type -> unit) ref +val out_sig_item : (formatter -> out_sig_item -> unit) ref +val out_signature : (formatter -> out_sig_item list -> unit) ref +val out_type_extension : (formatter -> out_type_extension -> unit) ref +val out_phrase : (formatter -> out_phrase -> unit) ref + +val parenthesized_ident : string -> bool diff --git a/analysis/src/vendor/compiler-libs-406/outcometree.mli b/analysis/src/vendor/compiler-libs-406/outcometree.mli new file mode 100644 index 000000000..e4c62c31f --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/outcometree.mli @@ -0,0 +1,144 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Daniel de Rauglaudre, projet Cristal, INRIA Rocquencourt *) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Module [Outcometree]: results displayed by the toplevel *) + +(* These types represent messages that the toplevel displays as normal + results or errors. The real displaying is customisable using the hooks: + [Toploop.print_out_value] + [Toploop.print_out_type] + [Toploop.print_out_sig_item] + [Toploop.print_out_phrase] *) + +type out_ident = + | Oide_apply of out_ident * out_ident + | Oide_dot of out_ident * string + | Oide_ident of string + +type out_string = + | Ostr_string + | Ostr_bytes + +type out_attribute = + { oattr_name: string } + +type out_value = + | Oval_array of out_value list + | Oval_char of char + | Oval_constr of out_ident * out_value list + | Oval_ellipsis + | Oval_float of float + | Oval_int of int + | Oval_int32 of int32 + | Oval_int64 of int64 + | Oval_nativeint of nativeint + | Oval_list of out_value list + | Oval_printer of (Format.formatter -> unit) + | Oval_record of (out_ident * out_value) list + | Oval_string of string * int * out_string (* string, size-to-print, kind *) + | Oval_stuff of string + | Oval_tuple of out_value list + | Oval_variant of string * out_value option + +type out_type = + | Otyp_abstract + | Otyp_open + | Otyp_alias of out_type * string + | Otyp_arrow of string * out_type * out_type + | Otyp_class of bool * out_ident * out_type list + | Otyp_constr of out_ident * out_type list + | Otyp_manifest of out_type * out_type + | Otyp_object of (string * out_type) list * bool option + | Otyp_record of (string * bool * out_type) list + | Otyp_stuff of string + | Otyp_sum of (string * out_type list * out_type option) list + | Otyp_tuple of out_type list + | Otyp_var of bool * string + | Otyp_variant of + bool * out_variant * bool * (string list) option + | Otyp_poly of string list * out_type + | Otyp_module of string * string list * out_type list + | Otyp_attribute of out_type * out_attribute + +and out_variant = + | Ovar_fields of (string * bool * out_type list) list + | Ovar_typ of out_type + +type out_class_type = + | Octy_constr of out_ident * out_type list + | Octy_arrow of string * out_type * out_class_type + | Octy_signature of out_type option * out_class_sig_item list +and out_class_sig_item = + | Ocsg_constraint of out_type * out_type + | Ocsg_method of string * bool * bool * out_type + | Ocsg_value of string * bool * bool * out_type + +type out_module_type = + | Omty_abstract + | Omty_functor of string * out_module_type option * out_module_type + | Omty_ident of out_ident + | Omty_signature of out_sig_item list + | Omty_alias of out_ident +and out_sig_item = + | Osig_class of + bool * string * (string * (bool * bool)) list * out_class_type * + out_rec_status + | Osig_class_type of + bool * string * (string * (bool * bool)) list * out_class_type * + out_rec_status + | Osig_typext of out_extension_constructor * out_ext_status + | Osig_modtype of string * out_module_type + | Osig_module of string * out_module_type * out_rec_status + | Osig_type of out_type_decl * out_rec_status + | Osig_value of out_val_decl + | Osig_ellipsis +and out_type_decl = + { otype_name: string; + otype_params: (string * (bool * bool)) list; + otype_type: out_type; + otype_private: Asttypes.private_flag; + otype_immediate: bool; + otype_unboxed: bool; + otype_cstrs: (out_type * out_type) list } +and out_extension_constructor = + { oext_name: string; + oext_type_name: string; + oext_type_params: string list; + oext_args: out_type list; + oext_ret_type: out_type option; + oext_private: Asttypes.private_flag } +and out_type_extension = + { otyext_name: string; + otyext_params: string list; + otyext_constructors: (string * out_type list * out_type option) list; + otyext_private: Asttypes.private_flag } +and out_val_decl = + { oval_name: string; + oval_type: out_type; + oval_prims: string list; + oval_attributes: out_attribute list } +and out_rec_status = + | Orec_not + | Orec_first + | Orec_next +and out_ext_status = + | Oext_first + | Oext_next + | Oext_exception + +type out_phrase = + | Ophr_eval of out_value * out_type + | Ophr_signature of (out_sig_item * out_value option) list + | Ophr_exception of (exn * out_value) diff --git a/analysis/src/vendor/compiler-libs-406/parser.ml b/analysis/src/vendor/compiler-libs-406/parser.ml new file mode 100644 index 000000000..cbe441b58 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/parser.ml @@ -0,0 +1,12782 @@ +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 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, []) + + + +(* 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" + + +# 468 "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\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\044\000\048\000\048\000\048\000\039\000\ +\040\000\040\000\049\000\050\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\053\000\053\000\053\000\053\000\053\000\053\000\ +\053\000\053\000\053\000\053\000\053\000\053\000\053\000\053\000\ +\053\000\042\000\059\000\062\000\062\000\062\000\056\000\057\000\ +\058\000\058\000\063\000\064\000\065\000\065\000\041\000\067\000\ +\067\000\069\000\070\000\070\000\070\000\071\000\071\000\072\000\ +\072\000\072\000\072\000\072\000\072\000\073\000\073\000\073\000\ +\073\000\074\000\074\000\074\000\074\000\074\000\083\000\083\000\ +\083\000\083\000\083\000\084\000\084\000\084\000\084\000\084\000\ +\084\000\084\000\088\000\089\000\089\000\090\000\090\000\091\000\ +\091\000\091\000\091\000\091\000\091\000\092\000\092\000\092\000\ +\095\000\075\000\060\000\060\000\096\000\097\000\043\000\043\000\ +\098\000\099\000\012\000\012\000\012\000\012\000\101\000\101\000\ +\101\000\101\000\101\000\101\000\101\000\101\000\106\000\106\000\ +\103\000\103\000\102\000\102\000\104\000\105\000\105\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\108\000\108\000\108\000\108\000\108\000\108\000\108\000\ +\108\000\108\000\108\000\108\000\108\000\108\000\108\000\108\000\ +\108\000\108\000\108\000\108\000\108\000\108\000\108\000\108\000\ +\108\000\108\000\108\000\108\000\108\000\108\000\108\000\108\000\ +\108\000\108\000\108\000\108\000\108\000\108\000\108\000\108\000\ +\108\000\108\000\108\000\108\000\108\000\108\000\108\000\108\000\ +\108\000\108\000\108\000\108\000\108\000\108\000\108\000\108\000\ +\108\000\108\000\108\000\108\000\108\000\108\000\108\000\109\000\ +\109\000\127\000\127\000\128\000\128\000\128\000\128\000\129\000\ +\082\000\082\000\130\000\130\000\130\000\130\000\130\000\130\000\ +\033\000\033\000\135\000\136\000\138\000\138\000\081\000\081\000\ +\081\000\112\000\112\000\139\000\139\000\139\000\113\000\113\000\ +\113\000\113\000\114\000\114\000\123\000\123\000\141\000\141\000\ +\141\000\142\000\142\000\126\000\126\000\144\000\144\000\124\000\ +\124\000\078\000\078\000\078\000\078\000\078\000\143\000\143\000\ +\019\000\019\000\019\000\019\000\019\000\019\000\019\000\019\000\ +\019\000\019\000\133\000\133\000\133\000\133\000\133\000\133\000\ +\133\000\133\000\133\000\146\000\146\000\146\000\146\000\107\000\ +\107\000\134\000\134\000\134\000\134\000\134\000\134\000\134\000\ +\134\000\134\000\134\000\134\000\134\000\134\000\134\000\134\000\ +\134\000\134\000\134\000\134\000\134\000\134\000\134\000\150\000\ +\150\000\150\000\150\000\150\000\150\000\150\000\145\000\145\000\ +\145\000\147\000\147\000\147\000\152\000\152\000\151\000\151\000\ +\151\000\151\000\153\000\153\000\154\000\154\000\035\000\155\000\ +\155\000\034\000\036\000\036\000\156\000\157\000\161\000\161\000\ +\160\000\160\000\160\000\160\000\160\000\160\000\160\000\160\000\ +\160\000\160\000\160\000\159\000\159\000\159\000\164\000\165\000\ +\165\000\167\000\167\000\168\000\166\000\166\000\166\000\169\000\ +\068\000\068\000\162\000\162\000\162\000\170\000\171\000\038\000\ +\038\000\055\000\110\000\173\000\173\000\173\000\173\000\174\000\ +\174\000\163\000\163\000\163\000\176\000\177\000\037\000\054\000\ +\179\000\179\000\179\000\179\000\179\000\179\000\180\000\180\000\ +\180\000\181\000\182\000\183\000\184\000\052\000\052\000\185\000\ +\185\000\185\000\185\000\186\000\186\000\132\000\132\000\079\000\ +\079\000\178\000\178\000\018\000\018\000\187\000\187\000\189\000\ +\189\000\189\000\189\000\189\000\140\000\140\000\190\000\190\000\ +\190\000\190\000\190\000\190\000\190\000\190\000\190\000\190\000\ +\190\000\190\000\190\000\190\000\190\000\190\000\190\000\190\000\ +\190\000\031\000\194\000\194\000\195\000\195\000\193\000\193\000\ +\197\000\197\000\198\000\198\000\196\000\196\000\085\000\085\000\ +\086\000\086\000\175\000\175\000\191\000\191\000\191\000\191\000\ +\191\000\191\000\191\000\201\000\199\000\200\000\076\000\122\000\ +\122\000\122\000\122\000\148\000\148\000\148\000\148\000\148\000\ +\066\000\066\000\131\000\131\000\131\000\131\000\131\000\202\000\ +\202\000\202\000\202\000\202\000\202\000\202\000\202\000\202\000\ +\202\000\202\000\202\000\202\000\202\000\202\000\202\000\202\000\ +\202\000\202\000\202\000\202\000\202\000\202\000\202\000\202\000\ +\202\000\202\000\202\000\202\000\172\000\172\000\172\000\172\000\ +\172\000\172\000\121\000\121\000\115\000\115\000\115\000\115\000\ +\115\000\115\000\115\000\120\000\120\000\149\000\149\000\025\000\ +\025\000\188\000\188\000\188\000\051\000\051\000\087\000\087\000\ +\192\000\192\000\011\000\011\000\011\000\011\000\011\000\011\000\ +\011\000\116\000\137\000\137\000\158\000\158\000\117\000\117\000\ +\080\000\080\000\077\000\077\000\094\000\094\000\093\000\093\000\ +\093\000\093\000\093\000\061\000\061\000\111\000\111\000\125\000\ +\125\000\118\000\118\000\119\000\119\000\203\000\203\000\203\000\ +\203\000\203\000\203\000\203\000\203\000\203\000\203\000\203\000\ +\203\000\203\000\203\000\203\000\203\000\203\000\203\000\203\000\ +\203\000\203\000\203\000\203\000\203\000\203\000\203\000\203\000\ +\203\000\203\000\203\000\203\000\203\000\203\000\203\000\203\000\ +\203\000\203\000\203\000\203\000\203\000\203\000\203\000\203\000\ +\203\000\203\000\203\000\203\000\203\000\203\000\203\000\203\000\ +\100\000\100\000\028\000\205\000\046\000\013\000\013\000\026\000\ +\026\000\047\000\047\000\047\000\029\000\045\000\204\000\204\000\ +\204\000\204\000\204\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\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\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\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\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\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\081\002\000\000\000\000\000\000\ +\138\002\083\002\000\000\000\000\000\000\000\000\000\000\080\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\186\002\187\002\000\000\000\000\ +\000\000\188\002\189\002\000\000\000\000\082\002\139\002\000\000\ +\000\000\144\002\001\001\000\000\000\000\004\003\000\000\000\000\ +\000\000\000\000\063\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\ +\065\000\000\000\067\000\073\000\232\001\000\000\175\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\002\001\003\001\131\002\ +\081\001\195\001\000\000\000\000\000\000\000\000\000\000\000\000\ +\005\003\000\000\092\000\091\000\000\000\099\000\100\000\000\000\ +\000\000\105\000\000\000\094\000\095\000\096\000\097\000\000\000\ +\101\000\000\000\113\000\171\000\005\000\000\000\006\003\000\000\ +\000\000\000\000\007\000\000\000\013\000\000\000\007\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\146\002\032\002\ +\008\003\000\000\049\002\024\002\000\000\033\002\020\002\000\000\ +\000\000\000\000\009\003\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\091\002\000\000\000\000\000\000\000\000\146\001\ +\010\003\000\000\000\000\167\001\140\001\000\000\000\000\084\002\ +\144\001\145\001\000\000\130\001\000\000\152\001\000\000\000\000\ +\000\000\000\000\090\002\089\002\162\002\049\001\004\001\005\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\102\001\ +\000\000\052\001\079\002\000\000\000\000\000\000\135\002\000\000\ +\000\000\039\001\000\000\192\002\193\002\194\002\195\002\196\002\ +\197\002\198\002\199\002\200\002\201\002\202\002\203\002\204\002\ +\205\002\206\002\207\002\208\002\209\002\210\002\211\002\212\002\ +\213\002\214\002\215\002\216\002\190\002\217\002\218\002\219\002\ +\220\002\221\002\222\002\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\ +\191\002\236\002\237\002\238\002\239\002\240\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\094\002\121\002\120\002\ +\000\000\119\002\000\000\122\002\115\002\117\002\097\002\098\002\ +\099\002\100\002\101\002\000\000\116\002\000\000\000\000\000\000\ +\118\002\124\002\000\000\000\000\123\002\000\000\136\002\108\002\ +\114\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\181\002\000\000\048\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\000\001\ +\000\000\000\000\082\001\000\000\196\001\000\000\074\000\000\000\ +\176\000\066\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\064\001\067\001\000\000\ +\000\000\000\000\240\000\241\000\000\000\000\000\000\000\000\000\ +\089\000\000\000\002\000\104\000\090\000\000\000\114\000\000\000\ +\172\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\142\002\000\000\ +\054\002\000\000\000\000\183\002\000\000\045\002\000\000\075\002\ +\037\002\000\000\000\000\000\000\000\000\000\000\000\000\072\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\031\002\153\002\ +\000\000\038\002\020\000\021\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\034\002\021\000\000\000\000\000\140\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\173\001\000\000\109\002\ +\000\000\113\002\000\000\000\000\111\002\096\002\000\000\086\002\ +\085\002\088\002\087\002\151\001\000\000\000\000\000\000\000\000\ +\022\000\129\001\000\000\141\001\142\001\000\000\000\000\000\000\ +\000\000\251\002\000\000\000\000\000\000\000\000\009\001\000\000\ +\000\000\129\002\000\000\000\000\130\002\125\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\190\000\149\001\150\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\119\001\000\000\034\001\033\001\000\000\000\000\051\001\ +\050\001\000\000\108\001\000\000\000\000\000\000\000\000\000\000\ +\255\002\000\000\000\000\000\000\000\000\000\000\000\000\164\002\ +\000\000\137\002\000\000\000\000\000\000\095\002\000\000\007\001\ +\006\001\000\000\093\002\092\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\126\000\000\000\000\000\166\002\000\000\ +\000\000\000\000\000\000\049\000\247\002\000\000\000\000\000\000\ +\000\000\000\000\145\002\132\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\181\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\ +\000\000\000\000\000\000\000\000\072\001\070\001\056\001\000\000\ +\069\001\065\001\000\000\174\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\086\000\077\000\149\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\160\002\157\002\156\002\ +\161\002\000\000\158\002\017\000\000\000\016\000\012\000\053\002\ +\000\000\051\002\000\000\056\002\041\002\000\000\000\000\000\000\ +\000\000\078\002\036\002\069\002\070\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\067\002\000\000\143\002\147\002\ +\000\000\000\000\000\000\039\002\128\001\143\001\000\000\000\000\ +\000\000\169\001\168\001\000\000\000\000\000\000\000\000\000\000\ +\160\001\000\000\159\001\122\001\121\001\127\001\000\000\125\001\ +\000\000\177\001\000\000\000\000\000\000\153\001\000\000\148\001\ +\000\000\252\002\249\002\000\000\000\000\000\000\012\001\000\000\ +\000\000\000\000\010\001\008\001\000\000\126\002\000\000\127\002\ +\000\000\000\000\000\000\000\000\112\002\000\000\110\002\000\000\ +\000\000\189\000\000\000\191\000\000\000\192\000\186\000\197\000\ +\000\000\184\000\000\000\188\000\000\000\000\000\000\000\000\000\ +\207\000\000\000\000\000\090\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\068\000\033\000\036\000\000\000\000\000\101\001\ +\117\001\000\000\118\001\000\000\000\000\104\001\000\000\109\001\ +\000\000\044\001\043\001\038\001\037\001\000\003\000\000\000\000\ +\253\002\242\002\254\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\139\001\000\000\000\000\000\000\000\000\ +\000\000\011\001\245\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\255\000\254\000\000\000\000\000\ +\000\000\000\000\223\001\222\001\000\000\213\001\000\000\000\000\ +\000\000\000\000\000\000\054\001\000\000\046\001\000\000\041\001\ +\000\000\000\000\000\000\014\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\107\000\087\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\042\002\057\002\000\000\000\000\000\000\046\002\044\002\ +\000\000\000\000\000\000\018\002\000\000\000\000\000\000\000\000\ +\000\000\035\002\000\000\000\000\154\002\000\000\000\000\148\002\ +\023\002\141\002\000\000\000\000\000\000\186\001\000\000\171\001\ +\170\001\174\001\172\001\000\000\163\001\000\000\154\001\158\001\ +\155\001\000\000\243\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\128\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\237\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\ +\095\001\097\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\083\001\000\000\000\000\ +\000\000\000\000\075\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\138\001\000\000\000\000\107\002\105\002\103\002\000\000\ +\058\001\000\000\000\000\000\000\000\000\000\000\000\000\023\000\ +\025\000\026\000\000\000\071\000\072\000\000\000\123\000\000\000\ +\000\000\000\000\000\000\000\000\133\000\127\000\106\000\211\000\ +\000\000\216\001\000\000\000\000\000\000\000\000\219\001\215\001\ +\000\000\000\000\244\002\036\001\035\001\055\001\053\001\000\000\ +\000\000\134\002\000\000\015\001\013\001\182\000\084\001\000\000\ +\000\000\000\000\032\001\019\001\000\000\017\001\000\000\000\000\ +\000\000\000\000\000\000\025\001\000\000\021\001\000\000\023\001\ +\000\000\000\000\000\000\225\001\000\000\000\000\085\000\084\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\006\002\000\000\ +\150\002\000\000\000\000\000\000\000\000\000\000\111\000\000\000\ +\000\000\000\000\052\002\059\002\000\000\043\002\061\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\048\002\040\002\000\000\ +\068\002\000\000\185\002\185\001\000\000\164\001\162\001\161\001\ +\157\001\156\001\018\001\016\001\000\000\000\000\000\000\024\001\ +\020\001\022\001\000\000\172\002\000\000\000\000\242\001\000\000\ +\000\000\000\000\000\000\234\001\000\000\168\002\167\002\000\000\ +\074\001\000\000\000\000\000\000\000\000\000\000\000\000\187\000\ +\000\000\000\000\094\001\092\001\000\000\091\001\000\000\000\000\ +\027\000\000\000\000\000\031\000\030\000\000\000\003\003\204\000\ +\235\001\000\000\000\000\000\000\000\000\087\001\000\000\000\000\ +\000\000\085\001\088\001\132\001\131\001\137\001\000\000\135\001\ +\000\000\180\001\000\000\079\001\000\000\000\000\060\001\000\000\ +\000\000\000\000\119\000\075\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\ +\214\001\000\000\200\001\000\000\218\001\191\001\217\000\047\001\ +\045\001\042\001\040\001\000\000\200\001\076\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\121\000\000\000\220\001\000\000\000\000\000\000\079\000\078\000\ +\000\000\000\000\000\000\000\000\112\000\110\000\000\000\000\000\ +\000\000\000\000\000\000\055\002\047\002\062\002\019\002\015\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\241\001\244\001\238\001\000\000\233\001\000\000\000\000\000\000\ +\208\000\000\000\194\000\185\000\183\000\000\000\096\001\000\000\ +\000\000\000\000\000\000\048\000\000\000\000\000\042\000\039\000\ +\038\000\203\000\205\000\000\000\000\000\000\000\076\001\000\000\ +\000\000\059\001\000\000\000\000\124\000\000\000\000\000\000\000\ +\000\000\129\000\000\000\128\000\217\001\000\000\206\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\227\001\228\001\ +\000\000\000\000\170\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\031\001\000\000\027\001\000\000\029\001\000\000\000\000\ +\000\000\000\000\226\001\224\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\149\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\007\002\115\000\000\000\ +\000\000\116\000\000\000\060\002\077\002\166\001\165\001\030\001\ +\026\001\028\001\000\000\151\002\153\000\000\000\000\000\000\000\ +\193\001\194\001\000\000\098\001\093\001\046\000\000\000\047\000\ +\000\000\000\000\000\000\000\000\086\001\080\001\024\000\000\000\ +\130\000\131\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\207\001\000\000\000\000\000\000\000\000\229\001\000\000\ +\000\000\197\001\000\000\000\000\000\000\249\001\250\001\251\001\ +\252\001\062\001\000\000\198\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\173\000\ +\152\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\255\001\000\002\000\000\177\000\ +\000\000\000\000\000\000\000\000\043\000\045\000\000\000\000\000\ +\089\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\230\001\000\000\199\001\000\000\000\000\ +\000\000\247\001\253\001\254\001\061\001\178\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\158\000\000\000\ +\000\000\147\000\000\000\009\002\013\002\200\001\109\000\000\000\ +\248\001\001\002\174\000\152\002\000\000\218\000\000\000\000\000\ +\077\001\000\000\000\000\000\000\140\000\000\000\000\000\000\000\ +\000\000\231\001\210\001\000\000\000\000\208\001\000\000\000\000\ +\000\000\000\000\002\002\148\000\000\000\000\000\000\000\151\000\ +\150\000\000\000\145\000\000\000\000\000\000\000\044\000\078\001\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\136\000\000\000\000\000\000\000\000\000\003\002\004\002\000\000\ +\146\000\156\000\000\000\000\000\000\000\000\000\000\000\165\000\ +\159\000\000\000\246\001\138\000\139\000\000\000\000\000\000\000\ +\000\000\000\000\137\000\211\001\005\002\000\000\000\000\000\000\ +\000\000\000\000\164\000\144\000\000\000\141\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\163\000\160\000\178\002\179\002\000\000\000\000\ +\000\000\000\000\161\000\000\000\000\000\000\000\000\000\000\000\ +\142\000\000\000\000\000\000\000\162\000\000\000\000\000" + +let yydgoto = "\008\000\ +\054\000\097\000\119\000\127\000\145\000\155\000\169\000\025\002\ +\098\000\120\000\128\000\056\000\067\001\123\000\057\000\131\000\ +\132\000\171\001\207\001\042\003\227\003\118\003\184\003\248\002\ +\058\000\226\001\003\002\096\001\059\000\060\000\119\003\061\000\ +\157\000\063\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\021\001\043\003\ +\076\000\103\001\126\002\038\004\107\000\108\000\077\000\110\000\ +\111\000\112\000\113\000\114\000\058\001\099\003\115\000\135\001\ +\220\003\127\002\085\003\026\004\051\002\052\002\047\003\238\003\ +\157\004\155\004\255\004\078\000\085\004\129\004\237\005\013\005\ +\130\004\169\003\044\005\045\005\148\000\172\001\047\005\182\005\ +\183\005\226\005\001\006\033\006\029\006\117\002\166\005\116\000\ +\137\001\079\000\105\001\015\001\240\002\172\003\101\004\173\003\ +\171\003\231\002\173\000\080\000\117\001\020\003\157\001\243\002\ +\241\002\081\000\082\000\083\000\096\004\084\000\085\000\206\000\ +\086\000\087\000\207\000\217\000\019\002\213\000\118\001\119\001\ +\110\002\024\003\088\000\238\005\026\003\178\000\089\000\099\001\ +\033\002\131\004\244\002\149\000\208\000\209\000\011\002\214\000\ +\179\000\180\000\029\003\181\000\150\000\182\000\194\001\197\001\ +\195\001\177\002\223\004\090\000\101\001\056\002\053\003\163\004\ +\018\005\014\005\086\004\054\003\243\003\055\003\248\003\028\004\ +\187\004\015\005\016\005\017\005\220\002\158\003\159\003\087\004\ +\088\004\115\003\109\005\140\005\110\005\111\005\112\005\113\005\ +\039\004\136\005\151\000\152\000\153\000\154\000\165\001\178\001\ +\144\002\145\002\146\002\056\004\108\003\053\004\166\001\167\001\ +\168\001\051\001\016\001\026\002\068\001" + +let yysindex = "\078\009\ +\091\065\200\012\136\050\049\050\129\046\096\068\132\071\000\000\ +\201\255\065\001\016\071\201\255\000\000\045\000\201\255\201\255\ +\000\000\000\000\201\255\201\255\201\255\201\255\201\255\000\000\ +\201\255\161\073\046\255\177\065\009\066\094\061\094\061\017\005\ +\000\000\204\058\094\061\201\255\000\000\000\000\150\004\201\255\ +\153\000\000\000\000\000\016\071\091\065\000\000\000\000\201\255\ +\201\255\000\000\000\000\201\255\201\255\000\000\005\002\173\001\ +\135\007\028\002\000\000\085\077\000\000\240\001\000\000\000\000\ +\054\002\000\000\000\000\000\000\006\003\000\000\000\000\072\003\ +\000\000\173\001\000\000\000\000\000\000\165\002\000\000\041\073\ +\233\002\016\071\016\071\096\068\096\068\000\000\000\000\000\000\ +\000\000\000\000\204\004\201\255\201\255\150\004\200\012\201\255\ +\000\000\111\004\000\000\000\000\054\002\000\000\000\000\072\003\ +\173\001\000\000\200\012\000\000\000\000\000\000\000\000\129\003\ +\000\000\161\003\000\000\000\000\000\000\065\001\000\000\154\003\ +\194\003\173\001\000\000\035\009\000\000\255\050\000\000\184\007\ +\173\001\184\007\000\000\000\000\178\033\073\004\086\000\174\010\ +\070\004\086\045\129\046\037\004\065\001\142\001\000\000\000\000\ +\000\000\059\000\000\000\000\000\015\004\000\000\000\000\173\002\ +\138\001\084\002\000\000\135\005\240\001\201\255\201\255\217\002\ +\135\070\198\070\000\000\060\063\170\003\038\004\028\003\000\000\ +\000\000\097\000\144\004\000\000\000\000\132\071\132\071\000\000\ +\000\000\000\000\152\004\000\000\184\004\000\000\094\061\094\061\ +\164\004\016\071\000\000\000\000\000\000\000\000\000\000\000\000\ +\094\066\201\255\245\001\025\255\132\071\012\070\073\004\096\068\ +\132\003\016\071\000\000\219\004\009\001\123\005\122\255\000\000\ +\181\004\000\000\000\000\021\005\063\003\226\004\000\000\189\077\ +\240\004\000\000\240\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\004\065\146\005\ +\004\065\201\255\201\255\153\000\132\005\000\000\000\000\000\000\ +\016\071\000\000\097\005\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\198\005\000\000\000\000\000\000\083\001\ +\000\000\000\000\000\000\000\000\000\000\016\071\000\000\000\000\ +\000\000\136\001\155\255\004\065\096\068\201\255\239\004\166\005\ +\000\000\201\255\000\000\000\000\096\068\159\005\025\255\096\068\ +\000\000\094\061\135\007\173\001\201\255\000\000\239\005\151\006\ +\096\068\096\068\096\068\096\068\096\068\096\068\096\068\096\068\ +\096\068\096\068\096\068\096\068\096\068\096\068\096\068\096\068\ +\096\068\096\068\096\068\096\068\096\068\179\066\096\068\000\000\ +\164\004\096\068\000\000\164\004\000\000\164\004\000\000\164\004\ +\000\000\000\000\096\068\091\002\031\006\016\071\016\071\204\005\ +\212\005\016\071\204\005\040\002\101\073\000\000\000\000\096\068\ +\040\002\040\002\000\000\000\000\145\005\245\001\164\003\032\005\ +\000\000\159\005\000\000\000\000\000\000\164\004\000\000\164\004\ +\000\000\173\004\000\000\000\000\000\000\000\000\000\000\184\007\ +\173\001\184\007\000\000\184\007\000\000\200\008\000\000\019\255\ +\000\000\190\005\023\006\000\000\200\008\000\000\200\008\000\000\ +\000\000\000\000\020\006\210\005\001\006\133\008\133\008\000\000\ +\129\046\201\255\164\004\066\001\224\005\036\006\000\000\000\000\ +\030\006\000\000\000\000\000\000\163\010\057\003\200\005\237\005\ +\129\046\142\001\000\000\000\000\132\071\201\072\000\000\055\006\ +\044\006\138\255\242\005\094\004\244\005\000\000\244\005\000\000\ +\170\003\000\000\083\001\038\004\000\000\000\000\023\002\000\000\ +\000\000\000\000\000\000\000\000\064\002\087\015\211\063\016\064\ +\000\000\000\000\109\002\000\000\000\000\132\071\125\001\004\065\ +\164\004\000\000\164\004\040\002\015\006\032\006\000\000\097\003\ +\145\005\000\000\246\005\126\255\000\000\000\000\072\002\122\074\ +\064\006\067\004\201\072\239\061\183\003\046\005\098\005\160\069\ +\000\000\000\000\000\000\132\071\241\005\164\004\194\002\164\004\ +\137\005\068\006\000\000\000\000\040\002\202\006\217\002\185\009\ +\051\011\000\000\067\006\000\000\000\000\217\002\096\068\000\000\ +\000\000\212\005\000\000\096\068\116\255\067\003\060\078\132\071\ +\000\000\010\006\094\061\012\006\245\001\252\005\201\255\000\000\ +\052\072\000\000\016\006\019\006\014\006\000\000\132\003\000\000\ +\000\000\028\006\000\000\000\000\039\006\021\006\065\001\034\006\ +\038\003\132\071\211\003\000\000\046\006\047\006\000\000\077\005\ +\131\006\139\006\004\065\000\000\000\000\161\073\067\001\008\067\ +\096\067\059\059\000\000\000\000\210\016\210\016\026\078\205\007\ +\189\077\026\078\029\006\029\006\029\006\029\006\199\002\105\006\ +\105\006\029\006\199\002\199\002\026\078\105\006\199\002\199\002\ +\199\002\094\061\000\000\105\006\052\072\000\000\077\005\052\006\ +\145\005\189\077\096\068\096\068\096\068\220\002\103\006\096\068\ +\096\068\096\068\040\002\040\002\000\000\000\000\000\000\224\002\ +\000\000\000\000\026\078\000\000\113\006\024\001\164\004\164\003\ +\070\006\164\004\000\000\198\003\000\000\000\000\000\000\093\003\ +\066\006\116\003\077\005\072\006\145\005\000\000\000\000\000\000\ +\000\000\154\006\000\000\000\000\184\007\000\000\000\000\000\000\ +\120\000\000\000\177\006\000\000\000\000\200\008\008\001\042\001\ +\167\050\000\000\000\000\000\000\000\000\109\006\164\003\129\046\ +\145\003\129\046\129\046\087\003\000\000\085\006\000\000\000\000\ +\215\255\065\001\114\006\000\000\000\000\000\000\185\003\129\046\ +\161\006\000\000\000\000\026\003\132\071\224\255\019\005\082\006\ +\000\000\009\014\000\000\000\000\000\000\000\000\016\003\000\000\ +\179\006\000\000\018\002\003\071\150\063\000\000\018\002\000\000\ +\100\006\000\000\000\000\096\068\096\068\171\004\000\000\096\068\ +\096\068\096\068\000\000\000\000\113\006\000\000\101\006\000\000\ +\100\036\000\002\100\036\164\004\000\000\197\006\000\000\129\046\ +\096\068\000\000\135\006\000\000\132\071\000\000\000\000\000\000\ +\136\006\000\000\136\006\000\000\163\010\094\062\096\068\160\069\ +\000\000\199\255\204\006\000\000\096\068\145\006\164\004\085\000\ +\091\065\020\003\000\000\000\000\000\000\104\006\000\000\000\000\ +\000\000\074\001\000\000\164\004\096\068\000\000\189\077\000\000\ +\189\077\000\000\000\000\000\000\000\000\000\000\164\004\122\000\ +\000\000\000\000\000\000\178\006\024\001\038\003\046\006\173\001\ +\072\069\009\005\206\006\000\000\203\006\162\006\164\006\167\006\ +\156\001\000\000\000\000\073\004\207\006\038\003\164\003\132\003\ +\049\000\038\003\173\001\070\005\000\000\000\000\149\002\003\004\ +\186\001\198\255\000\000\000\000\225\003\000\000\167\000\129\046\ +\096\068\149\006\096\000\000\000\193\003\000\000\240\004\000\000\ +\240\004\148\006\083\001\000\000\219\255\096\068\173\001\169\006\ +\038\003\113\006\189\077\042\002\029\000\225\255\065\006\096\068\ +\201\074\233\074\055\075\198\255\181\006\145\006\118\255\174\006\ +\200\012\164\003\007\255\000\000\000\000\244\003\233\006\164\003\ +\046\006\246\254\173\001\225\003\245\006\113\006\108\003\000\000\ +\200\008\000\000\000\000\129\046\043\001\255\006\000\000\000\000\ +\065\001\130\001\164\004\000\000\129\046\210\002\175\006\164\004\ +\142\001\000\000\114\006\191\006\000\000\163\010\159\006\000\000\ +\000\000\000\000\164\004\132\071\185\006\000\000\094\004\000\000\ +\000\000\000\000\000\000\001\001\000\000\161\255\000\000\000\000\ +\000\000\169\002\000\000\082\000\231\255\089\006\087\075\165\075\ +\197\075\208\006\000\000\195\006\000\000\200\006\085\006\192\006\ +\132\255\008\007\164\004\000\000\173\001\241\003\194\000\135\006\ +\198\006\025\006\010\007\010\007\021\007\205\006\227\006\135\006\ +\000\000\000\000\182\067\096\068\132\071\157\077\000\000\190\004\ +\096\068\000\000\164\003\000\000\116\004\000\000\129\046\189\077\ +\096\068\096\068\164\004\002\007\215\002\000\000\041\008\096\068\ +\205\062\023\007\000\000\133\069\114\002\077\064\138\064\199\064\ +\096\068\000\000\129\046\132\071\000\000\000\000\000\000\086\255\ +\000\000\132\071\164\003\173\001\173\001\213\000\119\005\000\000\ +\000\000\000\000\042\007\000\000\000\000\129\046\000\000\164\004\ +\164\004\153\000\153\000\173\001\000\000\000\000\000\000\000\000\ +\132\071\000\000\084\001\025\007\229\006\065\001\000\000\000\000\ +\193\005\036\007\000\000\000\000\000\000\000\000\000\000\144\000\ +\220\005\000\000\132\003\000\000\000\000\000\000\000\000\025\007\ +\173\001\001\007\000\000\000\000\009\007\000\000\011\007\096\068\ +\096\068\096\068\189\077\000\000\014\007\000\000\016\007\000\000\ +\018\007\253\255\238\006\000\000\070\007\040\005\000\000\000\000\ +\164\004\189\004\210\002\046\006\077\005\083\007\000\000\000\000\ +\000\000\164\003\210\002\003\004\226\255\074\007\000\000\007\007\ +\164\003\030\007\000\000\000\000\038\002\000\000\000\000\008\000\ +\000\000\129\046\065\001\005\007\114\006\000\000\000\000\129\046\ +\000\000\094\004\000\000\000\000\164\003\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\096\068\096\068\096\068\000\000\ +\000\000\000\000\069\007\000\000\212\005\006\007\000\000\195\006\ +\163\010\180\255\173\001\000\000\000\007\000\000\000\000\096\068\ +\000\000\160\069\129\046\096\068\013\007\015\007\129\046\000\000\ +\096\068\017\007\000\000\000\000\029\007\000\000\096\068\132\003\ +\000\000\034\074\124\255\000\000\000\000\164\004\000\000\000\000\ +\000\000\096\068\096\068\135\006\166\001\000\000\135\006\096\068\ +\076\007\000\000\000\000\000\000\000\000\000\000\016\003\000\000\ +\179\006\000\000\018\002\000\000\156\004\018\002\000\000\019\007\ +\204\006\210\002\000\000\000\000\132\003\164\003\218\001\129\046\ +\096\068\164\004\173\001\164\004\173\001\000\000\204\006\198\255\ +\000\000\221\073\000\000\020\007\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\096\003\000\000\000\000\087\007\096\068\ +\096\068\028\076\060\076\138\076\096\068\096\068\096\068\198\255\ +\000\000\065\001\000\000\100\049\164\003\132\003\000\000\000\000\ +\201\005\217\002\007\255\198\003\000\000\000\000\164\003\020\007\ +\198\003\101\007\129\046\000\000\000\000\000\000\000\000\000\000\ +\164\004\114\006\246\255\170\076\248\076\024\077\168\006\103\007\ +\000\000\000\000\000\000\104\007\000\000\000\007\173\001\100\007\ +\000\000\164\004\000\000\000\000\000\000\164\004\000\000\160\069\ +\096\068\189\077\119\005\000\000\076\002\054\003\000\000\000\000\ +\000\000\000\000\000\000\099\007\129\046\028\007\000\000\096\068\ +\096\068\000\000\119\005\044\004\000\000\212\004\173\001\173\001\ +\179\003\000\000\021\003\000\000\000\000\245\001\000\000\122\015\ +\082\074\243\044\000\000\225\004\072\007\118\007\000\000\000\000\ +\024\001\245\002\000\000\150\255\091\003\245\002\168\006\189\077\ +\189\077\000\000\065\007\000\000\066\007\000\000\080\007\189\077\ +\189\077\189\077\000\000\000\000\186\013\052\007\131\007\164\004\ +\163\010\086\007\000\000\173\001\164\004\079\007\000\000\213\003\ +\210\002\119\005\200\005\200\005\106\002\000\000\000\000\153\004\ +\159\000\000\000\100\049\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\129\046\000\000\000\000\193\005\028\004\167\050\ +\000\000\000\000\096\068\000\000\000\000\000\000\038\001\000\000\ +\059\007\129\046\250\004\133\069\000\000\000\000\000\000\129\046\ +\000\000\000\000\043\007\020\007\212\005\045\007\195\006\212\005\ +\024\001\000\000\164\004\118\007\020\007\195\006\000\000\164\004\ +\129\046\000\000\245\001\212\002\067\002\000\000\000\000\000\000\ +\000\000\000\000\064\007\000\000\193\005\096\068\096\068\096\068\ +\107\001\015\004\153\000\163\010\094\007\088\007\146\007\000\000\ +\000\000\100\049\025\004\042\004\042\004\129\046\078\007\129\046\ +\226\255\245\001\024\001\069\002\000\000\000\000\173\001\000\000\ +\060\004\164\004\141\007\164\003\000\000\000\000\001\005\096\068\ +\000\000\164\004\212\005\212\005\241\069\212\005\212\005\199\005\ +\164\004\160\000\082\007\000\000\006\005\000\000\248\002\000\002\ +\164\004\000\000\000\000\000\000\000\000\000\000\189\077\189\077\ +\189\077\077\004\164\004\096\007\129\046\214\004\000\000\100\049\ +\163\010\000\000\000\000\000\000\000\000\000\000\000\000\024\001\ +\000\000\000\000\000\000\000\000\084\007\000\000\077\007\096\068\ +\000\000\160\007\161\007\030\046\000\000\163\007\166\007\096\068\ +\162\007\000\000\000\000\195\006\118\007\000\000\129\046\000\002\ +\164\004\164\004\000\000\000\000\046\006\100\049\097\002\000\000\ +\000\000\099\001\000\000\114\007\171\007\164\004\000\000\000\000\ +\167\050\167\050\135\006\164\004\164\007\195\001\129\046\129\046\ +\000\000\096\068\102\007\164\004\164\004\000\000\000\000\082\005\ +\000\000\000\000\164\004\164\004\164\004\164\004\173\001\000\000\ +\000\000\100\049\000\000\000\000\000\000\170\007\096\068\129\046\ +\164\004\164\004\000\000\000\000\000\000\168\006\129\046\168\006\ +\007\005\037\003\000\000\000\000\129\046\000\000\164\004\164\004\ +\173\001\193\005\092\007\111\007\212\005\145\005\195\006\186\007\ +\173\001\030\005\000\000\000\000\000\000\000\000\191\007\212\005\ +\212\005\129\046\000\000\096\068\167\050\194\007\196\007\164\004\ +\000\000\173\001\129\046\129\046\000\000\164\004\164\004" + +let yyrindex = "\000\000\ +\211\008\214\008\120\007\000\000\000\000\000\000\000\000\000\000\ +\168\073\000\000\000\000\011\068\000\000\000\000\115\002\202\005\ +\000\000\000\000\193\071\073\070\071\071\181\068\088\004\000\000\ +\168\073\000\000\000\000\000\000\000\000\000\000\000\000\220\071\ +\027\018\000\000\000\000\181\068\000\000\000\000\064\005\013\003\ +\183\002\000\000\000\000\000\000\055\000\000\000\000\000\181\068\ +\117\007\000\000\000\000\202\005\181\068\000\000\000\000\065\009\ +\055\000\213\022\000\000\010\044\000\000\222\056\000\000\000\000\ +\231\056\000\000\000\000\000\000\047\057\000\000\000\000\068\057\ +\000\000\112\057\000\000\000\000\000\000\000\000\000\000\026\025\ +\143\025\227\014\124\016\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\103\002\115\002\255\004\064\005\064\000\117\007\ +\000\000\000\000\000\000\000\000\000\004\000\000\000\000\158\040\ +\001\041\000\000\064\000\000\000\000\000\000\000\000\000\204\041\ +\000\000\047\042\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\121\007\000\000\120\007\000\000\000\000\000\000\000\000\ +\140\008\000\000\000\000\000\000\000\000\110\009\110\009\000\000\ +\234\038\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\161\045\000\000\000\000\000\000\ +\247\047\219\044\000\000\000\000\000\000\193\071\228\072\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\111\051\000\000\000\000\109\000\139\002\000\000\ +\000\000\000\000\014\003\000\000\219\051\000\000\000\000\000\000\ +\089\058\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\103\002\000\000\000\000\000\000\000\000\025\072\000\000\ +\000\000\000\000\160\003\180\001\000\000\092\255\000\000\000\000\ +\172\000\000\000\000\000\103\255\000\000\010\004\000\000\107\255\ +\170\000\000\000\229\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\126\007\232\057\ +\126\007\115\002\112\007\183\002\113\072\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\000\000\000\000\000\060\086\060\088\004\ +\000\000\000\000\172\060\002\061\000\000\038\000\000\000\000\000\ +\000\000\000\000\000\000\126\007\000\000\086\004\000\000\197\001\ +\000\000\112\007\000\000\000\000\000\000\176\008\000\000\000\000\ +\000\000\000\000\055\000\003\017\220\071\000\000\222\056\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\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\015\000\000\000\000\ +\140\072\000\000\000\000\109\008\000\000\113\007\000\000\186\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\189\023\120\017\000\000\000\000\000\000\ +\003\026\119\026\000\000\000\000\134\005\000\000\000\000\000\000\ +\000\000\176\008\000\000\000\000\000\000\113\007\000\000\186\002\ +\000\000\055\010\000\000\000\000\000\000\000\000\000\000\000\000\ +\140\008\000\000\000\000\000\000\000\000\000\000\000\000\027\001\ +\000\000\216\007\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\240\000\000\000\193\007\000\000\197\007\198\007\000\000\ +\000\000\255\004\018\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\ +\139\255\000\000\173\000\165\255\170\000\000\000\229\005\000\000\ +\047\000\000\000\112\007\103\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\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\007\ +\089\058\000\000\193\049\236\026\000\000\000\000\000\000\000\000\ +\134\005\000\000\000\000\000\000\000\000\000\000\167\055\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\165\007\000\000\170\059\ +\112\057\222\006\000\000\000\000\096\027\000\000\000\000\000\000\ +\000\000\000\000\082\255\000\000\000\000\227\000\000\000\000\000\ +\000\000\145\004\000\000\221\000\000\000\000\000\140\007\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\112\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\212\003\ +\000\000\000\000\126\007\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\111\036\220\036\068\037\189\033\ +\082\039\172\037\049\034\165\034\026\035\142\035\003\031\212\027\ +\073\028\002\036\119\031\235\031\020\038\189\028\096\032\212\032\ +\072\033\000\000\000\000\049\029\000\000\000\000\222\003\000\000\ +\134\005\181\039\000\000\000\000\000\000\000\000\184\018\000\000\ +\000\000\000\000\050\024\166\024\000\000\000\000\000\000\073\023\ +\000\000\000\000\124\038\000\000\173\007\038\007\165\007\000\000\ +\000\000\050\012\047\008\001\041\000\000\000\000\000\000\000\000\ +\000\000\000\000\212\003\000\000\134\005\000\000\000\000\000\000\ +\000\000\240\011\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\061\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\ +\062\045\000\000\000\000\000\000\000\000\006\046\000\000\000\000\ +\000\000\000\000\105\046\000\000\000\000\000\000\000\000\000\000\ +\153\255\000\000\000\000\251\000\221\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\244\001\000\000\ +\204\003\000\000\045\004\000\000\000\000\000\000\120\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\173\007\000\000\000\000\000\000\ +\000\000\000\000\000\000\225\055\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\166\029\000\000\000\000\000\000\010\069\000\000\ +\004\005\000\000\000\000\000\000\000\000\000\000\042\006\000\000\ +\000\000\073\255\000\000\111\000\000\000\000\000\206\255\000\000\ +\232\255\000\000\000\000\000\000\000\000\000\000\143\007\149\007\ +\000\000\000\000\000\000\000\000\173\003\000\000\000\000\209\012\ +\035\005\000\000\172\005\000\000\192\005\114\000\135\000\148\000\ +\000\000\000\000\000\000\025\072\026\056\000\000\000\000\000\000\ +\000\000\000\000\112\057\000\000\000\000\000\000\015\005\112\057\ +\025\072\224\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\170\000\000\000\ +\229\005\000\000\088\004\000\000\000\000\000\000\209\012\000\000\ +\000\000\173\007\000\000\250\077\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\148\007\000\000\000\000\000\000\000\000\ +\044\005\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\001\041\000\000\000\000\173\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\057\002\000\000\000\000\087\000\000\000\155\001\ +\000\000\000\000\204\046\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\241\255\000\000\017\001\000\000\246\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\178\007\037\052\000\000\106\013\000\000\ +\000\000\130\011\225\055\000\000\112\057\000\000\000\000\236\000\ +\000\000\137\001\151\007\151\007\188\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\109\044\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\000\ +\000\000\000\000\208\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\112\057\070\056\000\000\106\006\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\097\059\ +\010\069\090\004\114\003\095\004\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\200\053\000\000\000\000\000\000\000\000\ +\112\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\072\054\ +\070\056\000\000\000\000\000\000\050\019\000\000\166\019\000\000\ +\000\000\000\000\024\040\000\000\027\020\000\000\143\020\000\000\ +\003\021\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\122\004\000\000\211\052\000\000\212\003\044\009\000\000\015\014\ +\000\000\000\000\161\057\001\041\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\027\001\000\000\000\000\000\000\ +\162\061\000\000\000\000\217\007\049\047\000\000\000\000\000\000\ +\000\000\157\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\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\003\ +\000\000\000\000\112\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\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\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\197\005\000\000\ +\068\003\000\000\131\005\000\000\000\000\161\005\000\000\000\000\ +\026\030\079\056\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\030\002\095\004\141\003\095\004\000\000\142\030\224\001\ +\000\000\204\007\000\000\161\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\148\007\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\211\039\000\000\000\000\000\000\161\000\ +\211\039\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\106\014\148\047\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\128\056\112\057\000\000\ +\000\000\198\001\000\000\000\000\000\000\207\001\000\000\000\000\ +\000\000\128\040\050\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\081\054\000\000\000\000\000\000\095\004\095\004\ +\195\007\000\000\178\007\000\000\000\000\000\000\000\000\000\000\ +\000\000\207\007\054\011\134\054\000\000\187\054\000\000\000\000\ +\017\053\070\056\000\000\000\000\000\000\070\056\000\000\227\040\ +\070\041\000\000\120\021\000\000\236\021\000\000\096\022\174\041\ +\017\042\116\042\000\000\000\000\000\000\000\000\086\005\073\001\ +\000\000\000\000\095\052\211\039\130\051\000\000\000\000\000\000\ +\075\053\080\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\000\000\ +\000\000\000\000\000\000\000\000\000\000\070\056\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\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\007\195\007\000\000\201\007\178\007\000\000\ +\017\053\000\000\240\054\037\055\249\002\178\007\000\000\019\054\ +\000\000\000\000\000\000\046\055\112\057\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\070\056\000\000\000\000\000\000\ +\000\000\040\004\021\004\000\000\061\005\000\000\000\000\000\000\ +\000\000\000\000\000\000\108\048\170\048\000\000\200\074\000\000\ +\000\000\000\000\201\056\001\041\000\000\000\000\211\039\000\000\ +\000\000\252\254\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\107\005\000\000\000\000\000\000\000\000\000\000\000\000\ +\019\054\000\000\000\000\000\000\000\000\000\000\046\055\000\000\ +\176\055\000\000\000\000\000\000\000\000\000\000\220\042\063\043\ +\162\043\000\000\113\007\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\153\052\000\000\000\000\000\000\000\000\201\056\ +\000\000\000\000\000\000\000\000\175\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\178\007\118\055\000\000\000\000\000\000\ +\176\055\176\055\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\051\005\000\000\000\000\229\048\013\255\000\000\000\000\ +\000\000\000\000\000\000\176\003\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\031\049\176\055\000\000\000\000\000\000\ +\000\000\000\000\097\059\246\006\030\002\141\003\022\007\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\141\006\170\006\000\000\000\000\000\000\000\000\000\000\000\000\ +\210\007\000\000\000\000\000\000\000\000\000\000\243\005\147\053\ +\022\007\022\007\211\007\214\007\000\000\215\007\178\007\000\000\ +\022\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\228\255\ +\000\000\022\007\000\000\000\000\000\000\255\001\194\004" + +let yygindex = "\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\023\000\ +\184\255\000\000\075\000\179\002\184\003\137\008\048\000\000\000\ +\182\255\017\000\185\004\077\253\000\000\159\254\176\005\071\255\ +\071\009\096\012\018\254\152\005\251\255\099\014\085\252\012\000\ +\178\000\016\000\018\000\019\000\000\000\000\000\000\000\000\000\ +\035\000\037\000\041\000\000\000\255\255\001\000\225\006\150\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\042\000\000\000\ +\000\000\000\000\000\000\000\000\250\254\005\252\000\000\000\000\ +\000\000\002\000\114\253\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\253\002\053\000\057\251\055\255\027\253\185\251\ +\006\253\126\252\016\251\104\251\163\251\214\251\104\003\000\000\ +\000\000\000\000\000\000\000\000\000\000\038\254\000\000\000\000\ +\000\000\000\000\000\000\027\000\064\255\049\006\099\005\025\005\ +\000\000\000\000\062\255\051\001\000\000\000\000\169\255\117\252\ +\057\253\186\006\229\008\101\011\000\000\000\000\000\000\113\255\ +\158\007\183\011\224\006\013\000\065\255\133\003\152\007\000\000\ +\187\007\211\006\018\011\130\253\000\000\106\255\000\000\000\000\ +\000\000\215\003\126\005\133\255\118\001\000\000\000\000\000\000\ +\000\000\206\000\000\000\085\007\142\255\091\007\133\006\152\008\ +\000\000\000\000\097\004\000\000\000\000\203\007\195\253\053\005\ +\144\251\047\251\215\251\242\252\000\000\221\252\000\000\139\004\ +\000\000\000\000\062\251\068\255\012\253\107\006\147\007\000\000\ +\000\000\014\004\000\000\000\000\030\004\004\253\000\000\236\003\ +\151\004\000\000\128\253\138\254\146\255\000\000\114\005\102\254\ +\134\255\171\254\131\255\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\049\255\000\000" + +let yytablesize = 20395 +let yytable = "\147\000\ +\105\000\172\000\106\000\249\001\010\002\248\001\239\001\155\001\ +\128\002\153\001\154\001\189\000\164\001\031\002\213\002\001\002\ +\193\001\099\000\252\002\100\000\101\000\146\000\129\001\055\000\ +\116\003\021\002\114\003\022\002\173\001\124\002\203\003\172\002\ +\195\003\072\003\133\001\242\003\102\000\097\004\103\000\187\001\ +\178\003\219\000\104\000\109\000\144\004\106\004\218\004\159\001\ +\027\004\198\004\124\000\130\000\212\001\147\001\051\000\149\001\ +\100\005\017\001\179\001\096\005\022\005\052\001\070\005\088\000\ +\169\002\028\002\183\003\060\001\070\001\100\003\154\003\151\002\ +\114\001\152\002\143\005\103\005\248\002\121\000\145\004\212\000\ +\036\004\107\001\210\000\045\004\183\000\143\004\248\002\248\002\ +\163\000\240\001\248\002\120\001\020\005\105\000\046\005\106\000\ +\217\001\147\002\046\004\114\001\045\002\159\004\111\001\248\002\ +\042\002\105\000\112\001\106\000\149\001\211\000\099\000\252\001\ +\100\000\101\000\037\004\010\003\112\001\031\004\120\001\138\001\ +\119\002\012\002\099\000\240\004\100\000\101\000\117\005\147\000\ +\057\005\102\000\147\000\103\000\147\000\147\000\074\003\104\000\ +\109\000\178\002\190\001\111\001\215\002\102\000\175\001\103\000\ +\030\000\186\005\027\001\104\000\109\000\187\000\120\002\159\005\ +\188\001\211\004\043\002\172\000\172\000\107\005\172\000\121\002\ +\071\004\103\005\183\003\114\001\181\001\190\001\114\001\114\001\ +\172\000\172\000\102\003\124\000\107\001\146\001\181\001\130\000\ +\107\001\130\000\062\000\234\001\062\000\062\000\120\001\183\000\ +\122\002\093\005\120\001\010\004\163\001\183\000\090\003\172\000\ +\172\000\118\002\123\002\004\002\090\003\111\001\112\001\227\005\ +\144\001\112\001\213\001\126\005\235\001\110\001\214\001\011\003\ +\213\005\224\001\225\001\032\004\013\002\215\001\236\001\050\004\ +\216\001\241\004\004\004\216\002\103\002\046\005\062\000\136\003\ +\014\004\047\001\183\000\168\000\179\002\190\001\014\004\113\001\ +\091\003\190\001\071\001\052\004\127\003\249\005\091\003\096\003\ +\189\001\113\001\110\001\188\001\220\004\062\005\168\000\188\001\ +\044\002\244\004\121\005\174\002\246\004\168\000\072\004\237\001\ +\181\001\128\002\238\001\181\001\113\004\182\002\106\001\183\002\ +\183\000\252\002\183\000\189\001\051\003\010\000\184\004\179\003\ +\201\002\020\006\103\005\168\000\156\005\109\002\087\003\183\001\ +\121\005\052\003\153\001\184\000\012\004\162\005\180\005\168\000\ +\067\002\153\001\098\003\153\001\046\005\096\002\168\000\168\000\ +\128\002\168\000\164\001\164\001\110\001\071\001\112\002\062\000\ +\226\002\071\001\252\002\071\001\128\003\249\001\051\000\180\003\ +\005\004\165\002\158\002\137\003\163\005\190\000\015\004\088\000\ +\109\003\079\005\081\005\113\001\076\004\140\002\113\001\142\002\ +\125\004\143\002\171\002\189\001\205\000\229\005\060\002\189\001\ +\051\000\012\004\168\000\063\005\186\003\207\002\050\002\041\006\ +\185\004\088\000\046\005\228\005\059\002\156\001\059\001\252\003\ +\021\003\106\001\187\003\205\004\213\001\106\001\110\002\050\002\ +\214\001\115\005\113\004\058\003\149\001\033\003\116\001\215\001\ +\149\001\106\002\216\001\109\002\149\001\024\006\149\001\026\006\ +\013\004\125\002\149\001\149\001\183\000\213\001\149\001\105\003\ +\046\005\214\001\116\001\096\002\121\001\122\001\104\002\149\001\ +\215\001\116\001\027\003\216\001\112\002\191\005\224\003\168\004\ +\147\000\005\005\051\000\102\002\027\004\250\002\183\000\147\000\ +\194\000\147\000\225\004\088\000\187\001\225\003\226\003\057\001\ +\147\000\147\000\183\000\147\000\046\005\111\002\138\005\006\005\ +\169\002\184\002\243\005\103\001\183\001\075\004\149\001\147\000\ +\128\002\158\001\188\003\147\000\050\002\149\001\211\005\172\000\ +\172\000\207\004\253\003\183\000\234\001\234\001\169\002\130\000\ +\062\000\130\000\062\000\130\000\110\002\222\003\027\003\149\001\ +\149\001\116\001\149\001\149\001\116\001\116\001\014\003\106\002\ +\172\000\172\000\172\000\106\003\212\005\235\001\235\001\169\002\ +\172\000\094\004\163\001\163\001\185\002\149\001\063\004\236\001\ +\236\001\169\002\105\001\128\002\104\002\062\000\185\002\194\004\ +\199\005\128\002\193\003\169\004\228\001\172\000\172\000\149\004\ +\252\002\102\002\172\000\126\001\071\001\182\001\172\000\187\001\ +\035\004\004\002\184\001\187\001\005\002\079\002\043\004\182\001\ +\246\003\073\001\147\000\147\000\065\001\184\002\103\001\183\001\ +\237\001\237\001\169\002\238\001\238\001\169\002\069\004\105\003\ +\184\002\147\000\172\000\142\002\247\003\105\000\183\000\106\000\ +\002\003\004\003\153\001\172\000\104\005\090\003\229\001\115\001\ +\076\005\004\002\248\002\065\002\193\001\217\002\099\000\015\003\ +\100\000\101\000\095\004\110\003\172\000\249\001\122\003\142\002\ +\037\003\105\003\105\003\123\003\124\003\018\003\148\005\230\001\ +\185\002\102\000\115\001\103\000\142\005\105\001\248\002\104\000\ +\109\000\071\001\104\003\071\001\128\002\071\001\212\000\091\003\ +\248\002\073\001\060\005\190\000\063\003\065\003\142\002\202\003\ +\142\002\182\001\038\002\160\002\182\001\184\001\249\001\172\000\ +\204\003\115\004\191\003\248\002\142\002\157\003\070\004\165\002\ +\059\001\128\002\248\002\111\003\128\002\160\004\219\002\060\003\ +\006\006\113\001\114\001\184\002\161\005\065\002\223\003\065\002\ +\171\005\175\003\125\002\212\000\070\003\251\005\248\002\169\005\ +\248\002\146\004\115\001\007\002\160\002\115\001\115\001\000\004\ +\187\000\001\004\211\000\149\005\248\002\112\003\054\004\040\002\ +\013\000\248\002\150\001\183\000\248\002\184\001\248\002\194\005\ +\147\000\062\000\252\005\147\000\183\000\008\002\169\005\058\004\ +\009\002\125\002\147\000\018\000\147\000\147\000\031\000\161\002\ +\107\002\108\002\205\005\198\000\112\002\184\000\035\000\116\001\ +\253\005\216\003\147\000\129\003\066\002\188\000\024\000\172\000\ +\120\003\161\004\217\005\128\002\147\000\122\000\129\000\248\002\ +\156\000\240\003\128\002\245\004\130\000\252\002\172\000\172\000\ +\131\003\156\001\245\003\165\000\125\000\068\004\178\005\116\003\ +\196\004\114\003\142\003\217\005\218\003\176\001\128\002\201\004\ +\166\000\254\005\185\001\147\000\050\001\147\000\195\000\125\000\ +\008\006\241\003\147\000\059\004\250\002\183\000\125\000\172\000\ +\199\000\046\000\133\002\154\004\156\004\041\002\198\000\147\000\ +\172\000\196\000\172\000\051\004\062\000\153\001\028\003\066\001\ +\166\003\048\004\097\001\126\001\004\002\125\000\066\002\126\001\ +\066\002\217\003\050\000\126\001\252\002\126\001\167\000\059\004\ +\125\000\126\001\065\004\004\006\005\006\188\005\061\004\190\005\ +\125\000\249\001\125\000\204\003\252\002\123\001\126\001\189\003\ +\034\004\167\000\234\001\172\000\133\002\133\002\185\002\098\001\ +\167\000\195\000\213\001\183\000\059\004\017\000\214\001\128\002\ +\215\001\125\002\004\002\199\000\186\002\215\001\133\002\203\004\ +\216\001\011\004\028\003\235\001\196\000\236\003\167\000\237\003\ +\145\001\072\001\147\000\125\000\252\004\236\001\160\003\253\004\ +\100\001\221\001\167\000\120\001\126\001\229\001\071\001\188\002\ +\161\003\167\000\167\000\252\002\167\000\048\005\128\002\050\006\ +\249\003\172\004\107\005\078\005\138\005\221\001\126\001\126\001\ +\128\002\126\001\126\001\183\000\125\002\217\002\230\001\105\000\ +\183\000\106\000\125\002\049\005\248\002\248\002\237\001\041\004\ +\071\005\238\001\218\002\147\000\126\001\056\005\147\000\183\000\ +\099\000\047\000\100\000\101\000\050\000\167\000\119\002\147\000\ +\205\000\132\004\057\004\232\001\187\002\248\002\128\002\128\002\ +\147\000\134\005\253\001\102\000\000\003\103\000\172\000\163\000\ +\240\001\104\000\109\000\006\003\135\005\066\001\030\000\066\001\ +\113\001\114\001\150\001\187\000\120\002\248\002\150\001\099\002\ +\250\002\100\002\150\001\151\001\150\001\121\002\219\002\248\002\ +\150\001\150\001\191\001\101\002\150\001\250\002\128\002\249\001\ +\071\005\160\000\183\000\196\002\162\000\150\001\250\002\232\003\ +\073\004\250\002\062\000\196\003\213\001\197\002\122\002\172\000\ +\214\001\163\000\240\001\250\002\186\001\125\002\235\004\215\001\ +\123\002\147\000\216\001\221\003\132\005\133\005\250\005\228\003\ +\143\000\147\000\182\001\172\000\048\005\233\003\172\000\050\000\ +\172\000\172\000\172\000\124\001\150\001\147\000\172\000\118\004\ +\031\000\210\004\125\002\150\001\172\000\125\002\250\002\002\003\ +\035\000\067\002\234\003\251\004\250\002\219\004\009\004\250\002\ +\147\000\217\002\107\001\141\004\254\001\150\001\150\001\046\002\ +\150\001\150\001\183\000\172\000\254\002\183\001\168\005\054\002\ +\248\002\175\002\058\002\084\001\085\001\229\001\151\004\165\004\ +\180\002\248\002\120\001\150\001\030\000\004\002\123\004\093\000\ +\169\002\106\001\255\001\235\003\050\005\217\002\074\004\105\005\ +\102\001\180\002\079\003\048\005\250\002\123\001\230\001\169\002\ +\091\002\123\001\216\005\183\000\094\002\123\001\169\002\123\001\ +\191\001\090\001\090\003\123\001\123\001\128\002\215\001\250\002\ +\132\001\216\001\219\002\180\002\125\002\249\001\250\002\000\002\ +\123\001\248\002\095\001\125\002\176\001\169\002\050\000\169\002\ +\247\002\141\001\053\005\039\003\147\000\080\005\254\001\066\001\ +\148\001\169\002\147\000\071\005\208\004\250\002\016\002\125\002\ +\040\003\048\005\012\003\040\006\091\003\050\000\219\002\134\001\ +\250\002\097\005\104\001\134\001\013\003\250\002\030\000\123\001\ +\250\002\183\000\250\002\147\000\255\001\134\001\123\001\108\005\ +\119\002\191\001\114\005\151\001\172\000\147\000\134\001\094\005\ +\211\002\147\000\169\002\017\002\211\000\169\002\041\003\048\005\ +\123\001\123\001\004\002\123\001\123\001\021\005\131\001\030\006\ +\030\000\190\003\094\003\226\004\179\005\187\000\120\002\230\004\ +\167\002\000\002\212\002\250\002\139\005\119\002\123\001\121\002\ +\050\000\096\003\247\002\134\001\095\005\134\001\050\000\133\003\ +\143\000\216\004\155\001\048\005\153\001\154\001\097\003\004\002\ +\125\002\249\001\147\000\204\003\031\006\030\000\125\003\071\005\ +\122\002\071\005\187\000\120\002\147\000\183\001\171\002\140\002\ +\250\002\183\000\123\002\136\001\121\002\168\002\254\001\155\001\ +\254\004\122\005\154\001\163\000\240\001\140\002\167\005\016\002\ +\140\002\180\002\012\005\180\002\098\003\091\002\043\005\125\002\ +\004\002\243\001\140\002\036\005\180\002\122\002\030\000\170\000\ +\254\003\125\002\016\002\067\002\255\001\147\000\119\002\123\002\ +\208\001\016\002\016\002\124\001\248\002\192\005\091\002\124\001\ +\151\001\069\005\045\003\124\001\236\001\124\001\209\005\248\002\ +\067\002\124\001\249\001\209\001\204\003\124\001\030\000\016\002\ +\016\002\180\002\172\000\187\000\120\002\255\003\124\001\125\002\ +\125\002\000\002\131\005\016\002\046\003\121\002\236\001\147\000\ +\050\000\121\003\016\002\016\002\069\003\016\002\228\002\229\002\ +\130\003\139\001\140\002\061\002\248\002\143\000\140\002\093\000\ +\091\002\091\002\147\000\147\000\147\000\083\005\122\002\183\000\ +\066\001\184\002\091\005\093\004\093\000\124\001\090\003\125\002\ +\123\002\069\005\091\002\212\001\124\001\183\001\077\003\078\003\ +\254\002\093\000\099\005\093\000\093\000\212\001\016\002\147\000\ +\244\003\140\001\092\005\147\000\230\002\067\002\124\001\124\001\ +\093\000\124\001\124\001\063\002\176\001\221\001\184\002\054\002\ +\176\001\145\005\183\000\187\000\176\001\043\005\176\001\221\001\ +\091\003\063\002\176\001\093\000\124\001\147\000\176\001\127\003\ +\212\001\221\001\147\000\093\000\210\001\066\001\213\001\176\001\ +\141\002\093\000\214\001\221\001\147\000\143\000\172\000\093\000\ +\156\001\215\001\147\000\169\001\216\001\151\002\180\002\211\001\ +\187\005\196\001\196\001\093\000\183\001\225\002\246\002\093\000\ +\040\004\213\001\151\005\147\000\174\001\214\001\220\001\221\001\ +\154\005\063\002\183\001\093\000\215\001\183\000\093\000\216\001\ +\063\002\246\002\181\001\116\004\090\003\176\001\147\000\175\001\ +\246\002\165\005\250\002\196\005\043\005\242\001\148\003\149\003\ +\147\000\180\002\147\000\063\002\183\000\168\002\188\001\176\001\ +\176\001\087\005\176\001\176\001\068\005\117\004\125\002\246\002\ +\185\002\157\005\250\002\167\003\160\005\250\002\008\003\172\000\ +\250\002\180\002\246\002\180\002\248\002\176\001\091\003\183\000\ +\185\000\177\003\246\002\185\000\246\002\219\001\185\000\185\000\ +\168\002\222\001\185\000\185\000\185\000\185\000\185\000\147\000\ +\185\000\180\002\043\005\147\000\248\002\185\002\249\004\185\000\ +\251\002\143\000\248\002\185\000\191\004\250\002\185\000\185\000\ +\175\002\166\000\250\002\061\003\250\002\223\005\147\000\185\000\ +\185\000\180\002\134\002\185\000\185\000\246\002\223\001\202\005\ +\203\005\147\000\206\005\207\005\166\000\224\005\192\004\183\000\ +\043\005\150\003\183\000\166\000\236\005\183\000\135\002\248\002\ +\255\005\090\003\000\006\147\000\147\000\183\000\248\002\244\005\ +\184\000\147\000\147\000\250\003\163\000\240\001\088\005\225\005\ +\006\002\166\000\185\000\185\000\185\000\185\000\137\005\185\000\ +\006\004\236\005\236\005\101\005\043\005\166\000\041\003\009\006\ +\010\006\054\001\147\000\051\000\166\000\166\000\112\004\166\000\ +\069\005\147\000\069\005\091\003\205\003\183\000\122\000\147\000\ +\206\003\136\002\138\003\014\002\152\005\183\000\137\002\207\003\ +\023\006\050\000\208\003\200\005\139\003\051\000\184\000\254\004\ +\215\005\250\002\183\000\209\003\147\000\034\006\144\001\147\000\ +\122\000\180\001\144\001\088\000\018\001\147\000\147\000\015\002\ +\166\000\144\001\155\000\092\003\144\001\185\000\185\000\194\000\ +\044\006\250\002\048\006\183\000\157\000\236\005\250\002\250\002\ +\018\002\218\001\183\000\054\006\055\006\088\000\032\006\183\000\ +\250\002\213\001\183\000\048\002\155\000\214\001\020\002\157\000\ +\227\001\039\006\183\000\230\003\215\001\151\002\157\000\216\001\ +\151\002\185\000\019\001\049\002\046\006\047\006\027\006\183\000\ +\020\001\250\002\151\002\184\000\144\001\108\004\109\004\254\002\ +\041\003\069\000\170\000\250\002\157\000\232\002\233\002\151\002\ +\189\004\151\002\151\002\119\004\120\004\173\002\028\006\175\001\ +\157\000\014\006\126\004\175\001\129\002\170\000\151\002\175\001\ +\157\000\175\001\157\000\140\004\170\000\175\001\179\001\183\000\ +\008\002\175\001\179\001\009\002\130\002\050\003\191\002\193\002\ +\195\002\151\002\175\001\051\003\179\001\142\002\199\002\151\002\ +\151\002\151\002\170\000\170\000\250\002\179\001\142\002\151\002\ +\052\003\232\002\235\002\231\003\178\001\151\002\170\000\027\002\ +\178\001\185\000\185\000\157\000\250\002\170\000\170\000\145\001\ +\170\000\151\002\178\001\145\001\242\002\151\002\142\002\250\002\ +\183\000\142\002\145\001\178\001\173\002\145\001\034\002\185\000\ +\175\001\151\002\142\002\133\001\151\002\173\002\145\001\133\001\ +\136\001\250\002\183\000\066\001\136\001\185\000\133\001\198\003\ +\016\003\185\000\175\001\175\001\008\002\175\001\175\001\009\002\ +\051\005\170\000\133\001\170\004\185\000\029\000\254\002\136\001\ +\032\002\208\005\229\003\052\005\184\002\171\004\050\002\239\003\ +\175\001\186\000\044\003\055\002\193\000\145\001\184\002\195\000\ +\196\000\097\001\017\002\197\000\198\000\199\000\200\000\201\000\ +\227\001\202\000\035\002\227\001\036\002\227\001\007\004\227\001\ +\116\002\133\001\183\000\066\001\053\001\017\002\037\002\055\001\ +\056\001\250\002\250\002\109\002\017\002\017\002\234\002\236\002\ +\061\001\062\001\224\004\211\000\063\001\064\001\227\004\156\002\ +\157\002\149\002\047\004\231\004\213\001\227\001\150\002\227\001\ +\214\001\153\002\017\002\017\002\155\002\236\001\099\004\215\001\ +\162\002\141\002\216\001\076\001\242\004\243\004\017\002\227\001\ +\154\002\163\002\247\004\164\002\143\000\017\002\017\002\141\002\ +\017\002\176\002\141\002\125\001\126\001\127\001\128\001\091\002\ +\130\001\185\000\180\001\099\002\141\002\204\002\170\002\082\001\ +\083\001\084\001\085\001\000\005\175\002\224\002\191\001\205\002\ +\180\002\214\002\181\002\104\002\208\002\105\002\209\002\245\002\ +\091\002\254\002\183\000\218\001\092\004\005\003\183\000\106\002\ +\210\002\017\002\185\000\087\001\088\001\017\003\218\001\019\003\ +\022\003\069\000\030\003\032\003\069\000\135\003\031\003\090\001\ +\091\001\092\001\093\001\218\001\218\001\016\004\069\000\017\004\ +\227\001\034\003\227\001\050\000\196\001\146\003\189\001\190\001\ +\095\001\018\004\035\003\069\000\141\002\069\000\069\000\036\003\ +\141\002\218\001\091\002\091\002\134\000\077\004\038\003\078\004\ +\056\003\069\000\069\000\147\004\148\004\227\001\085\001\227\001\ +\253\002\079\004\050\000\077\005\091\002\170\003\057\003\134\000\ +\073\003\049\003\233\001\158\004\080\003\069\000\134\000\084\003\ +\069\000\135\000\085\005\086\005\069\000\069\000\095\003\103\003\ +\166\004\088\003\107\003\069\000\101\003\117\003\185\000\125\000\ +\126\003\069\000\185\001\132\003\135\000\134\000\140\003\147\003\ +\174\004\215\001\155\003\135\000\038\002\069\000\168\003\232\002\ +\134\000\069\000\069\000\062\002\063\002\064\002\065\002\134\000\ +\134\000\041\003\134\000\181\003\067\002\069\000\163\000\066\002\ +\069\000\194\003\135\000\211\003\212\003\029\000\067\005\213\003\ +\029\000\214\003\030\000\197\004\215\003\135\000\038\005\068\005\ +\008\004\219\003\029\000\029\000\135\000\135\000\029\000\135\000\ +\251\003\002\004\029\002\030\002\029\004\040\005\042\004\029\000\ +\029\000\029\000\029\000\134\000\033\004\147\005\062\002\063\002\ +\064\002\065\002\049\004\067\002\010\000\029\000\029\000\064\004\ +\039\002\255\002\066\002\168\002\062\004\084\004\227\001\083\004\ +\089\004\227\001\221\004\093\003\143\000\246\002\047\002\067\004\ +\135\000\029\000\053\002\215\000\029\000\090\004\029\000\029\000\ +\029\000\029\000\103\004\098\004\100\004\236\001\029\000\029\000\ +\246\002\122\004\104\004\105\004\248\002\029\000\089\002\246\002\ +\248\002\128\004\236\001\162\004\248\002\248\002\067\002\150\004\ +\167\004\029\000\164\004\029\000\066\004\029\000\029\000\236\001\ +\175\004\236\001\236\001\248\002\218\001\246\002\176\004\186\004\ +\177\004\029\000\201\005\181\004\029\000\182\004\236\001\183\004\ +\029\000\246\002\002\005\188\004\004\005\195\004\218\001\199\004\ +\218\001\246\002\218\001\246\002\200\004\202\004\218\001\215\004\ +\217\004\236\001\248\002\209\004\222\004\233\004\248\004\236\001\ +\236\001\236\001\228\004\019\005\229\004\242\002\232\004\236\001\ +\250\004\023\005\059\005\227\001\072\005\236\001\066\003\075\005\ +\082\005\084\005\232\005\055\005\102\005\006\005\118\005\119\005\ +\058\005\236\001\241\005\123\005\246\002\236\001\135\004\137\004\ +\139\004\218\001\159\002\246\002\142\004\120\005\227\001\253\002\ +\124\005\236\001\242\002\014\000\236\001\127\005\074\005\130\005\ +\150\005\180\001\155\005\180\001\158\005\173\005\181\005\185\005\ +\184\005\198\005\015\000\016\000\011\006\189\005\180\001\218\001\ +\222\005\242\002\231\005\184\002\214\005\233\005\234\005\023\000\ +\239\005\210\003\230\005\240\005\250\002\250\002\089\005\090\005\ +\253\002\022\006\002\006\250\002\242\005\105\005\007\006\021\006\ +\012\006\250\002\031\000\218\001\014\000\069\001\038\006\042\006\ +\250\002\106\005\035\000\037\006\045\006\116\005\250\002\051\006\ +\039\000\052\006\051\000\015\000\016\000\088\000\041\000\008\000\ +\246\002\051\000\185\000\076\001\250\002\248\002\049\006\053\002\ +\023\000\250\002\250\002\128\005\074\002\248\002\045\000\088\000\ +\071\002\073\002\001\003\174\000\120\000\221\001\093\003\191\000\ +\002\003\171\002\049\000\031\000\193\000\052\000\069\001\248\002\ +\083\001\084\001\085\001\035\000\076\002\144\005\191\000\023\003\ +\169\002\039\000\169\002\170\002\142\001\030\004\170\002\041\000\ +\172\002\245\001\227\001\025\006\114\002\093\003\102\004\180\001\ +\191\000\175\002\176\002\087\001\088\001\177\002\173\002\126\000\ +\118\000\220\005\180\001\174\003\076\003\059\003\218\001\090\001\ +\091\001\092\001\093\001\049\000\170\005\180\001\052\000\139\002\ +\001\003\218\001\153\005\082\000\174\005\113\002\089\002\071\003\ +\095\001\089\002\110\004\200\002\191\000\198\002\191\000\191\000\ +\134\003\199\001\227\001\089\002\173\004\180\001\073\005\089\002\ +\246\002\218\001\035\005\193\005\146\002\164\003\195\005\166\002\ +\089\002\089\002\089\002\089\002\131\002\171\000\001\000\002\000\ +\003\000\004\000\005\000\006\000\007\000\146\005\141\005\089\002\ +\172\005\054\005\227\001\000\000\000\000\000\000\000\000\133\000\ +\204\000\134\000\135\000\030\000\000\000\136\000\000\000\000\000\ +\137\000\138\000\089\002\000\000\000\000\089\002\000\000\146\002\ +\089\002\089\002\089\002\000\000\000\000\093\003\253\002\089\002\ +\089\002\139\000\000\000\000\000\000\000\000\000\089\002\227\001\ +\227\001\140\000\113\003\000\000\000\000\174\000\174\000\000\000\ +\174\000\142\000\089\002\000\000\089\002\000\000\089\002\089\002\ +\180\001\000\000\174\000\174\000\124\004\143\000\144\000\000\000\ +\246\002\000\000\089\002\160\001\000\000\089\002\191\000\000\000\ +\000\000\089\002\000\000\000\000\000\000\000\000\000\000\246\002\ +\246\002\174\000\250\001\000\000\248\002\248\002\191\000\000\000\ +\000\000\000\000\000\000\248\002\246\002\000\000\019\006\000\000\ +\227\001\000\000\093\003\133\000\000\000\134\000\135\000\030\000\ +\248\002\136\000\093\003\000\000\162\001\138\000\248\002\246\002\ +\000\000\000\000\246\002\000\000\227\001\010\000\000\000\246\002\ +\035\006\036\006\000\000\000\000\177\001\246\002\000\000\000\000\ +\043\006\218\001\248\002\246\002\000\000\000\000\141\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\142\000\192\001\171\000\ +\171\000\053\006\171\000\246\002\246\002\000\000\000\000\165\002\ +\165\002\143\000\144\000\000\000\171\000\171\000\165\002\246\002\ +\000\000\000\000\246\002\000\000\000\000\191\000\133\000\000\000\ +\134\000\135\000\030\000\165\002\136\000\000\000\000\000\151\001\ +\138\000\165\002\093\003\171\000\171\000\180\001\000\000\002\002\ +\000\000\000\000\191\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\165\002\165\002\218\001\000\000\ +\218\001\141\000\218\001\003\004\180\001\218\001\000\000\000\000\ +\142\000\093\003\000\000\082\000\000\000\000\000\180\001\014\000\ +\000\000\227\001\000\000\227\001\143\000\144\000\155\002\000\000\ +\082\000\000\000\000\000\000\000\082\000\000\000\015\000\016\000\ +\246\002\000\000\000\000\253\002\000\000\082\000\082\000\082\000\ +\082\000\000\000\000\000\023\000\000\000\246\002\000\000\000\000\ +\000\000\000\000\191\000\191\000\082\000\000\000\191\000\000\000\ +\000\000\191\000\246\002\093\003\246\002\246\002\031\000\000\000\ +\093\003\069\001\000\000\000\000\000\000\000\000\035\000\082\000\ +\227\001\246\002\082\000\000\000\039\000\082\000\082\000\082\000\ +\000\000\000\000\041\000\182\002\082\000\082\000\000\000\000\000\ +\000\000\180\001\000\000\082\000\246\002\180\001\000\000\246\002\ +\000\000\000\000\253\002\000\000\246\002\000\000\000\000\082\000\ +\000\000\082\000\246\002\082\000\082\000\000\000\049\000\000\000\ +\246\002\052\000\253\002\093\003\000\000\180\001\000\000\082\000\ +\000\000\000\000\082\000\000\000\246\002\000\000\082\000\000\000\ +\246\002\174\000\250\001\180\001\182\002\000\000\182\002\182\002\ +\182\002\000\000\182\002\000\000\246\002\182\002\182\002\246\002\ +\000\000\000\000\102\002\000\000\000\000\000\000\000\000\000\000\ +\001\003\000\000\174\000\174\000\174\000\000\000\000\000\227\001\ +\000\000\000\000\174\000\000\000\129\005\000\000\000\000\182\002\ +\093\003\253\002\000\000\000\000\000\000\000\000\182\002\093\003\ +\138\002\000\000\000\000\000\000\000\000\000\000\000\000\250\001\ +\174\000\000\000\182\002\182\002\250\001\129\005\000\000\000\000\ +\174\000\000\000\000\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\133\000\ +\000\000\134\000\135\000\030\000\000\000\136\000\000\000\000\000\ +\137\000\138\000\180\001\000\000\174\000\000\000\000\000\227\001\ +\177\001\000\000\000\000\171\000\171\000\174\000\000\000\000\000\ +\000\000\139\000\000\000\000\000\129\005\000\000\000\000\000\000\ +\000\000\140\000\141\000\000\000\000\000\000\000\174\000\000\000\ +\177\000\142\000\000\000\000\000\171\000\171\000\171\000\000\000\ +\000\000\000\000\191\000\000\000\171\000\143\000\144\000\000\000\ +\000\000\227\001\000\000\206\002\000\000\000\000\180\001\000\000\ +\000\000\180\001\000\000\000\000\000\000\125\002\000\000\000\000\ +\227\001\171\000\171\000\000\000\180\001\000\000\171\000\000\000\ +\227\001\174\000\171\000\155\002\000\000\002\002\000\000\000\000\ +\000\000\000\000\227\001\000\000\000\000\192\001\000\000\000\000\ +\000\000\000\000\155\002\155\002\192\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\171\000\155\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\171\000\ +\000\000\000\000\000\000\175\000\000\000\002\002\000\000\192\000\ +\227\001\227\001\155\002\000\000\000\000\155\002\180\001\000\000\ +\171\000\000\000\155\002\048\003\000\000\227\001\192\000\000\000\ +\155\002\133\002\000\000\180\001\204\000\000\000\155\002\000\000\ +\000\000\000\000\000\000\180\001\227\001\000\000\000\000\000\000\ +\192\000\000\000\227\001\227\001\227\001\227\001\155\002\155\002\ +\000\000\174\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\180\001\180\001\155\002\171\000\000\000\155\002\000\000\000\000\ +\174\000\174\000\000\000\000\000\000\000\000\000\180\001\129\005\ +\000\000\129\005\177\000\177\000\192\000\177\000\192\000\192\000\ +\000\000\180\001\000\000\000\000\000\000\176\000\163\003\177\000\ +\177\000\000\000\000\000\000\000\160\001\000\000\000\000\180\001\ +\000\000\174\000\000\000\000\000\000\000\180\001\180\001\000\000\ +\000\000\161\001\174\000\000\000\250\001\241\001\177\000\177\000\ +\000\000\133\000\000\000\134\000\135\000\030\000\000\000\136\000\ +\000\000\000\000\151\001\138\000\133\000\000\000\134\000\135\000\ +\030\000\152\001\136\000\000\000\000\000\162\001\138\000\159\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\192\001\171\000\141\000\250\001\000\000\000\000\ +\000\000\000\000\000\000\142\000\000\000\175\000\175\000\141\000\ +\175\000\000\000\171\000\171\000\000\000\000\000\142\000\143\000\ +\144\000\000\000\175\000\175\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\143\000\144\000\000\000\000\000\192\000\000\000\ +\162\003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\175\000\251\001\171\000\000\000\000\000\192\000\000\000\ +\000\000\000\000\003\003\000\000\171\000\125\002\171\000\000\000\ +\125\002\000\000\000\000\000\000\000\000\125\002\000\000\000\000\ +\002\002\000\000\125\002\125\002\000\000\000\000\000\000\000\000\ +\125\002\000\000\000\000\146\002\000\000\000\000\000\000\125\002\ +\057\002\125\002\125\002\000\000\000\000\000\000\000\000\176\000\ +\176\000\068\002\176\000\000\000\000\000\197\003\125\002\171\000\ +\000\000\000\000\000\000\000\000\176\000\176\000\000\000\000\000\ +\174\000\133\000\000\000\134\000\135\000\030\000\002\002\136\000\ +\000\000\125\002\137\000\138\000\125\002\000\000\146\002\125\002\ +\125\002\125\002\000\000\176\000\176\000\192\000\000\000\125\002\ +\000\000\133\002\000\000\139\000\125\002\125\002\000\000\000\000\ +\000\000\133\002\000\000\140\000\141\000\000\000\133\002\000\000\ +\000\000\125\002\192\000\142\000\000\000\125\002\125\002\000\000\ +\000\000\174\000\000\000\133\002\000\000\133\002\133\002\143\000\ +\144\000\125\002\000\000\000\000\125\002\000\000\000\000\044\004\ +\000\000\000\000\133\002\000\000\000\000\174\000\000\000\000\000\ +\250\001\000\000\174\000\174\000\174\000\000\000\000\000\000\000\ +\174\000\000\000\000\000\000\000\000\000\133\002\174\000\177\001\ +\133\002\000\000\000\000\133\002\133\002\133\002\000\000\000\000\ +\000\000\000\000\171\000\133\002\000\000\000\000\177\000\177\000\ +\246\002\133\002\192\000\192\000\000\000\174\000\192\000\000\000\ +\000\000\192\000\000\000\000\000\000\000\133\002\000\000\000\000\ +\000\000\133\002\133\002\000\000\000\000\000\000\189\002\177\000\ +\177\000\177\000\000\000\000\000\000\000\133\002\000\000\177\000\ +\133\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\152\001\171\000\159\002\000\000\000\000\000\000\ +\000\000\152\001\000\000\152\001\177\000\177\000\000\000\000\000\ +\000\000\177\000\000\000\159\002\159\002\177\000\000\000\171\000\ +\000\000\000\000\171\000\000\000\171\000\171\000\171\000\068\002\ +\159\002\000\000\171\000\000\000\000\000\000\000\000\000\000\000\ +\171\000\175\000\251\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\177\000\000\000\159\002\000\000\000\000\159\002\000\000\ +\000\000\248\002\025\003\159\002\000\000\000\000\000\000\171\000\ +\000\000\159\002\175\000\175\000\175\000\000\000\248\002\159\002\ +\000\000\000\000\175\000\177\000\000\000\000\000\250\001\000\000\ +\000\000\002\002\000\000\248\002\000\000\248\002\248\002\159\002\ +\159\002\000\000\000\000\000\000\000\000\000\000\000\000\251\001\ +\175\000\000\000\248\002\159\002\251\001\000\000\159\002\000\000\ +\175\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\240\001\193\004\000\000\000\000\248\002\025\003\000\000\ +\000\000\000\000\000\000\176\000\176\000\248\002\000\000\000\000\ +\000\000\000\000\000\000\248\002\175\000\000\000\000\000\000\000\ +\000\000\248\002\000\000\000\000\000\000\175\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\176\000\176\000\176\000\000\000\ +\000\000\248\002\000\000\000\000\176\000\176\000\175\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\248\002\000\000\000\000\ +\248\002\000\000\192\000\000\000\000\000\000\000\000\000\000\000\ +\171\000\176\000\176\000\000\000\000\000\000\000\176\000\000\000\ +\000\000\000\000\176\000\000\000\000\000\000\000\002\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\093\002\175\000\000\000\095\002\000\000\096\002\177\000\097\002\ +\000\000\000\000\000\000\000\000\250\001\000\000\176\000\000\000\ +\246\002\000\000\000\000\246\002\091\000\177\000\177\000\176\000\ +\000\000\000\000\000\000\002\002\000\000\246\002\000\000\000\000\ +\000\000\000\000\000\000\092\000\016\000\132\002\000\000\133\002\ +\176\000\000\000\246\002\000\000\246\002\246\002\000\000\000\000\ +\093\000\000\000\000\000\000\000\000\000\000\000\177\000\148\002\ +\246\002\246\002\152\001\000\000\000\000\000\000\000\000\177\000\ +\000\000\177\000\000\000\031\000\002\002\000\000\000\000\000\000\ +\192\001\000\000\000\000\035\000\246\002\000\000\089\002\246\002\ +\000\000\094\000\000\000\176\000\246\002\000\000\000\000\041\000\ +\000\000\175\000\246\002\000\000\000\000\000\000\000\000\000\000\ +\246\002\000\000\000\000\000\000\000\000\000\000\000\000\095\000\ +\175\000\175\000\177\000\000\000\246\002\000\000\171\000\000\000\ +\246\002\246\002\000\000\096\000\000\000\000\000\052\000\000\000\ +\250\001\000\000\000\000\000\000\246\002\000\000\000\000\246\002\ +\202\002\000\000\203\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\175\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\175\000\000\000\251\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\246\002\000\000\249\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\240\001\000\000\176\000\240\001\000\000\000\000\000\000\ +\000\000\240\001\000\000\000\000\000\000\000\000\240\001\000\000\ +\068\002\000\000\176\000\176\000\240\001\251\001\216\000\216\000\ +\000\000\250\001\000\000\240\001\000\000\240\001\240\001\000\000\ +\000\000\000\000\000\000\000\000\218\005\000\000\000\000\000\000\ +\000\000\240\001\240\001\000\000\000\000\177\000\000\000\000\000\ +\000\000\000\000\171\000\176\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\176\000\240\001\176\000\000\000\ +\240\001\000\000\000\000\240\001\240\001\240\001\000\000\000\000\ +\000\000\000\000\240\001\240\001\000\000\000\000\123\001\124\001\ +\000\000\240\001\000\000\000\000\245\005\000\000\000\000\010\000\ +\000\000\150\001\000\000\000\000\000\000\240\001\177\000\000\000\ +\000\000\240\001\240\001\000\000\000\000\152\001\000\000\176\000\ +\000\000\000\000\055\004\000\000\000\000\240\001\086\003\000\000\ +\240\001\089\003\177\000\000\000\000\000\177\000\133\004\177\000\ +\177\000\177\000\004\001\171\000\000\000\177\000\000\000\000\000\ +\175\000\000\000\000\000\177\000\000\000\000\000\162\003\000\000\ +\133\000\000\000\134\000\135\000\030\000\000\000\136\000\000\000\ +\000\000\137\000\138\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\ +\141\003\000\000\139\000\000\000\000\000\000\000\089\002\000\000\ +\000\000\089\002\140\000\141\000\000\000\000\000\000\000\000\000\ +\000\000\175\000\142\000\089\002\000\000\000\000\162\003\089\002\ +\000\000\000\000\000\000\248\005\147\002\000\000\143\000\144\000\ +\089\002\089\002\089\002\089\002\000\000\175\000\000\000\000\000\ +\251\001\000\000\175\000\175\000\175\000\000\000\000\000\089\002\ +\175\000\000\000\176\000\165\003\000\000\000\000\175\000\133\000\ +\000\000\134\000\135\000\030\000\000\000\136\000\000\000\000\000\ +\137\000\138\000\089\002\000\000\000\000\089\002\000\000\147\002\ +\089\002\089\002\089\002\000\000\000\000\175\000\185\003\089\002\ +\089\002\139\000\000\000\000\000\000\000\000\000\089\002\000\000\ +\000\000\140\000\141\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\142\000\089\002\176\000\089\002\000\000\089\002\089\002\ +\000\000\000\000\000\000\177\000\000\000\143\000\144\000\000\000\ +\000\000\000\000\089\002\000\000\000\000\089\002\000\000\176\000\ +\248\002\089\002\176\000\000\000\176\000\176\000\176\000\000\000\ +\000\000\000\000\176\000\000\000\000\000\248\002\000\000\000\000\ +\176\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\206\004\000\000\000\000\000\000\ +\248\002\000\000\248\002\248\002\248\002\000\000\248\002\176\000\ +\000\000\248\002\248\002\069\002\070\002\071\002\072\002\073\002\ +\074\002\075\002\076\002\077\002\078\002\079\002\080\002\081\002\ +\082\002\083\002\084\002\085\002\086\002\087\002\088\002\089\002\ +\000\000\092\002\000\000\248\002\000\000\000\000\251\001\000\000\ +\000\000\000\000\248\002\000\000\000\000\098\002\000\000\000\000\ +\000\000\000\000\060\004\000\000\000\000\000\000\248\002\248\002\ +\000\000\000\000\115\002\180\000\000\000\000\000\000\000\000\000\ +\000\000\000\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\004\001\004\001\004\001\004\001\004\001\004\001\004\001\ +\004\001\177\000\004\001\004\001\004\001\004\001\004\001\004\001\ +\000\000\000\000\091\004\000\000\000\000\000\000\004\001\004\001\ +\000\000\000\000\004\001\004\001\004\001\004\001\004\001\004\001\ +\004\001\004\001\000\000\004\001\000\000\004\001\000\000\000\000\ +\176\000\000\000\000\000\000\000\000\000\000\000\004\001\004\001\ +\000\000\004\001\121\004\000\000\004\001\004\001\004\001\000\000\ +\004\001\004\001\004\001\004\001\004\001\000\000\000\000\000\000\ +\000\000\000\000\004\001\004\001\004\001\004\001\004\001\004\001\ +\004\001\000\000\000\000\004\001\000\000\004\001\004\001\000\000\ +\004\001\004\001\004\001\004\001\004\001\000\000\004\001\152\004\ +\153\004\004\001\004\001\004\001\251\001\000\000\004\001\000\000\ +\000\000\004\001\000\000\000\000\000\000\004\001\190\002\000\000\ +\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\ +\000\000\000\000\013\000\000\000\000\000\177\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\152\001\000\000\000\000\000\000\ +\000\000\007\003\158\000\000\000\017\000\018\000\009\003\000\000\ +\000\000\000\000\000\000\005\001\000\000\000\000\000\000\010\000\ +\190\004\150\001\000\000\000\000\000\000\000\000\000\000\000\000\ +\024\000\152\001\159\000\160\000\000\000\161\000\162\000\000\000\ +\000\000\030\000\000\000\000\000\204\004\000\000\163\000\164\000\ +\000\000\000\000\000\000\000\000\000\000\165\000\176\000\000\000\ +\000\000\000\000\216\000\216\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\166\000\000\000\000\000\000\000\177\000\000\000\ +\133\000\000\000\134\000\135\000\030\000\000\000\136\000\167\000\ +\251\001\151\001\138\000\046\000\000\000\000\000\000\000\000\000\ +\047\000\000\000\000\000\050\000\168\000\075\003\000\000\000\000\ +\000\000\000\000\081\003\082\003\083\003\000\000\000\000\000\000\ +\000\000\000\000\000\000\141\000\000\000\214\002\000\000\000\000\ +\000\000\000\000\142\000\180\000\180\000\180\000\180\000\000\000\ +\000\000\000\000\000\000\180\000\180\000\180\000\143\000\144\000\ +\180\000\180\000\180\000\180\000\180\000\180\000\180\000\180\000\ +\180\000\000\000\000\000\180\000\180\000\180\000\180\000\180\000\ +\180\000\001\005\000\000\003\005\000\000\000\000\000\000\180\000\ +\180\000\251\001\246\002\180\000\180\000\180\000\180\000\180\000\ +\180\000\180\000\176\000\000\000\180\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\180\000\ +\180\000\000\000\000\000\000\000\000\000\180\000\180\000\180\000\ +\000\000\180\000\000\000\000\000\180\000\180\000\000\000\000\000\ +\000\000\000\000\000\000\180\000\000\000\180\000\000\000\000\000\ +\061\005\180\000\151\003\152\003\153\003\000\000\180\000\180\000\ +\000\000\180\000\180\000\180\000\180\000\000\000\000\000\180\000\ +\000\000\000\000\180\000\000\000\180\000\000\000\000\000\180\000\ +\000\000\000\000\180\000\000\000\000\000\000\000\180\000\000\000\ +\000\000\000\000\000\000\176\000\000\000\000\000\000\000\182\003\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\192\003\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\201\000\ +\000\000\000\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\125\005\ +\005\001\005\001\005\001\005\001\005\001\005\001\005\001\005\001\ +\005\001\005\001\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\005\001\005\001\ +\005\001\005\001\005\001\000\000\005\001\000\000\005\001\000\000\ +\000\000\000\000\019\004\000\000\000\000\000\000\000\000\005\001\ +\005\001\000\000\005\001\000\000\000\000\005\001\005\001\005\001\ +\000\000\005\001\005\001\005\001\005\001\005\001\000\000\164\005\ +\000\000\000\000\000\000\005\001\005\001\005\001\005\001\005\001\ +\005\001\005\001\073\001\074\001\005\001\000\000\005\001\005\001\ +\000\000\005\001\005\001\005\001\005\001\005\001\000\000\005\001\ +\076\001\000\000\005\001\005\001\005\001\000\000\000\000\005\001\ +\000\000\000\000\005\001\000\000\079\001\000\000\005\001\000\000\ +\000\000\197\005\000\000\000\000\000\000\080\001\000\000\000\000\ +\000\000\000\000\000\000\081\001\082\001\083\001\084\001\085\001\ +\210\005\000\000\246\002\000\000\000\000\246\002\000\000\000\000\ +\219\005\000\000\000\000\000\000\000\000\000\000\086\001\246\002\ +\000\000\000\000\221\005\183\000\000\000\246\002\000\000\000\000\ +\087\001\088\001\091\002\114\004\246\002\000\000\246\002\246\002\ +\000\000\000\000\000\000\000\000\090\001\091\001\092\001\093\001\ +\000\000\000\000\246\002\246\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\246\002\246\002\000\000\095\001\000\000\000\000\ +\246\005\247\005\000\000\000\000\000\000\000\000\246\002\000\000\ +\000\000\246\002\000\000\000\000\000\000\003\006\246\002\000\000\ +\246\002\000\000\000\000\000\000\246\002\000\000\000\000\000\000\ +\000\000\000\000\246\002\000\000\013\006\000\000\000\000\000\000\ +\000\000\000\000\015\006\016\006\017\006\018\006\246\002\000\000\ +\000\000\000\000\246\002\246\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\246\002\000\000\ +\000\000\246\002\178\004\179\004\180\004\000\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\201\000\201\000\000\000\000\000\ +\201\000\000\000\000\000\000\000\000\000\000\000\000\000\212\004\ +\213\004\214\004\000\000\201\000\201\000\000\000\201\000\012\001\ +\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\201\000\201\000\201\000\201\000\000\000\000\000\ +\000\000\234\004\201\000\201\000\000\000\201\000\201\000\201\000\ +\201\000\000\000\000\000\201\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\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\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\005\025\005\000\000\000\000\000\000\032\005\ +\033\005\034\005\091\002\091\002\091\002\091\002\000\000\000\000\ +\091\002\091\002\091\002\091\002\091\002\091\002\091\002\091\002\ +\091\002\091\002\091\002\091\002\091\002\091\002\091\002\091\002\ +\091\002\018\001\091\002\091\002\091\002\091\002\091\002\091\002\ +\091\002\091\002\000\000\000\000\000\000\000\000\091\002\091\002\ +\000\000\000\000\091\002\091\002\091\002\091\002\091\002\091\002\ +\091\002\091\002\000\000\091\002\091\002\091\002\000\000\091\002\ +\091\002\091\002\091\002\000\000\000\000\091\002\091\002\091\002\ +\079\002\091\002\091\002\091\002\091\002\091\002\091\002\000\000\ +\091\002\091\002\091\002\091\002\091\002\000\000\000\000\000\000\ +\000\000\000\000\091\002\091\002\091\002\091\002\091\002\091\002\ +\091\002\091\002\000\000\091\002\000\000\091\002\091\002\000\000\ +\091\002\091\002\091\002\091\002\091\002\000\000\091\002\091\002\ +\000\000\091\002\091\002\091\002\091\002\000\000\091\002\091\002\ +\000\000\091\002\000\000\000\000\000\000\091\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\000\000\016\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\012\001\ +\012\001\012\001\012\001\000\000\000\000\012\001\012\001\012\001\ +\012\001\012\001\012\001\012\001\012\001\012\001\012\001\012\001\ +\012\001\012\001\012\001\012\001\012\001\012\001\000\000\012\001\ +\012\001\012\001\012\001\012\001\012\001\012\001\012\001\000\000\ +\175\005\176\005\177\005\012\001\012\001\000\000\000\000\012\001\ +\012\001\012\001\012\001\012\001\012\001\012\001\012\001\000\000\ +\012\001\012\001\012\001\000\000\012\001\012\001\012\001\012\001\ +\000\000\000\000\012\001\012\001\012\001\000\000\012\001\012\001\ +\012\001\012\001\012\001\012\001\000\000\012\001\012\001\012\001\ +\012\001\012\001\000\000\000\000\000\000\000\000\000\000\012\001\ +\012\001\012\001\012\001\012\001\012\001\012\001\012\001\000\000\ +\012\001\000\000\012\001\012\001\000\000\012\001\012\001\012\001\ +\012\001\012\001\024\001\012\001\012\001\000\000\012\001\012\001\ +\012\001\012\001\000\000\012\001\012\001\000\000\012\001\000\000\ +\000\000\000\000\012\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\018\001\018\001\018\001\018\001\000\000\000\000\018\001\ +\018\001\018\001\018\001\018\001\018\001\018\001\018\001\018\001\ +\018\001\018\001\018\001\018\001\018\001\018\001\018\001\018\001\ +\000\000\018\001\018\001\018\001\018\001\018\001\018\001\018\001\ +\018\001\000\000\000\000\000\000\000\000\018\001\018\001\000\000\ +\000\000\018\001\018\001\018\001\018\001\018\001\018\001\018\001\ +\018\001\000\000\018\001\018\001\018\001\000\000\018\001\018\001\ +\018\001\018\001\000\000\000\000\018\001\018\001\018\001\000\000\ +\018\001\018\001\018\001\018\001\018\001\018\001\000\000\018\001\ +\018\001\018\001\018\001\018\001\000\000\000\000\000\000\000\000\ +\000\000\018\001\018\001\018\001\018\001\018\001\018\001\018\001\ +\018\001\000\000\018\001\000\000\018\001\018\001\020\001\018\001\ +\018\001\018\001\018\001\018\001\000\000\018\001\018\001\000\000\ +\018\001\018\001\018\001\018\001\000\000\018\001\018\001\000\000\ +\018\001\000\000\000\000\000\000\018\001\016\001\016\001\016\001\ +\016\001\000\000\000\000\016\001\016\001\016\001\016\001\016\001\ +\016\001\016\001\016\001\016\001\016\001\016\001\016\001\016\001\ +\016\001\016\001\016\001\016\001\000\000\016\001\016\001\016\001\ +\016\001\016\001\016\001\016\001\016\001\000\000\000\000\000\000\ +\000\000\016\001\016\001\000\000\000\000\016\001\016\001\016\001\ +\016\001\016\001\016\001\016\001\016\001\000\000\016\001\016\001\ +\016\001\000\000\016\001\016\001\016\001\016\001\000\000\000\000\ +\016\001\016\001\016\001\000\000\016\001\016\001\016\001\016\001\ +\016\001\016\001\000\000\016\001\016\001\016\001\016\001\016\001\ +\000\000\000\000\000\000\000\000\000\000\016\001\016\001\016\001\ +\016\001\016\001\016\001\016\001\016\001\000\000\016\001\000\000\ +\016\001\016\001\022\001\016\001\016\001\016\001\016\001\016\001\ +\000\000\016\001\016\001\000\000\016\001\016\001\016\001\016\001\ +\000\000\016\001\016\001\000\000\016\001\000\000\000\000\000\000\ +\016\001\000\000\024\001\024\001\024\001\024\001\000\000\000\000\ +\024\001\024\001\024\001\024\001\024\001\024\001\024\001\024\001\ +\024\001\024\001\024\001\024\001\024\001\024\001\024\001\024\001\ +\024\001\000\000\024\001\024\001\024\001\024\001\024\001\024\001\ +\024\001\024\001\000\000\000\000\000\000\000\000\024\001\024\001\ +\000\000\000\000\024\001\024\001\024\001\024\001\024\001\024\001\ +\024\001\024\001\000\000\024\001\024\001\024\001\000\000\024\001\ +\024\001\024\001\024\001\000\000\000\000\024\001\024\001\024\001\ +\000\000\024\001\024\001\024\001\024\001\024\001\024\001\000\000\ +\024\001\024\001\024\001\024\001\024\001\000\000\000\000\000\000\ +\000\000\000\000\024\001\024\001\024\001\024\001\024\001\024\001\ +\024\001\024\001\000\000\024\001\000\000\024\001\024\001\030\001\ +\024\001\024\001\024\001\024\001\024\001\000\000\024\001\024\001\ +\000\000\024\001\024\001\024\001\024\001\000\000\024\001\024\001\ +\000\000\024\001\000\000\000\000\000\000\024\001\020\001\020\001\ +\020\001\020\001\000\000\000\000\020\001\020\001\020\001\020\001\ +\020\001\020\001\020\001\020\001\020\001\020\001\020\001\020\001\ +\020\001\020\001\020\001\020\001\020\001\000\000\020\001\020\001\ +\020\001\020\001\020\001\020\001\020\001\020\001\000\000\000\000\ +\000\000\000\000\020\001\020\001\000\000\000\000\020\001\020\001\ +\020\001\020\001\020\001\020\001\020\001\020\001\000\000\020\001\ +\020\001\020\001\000\000\020\001\020\001\020\001\020\001\000\000\ +\000\000\020\001\020\001\020\001\000\000\020\001\020\001\020\001\ +\020\001\020\001\020\001\000\000\020\001\020\001\020\001\020\001\ +\020\001\000\000\000\000\000\000\000\000\000\000\020\001\020\001\ +\020\001\020\001\020\001\020\001\020\001\020\001\000\000\020\001\ +\000\000\020\001\020\001\026\001\020\001\020\001\020\001\020\001\ +\020\001\000\000\020\001\020\001\000\000\020\001\020\001\020\001\ +\020\001\000\000\020\001\020\001\000\000\020\001\000\000\000\000\ +\000\000\020\001\022\001\022\001\022\001\022\001\000\000\000\000\ +\022\001\022\001\022\001\022\001\022\001\022\001\022\001\022\001\ +\022\001\022\001\022\001\022\001\022\001\022\001\022\001\022\001\ +\022\001\000\000\022\001\022\001\022\001\022\001\022\001\022\001\ +\022\001\022\001\000\000\000\000\000\000\000\000\022\001\022\001\ +\000\000\000\000\022\001\022\001\022\001\022\001\022\001\022\001\ +\022\001\022\001\000\000\022\001\022\001\022\001\000\000\022\001\ +\022\001\022\001\022\001\000\000\000\000\022\001\022\001\022\001\ +\000\000\022\001\022\001\022\001\022\001\022\001\022\001\000\000\ +\022\001\022\001\022\001\022\001\022\001\000\000\000\000\000\000\ +\000\000\000\000\022\001\022\001\022\001\022\001\022\001\022\001\ +\022\001\022\001\000\000\022\001\000\000\022\001\022\001\028\001\ +\022\001\022\001\022\001\022\001\022\001\000\000\022\001\022\001\ +\000\000\022\001\022\001\022\001\022\001\000\000\022\001\022\001\ +\000\000\022\001\000\000\000\000\000\000\022\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\030\001\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\030\001\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\133\002\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\026\001\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\026\001\026\001\026\001\026\001\026\001\026\001\ +\026\001\026\001\000\000\026\001\026\001\026\001\026\001\026\001\ +\026\001\026\001\026\001\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\026\001\000\000\026\001\026\001\026\001\000\000\ +\026\001\026\001\026\001\026\001\000\000\000\000\026\001\026\001\ +\026\001\000\000\026\001\026\001\026\001\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\026\001\026\001\026\001\026\001\ +\026\001\026\001\026\001\000\000\026\001\000\000\026\001\026\001\ +\057\001\026\001\026\001\026\001\026\001\026\001\000\000\026\001\ +\026\001\000\000\026\001\026\001\026\001\026\001\000\000\026\001\ +\026\001\000\000\026\001\000\000\000\000\000\000\026\001\028\001\ +\028\001\028\001\028\001\000\000\000\000\028\001\028\001\028\001\ +\028\001\028\001\028\001\028\001\028\001\028\001\028\001\028\001\ +\028\001\028\001\028\001\028\001\028\001\028\001\000\000\028\001\ +\028\001\028\001\028\001\028\001\028\001\028\001\028\001\000\000\ +\000\000\000\000\000\000\028\001\028\001\000\000\000\000\028\001\ +\028\001\028\001\028\001\028\001\028\001\028\001\028\001\000\000\ +\028\001\028\001\028\001\000\000\028\001\028\001\028\001\028\001\ +\000\000\000\000\028\001\028\001\028\001\000\000\028\001\028\001\ +\028\001\028\001\028\001\028\001\000\000\028\001\028\001\028\001\ +\028\001\028\001\000\000\000\000\000\000\000\000\000\000\028\001\ +\028\001\028\001\028\001\028\001\028\001\028\001\028\001\000\000\ +\028\001\000\000\028\001\028\001\066\001\028\001\028\001\028\001\ +\028\001\028\001\000\000\028\001\028\001\000\000\028\001\028\001\ +\028\001\028\001\000\000\028\001\028\001\000\000\028\001\000\000\ +\000\000\000\000\028\001\000\000\133\002\133\002\133\002\133\002\ +\000\000\000\000\133\002\133\002\133\002\133\002\133\002\133\002\ +\133\002\133\002\133\002\133\002\133\002\133\002\133\002\133\002\ +\133\002\133\002\000\000\000\000\133\002\133\002\133\002\133\002\ +\133\002\133\002\133\002\133\002\000\000\000\000\000\000\000\000\ +\133\002\133\002\000\000\000\000\133\002\133\002\133\002\133\002\ +\133\002\133\002\133\002\133\002\000\000\133\002\133\002\133\002\ +\000\000\133\002\133\002\133\002\133\002\000\000\000\000\133\002\ +\133\002\133\002\000\000\133\002\133\002\133\002\133\002\133\002\ +\133\002\000\000\133\002\133\002\133\002\133\002\133\002\000\000\ +\000\000\000\000\000\000\000\000\133\002\133\002\133\002\133\002\ +\133\002\133\002\133\002\133\002\000\000\133\002\000\000\133\002\ +\133\002\068\001\133\002\133\002\133\002\133\002\133\002\000\000\ +\133\002\133\002\000\000\133\002\133\002\133\002\133\002\000\000\ +\133\002\133\002\000\000\133\002\000\000\000\000\000\000\133\002\ +\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\000\000\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\000\000\ +\000\000\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\000\000\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\071\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\066\001\066\001\066\001\066\001\ +\000\000\000\000\066\001\066\001\066\001\066\001\066\001\066\001\ +\066\001\066\001\066\001\066\001\066\001\066\001\066\001\066\001\ +\066\001\066\001\000\000\000\000\066\001\066\001\066\001\066\001\ +\066\001\066\001\066\001\066\001\000\000\000\000\000\000\000\000\ +\066\001\066\001\000\000\000\000\066\001\066\001\066\001\066\001\ +\066\001\066\001\066\001\000\000\000\000\066\001\066\001\066\001\ +\000\000\066\001\066\001\066\001\066\001\000\000\000\000\066\001\ +\066\001\066\001\000\000\066\001\066\001\066\001\066\001\066\001\ +\066\001\000\000\066\001\066\001\066\001\066\001\066\001\000\000\ +\000\000\000\000\000\000\000\000\066\001\066\001\066\001\066\001\ +\066\001\066\001\066\001\066\001\000\000\066\001\000\000\066\001\ +\066\001\200\000\066\001\066\001\066\001\000\000\000\000\000\000\ +\066\001\066\001\000\000\066\001\066\001\066\001\066\001\000\000\ +\066\001\066\001\000\000\066\001\000\000\000\000\000\000\066\001\ +\000\000\068\001\068\001\068\001\068\001\000\000\000\000\068\001\ +\068\001\068\001\068\001\068\001\068\001\068\001\068\001\068\001\ +\068\001\068\001\068\001\068\001\068\001\068\001\068\001\000\000\ +\000\000\068\001\068\001\068\001\068\001\068\001\068\001\068\001\ +\068\001\000\000\000\000\000\000\000\000\068\001\068\001\000\000\ +\000\000\068\001\068\001\068\001\068\001\068\001\068\001\068\001\ +\000\000\000\000\068\001\068\001\068\001\000\000\068\001\068\001\ +\068\001\068\001\000\000\000\000\068\001\068\001\068\001\000\000\ +\068\001\068\001\068\001\068\001\068\001\068\001\000\000\068\001\ +\068\001\068\001\068\001\068\001\000\000\000\000\000\000\000\000\ +\000\000\068\001\068\001\068\001\068\001\068\001\068\001\068\001\ +\068\001\000\000\068\001\000\000\068\001\068\001\212\000\068\001\ +\068\001\068\001\000\000\000\000\000\000\068\001\068\001\000\000\ +\068\001\068\001\068\001\068\001\000\000\068\001\068\001\000\000\ +\068\001\000\000\000\000\000\000\068\001\071\001\071\001\071\001\ +\071\001\000\000\000\000\071\001\071\001\071\001\071\001\071\001\ +\071\001\071\001\071\001\071\001\071\001\071\001\071\001\071\001\ +\071\001\071\001\071\001\000\000\000\000\071\001\071\001\071\001\ +\071\001\071\001\071\001\071\001\071\001\000\000\000\000\000\000\ +\000\000\071\001\071\001\000\000\000\000\071\001\071\001\071\001\ +\071\001\071\001\071\001\071\001\000\000\000\000\071\001\071\001\ +\071\001\000\000\071\001\071\001\071\001\071\001\000\000\000\000\ +\071\001\071\001\071\001\000\000\071\001\071\001\071\001\071\001\ +\071\001\071\001\000\000\071\001\071\001\071\001\071\001\071\001\ +\000\000\000\000\000\000\000\000\000\000\071\001\071\001\071\001\ +\071\001\071\001\071\001\071\001\071\001\000\000\071\001\000\000\ +\071\001\071\001\213\000\071\001\071\001\071\001\000\000\000\000\ +\000\000\071\001\071\001\000\000\071\001\071\001\071\001\071\001\ +\000\000\071\001\071\001\000\000\071\001\000\000\000\000\000\000\ +\071\001\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\200\000\200\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\200\000\200\000\200\000\200\000\ +\000\000\000\000\000\000\000\000\200\000\200\000\214\000\200\000\ +\200\000\200\000\000\000\000\000\000\000\200\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\000\000\212\000\212\000\ +\212\000\212\000\000\000\000\000\000\000\000\000\212\000\212\000\ +\212\000\000\000\000\000\212\000\212\000\212\000\212\000\212\000\ +\000\000\212\000\212\000\212\000\000\000\000\000\212\000\212\000\ +\212\000\212\000\212\000\212\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\212\000\212\000\000\000\000\000\212\000\212\000\ +\212\000\212\000\212\000\212\000\212\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\000\000\212\000\212\000\000\000\212\000\000\000\000\000\ +\212\000\212\000\212\000\000\000\212\000\212\000\212\000\212\000\ +\212\000\000\000\000\000\000\000\000\000\000\000\212\000\000\000\ +\212\000\212\000\212\000\212\000\212\000\000\000\000\000\000\000\ +\000\000\212\000\212\000\252\000\212\000\212\000\212\000\212\000\ +\000\000\000\000\212\000\000\000\000\000\212\000\000\000\212\000\ +\000\000\000\000\212\000\000\000\000\000\212\000\000\000\000\000\ +\000\000\212\000\213\000\213\000\213\000\213\000\000\000\000\000\ +\000\000\000\000\213\000\213\000\213\000\000\000\000\000\213\000\ +\213\000\213\000\213\000\213\000\213\000\213\000\213\000\213\000\ +\000\000\000\000\213\000\213\000\213\000\213\000\213\000\213\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\213\000\213\000\ +\000\000\000\000\213\000\213\000\213\000\213\000\213\000\213\000\ +\213\000\000\000\000\000\213\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\213\000\213\000\ +\000\000\213\000\000\000\000\000\213\000\213\000\213\000\000\000\ +\213\000\213\000\213\000\213\000\213\000\000\000\000\000\000\000\ +\000\000\000\000\213\000\000\000\213\000\213\000\213\000\213\000\ +\213\000\000\000\000\000\000\000\000\000\213\000\213\000\253\000\ +\213\000\213\000\213\000\000\000\000\000\000\000\213\000\000\000\ +\000\000\213\000\000\000\213\000\000\000\000\000\213\000\000\000\ +\000\000\213\000\000\000\000\000\000\000\213\000\214\000\214\000\ +\214\000\214\000\000\000\000\000\000\000\000\000\214\000\214\000\ +\214\000\000\000\000\000\214\000\214\000\214\000\214\000\214\000\ +\214\000\214\000\214\000\214\000\000\000\000\000\214\000\214\000\ +\214\000\214\000\214\000\214\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\214\000\214\000\000\000\000\000\214\000\214\000\ +\214\000\214\000\214\000\214\000\214\000\000\000\000\000\214\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\214\000\214\000\000\000\214\000\000\000\000\000\ +\214\000\214\000\214\000\000\000\214\000\214\000\214\000\214\000\ +\214\000\000\000\000\000\000\000\000\000\000\000\214\000\000\000\ +\214\000\214\000\214\000\214\000\214\000\000\000\000\000\000\000\ +\000\000\214\000\214\000\223\000\214\000\214\000\214\000\000\000\ +\000\000\000\000\214\000\000\000\000\000\214\000\000\000\214\000\ +\000\000\000\000\214\000\000\000\000\000\214\000\000\000\000\000\ +\000\000\214\000\000\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\252\000\000\000\000\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\ +\224\000\252\000\252\000\252\000\000\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\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\253\000\253\000\000\000\000\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\253\000\253\000\253\000\253\000\000\000\000\000\ +\000\000\000\000\253\000\253\000\231\000\253\000\253\000\253\000\ +\000\000\000\000\000\000\253\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\223\000\223\000\223\000\223\000\000\000\ +\000\000\000\000\000\000\223\000\223\000\223\000\000\000\000\000\ +\223\000\223\000\223\000\223\000\223\000\223\000\223\000\223\000\ +\223\000\000\000\000\000\223\000\223\000\223\000\223\000\223\000\ +\223\000\000\000\000\000\000\000\000\000\000\000\000\000\223\000\ +\223\000\000\000\000\000\223\000\223\000\223\000\223\000\223\000\ +\223\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\000\000\223\000\ +\223\000\000\000\223\000\000\000\000\000\223\000\223\000\223\000\ +\000\000\223\000\223\000\223\000\223\000\223\000\000\000\000\000\ +\000\000\000\000\000\000\223\000\000\000\223\000\223\000\223\000\ +\223\000\223\000\000\000\000\000\000\000\000\000\223\000\223\000\ +\230\000\223\000\223\000\223\000\223\000\000\000\000\000\223\000\ +\000\000\000\000\223\000\000\000\223\000\000\000\000\000\223\000\ +\000\000\000\000\223\000\000\000\000\000\000\000\223\000\000\000\ +\224\000\224\000\224\000\224\000\000\000\000\000\000\000\000\000\ +\224\000\224\000\224\000\000\000\000\000\224\000\224\000\224\000\ +\224\000\224\000\224\000\224\000\224\000\224\000\000\000\000\000\ +\224\000\224\000\224\000\224\000\224\000\224\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\224\000\224\000\000\000\000\000\ +\224\000\224\000\224\000\224\000\224\000\224\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\ +\000\000\000\000\224\000\224\000\224\000\000\000\224\000\224\000\ +\224\000\224\000\224\000\000\000\000\000\000\000\000\000\000\000\ +\224\000\000\000\224\000\224\000\224\000\224\000\224\000\000\000\ +\000\000\000\000\000\000\224\000\224\000\206\000\224\000\224\000\ +\224\000\224\000\000\000\000\000\224\000\000\000\000\000\224\000\ +\000\000\224\000\000\000\000\000\224\000\000\000\000\000\224\000\ +\000\000\000\000\000\000\224\000\231\000\231\000\231\000\231\000\ +\000\000\000\000\000\000\000\000\231\000\231\000\231\000\000\000\ +\000\000\231\000\231\000\231\000\231\000\231\000\231\000\231\000\ +\231\000\231\000\000\000\000\000\231\000\231\000\231\000\231\000\ +\231\000\231\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\231\000\231\000\000\000\000\000\231\000\231\000\231\000\231\000\ +\231\000\231\000\000\000\000\000\000\000\231\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\231\000\231\000\000\000\231\000\000\000\000\000\231\000\231\000\ +\231\000\000\000\231\000\231\000\231\000\231\000\231\000\000\000\ +\000\000\000\000\000\000\000\000\231\000\000\000\231\000\231\000\ +\231\000\231\000\231\000\000\000\000\000\000\000\000\000\231\000\ +\231\000\209\000\231\000\231\000\231\000\231\000\000\000\000\000\ +\231\000\000\000\000\000\231\000\000\000\231\000\000\000\000\000\ +\231\000\000\000\000\000\231\000\000\000\000\000\000\000\231\000\ +\230\000\230\000\230\000\230\000\000\000\000\000\000\000\000\000\ +\230\000\230\000\230\000\000\000\000\000\230\000\230\000\230\000\ +\230\000\230\000\230\000\230\000\230\000\230\000\000\000\000\000\ +\230\000\230\000\230\000\230\000\230\000\230\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\230\000\230\000\000\000\000\000\ +\230\000\230\000\230\000\230\000\230\000\230\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\230\000\230\000\000\000\230\000\ +\000\000\000\000\230\000\230\000\230\000\000\000\230\000\230\000\ +\230\000\230\000\230\000\000\000\000\000\000\000\000\000\000\000\ +\230\000\000\000\230\000\230\000\230\000\230\000\230\000\000\000\ +\000\000\000\000\000\000\230\000\230\000\210\000\230\000\230\000\ +\230\000\230\000\000\000\000\000\230\000\000\000\000\000\230\000\ +\000\000\230\000\000\000\000\000\230\000\000\000\000\000\230\000\ +\000\000\000\000\000\000\230\000\000\000\206\000\206\000\206\000\ +\206\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\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\ +\206\000\206\000\206\000\206\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\206\000\ +\206\000\206\000\000\000\206\000\206\000\206\000\206\000\206\000\ +\000\000\000\000\000\000\000\000\000\000\206\000\000\000\206\000\ +\206\000\206\000\206\000\206\000\000\000\000\000\000\000\000\000\ +\206\000\206\000\222\000\206\000\206\000\206\000\206\000\000\000\ +\000\000\206\000\000\000\000\000\206\000\000\000\206\000\000\000\ +\000\000\206\000\000\000\000\000\206\000\000\000\000\000\000\000\ +\206\000\209\000\209\000\209\000\209\000\000\000\000\000\000\000\ +\000\000\000\000\209\000\209\000\000\000\000\000\209\000\209\000\ +\209\000\209\000\209\000\209\000\209\000\209\000\209\000\000\000\ +\000\000\209\000\209\000\209\000\209\000\209\000\209\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\209\000\209\000\000\000\ +\000\000\209\000\209\000\209\000\209\000\209\000\209\000\209\000\ +\000\000\000\000\209\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\209\000\209\000\000\000\ +\209\000\000\000\000\000\209\000\209\000\209\000\000\000\209\000\ +\209\000\209\000\209\000\209\000\000\000\000\000\000\000\000\000\ +\000\000\209\000\000\000\209\000\209\000\209\000\209\000\209\000\ +\000\000\000\000\000\000\000\000\209\000\209\000\228\000\209\000\ +\209\000\209\000\209\000\000\000\000\000\209\000\000\000\000\000\ +\209\000\000\000\209\000\000\000\000\000\209\000\000\000\000\000\ +\209\000\000\000\000\000\000\000\209\000\210\000\210\000\210\000\ +\210\000\000\000\000\000\000\000\000\000\000\000\210\000\210\000\ +\000\000\000\000\210\000\210\000\210\000\210\000\210\000\210\000\ +\210\000\210\000\210\000\000\000\000\000\210\000\210\000\210\000\ +\210\000\210\000\210\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\210\000\210\000\000\000\000\000\210\000\210\000\210\000\ +\210\000\210\000\210\000\210\000\000\000\000\000\210\000\000\000\ +\000\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\000\000\000\000\210\000\ +\210\000\210\000\000\000\210\000\210\000\210\000\210\000\210\000\ +\000\000\000\000\000\000\000\000\000\000\210\000\000\000\210\000\ +\210\000\210\000\210\000\210\000\000\000\000\000\000\000\000\000\ +\210\000\210\000\229\000\210\000\210\000\210\000\210\000\000\000\ +\000\000\210\000\000\000\000\000\210\000\000\000\210\000\000\000\ +\000\000\210\000\000\000\000\000\210\000\000\000\000\000\000\000\ +\210\000\000\000\222\000\222\000\222\000\222\000\000\000\000\000\ +\000\000\000\000\222\000\222\000\222\000\000\000\000\000\222\000\ +\222\000\222\000\222\000\222\000\222\000\222\000\222\000\222\000\ +\000\000\000\000\222\000\222\000\222\000\222\000\222\000\222\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\222\000\222\000\ +\000\000\000\000\222\000\222\000\222\000\222\000\222\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\000\000\222\000\222\000\ +\000\000\222\000\000\000\000\000\222\000\222\000\222\000\000\000\ +\222\000\222\000\222\000\222\000\222\000\000\000\000\000\000\000\ +\000\000\000\000\222\000\000\000\222\000\000\000\222\000\222\000\ +\222\000\000\000\000\000\000\000\000\000\222\000\222\000\225\000\ +\222\000\222\000\222\000\222\000\000\000\000\000\000\000\000\000\ +\000\000\222\000\000\000\222\000\000\000\000\000\222\000\000\000\ +\000\000\222\000\000\000\000\000\000\000\222\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\000\000\000\000\000\000\000\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\000\000\228\000\228\000\228\000\000\000\000\000\000\000\ +\000\000\228\000\228\000\226\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\ +\000\000\000\000\228\000\000\000\000\000\228\000\000\000\000\000\ +\000\000\228\000\229\000\229\000\229\000\229\000\000\000\000\000\ +\000\000\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\000\000\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\000\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\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\000\000\229\000\000\000\229\000\000\000\229\000\229\000\ +\229\000\000\000\000\000\000\000\000\000\229\000\229\000\227\000\ +\229\000\229\000\229\000\229\000\000\000\000\000\000\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\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\000\000\000\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\000\000\225\000\225\000\225\000\000\000\000\000\ +\000\000\000\000\225\000\225\000\219\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\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\ +\000\000\000\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\000\000\226\000\ +\226\000\226\000\000\000\000\000\000\000\000\000\226\000\226\000\ +\232\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\000\000\000\000\226\000\ +\000\000\000\000\226\000\000\000\000\000\000\000\226\000\227\000\ +\227\000\227\000\227\000\000\000\000\000\000\000\000\000\227\000\ +\227\000\227\000\000\000\000\000\227\000\227\000\227\000\227\000\ +\227\000\227\000\227\000\227\000\227\000\000\000\000\000\227\000\ +\227\000\227\000\227\000\227\000\227\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\227\000\227\000\000\000\000\000\227\000\ +\227\000\227\000\227\000\227\000\000\000\000\000\000\000\000\000\ +\227\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\227\000\227\000\000\000\227\000\000\000\ +\000\000\227\000\227\000\227\000\000\000\227\000\227\000\227\000\ +\227\000\227\000\000\000\000\000\000\000\000\000\000\000\227\000\ +\000\000\227\000\000\000\227\000\227\000\227\000\000\000\000\000\ +\000\000\000\000\227\000\227\000\234\000\227\000\227\000\227\000\ +\227\000\000\000\000\000\000\000\000\000\000\000\227\000\000\000\ +\227\000\000\000\000\000\227\000\000\000\000\000\227\000\010\000\ +\000\000\150\001\227\000\000\000\219\000\219\000\219\000\219\000\ +\000\000\000\000\000\000\000\000\219\000\219\000\219\000\000\000\ +\000\000\219\000\219\000\000\000\219\000\219\000\219\000\219\000\ +\219\000\219\000\000\000\000\000\219\000\219\000\219\000\219\000\ +\219\000\219\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\219\000\219\000\000\000\000\000\219\000\219\000\219\000\219\000\ +\133\000\000\000\134\000\135\000\030\000\219\000\136\000\000\000\ +\000\000\151\001\138\000\000\000\000\000\000\000\000\000\000\000\ +\219\000\219\000\000\000\219\000\000\000\000\000\219\000\219\000\ +\219\000\000\000\219\000\000\000\000\000\219\000\219\000\000\000\ +\000\000\000\000\000\000\141\000\219\000\000\000\219\000\000\000\ +\000\000\000\000\142\000\000\000\000\000\000\000\000\000\219\000\ +\219\000\220\000\219\000\219\000\219\000\219\000\143\000\144\000\ +\000\000\000\000\000\000\219\000\000\000\219\000\000\000\000\000\ +\219\000\000\000\000\000\219\000\000\000\000\000\000\000\219\000\ +\232\000\232\000\232\000\232\000\000\000\000\000\000\000\000\000\ +\232\000\232\000\232\000\000\000\000\000\232\000\232\000\000\000\ +\232\000\232\000\232\000\232\000\232\000\232\000\000\000\000\000\ +\232\000\232\000\232\000\232\000\232\000\232\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\232\000\232\000\000\000\000\000\ +\232\000\232\000\232\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\232\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\232\000\232\000\000\000\232\000\ +\000\000\000\000\000\000\232\000\232\000\000\000\232\000\000\000\ +\000\000\232\000\232\000\000\000\000\000\000\000\000\000\000\000\ +\232\000\000\000\232\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\232\000\232\000\221\000\232\000\232\000\ +\232\000\232\000\000\000\000\000\000\000\000\000\000\000\232\000\ +\000\000\232\000\000\000\000\000\232\000\000\000\000\000\232\000\ +\000\000\000\000\000\000\232\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\000\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\000\000\ +\000\000\000\000\000\000\000\000\000\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\000\000\234\000\ +\234\000\000\000\234\000\000\000\000\000\234\000\234\000\000\000\ +\000\000\000\000\000\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\233\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\000\000\000\000\ +\234\000\000\000\000\000\234\000\000\000\000\000\000\000\234\000\ +\000\000\220\000\220\000\220\000\220\000\000\000\000\000\000\000\ +\000\000\220\000\220\000\220\000\000\000\000\000\220\000\220\000\ +\000\000\220\000\220\000\220\000\220\000\220\000\220\000\000\000\ +\000\000\220\000\220\000\220\000\220\000\220\000\220\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\220\000\220\000\000\000\ +\000\000\220\000\220\000\220\000\000\000\000\000\000\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\000\000\220\000\220\000\000\000\ +\220\000\000\000\000\000\000\000\220\000\220\000\000\000\220\000\ +\000\000\000\000\220\000\220\000\000\000\000\000\000\000\000\000\ +\000\000\220\000\000\000\220\000\000\000\000\000\238\000\000\000\ +\000\000\000\000\000\000\000\000\220\000\220\000\000\000\220\000\ +\220\000\220\000\220\000\000\000\000\000\000\000\000\000\000\000\ +\220\000\000\000\220\000\000\000\000\000\220\000\000\000\000\000\ +\220\000\000\000\000\000\000\000\220\000\221\000\221\000\221\000\ +\221\000\000\000\000\000\000\000\000\000\221\000\221\000\221\000\ +\000\000\000\000\221\000\221\000\000\000\221\000\221\000\221\000\ +\221\000\221\000\221\000\000\000\000\000\221\000\221\000\221\000\ +\221\000\221\000\221\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\221\000\221\000\000\000\000\000\221\000\221\000\221\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\000\000\000\000\ +\000\000\221\000\221\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\237\000\000\000\221\000\000\000\221\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\221\000\000\000\ +\000\000\000\000\000\000\000\000\221\000\000\000\221\000\000\000\ +\000\000\221\000\000\000\000\000\221\000\000\000\000\000\000\000\ +\221\000\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\ +\000\000\233\000\233\000\233\000\233\000\233\000\233\000\000\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\000\000\000\000\000\000\000\000\ +\000\000\000\000\233\000\000\000\000\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\236\000\233\000\233\000\000\000\233\000\ +\000\000\000\000\233\000\233\000\000\000\000\000\000\000\000\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\ +\233\000\233\000\233\000\000\000\000\000\000\000\000\000\000\000\ +\233\000\000\000\233\000\000\000\000\000\233\000\238\000\000\000\ +\233\000\238\000\000\000\000\000\233\000\000\000\238\000\238\000\ +\238\000\000\000\000\000\238\000\238\000\000\000\238\000\238\000\ +\238\000\238\000\238\000\238\000\000\000\000\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\238\000\000\000\000\000\238\000\238\000\ +\156\003\000\000\133\000\000\000\134\000\135\000\030\000\238\000\ +\136\000\000\000\000\000\151\001\138\000\000\000\000\000\000\000\ +\000\000\000\000\238\000\100\001\000\000\238\000\000\000\000\000\ +\000\000\238\000\238\000\000\000\238\000\000\000\000\000\238\000\ +\238\000\000\000\000\000\000\000\000\000\141\000\238\000\000\000\ +\238\000\000\000\000\000\000\000\142\000\000\000\000\000\000\000\ +\000\000\238\000\238\000\000\000\238\000\238\000\238\000\238\000\ +\143\000\144\000\000\000\000\000\000\000\238\000\000\000\238\000\ +\000\000\000\000\238\000\237\000\000\000\238\000\237\000\000\000\ +\000\000\238\000\000\000\237\000\237\000\237\000\000\000\000\000\ +\237\000\237\000\000\000\237\000\237\000\237\000\237\000\237\000\ +\237\000\000\000\000\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\ +\237\000\000\000\000\000\237\000\237\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\237\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\235\000\000\000\000\000\000\000\237\000\ +\000\000\000\000\237\000\000\000\000\000\000\000\237\000\237\000\ +\000\000\237\000\000\000\000\000\237\000\237\000\000\000\000\000\ +\000\000\000\000\000\000\237\000\000\000\237\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\237\000\237\000\237\000\000\000\000\000\000\000\ +\000\000\000\000\237\000\236\000\237\000\000\000\236\000\237\000\ +\000\000\000\000\237\000\236\000\000\000\236\000\237\000\000\000\ +\236\000\236\000\000\000\236\000\236\000\236\000\236\000\236\000\ +\236\000\000\000\000\000\236\000\236\000\236\000\000\000\236\000\ +\236\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\236\000\000\000\000\000\236\000\236\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\236\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\099\001\000\000\000\000\000\000\236\000\ +\000\000\000\000\236\000\000\000\000\000\000\000\236\000\236\000\ +\000\000\236\000\000\000\000\000\236\000\236\000\000\000\000\000\ +\000\000\000\000\000\000\236\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\236\000\236\000\ +\000\000\236\000\236\000\236\000\236\000\000\000\000\000\000\000\ +\000\000\000\000\236\000\100\001\236\000\000\000\100\001\236\000\ +\000\000\000\000\236\000\100\001\000\000\100\001\236\000\000\000\ +\100\001\100\001\000\000\100\001\100\001\100\001\100\001\100\001\ +\100\001\000\000\000\000\100\001\100\001\100\001\000\000\100\001\ +\100\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\100\001\000\000\000\000\100\001\100\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\100\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\100\001\ +\000\000\142\002\100\001\000\000\000\000\000\000\100\001\100\001\ +\000\000\100\001\000\000\000\000\100\001\100\001\000\000\000\000\ +\000\000\000\000\000\000\100\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\100\001\100\001\ +\000\000\100\001\100\001\100\001\100\001\000\000\000\000\000\000\ +\000\000\000\000\100\001\235\000\100\001\000\000\235\000\100\001\ +\000\000\000\000\100\001\235\000\000\000\235\000\100\001\000\000\ +\235\000\235\000\000\000\235\000\235\000\235\000\235\000\235\000\ +\235\000\000\000\000\000\235\000\235\000\235\000\000\000\235\000\ +\235\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\235\000\000\000\000\000\235\000\235\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\235\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\235\000\ +\000\000\239\000\235\000\000\000\000\000\000\000\235\000\235\000\ +\000\000\235\000\000\000\000\000\235\000\235\000\000\000\000\000\ +\000\000\000\000\000\000\235\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\235\000\235\000\ +\000\000\235\000\235\000\235\000\235\000\000\000\000\000\000\000\ +\000\000\000\000\235\000\099\001\235\000\000\000\099\001\235\000\ +\000\000\000\000\235\000\099\001\000\000\099\001\235\000\000\000\ +\099\001\099\001\000\000\099\001\099\001\099\001\099\001\099\001\ +\099\001\000\000\000\000\099\001\099\001\099\001\000\000\099\001\ +\099\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\099\001\000\000\000\000\099\001\099\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\099\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\251\000\000\000\000\000\099\001\ +\000\000\000\000\099\001\000\000\000\000\000\000\099\001\099\001\ +\000\000\099\001\000\000\000\000\099\001\099\001\000\000\000\000\ +\000\000\000\000\000\000\099\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\246\002\000\000\000\000\000\000\099\001\099\001\ +\000\000\099\001\099\001\099\001\099\001\000\000\000\000\000\000\ +\000\000\000\000\099\001\000\000\099\001\000\000\000\000\099\001\ +\000\000\142\002\099\001\142\002\142\002\142\002\099\001\000\000\ +\000\000\142\002\000\000\000\000\000\000\000\000\142\002\000\000\ +\000\000\000\000\142\002\142\002\142\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\142\002\142\002\142\002\142\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\142\002\000\000\000\000\ +\000\000\000\000\142\002\000\000\000\000\000\000\000\000\242\000\ +\000\000\142\002\142\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\142\002\000\000\000\000\ +\142\002\142\002\000\000\142\002\142\002\142\002\000\000\142\002\ +\000\000\000\000\142\002\142\002\000\000\000\000\000\000\000\000\ +\000\000\142\002\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\142\002\142\002\000\000\142\002\ +\142\002\142\002\142\002\000\000\000\000\142\002\000\000\000\000\ +\000\000\239\000\000\000\000\000\239\000\142\002\142\002\000\000\ +\142\002\239\000\000\000\239\000\142\002\000\000\239\000\239\000\ +\000\000\000\000\239\000\000\000\239\000\239\000\239\000\000\000\ +\000\000\239\000\239\000\239\000\000\000\239\000\239\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\239\000\000\000\ +\000\000\239\000\239\000\000\000\000\000\000\000\000\000\215\000\ +\000\000\000\000\239\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\239\000\000\000\000\000\ +\239\000\000\000\000\000\000\000\239\000\239\000\000\000\239\000\ +\000\000\000\000\239\000\239\000\000\000\103\000\000\000\000\000\ +\000\000\239\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\239\000\239\000\000\000\239\000\ +\239\000\239\000\239\000\000\000\251\000\000\000\000\000\251\000\ +\239\000\000\000\239\000\000\000\251\000\239\000\251\000\000\000\ +\239\000\251\000\251\000\000\000\239\000\251\000\000\000\251\000\ +\251\000\251\000\000\000\000\000\251\000\251\000\251\000\000\000\ +\251\000\251\000\246\002\000\000\000\000\246\002\000\000\000\000\ +\000\000\251\000\000\000\000\000\251\000\251\000\000\000\246\002\ +\000\000\000\000\244\000\000\000\000\000\251\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\246\002\000\000\246\002\246\002\ +\251\000\000\000\000\000\251\000\000\000\000\000\000\000\251\000\ +\251\000\000\000\251\000\246\002\000\000\251\000\251\000\000\000\ +\246\002\000\000\000\000\000\000\251\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\246\002\251\000\ +\251\000\000\000\251\000\251\000\251\000\251\000\246\002\242\000\ +\000\000\000\000\242\000\251\000\246\002\251\000\000\000\242\000\ +\251\000\242\000\246\002\251\000\242\000\242\000\000\000\251\000\ +\242\000\000\000\242\000\242\000\242\000\000\000\246\002\242\000\ +\242\000\242\000\246\002\242\000\242\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\242\000\000\000\246\002\242\000\ +\242\000\246\002\000\000\000\000\000\000\243\000\000\000\000\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\000\000\000\000\242\000\000\000\ +\000\000\000\000\242\000\242\000\000\000\242\000\000\000\000\000\ +\242\000\242\000\000\000\000\000\000\000\000\000\000\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\242\000\242\000\ +\242\000\000\000\000\000\000\000\000\000\000\000\242\000\215\000\ +\242\000\000\000\215\000\242\000\000\000\000\000\242\000\215\000\ +\000\000\215\000\242\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\103\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\103\000\000\000\000\000\247\000\000\000\000\000\ +\215\000\000\000\000\000\000\000\000\000\000\000\000\000\103\000\ +\000\000\103\000\103\000\215\000\000\000\000\000\215\000\000\000\ +\000\000\000\000\215\000\215\000\000\000\215\000\103\000\000\000\ +\215\000\215\000\000\000\098\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\103\000\215\000\215\000\000\000\215\000\215\000\215\000\ +\215\000\103\000\244\000\000\000\000\000\244\000\215\000\103\000\ +\215\000\000\000\244\000\215\000\244\000\103\000\215\000\244\000\ +\244\000\000\000\215\000\244\000\000\000\244\000\244\000\244\000\ +\000\000\103\000\244\000\244\000\244\000\103\000\244\000\244\000\ +\246\002\000\000\000\000\000\000\000\000\000\000\000\000\244\000\ +\000\000\103\000\244\000\244\000\103\000\246\002\000\000\000\000\ +\245\000\000\000\000\000\244\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\246\002\000\000\246\002\246\002\244\000\000\000\ +\000\000\244\000\000\000\000\000\000\000\244\000\244\000\000\000\ +\244\000\246\002\000\000\244\000\244\000\000\000\102\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\246\002\244\000\244\000\000\000\ +\244\000\244\000\244\000\244\000\246\002\243\000\000\000\000\000\ +\243\000\244\000\246\002\244\000\000\000\243\000\244\000\243\000\ +\246\002\244\000\243\000\243\000\000\000\244\000\243\000\000\000\ +\243\000\243\000\243\000\000\000\246\002\243\000\243\000\243\000\ +\246\002\243\000\243\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\243\000\000\000\246\002\243\000\243\000\246\002\ +\000\000\000\000\000\000\246\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\243\000\000\000\000\000\243\000\000\000\000\000\000\000\ +\243\000\243\000\000\000\243\000\000\000\000\000\243\000\243\000\ +\000\000\000\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\000\000\ +\243\000\243\000\000\000\243\000\243\000\243\000\243\000\000\000\ +\000\000\000\000\000\000\000\000\243\000\247\000\243\000\000\000\ +\247\000\243\000\000\000\000\000\243\000\247\000\000\000\247\000\ +\243\000\000\000\247\000\247\000\000\000\000\000\247\000\000\000\ +\247\000\247\000\247\000\000\000\000\000\247\000\247\000\247\000\ +\000\000\247\000\247\000\098\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\247\000\000\000\000\000\247\000\247\000\000\000\ +\098\000\000\000\000\000\250\000\000\000\000\000\247\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\098\000\000\000\098\000\ +\098\000\247\000\000\000\000\000\247\000\000\000\000\000\000\000\ +\247\000\247\000\000\000\247\000\098\000\000\000\247\000\247\000\ +\000\000\000\000\000\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\098\000\ +\247\000\247\000\000\000\247\000\247\000\247\000\247\000\098\000\ +\245\000\000\000\000\000\245\000\247\000\098\000\247\000\000\000\ +\245\000\247\000\245\000\098\000\247\000\245\000\245\000\000\000\ +\247\000\245\000\000\000\245\000\245\000\245\000\000\000\098\000\ +\245\000\245\000\245\000\098\000\245\000\245\000\102\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\245\000\000\000\098\000\ +\245\000\245\000\098\000\102\000\000\000\000\000\248\000\000\000\ +\000\000\245\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\102\000\000\000\102\000\102\000\245\000\000\000\000\000\245\000\ +\000\000\000\000\000\000\245\000\245\000\000\000\245\000\102\000\ +\000\000\245\000\245\000\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\102\000\245\000\245\000\000\000\245\000\245\000\ +\245\000\245\000\102\000\246\000\000\000\000\000\246\000\245\000\ +\102\000\245\000\000\000\246\000\245\000\246\000\102\000\245\000\ +\246\000\246\000\000\000\245\000\246\000\000\000\246\000\246\000\ +\246\000\000\000\102\000\246\000\246\000\246\000\102\000\246\000\ +\246\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\246\000\000\000\102\000\246\000\246\000\102\000\000\000\000\000\ +\000\000\249\000\000\000\000\000\246\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\246\000\ +\000\000\000\000\246\000\000\000\000\000\000\000\246\000\246\000\ +\000\000\246\000\000\000\000\000\246\000\246\000\000\000\000\000\ +\000\000\000\000\000\000\246\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\246\000\246\000\ +\000\000\246\000\246\000\246\000\246\000\000\000\000\000\000\000\ +\000\000\000\000\246\000\250\000\246\000\000\000\250\000\246\000\ +\000\000\000\000\246\000\250\000\000\000\250\000\246\000\000\000\ +\250\000\250\000\000\000\000\000\250\000\000\000\250\000\250\000\ +\250\000\000\000\000\000\250\000\250\000\250\000\000\000\250\000\ +\250\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\250\000\000\000\000\000\250\000\250\000\000\000\000\000\000\000\ +\000\000\179\000\000\000\000\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\ +\000\000\000\000\250\000\000\000\000\000\000\000\250\000\250\000\ +\000\000\250\000\000\000\000\000\250\000\250\000\000\000\000\000\ +\000\000\000\000\000\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\250\000\250\000\250\000\000\000\248\000\000\000\ +\000\000\248\000\250\000\000\000\250\000\000\000\248\000\250\000\ +\248\000\000\000\250\000\248\000\248\000\000\000\250\000\248\000\ +\000\000\248\000\248\000\248\000\000\000\000\000\248\000\248\000\ +\248\000\000\000\248\000\248\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\248\000\000\000\000\000\248\000\248\000\ +\000\000\000\000\000\000\000\000\216\000\000\000\000\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\000\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\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\248\000\248\000\248\000\ +\000\000\249\000\000\000\000\000\249\000\248\000\000\000\248\000\ +\000\000\249\000\248\000\249\000\000\000\248\000\249\000\249\000\ +\000\000\248\000\249\000\000\000\249\000\249\000\249\000\000\000\ +\000\000\249\000\249\000\249\000\000\000\249\000\249\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\249\000\000\000\ +\000\000\249\000\249\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\249\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\029\002\000\000\000\000\249\000\000\000\000\000\ +\249\000\000\000\000\000\000\000\249\000\249\000\000\000\249\000\ +\000\000\000\000\249\000\249\000\000\000\000\000\000\000\000\000\ +\000\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\ +\249\000\249\000\249\000\000\000\000\000\000\000\000\000\000\000\ +\249\000\179\000\249\000\000\000\179\000\249\000\000\000\000\000\ +\249\000\179\000\000\000\179\000\249\000\000\000\179\000\179\000\ +\000\000\000\000\179\000\000\000\179\000\179\000\179\000\000\000\ +\000\000\179\000\179\000\179\000\000\000\179\000\179\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\179\000\000\000\ +\000\000\179\000\179\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\179\000\000\000\000\000\030\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\179\000\000\000\000\000\ +\179\000\000\000\000\000\000\000\179\000\179\000\000\000\179\000\ +\000\000\000\000\179\000\179\000\000\000\000\000\000\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\179\000\179\000\000\000\216\000\000\000\000\000\216\000\ +\179\000\000\000\179\000\000\000\216\000\179\000\216\000\000\000\ +\179\000\216\000\216\000\000\000\179\000\216\000\000\000\216\000\ +\216\000\216\000\000\000\000\000\216\000\000\000\216\000\000\000\ +\216\000\216\000\000\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\000\000\ +\000\000\000\000\000\000\000\000\000\000\216\000\000\000\000\000\ +\063\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\216\000\000\000\000\000\216\000\000\000\000\000\000\000\216\000\ +\216\000\000\000\216\000\000\000\000\000\216\000\216\000\000\000\ +\000\000\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\000\000\216\000\ +\216\000\000\000\216\000\216\000\216\000\216\000\000\000\000\000\ +\000\000\000\000\000\000\216\000\000\000\216\000\000\000\000\000\ +\216\000\000\000\029\002\216\000\029\002\029\002\029\002\216\000\ +\000\000\000\000\029\002\000\000\000\000\000\000\000\000\029\002\ +\000\000\000\000\000\000\029\002\029\002\029\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\029\002\029\002\029\002\029\002\ +\000\000\000\000\006\005\000\000\000\000\000\000\029\002\000\000\ +\000\000\000\000\029\002\029\002\000\000\064\002\000\000\000\000\ +\000\000\098\005\029\002\029\002\000\000\000\000\000\000\000\000\ +\234\001\000\000\000\000\000\000\000\000\000\000\029\002\000\000\ +\000\000\029\002\000\000\000\000\029\002\029\002\029\002\000\000\ +\029\002\000\000\000\000\029\002\029\002\000\000\000\000\000\000\ +\000\000\008\005\029\002\134\000\135\000\030\000\000\000\136\000\ +\000\000\000\000\137\000\009\005\000\000\029\002\029\002\000\000\ +\029\002\029\002\029\002\000\000\000\000\030\002\029\002\030\002\ +\030\002\030\002\000\000\139\000\000\000\030\002\029\002\000\000\ +\000\000\029\002\030\002\140\000\141\000\029\002\030\002\030\002\ +\030\002\000\000\000\000\142\000\000\000\000\000\000\000\030\002\ +\030\002\030\002\030\002\000\000\237\001\000\000\000\000\011\005\ +\144\000\030\002\000\000\000\000\000\000\030\002\030\002\000\000\ +\028\002\000\000\000\000\000\000\000\000\030\002\030\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\030\002\000\000\000\000\030\002\000\000\000\000\030\002\ +\030\002\030\002\000\000\030\002\000\000\000\000\030\002\030\002\ +\000\000\000\000\000\000\000\000\133\000\030\002\134\000\135\000\ +\030\000\000\000\136\000\000\000\000\000\137\000\138\000\000\000\ +\030\002\030\002\000\000\030\002\030\002\030\002\000\000\170\001\ +\063\002\030\002\063\002\063\002\063\002\000\000\139\000\000\000\ +\063\002\030\002\000\000\000\000\030\002\063\002\140\000\141\000\ +\030\002\063\002\063\002\063\002\000\000\000\000\142\000\000\000\ +\000\000\000\000\063\002\063\002\063\002\063\002\000\000\000\000\ +\000\000\000\000\143\000\144\000\063\002\000\000\000\000\000\000\ +\000\000\063\002\000\000\026\002\000\000\000\000\000\000\000\000\ +\063\002\063\002\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\063\002\000\000\000\000\063\002\ +\000\000\000\000\063\002\063\002\063\002\000\000\063\002\000\000\ +\000\000\063\002\063\002\000\000\000\000\000\000\000\000\000\000\ +\063\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\063\002\063\002\000\000\063\002\063\002\ +\063\002\063\002\000\000\000\000\000\000\064\002\000\000\064\002\ +\064\002\064\002\000\000\000\000\063\002\064\002\000\000\063\002\ +\000\000\000\000\064\002\063\002\000\000\000\000\064\002\064\002\ +\064\002\000\000\000\000\000\000\000\000\000\000\000\000\064\002\ +\064\002\064\002\064\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\064\002\000\000\000\000\000\000\000\000\064\002\000\000\ +\027\002\000\000\000\000\000\000\000\000\064\002\064\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\064\002\000\000\000\000\064\002\000\000\000\000\064\002\ +\064\002\064\002\000\000\064\002\000\000\000\000\064\002\064\002\ +\000\000\000\000\000\000\000\000\133\000\064\002\134\000\135\000\ +\030\000\000\000\136\000\000\000\000\000\137\000\138\000\000\000\ +\064\002\064\002\000\000\064\002\064\002\064\002\064\002\000\000\ +\028\002\000\000\028\002\028\002\028\002\000\000\139\000\000\000\ +\028\002\064\002\000\000\000\000\064\002\028\002\140\000\113\003\ +\064\002\028\002\028\002\028\002\000\000\000\000\142\000\000\000\ +\000\000\000\000\028\002\028\002\028\002\028\002\000\000\000\000\ +\000\000\235\005\143\000\144\000\028\002\000\000\000\000\000\000\ +\000\000\028\002\000\000\025\002\000\000\000\000\000\000\000\000\ +\028\002\028\002\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\028\002\000\000\000\000\028\002\ +\000\000\000\000\028\002\028\002\028\002\000\000\028\002\000\000\ +\000\000\000\000\028\002\000\000\000\000\000\000\000\000\133\000\ +\028\002\134\000\135\000\030\000\000\000\136\000\000\000\000\000\ +\137\000\138\000\000\000\028\002\028\002\000\000\028\002\028\002\ +\028\002\028\002\000\000\026\002\000\000\026\002\026\002\026\002\ +\000\000\139\000\000\000\026\002\028\002\000\000\000\000\028\002\ +\026\002\140\000\141\000\028\002\026\002\026\002\026\002\000\000\ +\000\000\142\000\000\000\000\000\000\000\026\002\026\002\026\002\ +\026\002\000\000\000\000\000\000\000\000\143\000\144\000\026\002\ +\000\000\000\000\000\000\000\000\026\002\000\000\022\002\000\000\ +\000\000\000\000\000\000\026\002\026\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\026\002\ +\000\000\000\000\026\002\000\000\000\000\026\002\026\002\026\002\ +\000\000\026\002\000\000\000\000\000\000\026\002\000\000\000\000\ +\000\000\000\000\000\000\026\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\026\002\026\002\ +\000\000\026\002\026\002\026\002\026\002\000\000\000\000\000\000\ +\027\002\032\000\027\002\027\002\027\002\000\000\000\000\026\002\ +\027\002\000\000\026\002\000\000\000\000\027\002\026\002\000\000\ +\000\000\027\002\027\002\027\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\027\002\027\002\027\002\027\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\027\002\000\000\000\000\000\000\ +\000\000\027\002\000\000\000\000\000\000\000\000\000\000\000\000\ +\027\002\027\002\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\011\002\027\002\000\000\000\000\027\002\ +\000\000\000\000\027\002\027\002\027\002\000\000\027\002\000\000\ +\000\000\000\000\027\002\000\000\000\000\000\000\000\000\000\000\ +\027\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\027\002\027\002\000\000\027\002\027\002\ +\027\002\027\002\000\000\025\002\000\000\025\002\025\002\025\002\ +\000\000\000\000\000\000\025\002\027\002\000\000\000\000\027\002\ +\025\002\000\000\000\000\027\002\025\002\025\002\025\002\000\000\ +\000\000\010\002\000\000\000\000\000\000\025\002\025\002\025\002\ +\025\002\000\000\000\000\000\000\000\000\000\000\000\000\025\002\ +\000\000\000\000\000\000\000\000\025\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\025\002\025\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\025\002\ +\000\000\000\000\025\002\000\000\000\000\025\002\025\002\025\002\ +\000\000\025\002\000\000\000\000\000\000\025\002\000\000\000\000\ +\000\000\000\000\000\000\025\002\008\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\025\002\025\002\ +\000\000\025\002\025\002\025\002\025\002\000\000\022\002\000\000\ +\022\002\022\002\000\000\000\000\000\000\000\000\022\002\025\002\ +\000\000\000\000\025\002\022\002\000\000\000\000\025\002\022\002\ +\022\002\022\002\000\000\000\000\000\000\000\000\000\000\000\000\ +\022\002\022\002\022\002\022\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\022\002\000\000\000\000\000\000\169\000\022\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\022\002\022\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\032\000\022\002\000\000\032\000\022\002\000\000\000\000\ +\022\002\022\002\022\002\000\000\022\002\000\000\032\000\032\000\ +\022\002\000\000\032\000\000\000\000\000\000\000\022\002\000\000\ +\000\000\000\000\000\000\032\000\032\000\032\000\032\000\083\000\ +\000\000\022\002\022\002\000\000\022\002\022\002\022\002\022\002\ +\000\000\032\000\032\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\022\002\000\000\000\000\022\002\000\000\000\000\ +\000\000\022\002\000\000\011\002\000\000\032\000\011\002\000\000\ +\032\000\000\000\000\000\000\000\032\000\032\000\000\000\000\000\ +\011\002\000\000\032\000\032\000\011\002\000\000\000\000\000\000\ +\000\000\032\000\000\000\000\000\000\000\011\002\011\002\011\002\ +\011\002\000\000\000\000\000\000\000\000\032\000\000\000\032\000\ +\000\000\032\000\032\000\000\000\011\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\032\000\000\000\000\000\ +\032\000\000\000\000\000\000\000\032\000\000\000\000\000\011\002\ +\000\000\010\002\011\002\000\000\010\002\011\002\011\002\011\002\ +\000\000\000\000\000\000\000\000\011\002\011\002\010\002\000\000\ +\000\000\000\000\010\002\011\002\000\000\000\000\000\000\000\000\ +\248\002\000\000\000\000\010\002\010\002\010\002\010\002\011\002\ +\000\000\011\002\000\000\011\002\011\002\000\000\000\000\000\000\ +\000\000\000\000\010\002\000\000\000\000\000\000\000\000\011\002\ +\000\000\000\000\011\002\000\000\000\000\000\000\011\002\000\000\ +\000\000\000\000\000\000\000\000\008\002\010\002\000\000\008\002\ +\010\002\000\000\000\000\010\002\010\002\010\002\000\000\000\000\ +\000\000\008\002\010\002\010\002\000\000\008\002\000\000\000\000\ +\000\000\010\002\000\000\000\000\000\000\000\000\008\002\008\002\ +\008\002\008\002\000\000\000\000\000\000\010\002\000\000\010\002\ +\000\000\010\002\010\002\000\000\000\000\008\002\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\010\002\000\000\000\000\ +\010\002\000\000\000\000\000\000\010\002\000\000\169\000\000\000\ +\008\002\169\000\000\000\008\002\000\000\000\000\008\002\008\002\ +\008\002\000\000\000\000\169\000\000\000\008\002\008\002\169\000\ +\125\000\169\000\000\000\000\000\008\002\000\000\000\000\000\000\ +\169\000\169\000\169\000\169\000\000\000\000\000\000\000\000\000\ +\008\002\000\000\008\002\000\000\008\002\008\002\000\000\169\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\083\000\ +\008\002\000\000\083\000\008\002\000\000\000\000\000\000\008\002\ +\000\000\000\000\169\000\000\000\083\000\169\000\000\000\000\000\ +\083\000\169\000\169\000\000\000\000\000\000\000\000\000\169\000\ +\169\000\083\000\083\000\083\000\083\000\000\000\169\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\083\000\000\000\169\000\000\000\169\000\000\000\169\000\169\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\117\000\ +\000\000\000\000\169\000\083\000\000\000\169\000\083\000\000\000\ +\000\000\169\000\083\000\083\000\000\000\000\000\000\000\000\000\ +\083\000\083\000\037\005\000\000\134\000\135\000\030\000\083\000\ +\136\000\000\000\038\005\039\005\138\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\083\000\000\000\083\000\000\000\083\000\ +\083\000\040\005\000\000\000\000\041\005\000\000\000\000\000\000\ +\000\000\000\000\000\000\083\000\042\005\141\000\083\000\000\000\ +\248\002\000\000\083\000\248\002\142\000\248\002\248\002\248\002\ +\248\002\000\000\000\000\248\002\248\002\248\002\000\000\000\000\ +\143\000\144\000\000\000\248\002\000\000\000\000\000\000\248\002\ +\000\000\000\000\248\002\000\000\248\002\248\002\248\002\248\002\ +\248\002\248\002\248\002\248\002\248\002\000\000\000\000\248\002\ +\248\002\248\002\000\000\000\000\000\000\000\000\000\000\000\000\ +\248\002\248\002\248\002\248\002\248\002\248\002\248\002\248\002\ +\248\002\248\002\248\002\248\002\248\002\248\002\143\001\248\002\ +\248\002\248\002\000\000\248\002\248\002\248\002\248\002\248\002\ +\248\002\000\000\248\002\248\002\000\000\248\002\248\002\000\000\ +\248\002\248\002\000\000\000\000\248\002\248\002\000\000\248\002\ +\248\002\248\002\248\002\248\002\248\002\248\002\000\000\248\002\ +\248\002\248\002\000\000\248\002\000\000\248\002\248\002\000\000\ +\248\002\000\000\248\002\248\002\248\002\248\002\248\002\248\002\ +\248\002\000\000\248\002\000\000\000\000\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\133\002\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\000\000\000\000\040\000\000\000\ +\041\000\143\000\000\000\000\000\042\000\043\000\000\000\044\000\ +\000\000\000\000\000\000\000\000\009\000\010\000\011\000\000\000\ +\126\000\118\000\012\000\013\000\014\000\046\000\000\000\000\000\ +\000\000\000\000\047\000\048\000\049\000\050\000\051\000\052\000\ +\000\000\000\000\053\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\000\000\000\000\040\000\000\000\041\000\ +\000\000\000\000\147\001\042\000\043\000\133\000\044\000\134\000\ +\135\000\030\000\000\000\136\000\000\000\000\000\137\000\138\000\ +\118\000\000\000\000\000\000\000\046\000\000\000\000\000\000\000\ +\000\000\047\000\048\000\049\000\050\000\051\000\052\000\139\000\ +\000\000\053\000\000\000\000\000\000\000\000\000\000\000\140\000\ +\113\003\000\000\000\000\009\000\010\000\011\000\000\000\142\000\ +\000\000\012\000\013\000\014\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\015\000\016\000\017\000\018\000\019\000\020\000\ +\021\000\000\000\000\000\000\000\239\001\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\000\000\000\000\040\000\000\000\041\000\000\000\ +\000\000\000\000\042\000\043\000\000\000\044\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\153\000\118\000\ +\000\000\000\000\000\000\046\000\000\000\000\000\000\000\000\000\ +\047\000\048\000\049\000\050\000\051\000\052\000\133\002\000\000\ +\053\000\000\000\133\002\000\000\133\002\000\000\133\002\000\000\ +\133\002\000\000\133\002\000\000\133\002\133\002\000\000\133\002\ +\133\002\143\000\000\000\000\000\143\000\000\000\000\000\000\000\ +\000\000\133\002\133\002\000\000\133\002\133\002\143\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\152\002\000\000\000\000\143\000\000\000\143\000\143\000\000\000\ +\133\002\133\002\133\002\133\002\000\000\133\002\133\002\000\000\ +\000\000\133\002\143\000\000\000\000\000\000\000\133\002\133\002\ +\133\002\000\000\000\000\000\000\000\000\133\002\000\000\133\002\ +\000\000\000\000\000\000\000\000\000\000\143\000\000\000\133\002\ +\000\000\000\000\133\002\000\000\143\000\143\000\000\000\133\002\ +\000\000\133\002\133\002\143\000\133\002\133\002\000\000\133\002\ +\000\000\143\000\081\000\133\002\000\000\000\000\133\002\000\000\ +\133\002\000\000\147\001\133\002\133\002\143\000\147\001\133\002\ +\147\001\143\000\147\001\000\000\147\001\000\000\147\001\000\000\ +\147\001\147\001\000\000\147\001\147\001\143\000\000\000\000\000\ +\143\000\000\000\000\000\000\000\000\000\147\001\000\000\000\000\ +\147\001\147\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\147\001\147\001\000\000\147\001\ +\236\001\147\001\147\001\000\000\000\000\147\001\000\000\000\000\ +\000\000\000\000\147\001\147\001\147\001\000\000\000\000\000\000\ +\000\000\147\001\000\000\147\001\239\001\000\000\000\000\239\001\ +\000\000\000\000\000\000\147\001\239\001\000\000\147\001\000\000\ +\000\000\239\001\000\000\147\001\000\000\147\001\147\001\239\001\ +\147\001\147\001\000\000\147\001\000\000\000\000\239\001\147\001\ +\239\001\239\001\147\001\000\000\147\001\000\000\000\000\147\001\ +\147\001\000\000\080\000\147\001\239\001\239\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\153\000\000\000\ +\239\001\153\000\000\000\239\001\000\000\000\000\239\001\239\001\ +\239\001\000\000\000\000\153\000\000\000\067\002\239\001\000\000\ +\000\000\000\000\000\000\058\002\239\001\058\002\058\002\058\002\ +\153\000\058\002\153\000\153\000\058\002\058\002\000\000\000\000\ +\239\001\000\000\000\000\000\000\239\001\239\001\000\000\153\000\ +\067\002\000\000\000\000\000\000\000\000\058\002\000\000\000\000\ +\239\001\000\000\154\000\239\001\000\000\058\002\058\002\000\000\ +\152\002\000\000\153\000\152\002\000\000\058\002\049\002\000\000\ +\153\000\153\000\153\000\000\000\000\000\152\002\000\000\049\002\ +\153\000\058\002\058\002\000\000\000\000\000\000\153\000\000\000\ +\000\000\000\000\152\002\000\000\152\002\152\002\000\000\000\000\ +\000\000\000\000\153\000\000\000\000\000\000\000\153\000\049\002\ +\000\000\152\002\049\002\000\000\000\000\000\000\000\000\201\001\ +\000\000\000\000\153\000\049\002\000\000\153\000\000\000\000\000\ +\000\000\000\000\081\000\000\000\152\002\081\000\000\000\000\000\ +\143\002\000\000\152\002\152\002\152\002\000\000\000\000\081\000\ +\000\000\143\002\152\002\081\000\000\000\000\000\000\000\000\000\ +\152\002\000\000\000\000\000\000\081\000\081\000\081\000\081\000\ +\000\000\000\000\000\000\000\000\152\002\000\000\000\000\000\000\ +\152\002\143\002\000\000\081\000\143\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\152\002\143\002\000\000\152\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\081\000\000\000\ +\236\001\081\000\248\002\236\001\000\000\081\000\081\000\000\000\ +\236\001\000\000\000\000\000\000\081\000\236\001\000\000\000\000\ +\000\000\000\000\081\000\236\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\236\001\000\000\236\001\236\001\081\000\000\000\ +\081\000\000\000\081\000\081\000\000\000\000\000\000\000\000\000\ +\000\000\236\001\000\000\000\000\000\000\000\000\081\000\000\000\ +\000\000\081\000\000\000\000\000\000\000\000\000\000\000\201\001\ +\000\000\000\000\080\000\000\000\236\001\080\000\000\000\236\001\ +\070\000\000\000\236\001\236\001\236\001\000\000\000\000\080\000\ +\000\000\000\000\236\001\080\000\000\000\000\000\000\000\000\000\ +\236\001\000\000\000\000\000\000\080\000\080\000\080\000\080\000\ +\000\000\000\000\000\000\000\000\236\001\000\000\000\000\000\000\ +\236\001\236\001\000\000\080\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\000\000\000\000\202\001\080\000\000\000\ +\000\000\080\000\000\000\000\000\000\000\080\000\080\000\000\000\ +\000\000\000\000\154\000\000\000\080\000\154\000\000\000\000\000\ +\000\000\000\000\080\000\000\000\000\000\000\000\000\000\154\000\ +\000\000\000\000\000\000\000\000\000\000\154\000\080\000\000\000\ +\080\000\000\000\080\000\080\000\154\000\000\000\154\000\154\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\080\000\000\000\ +\000\000\080\000\204\001\154\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\154\000\000\000\000\000\000\000\000\000\201\001\ +\000\000\000\000\201\001\000\000\000\000\000\000\154\000\000\000\ +\000\000\154\000\000\000\000\000\201\001\154\000\154\000\000\000\ +\154\000\000\000\201\001\000\000\154\000\000\000\000\000\000\000\ +\000\000\201\001\154\000\201\001\201\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\154\000\203\001\ +\201\001\000\000\154\000\154\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\154\000\000\000\201\001\000\000\000\000\201\001\000\000\ +\000\000\000\000\201\001\201\001\000\000\000\000\000\000\000\000\ +\000\000\201\001\248\002\000\000\000\000\248\002\000\000\201\001\ +\000\000\000\000\248\002\000\000\000\000\142\002\000\000\248\002\ +\000\000\000\000\000\000\201\001\205\001\248\002\000\000\201\001\ +\201\001\000\000\000\000\000\000\248\002\236\001\248\002\248\002\ +\000\000\000\000\000\000\201\001\000\000\000\000\201\001\000\000\ +\000\000\000\000\000\000\248\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\201\001\ +\000\000\000\000\201\001\000\000\000\000\000\000\248\002\000\000\ +\070\000\248\002\000\000\070\000\201\001\248\002\248\002\000\000\ +\000\000\000\000\201\001\000\000\248\002\070\000\000\000\000\000\ +\000\000\201\001\248\002\201\001\201\001\000\000\000\000\000\000\ +\000\000\000\000\070\000\000\000\070\000\070\000\248\002\000\000\ +\201\001\000\000\248\002\248\002\000\000\209\001\000\000\000\000\ +\070\000\070\000\000\000\000\000\000\000\000\000\248\002\000\000\ +\000\000\248\002\000\000\201\001\000\000\202\001\201\001\000\000\ +\202\001\000\000\201\001\201\001\070\000\000\000\000\000\070\000\ +\000\000\201\001\202\001\070\000\070\000\000\000\000\000\201\001\ +\202\001\000\000\070\000\000\000\000\000\000\000\000\000\202\001\ +\070\000\202\001\202\001\201\001\000\000\000\000\236\001\201\001\ +\201\001\000\000\000\000\000\000\070\000\000\000\202\001\248\002\ +\070\000\070\000\000\000\201\001\000\000\000\000\201\001\000\000\ +\000\000\000\000\204\001\000\000\070\000\204\001\000\000\070\000\ +\000\000\202\001\000\000\000\000\202\001\000\000\000\000\204\001\ +\202\001\202\001\000\000\000\000\000\000\204\001\000\000\202\001\ +\000\000\000\000\000\000\000\000\204\001\202\001\204\001\204\001\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\248\002\202\001\000\000\204\001\000\000\202\001\202\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\203\001\ +\000\000\202\001\203\001\000\000\202\001\000\000\204\001\000\000\ +\000\000\204\001\000\000\000\000\203\001\204\001\204\001\000\000\ +\000\000\000\000\203\001\000\000\204\001\000\000\000\000\000\000\ +\000\000\203\001\204\001\203\001\203\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\204\001\000\000\ +\203\001\117\000\204\001\204\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\205\001\000\000\204\001\205\001\ +\000\000\204\001\000\000\203\001\000\000\236\001\203\001\000\000\ +\000\000\205\001\203\001\203\001\000\000\236\001\000\000\205\001\ +\000\000\203\001\236\001\000\000\000\000\000\000\205\001\203\001\ +\205\001\205\001\000\000\000\000\000\000\246\002\000\000\236\001\ +\000\000\236\001\236\001\203\001\000\000\205\001\118\000\203\001\ +\203\001\000\000\000\000\000\000\000\000\000\000\236\001\000\000\ +\000\000\000\000\000\000\203\001\000\000\000\000\203\001\000\000\ +\205\001\000\000\000\000\205\001\000\000\000\000\000\000\205\001\ +\205\001\236\001\000\000\000\000\236\001\000\000\205\001\236\001\ +\236\001\236\001\000\000\000\000\205\001\209\001\000\000\236\001\ +\209\001\000\000\000\000\000\000\000\000\236\001\000\000\192\001\ +\205\001\000\000\209\001\000\000\205\001\205\001\000\000\000\000\ +\209\001\236\001\000\000\000\000\000\000\236\001\236\001\209\001\ +\205\001\209\001\209\001\205\001\000\000\000\000\000\000\000\000\ +\000\000\236\001\000\000\000\000\236\001\000\000\209\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\236\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\248\002\ +\000\000\209\001\000\000\236\001\209\001\000\000\000\000\248\002\ +\209\001\209\001\000\000\000\000\248\002\000\000\000\000\209\001\ +\236\001\000\000\236\001\236\001\000\000\209\001\000\000\000\000\ +\236\001\248\002\000\000\248\002\248\002\000\000\000\000\236\001\ +\000\000\209\001\000\000\000\000\000\000\209\001\209\001\000\000\ +\248\002\000\000\000\000\000\000\000\000\054\000\000\000\000\000\ +\248\002\209\001\236\001\000\000\209\001\236\001\057\000\000\000\ +\236\001\236\001\236\001\248\002\000\000\248\002\248\002\000\000\ +\236\001\000\000\248\002\248\002\000\000\000\000\236\001\000\000\ +\000\000\248\002\248\002\000\000\248\002\248\002\000\000\248\002\ +\000\000\000\000\236\001\000\000\000\000\000\000\236\001\236\001\ +\000\000\248\002\000\000\248\002\000\000\000\000\000\000\248\002\ +\248\002\000\000\236\001\000\000\000\000\236\001\000\000\000\000\ +\000\000\117\000\000\000\248\002\248\002\000\000\248\002\248\002\ +\000\000\000\000\000\000\248\002\248\002\000\000\117\000\000\000\ +\000\000\000\000\248\002\000\000\000\000\000\000\061\000\000\000\ +\248\002\000\000\000\000\117\000\000\000\117\000\117\000\000\000\ +\000\000\000\000\000\000\000\000\248\002\000\000\000\000\000\000\ +\248\002\248\002\117\000\064\000\000\000\246\002\000\000\000\000\ +\246\002\000\000\000\000\000\000\248\002\000\000\118\000\248\002\ +\000\000\000\000\246\002\000\000\000\000\117\000\000\000\000\000\ +\117\000\000\000\000\000\118\000\117\000\117\000\000\000\246\002\ +\000\000\246\002\246\002\117\000\000\000\000\000\000\000\000\000\ +\118\000\117\000\118\000\118\000\000\000\000\000\246\002\246\002\ +\000\000\000\000\000\000\000\000\000\000\117\000\000\000\118\000\ +\000\000\117\000\117\000\000\000\000\000\000\000\000\000\192\001\ +\000\000\246\002\000\000\000\000\246\002\117\000\000\000\000\000\ +\117\000\246\002\118\000\000\000\192\001\118\000\000\000\246\002\ +\000\000\118\000\118\000\000\000\000\000\246\002\000\000\000\000\ +\118\000\192\001\000\000\192\001\192\001\000\000\118\000\000\000\ +\108\000\246\002\000\000\000\000\000\000\246\002\246\002\000\000\ +\192\001\000\000\118\000\000\000\000\000\000\000\118\000\118\000\ +\000\000\246\002\000\000\000\000\246\002\000\000\000\000\000\000\ +\000\000\000\000\118\000\192\001\000\000\118\000\192\001\000\000\ +\000\000\000\000\192\001\192\001\000\000\000\000\000\000\000\000\ +\236\001\192\001\000\000\000\000\000\000\000\000\000\000\192\001\ +\236\001\000\000\000\000\000\000\000\000\236\001\000\000\000\000\ +\000\000\000\000\000\000\192\001\000\000\054\000\000\000\192\001\ +\192\001\000\000\236\001\000\000\236\001\236\001\057\000\000\000\ +\000\000\000\000\054\000\192\001\000\000\000\000\192\001\000\000\ +\000\000\236\001\000\000\057\000\000\000\000\000\000\000\054\000\ +\000\000\054\000\054\000\000\000\000\000\000\000\000\000\000\000\ +\057\000\000\000\057\000\057\000\236\001\000\000\054\000\000\000\ +\000\000\000\000\236\001\236\001\236\001\000\000\000\000\057\000\ +\000\000\000\000\236\001\000\000\000\000\000\000\000\000\000\000\ +\236\001\054\000\000\000\000\000\054\000\000\000\000\000\000\000\ +\000\000\054\000\057\000\000\000\236\001\057\000\000\000\054\000\ +\236\001\000\000\057\000\000\000\000\000\054\000\061\000\000\000\ +\057\000\000\000\000\000\000\000\236\001\000\000\057\000\236\001\ +\000\000\054\000\000\000\061\000\000\000\054\000\054\000\000\000\ +\000\000\000\000\057\000\064\000\000\000\000\000\057\000\057\000\ +\061\000\054\000\061\000\061\000\054\000\000\000\000\000\000\000\ +\064\000\000\000\057\000\000\000\000\000\057\000\000\000\061\000\ +\000\000\000\000\000\000\000\000\000\000\064\000\000\000\064\000\ +\064\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\061\000\000\000\064\000\061\000\000\000\246\002\ +\000\000\000\000\061\000\000\000\000\000\000\000\000\000\000\000\ +\061\000\000\000\000\000\000\000\246\002\000\000\061\000\064\000\ +\000\000\000\000\064\000\000\000\000\000\000\000\000\000\064\000\ +\000\000\246\002\061\000\246\002\246\002\064\000\061\000\061\000\ +\000\000\000\000\000\000\064\000\000\000\000\000\000\000\000\000\ +\246\002\000\000\061\000\000\000\000\000\061\000\000\000\064\000\ +\108\000\000\000\000\000\064\000\064\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\246\002\000\000\108\000\246\002\064\000\ +\000\000\000\000\064\000\246\002\000\000\000\000\000\000\000\000\ +\000\000\246\002\108\000\000\000\108\000\108\000\000\000\246\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\108\000\000\000\246\002\000\000\000\000\000\000\246\002\ +\246\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\246\002\108\000\000\000\246\002\000\000\ +\000\000\000\000\000\000\108\000\108\000\000\000\000\000\241\002\ +\000\000\000\000\108\000\000\000\241\002\241\002\241\002\241\002\ +\108\000\000\000\241\002\241\002\241\002\241\002\000\000\000\000\ +\000\000\000\000\241\002\000\000\108\000\000\000\000\000\000\000\ +\108\000\241\002\000\000\241\002\241\002\241\002\241\002\241\002\ +\241\002\241\002\241\002\000\000\108\000\000\000\241\002\108\000\ +\241\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\241\002\241\002\241\002\241\002\241\002\241\002\241\002\241\002\ +\000\000\000\000\241\002\241\002\000\000\000\000\241\002\241\002\ +\241\002\241\002\000\000\241\002\241\002\241\002\241\002\241\002\ +\000\000\241\002\000\000\000\000\241\002\241\002\000\000\241\002\ +\241\002\000\000\000\000\241\002\241\002\000\000\241\002\000\000\ +\241\002\241\002\000\000\241\002\241\002\000\000\000\000\241\002\ +\241\002\000\000\241\002\000\000\241\002\241\002\000\000\241\002\ +\000\000\241\002\241\002\241\002\241\002\241\002\241\002\241\002\ +\248\002\241\002\000\000\000\000\000\000\248\002\248\002\248\002\ +\248\002\000\000\000\000\248\002\248\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\248\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\248\002\000\000\248\002\000\000\248\002\248\002\ +\248\002\248\002\248\002\248\002\000\000\000\000\000\000\248\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\248\002\248\002\248\002\248\002\248\002\248\002\248\002\ +\248\002\000\000\000\000\248\002\248\002\000\000\000\000\248\002\ +\248\002\248\002\000\000\000\000\248\002\248\002\248\002\248\002\ +\248\002\000\000\248\002\000\000\000\000\248\002\248\002\000\000\ +\000\000\248\002\000\000\000\000\248\002\248\002\000\000\248\002\ +\000\000\248\002\248\002\000\000\000\000\248\002\000\000\000\000\ +\000\000\248\002\000\000\248\002\000\000\248\002\248\002\000\000\ +\248\002\000\000\248\002\248\002\000\000\248\002\248\002\248\002\ +\248\002\000\000\248\002\022\001\023\001\024\001\000\000\000\000\ +\009\000\010\000\025\001\000\000\026\001\000\000\012\000\013\000\ +\000\000\000\000\027\001\028\001\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\017\000\018\000\019\000\020\000\021\000\000\000\030\001\ +\000\000\000\000\022\000\000\000\000\000\031\001\032\001\033\001\ +\034\001\035\001\036\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\ +\037\001\000\000\032\000\033\000\034\000\000\000\000\000\000\000\ +\036\000\000\000\038\001\039\001\000\000\040\001\000\000\000\000\ +\000\000\040\000\000\000\000\000\000\000\041\001\042\001\043\001\ +\044\001\045\001\046\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\047\001\000\000\000\000\000\000\048\001\000\000\049\001\ +\046\000\000\000\000\000\000\000\000\000\047\000\048\000\000\000\ +\050\000\051\000\022\001\023\001\024\001\053\000\000\000\009\000\ +\010\000\025\001\000\000\026\001\000\000\012\000\013\000\000\000\ +\000\000\066\003\028\001\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\ +\017\000\018\000\019\000\020\000\021\000\000\000\030\001\000\000\ +\000\000\022\000\000\000\000\000\031\001\032\001\033\001\034\001\ +\035\001\036\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\037\001\ +\000\000\032\000\033\000\034\000\000\000\000\000\000\000\036\000\ +\000\000\038\001\039\001\000\000\067\003\000\000\000\000\000\000\ +\040\000\000\000\000\000\000\000\041\001\042\001\043\001\044\001\ +\045\001\046\001\000\000\000\000\000\000\000\000\000\000\248\002\ +\068\003\248\002\248\002\248\002\048\001\248\002\049\001\046\000\ +\248\002\248\002\000\000\000\000\047\000\048\000\000\000\050\000\ +\051\000\248\002\000\000\000\000\053\000\000\000\248\002\248\002\ +\248\002\248\002\000\000\000\000\248\002\248\002\248\002\000\000\ +\000\000\248\002\248\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\248\002\000\000\248\002\000\000\248\002\248\002\248\002\ +\248\002\248\002\248\002\248\002\000\000\248\002\248\002\000\000\ +\248\002\000\000\248\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\248\002\000\000\248\002\248\002\248\002\ +\248\002\248\002\000\000\000\000\248\002\248\002\000\000\000\000\ +\248\002\248\002\248\002\000\000\000\000\248\002\248\002\000\000\ +\248\002\248\002\000\000\248\002\000\000\000\000\000\000\248\002\ +\000\000\248\002\000\000\000\000\000\000\248\002\248\002\112\002\ +\248\002\000\000\000\000\000\000\186\002\186\002\186\002\000\000\ +\000\000\248\002\186\002\186\002\000\000\000\000\248\002\000\000\ +\000\000\000\000\000\000\248\002\248\002\248\002\248\002\248\002\ +\248\002\000\000\000\000\248\002\000\000\186\002\186\002\186\002\ +\186\002\186\002\000\000\000\000\000\000\000\000\186\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\186\002\000\000\186\002\186\002\186\002\186\002\186\002\ +\000\000\000\000\186\002\000\000\000\000\000\000\186\002\186\002\ +\186\002\000\000\000\000\000\000\186\002\000\000\186\002\186\002\ +\000\000\000\000\000\000\000\000\000\000\186\002\000\000\000\000\ +\000\000\000\000\000\000\186\002\186\002\113\002\186\002\000\000\ +\000\000\000\000\187\002\187\002\187\002\112\002\000\000\000\000\ +\187\002\187\002\000\000\000\000\186\002\000\000\000\000\000\000\ +\000\000\186\002\186\002\000\000\186\002\186\002\000\000\000\000\ +\000\000\186\002\000\000\187\002\187\002\187\002\187\002\187\002\ +\000\000\000\000\000\000\000\000\187\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\187\002\ +\000\000\187\002\187\002\187\002\187\002\187\002\000\000\000\000\ +\187\002\000\000\000\000\000\000\187\002\187\002\187\002\000\000\ +\000\000\000\000\187\002\000\000\187\002\187\002\000\000\000\000\ +\000\000\000\000\000\000\187\002\000\000\000\000\000\000\000\000\ +\000\000\187\002\187\002\110\002\187\002\000\000\000\000\000\000\ +\188\002\188\002\188\002\113\002\000\000\000\000\188\002\188\002\ +\000\000\000\000\187\002\000\000\000\000\000\000\000\000\187\002\ +\187\002\000\000\187\002\187\002\000\000\000\000\000\000\187\002\ +\000\000\188\002\188\002\188\002\188\002\188\002\000\000\000\000\ +\000\000\000\000\188\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\188\002\000\000\188\002\ +\188\002\188\002\188\002\188\002\000\000\000\000\188\002\000\000\ +\000\000\000\000\188\002\188\002\188\002\000\000\000\000\000\000\ +\188\002\000\000\188\002\188\002\000\000\000\000\000\000\000\000\ +\000\000\188\002\000\000\000\000\000\000\000\000\000\000\188\002\ +\188\002\111\002\188\002\000\000\000\000\000\000\189\002\189\002\ +\189\002\110\002\000\000\000\000\189\002\189\002\000\000\000\000\ +\188\002\000\000\000\000\000\000\000\000\188\002\188\002\000\000\ +\188\002\188\002\000\000\000\000\000\000\188\002\000\000\189\002\ +\189\002\189\002\189\002\189\002\000\000\000\000\000\000\000\000\ +\189\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\189\002\000\000\189\002\189\002\189\002\ +\189\002\189\002\000\000\000\000\189\002\000\000\000\000\000\000\ +\189\002\189\002\189\002\000\000\000\000\000\000\189\002\000\000\ +\189\002\189\002\000\000\000\000\000\000\000\000\000\000\189\002\ +\000\000\000\000\000\000\000\000\000\000\189\002\189\002\000\000\ +\189\002\000\000\000\000\000\000\000\000\000\000\000\000\111\002\ +\220\000\221\000\222\000\000\000\000\000\000\000\189\002\000\000\ +\223\000\000\000\224\000\189\002\189\002\000\000\189\002\189\002\ +\225\000\226\000\227\000\189\002\000\000\228\000\229\000\230\000\ +\000\000\231\000\232\000\233\000\000\000\234\000\235\000\236\000\ +\237\000\000\000\000\000\000\000\238\000\239\000\240\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\241\000\242\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\244\000\245\000\000\000\000\000\ +\000\000\031\002\246\000\247\000\000\000\031\002\000\000\248\000\ +\249\000\250\000\251\000\252\000\253\000\254\000\000\000\255\000\ +\000\000\000\000\031\002\000\000\031\002\000\001\000\000\014\002\ +\000\000\000\000\001\001\031\002\031\002\000\000\000\000\000\000\ +\002\001\000\000\000\000\003\001\004\001\031\002\005\001\006\001\ +\007\001\008\001\009\001\000\000\010\001\011\001\012\001\013\001\ +\014\001\031\002\031\002\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\031\002\000\000\000\000\ +\000\000\031\002\000\000\031\002\031\002\031\002\000\000\031\002\ +\000\000\000\000\031\002\000\000\000\000\000\000\022\001\023\001\ +\024\001\000\000\000\000\000\000\010\000\200\001\000\000\026\001\ +\000\000\000\000\013\000\014\002\031\002\027\001\028\001\000\000\ +\031\002\000\000\031\002\000\000\000\000\031\002\000\000\000\000\ +\000\000\029\001\158\000\000\000\017\000\018\000\031\002\000\000\ +\031\002\000\000\030\001\000\000\000\000\000\000\000\000\000\000\ +\031\001\032\001\033\001\034\001\035\001\036\001\000\000\000\000\ +\024\000\000\000\159\000\160\000\000\000\161\000\162\000\000\000\ +\000\000\030\000\000\000\037\001\000\000\000\000\163\000\164\000\ +\000\000\000\000\000\000\000\000\000\000\201\001\202\001\000\000\ +\203\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\041\001\042\001\204\001\205\001\045\001\206\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\047\001\000\000\000\000\167\000\ +\048\001\000\000\049\001\046\000\000\000\000\000\000\000\000\000\ +\047\000\000\000\227\002\050\000\168\000\022\001\023\001\024\001\ +\000\000\000\000\000\000\010\000\200\001\000\000\026\001\000\000\ +\000\000\013\000\000\000\000\000\027\001\028\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\029\001\158\000\000\000\017\000\018\000\000\000\000\000\000\000\ +\000\000\030\001\000\000\000\000\000\000\000\000\000\000\031\001\ +\032\001\033\001\034\001\035\001\036\001\000\000\000\000\024\000\ +\000\000\159\000\160\000\000\000\161\000\162\000\000\000\000\000\ +\030\000\000\000\037\001\000\000\000\000\163\000\164\000\000\000\ +\000\000\000\000\000\000\000\000\201\001\202\001\000\000\203\001\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\041\001\ +\042\001\204\001\205\001\045\001\206\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\047\001\000\000\000\000\167\000\048\001\ +\000\000\049\001\046\000\000\000\000\000\000\000\000\000\047\000\ +\000\000\176\003\050\000\168\000\022\001\023\001\024\001\000\000\ +\000\000\000\000\010\000\200\001\000\000\026\001\000\000\000\000\ +\013\000\000\000\000\000\027\001\028\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\029\001\ +\158\000\000\000\017\000\018\000\000\000\000\000\000\000\000\000\ +\030\001\000\000\000\000\000\000\000\000\000\000\031\001\032\001\ +\033\001\034\001\035\001\036\001\000\000\000\000\024\000\000\000\ +\159\000\160\000\000\000\161\000\162\000\000\000\000\000\030\000\ +\000\000\037\001\000\000\000\000\163\000\164\000\000\000\000\000\ +\000\000\000\000\000\000\201\001\202\001\000\000\203\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\041\001\042\001\ +\204\001\205\001\045\001\206\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\047\001\000\000\000\000\167\000\048\001\000\000\ +\049\001\046\000\000\000\000\000\000\000\000\000\047\000\000\000\ +\127\004\050\000\168\000\022\001\023\001\024\001\000\000\000\000\ +\000\000\010\000\200\001\000\000\026\001\000\000\000\000\013\000\ +\000\000\000\000\027\001\028\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\029\001\158\000\ +\000\000\017\000\018\000\000\000\000\000\000\000\000\000\030\001\ +\000\000\000\000\000\000\000\000\000\000\031\001\032\001\033\001\ +\034\001\035\001\036\001\000\000\000\000\024\000\000\000\159\000\ +\160\000\000\000\161\000\162\000\000\000\000\000\030\000\000\000\ +\037\001\000\000\000\000\163\000\164\000\000\000\000\000\000\000\ +\000\000\000\000\201\001\202\001\000\000\203\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\041\001\042\001\204\001\ +\205\001\045\001\206\001\000\000\000\000\144\003\000\000\000\000\ +\000\000\047\001\000\000\010\000\167\000\048\001\000\000\049\001\ +\046\000\013\000\000\000\000\000\066\003\047\000\000\000\000\000\ +\050\000\168\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\158\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\159\000\160\000\000\000\161\000\162\000\000\000\000\000\ +\030\000\000\000\192\002\000\000\000\000\163\000\164\000\000\000\ +\010\000\000\000\000\000\000\000\165\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\166\000\000\000\000\000\000\000\000\000\158\000\000\000\ +\017\000\018\000\000\000\145\003\000\000\000\000\167\000\000\000\ +\000\000\000\000\046\000\000\000\000\000\000\000\000\000\047\000\ +\000\000\000\000\050\000\168\000\024\000\000\000\159\000\160\000\ +\000\000\161\000\162\000\000\000\000\000\030\000\000\000\194\002\ +\000\000\000\000\163\000\164\000\000\000\010\000\000\000\000\000\ +\000\000\165\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\166\000\000\000\ +\000\000\000\000\000\000\158\000\000\000\017\000\018\000\000\000\ +\000\000\000\000\000\000\167\000\000\000\000\000\000\000\046\000\ +\000\000\000\000\000\000\000\000\047\000\000\000\000\000\050\000\ +\168\000\024\000\000\000\159\000\160\000\000\000\161\000\162\000\ +\000\000\000\000\030\000\000\000\134\004\000\000\000\000\163\000\ +\164\000\000\000\010\000\000\000\000\000\000\000\165\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\166\000\000\000\000\000\000\000\000\000\ +\158\000\000\000\017\000\018\000\000\000\000\000\000\000\000\000\ +\167\000\000\000\000\000\000\000\046\000\000\000\000\000\000\000\ +\000\000\047\000\000\000\000\000\050\000\168\000\024\000\000\000\ +\159\000\160\000\000\000\161\000\162\000\000\000\000\000\030\000\ +\000\000\136\004\000\000\000\000\163\000\164\000\000\000\010\000\ +\000\000\000\000\000\000\165\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\ +\166\000\000\000\000\000\000\000\000\000\158\000\000\000\017\000\ +\018\000\000\000\000\000\000\000\000\000\167\000\000\000\000\000\ +\000\000\046\000\000\000\000\000\000\000\000\000\047\000\000\000\ +\000\000\050\000\168\000\024\000\000\000\159\000\160\000\000\000\ +\161\000\162\000\000\000\000\000\030\000\000\000\138\004\000\000\ +\000\000\163\000\164\000\000\000\010\000\000\000\000\000\000\000\ +\165\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\166\000\000\000\000\000\ +\000\000\000\000\158\000\000\000\017\000\018\000\000\000\000\000\ +\000\000\000\000\167\000\000\000\000\000\000\000\046\000\000\000\ +\000\000\000\000\000\000\047\000\000\000\000\000\050\000\168\000\ +\024\000\000\000\159\000\160\000\000\000\161\000\162\000\000\000\ +\000\000\030\000\000\000\000\000\000\000\000\000\163\000\164\000\ +\009\000\010\000\011\000\000\000\000\000\165\000\012\000\013\000\ +\014\000\023\002\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\166\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\167\000\ +\000\000\000\000\022\000\046\000\023\000\000\000\000\000\000\000\ +\047\000\000\000\000\000\050\000\168\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\000\000\ +\000\000\040\000\000\000\041\000\000\000\000\000\000\000\042\000\ +\043\000\000\000\044\000\000\000\024\002\000\000\000\000\009\000\ +\010\000\011\000\000\000\045\000\000\000\012\000\013\000\014\000\ +\046\000\000\000\000\000\000\000\000\000\047\000\048\000\049\000\ +\050\000\051\000\052\000\000\000\000\000\053\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\000\000\000\000\ +\040\000\000\000\041\000\000\000\000\000\000\000\042\000\043\000\ +\000\000\044\000\000\000\000\000\000\000\009\000\010\000\011\000\ +\000\000\000\000\045\000\012\000\013\000\000\000\000\000\046\000\ +\000\000\000\000\000\000\000\000\047\000\048\000\049\000\050\000\ +\051\000\052\000\000\000\000\000\053\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\000\000\000\000\040\000\000\000\ +\000\000\000\000\000\000\000\000\042\000\043\000\000\000\044\000\ +\000\000\000\000\000\000\000\000\215\000\009\000\010\000\011\000\ +\000\000\000\000\218\000\012\000\013\000\046\000\000\000\000\000\ +\000\000\000\000\047\000\048\000\000\000\050\000\051\000\000\000\ +\000\000\000\000\053\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\000\000\000\000\040\000\000\000\ +\000\000\000\000\000\000\000\000\042\000\043\000\000\000\044\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\046\000\000\000\000\000\ +\000\000\000\000\047\000\048\000\000\000\050\000\051\000\231\001\ +\000\000\000\000\053\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\000\000\000\000\040\000\000\000\000\000\000\000\000\000\ +\000\000\042\000\043\000\000\000\044\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\046\000\000\000\000\000\000\000\000\000\047\000\ +\048\000\000\000\050\000\051\000\000\000\000\000\000\000\053\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\000\000\000\000\ +\040\000\000\000\000\000\000\000\000\000\090\002\042\000\043\000\ +\000\000\044\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\046\000\ +\000\000\000\000\000\000\000\000\047\000\048\000\000\000\050\000\ +\051\000\000\000\000\000\000\000\053\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\000\000\000\000\040\000\000\000\000\000\ +\000\000\000\000\000\000\042\000\043\000\000\000\044\000\000\000\ +\000\000\000\000\000\000\062\003\009\000\010\000\011\000\000\000\ +\000\000\064\003\012\000\013\000\046\000\000\000\000\000\000\000\ +\000\000\047\000\048\000\000\000\050\000\051\000\000\000\000\000\ +\000\000\053\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\000\000\000\000\040\000\000\000\000\000\ +\000\000\000\000\000\000\042\000\043\000\000\000\044\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\046\000\000\000\000\000\000\000\ +\000\000\047\000\048\000\107\004\050\000\051\000\000\000\000\000\ +\000\000\053\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\000\000\000\000\040\000\000\000\000\000\000\000\000\000\ +\000\000\042\000\043\000\000\000\044\000\000\000\000\000\250\002\ +\250\002\250\002\000\000\000\000\000\000\250\002\250\002\000\000\ +\000\000\000\000\046\000\000\000\000\000\000\000\000\000\047\000\ +\048\000\000\000\050\000\051\000\250\002\000\000\000\000\053\000\ +\250\002\250\002\250\002\250\002\250\002\000\000\000\000\000\000\ +\000\000\250\002\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\250\002\000\000\250\002\250\002\ +\250\002\250\002\250\002\000\000\000\000\250\002\000\000\000\000\ +\000\000\250\002\250\002\250\002\000\000\000\000\000\000\250\002\ +\000\000\250\002\250\002\000\000\000\000\000\000\000\000\000\000\ +\250\002\000\000\000\000\000\000\000\000\000\000\250\002\250\002\ +\000\000\250\002\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\250\002\ +\000\000\000\000\000\000\000\000\250\002\250\002\000\000\250\002\ +\250\002\000\000\000\000\000\000\250\002\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\000\000\000\000\040\000\000\000\000\000\ +\000\000\000\000\000\000\042\000\043\000\000\000\044\000\000\000\ +\000\000\250\002\250\002\250\002\000\000\000\000\000\000\250\002\ +\250\002\000\000\000\000\000\000\046\000\000\000\000\000\000\000\ +\000\000\047\000\048\000\000\000\050\000\051\000\000\000\000\000\ +\000\000\053\000\250\002\250\002\250\002\250\002\250\002\000\000\ +\000\000\000\000\000\000\250\002\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\250\002\000\000\ +\250\002\250\002\250\002\250\002\250\002\000\000\000\000\250\002\ +\000\000\000\000\000\000\250\002\250\002\250\002\000\000\000\000\ +\000\000\250\002\000\000\250\002\250\002\000\000\000\000\000\000\ +\000\000\000\000\250\002\000\000\000\000\000\000\000\000\000\000\ +\250\002\250\002\000\000\250\002\000\000\000\000\248\002\248\002\ +\248\002\000\000\000\000\000\000\248\002\248\002\000\000\000\000\ +\000\000\250\002\000\000\000\000\000\000\000\000\250\002\250\002\ +\000\000\250\002\250\002\000\000\000\000\000\000\250\002\248\002\ +\248\002\248\002\248\002\248\002\000\000\000\000\000\000\000\000\ +\248\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\248\002\000\000\248\002\248\002\248\002\ +\248\002\248\002\000\000\000\000\248\002\000\000\000\000\000\000\ +\248\002\248\002\248\002\000\000\000\000\010\000\248\002\000\000\ +\248\002\248\002\000\000\013\000\000\000\199\003\000\000\248\002\ +\009\002\000\000\000\000\000\000\000\000\248\002\248\002\000\000\ +\248\002\000\000\200\003\000\000\000\000\017\000\018\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\248\002\000\000\ +\000\000\000\000\000\000\248\002\248\002\000\000\248\002\248\002\ +\000\000\024\000\243\001\248\002\160\000\000\000\161\000\162\000\ +\000\000\000\000\030\000\000\000\000\000\000\000\000\000\163\000\ +\201\003\000\000\010\000\000\000\000\000\000\000\165\000\000\000\ +\013\000\000\000\008\002\000\000\000\000\009\002\000\000\000\000\ +\245\001\000\000\000\000\166\000\000\000\000\000\000\000\200\003\ +\246\001\000\000\017\000\018\000\000\000\010\000\000\000\000\000\ +\167\000\000\000\000\000\013\000\046\000\237\002\000\000\247\001\ +\000\000\047\000\000\000\000\000\050\000\168\000\024\000\243\001\ +\000\000\160\000\000\000\161\000\162\000\017\000\018\000\030\000\ +\000\000\000\000\000\000\000\000\163\000\201\003\000\000\000\000\ +\000\000\000\000\000\000\165\000\000\000\000\000\000\000\000\000\ +\000\000\024\000\243\001\000\000\160\000\245\001\161\000\162\000\ +\166\000\000\000\030\000\000\000\000\000\246\001\000\000\163\000\ +\238\002\000\000\000\000\000\000\000\000\167\000\165\000\000\000\ +\239\002\046\000\000\000\000\000\247\001\000\000\047\000\000\000\ +\245\001\050\000\168\000\166\000\000\000\000\000\010\000\000\000\ +\246\001\000\000\000\000\000\000\013\000\000\000\204\005\000\000\ +\167\000\000\000\000\000\000\000\046\000\000\000\000\000\247\001\ +\000\000\047\000\000\000\200\003\050\000\168\000\017\000\018\000\ +\000\000\010\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\024\000\243\001\000\000\160\000\000\000\161\000\ +\162\000\017\000\018\000\030\000\000\000\000\000\000\000\000\000\ +\163\000\201\003\000\000\000\000\000\000\000\000\000\000\165\000\ +\000\000\000\000\000\000\000\000\000\000\024\000\243\001\000\000\ +\160\000\245\001\161\000\162\000\166\000\000\000\030\000\000\000\ +\000\000\246\001\000\000\163\000\244\001\000\000\250\002\000\000\ +\000\000\167\000\165\000\000\000\250\002\046\000\000\000\000\000\ +\247\001\000\000\047\000\000\000\245\001\050\000\168\000\166\000\ +\000\000\000\000\000\000\000\000\246\001\000\000\250\002\250\002\ +\000\000\000\000\000\000\000\000\167\000\000\000\000\000\000\000\ +\046\000\000\000\000\000\247\001\000\000\047\000\000\000\000\000\ +\050\000\168\000\250\002\250\002\000\000\250\002\000\000\250\002\ +\250\002\000\000\000\000\250\002\000\000\000\000\000\000\000\000\ +\250\002\250\002\000\000\000\000\010\000\000\000\000\000\250\002\ +\000\000\000\000\013\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\250\002\000\000\000\000\250\002\000\000\000\000\000\000\ +\000\000\250\002\158\000\000\000\017\000\018\000\000\000\000\000\ +\000\000\250\002\000\000\000\000\000\000\250\002\000\000\000\000\ +\250\002\000\000\250\002\000\000\000\000\250\002\250\002\000\000\ +\024\000\000\000\159\000\160\000\000\000\161\000\162\000\000\000\ +\000\000\030\000\000\000\000\000\000\000\000\000\163\000\164\000\ +\000\000\000\000\000\000\010\000\000\000\165\000\000\000\198\001\ +\000\000\013\000\000\000\000\000\000\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\158\000\215\000\017\000\018\000\000\000\000\000\167\000\ +\000\000\000\000\000\000\046\000\000\000\000\000\000\000\000\000\ +\047\000\000\000\000\000\050\000\168\000\000\000\000\000\024\000\ +\000\000\159\000\160\000\000\000\161\000\162\000\000\000\000\000\ +\030\000\000\000\000\000\000\000\000\000\163\000\164\000\000\000\ +\010\000\000\000\000\000\000\000\165\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\166\000\012\000\013\000\000\000\000\000\158\000\000\000\ +\017\000\018\000\000\000\000\000\000\000\000\000\167\000\000\000\ +\000\000\000\000\046\000\000\000\000\000\017\000\018\000\047\000\ +\000\000\000\000\050\000\168\000\024\000\000\000\159\000\160\000\ +\000\000\161\000\162\000\000\000\000\000\030\000\000\000\000\000\ +\000\000\024\000\163\000\164\000\026\000\027\000\028\000\029\000\ +\000\000\165\000\030\000\000\000\250\002\000\000\250\002\163\000\ +\034\000\000\000\250\002\000\000\000\000\000\000\166\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\143\003\000\000\ +\000\000\000\000\250\002\167\000\250\002\250\002\044\000\046\000\ +\000\000\000\000\000\000\000\000\047\000\000\000\000\000\050\000\ +\168\000\000\000\000\000\000\000\046\000\000\000\000\000\000\000\ +\250\002\047\000\250\002\250\002\050\000\250\002\250\002\000\000\ +\000\000\250\002\000\000\000\000\000\000\000\000\250\002\250\002\ +\000\000\010\000\000\000\000\000\000\000\250\002\000\000\013\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\250\002\000\000\000\000\000\000\000\000\158\000\ +\000\000\017\000\018\000\000\000\000\000\000\000\000\000\250\002\ +\000\000\000\000\000\000\250\002\000\000\000\000\000\000\000\000\ +\250\002\000\000\000\000\250\002\250\002\024\000\000\000\159\000\ +\160\000\000\000\161\000\162\000\000\000\000\000\030\000\000\000\ +\000\000\000\000\000\000\163\000\164\000\000\000\250\002\000\000\ +\000\000\000\000\165\000\000\000\250\002\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\166\000\ +\000\000\000\000\000\000\000\000\250\002\000\000\250\002\250\002\ +\000\000\250\002\000\000\000\000\167\000\000\000\000\000\250\002\ +\046\000\000\000\000\000\000\000\000\000\047\000\000\000\000\000\ +\050\000\168\000\250\002\000\000\250\002\250\002\000\000\250\002\ +\250\002\250\002\250\002\250\002\000\000\000\000\000\000\000\000\ +\250\002\250\002\000\000\000\000\000\000\000\000\000\000\250\002\ +\000\000\000\000\000\000\000\000\000\000\250\002\000\000\250\002\ +\250\002\000\000\250\002\250\002\250\002\000\000\250\002\000\000\ +\000\000\000\000\000\000\250\002\250\002\000\000\182\002\000\000\ +\000\000\250\002\250\002\000\000\182\002\250\002\000\000\000\000\ +\000\000\000\000\250\002\000\000\000\000\250\002\250\002\250\002\ +\000\000\000\000\000\000\000\000\182\002\000\000\182\002\182\002\ +\250\002\010\000\000\000\000\000\250\002\000\000\000\000\013\000\ +\250\002\000\000\000\000\000\000\000\000\250\002\000\000\000\000\ +\250\002\250\002\182\002\000\000\182\002\182\002\000\000\182\002\ +\182\002\017\000\018\000\182\002\000\000\000\000\000\000\000\000\ +\182\002\182\002\000\000\000\000\000\000\000\000\000\000\182\002\ +\000\000\000\000\000\000\000\000\000\000\024\000\000\000\159\000\ +\160\000\000\000\161\000\162\000\182\002\000\000\030\000\000\000\ +\000\000\000\000\000\000\163\000\164\000\000\000\163\002\000\000\ +\000\000\182\002\165\000\000\000\163\002\182\002\000\000\000\000\ +\000\000\000\000\182\002\000\000\000\000\182\002\182\002\166\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\163\002\163\002\ +\000\000\248\002\000\000\000\000\167\000\000\000\000\000\248\002\ +\046\000\000\000\000\000\000\000\000\000\047\000\000\000\000\000\ +\050\000\168\000\163\002\000\000\163\002\163\002\000\000\163\002\ +\163\002\248\002\248\002\163\002\000\000\000\000\000\000\000\000\ +\163\002\163\002\000\000\000\000\000\000\000\000\000\000\163\002\ +\000\000\000\000\000\000\000\000\000\000\248\002\000\000\248\002\ +\248\002\000\000\248\002\248\002\163\002\000\000\248\002\000\000\ +\000\000\000\000\000\000\248\002\248\002\000\000\010\000\000\000\ +\000\000\163\002\248\002\000\000\013\000\163\002\000\000\000\000\ +\000\000\000\000\163\002\000\000\000\000\163\002\163\002\248\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\017\000\018\000\ +\000\000\250\002\000\000\000\000\248\002\000\000\000\000\250\002\ +\248\002\000\000\000\000\000\000\000\000\248\002\000\000\000\000\ +\248\002\248\002\024\000\000\000\000\000\160\000\000\000\161\000\ +\162\000\250\002\250\002\030\000\000\000\000\000\000\000\000\000\ +\163\000\164\000\000\000\000\000\000\000\000\000\000\000\165\000\ +\000\000\000\000\000\000\000\000\000\000\250\002\000\000\000\000\ +\250\002\000\000\250\002\250\002\166\000\000\000\250\002\000\000\ +\000\000\000\000\000\000\250\002\250\002\000\000\000\000\000\000\ +\000\000\167\000\250\002\000\000\000\000\046\000\010\000\011\000\ +\000\000\000\000\047\000\012\000\013\000\050\000\168\000\250\002\ +\000\000\000\000\000\000\000\000\000\000\000\000\108\001\000\000\ +\000\000\000\000\000\000\000\000\250\002\000\000\017\000\018\000\ +\250\002\000\000\000\000\000\000\000\000\250\002\000\000\000\000\ +\250\002\250\002\000\000\000\000\000\000\000\000\000\000\109\001\ +\000\000\000\000\024\000\110\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\ +\163\000\034\000\010\000\011\000\000\000\000\000\000\000\012\000\ +\013\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\111\001\000\000\000\000\000\000\000\000\000\000\044\000\ +\000\000\112\001\017\000\018\000\000\000\000\000\000\000\000\000\ +\000\000\113\001\114\001\000\000\000\000\046\000\000\000\000\000\ +\115\001\000\000\047\000\000\000\000\000\050\000\024\000\110\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\163\000\034\000\010\000\011\000\ +\000\000\000\000\000\000\012\000\013\000\250\002\250\002\000\000\ +\000\000\000\000\250\002\250\002\000\000\111\001\000\000\000\000\ +\000\000\000\000\000\000\044\000\000\000\112\001\017\000\018\000\ +\000\000\000\000\000\000\000\000\000\000\250\002\250\002\000\000\ +\000\000\046\000\000\000\000\000\115\001\000\000\047\000\000\000\ +\000\000\050\000\024\000\000\000\000\000\026\000\027\000\028\000\ +\029\000\250\002\000\000\030\000\250\002\250\002\250\002\250\002\ +\203\000\034\000\250\002\000\000\006\005\000\000\000\000\250\002\ +\250\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\007\005\000\000\000\000\000\000\044\000\ +\000\000\000\000\234\001\000\000\000\000\000\000\250\002\000\000\ +\000\000\000\000\000\000\000\000\000\000\046\000\000\000\000\000\ +\000\000\000\000\047\000\000\000\250\002\050\000\000\000\000\000\ +\000\000\250\002\000\000\008\005\250\002\134\000\135\000\030\000\ +\000\000\136\000\000\000\000\000\137\000\009\005\000\000\000\000\ +\000\000\236\004\073\001\074\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\075\001\000\000\000\000\139\000\000\000\237\004\ +\076\001\077\001\238\004\078\001\010\005\140\000\141\000\000\000\ +\000\000\000\000\000\000\000\000\079\001\142\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\080\001\237\001\000\000\ +\000\000\011\005\144\000\081\001\082\001\083\001\084\001\085\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\086\001\000\000\ +\215\002\000\000\000\000\183\000\000\000\000\000\000\000\000\000\ +\087\001\088\001\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\089\001\090\001\091\001\092\001\093\001\ +\000\000\022\001\023\001\024\001\000\000\000\000\000\000\239\004\ +\200\001\000\000\026\001\000\000\000\000\095\001\000\000\000\000\ +\133\000\028\001\134\000\135\000\030\000\000\000\136\000\000\000\ +\000\000\137\000\138\000\000\000\029\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\170\001\000\000\030\001\000\000\000\000\ +\000\000\000\000\139\000\031\001\032\001\033\001\034\001\035\001\ +\036\001\000\000\140\000\141\000\000\000\000\000\000\000\216\002\ +\000\000\000\000\142\000\000\000\000\000\000\000\037\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\143\000\144\000\ +\221\002\202\001\000\000\222\002\000\000\000\000\000\000\000\000\ +\020\004\073\001\074\001\041\001\042\001\223\002\205\001\045\001\ +\206\001\075\001\000\000\000\000\000\000\000\000\000\000\076\001\ +\077\001\000\000\078\001\048\001\000\000\049\001\000\000\000\000\ +\000\000\000\000\000\000\079\001\000\000\000\000\000\000\000\000\ +\022\004\073\001\074\001\000\000\080\001\000\000\000\000\000\000\ +\000\000\075\001\081\001\082\001\083\001\084\001\085\001\076\001\ +\077\001\000\000\078\001\000\000\000\000\000\000\012\002\000\000\ +\012\002\012\002\012\002\079\001\012\002\086\001\000\000\012\002\ +\012\002\000\000\183\000\000\000\080\001\000\000\000\000\087\001\ +\088\001\000\000\081\001\082\001\083\001\084\001\085\001\000\000\ +\012\002\000\000\089\001\090\001\091\001\092\001\093\001\000\000\ +\012\002\012\002\000\000\021\004\000\000\086\001\000\000\000\000\ +\012\002\000\000\183\000\000\000\095\001\000\000\000\000\087\001\ +\088\001\000\000\000\000\000\000\012\002\012\002\024\004\073\001\ +\074\001\000\000\089\001\090\001\091\001\092\001\093\001\075\001\ +\000\000\000\000\000\000\000\000\023\004\076\001\077\001\000\000\ +\078\001\000\000\000\000\000\000\095\001\000\000\000\000\000\000\ +\000\000\079\001\000\000\000\000\000\000\000\000\020\004\073\001\ +\074\001\000\000\080\001\000\000\000\000\000\000\000\000\075\001\ +\081\001\082\001\083\001\084\001\085\001\076\001\077\001\000\000\ +\078\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\079\001\000\000\086\001\000\000\000\000\000\000\000\000\ +\183\000\000\000\080\001\000\000\000\000\087\001\088\001\000\000\ +\081\001\082\001\083\001\084\001\085\001\000\000\000\000\000\000\ +\089\001\090\001\091\001\092\001\093\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\086\001\025\004\000\000\000\000\000\000\ +\183\000\000\000\095\001\000\000\000\000\087\001\088\001\000\000\ +\000\000\000\000\000\000\000\000\022\004\073\001\074\001\000\000\ +\089\001\090\001\091\001\092\001\093\001\075\001\000\000\000\000\ +\000\000\080\004\000\000\076\001\077\001\000\000\078\001\000\000\ +\000\000\000\000\095\001\000\000\000\000\000\000\000\000\079\001\ +\000\000\000\000\000\000\000\000\024\004\073\001\074\001\000\000\ +\080\001\000\000\000\000\000\000\000\000\075\001\081\001\082\001\ +\083\001\084\001\085\001\076\001\077\001\000\000\078\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\079\001\ +\000\000\086\001\000\000\000\000\000\000\000\000\183\000\000\000\ +\080\001\000\000\000\000\087\001\088\001\000\000\081\001\082\001\ +\083\001\084\001\085\001\000\000\000\000\000\000\089\001\090\001\ +\091\001\092\001\093\001\000\000\000\000\000\000\000\000\000\000\ +\081\004\086\001\000\000\000\000\000\000\000\000\183\000\000\000\ +\095\001\000\000\000\000\087\001\088\001\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\089\001\090\001\ +\091\001\092\001\093\001\026\005\073\001\074\001\000\000\000\000\ +\000\000\000\000\082\004\000\000\075\001\000\000\000\000\000\000\ +\095\001\000\000\076\001\077\001\000\000\078\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\079\001\000\000\ +\000\000\000\000\000\000\028\005\073\001\074\001\000\000\080\001\ +\000\000\000\000\000\000\000\000\075\001\081\001\082\001\083\001\ +\084\001\085\001\076\001\077\001\000\000\078\001\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\079\001\000\000\ +\086\001\000\000\000\000\000\000\000\000\183\000\000\000\080\001\ +\000\000\000\000\087\001\088\001\000\000\081\001\082\001\083\001\ +\084\001\085\001\000\000\000\000\000\000\089\001\090\001\091\001\ +\092\001\093\001\000\000\000\000\000\000\000\000\027\005\000\000\ +\086\001\000\000\000\000\000\000\000\000\183\000\000\000\095\001\ +\000\000\000\000\087\001\088\001\000\000\000\000\000\000\000\000\ +\000\000\030\005\073\001\074\001\000\000\089\001\090\001\091\001\ +\092\001\093\001\075\001\000\000\000\000\000\000\000\000\029\005\ +\076\001\077\001\000\000\078\001\000\000\000\000\000\000\095\001\ +\000\000\000\000\000\000\000\000\079\001\000\000\000\000\000\000\ +\000\000\026\005\073\001\074\001\000\000\080\001\000\000\000\000\ +\000\000\000\000\075\001\081\001\082\001\083\001\084\001\085\001\ +\076\001\077\001\000\000\078\001\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\079\001\000\000\086\001\000\000\ +\000\000\000\000\000\000\183\000\000\000\080\001\000\000\000\000\ +\087\001\088\001\000\000\081\001\082\001\083\001\084\001\085\001\ +\000\000\000\000\000\000\089\001\090\001\091\001\092\001\093\001\ +\000\000\000\000\000\000\000\000\000\000\000\000\086\001\031\005\ +\000\000\000\000\000\000\183\000\000\000\095\001\000\000\000\000\ +\087\001\088\001\000\000\000\000\000\000\000\000\000\000\028\005\ +\073\001\074\001\000\000\089\001\090\001\091\001\092\001\093\001\ +\075\001\000\000\000\000\000\000\064\005\000\000\076\001\077\001\ +\000\000\078\001\000\000\000\000\000\000\095\001\000\000\000\000\ +\000\000\000\000\079\001\000\000\000\000\000\000\000\000\030\005\ +\073\001\074\001\000\000\080\001\000\000\000\000\000\000\000\000\ +\075\001\081\001\082\001\083\001\084\001\085\001\076\001\077\001\ +\000\000\078\001\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\079\001\000\000\086\001\000\000\000\000\000\000\ +\000\000\183\000\000\000\080\001\000\000\000\000\087\001\088\001\ +\000\000\081\001\082\001\083\001\084\001\085\001\000\000\000\000\ +\000\000\089\001\090\001\091\001\092\001\093\001\000\000\000\000\ +\000\000\000\000\000\000\065\005\086\001\073\001\074\001\000\000\ +\000\000\183\000\000\000\095\001\000\000\075\001\087\001\088\001\ +\000\000\000\000\000\000\076\001\077\001\000\000\078\001\000\000\ +\000\000\089\001\090\001\091\001\092\001\093\001\000\000\079\001\ +\000\000\000\000\000\000\000\000\000\000\066\005\000\000\000\000\ +\080\001\000\000\000\000\095\001\000\000\000\000\081\001\082\001\ +\083\001\084\001\085\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\086\001\000\000\000\000\000\000\000\000\183\000\000\000\ +\000\000\000\000\000\000\087\001\088\001\073\001\074\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\075\001\089\001\090\001\ +\091\001\092\001\093\001\076\001\077\001\000\000\078\001\000\000\ +\000\000\000\000\000\000\094\001\000\000\111\004\000\000\079\001\ +\095\001\000\000\000\000\000\000\000\000\073\001\074\001\000\000\ +\080\001\000\000\000\000\000\000\000\000\075\001\081\001\082\001\ +\083\001\084\001\085\001\076\001\077\001\000\000\078\001\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\079\001\ +\000\000\086\001\000\000\000\000\000\000\000\000\183\000\000\000\ +\080\001\000\000\000\000\087\001\088\001\000\000\081\001\082\001\ +\083\001\084\001\085\001\000\000\000\000\000\000\089\001\090\001\ +\091\001\092\001\093\001\000\000\000\000\000\000\000\000\000\000\ +\000\000\086\001\212\000\212\000\000\000\000\000\183\000\000\000\ +\095\001\000\000\212\000\087\001\088\001\000\000\000\000\000\000\ +\212\000\212\000\000\000\000\000\000\000\000\000\089\001\090\001\ +\091\001\092\001\093\001\000\000\212\000\000\000\000\000\000\000\ +\000\000\000\000\073\001\074\001\000\000\212\000\000\000\000\000\ +\095\001\000\000\075\001\212\000\212\000\212\000\212\000\212\000\ +\076\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\079\001\000\000\212\000\000\000\ +\000\000\000\000\000\000\212\000\000\000\080\001\000\000\000\000\ +\212\000\212\000\000\000\081\001\082\001\083\001\084\001\085\001\ +\091\000\000\000\000\000\212\000\212\000\212\000\212\000\212\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\086\001\092\000\ +\016\000\000\000\000\000\183\000\000\000\212\000\000\000\000\000\ +\087\001\088\001\000\000\000\000\093\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\089\001\090\001\091\001\092\001\093\001\ +\000\000\000\000\133\000\000\000\134\000\135\000\030\000\031\000\ +\136\000\000\000\000\000\137\000\138\000\095\001\000\000\035\000\ +\000\000\000\000\000\000\000\000\000\000\094\000\000\000\000\000\ +\000\000\000\000\000\000\041\000\139\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\140\000\141\000\000\000\000\000\ +\000\000\000\000\000\000\095\000\142\000\000\000\000\000\000\000\ +\000\000\000\000\000\000\000\000\000\000\000\000\000\000\096\000\ +\143\000\144\000\052\000" + +let yycheck = "\005\000\ +\002\000\007\000\002\000\198\000\206\000\198\000\195\000\133\000\ +\127\001\133\000\133\000\010\000\136\000\020\001\233\001\201\000\ +\160\000\002\000\001\002\002\000\002\000\005\000\095\000\001\000\ +\153\002\217\000\153\002\219\000\139\000\127\001\025\003\186\001\ +\021\003\095\002\107\000\050\003\002\000\168\003\002\000\154\000\ +\240\002\029\000\002\000\002\000\216\003\176\003\088\004\135\000\ +\084\003\045\004\003\000\004\000\167\000\128\000\000\000\130\000\ +\010\005\031\000\000\000\003\005\173\004\035\000\215\004\000\000\ +\183\001\017\001\246\002\045\000\057\000\131\002\213\002\157\001\ +\000\001\159\001\059\005\014\005\064\001\003\000\218\003\027\000\ +\074\001\000\001\037\001\094\001\066\001\000\001\091\001\075\001\ +\064\001\065\001\095\001\000\001\164\004\095\000\188\004\095\000\ +\000\000\079\001\109\001\027\001\052\001\241\003\000\001\091\001\ +\050\001\107\000\000\001\107\000\000\000\064\001\095\000\199\000\ +\095\000\095\000\108\001\000\001\010\001\000\001\027\001\118\000\ +\035\001\000\001\107\000\000\001\107\000\107\000\023\005\133\000\ +\200\004\095\000\136\000\095\000\138\000\139\000\097\002\095\000\ +\095\000\000\001\000\001\037\001\015\001\107\000\141\000\107\000\ +\059\001\130\005\015\001\107\000\107\000\064\001\065\001\095\005\ +\000\001\069\004\000\001\161\000\162\000\008\001\164\000\074\001\ +\000\001\100\005\086\003\091\001\000\001\027\001\094\001\095\001\ +\174\000\175\000\133\002\124\000\091\001\126\000\010\001\128\000\ +\095\001\130\000\001\000\030\001\003\000\004\000\091\001\066\001\ +\099\001\001\005\095\001\074\003\136\000\066\001\073\001\197\000\ +\198\000\126\001\109\001\201\000\073\001\095\001\092\001\184\005\ +\126\000\095\001\004\001\041\005\055\001\000\001\008\001\092\001\ +\162\005\183\000\184\000\094\001\091\001\015\001\065\001\102\003\ +\018\001\094\001\000\001\094\001\108\001\059\005\045\000\000\001\ +\000\001\094\001\066\001\000\001\091\001\091\001\000\001\000\001\ +\115\001\095\001\057\000\108\003\022\001\222\005\115\001\014\001\ +\000\001\010\001\037\001\091\001\065\001\000\001\019\001\095\001\ +\094\001\124\004\037\005\190\001\127\004\026\001\094\001\106\001\ +\092\001\120\002\109\001\095\001\184\003\197\001\000\001\199\001\ +\066\001\248\002\066\001\027\001\071\001\006\001\018\001\073\001\ +\224\001\002\006\213\005\048\001\092\005\000\001\120\002\065\001\ +\067\005\084\001\150\001\083\001\000\001\101\005\124\005\060\001\ +\109\001\157\001\065\001\159\001\130\005\000\001\067\001\068\001\ +\159\002\070\001\166\001\167\001\095\001\124\000\000\001\126\000\ +\243\001\128\000\033\003\130\000\094\001\248\001\000\001\113\001\ +\094\001\181\001\169\001\092\001\102\005\011\000\094\001\000\001\ +\150\002\237\004\238\004\092\001\094\001\144\001\095\001\146\001\ +\199\003\148\001\185\001\091\001\026\000\190\005\067\001\095\001\ +\026\001\000\001\111\001\094\001\000\001\229\001\000\001\031\006\ +\092\001\026\001\184\005\185\005\066\001\008\001\044\000\000\001\ +\029\002\091\001\014\001\092\001\004\001\095\001\000\001\017\001\ +\008\001\021\005\030\004\059\002\000\001\039\002\000\001\015\001\ +\004\001\000\001\018\001\094\001\008\001\014\006\010\001\016\006\ +\092\001\127\001\014\001\015\001\066\001\004\001\018\001\008\001\ +\222\005\008\001\080\000\094\001\082\000\083\000\000\001\027\001\ +\015\001\027\001\033\002\018\001\094\001\137\005\094\001\000\001\ +\150\001\160\004\092\001\000\001\184\004\065\001\066\001\157\001\ +\108\001\159\001\098\004\092\001\000\001\109\001\110\001\007\001\ +\166\001\167\001\066\001\169\001\002\006\113\001\008\001\008\001\ +\008\001\000\001\212\005\000\001\000\001\092\001\066\001\181\001\ +\039\003\092\001\094\001\185\001\094\001\073\001\023\001\189\001\ +\190\001\058\004\091\001\066\001\030\001\030\001\030\001\144\001\ +\015\001\146\001\017\001\148\001\094\001\039\003\093\002\091\001\ +\092\001\091\001\094\001\095\001\094\001\095\001\023\002\094\001\ +\214\001\215\001\216\001\092\001\053\001\055\001\055\001\055\001\ +\222\001\024\001\166\001\167\001\000\001\113\001\121\003\065\001\ +\065\001\065\001\000\001\090\003\094\001\052\001\010\001\037\004\ +\148\005\096\003\113\001\092\001\186\000\243\001\244\001\027\001\ +\223\003\094\001\248\001\000\000\067\001\000\001\252\001\091\001\ +\090\003\255\001\000\001\095\001\202\000\014\001\096\003\010\001\ +\090\001\022\001\008\002\009\002\000\000\092\001\091\001\091\001\ +\106\001\106\001\106\001\109\001\109\001\109\001\014\001\008\001\ +\000\001\023\002\024\002\036\001\110\001\023\002\066\001\023\002\ +\008\002\009\002\150\002\033\002\017\005\073\001\022\001\000\001\ +\232\004\039\002\008\001\018\001\180\002\014\001\023\002\023\002\ +\023\002\023\002\105\001\036\001\050\002\240\002\161\002\064\001\ +\047\002\008\001\008\001\162\002\163\002\027\002\017\001\047\001\ +\092\001\023\002\027\001\023\002\057\005\091\001\036\001\023\002\ +\023\002\144\001\141\002\146\001\187\003\148\001\018\002\115\001\ +\000\001\094\001\203\004\025\001\064\002\065\002\095\001\025\003\ +\097\001\092\001\000\001\018\001\095\001\091\001\025\003\093\002\ +\025\003\187\003\017\001\019\001\109\001\217\002\094\001\219\002\ +\046\001\216\003\026\001\092\001\219\003\018\001\079\001\037\001\ +\235\005\097\001\098\001\091\001\097\005\092\001\040\003\094\001\ +\109\005\237\002\120\002\063\002\090\002\019\001\092\001\108\005\ +\048\001\219\003\091\001\115\001\018\001\094\001\095\001\063\003\ +\064\001\065\003\064\001\094\001\060\001\092\001\092\001\000\001\ +\012\001\065\001\000\000\066\001\068\001\004\001\070\001\140\005\ +\150\002\224\001\048\001\153\002\066\001\014\001\139\005\022\001\ +\017\001\159\002\160\002\031\001\162\002\163\002\060\001\094\001\ +\110\001\111\001\157\005\027\001\114\001\083\001\068\001\117\001\ +\070\001\014\001\176\002\170\002\018\001\109\001\050\001\181\002\ +\160\002\094\001\167\005\042\004\186\002\003\000\004\000\111\001\ +\006\000\000\001\049\004\022\001\141\002\172\004\196\002\197\002\ +\176\002\008\001\053\003\071\001\000\001\133\003\092\001\072\005\ +\042\004\072\005\186\002\192\005\036\003\064\001\069\004\049\004\ +\084\001\111\001\073\001\217\002\034\000\219\002\027\001\019\001\ +\022\001\049\003\224\002\090\001\065\001\066\001\026\001\229\002\ +\027\001\101\001\047\001\234\003\235\003\094\001\094\001\237\002\ +\238\002\027\001\240\002\105\003\059\002\105\003\033\002\067\001\ +\224\002\100\003\003\001\000\001\250\002\049\001\092\001\004\001\ +\094\001\094\001\109\001\008\001\235\004\010\001\000\001\090\001\ +\060\001\014\001\126\003\233\005\234\005\134\005\117\003\136\005\ +\068\001\204\003\070\001\204\003\251\004\000\000\027\001\249\002\ +\089\003\019\001\030\001\025\003\097\001\098\001\000\001\040\001\ +\026\001\094\001\004\001\066\001\090\001\030\001\008\001\150\004\ +\015\001\039\003\040\003\094\001\014\001\015\001\115\001\002\001\ +\018\001\000\001\093\002\055\001\094\001\047\003\048\001\047\003\ +\126\000\022\001\056\003\111\001\150\004\065\001\055\001\094\001\ +\003\001\090\001\060\001\018\001\073\001\022\001\141\002\000\001\ +\065\001\067\001\068\001\050\005\070\001\188\004\189\004\045\006\ +\056\003\003\004\008\001\000\001\008\001\110\001\091\001\092\001\ +\199\004\094\001\095\001\066\001\090\003\014\001\047\001\089\003\ +\066\001\089\003\096\003\189\004\036\001\064\001\106\001\094\003\ +\215\004\109\001\027\001\105\003\113\001\199\004\108\003\066\001\ +\089\003\106\001\089\003\089\003\109\001\111\001\035\001\117\003\ +\062\002\000\001\113\003\193\000\094\001\088\001\237\004\238\004\ +\126\003\016\001\200\000\089\003\007\002\089\003\132\003\064\001\ +\065\001\089\003\089\003\014\002\027\001\067\001\059\001\067\001\ +\097\001\098\001\000\001\064\001\065\001\112\001\004\001\053\001\ +\030\001\055\001\008\001\064\001\010\001\074\001\079\001\095\001\ +\014\001\015\001\064\001\065\001\018\001\055\001\021\005\098\004\ +\023\005\053\001\066\001\055\001\056\001\027\001\064\001\019\001\ +\000\001\055\001\249\002\022\003\004\001\065\001\099\001\181\003\ +\008\001\064\001\065\001\065\001\097\001\187\003\112\004\015\001\ +\109\001\191\003\018\001\038\003\051\005\052\005\094\001\042\003\ +\109\001\199\003\022\001\201\003\059\005\049\001\204\003\109\001\ +\206\003\207\003\208\003\000\000\066\001\211\003\212\003\191\003\ +\060\001\064\004\216\003\073\001\218\003\219\003\112\001\199\003\ +\068\001\109\001\070\001\149\004\106\001\089\004\073\003\109\001\ +\230\003\014\001\062\001\211\003\035\001\091\001\092\001\053\001\ +\094\001\095\001\066\001\241\003\022\001\065\001\027\001\061\001\ +\055\001\022\001\064\001\045\001\046\001\022\001\230\003\246\003\ +\066\001\064\001\018\001\113\001\059\001\003\004\040\001\000\000\ +\008\001\074\000\065\001\111\001\190\004\014\001\094\001\019\001\ +\003\001\083\001\047\001\130\005\000\001\000\001\047\001\023\001\ +\094\001\004\001\027\001\066\001\098\001\008\001\030\001\010\001\ +\064\001\083\001\073\001\014\001\015\001\148\005\015\001\019\001\ +\105\000\018\001\079\001\109\001\042\004\232\004\026\001\102\001\ +\027\001\112\001\100\001\049\004\000\000\053\001\109\001\055\001\ +\111\001\122\000\194\004\014\001\058\004\000\001\035\001\067\001\ +\129\000\065\001\064\004\178\005\059\004\049\001\000\001\069\004\ +\027\001\184\005\000\001\030\006\115\001\109\001\079\001\004\001\ +\060\001\006\005\003\001\008\001\010\001\065\001\059\001\066\001\ +\068\001\066\001\070\001\089\004\065\001\018\001\073\001\020\005\ +\035\001\064\001\000\001\064\001\098\004\099\004\027\001\075\001\ +\000\001\103\004\106\001\037\001\064\001\109\001\065\001\222\005\ +\091\001\092\001\112\004\094\001\095\001\014\001\000\000\075\001\ +\059\001\094\001\022\001\099\004\123\005\064\001\065\001\103\004\ +\064\001\102\001\026\001\111\001\057\005\035\001\113\001\074\001\ +\109\001\014\001\111\001\003\001\112\001\066\001\109\001\110\001\ +\109\001\085\004\008\005\002\006\008\005\008\005\027\001\149\004\ +\150\004\084\005\152\004\084\005\112\001\059\001\064\001\014\006\ +\099\001\016\006\064\001\065\001\162\004\065\001\064\001\000\001\ +\065\001\066\001\109\001\003\001\074\001\109\001\035\001\037\005\ +\152\004\037\005\037\005\064\001\065\001\014\001\107\005\000\001\ +\017\001\064\001\162\004\066\001\065\001\022\001\188\004\189\004\ +\190\004\091\001\027\001\186\004\075\001\099\001\059\001\007\000\ +\000\001\199\004\019\001\109\001\065\001\203\004\035\001\109\001\ +\031\001\026\001\027\001\000\001\064\001\138\005\047\001\004\001\ +\064\001\215\004\000\001\008\001\040\001\010\001\160\005\075\001\ +\109\001\014\001\157\005\050\001\157\005\018\001\059\001\048\001\ +\049\001\112\001\232\004\064\001\065\001\037\001\027\001\237\004\ +\238\004\102\001\022\001\060\001\026\001\074\001\066\001\245\004\ +\109\001\097\001\067\001\068\001\066\002\070\001\064\001\065\001\ +\064\001\096\001\091\001\068\001\112\001\109\001\095\001\000\001\ +\097\001\098\001\008\005\009\005\010\005\245\004\099\001\066\001\ +\067\001\000\001\088\001\027\001\013\001\066\001\073\001\021\005\ +\109\001\023\005\115\001\064\001\073\001\065\001\100\002\101\002\ +\022\001\026\001\010\005\028\001\029\001\064\001\111\001\037\005\ +\064\001\096\001\112\001\041\005\110\001\109\001\091\001\092\001\ +\041\001\094\001\095\001\004\001\000\001\090\001\037\001\008\001\ +\004\001\022\001\066\001\064\001\008\001\059\005\010\001\090\001\ +\115\001\018\001\014\001\060\001\113\001\067\005\018\001\022\001\ +\109\001\110\001\072\005\068\001\031\001\067\001\004\001\027\001\ +\145\001\074\001\008\001\110\001\082\005\109\001\084\005\080\001\ +\008\001\015\001\088\005\014\001\018\001\000\000\066\001\050\001\ +\064\001\161\000\162\000\092\001\065\001\027\001\000\001\096\001\ +\109\001\004\001\082\005\105\005\064\001\008\001\174\000\175\000\ +\088\005\066\001\065\001\108\001\015\001\066\001\111\001\018\001\ +\073\001\019\001\100\001\000\001\073\001\073\001\124\005\000\000\ +\026\001\105\005\035\001\064\001\130\005\197\000\204\002\205\002\ +\134\005\109\001\136\005\092\001\066\001\109\001\000\000\091\001\ +\092\001\094\001\094\001\095\001\064\001\026\001\148\005\049\001\ +\000\001\093\005\059\001\225\002\096\005\064\001\018\002\157\005\ +\065\001\064\001\060\001\066\001\035\001\113\001\115\001\066\001\ +\009\000\239\002\068\001\012\000\070\001\022\001\015\000\016\000\ +\109\001\018\001\019\000\020\000\021\000\022\000\023\000\181\005\ +\025\000\088\001\184\005\185\005\059\001\037\001\027\001\032\000\ +\001\002\109\001\065\001\036\000\000\001\102\001\039\000\040\000\ +\022\001\000\001\109\001\063\002\109\001\181\005\204\005\048\000\ +\049\000\112\001\030\001\052\000\053\000\111\001\023\001\155\005\ +\156\005\215\005\158\005\159\005\019\001\000\001\026\001\066\001\ +\222\005\047\001\066\001\026\001\204\005\066\001\050\001\102\001\ +\226\005\073\001\226\005\233\005\234\005\066\001\109\001\215\005\ +\083\001\239\005\240\005\057\003\064\001\065\001\027\001\026\001\ +\022\001\048\001\091\000\092\000\093\000\094\000\094\001\096\000\ +\070\003\233\005\234\005\027\001\002\006\060\001\065\001\239\005\ +\240\005\108\001\008\006\000\001\067\001\068\001\073\001\070\001\ +\014\006\015\006\016\006\115\001\004\001\066\001\000\001\021\006\ +\008\001\101\001\000\001\095\001\027\001\066\001\106\001\015\001\ +\008\006\109\001\018\001\027\001\010\001\026\001\083\001\015\006\ +\027\001\035\001\066\001\027\001\042\006\021\006\004\001\045\006\ +\026\001\146\000\008\001\000\001\028\001\051\006\052\006\027\001\ +\111\001\015\001\000\001\124\002\018\001\158\000\159\000\108\001\ +\027\001\059\001\042\006\066\001\000\001\045\006\064\001\065\001\ +\095\001\170\000\066\001\051\006\052\006\026\001\018\006\066\001\ +\074\001\004\001\066\001\093\001\026\001\008\001\095\001\019\001\ +\185\000\029\006\066\001\014\001\015\001\000\001\026\001\018\001\ +\003\001\194\000\074\001\109\001\040\006\041\006\088\001\066\001\ +\080\001\099\001\013\001\083\001\066\001\179\003\180\003\022\001\ +\065\001\000\000\000\001\109\001\048\001\064\001\065\001\026\001\ +\073\001\028\001\029\001\193\003\194\003\189\001\112\001\000\001\ +\060\001\040\001\200\003\004\001\093\001\019\001\041\001\008\001\ +\068\001\010\001\070\001\209\003\026\001\014\001\004\001\066\001\ +\014\001\018\001\008\001\017\001\109\001\065\001\214\001\215\001\ +\216\001\060\001\027\001\071\001\018\001\064\001\222\001\066\001\ +\067\001\068\001\048\001\049\001\093\001\027\001\073\001\074\001\ +\084\001\064\001\065\001\094\001\004\001\080\001\060\001\022\001\ +\008\001\018\001\019\001\111\001\109\001\067\001\068\001\004\001\ +\070\001\092\001\018\001\008\001\252\001\096\001\097\001\065\001\ +\066\001\100\001\015\001\027\001\055\001\018\001\094\001\040\001\ +\073\001\108\001\109\001\004\001\111\001\064\001\027\001\008\001\ +\004\001\065\001\066\001\067\001\008\001\054\001\015\001\024\003\ +\024\002\058\001\091\001\092\001\014\001\094\001\095\001\017\001\ +\016\001\111\001\027\001\000\001\069\001\000\000\022\001\027\001\ +\093\001\027\001\043\003\027\001\000\001\010\001\065\001\048\003\ +\113\001\009\000\050\002\077\001\012\000\066\001\010\001\015\000\ +\016\000\003\001\000\001\019\000\020\000\021\000\022\000\023\000\ +\097\001\025\000\053\001\100\001\055\001\102\001\071\003\104\001\ +\112\001\066\001\066\001\067\001\036\000\019\001\065\001\039\000\ +\040\000\064\001\065\001\064\001\026\001\027\001\246\001\247\001\ +\048\000\049\000\096\004\064\001\052\000\053\000\100\004\166\001\ +\167\001\092\001\099\003\105\004\004\001\134\001\008\001\136\001\ +\008\001\014\001\048\001\049\001\036\001\000\000\014\001\015\001\ +\073\001\000\001\018\001\015\001\122\004\123\004\060\001\152\001\ +\095\001\014\001\128\004\022\001\109\001\067\001\068\001\014\001\ +\070\001\014\001\017\001\091\000\092\000\093\000\094\000\022\001\ +\096\000\170\001\171\001\053\001\027\001\055\001\090\001\043\001\ +\044\001\045\001\046\001\153\004\022\001\014\001\064\001\065\001\ +\095\001\092\001\095\001\053\001\053\001\055\001\055\001\103\001\ +\047\001\022\001\066\001\196\001\165\003\027\001\066\001\065\001\ +\065\001\111\001\203\001\071\001\072\001\092\001\207\001\092\001\ +\109\001\000\001\091\001\094\001\003\001\181\002\092\001\083\001\ +\084\001\085\001\086\001\220\001\221\001\053\001\013\001\055\001\ +\225\001\094\001\227\001\109\001\196\002\197\002\158\000\159\000\ +\100\001\065\001\092\001\026\001\091\001\028\001\029\001\115\001\ +\095\001\242\001\097\001\098\001\000\001\053\001\109\001\055\001\ +\014\001\040\001\041\001\220\003\221\003\254\001\046\001\000\002\ +\001\002\065\001\109\001\233\004\115\001\229\002\020\001\019\001\ +\109\001\115\001\194\000\236\003\062\001\060\001\026\001\055\001\ +\063\001\000\001\248\004\249\004\067\001\068\001\109\001\022\001\ +\249\003\108\001\002\001\074\001\109\001\073\001\031\002\000\000\ +\100\001\080\001\073\001\027\001\019\001\049\001\109\001\092\001\ +\009\004\015\001\094\001\026\001\000\001\092\001\064\001\064\001\ +\060\001\096\001\097\001\053\001\054\001\055\001\056\001\067\001\ +\068\001\065\001\070\001\008\001\109\001\108\001\064\001\065\001\ +\111\001\040\001\049\001\014\001\018\001\000\001\055\001\062\001\ +\003\001\062\001\059\001\044\004\062\001\060\001\063\001\064\001\ +\064\001\027\001\013\001\014\001\067\001\068\001\017\001\070\001\ +\092\001\094\001\018\001\019\001\064\001\078\001\014\001\026\001\ +\027\001\028\001\029\001\111\001\079\001\075\005\053\001\054\001\ +\055\001\056\001\014\001\109\001\006\001\040\001\041\001\073\001\ +\040\001\064\001\065\001\109\001\094\001\075\001\119\002\064\001\ +\073\001\122\002\091\004\124\002\109\001\000\001\054\001\095\001\ +\111\001\060\001\058\001\092\001\063\001\022\001\065\001\066\001\ +\067\001\068\001\014\001\094\001\027\001\000\001\073\001\074\001\ +\019\001\040\001\094\001\073\001\055\001\080\001\000\000\026\001\ +\059\001\027\001\013\001\027\001\063\001\064\001\109\001\014\001\ +\021\001\092\001\086\001\094\001\132\003\096\001\097\001\026\001\ +\064\001\028\001\029\001\078\001\173\002\048\001\062\001\090\001\ +\062\001\108\001\152\005\062\001\111\001\062\001\041\001\062\001\ +\115\001\060\001\155\004\014\001\157\004\003\001\191\002\014\001\ +\193\002\068\001\195\002\070\001\086\001\064\001\199\002\027\001\ +\091\001\060\001\109\001\095\001\101\001\073\001\027\001\066\001\ +\067\001\068\001\094\001\088\001\094\001\181\003\094\001\074\001\ +\094\001\027\001\014\001\220\002\014\001\080\001\015\001\020\001\ +\022\001\094\001\200\005\196\004\053\001\008\001\062\001\062\001\ +\201\004\092\001\208\005\080\001\111\001\096\001\206\003\207\003\ +\208\003\242\002\170\001\000\000\212\003\062\001\247\002\248\002\ +\014\001\108\001\218\003\013\001\111\001\064\001\223\004\073\001\ +\094\001\002\003\112\001\004\003\112\001\094\001\065\001\014\001\ +\073\001\021\001\028\001\029\001\242\005\088\001\015\003\016\003\ +\073\001\241\003\094\001\203\001\091\001\014\001\014\001\041\001\ +\014\001\026\003\095\001\014\001\064\001\065\001\255\004\000\005\ +\033\003\007\006\073\001\071\001\027\001\019\001\027\001\022\001\ +\091\001\077\001\060\001\044\003\013\001\063\001\088\001\014\001\ +\084\001\018\005\068\001\112\001\014\001\022\005\090\001\014\001\ +\074\001\014\001\000\000\028\001\029\001\000\000\080\001\096\001\ +\096\001\092\001\067\003\015\001\109\001\109\001\044\006\008\001\ +\041\001\109\001\110\001\044\005\036\001\065\001\096\001\092\001\ +\036\001\036\001\092\001\007\000\064\001\090\001\087\003\011\000\ +\092\001\064\001\108\001\060\001\094\001\111\001\063\001\040\001\ +\044\001\045\001\046\001\068\001\036\001\070\005\026\000\031\002\ +\053\001\074\001\064\001\053\001\124\000\086\003\064\001\080\001\ +\064\001\091\001\115\003\015\006\117\001\118\003\172\003\120\003\ +\044\000\064\001\064\001\071\001\072\001\064\001\064\001\096\001\ +\097\001\178\005\131\003\235\002\099\002\062\002\135\003\083\001\ +\084\001\085\001\086\001\108\001\109\005\142\003\111\001\138\001\ +\000\001\146\003\084\005\000\000\117\005\115\001\000\001\093\002\ +\100\001\003\001\181\003\223\001\080\000\219\001\082\000\083\000\ +\180\002\162\000\163\003\013\001\008\004\166\003\222\004\017\001\ +\000\000\170\003\184\004\140\005\022\001\219\002\143\005\181\001\ +\026\001\027\001\028\001\029\001\130\001\007\000\001\000\002\000\ +\003\000\004\000\005\000\006\000\007\000\072\005\057\005\041\001\ +\109\005\195\004\195\003\255\255\255\255\255\255\255\255\055\001\ +\026\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\255\255\255\255\222\003\223\003\073\001\ +\074\001\081\001\255\255\255\255\255\255\255\255\080\001\232\003\ +\233\003\089\001\090\001\255\255\255\255\161\000\162\000\255\255\ +\164\000\097\001\092\001\255\255\094\001\255\255\096\001\097\001\ +\249\003\255\255\174\000\175\000\108\001\109\001\110\001\255\255\ +\013\001\255\255\108\001\023\001\255\255\111\001\186\000\255\255\ +\255\255\115\001\255\255\255\255\255\255\255\255\255\255\028\001\ +\029\001\197\000\198\000\255\255\064\001\065\001\202\000\255\255\ +\255\255\255\255\255\255\071\001\041\001\255\255\255\005\255\255\ +\033\004\255\255\035\004\055\001\255\255\057\001\058\001\059\001\ +\084\001\061\001\043\004\255\255\064\001\065\001\090\001\060\001\ +\255\255\255\255\063\001\255\255\053\004\006\001\255\255\068\001\ +\025\006\026\006\255\255\255\255\142\000\074\001\255\255\255\255\ +\033\006\066\004\110\001\080\001\255\255\255\255\090\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\097\001\160\000\161\000\ +\162\000\050\006\164\000\096\001\097\001\255\255\255\255\064\001\ +\065\001\109\001\110\001\255\255\174\000\175\000\071\001\108\001\ +\255\255\255\255\111\001\255\255\255\255\025\001\055\001\255\255\ +\057\001\058\001\059\001\084\001\061\001\255\255\255\255\064\001\ +\065\001\090\001\115\004\197\000\198\000\118\004\255\255\201\000\ +\255\255\255\255\046\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\109\001\110\001\135\004\255\255\ +\137\004\090\001\139\004\067\003\141\004\142\004\255\255\255\255\ +\097\001\146\004\255\255\000\001\255\255\255\255\151\004\013\001\ +\255\255\154\004\255\255\156\004\109\001\110\001\000\000\255\255\ +\013\001\255\255\255\255\255\255\017\001\255\255\028\001\029\001\ +\000\001\255\255\255\255\172\004\255\255\026\001\027\001\028\001\ +\029\001\255\255\255\255\041\001\255\255\013\001\255\255\255\255\ +\255\255\255\255\110\001\111\001\041\001\255\255\114\001\255\255\ +\255\255\117\001\026\001\196\004\028\001\029\001\060\001\255\255\ +\201\004\063\001\255\255\255\255\255\255\255\255\068\001\060\001\ +\209\004\041\001\063\001\255\255\074\001\066\001\067\001\068\001\ +\255\255\255\255\080\001\006\001\073\001\074\001\255\255\255\255\ +\255\255\226\004\255\255\080\001\060\001\230\004\255\255\063\001\ +\255\255\255\255\235\004\255\255\068\001\255\255\255\255\092\001\ +\255\255\094\001\074\001\096\001\097\001\255\255\108\001\255\255\ +\080\001\111\001\251\004\252\004\255\255\254\004\255\255\108\001\ +\255\255\255\255\111\001\255\255\092\001\255\255\115\001\255\255\ +\096\001\189\001\190\001\012\005\055\001\255\255\057\001\058\001\ +\059\001\255\255\061\001\255\255\108\001\064\001\065\001\111\001\ +\255\255\255\255\108\001\255\255\255\255\255\255\255\255\255\255\ +\000\001\255\255\214\001\215\001\216\001\255\255\255\255\040\005\ +\255\255\255\255\222\001\255\255\045\005\255\255\255\255\090\001\ +\049\005\050\005\255\255\255\255\255\255\255\255\097\001\056\005\ +\138\001\255\255\255\255\255\255\255\255\255\255\255\255\243\001\ +\244\001\255\255\109\001\110\001\248\001\070\005\255\255\255\255\ +\252\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\083\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\099\005\255\255\024\002\255\255\255\255\104\005\ +\186\001\255\255\255\255\189\001\190\001\033\002\255\255\255\255\ +\255\255\081\001\255\255\255\255\117\005\255\255\255\255\255\255\ +\255\255\089\001\090\001\255\255\255\255\255\255\050\002\255\255\ +\007\000\097\001\255\255\255\255\214\001\215\001\216\001\255\255\ +\255\255\255\255\062\002\255\255\222\001\109\001\110\001\255\255\ +\255\255\146\005\255\255\229\001\255\255\255\255\151\005\255\255\ +\255\255\154\005\255\255\255\255\255\255\000\000\255\255\255\255\ +\161\005\243\001\244\001\255\255\165\005\255\255\248\001\255\255\ +\169\005\093\002\252\001\013\001\255\255\255\001\255\255\255\255\ +\255\255\255\255\179\005\255\255\255\255\007\002\255\255\255\255\ +\255\255\255\255\028\001\029\001\014\002\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\024\002\041\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\033\002\ +\255\255\255\255\255\255\007\000\255\255\039\002\255\255\011\000\ +\217\005\218\005\060\001\255\255\255\255\063\001\223\005\255\255\ +\050\002\255\255\068\001\053\002\255\255\230\005\026\000\255\255\ +\074\001\000\000\255\255\236\005\062\002\255\255\080\001\255\255\ +\255\255\255\255\255\255\244\005\245\005\255\255\255\255\255\255\ +\044\000\255\255\251\005\252\005\253\005\254\005\096\001\097\001\ +\255\255\181\002\255\255\255\255\255\255\255\255\255\255\255\255\ +\009\006\010\006\108\001\093\002\255\255\111\001\255\255\255\255\ +\196\002\197\002\255\255\255\255\255\255\255\255\023\006\024\006\ +\255\255\026\006\161\000\162\000\080\000\164\000\082\000\083\000\ +\255\255\034\006\255\255\255\255\255\255\007\000\218\002\174\000\ +\175\000\255\255\255\255\255\255\023\001\255\255\255\255\048\006\ +\255\255\229\002\255\255\255\255\255\255\054\006\055\006\255\255\ +\255\255\036\001\238\002\255\255\240\002\196\000\197\000\198\000\ +\255\255\055\001\255\255\057\001\058\001\059\001\255\255\061\001\ +\255\255\255\255\064\001\065\001\055\001\255\255\057\001\058\001\ +\059\001\133\000\061\001\255\255\255\255\064\001\065\001\000\000\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\180\002\181\002\090\001\025\003\255\255\255\255\ +\255\255\255\255\255\255\097\001\255\255\161\000\162\000\090\001\ +\164\000\255\255\196\002\197\002\255\255\255\255\097\001\109\001\ +\110\001\255\255\174\000\175\000\255\255\255\255\255\255\255\255\ +\255\255\255\255\109\001\110\001\255\255\255\255\186\000\255\255\ +\218\002\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\197\000\198\000\229\002\255\255\255\255\202\000\255\255\ +\255\255\255\255\000\001\255\255\238\002\000\001\240\002\255\255\ +\003\001\255\255\255\255\255\255\255\255\008\001\255\255\255\255\ +\250\002\255\255\013\001\014\001\255\255\255\255\255\255\255\255\ +\019\001\255\255\255\255\022\001\255\255\255\255\255\255\026\001\ +\063\001\028\001\029\001\255\255\255\255\255\255\255\255\161\000\ +\162\000\072\001\164\000\255\255\255\255\023\003\041\001\025\003\ +\255\255\255\255\255\255\255\255\174\000\175\000\255\255\255\255\ +\132\003\055\001\255\255\057\001\058\001\059\001\040\003\061\001\ +\255\255\060\001\064\001\065\001\063\001\255\255\065\001\066\001\ +\067\001\068\001\255\255\197\000\198\000\025\001\255\255\074\001\ +\255\255\000\001\255\255\081\001\079\001\080\001\255\255\255\255\ +\255\255\008\001\255\255\089\001\090\001\255\255\013\001\255\255\ +\255\255\092\001\046\001\097\001\255\255\096\001\097\001\255\255\ +\255\255\181\003\255\255\026\001\255\255\028\001\029\001\109\001\ +\110\001\108\001\255\255\255\255\111\001\255\255\255\255\097\003\ +\255\255\255\255\041\001\255\255\255\255\201\003\255\255\255\255\ +\204\003\255\255\206\003\207\003\208\003\255\255\255\255\255\255\ +\212\003\255\255\255\255\255\255\255\255\060\001\218\003\121\003\ +\063\001\255\255\255\255\066\001\067\001\068\001\255\255\255\255\ +\255\255\255\255\132\003\074\001\255\255\255\255\189\001\190\001\ +\000\000\080\001\110\001\111\001\255\255\241\003\114\001\255\255\ +\255\255\117\001\255\255\255\255\255\255\092\001\255\255\255\255\ +\255\255\096\001\097\001\255\255\255\255\255\255\213\001\214\001\ +\215\001\216\001\255\255\255\255\255\255\108\001\255\255\222\001\ +\111\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\150\001\181\003\013\001\255\255\255\255\255\255\ +\255\255\157\001\255\255\159\001\243\001\244\001\255\255\255\255\ +\255\255\248\001\255\255\028\001\029\001\252\001\255\255\201\003\ +\255\255\255\255\204\003\255\255\206\003\207\003\208\003\006\002\ +\041\001\255\255\212\003\255\255\255\255\255\255\255\255\255\255\ +\218\003\189\001\190\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\024\002\255\255\060\001\255\255\255\255\063\001\255\255\ +\255\255\000\001\033\002\068\001\255\255\255\255\255\255\241\003\ +\255\255\074\001\214\001\215\001\216\001\255\255\013\001\080\001\ +\255\255\255\255\222\001\050\002\255\255\255\255\098\004\255\255\ +\255\255\003\004\255\255\026\001\255\255\028\001\029\001\096\001\ +\097\001\255\255\255\255\255\255\255\255\255\255\255\255\243\001\ +\244\001\255\255\041\001\108\001\248\001\255\255\111\001\255\255\ +\252\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\000\000\036\004\255\255\255\255\060\001\093\002\255\255\ +\255\255\255\255\255\255\189\001\190\001\068\001\255\255\255\255\ +\255\255\255\255\255\255\074\001\024\002\255\255\255\255\255\255\ +\255\255\080\001\255\255\255\255\255\255\033\002\255\255\255\255\ +\255\255\255\255\255\255\255\255\214\001\215\001\216\001\255\255\ +\255\255\096\001\255\255\255\255\222\001\223\001\050\002\255\255\ +\255\255\255\255\255\255\255\255\255\255\108\001\255\255\255\255\ +\111\001\255\255\062\002\255\255\255\255\255\255\255\255\255\255\ +\098\004\243\001\244\001\255\255\255\255\255\255\248\001\255\255\ +\255\255\255\255\252\001\255\255\255\255\255\255\112\004\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\097\001\093\002\255\255\100\001\255\255\102\001\181\002\104\001\ +\255\255\255\255\255\255\255\255\232\004\255\255\024\002\255\255\ +\000\001\255\255\255\255\003\001\013\001\196\002\197\002\033\002\ +\255\255\255\255\255\255\149\004\255\255\013\001\255\255\255\255\ +\255\255\255\255\255\255\028\001\029\001\134\001\255\255\136\001\ +\050\002\255\255\026\001\255\255\028\001\029\001\255\255\255\255\ +\041\001\255\255\255\255\255\255\255\255\255\255\229\002\152\001\ +\040\001\041\001\150\002\255\255\255\255\255\255\255\255\238\002\ +\255\255\240\002\255\255\060\001\190\004\255\255\255\255\255\255\ +\194\004\255\255\255\255\068\001\060\001\255\255\000\000\063\001\ +\255\255\074\001\255\255\093\002\068\001\255\255\255\255\080\001\ +\255\255\181\002\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\096\001\ +\196\002\197\002\025\003\255\255\092\001\255\255\232\004\255\255\ +\096\001\097\001\255\255\108\001\255\255\255\255\111\001\255\255\ +\084\005\255\255\255\255\255\255\108\001\255\255\255\255\111\001\ +\225\001\255\255\227\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\229\002\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\238\002\255\255\240\002\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\254\001\255\255\000\002\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\000\001\255\255\181\002\003\001\255\255\255\255\255\255\ +\255\255\008\001\255\255\255\255\255\255\255\255\013\001\255\255\ +\103\003\255\255\196\002\197\002\019\001\025\003\028\000\029\000\ +\255\255\157\005\255\255\026\001\255\255\028\001\029\001\255\255\ +\255\255\255\255\255\255\255\255\168\005\255\255\255\255\255\255\ +\255\255\040\001\041\001\255\255\255\255\132\003\255\255\255\255\ +\255\255\255\255\084\005\229\002\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\238\002\060\001\240\002\255\255\ +\063\001\255\255\255\255\066\001\067\001\068\001\255\255\255\255\ +\255\255\255\255\073\001\074\001\255\255\255\255\084\000\085\000\ +\255\255\080\001\255\255\255\255\216\005\255\255\255\255\006\001\ +\255\255\008\001\255\255\255\255\255\255\092\001\181\003\255\255\ +\255\255\096\001\097\001\255\255\255\255\105\003\255\255\025\003\ +\255\255\255\255\110\003\255\255\255\255\108\001\119\002\255\255\ +\111\001\122\002\201\003\255\255\255\255\204\003\205\003\206\003\ +\207\003\208\003\000\000\157\005\255\255\212\003\255\255\255\255\ +\132\003\255\255\255\255\218\003\255\255\255\255\168\005\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\255\255\241\003\255\255\255\255\255\255\255\255\255\255\ +\000\001\255\255\081\001\255\255\255\255\255\255\000\001\255\255\ +\255\255\003\001\089\001\090\001\255\255\255\255\255\255\255\255\ +\255\255\181\003\097\001\013\001\255\255\255\255\216\005\017\001\ +\255\255\255\255\255\255\221\005\022\001\255\255\109\001\110\001\ +\026\001\027\001\028\001\029\001\255\255\201\003\255\255\255\255\ +\204\003\255\255\206\003\207\003\208\003\255\255\255\255\041\001\ +\212\003\255\255\132\003\220\002\255\255\255\255\218\003\055\001\ +\255\255\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\255\255\255\255\241\003\247\002\073\001\ +\074\001\081\001\255\255\255\255\255\255\255\255\080\001\255\255\ +\255\255\089\001\090\001\255\255\255\255\255\255\255\255\255\255\ +\255\255\097\001\092\001\181\003\094\001\255\255\096\001\097\001\ +\255\255\255\255\255\255\098\004\255\255\109\001\110\001\255\255\ +\255\255\255\255\108\001\255\255\255\255\111\001\255\255\201\003\ +\023\001\115\001\204\003\255\255\206\003\207\003\208\003\255\255\ +\255\255\255\255\212\003\255\255\255\255\036\001\255\255\255\255\ +\218\003\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\056\004\255\255\255\255\255\255\ +\055\001\255\255\057\001\058\001\059\001\255\255\061\001\241\003\ +\255\255\064\001\065\001\073\001\074\001\075\001\076\001\077\001\ +\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\ +\255\255\095\001\255\255\090\001\255\255\255\255\098\004\255\255\ +\255\255\255\255\097\001\255\255\255\255\107\001\255\255\255\255\ +\255\255\255\255\115\003\255\255\255\255\255\255\109\001\110\001\ +\255\255\255\255\120\001\000\000\255\255\255\255\255\255\255\255\ +\255\255\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\ +\022\001\232\004\024\001\025\001\026\001\027\001\028\001\029\001\ +\255\255\255\255\163\003\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\ +\098\004\255\255\255\255\255\255\255\255\255\255\060\001\061\001\ +\255\255\063\001\195\003\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\255\255\ +\094\001\095\001\096\001\097\001\098\001\255\255\100\001\232\003\ +\233\003\103\001\104\001\105\001\232\004\255\255\108\001\255\255\ +\255\255\111\001\255\255\255\255\255\255\115\001\000\001\255\255\ +\255\255\255\255\255\255\255\255\006\001\255\255\255\255\255\255\ +\255\255\255\255\012\001\255\255\255\255\084\005\255\255\255\255\ +\255\255\255\255\255\255\255\255\008\005\255\255\255\255\255\255\ +\255\255\015\002\028\001\255\255\030\001\031\001\020\002\255\255\ +\255\255\255\255\255\255\000\000\255\255\255\255\255\255\006\001\ +\033\004\008\001\255\255\255\255\255\255\255\255\255\255\255\255\ +\050\001\037\005\052\001\053\001\255\255\055\001\056\001\255\255\ +\255\255\059\001\255\255\255\255\053\004\255\255\064\001\065\001\ +\255\255\255\255\255\255\255\255\255\255\071\001\232\004\255\255\ +\255\255\255\255\064\002\065\002\255\255\255\255\255\255\255\255\ +\255\255\255\255\084\001\255\255\255\255\255\255\157\005\255\255\ +\055\001\255\255\057\001\058\001\059\001\255\255\061\001\097\001\ +\084\005\064\001\065\001\101\001\255\255\255\255\255\255\255\255\ +\106\001\255\255\255\255\109\001\110\001\099\002\255\255\255\255\ +\255\255\255\255\104\002\105\002\106\002\255\255\255\255\255\255\ +\255\255\255\255\255\255\090\001\255\255\092\001\255\255\255\255\ +\255\255\255\255\097\001\000\001\001\001\002\001\003\001\255\255\ +\255\255\255\255\255\255\008\001\009\001\010\001\109\001\110\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\154\004\255\255\156\004\255\255\255\255\255\255\036\001\ +\037\001\157\005\000\000\040\001\041\001\042\001\043\001\044\001\ +\045\001\046\001\084\005\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\ +\209\004\086\001\208\002\209\002\210\002\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\157\005\255\255\255\255\255\255\245\002\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\005\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\000\000\ +\255\255\255\255\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\040\005\ +\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\080\003\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\104\005\ +\255\255\255\255\255\255\080\001\081\001\082\001\083\001\084\001\ +\085\001\086\001\001\001\002\001\089\001\255\255\091\001\092\001\ +\255\255\094\001\095\001\096\001\097\001\098\001\255\255\100\001\ +\015\001\255\255\103\001\104\001\105\001\255\255\255\255\108\001\ +\255\255\255\255\111\001\255\255\027\001\255\255\115\001\255\255\ +\255\255\146\005\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\ +\161\005\255\255\000\001\255\255\255\255\003\001\255\255\255\255\ +\169\005\255\255\255\255\255\255\255\255\255\255\061\001\013\001\ +\255\255\255\255\179\005\066\001\255\255\019\001\255\255\255\255\ +\071\001\072\001\000\000\185\003\026\001\255\255\028\001\029\001\ +\255\255\255\255\255\255\255\255\083\001\084\001\085\001\086\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\100\001\255\255\255\255\ +\217\005\218\005\255\255\255\255\255\255\255\255\060\001\255\255\ +\255\255\063\001\255\255\255\255\255\255\230\005\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\245\005\255\255\255\255\255\255\ +\255\255\255\255\251\005\252\005\253\005\254\005\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\255\255\255\255\255\255\108\001\255\255\ +\255\255\111\001\016\004\017\004\018\004\255\255\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\077\004\ +\078\004\079\004\255\255\060\001\061\001\255\255\063\001\000\000\ +\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\111\004\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\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\176\004\177\004\255\255\255\255\255\255\181\004\ +\182\004\183\004\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\000\000\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\255\255\255\255\255\255\255\255\255\255\ +\255\255\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\255\255\ +\255\255\255\255\255\255\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\ +\118\005\119\005\120\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\255\255\094\001\095\001\096\001\ +\097\001\098\001\000\000\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\ +\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\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\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\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\ +\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\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\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\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\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\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\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\ +\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\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\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\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\ +\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\ +\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\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\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\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\ +\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\006\001\ +\255\255\008\001\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\ +\055\001\255\255\057\001\058\001\059\001\049\001\061\001\255\255\ +\255\255\064\001\065\001\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\090\001\080\001\255\255\082\001\255\255\ +\255\255\255\255\097\001\255\255\255\255\255\255\255\255\091\001\ +\092\001\000\000\094\001\095\001\096\001\097\001\109\001\110\001\ +\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\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\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\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\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\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\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\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\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\097\001\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\ +\053\001\255\255\055\001\255\255\057\001\058\001\059\001\049\001\ +\061\001\255\255\255\255\064\001\065\001\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\090\001\080\001\255\255\ +\082\001\255\255\255\255\255\255\097\001\255\255\255\255\255\255\ +\255\255\091\001\092\001\255\255\094\001\095\001\096\001\097\001\ +\109\001\110\001\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\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\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\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\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\000\000\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\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\ +\255\255\000\000\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\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\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\000\000\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\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\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\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\ +\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\100\001\255\255\255\255\ +\255\255\000\001\255\255\255\255\003\001\108\001\109\001\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\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\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\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\000\001\255\255\255\255\003\001\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\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\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\ +\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\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\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\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\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\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\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\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\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\ +\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\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\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\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\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\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\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\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\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\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\255\255\ +\255\255\255\255\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\ +\255\255\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\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\ +\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\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\040\001\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\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\106\001\255\255\255\255\109\001\ +\110\001\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\074\001\ +\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\ +\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\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\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\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\255\255\ +\255\255\108\001\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\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\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\000\000\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\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\000\000\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\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\000\000\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\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\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\000\001\255\255\ +\002\001\003\001\255\255\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\ +\255\255\255\255\036\001\255\255\255\255\255\255\000\000\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\000\001\060\001\255\255\003\001\063\001\255\255\255\255\ +\066\001\067\001\068\001\255\255\070\001\255\255\013\001\014\001\ +\074\001\255\255\017\001\255\255\255\255\255\255\080\001\255\255\ +\255\255\255\255\255\255\026\001\027\001\028\001\029\001\000\000\ +\255\255\091\001\092\001\255\255\094\001\095\001\096\001\097\001\ +\255\255\040\001\041\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\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\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\255\255\255\255\255\255\255\255\ +\000\000\255\255\255\255\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\255\255\000\001\060\001\255\255\003\001\ +\063\001\255\255\255\255\066\001\067\001\068\001\255\255\255\255\ +\255\255\013\001\073\001\074\001\255\255\017\001\255\255\255\255\ +\255\255\080\001\255\255\255\255\255\255\255\255\026\001\027\001\ +\028\001\029\001\255\255\255\255\255\255\092\001\255\255\094\001\ +\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\255\255\255\255\ +\111\001\255\255\255\255\255\255\115\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\ +\000\000\019\001\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\000\001\ +\108\001\255\255\003\001\111\001\255\255\255\255\255\255\115\001\ +\255\255\255\255\060\001\255\255\013\001\063\001\255\255\255\255\ +\017\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\255\255\094\001\255\255\096\001\097\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\000\000\ +\255\255\255\255\108\001\060\001\255\255\111\001\063\001\255\255\ +\255\255\115\001\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\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\255\255\114\001\255\255\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\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\000\000\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\000\000\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\255\255\255\255\078\001\255\255\080\001\ +\255\255\255\255\000\000\084\001\085\001\055\001\087\001\057\001\ +\058\001\059\001\255\255\061\001\255\255\255\255\064\001\065\001\ +\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\081\001\ +\255\255\114\001\255\255\255\255\255\255\255\255\255\255\089\001\ +\090\001\255\255\255\255\005\001\006\001\007\001\255\255\097\001\ +\255\255\011\001\012\001\013\001\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\255\255\028\001\029\001\030\001\031\001\032\001\033\001\ +\034\001\255\255\255\255\255\255\000\000\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\255\255\255\255\255\255\255\255\255\255\000\000\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\000\001\255\255\ +\114\001\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\000\001\255\255\255\255\003\001\255\255\255\255\255\255\ +\255\255\027\001\028\001\255\255\030\001\031\001\013\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\000\000\255\255\255\255\026\001\255\255\028\001\029\001\255\255\ +\050\001\051\001\052\001\053\001\255\255\055\001\056\001\255\255\ +\255\255\059\001\041\001\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\060\001\255\255\081\001\ +\255\255\255\255\084\001\255\255\067\001\068\001\255\255\089\001\ +\255\255\091\001\092\001\074\001\094\001\095\001\255\255\097\001\ +\255\255\080\001\000\000\101\001\255\255\255\255\104\001\255\255\ +\106\001\255\255\000\001\109\001\110\001\092\001\004\001\113\001\ +\006\001\096\001\008\001\255\255\010\001\255\255\012\001\255\255\ +\014\001\015\001\255\255\017\001\018\001\108\001\255\255\255\255\ +\111\001\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\255\255\ +\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\ +\000\000\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\255\255\089\001\255\255\091\001\092\001\019\001\ +\094\001\095\001\255\255\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\000\000\113\001\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\255\255\255\255\055\001\080\001\057\001\058\001\059\001\ +\026\001\061\001\028\001\029\001\064\001\065\001\255\255\255\255\ +\092\001\255\255\255\255\255\255\096\001\097\001\255\255\041\001\ +\100\001\255\255\255\255\255\255\255\255\081\001\255\255\255\255\ +\108\001\255\255\000\000\111\001\255\255\089\001\090\001\255\255\ +\000\001\255\255\060\001\003\001\255\255\097\001\064\001\255\255\ +\066\001\067\001\068\001\255\255\255\255\013\001\255\255\073\001\ +\074\001\109\001\110\001\255\255\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\097\001\ +\255\255\041\001\100\001\255\255\255\255\255\255\255\255\000\000\ +\255\255\255\255\108\001\109\001\255\255\111\001\255\255\255\255\ +\255\255\255\255\000\001\255\255\060\001\003\001\255\255\255\255\ +\064\001\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\255\255\255\255\ +\096\001\097\001\255\255\041\001\100\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\255\255\108\001\109\001\255\255\111\001\ +\255\255\255\255\255\255\255\255\255\255\255\255\060\001\255\255\ +\000\001\063\001\000\000\003\001\255\255\067\001\068\001\255\255\ +\008\001\255\255\255\255\255\255\074\001\013\001\255\255\255\255\ +\255\255\255\255\080\001\019\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\026\001\255\255\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\255\255\255\255\000\000\ +\255\255\255\255\000\001\255\255\060\001\003\001\255\255\063\001\ +\000\000\255\255\066\001\067\001\068\001\255\255\255\255\013\001\ +\255\255\255\255\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\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\255\255\000\000\060\001\255\255\ +\255\255\063\001\255\255\255\255\255\255\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\255\255\013\001\ +\255\255\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\000\000\041\001\255\255\255\255\255\255\255\255\ +\255\255\255\255\048\001\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\ +\255\255\063\001\255\255\255\255\013\001\067\001\068\001\255\255\ +\070\001\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\000\000\ +\041\001\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\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\008\001\255\255\255\255\086\001\255\255\013\001\ +\255\255\255\255\255\255\092\001\000\000\019\001\255\255\096\001\ +\097\001\255\255\255\255\255\255\026\001\000\000\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\003\001\013\001\067\001\068\001\255\255\ +\255\255\255\255\019\001\255\255\074\001\013\001\255\255\255\255\ +\255\255\026\001\080\001\028\001\029\001\255\255\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\000\000\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\255\255\067\001\068\001\060\001\255\255\255\255\063\001\ +\255\255\074\001\013\001\067\001\068\001\255\255\255\255\080\001\ +\019\001\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\000\000\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\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\ +\000\000\092\001\255\255\041\001\255\255\096\001\097\001\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\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\000\000\096\001\097\001\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\000\001\063\001\255\255\ +\255\255\013\001\067\001\068\001\255\255\008\001\255\255\019\001\ +\255\255\074\001\013\001\255\255\255\255\255\255\026\001\080\001\ +\028\001\029\001\255\255\255\255\255\255\000\000\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\255\255\041\001\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\060\001\255\255\255\255\063\001\255\255\074\001\066\001\ +\067\001\068\001\255\255\255\255\080\001\000\001\255\255\074\001\ +\003\001\255\255\255\255\255\255\255\255\080\001\255\255\000\000\ +\092\001\255\255\013\001\255\255\096\001\097\001\255\255\255\255\ +\019\001\092\001\255\255\255\255\255\255\096\001\097\001\026\001\ +\108\001\028\001\029\001\111\001\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\255\255\000\001\255\255\ +\255\255\255\255\255\255\255\255\255\255\255\255\255\255\000\001\ +\255\255\060\001\255\255\013\001\063\001\255\255\255\255\008\001\ +\067\001\068\001\255\255\255\255\013\001\255\255\255\255\074\001\ +\026\001\255\255\028\001\029\001\255\255\080\001\255\255\255\255\ +\000\000\026\001\255\255\028\001\029\001\255\255\255\255\041\001\ +\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\000\000\255\255\255\255\ +\000\001\108\001\060\001\255\255\111\001\063\001\000\000\255\255\ +\066\001\067\001\068\001\060\001\255\255\013\001\063\001\255\255\ +\074\001\255\255\067\001\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\255\255\255\255\255\255\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\060\001\255\255\111\001\063\001\ +\255\255\255\255\255\255\067\001\068\001\255\255\013\001\255\255\ +\255\255\255\255\074\001\255\255\255\255\255\255\000\000\255\255\ +\080\001\255\255\255\255\026\001\255\255\028\001\029\001\255\255\ +\255\255\255\255\255\255\255\255\092\001\255\255\255\255\255\255\ +\096\001\097\001\041\001\000\000\255\255\000\001\255\255\255\255\ +\003\001\255\255\255\255\255\255\108\001\255\255\000\001\111\001\ +\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\000\000\ +\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\067\001\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\ +\000\000\092\001\255\255\255\255\255\255\096\001\097\001\255\255\ +\041\001\255\255\092\001\255\255\255\255\255\255\096\001\097\001\ +\255\255\108\001\255\255\255\255\111\001\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\255\255\255\255\255\255\ +\000\001\074\001\255\255\255\255\255\255\255\255\255\255\080\001\ +\008\001\255\255\255\255\255\255\255\255\013\001\255\255\255\255\ +\255\255\255\255\255\255\092\001\255\255\000\001\255\255\096\001\ +\097\001\255\255\026\001\255\255\028\001\029\001\000\001\255\255\ +\255\255\255\255\013\001\108\001\255\255\255\255\111\001\255\255\ +\255\255\041\001\255\255\013\001\255\255\255\255\255\255\026\001\ +\255\255\028\001\029\001\255\255\255\255\255\255\255\255\255\255\ +\026\001\255\255\028\001\029\001\060\001\255\255\041\001\255\255\ +\255\255\255\255\066\001\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\060\001\255\255\255\255\063\001\255\255\255\255\255\255\ +\255\255\068\001\060\001\255\255\092\001\063\001\255\255\074\001\ +\096\001\255\255\068\001\255\255\255\255\080\001\000\001\255\255\ +\074\001\255\255\255\255\255\255\108\001\255\255\080\001\111\001\ +\255\255\092\001\255\255\013\001\255\255\096\001\097\001\255\255\ +\255\255\255\255\092\001\000\001\255\255\255\255\096\001\097\001\ +\026\001\108\001\028\001\029\001\111\001\255\255\255\255\255\255\ +\013\001\255\255\108\001\255\255\255\255\111\001\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\255\255\ +\255\255\255\255\060\001\255\255\041\001\063\001\255\255\000\001\ +\255\255\255\255\068\001\255\255\255\255\255\255\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\255\255\255\255\255\255\068\001\ +\255\255\026\001\092\001\028\001\029\001\074\001\096\001\097\001\ +\255\255\255\255\255\255\080\001\255\255\255\255\255\255\255\255\ +\041\001\255\255\108\001\255\255\255\255\111\001\255\255\092\001\ +\000\001\255\255\255\255\096\001\097\001\255\255\255\255\255\255\ +\255\255\255\255\255\255\060\001\255\255\013\001\063\001\108\001\ +\255\255\255\255\111\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\255\255\255\255\255\255\ +\255\255\041\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\ +\255\255\255\255\255\255\108\001\060\001\255\255\111\001\255\255\ +\255\255\255\255\255\255\067\001\068\001\255\255\255\255\000\001\ +\255\255\255\255\074\001\255\255\005\001\006\001\007\001\008\001\ +\080\001\255\255\011\001\012\001\013\001\014\001\255\255\255\255\ +\255\255\255\255\019\001\255\255\092\001\255\255\255\255\255\255\ +\096\001\026\001\255\255\028\001\029\001\030\001\031\001\032\001\ +\033\001\034\001\035\001\255\255\108\001\255\255\039\001\111\001\ +\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\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\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\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\255\255\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\ +\255\255\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\008\001\255\255\255\255\064\001\ +\065\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ +\255\255\255\255\255\255\023\001\255\255\255\255\255\255\087\001\ +\255\255\255\255\030\001\255\255\255\255\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\055\001\109\001\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\ +\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\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\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\016\001\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\009\001\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\082\001\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( +# 574 "ml/parser.mly" + ( extra_str 1 _1 ) +# 6690 "ml/parser.ml" + : Parsetree.structure)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'signature) in + Obj.repr( +# 577 "ml/parser.mly" + ( extra_sig 1 _1 ) +# 6697 "ml/parser.ml" + : Parsetree.signature)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'top_structure) in + Obj.repr( +# 580 "ml/parser.mly" + ( Ptop_def (extra_str 1 _1) ) +# 6704 "ml/parser.ml" + : Parsetree.toplevel_phrase)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'toplevel_directive) in + Obj.repr( +# 581 "ml/parser.mly" + ( _1 ) +# 6711 "ml/parser.ml" + : Parsetree.toplevel_phrase)) +; (fun __caml_parser_env -> + Obj.repr( +# 582 "ml/parser.mly" + ( raise End_of_file ) +# 6717 "ml/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( +# 586 "ml/parser.mly" + ( (text_str 1) @ [mkstrexp _1 _2] ) +# 6725 "ml/parser.ml" + : 'top_structure)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'top_structure_tail) in + Obj.repr( +# 588 "ml/parser.mly" + ( _1 ) +# 6732 "ml/parser.ml" + : 'top_structure)) +; (fun __caml_parser_env -> + Obj.repr( +# 591 "ml/parser.mly" + ( [] ) +# 6738 "ml/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( +# 592 "ml/parser.mly" + ( (text_str 1) @ _1 :: _2 ) +# 6746 "ml/parser.ml" + : 'top_structure_tail)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'use_file_body) in + Obj.repr( +# 595 "ml/parser.mly" + ( extra_def 1 _1 ) +# 6753 "ml/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( +# 598 "ml/parser.mly" + ( _1 ) +# 6760 "ml/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( +# 600 "ml/parser.mly" + ( (text_def 1) @ Ptop_def[mkstrexp _1 _2] :: _3 ) +# 6769 "ml/parser.ml" + : 'use_file_body)) +; (fun __caml_parser_env -> + Obj.repr( +# 604 "ml/parser.mly" + ( [] ) +# 6775 "ml/parser.ml" + : 'use_file_tail)) +; (fun __caml_parser_env -> + Obj.repr( +# 606 "ml/parser.mly" + ( text_def 1 ) +# 6781 "ml/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( +# 608 "ml/parser.mly" + ( mark_rhs_docs 2 3; + (text_def 1) @ (text_def 2) @ Ptop_def[mkstrexp _2 _3] :: _4 ) +# 6791 "ml/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( +# 611 "ml/parser.mly" + ( (text_def 1) @ (text_def 2) @ Ptop_def[_2] :: _3 ) +# 6799 "ml/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( +# 613 "ml/parser.mly" + ( mark_rhs_docs 2 3; + (text_def 1) @ (text_def 2) @ _2 :: _3 ) +# 6808 "ml/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( +# 616 "ml/parser.mly" + ( (text_def 1) @ Ptop_def[_1] :: _2 ) +# 6816 "ml/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( +# 618 "ml/parser.mly" + ( mark_rhs_docs 1 1; + (text_def 1) @ _1 :: _2 ) +# 6825 "ml/parser.ml" + : 'use_file_tail)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in + Obj.repr( +# 622 "ml/parser.mly" + ( _1 ) +# 6832 "ml/parser.ml" + : Parsetree.core_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 625 "ml/parser.mly" + ( _1 ) +# 6839 "ml/parser.ml" + : Parsetree.expression)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in + Obj.repr( +# 628 "ml/parser.mly" + ( _1 ) +# 6846 "ml/parser.ml" + : Parsetree.pattern)) +; (fun __caml_parser_env -> + Obj.repr( +# 635 "ml/parser.mly" + ( mkrhs "*" 2, None ) +# 6852 "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( +# 637 "ml/parser.mly" + ( mkrhs _2 2, Some _4 ) +# 6860 "ml/parser.ml" + : 'functor_arg)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 641 "ml/parser.mly" + ( _1 ) +# 6867 "ml/parser.ml" + : 'functor_arg_name)) +; (fun __caml_parser_env -> + Obj.repr( +# 642 "ml/parser.mly" + ( "_" ) +# 6873 "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( +# 647 "ml/parser.mly" + ( _2 :: _1 ) +# 6881 "ml/parser.ml" + : 'functor_args)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'functor_arg) in + Obj.repr( +# 649 "ml/parser.mly" + ( [ _1 ] ) +# 6888 "ml/parser.ml" + : 'functor_args)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'mod_longident) in + Obj.repr( +# 654 "ml/parser.mly" + ( mkmod(Pmod_ident (mkrhs _1 1)) ) +# 6895 "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( +# 656 "ml/parser.mly" + ( mkmod ~attrs:_2 (Pmod_structure(extra_str 3 _3)) ) +# 6903 "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( +# 658 "ml/parser.mly" + ( unclosed "struct" 1 "end" 4 ) +# 6911 "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( +# 660 "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 ) +# 6924 "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( +# 666 "ml/parser.mly" + ( mkmod(Pmod_apply(_1, _2)) ) +# 6932 "ml/parser.ml" + : 'module_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'module_expr) in + Obj.repr( +# 668 "ml/parser.mly" + ( mkmod(Pmod_apply(_1, mkmod (Pmod_structure []))) ) +# 6939 "ml/parser.ml" + : 'module_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'paren_module_expr) in + Obj.repr( +# 670 "ml/parser.mly" + ( _1 ) +# 6946 "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( +# 672 "ml/parser.mly" + ( Mod.attr _1 _2 ) +# 6954 "ml/parser.ml" + : 'module_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in + Obj.repr( +# 674 "ml/parser.mly" + ( mkmod(Pmod_extension _1) ) +# 6961 "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( +# 679 "ml/parser.mly" + ( mkmod(Pmod_constraint(_2, _4)) ) +# 6969 "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( +# 681 "ml/parser.mly" + ( unclosed "(" 1 ")" 5 ) +# 6977 "ml/parser.ml" + : 'paren_module_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in + Obj.repr( +# 683 "ml/parser.mly" + ( _2 ) +# 6984 "ml/parser.ml" + : 'paren_module_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'module_expr) in + Obj.repr( +# 685 "ml/parser.mly" + ( unclosed "(" 1 ")" 3 ) +# 6991 "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( +# 687 "ml/parser.mly" + ( mkmod ~attrs:_3 (Pmod_unpack _4)) +# 6999 "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( +# 689 "ml/parser.mly" + ( mkmod ~attrs:_3 + (Pmod_unpack( + ghexp(Pexp_constraint(_4, ghtyp(Ptyp_package _6))))) ) +# 7010 "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( +# 694 "ml/parser.mly" + ( mkmod ~attrs:_3 + (Pmod_unpack( + ghexp(Pexp_coerce(_4, Some(ghtyp(Ptyp_package _6)), + ghtyp(Ptyp_package _8))))) ) +# 7023 "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( +# 699 "ml/parser.mly" + ( mkmod ~attrs:_3 + (Pmod_unpack( + ghexp(Pexp_coerce(_4, None, ghtyp(Ptyp_package _6))))) ) +# 7034 "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( +# 703 "ml/parser.mly" + ( unclosed "(" 1 ")" 6 ) +# 7042 "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( +# 705 "ml/parser.mly" + ( unclosed "(" 1 ")" 6 ) +# 7050 "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( +# 707 "ml/parser.mly" + ( unclosed "(" 1 ")" 5 ) +# 7058 "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( +# 712 "ml/parser.mly" + ( mark_rhs_docs 1 2; + (text_str 1) @ mkstrexp _1 _2 :: _3 ) +# 7068 "ml/parser.ml" + : 'structure)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'structure_tail) in + Obj.repr( +# 714 "ml/parser.mly" + ( _1 ) +# 7075 "ml/parser.ml" + : 'structure)) +; (fun __caml_parser_env -> + Obj.repr( +# 717 "ml/parser.mly" + ( [] ) +# 7081 "ml/parser.ml" + : 'structure_tail)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'structure) in + Obj.repr( +# 718 "ml/parser.mly" + ( (text_str 1) @ _2 ) +# 7088 "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( +# 719 "ml/parser.mly" + ( (text_str 1) @ _1 :: _2 ) +# 7096 "ml/parser.ml" + : 'structure_tail)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'let_bindings) in + Obj.repr( +# 723 "ml/parser.mly" + ( val_of_let_bindings _1 ) +# 7103 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'primitive_declaration) in + Obj.repr( +# 725 "ml/parser.mly" + ( let (body, ext) = _1 in mkstr_ext (Pstr_primitive body) ext ) +# 7110 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'value_description) in + Obj.repr( +# 727 "ml/parser.mly" + ( let (body, ext) = _1 in mkstr_ext (Pstr_primitive body) ext ) +# 7117 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_declarations) in + Obj.repr( +# 729 "ml/parser.mly" + ( let (nr, l, ext ) = _1 in mkstr_ext (Pstr_type (nr, List.rev l)) ext ) +# 7124 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'str_type_extension) in + Obj.repr( +# 731 "ml/parser.mly" + ( let (l, ext) = _1 in mkstr_ext (Pstr_typext l) ext ) +# 7131 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'str_exception_declaration) in + Obj.repr( +# 733 "ml/parser.mly" + ( let (l, ext) = _1 in mkstr_ext (Pstr_exception l) ext ) +# 7138 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_binding) in + Obj.repr( +# 735 "ml/parser.mly" + ( let (body, ext) = _1 in mkstr_ext (Pstr_module body) ext ) +# 7145 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'rec_module_bindings) in + Obj.repr( +# 737 "ml/parser.mly" + ( let (l, ext) = _1 in mkstr_ext (Pstr_recmodule(List.rev l)) ext ) +# 7152 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_type_declaration) in + Obj.repr( +# 739 "ml/parser.mly" + ( let (body, ext) = _1 in mkstr_ext (Pstr_modtype body) ext ) +# 7159 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'open_statement) in + Obj.repr( +# 741 "ml/parser.mly" + ( let (body, ext) = _1 in mkstr_ext (Pstr_open body) ext ) +# 7166 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_type_declarations) in + Obj.repr( +# 743 "ml/parser.mly" + ( let (l, ext) = _1 in mkstr_ext (Pstr_class_type (List.rev l)) ext ) +# 7173 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'str_include_statement) in + Obj.repr( +# 745 "ml/parser.mly" + ( let (body, ext) = _1 in mkstr_ext (Pstr_include body) ext ) +# 7180 "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( +# 747 "ml/parser.mly" + ( mkstr(Pstr_extension (_1, (add_docs_attrs (symbol_docs ()) _2))) ) +# 7188 "ml/parser.ml" + : 'structure_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'floating_attribute) in + Obj.repr( +# 749 "ml/parser.mly" + ( mark_symbol_docs (); + mkstr(Pstr_attribute _1) ) +# 7196 "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( +# 754 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Incl.mk _3 ~attrs:(attrs@_4) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext ) +# 7208 "ml/parser.ml" + : 'str_include_statement)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'module_expr) in + Obj.repr( +# 761 "ml/parser.mly" + ( _2 ) +# 7215 "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( +# 763 "ml/parser.mly" + ( mkmod(Pmod_constraint(_4, _2)) ) +# 7223 "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( +# 765 "ml/parser.mly" + ( mkmod(Pmod_functor(fst _1, snd _1, _2)) ) +# 7231 "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( +# 769 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Mb.mk (mkrhs _3 3) _4 ~attrs:(attrs@_5) + ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) + , ext ) +# 7244 "ml/parser.ml" + : 'module_binding)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'rec_module_binding) in + Obj.repr( +# 775 "ml/parser.mly" + ( let (b, ext) = _1 in ([b], ext) ) +# 7251 "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( +# 777 "ml/parser.mly" + ( let (l, ext) = _1 in (_2 :: l, ext) ) +# 7259 "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( +# 781 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Mb.mk (mkrhs _4 4) _5 ~attrs:(attrs@_6) + ~loc:(symbol_rloc ()) ~docs:(symbol_docs ()) + , ext ) +# 7272 "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( +# 788 "ml/parser.mly" + ( Mb.mk (mkrhs _3 3) _4 ~attrs:(_2@_5) ~loc:(symbol_rloc ()) + ~text:(symbol_text ()) ~docs:(symbol_docs ()) ) +# 7283 "ml/parser.ml" + : 'and_module_binding)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'mty_longident) in + Obj.repr( +# 796 "ml/parser.mly" + ( mkmty(Pmty_ident (mkrhs _1 1)) ) +# 7290 "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( +# 798 "ml/parser.mly" + ( mkmty ~attrs:_2 (Pmty_signature (extra_sig 3 _3)) ) +# 7298 "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( +# 800 "ml/parser.mly" + ( unclosed "sig" 1 "end" 4 ) +# 7306 "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( +# 803 "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 ) +# 7319 "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( +# 810 "ml/parser.mly" + ( mkmty(Pmty_functor(mknoloc "_", Some _1, _3)) ) +# 7327 "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( +# 812 "ml/parser.mly" + ( mkmty(Pmty_with(_1, List.rev _3)) ) +# 7335 "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( +# 814 "ml/parser.mly" + ( mkmty ~attrs:_4 (Pmty_typeof _5) ) +# 7343 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in + Obj.repr( +# 818 "ml/parser.mly" + ( _2 ) +# 7350 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'module_type) in + Obj.repr( +# 820 "ml/parser.mly" + ( unclosed "(" 1 ")" 3 ) +# 7357 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in + Obj.repr( +# 822 "ml/parser.mly" + ( mkmty(Pmty_extension _1) ) +# 7364 "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( +# 824 "ml/parser.mly" + ( Mty.attr _1 _2 ) +# 7372 "ml/parser.ml" + : 'module_type)) +; (fun __caml_parser_env -> + Obj.repr( +# 827 "ml/parser.mly" + ( [] ) +# 7378 "ml/parser.ml" + : 'signature)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'signature) in + Obj.repr( +# 828 "ml/parser.mly" + ( (text_sig 1) @ _2 ) +# 7385 "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( +# 829 "ml/parser.mly" + ( (text_sig 1) @ _1 :: _2 ) +# 7393 "ml/parser.ml" + : 'signature)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'value_description) in + Obj.repr( +# 833 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_value body) ext ) +# 7400 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'primitive_declaration) in + Obj.repr( +# 835 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_value body) ext) +# 7407 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_declarations) in + Obj.repr( +# 837 "ml/parser.mly" + ( let (nr, l, ext) = _1 in mksig_ext (Psig_type (nr, List.rev l)) ext ) +# 7414 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'sig_type_extension) in + Obj.repr( +# 839 "ml/parser.mly" + ( let (l, ext) = _1 in mksig_ext (Psig_typext l) ext ) +# 7421 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'sig_exception_declaration) in + Obj.repr( +# 841 "ml/parser.mly" + ( let (l, ext) = _1 in mksig_ext (Psig_exception l) ext ) +# 7428 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_declaration) in + Obj.repr( +# 843 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_module body) ext ) +# 7435 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_alias) in + Obj.repr( +# 845 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_module body) ext ) +# 7442 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'rec_module_declarations) in + Obj.repr( +# 847 "ml/parser.mly" + ( let (l, ext) = _1 in mksig_ext (Psig_recmodule (List.rev l)) ext ) +# 7449 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_type_declaration) in + Obj.repr( +# 849 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_modtype body) ext ) +# 7456 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'open_statement) in + Obj.repr( +# 851 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_open body) ext ) +# 7463 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'sig_include_statement) in + Obj.repr( +# 853 "ml/parser.mly" + ( let (body, ext) = _1 in mksig_ext (Psig_include body) ext ) +# 7470 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_descriptions) in + Obj.repr( +# 855 "ml/parser.mly" + ( let (l, ext) = _1 in mksig_ext (Psig_class (List.rev l)) ext ) +# 7477 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_type_declarations) in + Obj.repr( +# 857 "ml/parser.mly" + ( let (l, ext) = _1 in mksig_ext (Psig_class_type (List.rev l)) ext ) +# 7484 "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( +# 859 "ml/parser.mly" + ( mksig(Psig_extension (_1, (add_docs_attrs (symbol_docs ()) _2))) ) +# 7492 "ml/parser.ml" + : 'signature_item)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'floating_attribute) in + Obj.repr( +# 861 "ml/parser.mly" + ( mark_symbol_docs (); + mksig(Psig_attribute _1) ) +# 7500 "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( +# 866 "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) +# 7513 "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( +# 873 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Incl.mk _3 ~attrs:(attrs@_4) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext) +# 7525 "ml/parser.ml" + : 'sig_include_statement)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'module_type) in + Obj.repr( +# 880 "ml/parser.mly" + ( _2 ) +# 7532 "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( +# 882 "ml/parser.mly" + ( mkmty(Pmty_functor(mkrhs _2 2, Some _4, _6)) ) +# 7541 "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( +# 884 "ml/parser.mly" + ( mkmty(Pmty_functor(mkrhs "*" 1, None, _3)) ) +# 7548 "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( +# 888 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Md.mk (mkrhs _3 3) _4 ~attrs:(attrs@_5) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext ) +# 7561 "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( +# 895 "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 ) +# 7575 "ml/parser.ml" + : 'module_alias)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'rec_module_declaration) in + Obj.repr( +# 903 "ml/parser.mly" + ( let (body, ext) = _1 in ([body], ext) ) +# 7582 "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( +# 905 "ml/parser.mly" + ( let (l, ext) = _1 in (_2 :: l, ext) ) +# 7590 "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( +# 909 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Md.mk (mkrhs _4 4) _6 ~attrs:(attrs@_7) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext) +# 7603 "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( +# 916 "ml/parser.mly" + ( Md.mk (mkrhs _3 3) _5 ~attrs:(_2@_6) ~loc:(symbol_rloc()) + ~text:(symbol_text()) ~docs:(symbol_docs()) ) +# 7614 "ml/parser.ml" + : 'and_module_declaration)) +; (fun __caml_parser_env -> + Obj.repr( +# 920 "ml/parser.mly" + ( None ) +# 7620 "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( +# 921 "ml/parser.mly" + ( Some _2 ) +# 7627 "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( +# 926 "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 ) +# 7640 "ml/parser.ml" + : 'module_type_declaration)) +; (fun __caml_parser_env -> + Obj.repr( +# 934 "ml/parser.mly" + ( [] ) +# 7646 "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( +# 935 "ml/parser.mly" + ( List.rev _2 ) +# 7653 "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( +# 939 "ml/parser.mly" + ( Cstr.mk _1 (extra_cstr 2 (List.rev _2)) ) +# 7661 "ml/parser.ml" + : 'class_structure)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in + Obj.repr( +# 943 "ml/parser.mly" + ( reloc_pat _2 ) +# 7668 "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( +# 945 "ml/parser.mly" + ( mkpat(Ppat_constraint(_2, _4)) ) +# 7676 "ml/parser.ml" + : 'class_self_pattern)) +; (fun __caml_parser_env -> + Obj.repr( +# 947 "ml/parser.mly" + ( ghpat(Ppat_any) ) +# 7682 "ml/parser.ml" + : 'class_self_pattern)) +; (fun __caml_parser_env -> + Obj.repr( +# 951 "ml/parser.mly" + ( [] ) +# 7688 "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( +# 953 "ml/parser.mly" + ( _2 :: (text_cstr 2) @ _1 ) +# 7696 "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( +# 957 "ml/parser.mly" + ( let v, attrs = _2 in + mkcf (Pcf_val v) ~attrs:(attrs@_3) ~docs:(symbol_docs ()) ) +# 7705 "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( +# 960 "ml/parser.mly" + ( let meth, attrs = _2 in + mkcf (Pcf_method meth) ~attrs:(attrs@_3) ~docs:(symbol_docs ()) ) +# 7714 "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( +# 963 "ml/parser.mly" + ( mkcf (Pcf_constraint _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) +# 7723 "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( +# 965 "ml/parser.mly" + ( mkcf (Pcf_initializer _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) +# 7732 "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( +# 967 "ml/parser.mly" + ( mkcf (Pcf_extension _1) ~attrs:_2 ~docs:(symbol_docs ()) ) +# 7740 "ml/parser.ml" + : 'class_field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'floating_attribute) in + Obj.repr( +# 969 "ml/parser.mly" + ( mark_symbol_docs (); + mkcf (Pcf_attribute _1) ) +# 7748 "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( +# 975 "ml/parser.mly" + ( if _1 = Override then syntax_error (); + (mkloc _5 (rhs_loc 5), Mutable, Cfk_virtual _7), _2 ) +# 7759 "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( +# 978 "ml/parser.mly" + ( if _1 = Override then syntax_error (); + (mkrhs _5 5, _4, Cfk_virtual _7), _2 ) +# 7771 "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( +# 981 "ml/parser.mly" + ( (mkrhs _4 4, _3, Cfk_concrete (_1, _6)), _2 ) +# 7782 "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( +# 983 "ml/parser.mly" + ( + let e = mkexp_constraint _7 _5 in + (mkrhs _4 4, _3, Cfk_concrete (_1, e)), _2 + ) +# 7797 "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( +# 991 "ml/parser.mly" + ( if _1 = Override then syntax_error (); + (mkloc _5 (rhs_loc 5), Private, Cfk_virtual _7), _2 ) +# 7808 "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( +# 994 "ml/parser.mly" + ( if _1 = Override then syntax_error (); + (mkloc _5 (rhs_loc 5), _4, Cfk_virtual _7), _2 ) +# 7820 "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( +# 997 "ml/parser.mly" + ( (mkloc _4 (rhs_loc 4), _3, + Cfk_concrete (_1, ghexp(Pexp_poly (_5, None)))), _2 ) +# 7832 "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( +# 1000 "ml/parser.mly" + ( (mkloc _4 (rhs_loc 4), _3, + Cfk_concrete (_1, ghexp(Pexp_poly(_8, Some _6)))), _2 ) +# 7845 "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( +# 1004 "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 ) +# 7860 "ml/parser.ml" + : 'method_)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_signature) in + Obj.repr( +# 1013 "ml/parser.mly" + ( _1 ) +# 7867 "ml/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( +# 1016 "ml/parser.mly" + ( mkcty(Pcty_arrow(Optional _2 , _4, _6)) ) +# 7876 "ml/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( +# 1018 "ml/parser.mly" + ( mkcty(Pcty_arrow(Optional _1, _2, _4)) ) +# 7885 "ml/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( +# 1020 "ml/parser.mly" + ( mkcty(Pcty_arrow(Labelled _1, _3, _5)) ) +# 7894 "ml/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( +# 1022 "ml/parser.mly" + ( mkcty(Pcty_arrow(Nolabel, _1, _3)) ) +# 7902 "ml/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( +# 1026 "ml/parser.mly" + ( mkcty(Pcty_constr (mkloc _4 (rhs_loc 4), List.rev _2)) ) +# 7910 "ml/parser.ml" + : 'class_signature)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'clty_longident) in + Obj.repr( +# 1028 "ml/parser.mly" + ( mkcty(Pcty_constr (mkrhs _1 1, [])) ) +# 7917 "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( +# 1030 "ml/parser.mly" + ( mkcty ~attrs:_2 (Pcty_signature _3) ) +# 7925 "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( +# 1032 "ml/parser.mly" + ( unclosed "object" 1 "end" 4 ) +# 7933 "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( +# 1034 "ml/parser.mly" + ( Cty.attr _1 _2 ) +# 7941 "ml/parser.ml" + : 'class_signature)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in + Obj.repr( +# 1036 "ml/parser.mly" + ( mkcty(Pcty_extension _1) ) +# 7948 "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( +# 1038 "ml/parser.mly" + ( wrap_class_type_attrs (mkcty(Pcty_open(_3, mkrhs _5 5, _7))) _4 ) +# 7958 "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( +# 1042 "ml/parser.mly" + ( Csig.mk _1 (extra_csig 2 (List.rev _2)) ) +# 7966 "ml/parser.ml" + : 'class_sig_body)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'core_type) in + Obj.repr( +# 1046 "ml/parser.mly" + ( _2 ) +# 7973 "ml/parser.ml" + : 'class_self_type)) +; (fun __caml_parser_env -> + Obj.repr( +# 1048 "ml/parser.mly" + ( mktyp(Ptyp_any) ) +# 7979 "ml/parser.ml" + : 'class_self_type)) +; (fun __caml_parser_env -> + Obj.repr( +# 1051 "ml/parser.mly" + ( [] ) +# 7985 "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( +# 1052 "ml/parser.mly" + ( _2 :: (text_csig 2) @ _1 ) +# 7993 "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( +# 1056 "ml/parser.mly" + ( mkctf (Pctf_inherit _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) +# 8002 "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( +# 1058 "ml/parser.mly" + ( mkctf (Pctf_val _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) +# 8011 "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( +# 1061 "ml/parser.mly" + ( + let (p, v) = _3 in + mkctf (Pctf_method (mkrhs _4 4, p, v, _6)) ~attrs:(_2@_7) ~docs:(symbol_docs ()) + ) +# 8025 "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( +# 1066 "ml/parser.mly" + ( mkctf (Pctf_constraint _3) ~attrs:(_2@_4) ~docs:(symbol_docs ()) ) +# 8034 "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( +# 1068 "ml/parser.mly" + ( mkctf (Pctf_extension _1) ~attrs:_2 ~docs:(symbol_docs ()) ) +# 8042 "ml/parser.ml" + : 'class_sig_field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'floating_attribute) in + Obj.repr( +# 1070 "ml/parser.mly" + ( mark_symbol_docs (); + mkctf(Pctf_attribute _1) ) +# 8050 "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( +# 1075 "ml/parser.mly" + ( mkrhs _3 3, _2, Virtual, _5 ) +# 8059 "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( +# 1077 "ml/parser.mly" + ( mkrhs _3 3, Mutable, _2, _5 ) +# 8068 "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( +# 1079 "ml/parser.mly" + ( mkrhs _1 1, Immutable, Concrete, _3 ) +# 8076 "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( +# 1082 "ml/parser.mly" + ( _1, _3, symbol_rloc() ) +# 8084 "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( +# 1085 "ml/parser.mly" + ( _1, _3 ) +# 8092 "ml/parser.ml" + : 'constrain_field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_description) in + Obj.repr( +# 1089 "ml/parser.mly" + ( let (body, ext) = _1 in ([body],ext) ) +# 8099 "ml/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( +# 1091 "ml/parser.mly" + ( let (l, ext) = _1 in (_2 :: l, ext) ) +# 8107 "ml/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( +# 1096 "ml/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 ) +# 8122 "ml/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( +# 1104 "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 ()) ) +# 8136 "ml/parser.ml" + : 'and_class_description)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'class_type_declaration) in + Obj.repr( +# 1110 "ml/parser.mly" + ( let (body, ext) = _1 in ([body],ext) ) +# 8143 "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( +# 1112 "ml/parser.mly" + ( let (l, ext) = _1 in (_2 :: l, ext) ) +# 8151 "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( +# 1117 "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) +# 8166 "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( +# 1125 "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 ()) ) +# 8180 "ml/parser.ml" + : 'and_class_type_declaration)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1133 "ml/parser.mly" + ( _1 ) +# 8187 "ml/parser.ml" + : 'seq_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'expr) in + Obj.repr( +# 1134 "ml/parser.mly" + ( _1 ) +# 8194 "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( +# 1135 "ml/parser.mly" + ( mkexp(Pexp_sequence(_1, _3)) ) +# 8202 "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( +# 1137 "ml/parser.mly" + ( let seq = mkexp(Pexp_sequence (_1, _5)) in + let payload = PStr [mkstrexp seq []] in + mkexp (Pexp_extension (_4, payload)) ) +# 8213 "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( +# 1143 "ml/parser.mly" + ( (Optional (fst _3), _4, snd _3) ) +# 8221 "ml/parser.ml" + : 'labeled_simple_pattern)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_var) in + Obj.repr( +# 1145 "ml/parser.mly" + ( (Optional (fst _2), None, snd _2) ) +# 8228 "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( +# 1147 "ml/parser.mly" + ( (Optional _1, _4, _3) ) +# 8237 "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( +# 1149 "ml/parser.mly" + ( (Optional _1, None, _2) ) +# 8245 "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( +# 1151 "ml/parser.mly" + ( (Labelled (fst _3), None, snd _3) ) +# 8252 "ml/parser.ml" + : 'labeled_simple_pattern)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_var) in + Obj.repr( +# 1153 "ml/parser.mly" + ( (Labelled (fst _2), None, snd _2) ) +# 8259 "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( +# 1155 "ml/parser.mly" + ( (Labelled _1, None, _2) ) +# 8267 "ml/parser.ml" + : 'labeled_simple_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_pattern) in + Obj.repr( +# 1157 "ml/parser.mly" + ( (Nolabel, None, _1) ) +# 8274 "ml/parser.ml" + : 'labeled_simple_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 1160 "ml/parser.mly" + ( mkpat(Ppat_var (mkrhs _1 1)) ) +# 8281 "ml/parser.ml" + : 'pattern_var)) +; (fun __caml_parser_env -> + Obj.repr( +# 1161 "ml/parser.mly" + ( mkpat Ppat_any ) +# 8287 "ml/parser.ml" + : 'pattern_var)) +; (fun __caml_parser_env -> + Obj.repr( +# 1164 "ml/parser.mly" + ( None ) +# 8293 "ml/parser.ml" + : 'opt_default)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1165 "ml/parser.mly" + ( Some _2 ) +# 8300 "ml/parser.ml" + : 'opt_default)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label_var) in + Obj.repr( +# 1169 "ml/parser.mly" + ( _1 ) +# 8307 "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( +# 1171 "ml/parser.mly" + ( let (lab, pat) = _1 in (lab, mkpat(Ppat_constraint(pat, _3))) ) +# 8315 "ml/parser.ml" + : 'label_let_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 1174 "ml/parser.mly" + ( (_1, mkpat(Ppat_var (mkrhs _1 1))) ) +# 8322 "ml/parser.ml" + : 'label_var)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 1178 "ml/parser.mly" + ( _1 ) +# 8329 "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( +# 1180 "ml/parser.mly" + ( mkpat(Ppat_constraint(_1, _3)) ) +# 8337 "ml/parser.ml" + : 'let_pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in + Obj.repr( +# 1184 "ml/parser.mly" + ( _1 ) +# 8344 "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( +# 1186 "ml/parser.mly" + ( mkexp(Pexp_apply(_1, List.rev _2)) ) +# 8352 "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( +# 1188 "ml/parser.mly" + ( expr_of_let_bindings _1 _3 ) +# 8360 "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( +# 1190 "ml/parser.mly" + ( mkexp_attrs (Pexp_letmodule(mkrhs _4 4, _5, _7)) _3 ) +# 8370 "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( +# 1192 "ml/parser.mly" + ( mkexp_attrs (Pexp_letexception(_4, _6)) _3 ) +# 8379 "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( +# 1194 "ml/parser.mly" + ( mkexp_attrs (Pexp_open(_3, mkrhs _5 5, _7)) _4 ) +# 8389 "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( +# 1196 "ml/parser.mly" + ( mkexp_attrs (Pexp_function(List.rev _4)) _2 ) +# 8398 "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( +# 1198 "ml/parser.mly" + ( let (l,o,p) = _3 in + mkexp_attrs (Pexp_fun(l, o, p, _4)) _2 ) +# 8408 "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( +# 1201 "ml/parser.mly" + ( mkexp_attrs (mk_newtypes _5 _7).pexp_desc _2 ) +# 8417 "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( +# 1203 "ml/parser.mly" + ( mkexp_attrs (Pexp_match(_3, List.rev _6)) _2 ) +# 8427 "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( +# 1205 "ml/parser.mly" + ( mkexp_attrs (Pexp_try(_3, List.rev _6)) _2 ) +# 8437 "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( +# 1207 "ml/parser.mly" + ( syntax_error() ) +# 8445 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'expr_comma_list) in + Obj.repr( +# 1209 "ml/parser.mly" + ( mkexp(Pexp_tuple(List.rev _1)) ) +# 8452 "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( +# 1211 "ml/parser.mly" + ( mkexp(Pexp_construct(mkrhs _1 1, Some _2)) ) +# 8460 "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( +# 1213 "ml/parser.mly" + ( mkexp(Pexp_variant(_1, Some _2)) ) +# 8468 "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( +# 1215 "ml/parser.mly" + ( mkexp_attrs(Pexp_ifthenelse(_3, _5, Some _7)) _2 ) +# 8478 "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( +# 1217 "ml/parser.mly" + ( mkexp_attrs (Pexp_ifthenelse(_3, _5, None)) _2 ) +# 8487 "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( +# 1219 "ml/parser.mly" + ( mkexp_attrs (Pexp_while(_3, _5)) _2 ) +# 8496 "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( +# 1222 "ml/parser.mly" + ( mkexp_attrs(Pexp_for(_3, _5, _7, _6, _9)) _2 ) +# 8508 "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( +# 1224 "ml/parser.mly" + ( mkexp_cons (rhs_loc 2) (ghexp(Pexp_tuple[_1;_3])) (symbol_rloc()) ) +# 8516 "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( +# 1226 "ml/parser.mly" + ( mkinfix _1 _2 _3 ) +# 8525 "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( +# 1228 "ml/parser.mly" + ( mkinfix _1 _2 _3 ) +# 8534 "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( +# 1230 "ml/parser.mly" + ( mkinfix _1 _2 _3 ) +# 8543 "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( +# 1232 "ml/parser.mly" + ( mkinfix _1 _2 _3 ) +# 8552 "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( +# 1234 "ml/parser.mly" + ( mkinfix _1 _2 _3 ) +# 8561 "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( +# 1236 "ml/parser.mly" + ( mkinfix _1 "+" _3 ) +# 8569 "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( +# 1238 "ml/parser.mly" + ( mkinfix _1 "+." _3 ) +# 8577 "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( +# 1240 "ml/parser.mly" + ( mkinfix _1 "+=" _3 ) +# 8585 "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( +# 1242 "ml/parser.mly" + ( mkinfix _1 "-" _3 ) +# 8593 "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( +# 1244 "ml/parser.mly" + ( mkinfix _1 "-." _3 ) +# 8601 "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( +# 1246 "ml/parser.mly" + ( mkinfix _1 "*" _3 ) +# 8609 "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( +# 1248 "ml/parser.mly" + ( mkinfix _1 "%" _3 ) +# 8617 "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( +# 1250 "ml/parser.mly" + ( mkinfix _1 "=" _3 ) +# 8625 "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( +# 1252 "ml/parser.mly" + ( mkinfix _1 "<" _3 ) +# 8633 "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( +# 1254 "ml/parser.mly" + ( mkinfix _1 ">" _3 ) +# 8641 "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( +# 1256 "ml/parser.mly" + ( mkinfix _1 "or" _3 ) +# 8649 "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( +# 1258 "ml/parser.mly" + ( mkinfix _1 "||" _3 ) +# 8657 "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( +# 1260 "ml/parser.mly" + ( mkinfix _1 "&" _3 ) +# 8665 "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( +# 1262 "ml/parser.mly" + ( mkinfix _1 "&&" _3 ) +# 8673 "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( +# 1264 "ml/parser.mly" + ( mkinfix _1 ":=" _3 ) +# 8681 "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( +# 1266 "ml/parser.mly" + ( mkuminus _1 _2 ) +# 8689 "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( +# 1268 "ml/parser.mly" + ( mkuplus _1 _2 ) +# 8697 "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( +# 1270 "ml/parser.mly" + ( mkexp(Pexp_setfield(_1, mkrhs _3 3, _5)) ) +# 8706 "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( +# 1272 "ml/parser.mly" + ( mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "Array" "set")), + [Nolabel,_1; Nolabel,_4; Nolabel,_7])) ) +# 8716 "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( +# 1275 "ml/parser.mly" + ( mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "String" "set")), + [Nolabel,_1; Nolabel,_4; Nolabel,_7])) ) +# 8726 "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( +# 1278 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "[]<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _4; Nolabel, _7]) ) +# 8737 "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( +# 1281 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "()<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _4; Nolabel, _7]) ) +# 8748 "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( +# 1284 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "{}<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _4; Nolabel, _7]) ) +# 8759 "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( +# 1287 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3,"." ^ _4 ^ "[]<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _6; Nolabel, _9]) ) +# 8771 "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( +# 1290 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "()<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _6; Nolabel, _9]) ) +# 8783 "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( +# 1293 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "{}<-")) in + mkexp @@ Pexp_apply(id , [Nolabel, _1; Nolabel, _6; Nolabel, _9]) ) +# 8795 "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( +# 1296 "ml/parser.mly" + ( mkexp(Pexp_setinstvar(mkrhs _1 1, _3)) ) +# 8803 "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( +# 1298 "ml/parser.mly" + ( mkexp_attrs (Pexp_assert _3) _2 ) +# 8811 "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( +# 1300 "ml/parser.mly" + ( mkexp_attrs (Pexp_lazy _3) _2 ) +# 8819 "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( +# 1302 "ml/parser.mly" + ( mkexp_attrs (Pexp_object _3) _2 ) +# 8827 "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( +# 1304 "ml/parser.mly" + ( unclosed "object" 1 "end" 4 ) +# 8835 "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( +# 1306 "ml/parser.mly" + ( Exp.attr _1 _2 ) +# 8843 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + Obj.repr( +# 1308 "ml/parser.mly" + ( not_expecting 1 "wildcard \"_\"" ) +# 8849 "ml/parser.ml" + : 'expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'val_longident) in + Obj.repr( +# 1312 "ml/parser.mly" + ( mkexp(Pexp_ident (mkrhs _1 1)) ) +# 8856 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constant) in + Obj.repr( +# 1314 "ml/parser.mly" + ( mkexp(Pexp_constant _1) ) +# 8863 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constr_longident) in + Obj.repr( +# 1316 "ml/parser.mly" + ( mkexp(Pexp_construct(mkrhs _1 1, None)) ) +# 8870 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'name_tag) in + Obj.repr( +# 1318 "ml/parser.mly" + ( mkexp(Pexp_variant(_1, None)) ) +# 8877 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1320 "ml/parser.mly" + ( reloc_exp _2 ) +# 8884 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'seq_expr) in + Obj.repr( +# 1322 "ml/parser.mly" + ( unclosed "(" 1 ")" 3 ) +# 8891 "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( +# 1324 "ml/parser.mly" + ( wrap_exp_attrs (reloc_exp _3) _2 (* check location *) ) +# 8899 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ext_attributes) in + Obj.repr( +# 1326 "ml/parser.mly" + ( mkexp_attrs (Pexp_construct (mkloc (Lident "()") (symbol_rloc ()), + None)) _2 ) +# 8907 "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( +# 1329 "ml/parser.mly" + ( unclosed "begin" 1 "end" 4 ) +# 8915 "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( +# 1331 "ml/parser.mly" + ( mkexp_constraint _2 _3 ) +# 8923 "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( +# 1333 "ml/parser.mly" + ( mkexp(Pexp_field(_1, mkrhs _3 3)) ) +# 8931 "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( +# 1335 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, _4)) ) +# 8939 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in + Obj.repr( +# 1337 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, + mkexp(Pexp_construct(mkrhs (Lident "()") 1, None)))) ) +# 8947 "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( +# 1340 "ml/parser.mly" + ( unclosed "(" 3 ")" 5 ) +# 8955 "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( +# 1342 "ml/parser.mly" + ( mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "Array" "get")), + [Nolabel,_1; Nolabel,_4])) ) +# 8964 "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( +# 1345 "ml/parser.mly" + ( unclosed "(" 3 ")" 5 ) +# 8972 "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( +# 1347 "ml/parser.mly" + ( mkexp(Pexp_apply(ghexp(Pexp_ident(array_function "String" "get")), + [Nolabel,_1; Nolabel,_4])) ) +# 8981 "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( +# 1350 "ml/parser.mly" + ( unclosed "[" 3 "]" 5 ) +# 8989 "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( +# 1352 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "[]")) in + mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _4]) ) +# 8999 "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( +# 1355 "ml/parser.mly" + ( unclosed "[" 3 "]" 5 ) +# 9008 "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( +# 1357 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "()")) in + mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _4]) ) +# 9018 "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( +# 1360 "ml/parser.mly" + ( unclosed "(" 3 ")" 5 ) +# 9027 "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( +# 1362 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Lident ("." ^ _2 ^ "{}")) in + mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _4]) ) +# 9037 "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( +# 1365 "ml/parser.mly" + ( unclosed "{" 3 "}" 5 ) +# 9046 "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( +# 1367 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "[]")) in + mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _6]) ) +# 9057 "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( +# 1370 "ml/parser.mly" + ( unclosed "[" 5 "]" 7 ) +# 9067 "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( +# 1372 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "()")) in + mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _6]) ) +# 9078 "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( +# 1375 "ml/parser.mly" + ( unclosed "(" 5 ")" 7 ) +# 9088 "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( +# 1377 "ml/parser.mly" + ( let id = mkexp @@ Pexp_ident( ghloc @@ Ldot(_3, "." ^ _4 ^ "{}")) in + mkexp @@ Pexp_apply(id, [Nolabel, _1; Nolabel, _6]) ) +# 9099 "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( +# 1380 "ml/parser.mly" + ( unclosed "{" 5 "}" 7 ) +# 9109 "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( +# 1382 "ml/parser.mly" + ( unclosed "{" 3 "}" 5 ) +# 9117 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'record_expr) in + Obj.repr( +# 1384 "ml/parser.mly" + ( let (exten, fields) = _2 in mkexp (Pexp_record(fields, exten)) ) +# 9124 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'record_expr) in + Obj.repr( +# 1386 "ml/parser.mly" + ( unclosed "{" 1 "}" 3 ) +# 9131 "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( +# 1388 "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)) ) +# 9141 "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( +# 1392 "ml/parser.mly" + ( unclosed "{" 3 "}" 5 ) +# 9149 "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( +# 1394 "ml/parser.mly" + ( mkexp (Pexp_array(List.rev _2)) ) +# 9157 "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( +# 1396 "ml/parser.mly" + ( unclosed "[|" 1 "|]" 4 ) +# 9165 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + Obj.repr( +# 1398 "ml/parser.mly" + ( mkexp (Pexp_array []) ) +# 9171 "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( +# 1400 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, mkexp(Pexp_array(List.rev _4)))) ) +# 9180 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in + Obj.repr( +# 1402 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, mkexp(Pexp_array []))) ) +# 9187 "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( +# 1404 "ml/parser.mly" + ( unclosed "[|" 3 "|]" 6 ) +# 9196 "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( +# 1406 "ml/parser.mly" + ( reloc_exp (mktailexp (rhs_loc 4) (List.rev _2)) ) +# 9204 "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( +# 1408 "ml/parser.mly" + ( unclosed "[" 1 "]" 4 ) +# 9212 "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( +# 1410 "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)) ) +# 9222 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in + Obj.repr( +# 1413 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, + mkexp(Pexp_construct(mkrhs (Lident "[]") 1, None)))) ) +# 9230 "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( +# 1416 "ml/parser.mly" + ( unclosed "[" 3 "]" 6 ) +# 9239 "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( +# 1418 "ml/parser.mly" + ( mkexp(Pexp_apply(mkoperator _1 1, [Nolabel,_2])) ) +# 9247 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'simple_expr) in + Obj.repr( +# 1420 "ml/parser.mly" + ( mkexp(Pexp_apply(mkoperator "!" 1, [Nolabel,_2])) ) +# 9254 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'field_expr_list) in + Obj.repr( +# 1422 "ml/parser.mly" + ( mkexp (Pexp_override _2) ) +# 9261 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'field_expr_list) in + Obj.repr( +# 1424 "ml/parser.mly" + ( unclosed "{<" 1 ">}" 3 ) +# 9268 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + Obj.repr( +# 1426 "ml/parser.mly" + ( mkexp (Pexp_override [])) +# 9274 "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( +# 1428 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, mkexp (Pexp_override _4)))) +# 9282 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : 'mod_longident) in + Obj.repr( +# 1430 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, mkexp (Pexp_override [])))) +# 9289 "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( +# 1432 "ml/parser.mly" + ( unclosed "{<" 3 ">}" 5 ) +# 9297 "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( +# 1434 "ml/parser.mly" + ( mkexp(Pexp_send(_1, mkrhs _3 3)) ) +# 9305 "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( +# 1436 "ml/parser.mly" + ( mkinfix _1 _2 _3 ) +# 9314 "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( +# 1438 "ml/parser.mly" + ( mkexp_attrs (Pexp_pack _4) _3 ) +# 9322 "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( +# 1440 "ml/parser.mly" + ( mkexp_attrs (Pexp_constraint (ghexp (Pexp_pack _4), + ghtyp (Ptyp_package _6))) + _3 ) +# 9333 "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( +# 1444 "ml/parser.mly" + ( unclosed "(" 1 ")" 6 ) +# 9341 "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( +# 1447 "ml/parser.mly" + ( mkexp(Pexp_open(Fresh, mkrhs _1 1, + mkexp_attrs (Pexp_constraint (ghexp (Pexp_pack _6), + ghtyp (Ptyp_package _8))) + _5 )) ) +# 9354 "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( +# 1452 "ml/parser.mly" + ( unclosed "(" 3 ")" 8 ) +# 9363 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in + Obj.repr( +# 1454 "ml/parser.mly" + ( mkexp (Pexp_extension _1) ) +# 9370 "ml/parser.ml" + : 'simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'labeled_simple_expr) in + Obj.repr( +# 1458 "ml/parser.mly" + ( [_1] ) +# 9377 "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( +# 1460 "ml/parser.mly" + ( _2 :: _1 ) +# 9385 "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( +# 1464 "ml/parser.mly" + ( (Nolabel, _1) ) +# 9392 "ml/parser.ml" + : 'labeled_simple_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label_expr) in + Obj.repr( +# 1466 "ml/parser.mly" + ( _1 ) +# 9399 "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( +# 1470 "ml/parser.mly" + ( (Labelled _1, _2) ) +# 9407 "ml/parser.ml" + : 'label_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_ident) in + Obj.repr( +# 1472 "ml/parser.mly" + ( (Labelled (fst _2), snd _2) ) +# 9414 "ml/parser.ml" + : 'label_expr)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'label_ident) in + Obj.repr( +# 1474 "ml/parser.mly" + ( (Optional (fst _2), snd _2) ) +# 9421 "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( +# 1476 "ml/parser.mly" + ( (Optional _1, _2) ) +# 9429 "ml/parser.ml" + : 'label_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 1479 "ml/parser.mly" + ( (_1, mkexp(Pexp_ident(mkrhs (Lident _1) 1))) ) +# 9436 "ml/parser.ml" + : 'label_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 1482 "ml/parser.mly" + ( [mkrhs _1 1] ) +# 9443 "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( +# 1483 "ml/parser.mly" + ( mkrhs _1 1 :: _2 ) +# 9451 "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( +# 1487 "ml/parser.mly" + ( (mkpatvar _1 1, _2) ) +# 9459 "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( +# 1489 "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) ) +# 9476 "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( +# 1499 "ml/parser.mly" + ( (ghpat(Ppat_constraint(mkpatvar _1 1, + ghtyp(Ptyp_poly(List.rev _3,_5)))), + _7) ) +# 9488 "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( +# 1503 "ml/parser.mly" + ( let exp, poly = wrap_type_annotation _4 _6 _8 in + (ghpat(Ppat_constraint(mkpatvar _1 1, poly)), exp) ) +# 9499 "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( +# 1506 "ml/parser.mly" + ( (_1, _3) ) +# 9507 "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( +# 1508 "ml/parser.mly" + ( (ghpat(Ppat_constraint(_1, _3)), _5) ) +# 9516 "ml/parser.ml" + : 'let_binding_body)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'let_binding) in + Obj.repr( +# 1511 "ml/parser.mly" + ( _1 ) +# 9523 "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( +# 1512 "ml/parser.mly" + ( addlb _1 _2 ) +# 9531 "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( +# 1516 "ml/parser.mly" + ( let (ext, attr) = _2 in + mklbs ext _3 (mklb true _4 (attr@_5)) ) +# 9542 "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( +# 1521 "ml/parser.mly" + ( mklb false _3 (_2@_4) ) +# 9551 "ml/parser.ml" + : 'and_let_binding)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'strict_binding) in + Obj.repr( +# 1525 "ml/parser.mly" + ( _1 ) +# 9558 "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( +# 1527 "ml/parser.mly" + ( mkexp_constraint _3 _1 ) +# 9566 "ml/parser.ml" + : 'fun_binding)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1531 "ml/parser.mly" + ( _2 ) +# 9573 "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( +# 1533 "ml/parser.mly" + ( let (l, o, p) = _1 in ghexp(Pexp_fun(l, o, p, _2)) ) +# 9581 "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( +# 1535 "ml/parser.mly" + ( mk_newtypes _3 _5 ) +# 9589 "ml/parser.ml" + : 'strict_binding)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'match_case) in + Obj.repr( +# 1538 "ml/parser.mly" + ( [_1] ) +# 9596 "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( +# 1539 "ml/parser.mly" + ( _3 :: _1 ) +# 9604 "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( +# 1543 "ml/parser.mly" + ( Exp.case _1 _3 ) +# 9612 "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( +# 1545 "ml/parser.mly" + ( Exp.case _1 ~guard:_3 _5 ) +# 9621 "ml/parser.ml" + : 'match_case)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + Obj.repr( +# 1547 "ml/parser.mly" + ( Exp.case _1 (Exp.unreachable ~loc:(rhs_loc 3) ())) +# 9628 "ml/parser.ml" + : 'match_case)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'seq_expr) in + Obj.repr( +# 1551 "ml/parser.mly" + ( _2 ) +# 9635 "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( +# 1553 "ml/parser.mly" + ( mkexp (Pexp_constraint (_4, _2)) ) +# 9643 "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( +# 1556 "ml/parser.mly" + ( + let (l,o,p) = _1 in + ghexp(Pexp_fun(l, o, p, _2)) + ) +# 9654 "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( +# 1561 "ml/parser.mly" + ( mk_newtypes _3 _5 ) +# 9662 "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( +# 1564 "ml/parser.mly" + ( _3 :: _1 ) +# 9670 "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( +# 1565 "ml/parser.mly" + ( [_3; _1] ) +# 9678 "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( +# 1568 "ml/parser.mly" + ( (Some _1, _3) ) +# 9686 "ml/parser.ml" + : 'record_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_expr_list) in + Obj.repr( +# 1569 "ml/parser.mly" + ( (None, _1) ) +# 9693 "ml/parser.ml" + : 'record_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_expr) in + Obj.repr( +# 1572 "ml/parser.mly" + ( [_1] ) +# 9700 "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( +# 1573 "ml/parser.mly" + ( _1 :: _3 ) +# 9708 "ml/parser.ml" + : 'lbl_expr_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'lbl_expr) in + Obj.repr( +# 1574 "ml/parser.mly" + ( [_1] ) +# 9715 "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( +# 1578 "ml/parser.mly" + ( (mkrhs _1 1, mkexp_opt_constraint _4 _2) ) +# 9724 "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( +# 1580 "ml/parser.mly" + ( (mkrhs _1 1, mkexp_opt_constraint (exp_of_label _1 1) _2) ) +# 9732 "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( +# 1583 "ml/parser.mly" + ( [_1] ) +# 9740 "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( +# 1584 "ml/parser.mly" + ( _1 :: _3 ) +# 9748 "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( +# 1588 "ml/parser.mly" + ( (mkrhs _1 1, _3) ) +# 9756 "ml/parser.ml" + : 'field_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label) in + Obj.repr( +# 1590 "ml/parser.mly" + ( (mkrhs _1 1, exp_of_label (Lident _1) 1) ) +# 9763 "ml/parser.ml" + : 'field_expr)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'expr) in + Obj.repr( +# 1593 "ml/parser.mly" + ( [_1] ) +# 9770 "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( +# 1594 "ml/parser.mly" + ( _3 :: _1 ) +# 9778 "ml/parser.ml" + : 'expr_semi_list)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1597 "ml/parser.mly" + ( (Some _2, None) ) +# 9785 "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( +# 1598 "ml/parser.mly" + ( (Some _2, Some _4) ) +# 9793 "ml/parser.ml" + : 'type_constraint)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1599 "ml/parser.mly" + ( (None, Some _2) ) +# 9800 "ml/parser.ml" + : 'type_constraint)) +; (fun __caml_parser_env -> + Obj.repr( +# 1600 "ml/parser.mly" + ( syntax_error() ) +# 9806 "ml/parser.ml" + : 'type_constraint)) +; (fun __caml_parser_env -> + Obj.repr( +# 1601 "ml/parser.mly" + ( syntax_error() ) +# 9812 "ml/parser.ml" + : 'type_constraint)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_constraint) in + Obj.repr( +# 1604 "ml/parser.mly" + ( Some _1 ) +# 9819 "ml/parser.ml" + : 'opt_type_constraint)) +; (fun __caml_parser_env -> + Obj.repr( +# 1605 "ml/parser.mly" + ( None ) +# 9825 "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( +# 1612 "ml/parser.mly" + ( mkpat(Ppat_alias(_1, mkrhs _3 3)) ) +# 9833 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + Obj.repr( +# 1614 "ml/parser.mly" + ( expecting 3 "identifier" ) +# 9840 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern_comma_list) in + Obj.repr( +# 1616 "ml/parser.mly" + ( mkpat(Ppat_tuple(List.rev _1)) ) +# 9847 "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( +# 1618 "ml/parser.mly" + ( mkpat_cons (rhs_loc 2) (ghpat(Ppat_tuple[_1;_3])) (symbol_rloc()) ) +# 9855 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + Obj.repr( +# 1620 "ml/parser.mly" + ( expecting 3 "pattern" ) +# 9862 "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( +# 1622 "ml/parser.mly" + ( mkpat(Ppat_or(_1, _3)) ) +# 9870 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + Obj.repr( +# 1624 "ml/parser.mly" + ( expecting 3 "pattern" ) +# 9877 "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( +# 1626 "ml/parser.mly" + ( mkpat_attrs (Ppat_exception _3) _2) +# 9885 "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( +# 1628 "ml/parser.mly" + ( Pat.attr _1 _2 ) +# 9893 "ml/parser.ml" + : 'pattern)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern_gen) in + Obj.repr( +# 1629 "ml/parser.mly" + ( _1 ) +# 9900 "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( +# 1633 "ml/parser.mly" + ( mkpat(Ppat_alias(_1, mkrhs _3 3)) ) +# 9908 "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( +# 1635 "ml/parser.mly" + ( expecting 3 "identifier" ) +# 9915 "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( +# 1637 "ml/parser.mly" + ( mkpat(Ppat_tuple(List.rev _1)) ) +# 9922 "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( +# 1639 "ml/parser.mly" + ( mkpat_cons (rhs_loc 2) (ghpat(Ppat_tuple[_1;_3])) (symbol_rloc()) ) +# 9930 "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( +# 1641 "ml/parser.mly" + ( expecting 3 "pattern" ) +# 9937 "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( +# 1643 "ml/parser.mly" + ( mkpat(Ppat_or(_1, _3)) ) +# 9945 "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( +# 1645 "ml/parser.mly" + ( expecting 3 "pattern" ) +# 9952 "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( +# 1647 "ml/parser.mly" + ( Pat.attr _1 _2 ) +# 9960 "ml/parser.ml" + : 'pattern_no_exn)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'pattern_gen) in + Obj.repr( +# 1648 "ml/parser.mly" + ( _1 ) +# 9967 "ml/parser.ml" + : 'pattern_no_exn)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_pattern) in + Obj.repr( +# 1652 "ml/parser.mly" + ( _1 ) +# 9974 "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( +# 1654 "ml/parser.mly" + ( mkpat(Ppat_construct(mkrhs _1 1, Some _2)) ) +# 9982 "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( +# 1656 "ml/parser.mly" + ( mkpat(Ppat_variant(_1, Some _2)) ) +# 9990 "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( +# 1658 "ml/parser.mly" + ( mkpat_attrs (Ppat_lazy _3) _2) +# 9998 "ml/parser.ml" + : 'pattern_gen)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'val_ident) in + Obj.repr( +# 1662 "ml/parser.mly" + ( mkpat(Ppat_var (mkrhs _1 1)) ) +# 10005 "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( +# 1663 "ml/parser.mly" + ( _1 ) +# 10012 "ml/parser.ml" + : 'simple_pattern)) +; (fun __caml_parser_env -> + Obj.repr( +# 1667 "ml/parser.mly" + ( mkpat(Ppat_any) ) +# 10018 "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( +# 1669 "ml/parser.mly" + ( mkpat(Ppat_constant _1) ) +# 10025 "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( +# 1671 "ml/parser.mly" + ( mkpat(Ppat_interval (_1, _3)) ) +# 10033 "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( +# 1673 "ml/parser.mly" + ( mkpat(Ppat_construct(mkrhs _1 1, None)) ) +# 10040 "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( +# 1675 "ml/parser.mly" + ( mkpat(Ppat_variant(_1, None)) ) +# 10047 "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( +# 1677 "ml/parser.mly" + ( mkpat(Ppat_type (mkrhs _2 2)) ) +# 10054 "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( +# 1679 "ml/parser.mly" + ( _1 ) +# 10061 "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( +# 1681 "ml/parser.mly" + ( mkpat @@ Ppat_open(mkrhs _1 1, _3) ) +# 10069 "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( +# 1683 "ml/parser.mly" + ( mkpat @@ Ppat_open(mkrhs _1 1, mkpat @@ + Ppat_construct ( mkrhs (Lident "[]") 4, None)) ) +# 10077 "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( +# 1686 "ml/parser.mly" + ( mkpat @@ Ppat_open( mkrhs _1 1, mkpat @@ + Ppat_construct ( mkrhs (Lident "()") 4, None) ) ) +# 10085 "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( +# 1689 "ml/parser.mly" + ( mkpat @@ Ppat_open (mkrhs _1 1, _4)) +# 10093 "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( +# 1691 "ml/parser.mly" + (unclosed "(" 3 ")" 5 ) +# 10101 "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( +# 1693 "ml/parser.mly" + ( expecting 4 "pattern" ) +# 10108 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in + Obj.repr( +# 1695 "ml/parser.mly" + ( reloc_pat _2 ) +# 10115 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in + Obj.repr( +# 1697 "ml/parser.mly" + ( unclosed "(" 1 ")" 3 ) +# 10122 "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( +# 1699 "ml/parser.mly" + ( mkpat(Ppat_constraint(_2, _4)) ) +# 10130 "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( +# 1701 "ml/parser.mly" + ( unclosed "(" 1 ")" 5 ) +# 10138 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + Obj.repr( +# 1703 "ml/parser.mly" + ( expecting 4 "type" ) +# 10145 "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( +# 1705 "ml/parser.mly" + ( mkpat_attrs (Ppat_unpack (mkrhs _4 4)) _3 ) +# 10153 "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( +# 1707 "ml/parser.mly" + ( mkpat_attrs + (Ppat_constraint(mkpat(Ppat_unpack (mkrhs _4 4)), + ghtyp(Ptyp_package _6))) + _3 ) +# 10165 "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( +# 1712 "ml/parser.mly" + ( unclosed "(" 1 ")" 7 ) +# 10174 "ml/parser.ml" + : 'simple_pattern_not_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in + Obj.repr( +# 1714 "ml/parser.mly" + ( mkpat(Ppat_extension _1) ) +# 10181 "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( +# 1719 "ml/parser.mly" + ( let (fields, closed) = _2 in mkpat(Ppat_record(fields, closed)) ) +# 10188 "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( +# 1721 "ml/parser.mly" + ( unclosed "{" 1 "}" 3 ) +# 10195 "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( +# 1723 "ml/parser.mly" + ( reloc_pat (mktailpat (rhs_loc 4) (List.rev _2)) ) +# 10203 "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( +# 1725 "ml/parser.mly" + ( unclosed "[" 1 "]" 4 ) +# 10211 "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( +# 1727 "ml/parser.mly" + ( mkpat(Ppat_array(List.rev _2)) ) +# 10219 "ml/parser.ml" + : 'simple_delimited_pattern)) +; (fun __caml_parser_env -> + Obj.repr( +# 1729 "ml/parser.mly" + ( mkpat(Ppat_array []) ) +# 10225 "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( +# 1731 "ml/parser.mly" + ( unclosed "[|" 1 "|]" 4 ) +# 10233 "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( +# 1734 "ml/parser.mly" + ( _3 :: _1 ) +# 10241 "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( +# 1735 "ml/parser.mly" + ( [_3; _1] ) +# 10249 "ml/parser.ml" + : 'pattern_comma_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pattern) in + Obj.repr( +# 1736 "ml/parser.mly" + ( expecting 3 "pattern" ) +# 10256 "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( +# 1739 "ml/parser.mly" + ( _3 :: _1 ) +# 10264 "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( +# 1740 "ml/parser.mly" + ( [_3; _1] ) +# 10272 "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( +# 1741 "ml/parser.mly" + ( expecting 3 "pattern" ) +# 10279 "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( +# 1744 "ml/parser.mly" + ( [_1] ) +# 10286 "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( +# 1745 "ml/parser.mly" + ( _3 :: _1 ) +# 10294 "ml/parser.ml" + : 'pattern_semi_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'lbl_pattern) in + Obj.repr( +# 1748 "ml/parser.mly" + ( [_1], Closed ) +# 10301 "ml/parser.ml" + : 'lbl_pattern_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'lbl_pattern) in + Obj.repr( +# 1749 "ml/parser.mly" + ( [_1], Closed ) +# 10308 "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( +# 1750 "ml/parser.mly" + ( [_1], Open ) +# 10316 "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( +# 1752 "ml/parser.mly" + ( let (fields, closed) = _3 in _1 :: fields, closed ) +# 10324 "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( +# 1756 "ml/parser.mly" + ( (mkrhs _1 1, mkpat_opt_constraint _4 _2) ) +# 10333 "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( +# 1758 "ml/parser.mly" + ( (mkrhs _1 1, mkpat_opt_constraint (pat_of_label _1 1) _2) ) +# 10341 "ml/parser.ml" + : 'lbl_pattern)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1761 "ml/parser.mly" + ( Some _2 ) +# 10348 "ml/parser.ml" + : 'opt_pattern_type_constraint)) +; (fun __caml_parser_env -> + Obj.repr( +# 1762 "ml/parser.mly" + ( None ) +# 10354 "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( +# 1769 "ml/parser.mly" + ( let (ext, attrs) = _2 in + Val.mk (mkrhs _3 3) _5 ~attrs:(attrs@_6) + ~loc:(symbol_rloc()) ~docs:(symbol_docs ()) + , ext ) +# 10367 "ml/parser.ml" + : 'value_description)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string * string option) in + Obj.repr( +# 1778 "ml/parser.mly" + ( [fst _1] ) +# 10374 "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( +# 1779 "ml/parser.mly" + ( fst _1 :: _2 ) +# 10382 "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( +# 1784 "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 ) +# 10396 "ml/parser.ml" + : 'primitive_declaration)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_declaration) in + Obj.repr( +# 1794 "ml/parser.mly" + ( let (nonrec_flag, ty, ext) = _1 in (nonrec_flag, [ty], ext) ) +# 10403 "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( +# 1796 "ml/parser.mly" + ( let (nonrec_flag, tys, ext) = _1 in (nonrec_flag, _2 :: tys, ext) ) +# 10411 "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( +# 1802 "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) ) +# 10431 "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( +# 1814 "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 ()) ) +# 10446 "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( +# 1820 "ml/parser.mly" + ( _3 :: _1 ) +# 10454 "ml/parser.ml" + : 'constraints)) +; (fun __caml_parser_env -> + Obj.repr( +# 1821 "ml/parser.mly" + ( [] ) +# 10460 "ml/parser.ml" + : 'constraints)) +; (fun __caml_parser_env -> + Obj.repr( +# 1825 "ml/parser.mly" + ( (Ptype_abstract, Public, None) ) +# 10466 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1827 "ml/parser.mly" + ( (Ptype_abstract, Public, Some _2) ) +# 10473 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 1829 "ml/parser.mly" + ( (Ptype_abstract, Private, Some _3) ) +# 10480 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_declarations) in + Obj.repr( +# 1831 "ml/parser.mly" + ( (Ptype_variant(List.rev _2), Public, None) ) +# 10487 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + let _3 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_declarations) in + Obj.repr( +# 1833 "ml/parser.mly" + ( (Ptype_variant(List.rev _3), Private, None) ) +# 10494 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + Obj.repr( +# 1835 "ml/parser.mly" + ( (Ptype_open, Public, None) ) +# 10500 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + Obj.repr( +# 1837 "ml/parser.mly" + ( (Ptype_open, Private, None) ) +# 10506 "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( +# 1839 "ml/parser.mly" + ( (Ptype_record _4, _2, None) ) +# 10514 "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( +# 1841 "ml/parser.mly" + ( (Ptype_variant(List.rev _5), _4, Some _2) ) +# 10523 "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( +# 1843 "ml/parser.mly" + ( (Ptype_open, _4, Some _2) ) +# 10531 "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( +# 1845 "ml/parser.mly" + ( (Ptype_record _6, _4, Some _2) ) +# 10540 "ml/parser.ml" + : 'type_kind)) +; (fun __caml_parser_env -> + Obj.repr( +# 1848 "ml/parser.mly" + ( [] ) +# 10546 "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( +# 1849 "ml/parser.mly" + ( [_1] ) +# 10553 "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( +# 1850 "ml/parser.mly" + ( List.rev _2 ) +# 10560 "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( +# 1853 "ml/parser.mly" + ( _2, _1 ) +# 10568 "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( +# 1856 "ml/parser.mly" + ( [_1] ) +# 10575 "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( +# 1857 "ml/parser.mly" + ( _3 :: _1 ) +# 10583 "ml/parser.ml" + : 'optional_type_parameter_list)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 1860 "ml/parser.mly" + ( mktyp(Ptyp_var _2) ) +# 10590 "ml/parser.ml" + : 'optional_type_variable)) +; (fun __caml_parser_env -> + Obj.repr( +# 1861 "ml/parser.mly" + ( mktyp(Ptyp_any) ) +# 10596 "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( +# 1866 "ml/parser.mly" + ( _2, _1 ) +# 10604 "ml/parser.ml" + : 'type_parameter)) +; (fun __caml_parser_env -> + Obj.repr( +# 1869 "ml/parser.mly" + ( Invariant ) +# 10610 "ml/parser.ml" + : 'type_variance)) +; (fun __caml_parser_env -> + Obj.repr( +# 1870 "ml/parser.mly" + ( Covariant ) +# 10616 "ml/parser.ml" + : 'type_variance)) +; (fun __caml_parser_env -> + Obj.repr( +# 1871 "ml/parser.mly" + ( Contravariant ) +# 10622 "ml/parser.ml" + : 'type_variance)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 1874 "ml/parser.mly" + ( mktyp(Ptyp_var _2) ) +# 10629 "ml/parser.ml" + : 'type_variable)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_parameter) in + Obj.repr( +# 1877 "ml/parser.mly" + ( [_1] ) +# 10636 "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( +# 1878 "ml/parser.mly" + ( _3 :: _1 ) +# 10644 "ml/parser.ml" + : 'type_parameter_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_declaration) in + Obj.repr( +# 1881 "ml/parser.mly" + ( [_1] ) +# 10651 "ml/parser.ml" + : 'constructor_declarations)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'bar_constructor_declaration) in + Obj.repr( +# 1882 "ml/parser.mly" + ( [_1] ) +# 10658 "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( +# 1883 "ml/parser.mly" + ( _2 :: _1 ) +# 10666 "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( +# 1887 "ml/parser.mly" + ( + let args,res = _2 in + Type.constructor (mkrhs _1 1) ~args ?res ~attrs:_3 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) + ) +# 10679 "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( +# 1895 "ml/parser.mly" + ( + let args,res = _3 in + Type.constructor (mkrhs _2 2) ~args ?res ~attrs:_4 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) + ) +# 10692 "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( +# 1902 "ml/parser.mly" + ( _1 ) +# 10699 "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( +# 1905 "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 ) +# 10713 "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( +# 1913 "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 ) +# 10728 "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( +# 1921 "ml/parser.mly" + ( let args, res = _2 in + Te.decl (mkrhs _1 1) ~args ?res ~attrs:_3 ~loc:(symbol_rloc()) ) +# 10738 "ml/parser.ml" + : 'let_exception_declaration)) +; (fun __caml_parser_env -> + Obj.repr( +# 1925 "ml/parser.mly" + ( (Pcstr_tuple [],None) ) +# 10744 "ml/parser.ml" + : 'generalized_constructor_arguments)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'constructor_arguments) in + Obj.repr( +# 1926 "ml/parser.mly" + ( (_2,None) ) +# 10751 "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( +# 1928 "ml/parser.mly" + ( (_2,Some _4) ) +# 10759 "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( +# 1930 "ml/parser.mly" + ( (Pcstr_tuple [],Some _2) ) +# 10766 "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( +# 1934 "ml/parser.mly" + ( Pcstr_tuple (List.rev _1) ) +# 10773 "ml/parser.ml" + : 'constructor_arguments)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'label_declarations) in + Obj.repr( +# 1935 "ml/parser.mly" + ( Pcstr_record _2 ) +# 10780 "ml/parser.ml" + : 'constructor_arguments)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label_declaration) in + Obj.repr( +# 1938 "ml/parser.mly" + ( [_1] ) +# 10787 "ml/parser.ml" + : 'label_declarations)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'label_declaration_semi) in + Obj.repr( +# 1939 "ml/parser.mly" + ( [_1] ) +# 10794 "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( +# 1940 "ml/parser.mly" + ( _1 :: _2 ) +# 10802 "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( +# 1944 "ml/parser.mly" + ( + Type.field (mkrhs _2 2) _4 ~mut:_1 ~attrs:_5 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) + ) +# 10815 "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( +# 1951 "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 + ) +# 10834 "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( +# 1967 "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 ) +# 10851 "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( +# 1976 "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 ) +# 10868 "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( +# 1983 "ml/parser.mly" + ( [_1] ) +# 10875 "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( +# 1984 "ml/parser.mly" + ( [_1] ) +# 10882 "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( +# 1985 "ml/parser.mly" + ( [_1] ) +# 10889 "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( +# 1986 "ml/parser.mly" + ( [_1] ) +# 10896 "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( +# 1988 "ml/parser.mly" + ( _2 :: _1 ) +# 10904 "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( +# 1990 "ml/parser.mly" + ( _2 :: _1 ) +# 10912 "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( +# 1993 "ml/parser.mly" + ( [_1] ) +# 10919 "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( +# 1994 "ml/parser.mly" + ( [_1] ) +# 10926 "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( +# 1996 "ml/parser.mly" + ( _2 :: _1 ) +# 10934 "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( +# 2000 "ml/parser.mly" + ( let args, res = _2 in + Te.decl (mkrhs _1 1) ~args ?res ~attrs:_3 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) ) +# 10945 "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( +# 2006 "ml/parser.mly" + ( let args, res = _3 in + Te.decl (mkrhs _2 2) ~args ?res ~attrs:_4 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) ) +# 10956 "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( +# 2012 "ml/parser.mly" + ( Te.rebind (mkrhs _1 1) (mkrhs _3 3) ~attrs:_4 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) ) +# 10966 "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( +# 2017 "ml/parser.mly" + ( Te.rebind (mkrhs _2 2) (mkrhs _4 4) ~attrs:_5 + ~loc:(symbol_rloc()) ~info:(symbol_info ()) ) +# 10976 "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( +# 2024 "ml/parser.mly" + ( [_1] ) +# 10983 "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( +# 2025 "ml/parser.mly" + ( _3 :: _1 ) +# 10991 "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( +# 2030 "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()))) ) +# 11009 "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( +# 2041 "ml/parser.mly" + ( Pwith_typesubst + (mkrhs _3 3, + (Type.mk (mkrhs (Longident.last _3) 3) + ~params:_2 + ~manifest:_5 + ~loc:(symbol_rloc()))) ) +# 11023 "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( +# 2048 "ml/parser.mly" + ( Pwith_module (mkrhs _2 2, mkrhs _4 4) ) +# 11031 "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( +# 2050 "ml/parser.mly" + ( Pwith_modsubst (mkrhs _2 2, mkrhs _4 4) ) +# 11039 "ml/parser.ml" + : 'with_constraint)) +; (fun __caml_parser_env -> + Obj.repr( +# 2053 "ml/parser.mly" + ( Public ) +# 11045 "ml/parser.ml" + : 'with_type_binder)) +; (fun __caml_parser_env -> + Obj.repr( +# 2054 "ml/parser.mly" + ( Private ) +# 11051 "ml/parser.ml" + : 'with_type_binder)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 2060 "ml/parser.mly" + ( [mkrhs _2 2] ) +# 11058 "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( +# 2061 "ml/parser.mly" + ( mkrhs _3 3 :: _1 ) +# 11066 "ml/parser.ml" + : 'typevar_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 2065 "ml/parser.mly" + ( _1 ) +# 11073 "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( +# 2067 "ml/parser.mly" + ( mktyp(Ptyp_poly(List.rev _1, _3)) ) +# 11081 "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( +# 2071 "ml/parser.mly" + ( _1 ) +# 11088 "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( +# 2073 "ml/parser.mly" + ( mktyp(Ptyp_poly(List.rev _1, _3)) ) +# 11096 "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( +# 2080 "ml/parser.mly" + ( _1 ) +# 11103 "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( +# 2082 "ml/parser.mly" + ( Typ.attr _1 _2 ) +# 11111 "ml/parser.ml" + : 'core_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'core_type2) in + Obj.repr( +# 2086 "ml/parser.mly" + ( _1 ) +# 11118 "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( +# 2088 "ml/parser.mly" + ( mktyp(Ptyp_alias(_1, _4)) ) +# 11126 "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( +# 2092 "ml/parser.mly" + ( _1 ) +# 11133 "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( +# 2094 "ml/parser.mly" + ( let param = extra_rhs_core_type _4 ~pos:4 in + mktyp (Ptyp_arrow(Optional _2 , param, _6)) ) +# 11143 "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( +# 2097 "ml/parser.mly" + ( let param = extra_rhs_core_type _2 ~pos:2 in + mktyp(Ptyp_arrow(Optional _1 , param, _4)) + ) +# 11154 "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( +# 2101 "ml/parser.mly" + ( let param = extra_rhs_core_type _3 ~pos:3 in + mktyp(Ptyp_arrow(Labelled _1, param, _5)) ) +# 11164 "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( +# 2104 "ml/parser.mly" + ( let param = extra_rhs_core_type _1 ~pos:1 in + mktyp(Ptyp_arrow(Nolabel, param, _3)) ) +# 11173 "ml/parser.ml" + : 'core_type2)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type2) in + Obj.repr( +# 2110 "ml/parser.mly" + ( _1 ) +# 11180 "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( +# 2112 "ml/parser.mly" + ( match _2 with [sty] -> sty | _ -> raise Parse_error ) +# 11187 "ml/parser.ml" + : 'simple_core_type)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 2117 "ml/parser.mly" + ( mktyp(Ptyp_var _2) ) +# 11194 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + Obj.repr( +# 2119 "ml/parser.mly" + ( mktyp(Ptyp_any) ) +# 11200 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_longident) in + Obj.repr( +# 2121 "ml/parser.mly" + ( mktyp(Ptyp_constr(mkrhs _1 1, [])) ) +# 11207 "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( +# 2123 "ml/parser.mly" + ( mktyp(Ptyp_constr(mkrhs _2 2, [_1])) ) +# 11215 "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( +# 2125 "ml/parser.mly" + ( mktyp(Ptyp_constr(mkrhs _4 4, List.rev _2)) ) +# 11223 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'meth_list) in + Obj.repr( +# 2127 "ml/parser.mly" + ( let (f, c) = _2 in mktyp(Ptyp_object (f, c)) ) +# 11230 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + Obj.repr( +# 2129 "ml/parser.mly" + ( mktyp(Ptyp_object ([], Closed)) ) +# 11236 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'class_longident) in + Obj.repr( +# 2131 "ml/parser.mly" + ( mktyp(Ptyp_class(mkrhs _2 2, [])) ) +# 11243 "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( +# 2133 "ml/parser.mly" + ( mktyp(Ptyp_class(mkrhs _3 3, [_1])) ) +# 11251 "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( +# 2135 "ml/parser.mly" + ( mktyp(Ptyp_class(mkrhs _5 5, List.rev _2)) ) +# 11259 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'tag_field) in + Obj.repr( +# 2137 "ml/parser.mly" + ( mktyp(Ptyp_variant([_2], Closed, None)) ) +# 11266 "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( +# 2143 "ml/parser.mly" + ( mktyp(Ptyp_variant(List.rev _3, Closed, None)) ) +# 11273 "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( +# 2145 "ml/parser.mly" + ( mktyp(Ptyp_variant(_2 :: List.rev _4, Closed, None)) ) +# 11281 "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( +# 2147 "ml/parser.mly" + ( mktyp(Ptyp_variant(List.rev _3, Open, None)) ) +# 11289 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + Obj.repr( +# 2149 "ml/parser.mly" + ( mktyp(Ptyp_variant([], Open, None)) ) +# 11295 "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( +# 2151 "ml/parser.mly" + ( mktyp(Ptyp_variant(List.rev _3, Closed, Some [])) ) +# 11303 "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( +# 2153 "ml/parser.mly" + ( mktyp(Ptyp_variant(List.rev _3, Closed, Some (List.rev _5))) ) +# 11312 "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( +# 2155 "ml/parser.mly" + ( mktyp_attrs (Ptyp_package _4) _3 ) +# 11320 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'extension) in + Obj.repr( +# 2157 "ml/parser.mly" + ( mktyp (Ptyp_extension _1) ) +# 11327 "ml/parser.ml" + : 'simple_core_type2)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'module_type) in + Obj.repr( +# 2160 "ml/parser.mly" + ( package_type_of_module_type _1 ) +# 11334 "ml/parser.ml" + : 'package_type)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'row_field) in + Obj.repr( +# 2163 "ml/parser.mly" + ( [_1] ) +# 11341 "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( +# 2164 "ml/parser.mly" + ( _3 :: _1 ) +# 11349 "ml/parser.ml" + : 'row_field_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'tag_field) in + Obj.repr( +# 2167 "ml/parser.mly" + ( _1 ) +# 11356 "ml/parser.ml" + : 'row_field)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in + Obj.repr( +# 2168 "ml/parser.mly" + ( Rinherit _1 ) +# 11363 "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( +# 2172 "ml/parser.mly" + ( Rtag (mkrhs _1 1, add_info_attrs (symbol_info ()) _5, + _3, List.rev _4) ) +# 11374 "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( +# 2175 "ml/parser.mly" + ( Rtag (mkrhs _1 1, add_info_attrs (symbol_info ()) _2, true, []) ) +# 11382 "ml/parser.ml" + : 'tag_field)) +; (fun __caml_parser_env -> + Obj.repr( +# 2178 "ml/parser.mly" + ( true ) +# 11388 "ml/parser.ml" + : 'opt_ampersand)) +; (fun __caml_parser_env -> + Obj.repr( +# 2179 "ml/parser.mly" + ( false ) +# 11394 "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( +# 2182 "ml/parser.mly" + ( [_1] ) +# 11401 "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( +# 2183 "ml/parser.mly" + ( _3 :: _1 ) +# 11409 "ml/parser.ml" + : 'amper_type_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'name_tag) in + Obj.repr( +# 2186 "ml/parser.mly" + ( [_1] ) +# 11416 "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( +# 2187 "ml/parser.mly" + ( _2 :: _1 ) +# 11424 "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( +# 2190 "ml/parser.mly" + ( _1 ) +# 11431 "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( +# 2192 "ml/parser.mly" + ( mktyp(Ptyp_tuple(_1 :: List.rev _3)) ) +# 11439 "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( +# 2195 "ml/parser.mly" + ( [_1] ) +# 11446 "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( +# 2196 "ml/parser.mly" + ( _3 :: _1 ) +# 11454 "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( +# 2199 "ml/parser.mly" + ( [_1] ) +# 11461 "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( +# 2200 "ml/parser.mly" + ( _3 :: _1 ) +# 11469 "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( +# 2203 "ml/parser.mly" + ( let (f, c) = _2 in (_1 :: f, c) ) +# 11477 "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( +# 2204 "ml/parser.mly" + ( let (f, c) = _2 in (_1 :: f, c) ) +# 11485 "ml/parser.ml" + : 'meth_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'field_semi) in + Obj.repr( +# 2205 "ml/parser.mly" + ( [_1], Closed ) +# 11492 "ml/parser.ml" + : 'meth_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'field) in + Obj.repr( +# 2206 "ml/parser.mly" + ( [_1], Closed ) +# 11499 "ml/parser.ml" + : 'meth_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'inherit_field_semi) in + Obj.repr( +# 2207 "ml/parser.mly" + ( [_1], Closed ) +# 11506 "ml/parser.ml" + : 'meth_list)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_core_type) in + Obj.repr( +# 2208 "ml/parser.mly" + ( [Oinherit _1], Closed ) +# 11513 "ml/parser.ml" + : 'meth_list)) +; (fun __caml_parser_env -> + Obj.repr( +# 2209 "ml/parser.mly" + ( [], Open ) +# 11519 "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( +# 2213 "ml/parser.mly" + ( Otag (mkrhs _1 1, add_info_attrs (symbol_info ()) _4, _3) ) +# 11528 "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( +# 2218 "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)) ) +# 11543 "ml/parser.ml" + : 'field_semi)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 1 : 'simple_core_type) in + Obj.repr( +# 2227 "ml/parser.mly" + ( Oinherit _1 ) +# 11550 "ml/parser.ml" + : 'inherit_field_semi)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2230 "ml/parser.mly" + ( _1 ) +# 11557 "ml/parser.ml" + : 'label)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in + Obj.repr( +# 2236 "ml/parser.mly" + ( let (n, m) = _1 in Pconst_integer (n, m) ) +# 11564 "ml/parser.ml" + : 'constant)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : char) in + Obj.repr( +# 2237 "ml/parser.mly" + ( Pconst_char _1 ) +# 11571 "ml/parser.ml" + : 'constant)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string * string option) in + Obj.repr( +# 2238 "ml/parser.mly" + ( let (s, d) = _1 in Pconst_string (s, d) ) +# 11578 "ml/parser.ml" + : 'constant)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in + Obj.repr( +# 2239 "ml/parser.mly" + ( let (f, m) = _1 in Pconst_float (f, m) ) +# 11585 "ml/parser.ml" + : 'constant)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'constant) in + Obj.repr( +# 2242 "ml/parser.mly" + ( _1 ) +# 11592 "ml/parser.ml" + : 'signed_constant)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in + Obj.repr( +# 2243 "ml/parser.mly" + ( let (n, m) = _2 in Pconst_integer("-" ^ n, m) ) +# 11599 "ml/parser.ml" + : 'signed_constant)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in + Obj.repr( +# 2244 "ml/parser.mly" + ( let (f, m) = _2 in Pconst_float("-" ^ f, m) ) +# 11606 "ml/parser.ml" + : 'signed_constant)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in + Obj.repr( +# 2245 "ml/parser.mly" + ( let (n, m) = _2 in Pconst_integer (n, m) ) +# 11613 "ml/parser.ml" + : 'signed_constant)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : string * char option) in + Obj.repr( +# 2246 "ml/parser.mly" + ( let (f, m) = _2 in Pconst_float(f, m) ) +# 11620 "ml/parser.ml" + : 'signed_constant)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2252 "ml/parser.mly" + ( _1 ) +# 11627 "ml/parser.ml" + : 'ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2253 "ml/parser.mly" + ( _1 ) +# 11634 "ml/parser.ml" + : 'ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2256 "ml/parser.mly" + ( _1 ) +# 11641 "ml/parser.ml" + : 'val_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'operator) in + Obj.repr( +# 2257 "ml/parser.mly" + ( _2 ) +# 11648 "ml/parser.ml" + : 'val_ident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'operator) in + Obj.repr( +# 2258 "ml/parser.mly" + ( unclosed "(" 1 ")" 3 ) +# 11655 "ml/parser.ml" + : 'val_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2259 "ml/parser.mly" + ( expecting 2 "operator" ) +# 11661 "ml/parser.ml" + : 'val_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2260 "ml/parser.mly" + ( expecting 3 "module-expr" ) +# 11667 "ml/parser.ml" + : 'val_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2263 "ml/parser.mly" + ( _1 ) +# 11674 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2264 "ml/parser.mly" + ( _1 ) +# 11681 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2265 "ml/parser.mly" + ( _1 ) +# 11688 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2266 "ml/parser.mly" + ( _1 ) +# 11695 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2267 "ml/parser.mly" + ( _1 ) +# 11702 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2268 "ml/parser.mly" + ( _1 ) +# 11709 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in + Obj.repr( +# 2269 "ml/parser.mly" + ( "."^ _1 ^"()" ) +# 11716 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : string) in + Obj.repr( +# 2270 "ml/parser.mly" + ( "."^ _1 ^ "()<-" ) +# 11723 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in + Obj.repr( +# 2271 "ml/parser.mly" + ( "."^ _1 ^"[]" ) +# 11730 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : string) in + Obj.repr( +# 2272 "ml/parser.mly" + ( "."^ _1 ^ "[]<-" ) +# 11737 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in + Obj.repr( +# 2273 "ml/parser.mly" + ( "."^ _1 ^"{}" ) +# 11744 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 3 : string) in + Obj.repr( +# 2274 "ml/parser.mly" + ( "."^ _1 ^ "{}<-" ) +# 11751 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2275 "ml/parser.mly" + ( _1 ) +# 11758 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2276 "ml/parser.mly" + ( "!" ) +# 11764 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2277 "ml/parser.mly" + ( "+" ) +# 11770 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2278 "ml/parser.mly" + ( "+." ) +# 11776 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2279 "ml/parser.mly" + ( "-" ) +# 11782 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2280 "ml/parser.mly" + ( "-." ) +# 11788 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2281 "ml/parser.mly" + ( "*" ) +# 11794 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2282 "ml/parser.mly" + ( "=" ) +# 11800 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2283 "ml/parser.mly" + ( "<" ) +# 11806 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2284 "ml/parser.mly" + ( ">" ) +# 11812 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2285 "ml/parser.mly" + ( "or" ) +# 11818 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2286 "ml/parser.mly" + ( "||" ) +# 11824 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2287 "ml/parser.mly" + ( "&" ) +# 11830 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2288 "ml/parser.mly" + ( "&&" ) +# 11836 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2289 "ml/parser.mly" + ( ":=" ) +# 11842 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2290 "ml/parser.mly" + ( "+=" ) +# 11848 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + Obj.repr( +# 2291 "ml/parser.mly" + ( "%" ) +# 11854 "ml/parser.ml" + : 'operator)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2294 "ml/parser.mly" + ( _1 ) +# 11861 "ml/parser.ml" + : 'constr_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2295 "ml/parser.mly" + ( "[]" ) +# 11867 "ml/parser.ml" + : 'constr_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2296 "ml/parser.mly" + ( "()" ) +# 11873 "ml/parser.ml" + : 'constr_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2297 "ml/parser.mly" + ( "::" ) +# 11879 "ml/parser.ml" + : 'constr_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2298 "ml/parser.mly" + ( "false" ) +# 11885 "ml/parser.ml" + : 'constr_ident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2299 "ml/parser.mly" + ( "true" ) +# 11891 "ml/parser.ml" + : 'constr_ident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'val_ident) in + Obj.repr( +# 2303 "ml/parser.mly" + ( Lident _1 ) +# 11898 "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( +# 2304 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 11906 "ml/parser.ml" + : 'val_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'mod_longident) in + Obj.repr( +# 2307 "ml/parser.mly" + ( _1 ) +# 11913 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 4 : 'mod_longident) in + Obj.repr( +# 2308 "ml/parser.mly" + ( Ldot(_1,"::") ) +# 11920 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2309 "ml/parser.mly" + ( Lident "[]" ) +# 11926 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2310 "ml/parser.mly" + ( Lident "()" ) +# 11932 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2311 "ml/parser.mly" + ( Lident "::" ) +# 11938 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2312 "ml/parser.mly" + ( Lident "false" ) +# 11944 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + Obj.repr( +# 2313 "ml/parser.mly" + ( Lident "true" ) +# 11950 "ml/parser.ml" + : 'constr_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2316 "ml/parser.mly" + ( Lident _1 ) +# 11957 "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( +# 2317 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 11965 "ml/parser.ml" + : 'label_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2320 "ml/parser.mly" + ( Lident _1 ) +# 11972 "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( +# 2321 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 11980 "ml/parser.ml" + : 'type_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2324 "ml/parser.mly" + ( Lident _1 ) +# 11987 "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( +# 2325 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 11995 "ml/parser.ml" + : 'mod_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2328 "ml/parser.mly" + ( Lident _1 ) +# 12002 "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( +# 2329 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 12010 "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( +# 2330 "ml/parser.mly" + ( lapply _1 _3 ) +# 12018 "ml/parser.ml" + : 'mod_ext_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 2333 "ml/parser.mly" + ( Lident _1 ) +# 12025 "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( +# 2334 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 12033 "ml/parser.ml" + : 'mty_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2337 "ml/parser.mly" + ( Lident _1 ) +# 12040 "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( +# 2338 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 12048 "ml/parser.ml" + : 'clty_longident)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2341 "ml/parser.mly" + ( Lident _1 ) +# 12055 "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( +# 2342 "ml/parser.mly" + ( Ldot(_1, _3) ) +# 12063 "ml/parser.ml" + : 'class_longident)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 2348 "ml/parser.mly" + ( Ptop_dir(_2, Pdir_none) ) +# 12070 "ml/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( +# 2349 "ml/parser.mly" + ( Ptop_dir(_2, Pdir_string (fst _3)) ) +# 12078 "ml/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( +# 2350 "ml/parser.mly" + ( let (n, m) = _3 in + Ptop_dir(_2, Pdir_int (n ,m)) ) +# 12087 "ml/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( +# 2352 "ml/parser.mly" + ( Ptop_dir(_2, Pdir_ident _3) ) +# 12095 "ml/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( +# 2353 "ml/parser.mly" + ( Ptop_dir(_2, Pdir_ident _3) ) +# 12103 "ml/parser.ml" + : 'toplevel_directive)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ident) in + Obj.repr( +# 2354 "ml/parser.mly" + ( Ptop_dir(_2, Pdir_bool false) ) +# 12110 "ml/parser.ml" + : 'toplevel_directive)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ident) in + Obj.repr( +# 2355 "ml/parser.mly" + ( Ptop_dir(_2, Pdir_bool true) ) +# 12117 "ml/parser.ml" + : 'toplevel_directive)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ident) in + Obj.repr( +# 2361 "ml/parser.mly" + ( _2 ) +# 12124 "ml/parser.ml" + : 'name_tag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2364 "ml/parser.mly" + ( Nonrecursive ) +# 12130 "ml/parser.ml" + : 'rec_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2365 "ml/parser.mly" + ( Recursive ) +# 12136 "ml/parser.ml" + : 'rec_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2368 "ml/parser.mly" + ( Recursive ) +# 12142 "ml/parser.ml" + : 'nonrec_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2369 "ml/parser.mly" + ( Nonrecursive ) +# 12148 "ml/parser.ml" + : 'nonrec_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2372 "ml/parser.mly" + ( Upto ) +# 12154 "ml/parser.ml" + : 'direction_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2373 "ml/parser.mly" + ( Downto ) +# 12160 "ml/parser.ml" + : 'direction_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2376 "ml/parser.mly" + ( Public ) +# 12166 "ml/parser.ml" + : 'private_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2377 "ml/parser.mly" + ( Private ) +# 12172 "ml/parser.ml" + : 'private_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2380 "ml/parser.mly" + ( Immutable ) +# 12178 "ml/parser.ml" + : 'mutable_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2381 "ml/parser.mly" + ( Mutable ) +# 12184 "ml/parser.ml" + : 'mutable_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2384 "ml/parser.mly" + ( Concrete ) +# 12190 "ml/parser.ml" + : 'virtual_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2385 "ml/parser.mly" + ( Virtual ) +# 12196 "ml/parser.ml" + : 'virtual_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2388 "ml/parser.mly" + ( Public, Concrete ) +# 12202 "ml/parser.ml" + : 'private_virtual_flags)) +; (fun __caml_parser_env -> + Obj.repr( +# 2389 "ml/parser.mly" + ( Private, Concrete ) +# 12208 "ml/parser.ml" + : 'private_virtual_flags)) +; (fun __caml_parser_env -> + Obj.repr( +# 2390 "ml/parser.mly" + ( Public, Virtual ) +# 12214 "ml/parser.ml" + : 'private_virtual_flags)) +; (fun __caml_parser_env -> + Obj.repr( +# 2391 "ml/parser.mly" + ( Private, Virtual ) +# 12220 "ml/parser.ml" + : 'private_virtual_flags)) +; (fun __caml_parser_env -> + Obj.repr( +# 2392 "ml/parser.mly" + ( Private, Virtual ) +# 12226 "ml/parser.ml" + : 'private_virtual_flags)) +; (fun __caml_parser_env -> + Obj.repr( +# 2395 "ml/parser.mly" + ( Fresh ) +# 12232 "ml/parser.ml" + : 'override_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2396 "ml/parser.mly" + ( Override ) +# 12238 "ml/parser.ml" + : 'override_flag)) +; (fun __caml_parser_env -> + Obj.repr( +# 2399 "ml/parser.mly" + ( () ) +# 12244 "ml/parser.ml" + : 'opt_bar)) +; (fun __caml_parser_env -> + Obj.repr( +# 2400 "ml/parser.mly" + ( () ) +# 12250 "ml/parser.ml" + : 'opt_bar)) +; (fun __caml_parser_env -> + Obj.repr( +# 2403 "ml/parser.mly" + ( () ) +# 12256 "ml/parser.ml" + : 'opt_semi)) +; (fun __caml_parser_env -> + Obj.repr( +# 2404 "ml/parser.mly" + ( () ) +# 12262 "ml/parser.ml" + : 'opt_semi)) +; (fun __caml_parser_env -> + Obj.repr( +# 2407 "ml/parser.mly" + ( "-" ) +# 12268 "ml/parser.ml" + : 'subtractive)) +; (fun __caml_parser_env -> + Obj.repr( +# 2408 "ml/parser.mly" + ( "-." ) +# 12274 "ml/parser.ml" + : 'subtractive)) +; (fun __caml_parser_env -> + Obj.repr( +# 2411 "ml/parser.mly" + ( "+" ) +# 12280 "ml/parser.ml" + : 'additive)) +; (fun __caml_parser_env -> + Obj.repr( +# 2412 "ml/parser.mly" + ( "+." ) +# 12286 "ml/parser.ml" + : 'additive)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2418 "ml/parser.mly" + ( _1 ) +# 12293 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in + Obj.repr( +# 2419 "ml/parser.mly" + ( _1 ) +# 12300 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2420 "ml/parser.mly" + ( "and" ) +# 12306 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2421 "ml/parser.mly" + ( "as" ) +# 12312 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2422 "ml/parser.mly" + ( "assert" ) +# 12318 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2423 "ml/parser.mly" + ( "begin" ) +# 12324 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2424 "ml/parser.mly" + ( "class" ) +# 12330 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2425 "ml/parser.mly" + ( "constraint" ) +# 12336 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2426 "ml/parser.mly" + ( "do" ) +# 12342 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2427 "ml/parser.mly" + ( "done" ) +# 12348 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2428 "ml/parser.mly" + ( "downto" ) +# 12354 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2429 "ml/parser.mly" + ( "else" ) +# 12360 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2430 "ml/parser.mly" + ( "end" ) +# 12366 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2431 "ml/parser.mly" + ( "exception" ) +# 12372 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2432 "ml/parser.mly" + ( "external" ) +# 12378 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2433 "ml/parser.mly" + ( "false" ) +# 12384 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2434 "ml/parser.mly" + ( "for" ) +# 12390 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2435 "ml/parser.mly" + ( "fun" ) +# 12396 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2436 "ml/parser.mly" + ( "function" ) +# 12402 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2437 "ml/parser.mly" + ( "functor" ) +# 12408 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2438 "ml/parser.mly" + ( "if" ) +# 12414 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2439 "ml/parser.mly" + ( "in" ) +# 12420 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2440 "ml/parser.mly" + ( "include" ) +# 12426 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2441 "ml/parser.mly" + ( "inherit" ) +# 12432 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2442 "ml/parser.mly" + ( "initializer" ) +# 12438 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2443 "ml/parser.mly" + ( "lazy" ) +# 12444 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2444 "ml/parser.mly" + ( "let" ) +# 12450 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2445 "ml/parser.mly" + ( "match" ) +# 12456 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2446 "ml/parser.mly" + ( "method" ) +# 12462 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2447 "ml/parser.mly" + ( "module" ) +# 12468 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2448 "ml/parser.mly" + ( "mutable" ) +# 12474 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2449 "ml/parser.mly" + ( "new" ) +# 12480 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2450 "ml/parser.mly" + ( "nonrec" ) +# 12486 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2451 "ml/parser.mly" + ( "object" ) +# 12492 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2452 "ml/parser.mly" + ( "of" ) +# 12498 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2453 "ml/parser.mly" + ( "open" ) +# 12504 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2454 "ml/parser.mly" + ( "or" ) +# 12510 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2455 "ml/parser.mly" + ( "private" ) +# 12516 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2456 "ml/parser.mly" + ( "rec" ) +# 12522 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2457 "ml/parser.mly" + ( "sig" ) +# 12528 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2458 "ml/parser.mly" + ( "struct" ) +# 12534 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2459 "ml/parser.mly" + ( "then" ) +# 12540 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2460 "ml/parser.mly" + ( "to" ) +# 12546 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2461 "ml/parser.mly" + ( "true" ) +# 12552 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2462 "ml/parser.mly" + ( "try" ) +# 12558 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2463 "ml/parser.mly" + ( "type" ) +# 12564 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2464 "ml/parser.mly" + ( "val" ) +# 12570 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2465 "ml/parser.mly" + ( "virtual" ) +# 12576 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2466 "ml/parser.mly" + ( "when" ) +# 12582 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2467 "ml/parser.mly" + ( "while" ) +# 12588 "ml/parser.ml" + : 'single_attr_id)) +; (fun __caml_parser_env -> + Obj.repr( +# 2468 "ml/parser.mly" + ( "with" ) +# 12594 "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( +# 2473 "ml/parser.mly" + ( mkloc _1 (symbol_rloc()) ) +# 12601 "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( +# 2474 "ml/parser.mly" + ( mkloc (_1 ^ "." ^ _3.txt) (symbol_rloc())) +# 12609 "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( +# 2477 "ml/parser.mly" + ( (_2, _3) ) +# 12617 "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( +# 2480 "ml/parser.mly" + ( (_2, _3) ) +# 12625 "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( +# 2483 "ml/parser.mly" + ( (_2, _3) ) +# 12633 "ml/parser.ml" + : 'floating_attribute)) +; (fun __caml_parser_env -> + Obj.repr( +# 2486 "ml/parser.mly" + ( [] ) +# 12639 "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( +# 2487 "ml/parser.mly" + ( _1 :: _2 ) +# 12647 "ml/parser.ml" + : 'post_item_attributes)) +; (fun __caml_parser_env -> + Obj.repr( +# 2490 "ml/parser.mly" + ( [] ) +# 12653 "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( +# 2491 "ml/parser.mly" + ( _1 :: _2 ) +# 12661 "ml/parser.ml" + : 'attributes)) +; (fun __caml_parser_env -> + Obj.repr( +# 2494 "ml/parser.mly" + ( None, [] ) +# 12667 "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( +# 2495 "ml/parser.mly" + ( None, _1 :: _2 ) +# 12675 "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( +# 2496 "ml/parser.mly" + ( Some _2, _3 ) +# 12683 "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( +# 2499 "ml/parser.mly" + ( (_2, _3) ) +# 12691 "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( +# 2502 "ml/parser.mly" + ( (_2, _3) ) +# 12699 "ml/parser.ml" + : 'item_extension)) +; (fun __caml_parser_env -> + let _1 = (Parsing.peek_val __caml_parser_env 0 : 'structure) in + Obj.repr( +# 2505 "ml/parser.mly" + ( PStr _1 ) +# 12706 "ml/parser.ml" + : 'payload)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'signature) in + Obj.repr( +# 2506 "ml/parser.mly" + ( PSig _2 ) +# 12713 "ml/parser.ml" + : 'payload)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'core_type) in + Obj.repr( +# 2507 "ml/parser.mly" + ( PTyp _2 ) +# 12720 "ml/parser.ml" + : 'payload)) +; (fun __caml_parser_env -> + let _2 = (Parsing.peek_val __caml_parser_env 0 : 'pattern) in + Obj.repr( +# 2508 "ml/parser.mly" + ( PPat (_2, None) ) +# 12727 "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( +# 2509 "ml/parser.mly" + ( PPat (_2, Some _4) ) +# 12735 "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 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/src/vendor/compiler-libs-406/parser.mli b/analysis/src/vendor/compiler-libs-406/parser.mli new file mode 100644 index 000000000..444edf031 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/parser.mli @@ -0,0 +1,135 @@ +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 + +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 : + (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Parsetree.expression +val parse_pattern : + (Lexing.lexbuf -> token) -> Lexing.lexbuf -> Parsetree.pattern diff --git a/analysis/src/vendor/compiler-libs-406/parsetree.mli b/analysis/src/vendor/compiler-libs-406/parsetree.mli new file mode 100644 index 000000000..9b275c4ca --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/parsetree.mli @@ -0,0 +1,875 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(** Abstract syntax tree produced by parsing *) + +open Asttypes + +type constant = + Pconst_integer of string * char option + (* 3 3l 3L 3n + + 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 + (* 'c' *) + | Pconst_string of string * string option + (* "constant" + {delim|other constant|delim} + *) + | Pconst_float of string * char option + (* 3.4 2e5 1.4e-4 + + Suffixes [g-z][G-Z] are accepted by the parser. + Suffixes are rejected by the typechecker. + *) + +(** {1 Extension points} *) + +type attribute = string loc * payload + (* [@id ARG] + [@@id ARG] + + Metadata containers passed around within the AST. + The compiler ignores unknown attributes. + *) + +and extension = string loc * payload + (* [%id ARG] + [%%id ARG] + + Sub-language placeholder -- rejected by the typechecker. + *) + +and attributes = attribute list + +and payload = + | PStr of structure + | PSig of signature (* : SIG *) + | PTyp of core_type (* : T *) + | PPat of pattern * expression option (* ? P or ? P when E *) + +(** {1 Core language} *) + +(* Type expressions *) + +and core_type = + { + ptyp_desc: core_type_desc; + ptyp_loc: Location.t; + ptyp_attributes: attributes; (* ... [@id1] [@id2] *) + } + +and core_type_desc = + | Ptyp_any + (* _ *) + | Ptyp_var of string + (* 'a *) + | Ptyp_arrow of arg_label * core_type * core_type + (* T1 -> T2 Simple + ~l:T1 -> T2 Labelled + ?l:T1 -> T2 Optional + *) + | Ptyp_tuple of core_type list + (* T1 * ... * Tn + + Invariant: n >= 2 + *) + | Ptyp_constr of Longident.t loc * core_type list + (* tconstr + T tconstr + (T1, ..., Tn) tconstr + *) + | Ptyp_object of object_field list * closed_flag + (* < l1:T1; ...; ln:Tn > (flag = Closed) + < l1:T1; ...; ln:Tn; .. > (flag = Open) + *) + | Ptyp_class of Longident.t loc * core_type list + (* #tconstr + T #tconstr + (T1, ..., Tn) #tconstr + *) + | Ptyp_alias of core_type * string + (* T as 'a *) + | Ptyp_variant of row_field list * closed_flag * label list option + (* [ `A|`B ] (flag = Closed; labels = None) + [> `A|`B ] (flag = Open; labels = None) + [< `A|`B ] (flag = Closed; labels = Some []) + [< `A|`B > `X `Y ](flag = Closed; labels = Some ["X";"Y"]) + *) + | Ptyp_poly of string loc list * core_type + (* 'a1 ... 'an. T + + Can only appear in the following context: + + - As the core_type of a Ppat_constraint node corresponding + to a constraint on a let-binding: let x : 'a1 ... 'an. T + = e ... + + - Under Cfk_virtual for methods (not values). + + - As the core_type of a Pctf_method node. + + - As the core_type of a Pexp_poly node. + + - As the pld_type field of a label_declaration. + + - As a core_type of a Ptyp_object node. + *) + + | Ptyp_package of package_type + (* (module S) *) + | Ptyp_extension of extension + (* [%id] *) + +and package_type = Longident.t loc * (Longident.t loc * core_type) list + (* + (module S) + (module S with type t1 = T1 and ... and tn = Tn) + *) + +and row_field = + | Rtag of label loc * attributes * bool * core_type list + (* [`A] ( true, [] ) + [`A of T] ( false, [T] ) + [`A of T1 & .. & Tn] ( false, [T1;...Tn] ) + [`A of & T1 & .. & Tn] ( true, [T1;...Tn] ) + + - The 2nd field is true if the tag contains a + constant (empty) constructor. + - '&' occurs when several types are used for the same constructor + (see 4.2 in the manual) + + - TODO: switch to a record representation, and keep location + *) + | Rinherit of core_type + (* [ T ] *) + +and object_field = + | Otag of label loc * attributes * core_type + | Oinherit of core_type + +(* Patterns *) + +and pattern = + { + ppat_desc: pattern_desc; + ppat_loc: Location.t; + ppat_attributes: attributes; (* ... [@id1] [@id2] *) + } + +and pattern_desc = + | Ppat_any + (* _ *) + | Ppat_var of string loc + (* x *) + | Ppat_alias of pattern * string loc + (* P as 'a *) + | Ppat_constant of constant + (* 1, 'a', "true", 1.0, 1l, 1L, 1n *) + | Ppat_interval of constant * constant + (* 'a'..'z' + + Other forms of interval are recognized by the parser + but rejected by the type-checker. *) + | Ppat_tuple of pattern list + (* (P1, ..., Pn) + + Invariant: n >= 2 + *) + | Ppat_construct of Longident.t loc * pattern option + (* C None + C P Some P + C (P1, ..., Pn) Some (Ppat_tuple [P1; ...; Pn]) + *) + | Ppat_variant of label * pattern option + (* `A (None) + `A P (Some P) + *) + | Ppat_record of (Longident.t loc * pattern) list * closed_flag + (* { l1=P1; ...; ln=Pn } (flag = Closed) + { l1=P1; ...; ln=Pn; _} (flag = Open) + + Invariant: n > 0 + *) + | Ppat_array of pattern list + (* [| P1; ...; Pn |] *) + | Ppat_or of pattern * pattern + (* P1 | P2 *) + | Ppat_constraint of pattern * core_type + (* (P : T) *) + | Ppat_type of Longident.t loc + (* #tconst *) + | Ppat_lazy of pattern + (* lazy P *) + | Ppat_unpack of string loc + (* (module P) + Note: (module P : S) is represented as + Ppat_constraint(Ppat_unpack, Ptyp_package) + *) + | Ppat_exception of pattern + (* exception P *) + | Ppat_extension of extension + (* [%id] *) + | Ppat_open of Longident.t loc * pattern + (* M.(P) *) + +(* Value expressions *) + +and expression = + { + pexp_desc: expression_desc; + pexp_loc: Location.t; + pexp_attributes: attributes; (* ... [@id1] [@id2] *) + } + +and expression_desc = + | Pexp_ident of Longident.t loc + (* x + M.x + *) + | Pexp_constant of constant + (* 1, 'a', "true", 1.0, 1l, 1L, 1n *) + | Pexp_let of rec_flag * value_binding list * expression + (* let P1 = E1 and ... and Pn = EN in E (flag = Nonrecursive) + let rec P1 = E1 and ... and Pn = EN in E (flag = Recursive) + *) + | Pexp_function of case list + (* function P1 -> E1 | ... | Pn -> En *) + | Pexp_fun of arg_label * expression option * pattern * expression + (* fun P -> E1 (Simple, None) + fun ~l:P -> E1 (Labelled l, None) + fun ?l:P -> E1 (Optional l, None) + fun ?l:(P = E0) -> E1 (Optional l, Some E0) + + Notes: + - If E0 is provided, only Optional is allowed. + - "fun P1 P2 .. Pn -> E1" is represented as nested Pexp_fun. + - "let f P = E" is represented using Pexp_fun. + *) + | Pexp_apply of expression * (arg_label * expression) list + (* E0 ~l1:E1 ... ~ln:En + li can be empty (non labeled argument) or start with '?' + (optional argument). + + Invariant: n > 0 + *) + | Pexp_match of expression * case list + (* match E0 with P1 -> E1 | ... | Pn -> En *) + | Pexp_try of expression * case list + (* try E0 with P1 -> E1 | ... | Pn -> En *) + | Pexp_tuple of expression list + (* (E1, ..., En) + + Invariant: n >= 2 + *) + | Pexp_construct of Longident.t loc * expression option + (* C None + C E Some E + C (E1, ..., En) Some (Pexp_tuple[E1;...;En]) + *) + | Pexp_variant of label * expression option + (* `A (None) + `A E (Some E) + *) + | Pexp_record of (Longident.t loc * expression) list * expression option + (* { l1=P1; ...; ln=Pn } (None) + { E0 with l1=P1; ...; ln=Pn } (Some E0) + + Invariant: n > 0 + *) + | Pexp_field of expression * Longident.t loc + (* E.l *) + | Pexp_setfield of expression * Longident.t loc * expression + (* E1.l <- E2 *) + | Pexp_array of expression list + (* [| E1; ...; En |] *) + | Pexp_ifthenelse of expression * expression * expression option + (* if E1 then E2 else E3 *) + | Pexp_sequence of expression * expression + (* E1; E2 *) + | Pexp_while of expression * expression + (* while E1 do E2 done *) + | Pexp_for of + pattern * expression * expression * direction_flag * expression + (* for i = E1 to E2 do E3 done (flag = Upto) + for i = E1 downto E2 do E3 done (flag = Downto) + *) + | Pexp_constraint of expression * core_type + (* (E : T) *) + | Pexp_coerce of expression * core_type option * core_type + (* (E :> T) (None, T) + (E : T0 :> T) (Some T0, T) + *) + | Pexp_send of expression * label loc + (* E # m *) + | Pexp_new of Longident.t loc + (* new M.c *) + | Pexp_setinstvar of label loc * expression + (* x <- 2 *) + | Pexp_override of (label loc * expression) list + (* {< x1 = E1; ...; Xn = En >} *) + | Pexp_letmodule of string loc * module_expr * expression + (* let module M = ME in E *) + | Pexp_letexception of extension_constructor * expression + (* let exception C in E *) + | Pexp_assert of expression + (* assert E + Note: "assert false" is treated in a special way by the + type-checker. *) + | Pexp_lazy of expression + (* lazy E *) + | Pexp_poly of expression * core_type option + (* Used for method bodies. + + Can only be used as the expression under Cfk_concrete + for methods (not values). *) + | Pexp_object of class_structure + (* object ... end *) + | Pexp_newtype of string loc * expression + (* fun (type t) -> E *) + | Pexp_pack of module_expr + (* (module ME) + + (module ME : S) is represented as + Pexp_constraint(Pexp_pack, Ptyp_package S) *) + | Pexp_open of override_flag * Longident.t loc * expression + (* M.(E) + let open M in E + let! open M in E *) + | Pexp_extension of extension + (* [%id] *) + | Pexp_unreachable + (* . *) + +and case = (* (P -> E) or (P when E0 -> E) *) + { + pc_lhs: pattern; + pc_guard: expression option; + pc_rhs: expression; + } + +(* Value descriptions *) + +and value_description = + { + pval_name: string loc; + pval_type: core_type; + pval_prim: string list; + pval_attributes: attributes; (* ... [@@id1] [@@id2] *) + pval_loc: Location.t; + } + +(* + val x: T (prim = []) + external x: T = "s1" ... "sn" (prim = ["s1";..."sn"]) +*) + +(* Type declarations *) + +and type_declaration = + { + ptype_name: string loc; + ptype_params: (core_type * variance) list; + (* ('a1,...'an) t; None represents _*) + ptype_cstrs: (core_type * core_type * Location.t) list; + (* ... constraint T1=T1' ... constraint Tn=Tn' *) + ptype_kind: type_kind; + ptype_private: private_flag; (* = private ... *) + ptype_manifest: core_type option; (* = T *) + ptype_attributes: attributes; (* ... [@@id1] [@@id2] *) + ptype_loc: Location.t; + } + +(* + type t (abstract, no manifest) + type t = T0 (abstract, manifest=T0) + type t = C of T | ... (variant, no manifest) + type t = T0 = C of T | ... (variant, manifest=T0) + type t = {l: T; ...} (record, no manifest) + type t = T0 = {l : T; ...} (record, manifest=T0) + type t = .. (open, no manifest) +*) + +and type_kind = + | Ptype_abstract + | Ptype_variant of constructor_declaration list + (* Invariant: non-empty list *) + | Ptype_record of label_declaration list + (* Invariant: non-empty list *) + | Ptype_open + +and label_declaration = + { + pld_name: string loc; + pld_mutable: mutable_flag; + pld_type: core_type; + pld_loc: Location.t; + pld_attributes: attributes; (* l : T [@id1] [@id2] *) + } + +(* { ...; l: T; ... } (mutable=Immutable) + { ...; mutable l: T; ... } (mutable=Mutable) + + Note: T can be a Ptyp_poly. +*) + +and constructor_declaration = + { + pcd_name: string loc; + pcd_args: constructor_arguments; + pcd_res: core_type option; + pcd_loc: Location.t; + pcd_attributes: attributes; (* C of ... [@id1] [@id2] *) + } + +and constructor_arguments = + | Pcstr_tuple of core_type list + | Pcstr_record of label_declaration list + +(* + | C of T1 * ... * Tn (res = None, args = Pcstr_tuple []) + | C: T0 (res = Some T0, args = []) + | C: T1 * ... * Tn -> T0 (res = Some T0, args = Pcstr_tuple) + | C of {...} (res = None, args = Pcstr_record) + | C: {...} -> T0 (res = Some T0, args = Pcstr_record) + | C of {...} as t (res = None, args = Pcstr_record) +*) + +and type_extension = + { + ptyext_path: Longident.t loc; + ptyext_params: (core_type * variance) list; + ptyext_constructors: extension_constructor list; + ptyext_private: private_flag; + ptyext_attributes: attributes; (* ... [@@id1] [@@id2] *) + } +(* + type t += ... +*) + +and extension_constructor = + { + pext_name: string loc; + pext_kind : extension_constructor_kind; + pext_loc : Location.t; + pext_attributes: attributes; (* C of ... [@id1] [@id2] *) + } + +and extension_constructor_kind = + Pext_decl of constructor_arguments * core_type option + (* + | C of T1 * ... * Tn ([T1; ...; Tn], None) + | C: T0 ([], Some T0) + | C: T1 * ... * Tn -> T0 ([T1; ...; Tn], Some T0) + *) + | Pext_rebind of Longident.t loc + (* + | C = D + *) + +(** {1 Class language} *) + +(* Type expressions for the class language *) + +and class_type = + { + pcty_desc: class_type_desc; + pcty_loc: Location.t; + pcty_attributes: attributes; (* ... [@id1] [@id2] *) + } + +and class_type_desc = + | Pcty_constr of Longident.t loc * core_type list + (* c + ['a1, ..., 'an] c *) + | Pcty_signature of class_signature + (* object ... end *) + | Pcty_arrow of arg_label * core_type * class_type + (* T -> CT Simple + ~l:T -> CT Labelled l + ?l:T -> CT Optional l + *) + | Pcty_extension of extension + (* [%id] *) + | Pcty_open of override_flag * Longident.t loc * class_type + (* let open M in CT *) + +and class_signature = + { + pcsig_self: core_type; + pcsig_fields: class_type_field list; + } +(* object('selfpat) ... end + object ... end (self = Ptyp_any) + *) + +and class_type_field = + { + pctf_desc: class_type_field_desc; + pctf_loc: Location.t; + pctf_attributes: attributes; (* ... [@@id1] [@@id2] *) + } + +and class_type_field_desc = + | Pctf_inherit of class_type + (* inherit CT *) + | Pctf_val of (label loc * mutable_flag * virtual_flag * core_type) + (* val x: T *) + | Pctf_method of (label loc * private_flag * virtual_flag * core_type) + (* method x: T + + Note: T can be a Ptyp_poly. + *) + | Pctf_constraint of (core_type * core_type) + (* constraint T1 = T2 *) + | Pctf_attribute of attribute + (* [@@@id] *) + | Pctf_extension of extension + (* [%%id] *) + +and 'a class_infos = + { + pci_virt: virtual_flag; + pci_params: (core_type * variance) list; + pci_name: string loc; + pci_expr: 'a; + pci_loc: Location.t; + pci_attributes: attributes; (* ... [@@id1] [@@id2] *) + } +(* class c = ... + class ['a1,...,'an] c = ... + class virtual c = ... + + Also used for "class type" declaration. +*) + +and class_description = class_type class_infos + +and class_type_declaration = class_type class_infos + +(* Value expressions for the class language *) + +and class_expr = + { + pcl_desc: class_expr_desc; + pcl_loc: Location.t; + pcl_attributes: attributes; (* ... [@id1] [@id2] *) + } + +and class_expr_desc = + | Pcl_constr of Longident.t loc * core_type list + (* c + ['a1, ..., 'an] c *) + | Pcl_structure of class_structure + (* object ... end *) + | Pcl_fun of arg_label * expression option * pattern * class_expr + (* fun P -> CE (Simple, None) + fun ~l:P -> CE (Labelled l, None) + fun ?l:P -> CE (Optional l, None) + fun ?l:(P = E0) -> CE (Optional l, Some E0) + *) + | Pcl_apply of class_expr * (arg_label * expression) list + (* CE ~l1:E1 ... ~ln:En + li can be empty (non labeled argument) or start with '?' + (optional argument). + + Invariant: n > 0 + *) + | Pcl_let of rec_flag * value_binding list * class_expr + (* let P1 = E1 and ... and Pn = EN in CE (flag = Nonrecursive) + let rec P1 = E1 and ... and Pn = EN in CE (flag = Recursive) + *) + | Pcl_constraint of class_expr * class_type + (* (CE : CT) *) + | Pcl_extension of extension + (* [%id] *) + | Pcl_open of override_flag * Longident.t loc * class_expr + (* let open M in CE *) + + +and class_structure = + { + pcstr_self: pattern; + pcstr_fields: class_field list; + } +(* object(selfpat) ... end + object ... end (self = Ppat_any) + *) + +and class_field = + { + pcf_desc: class_field_desc; + pcf_loc: Location.t; + pcf_attributes: attributes; (* ... [@@id1] [@@id2] *) + } + +and class_field_desc = + | Pcf_inherit of unit + (* inherit CE + inherit CE as x + inherit! CE + inherit! CE as x + *) + | Pcf_val of (label loc * mutable_flag * class_field_kind) + (* val x = E + val virtual x: T + *) + | Pcf_method of (label loc * private_flag * class_field_kind) + (* method x = E (E can be a Pexp_poly) + method virtual x: T (T can be a Ptyp_poly) + *) + | Pcf_constraint of (core_type * core_type) + (* constraint T1 = T2 *) + | Pcf_initializer of expression + (* initializer E *) + | Pcf_attribute of attribute + (* [@@@id] *) + | Pcf_extension of extension + (* [%%id] *) + +and class_field_kind = + | Cfk_virtual of core_type + | Cfk_concrete of override_flag * expression + + + +(** {1 Module language} *) + +(* Type expressions for the module language *) + +and module_type = + { + pmty_desc: module_type_desc; + pmty_loc: Location.t; + pmty_attributes: attributes; (* ... [@id1] [@id2] *) + } + +and module_type_desc = + | Pmty_ident of Longident.t loc + (* S *) + | Pmty_signature of signature + (* sig ... end *) + | Pmty_functor of string loc * module_type option * module_type + (* functor(X : MT1) -> MT2 *) + | Pmty_with of module_type * with_constraint list + (* MT with ... *) + | Pmty_typeof of module_expr + (* module type of ME *) + | Pmty_extension of extension + (* [%id] *) + | Pmty_alias of Longident.t loc + (* (module M) *) + +and signature = signature_item list + +and signature_item = + { + psig_desc: signature_item_desc; + psig_loc: Location.t; + } + +and signature_item_desc = + | Psig_value of value_description + (* + val x: T + external x: T = "s1" ... "sn" + *) + | Psig_type of rec_flag * type_declaration list + (* type t1 = ... and ... and tn = ... *) + | Psig_typext of type_extension + (* type t1 += ... *) + | Psig_exception of extension_constructor + (* exception C of T *) + | Psig_module of module_declaration + (* module X : MT *) + | Psig_recmodule of module_declaration list + (* module rec X1 : MT1 and ... and Xn : MTn *) + | Psig_modtype of module_type_declaration + (* module type S = MT + module type S *) + | Psig_open of open_description + (* open X *) + | Psig_include of include_description + (* include MT *) + | Psig_class of class_description list + (* class c1 : ... and ... and cn : ... *) + | Psig_class_type of class_type_declaration list + (* class type ct1 = ... and ... and ctn = ... *) + | Psig_attribute of attribute + (* [@@@id] *) + | Psig_extension of extension * attributes + (* [%%id] *) + +and module_declaration = + { + pmd_name: string loc; + pmd_type: module_type; + pmd_attributes: attributes; (* ... [@@id1] [@@id2] *) + pmd_loc: Location.t; + } +(* S : MT *) + +and module_type_declaration = + { + pmtd_name: string loc; + pmtd_type: module_type option; + pmtd_attributes: attributes; (* ... [@@id1] [@@id2] *) + pmtd_loc: Location.t; + } +(* S = MT + S (abstract module type declaration, pmtd_type = None) +*) + +and open_description = + { + popen_lid: Longident.t loc; + popen_override: override_flag; + popen_loc: Location.t; + popen_attributes: attributes; + } +(* open! X - popen_override = Override (silences the 'used identifier + shadowing' warning) + open X - popen_override = Fresh + *) + +and 'a include_infos = + { + pincl_mod: 'a; + pincl_loc: Location.t; + pincl_attributes: attributes; + } + +and include_description = module_type include_infos +(* include MT *) + +and include_declaration = module_expr include_infos +(* include ME *) + +and with_constraint = + | Pwith_type of Longident.t loc * type_declaration + (* with type X.t = ... + + Note: the last component of the longident must match + the name of the type_declaration. *) + | Pwith_module of Longident.t loc * Longident.t loc + (* with module X.Y = Z *) + | Pwith_typesubst of Longident.t loc * type_declaration + (* with type X.t := ..., same format as [Pwith_type] *) + | Pwith_modsubst of Longident.t loc * Longident.t loc + (* with module X.Y := Z *) + +(* Value expressions for the module language *) + +and module_expr = + { + pmod_desc: module_expr_desc; + pmod_loc: Location.t; + pmod_attributes: attributes; (* ... [@id1] [@id2] *) + } + +and module_expr_desc = + | Pmod_ident of Longident.t loc + (* X *) + | Pmod_structure of structure + (* struct ... end *) + | Pmod_functor of string loc * module_type option * module_expr + (* functor(X : MT1) -> ME *) + | Pmod_apply of module_expr * module_expr + (* ME1(ME2) *) + | Pmod_constraint of module_expr * module_type + (* (ME : MT) *) + | Pmod_unpack of expression + (* (val E) *) + | Pmod_extension of extension + (* [%id] *) + +and structure = structure_item list + +and structure_item = + { + pstr_desc: structure_item_desc; + pstr_loc: Location.t; + } + +and structure_item_desc = + | Pstr_eval of expression * attributes + (* E *) + | Pstr_value of rec_flag * value_binding list + (* let P1 = E1 and ... and Pn = EN (flag = Nonrecursive) + let rec P1 = E1 and ... and Pn = EN (flag = Recursive) + *) + | Pstr_primitive of value_description + (* val x: T + external x: T = "s1" ... "sn" *) + | Pstr_type of rec_flag * type_declaration list + (* type t1 = ... and ... and tn = ... *) + | Pstr_typext of type_extension + (* type t1 += ... *) + | Pstr_exception of extension_constructor + (* exception C of T + exception C = M.X *) + | Pstr_module of module_binding + (* module X = ME *) + | Pstr_recmodule of module_binding list + (* module rec X1 = ME1 and ... and Xn = MEn *) + | Pstr_modtype of module_type_declaration + (* module type S = MT *) + | Pstr_open of open_description + (* open X *) + | 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 + (* include ME *) + | Pstr_attribute of attribute + (* [@@@id] *) + | Pstr_extension of extension * attributes + (* [%%id] *) + +and value_binding = + { + pvb_pat: pattern; + pvb_expr: expression; + pvb_attributes: attributes; + pvb_loc: Location.t; + } + +and module_binding = + { + pmb_name: string loc; + pmb_expr: module_expr; + pmb_attributes: attributes; + pmb_loc: Location.t; + } +(* 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/src/vendor/compiler-libs-406/path.ml b/analysis/src/vendor/compiler-libs-406/path.ml new file mode 100644 index 000000000..518938651 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/path.ml @@ -0,0 +1,109 @@ +(**************************************************************************) +(* *) +(* 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 t = + Pident of Ident.t + | Pdot of t * string * int + | Papply of t * t + +let nopos = -1 + +let rec same p1 p2 = + match (p1, p2) with + (Pident id1, Pident id2) -> Ident.same id1 id2 + | (Pdot(p1, s1, _pos1), Pdot(p2, s2, _pos2)) -> s1 = s2 && same p1 p2 + | (Papply(fun1, arg1), Papply(fun2, arg2)) -> + same fun1 fun2 && same arg1 arg2 + | (_, _) -> false + +let rec compare p1 p2 = + match (p1, p2) with + (Pident id1, Pident id2) -> Ident.compare id1 id2 + | (Pdot(p1, s1, _pos1), Pdot(p2, s2, _pos2)) -> + let h = compare p1 p2 in + if h <> 0 then h else String.compare s1 s2 + | (Papply(fun1, arg1), Papply(fun2, arg2)) -> + let h = compare fun1 fun2 in + if h <> 0 then h else compare arg1 arg2 + | ((Pident _ | Pdot _), (Pdot _ | Papply _)) -> -1 + | ((Pdot _ | Papply _), (Pident _ | Pdot _)) -> 1 + +let rec isfree id = function + Pident id' -> Ident.same id id' + | Pdot(p, _s, _pos) -> isfree id p + | Papply(p1, p2) -> isfree id p1 || isfree id p2 + +let rec binding_time = function + Pident id -> Ident.binding_time id + | Pdot(p, _s, _pos) -> binding_time p + | Papply(p1, p2) -> Ext_pervasives.max_int (binding_time p1) (binding_time p2) + +let kfalse _ = false + +let rec name ?(paren=kfalse) = function + Pident id -> Ident.name id + | Pdot(p, s, _pos) -> + name ~paren p ^ if paren s then ".( " ^ s ^ " )" else "." ^ s + | Papply(p1, p2) -> name ~paren p1 ^ "(" ^ name ~paren p2 ^ ")" + +let rec head = function + Pident id -> id + | Pdot(p, _s, _pos) -> head p + | Papply _ -> assert false + +let flatten = + let rec flatten acc = function + | Pident id -> `Ok (id, acc) + | Pdot (p, s, _) -> flatten (s :: acc) p + | Papply _ -> `Contains_apply + in + fun t -> flatten [] t + +let heads p = + let rec heads p acc = match p with + | Pident id -> id :: acc + | Pdot (p, _s, _pos) -> heads p acc + | Papply(p1, p2) -> + heads p1 (heads p2 acc) + in heads p [] + +let rec last = function + | Pident id -> Ident.name id + | Pdot(_, s, _) -> s + | Papply(_, p) -> last p + +let is_uident s = + assert (s <> ""); + match s.[0] with + | 'A'..'Z' -> true + | _ -> false + +type typath = + | Regular of t + | Ext of t * string + | LocalExt of Ident.t + | Cstr of t * string + +let constructor_typath = function + | Pident id when is_uident (Ident.name id) -> LocalExt id + | Pdot(ty_path, s, _) when is_uident s -> + if is_uident (last ty_path) then Ext (ty_path, s) + else Cstr (ty_path, s) + | p -> Regular p + +let is_constructor_typath p = + match constructor_typath p with + | Regular _ -> false + | _ -> true diff --git a/analysis/src/vendor/compiler-libs-406/path.mli b/analysis/src/vendor/compiler-libs-406/path.mli new file mode 100644 index 000000000..18491462e --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/path.mli @@ -0,0 +1,46 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Access paths *) + +type t = + Pident of Ident.t + | Pdot of t * string * int + | Papply of t * t + +val same: t -> t -> bool +val compare: t -> t -> int +val isfree: Ident.t -> t -> bool +val binding_time: t -> int +val flatten : t -> [ `Contains_apply | `Ok of Ident.t * string list ] + +val nopos: int + +val name: ?paren:(string -> bool) -> t -> string + (* [paren] tells whether a path suffix needs parentheses *) +val head: t -> Ident.t + +val heads: t -> Ident.t list + +val last: t -> string + +type typath = + | Regular of t + | Ext of t * string + | LocalExt of Ident.t + | Cstr of t * string + +val constructor_typath: t -> typath +val is_constructor_typath: t -> bool diff --git a/analysis/src/vendor/compiler-libs-406/predef.ml b/analysis/src/vendor/compiler-libs-406/predef.ml new file mode 100644 index 000000000..a6e9a2eaf --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/predef.ml @@ -0,0 +1,277 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Predefined type constructors (with special typing rules in typecore) *) + +open Path +open Types +open Btype + +let builtin_idents = ref [] + +let wrap create s = + let id = create s in + builtin_idents := (s, id) :: !builtin_idents; + id + +let ident_create = wrap Ident.create +let ident_create_predef_exn = wrap Ident.create_predef_exn + +let ident_int = ident_create "int" +and ident_char = ident_create "char" +and ident_bytes = ident_create "bytes" +and ident_float = ident_create "float" +and ident_bool = ident_create "bool" +and ident_unit = ident_create "unit" +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_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" + +type test = + | For_sure_yes + | For_sure_no + | NA + +let type_is_builtin_path_but_option (p : Path.t) : test = + match p with + | Pident {Ident.stamp} -> + if + stamp >= ident_int.Ident.stamp + && stamp <= ident_floatarray.Ident.stamp + then + if (stamp = ident_option.Ident.stamp) + || (stamp = ident_unit.Ident.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 +and path_float = Pident ident_float +and path_bool = Pident ident_bool +and path_unit = Pident ident_unit +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_int64 = Pident ident_int64 +and path_lazy_t = Pident ident_lazy_t +and path_string = Pident ident_string +and path_extension_constructor = Pident ident_extension_constructor +and path_floatarray = Pident ident_floatarray + +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)) +and type_float = newgenty (Tconstr(path_float, [], ref Mnil)) +and type_bool = newgenty (Tconstr(path_bool, [], ref Mnil)) +and type_unit = newgenty (Tconstr(path_unit, [], ref Mnil)) +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_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_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_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_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; +] + +let path_match_failure = Pident ident_match_failure +and path_assert_failure = Pident ident_assert_failure +and path_undefined_recursive_module = Pident ident_undefined_recursive_module + +let decl_abstr = + {type_params = []; + type_arity = 0; + type_kind = Type_abstract; + type_loc = Location.none; + type_private = Asttypes.Public; + type_manifest = None; + type_variance = []; + type_newtype_level = None; + type_attributes = []; + type_immediate = false; + type_unboxed = unboxed_false_default_false; + } + +let decl_abstr_imm = {decl_abstr with type_immediate = true} + +let cstr id args = + { + cd_id = id; + cd_args = Cstr_tuple args; + cd_res = None; + cd_loc = Location.none; + cd_attributes = []; + } + +let ident_false = ident_create "false" +and ident_true = ident_create "true" +and ident_void = ident_create "()" +and ident_nil = ident_create "[]" +and ident_cons = ident_create "::" +and ident_none = ident_create "None" +and ident_some = ident_create "Some" +let common_initial_env add_type add_extension empty_env = + let decl_bool = + {decl_abstr with + type_kind = Type_variant([cstr ident_false []; cstr ident_true []]); + type_immediate = true} + and decl_unit = + {decl_abstr with + type_kind = Type_variant([cstr ident_void []]); + type_immediate = true} + and decl_exn = + {decl_abstr with + type_kind = Type_open} + and decl_array = + let tvar = newgenvar() in + {decl_abstr with + type_params = [tvar]; + type_arity = 1; + type_variance = [Variance.full]} + and decl_list = + let tvar = newgenvar() in + {decl_abstr with + type_params = [tvar]; + type_arity = 1; + type_kind = + Type_variant([cstr ident_nil []; cstr ident_cons [tvar; type_list tvar]]); + type_variance = [Variance.covariant]} + and decl_option = + let tvar = newgenvar() in + {decl_abstr with + type_params = [tvar]; + type_arity = 1; + type_kind = Type_variant([cstr ident_none []; cstr ident_some [tvar]]); + type_variance = [Variance.covariant]} + and decl_lazy_t = + let tvar = newgenvar() in + {decl_abstr with + type_params = [tvar]; + type_arity = 1; + type_variance = [Variance.covariant]} + in + + let add_extension id l = + add_extension id + { ext_type_path = path_exn; + ext_type_params = []; + ext_args = Cstr_tuple l; + ext_ret_type = None; + ext_private = Asttypes.Public; + ext_loc = Location.none; + ext_attributes = [{Asttypes.txt="ocaml.warn_on_literal_pattern"; + loc=Location.none}, + Parsetree.PStr[]] } + 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_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 + [newgenty (Ttuple[type_string; type_int; type_int])] ( + add_extension ident_undefined_recursive_module + [newgenty (Ttuple[type_string; type_int; type_int])] ( + add_type ident_int64 decl_abstr ( + + add_type ident_lazy_t decl_lazy_t ( + add_type ident_option decl_option ( + add_type ident_list decl_list ( + add_type ident_array decl_array ( + add_type ident_exn decl_exn ( + add_type ident_unit decl_unit ( + add_type ident_bool decl_bool ( + add_type ident_float decl_abstr ( + add_type ident_string decl_abstr ( + add_type ident_int decl_abstr_imm ( + add_type ident_extension_constructor decl_abstr ( + add_type ident_floatarray decl_abstr ( + 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 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_invalid_argument; + ident_failure; ident_not_found; ident_sys_error; ident_end_of_file; + ident_division_by_zero; ident_sys_blocked_io; + ident_assert_failure; ident_undefined_recursive_module ] + +(* Start non-predef identifiers at 1000. This way, more predefs can + be defined in this file (above!) without breaking .cmi + compatibility. *) + +let _ = Ident.set_current_time 999 +let builtin_idents = List.rev !builtin_idents diff --git a/analysis/src/vendor/compiler-libs-406/predef.mli b/analysis/src/vendor/compiler-libs-406/predef.mli new file mode 100644 index 000000000..69ef81603 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/predef.mli @@ -0,0 +1,87 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Predefined type constructors (with special typing rules in typecore) *) + +open Types + +val type_int: type_expr +val type_char: type_expr +val type_string: type_expr +val type_bytes: type_expr +val type_float: type_expr +val type_bool: type_expr +val type_unit: type_expr +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_int64: type_expr +val type_lazy_t: type_expr -> type_expr +val type_extension_constructor:type_expr +val type_floatarray:type_expr + +val path_int: Path.t +val path_char: Path.t +val path_string: Path.t +val path_bytes: Path.t +val path_float: Path.t +val path_bool: Path.t +val path_unit: Path.t +val path_exn: Path.t +val path_array: Path.t +val path_list: Path.t +val path_option: 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_match_failure: Path.t +val path_assert_failure : Path.t +val path_undefined_recursive_module : Path.t + +(* To build the initial environment. Since there is a nasty mutual + recursion between predef and env, we break it by parameterizing + over Env.t, Env.add_type and Env.add_extension. *) + +val build_initial_env: + (Ident.t -> type_declaration -> 'a -> 'a) -> + (Ident.t -> extension_constructor -> 'a -> 'a) -> + 'a -> 'a + +(* To initialize linker tables *) + +val builtin_values: (string * Ident.t) list +val builtin_idents: (string * Ident.t) list + +(** All predefined exceptions, exposed as [Ident.t] for flambda (for + building value approximations). + The [Ident.t] for division by zero is also exported explicitly + 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/src/vendor/compiler-libs-406/primitive.ml b/analysis/src/vendor/compiler-libs-406/primitive.ml new file mode 100644 index 000000000..ad0504a09 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/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/src/vendor/compiler-libs-406/primitive.mli b/analysis/src/vendor/compiler-libs-406/primitive.mli new file mode 100644 index 000000000..ecc224562 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/primitive.mli @@ -0,0 +1,65 @@ +(**************************************************************************) +(* *) +(* 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 *) + +type boxed_integer = Pnativeint | Pint32 | Pint64 + +(* Representation of arguments/result for the native code version + of a primitive *) +type native_repr = + | Same_as_ocaml_repr + +type description = private + { 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 } + +(* Invariant [List.length d.prim_native_repr_args = d.prim_arity] *) + +val simple + : name:string + -> arity:int + -> alloc:bool + -> description + +val make + : name:string + -> alloc:bool + -> native_name:string + -> native_repr_args: native_repr list + -> native_repr_res: native_repr + -> description + +val parse_declaration + : Parsetree.value_description + -> native_repr_args:native_repr list + -> native_repr_res:native_repr + -> description + +val print + : description + -> Outcometree.out_val_decl + -> Outcometree.out_val_decl + +val native_name: description -> string +val byte_name: description -> string + + +val coerce : + (description -> description -> bool ) ref \ No newline at end of file diff --git a/analysis/src/vendor/compiler-libs-406/printtyp.ml b/analysis/src/vendor/compiler-libs-406/printtyp.ml new file mode 100644 index 000000000..a65dffa8f --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/printtyp.ml @@ -0,0 +1,1692 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy and 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. *) +(* *) +(**************************************************************************) + +(* Printing functions *) + +open Misc +open Ctype +open Format +open Longident +open Path +open Asttypes +open Types +open Btype +open Outcometree + +(* Print a long identifier *) + +let rec longident ppf = function + | Lident s -> pp_print_string ppf s + | Ldot(p, s) -> fprintf ppf "%a.%s" longident p s + | Lapply(p1, p2) -> fprintf ppf "%a(%a)" longident p1 longident p2 + +(* Print an identifier *) + +let unique_names = ref Ident.empty + +let ident_name id = + try Ident.find_same id !unique_names with Not_found -> Ident.name id + +let add_unique id = + try ignore (Ident.find_same id !unique_names) + with Not_found -> + unique_names := Ident.add id (Ident.unique_toplevel_name id) !unique_names + +let ident ppf id = pp_print_string ppf (ident_name id) + +(* Print a path *) + +let ident_pervasives = Ident.create_persistent "Pervasives" +let printing_env = ref Env.empty +let non_shadowed_pervasive = function + | Pdot(Pident id, s, _pos) as path -> + Ident.same id ident_pervasives && + (try Path.same path (Env.lookup_type (Lident s) !printing_env) + with Not_found -> true) + | _ -> false + +let rec tree_of_path = function + | Pident id -> + Oide_ident (ident_name id) + | Pdot(_, s, _pos) as path when non_shadowed_pervasive path -> + Oide_ident s + | Pdot(p, s, _pos) -> + Oide_dot (tree_of_path p, s) + | Papply(p1, p2) -> + Oide_apply (tree_of_path p1, tree_of_path p2) + +let rec path ppf = function + | Pident id -> + ident ppf id + | Pdot(_, s, _pos) as path when non_shadowed_pervasive path -> + pp_print_string ppf s + | Pdot(p, s, _pos) -> + path ppf p; + pp_print_char ppf '.'; + pp_print_string ppf s + | Papply(p1, p2) -> + fprintf ppf "%a(%a)" path p1 path p2 + +let rec string_of_out_ident = function + | Oide_ident s -> s + | Oide_dot (id, s) -> String.concat "." [string_of_out_ident id; s] + | Oide_apply (id1, id2) -> + String.concat "" + [string_of_out_ident id1; "("; string_of_out_ident id2; ")"] + +let string_of_path p = string_of_out_ident (tree_of_path p) + +(* Print a recursive annotation *) + +let tree_of_rec = function + | Trec_not -> Orec_not + | Trec_first -> Orec_first + | Trec_next -> Orec_next + +(* Print a raw type expression, with sharing *) + +let raw_list pr ppf = function + [] -> fprintf ppf "[]" + | a :: l -> + fprintf ppf "@[<1>[%a%t]@]" pr a + (fun ppf -> List.iter (fun x -> fprintf ppf ";@,%a" pr x) l) + +let kind_vars = ref [] +let kind_count = ref 0 + +let rec safe_kind_repr v = function + Fvar {contents=Some k} -> + if List.memq k v then "Fvar loop" else + safe_kind_repr (k::v) k + | Fvar r -> + let vid = + try List.assq r !kind_vars + with Not_found -> + let c = incr kind_count; !kind_count in + kind_vars := (r,c) :: !kind_vars; + c + in + Printf.sprintf "Fvar {None}@%d" vid + | Fpresent -> "Fpresent" + | Fabsent -> "Fabsent" + +let rec safe_commu_repr v = function + Cok -> "Cok" + | Cunknown -> "Cunknown" + | Clink r -> + if List.memq r v then "Clink loop" else + safe_commu_repr (r::v) !r + +let rec safe_repr v = function + {desc = Tlink t} when not (List.memq t v) -> + safe_repr (t::v) t + | t -> t + +let rec list_of_memo = function + Mnil -> [] + | Mcons (_priv, p, _t1, _t2, rem) -> p :: list_of_memo rem + | Mlink rem -> list_of_memo !rem + +let print_name ppf = function + None -> fprintf ppf "None" + | Some name -> fprintf ppf "\"%s\"" name + +let string_of_label = function + Nolabel -> "" + | Labelled s -> s + | Optional s -> "?"^s + +let visited = ref [] +let rec raw_type ppf ty = + let ty = safe_repr [] ty in + if List.memq ty !visited then fprintf ppf "{id=%d}" ty.id else begin + visited := ty :: !visited; + fprintf ppf "@[<1>{id=%d;level=%d;desc=@,%a}@]" ty.id ty.level + raw_type_desc ty.desc + end +and raw_type_list tl = raw_list raw_type tl +and raw_type_desc ppf = function + Tvar name -> fprintf ppf "Tvar %a" print_name name + | Tarrow(l,t1,t2,c) -> + fprintf ppf "@[Tarrow(\"%s\",@,%a,@,%a,@,%s)@]" + (string_of_label l) raw_type t1 raw_type t2 + (safe_commu_repr [] c) + | Ttuple tl -> + fprintf ppf "@[<1>Ttuple@,%a@]" raw_type_list tl + | Tconstr (p, tl, abbrev) -> + fprintf ppf "@[Tconstr(@,%a,@,%a,@,%a)@]" path p + raw_type_list tl + (raw_list path) (list_of_memo !abbrev) + | Tobject (t, nm) -> + fprintf ppf "@[Tobject(@,%a,@,@[<1>ref%t@])@]" raw_type t + (fun ppf -> + match !nm with None -> fprintf ppf " None" + | Some(p,tl) -> + fprintf ppf "(Some(@,%a,@,%a))" path p raw_type_list tl) + | Tfield (f, k, t1, t2) -> + fprintf ppf "@[Tfield(@,%s,@,%s,@,%a,@;<0 -1>%a)@]" f + (safe_kind_repr [] k) + raw_type t1 raw_type t2 + | Tnil -> fprintf ppf "Tnil" + | Tlink t -> fprintf ppf "@[<1>Tlink@,%a@]" raw_type t + | Tsubst t -> fprintf ppf "@[<1>Tsubst@,%a@]" raw_type t + | Tunivar name -> fprintf ppf "Tunivar %a" print_name name + | Tpoly (t, tl) -> + fprintf ppf "@[Tpoly(@,%a,@,%a)@]" + raw_type t + raw_type_list tl + | Tvariant row -> + fprintf ppf + "@[{@[%s@,%a;@]@ @[%s@,%a;@]@ %s%B;@ %s%B;@ @[<1>%s%t@]}@]" + "row_fields=" + (raw_list (fun ppf (l, f) -> + fprintf ppf "@[%s,@ %a@]" l raw_field f)) + row.row_fields + "row_more=" raw_type row.row_more + "row_closed=" row.row_closed + "row_fixed=" row.row_fixed + "row_name=" + (fun ppf -> + match row.row_name with None -> fprintf ppf "None" + | Some(p,tl) -> + fprintf ppf "Some(@,%a,@,%a)" path p raw_type_list tl) + | Tpackage (p, _, tl) -> + fprintf ppf "@[Tpackage(@,%a@,%a)@]" path p + raw_type_list tl + +and raw_field ppf = function + Rpresent None -> fprintf ppf "Rpresent None" + | Rpresent (Some t) -> fprintf ppf "@[<1>Rpresent(Some@,%a)@]" raw_type t + | Reither (c,tl,m,e) -> + fprintf ppf "@[Reither(%B,@,%a,@,%B,@,@[<1>ref%t@])@]" c + raw_type_list tl m + (fun ppf -> + match !e with None -> fprintf ppf " None" + | Some f -> fprintf ppf "@,@[<1>(%a)@]" raw_field f) + | Rabsent -> fprintf ppf "Rabsent" + +let raw_type_expr ppf t = + visited := []; kind_vars := []; kind_count := 0; + raw_type ppf t; + visited := []; kind_vars := [] + +let () = Btype.print_raw := raw_type_expr + +(* Normalize paths *) + +type param_subst = Id | Nth of int | Map of int list + +let is_nth = function + Nth _ -> true + | _ -> false + +let compose l1 = function + | Id -> Map l1 + | Map l2 -> Map (List.map (List.nth l1) l2) + | Nth n -> Nth (List.nth l1 n) + +let apply_subst s1 tyl = + if tyl = [] then [] + (* cf. PR#7543: Typemod.type_package doesn't respect type constructor arity *) + else + match s1 with + Nth n1 -> [List.nth tyl n1] + | Map l1 -> List.map (List.nth tyl) l1 + | Id -> tyl + +type best_path = Paths of Path.t list | Best of Path.t + +let printing_depth = ref 0 +let printing_cont = ref ([] : Env.iter_cont list) +let printing_old = ref Env.empty +let printing_pers = ref Concr.empty +module PathMap = Map.Make(Path) +let printing_map = ref PathMap.empty + +let same_type t t' = repr t == repr t' + +let rec index l x = + match l with + [] -> raise Not_found + | a :: l -> if x == a then 0 else 1 + index l x + +let rec uniq = function + [] -> true + | a :: l -> not (List.memq a l) && uniq l + +let rec normalize_type_path ?(cache=false) env p = + try + let (params, ty, _) = Env.find_type_expansion p env in + let params = List.map repr params in + match repr ty with + {desc = Tconstr (p1, tyl, _)} -> + let tyl = List.map repr tyl in + if List.length params = List.length tyl + && List.for_all2 (==) params tyl + then normalize_type_path ~cache env p1 + else if cache || List.length params <= List.length tyl + || not (uniq tyl) then (p, Id) + else + let l1 = List.map (index params) tyl in + let (p2, s2) = normalize_type_path ~cache env p1 in + (p2, compose l1 s2) + | ty -> + (p, Nth (index params ty)) + with + Not_found -> + (Env.normalize_path None env p, Id) + +let penalty s = + if s <> "" && s.[0] = '_' then + 10 + else + try + for i = 0 to String.length s - 2 do + if s.[i] = '_' && s.[i + 1] = '_' then + raise Exit + done; + 1 + with Exit -> 10 + +let rec path_size = function + Pident id -> + penalty (Ident.name id), -Ident.binding_time id + | Pdot (p, _, _) -> + let (l, b) = path_size p in (1+l, b) + | Papply (p1, p2) -> + let (l, b) = path_size p1 in + (l + fst (path_size p2), b) + +let same_printing_env env = + let used_pers = Env.used_persistent () in + Env.same_types !printing_old env && Concr.equal !printing_pers used_pers + +let set_printing_env env = + printing_env := env; + if !Clflags.real_paths + || !printing_env == Env.empty || same_printing_env env then () else + begin + (* printf "Reset printing_map@."; *) + printing_old := env; + printing_pers := Env.used_persistent (); + printing_map := PathMap.empty; + printing_depth := 0; + (* printf "Recompute printing_map.@."; *) + let cont = + Env.iter_types + (fun p (p', _decl) -> + let (p1, s1) = normalize_type_path env p' ~cache:true in + (* Format.eprintf "%a -> %a = %a@." path p path p' path p1 *) + if s1 = Id then + try + let r = PathMap.find p1 !printing_map in + match !r with + Paths l -> r := Paths (p :: l) + | Best p' -> r := Paths [p; p'] (* assert false *) + with Not_found -> + printing_map := PathMap.add p1 (ref (Paths [p])) !printing_map) + env in + printing_cont := [cont]; + end + +let wrap_printing_env env f = + set_printing_env env; + try_finally f (fun () -> set_printing_env Env.empty) + +let wrap_printing_env env f = + Env.without_cmis (wrap_printing_env env) f + +let is_unambiguous path env = + let l = Env.find_shadowed_types path env in + List.exists (Path.same path) l || (* concrete paths are ok *) + match l with + [] -> true + | p :: rem -> + (* allow also coherent paths: *) + let normalize p = fst (normalize_type_path ~cache:true env p) in + let p' = normalize p in + List.for_all (fun p -> Path.same (normalize p) p') rem || + (* also allow repeatedly defining and opening (for toplevel) *) + let id = lid_of_path p in + List.for_all (fun p -> lid_of_path p = id) rem && + Path.same p (Env.lookup_type id env) + +let rec get_best_path r = + match !r with + Best p' -> p' + | Paths [] -> raise Not_found + | Paths l -> + r := Paths []; + List.iter + (fun p -> + (* Format.eprintf "evaluating %a@." path p; *) + match !r with + Best p' when path_size p >= path_size p' -> () + | _ -> if is_unambiguous p !printing_env then r := Best p) + (* else Format.eprintf "%a ignored as ambiguous@." path p *) + l; + get_best_path r + +let best_type_path p = + if !Clflags.real_paths || !printing_env == Env.empty + then (p, Id) + else + let (p', s) = normalize_type_path !printing_env p in + let get_path () = get_best_path (PathMap.find p' !printing_map) in + while !printing_cont <> [] && + try fst (path_size (get_path ())) > !printing_depth with Not_found -> true + do + printing_cont := List.map snd (Env.run_iter_cont !printing_cont); + incr printing_depth; + done; + let p'' = try get_path () with Not_found -> p' in + (* Format.eprintf "%a = %a -> %a@." path p path p' path p''; *) + (p'', s) + +(* Print a type expression *) + +let names = ref ([] : (type_expr * string) list) +let name_counter = ref 0 +let named_vars = ref ([] : string list) + +let weak_counter = ref 1 +let weak_var_map = ref TypeMap.empty +let named_weak_vars = ref StringSet.empty + +let reset_names () = names := []; name_counter := 0; named_vars := [] +let add_named_var ty = + match ty.desc with + Tvar (Some name) | Tunivar (Some name) -> + if List.mem name !named_vars then () else + named_vars := name :: !named_vars + | _ -> () + +let name_is_already_used name = + List.mem name !named_vars + || List.exists (fun (_, name') -> name = name') !names + || StringSet.mem name !named_weak_vars + +let rec new_name () = + let name = + if !name_counter < 26 + then String.make 1 (Char.chr(97 + !name_counter)) + else String.make 1 (Char.chr(97 + !name_counter mod 26)) ^ + string_of_int(!name_counter / 26) in + incr name_counter; + if name_is_already_used name then new_name () else name + +let rec new_weak_name ty () = + let name = "weak" ^ string_of_int !weak_counter in + incr weak_counter; + if name_is_already_used name then new_weak_name ty () + else begin + named_weak_vars := StringSet.add name !named_weak_vars; + weak_var_map := TypeMap.add ty name !weak_var_map; + name + end + +let name_of_type name_generator t = + (* We've already been through repr at this stage, so t is our representative + of the union-find class. *) + try List.assq t !names with Not_found -> + try TypeMap.find t !weak_var_map with Not_found -> + let name = + match t.desc with + Tvar (Some name) | Tunivar (Some name) -> + (* Some part of the type we've already printed has assigned another + * unification variable to that name. We want to keep the name, so try + * adding a number until we find a name that's not taken. *) + let current_name = ref name in + let i = ref 0 in + while List.exists (fun (_, name') -> !current_name = name') !names do + current_name := name ^ (string_of_int !i); + i := !i + 1; + done; + !current_name + | _ -> + (* No name available, create a new one *) + name_generator () + in + (* Exception for type declarations *) + if name <> "_" then names := (t, name) :: !names; + name + +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 + +let visited_objects = ref ([] : type_expr list) +let aliased = ref ([] : type_expr list) +let delayed = ref ([] : type_expr list) + +let add_delayed t = + if not (List.memq t !delayed) then delayed := t :: !delayed + +let is_aliased ty = List.memq (proxy ty) !aliased +let add_alias ty = + let px = proxy ty in + if not (is_aliased px) then begin + aliased := px :: !aliased; + add_named_var px + end + +let aliasable ty = + match ty.desc with + Tvar _ | Tunivar _ | Tpoly _ -> false + | Tconstr (p, _, _) -> + not (is_nth (snd (best_type_path p))) + | _ -> true + +let namable_row row = + row.row_name <> None && + List.for_all + (fun (_, f) -> + match row_field_repr f with + | Reither(c, l, _, _) -> + row.row_closed && if c then l = [] else List.length l = 1 + | _ -> true) + row.row_fields + +let rec mark_loops_rec visited ty = + let ty = repr ty in + let px = proxy ty in + if List.memq px visited && aliasable ty then add_alias px else + let visited = px :: visited in + match ty.desc with + | Tvar _ -> add_named_var ty + | Tarrow(_, ty1, ty2, _) -> + mark_loops_rec visited ty1; mark_loops_rec visited ty2 + | Ttuple tyl -> List.iter (mark_loops_rec visited) tyl + | Tconstr(p, tyl, _) -> + let (_p', s) = best_type_path p in + List.iter (mark_loops_rec visited) (apply_subst s tyl) + | Tpackage (_, _, tyl) -> + List.iter (mark_loops_rec visited) tyl + | Tvariant row -> + if List.memq px !visited_objects then add_alias px else + begin + let row = row_repr row in + if not (static_row row) then + visited_objects := px :: !visited_objects; + match row.row_name with + | Some(_p, tyl) when namable_row row -> + List.iter (mark_loops_rec visited) tyl + | _ -> + iter_row (mark_loops_rec visited) row + end + | Tobject (fi, nm) -> + if List.memq px !visited_objects then add_alias px else + begin + if opened_object ty then + visited_objects := px :: !visited_objects; + begin match !nm with + | None -> + let fields, _ = flatten_fields fi in + List.iter + (fun (_, kind, ty) -> + if field_kind_repr kind = Fpresent then + mark_loops_rec visited ty) + fields + | Some (_, l) -> + List.iter (mark_loops_rec visited) (List.tl l) + end + end + | Tfield(_, kind, ty1, ty2) when field_kind_repr kind = Fpresent -> + mark_loops_rec visited ty1; mark_loops_rec visited ty2 + | Tfield(_, _, _, ty2) -> + mark_loops_rec visited ty2 + | Tnil -> () + | Tsubst ty -> mark_loops_rec visited ty + | Tlink _ -> fatal_error "Printtyp.mark_loops_rec (2)" + | Tpoly (ty, tyl) -> + List.iter (fun t -> add_alias t) tyl; + mark_loops_rec visited ty + | Tunivar _ -> add_named_var ty + +let mark_loops ty = + normalize_type Env.empty ty; + mark_loops_rec [] ty;; + +let reset_loop_marks () = + visited_objects := []; aliased := []; delayed := [] + +let reset () = + unique_names := Ident.empty; reset_names (); reset_loop_marks () + +let reset_and_mark_loops ty = + reset (); mark_loops ty + +let reset_and_mark_loops_list tyl = + reset (); List.iter mark_loops tyl + +(* Disabled in classic mode when printing an unification error *) + + +let rec tree_of_typexp sch ty = + let ty = repr ty in + let px = proxy ty in + if List.mem_assq px !names && not (List.memq px !delayed) then + let mark = is_non_gen sch ty in + let name = name_of_type (if mark then new_weak_name ty else new_name) px in + Otyp_var (mark, name) else + + let pr_typ () = + match ty.desc with + | Tvar _ -> + (*let lev = + if is_non_gen sch ty then "/" ^ string_of_int ty.level else "" in*) + let non_gen = is_non_gen sch ty in + let name_gen = if non_gen then new_weak_name ty else new_name in + Otyp_var (non_gen, name_of_type name_gen ty) + | Tarrow(l, ty1, ty2, _) -> + let pr_arrow l ty1 ty2 = + let lab = + string_of_label l + in + let t1 = + if is_optional l then + match (repr ty1).desc with + | Tconstr(path, [ty], _) + when Path.same path Predef.path_option -> + tree_of_typexp sch ty + | _ -> Otyp_stuff "" + else tree_of_typexp sch ty1 in + Otyp_arrow (lab, t1, tree_of_typexp sch ty2) in + pr_arrow l ty1 ty2 + | Ttuple tyl -> + Otyp_tuple (tree_of_typlist sch tyl) + | Tconstr(p, tyl, _abbrev) -> + let p', s = best_type_path p in + let tyl' = apply_subst s tyl in + if is_nth s && not (tyl'=[]) then tree_of_typexp sch (List.hd tyl') else + Otyp_constr (tree_of_path p', tree_of_typlist sch tyl') + | Tvariant row -> + 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 + else row.row_fields in + let present = + List.filter + (fun (_, f) -> + match row_field_repr f with + | Rpresent _ -> true + | _ -> false) + fields in + let all_present = List.length present = List.length fields in + begin match row.row_name with + | Some(p, tyl) when namable_row row -> + let (p', s) = best_type_path p in + let id = tree_of_path p' in + let args = tree_of_typlist sch (apply_subst s tyl) in + let out_variant = + if is_nth s then List.hd args else Otyp_constr (id, args) in + if row.row_closed && all_present then + out_variant + else + let non_gen = is_non_gen sch px in + let tags = + if all_present then None else Some (List.map fst present) in + Otyp_variant (non_gen, Ovar_typ out_variant, row.row_closed, tags) + | _ -> + let non_gen = + not (row.row_closed && all_present) && is_non_gen sch px in + let fields = List.map (tree_of_row_field sch) fields in + let tags = + if all_present then None else Some (List.map fst present) in + Otyp_variant (non_gen, Ovar_fields fields, row.row_closed, tags) + end + | Tobject (fi, nm) -> + tree_of_typobject sch fi !nm + | Tnil | Tfield _ -> + tree_of_typobject sch ty None + | Tsubst ty -> + tree_of_typexp sch ty + | Tlink _ -> + fatal_error "Printtyp.tree_of_typexp" + | Tpoly (ty, []) -> + tree_of_typexp sch ty + | Tpoly (ty, tyl) -> + (*let print_names () = + List.iter (fun (_, name) -> prerr_string (name ^ " ")) !names; + prerr_string "; " in *) + let tyl = List.map repr tyl in + if tyl = [] then tree_of_typexp sch ty else begin + let old_delayed = !delayed in + (* Make the names delayed, so that the real type is + printed once when used as proxy *) + List.iter add_delayed tyl; + let tl = List.map (name_of_type new_name) tyl in + let tr = Otyp_poly (tl, tree_of_typexp sch ty) in + (* Forget names when we leave scope *) + remove_names tyl; + delayed := old_delayed; tr + end + | Tunivar _ -> + Otyp_var (false, name_of_type new_name ty) + | Tpackage (p, n, tyl) -> + let n = + 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 is_aliased px && aliasable ty then begin + check_name_of_type px; + Otyp_alias (pr_typ (), name_of_type new_name px) end + else pr_typ () + +and tree_of_row_field sch (l, f) = + match row_field_repr f with + | Rpresent None | Reither(true, [], _, _) -> (l, false, []) + | Rpresent(Some ty) -> (l, false, [tree_of_typexp sch ty]) + | Reither(c, tyl, _, _) -> + if c (* contradiction: constant constructor with an argument *) + then (l, true, tree_of_typlist sch tyl) + else (l, false, tree_of_typlist sch tyl) + | Rabsent -> (l, false, [] (* actually, an error *)) + +and tree_of_typlist sch tyl = + List.map (tree_of_typexp sch) tyl + +and tree_of_typobject sch fi nm = + begin match nm with + | None -> + let pr_fields fi = + let (fields, rest) = flatten_fields fi in + let present_fields = + List.fold_right + (fun (n, k, t) l -> + match field_kind_repr k with + | Fpresent -> (n, t) :: l + | _ -> l) + fields [] in + let sorted_fields = + List.sort + (fun (n, _) (n', _) -> String.compare n n') present_fields in + tree_of_typfields sch rest sorted_fields in + let (fields, rest) = pr_fields fi in + Otyp_object (fields, rest) + | Some (p, ty :: tyl) -> + let non_gen = is_non_gen sch (repr ty) in + let args = tree_of_typlist sch tyl in + let (p', s) = best_type_path p in + assert (s = Id); + Otyp_class (non_gen, tree_of_path p', args) + | _ -> + fatal_error "Printtyp.tree_of_typobject" + end + +and is_non_gen sch ty = + sch && is_Tvar ty && ty.level <> generic_level + +and tree_of_typfields sch rest = function + | [] -> + let rest = + match rest.desc with + | Tvar _ | Tunivar _ -> Some (is_non_gen sch rest) + | Tconstr _ -> Some false + | Tnil -> None + | _ -> fatal_error "typfields (1)" + in + ([], rest) + | (s, t) :: l -> + let field = (s, tree_of_typexp sch t) in + let (fields, rest) = tree_of_typfields sch rest l in + (field :: fields, rest) + +let typexp sch ppf ty = + !Oprint.out_type ppf (tree_of_typexp sch ty) + +let type_expr ppf ty = typexp false ppf ty + +and type_sch ppf ty = typexp true ppf ty + +and type_scheme ppf ty = reset_and_mark_loops ty; typexp true ppf ty + +(* Maxence *) +let type_scheme_max ?(b_reset_names=true) ppf ty = + if b_reset_names then reset_names () ; + typexp true ppf ty +(* End Maxence *) + +let tree_of_type_scheme ty = reset_and_mark_loops ty; tree_of_typexp true ty + +(* Print one type declaration *) + +let tree_of_constraints params = + List.fold_right + (fun ty list -> + let ty' = unalias ty in + if proxy ty != proxy ty' then + let tr = tree_of_typexp true ty in + (tr, tree_of_typexp true ty') :: list + else list) + params [] + +let filter_params tyl = + let params = + List.fold_left + (fun tyl ty -> + let ty = repr ty in + if List.memq ty tyl then Btype.newgenty (Tsubst ty) :: tyl + else ty :: tyl) + [] tyl + in List.rev params + +let mark_loops_constructor_arguments = function + | Cstr_tuple l -> List.iter mark_loops l + | Cstr_record l -> List.iter (fun l -> mark_loops l.ld_type) l + +let rec tree_of_type_decl id decl = + + reset(); + + let params = filter_params decl.type_params in + + begin match decl.type_manifest with + | Some ty -> + let vars = free_variables ty in + List.iter + (function {desc = Tvar (Some "_")} as ty -> + if List.memq ty vars then ty.desc <- Tvar None + | _ -> ()) + params + | None -> () + end; + + List.iter add_alias params; + List.iter mark_loops params; + List.iter check_name_of_type (List.map proxy params); + let ty_manifest = + match decl.type_manifest with + | None -> None + | Some ty -> + let ty = + (* Special hack to hide variant name *) + match repr ty with {desc=Tvariant row} -> + let row = row_repr row in + begin match row.row_name with + Some (Pident id', _) when Ident.same id id' -> + newgenty (Tvariant {row with row_name = None}) + | _ -> ty + end + | _ -> ty + in + mark_loops ty; + Some ty + in + begin match decl.type_kind with + | Type_abstract -> () + | Type_variant cstrs -> + List.iter + (fun c -> + mark_loops_constructor_arguments c.cd_args; + may mark_loops c.cd_res) + cstrs + | Type_record(l, _rep) -> + List.iter (fun l -> mark_loops l.ld_type) l + | Type_open -> () + end; + + let type_param = + function + | Otyp_var (_, id) -> id + | _ -> "?" + in + let type_defined decl = + let abstr = + match decl.type_kind with + Type_abstract -> + decl.type_manifest = None || decl.type_private = Private + | Type_record _ -> + decl.type_private = Private + | Type_variant tll -> + decl.type_private = Private || + List.exists (fun cd -> cd.cd_res <> None) tll + | Type_open -> + decl.type_manifest = None + in + let vari = + List.map2 + (fun ty v -> + if abstr || not (is_Tvar (repr ty)) then Variance.get_upper v + else (true,true)) + decl.type_params decl.type_variance + in + (Ident.name id, + List.map2 (fun ty cocn -> type_param (tree_of_typexp false ty), cocn) + params vari) + in + let tree_of_manifest ty1 = + match ty_manifest with + | None -> ty1 + | Some ty -> Otyp_manifest (tree_of_typexp false ty, ty1) + in + let (name, args) = type_defined decl in + let constraints = tree_of_constraints params in + let ty, priv = + match decl.type_kind with + | Type_abstract -> + begin match ty_manifest with + | None -> (Otyp_abstract, Public) + | Some ty -> + tree_of_typexp false ty, decl.type_private + end + | Type_variant cstrs -> + tree_of_manifest (Otyp_sum (List.map tree_of_constructor cstrs)), + decl.type_private + | Type_record(lbls, _rep) -> + tree_of_manifest (Otyp_record (List.map tree_of_label lbls)), + decl.type_private + | Type_open -> + tree_of_manifest Otyp_open, + decl.type_private + in + let immediate = + Builtin_attributes.immediate decl.type_attributes + in + { otype_name = name; + otype_params = args; + otype_type = ty; + otype_private = priv; + otype_immediate = immediate; + otype_unboxed = decl.type_unboxed.unboxed; + otype_cstrs = constraints } + +and tree_of_constructor_arguments = function + | Cstr_tuple l -> tree_of_typlist false l + | Cstr_record l -> [ Otyp_record (List.map tree_of_label l) ] + +and tree_of_constructor cd = + let name = Ident.name cd.cd_id in + let arg () = tree_of_constructor_arguments cd.cd_args in + match cd.cd_res with + | None -> (name, arg (), None) + | Some res -> + let nm = !names in + names := []; + let ret = tree_of_typexp false res in + let args = arg () in + names := nm; + (name, args, Some ret) + +and tree_of_label l = + (Ident.name l.ld_id, l.ld_mutable = Mutable, tree_of_typexp false l.ld_type) + +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) + +let constructor_arguments ppf a = + let tys = tree_of_constructor_arguments a in + !Oprint.out_type ppf (Otyp_tuple tys) + +(* Print an extension declaration *) + +let tree_of_extension_constructor id ext es = + reset (); + let ty_name = Path.name ext.ext_type_path in + let ty_params = filter_params ext.ext_type_params in + List.iter add_alias ty_params; + List.iter mark_loops ty_params; + List.iter check_name_of_type (List.map proxy ty_params); + mark_loops_constructor_arguments ext.ext_args; + may mark_loops ext.ext_ret_type; + let type_param = + function + | Otyp_var (_, id) -> id + | _ -> "?" + in + let ty_params = + List.map (fun ty -> type_param (tree_of_typexp false ty)) ty_params + in + let name = Ident.name id in + let args, ret = + match ext.ext_ret_type with + | None -> (tree_of_constructor_arguments ext.ext_args, None) + | Some res -> + let nm = !names in + names := []; + let ret = tree_of_typexp false res in + let args = tree_of_constructor_arguments ext.ext_args in + names := nm; + (args, Some ret) + in + let ext = + { oext_name = name; + oext_type_name = ty_name; + oext_type_params = ty_params; + oext_args = args; + oext_ret_type = ret; + oext_private = ext.ext_private } + in + let es = + match es with + Text_first -> Oext_first + | Text_next -> Oext_next + | Text_exception -> Oext_exception + in + Osig_typext (ext, es) + +let extension_constructor id ppf ext = + !Oprint.out_sig_item ppf (tree_of_extension_constructor id ext Text_first) + +(* Print a value declaration *) + +let tree_of_value_description id decl = + (* Format.eprintf "@[%a@]@." raw_type_expr decl.val_type; *) + let id = Ident.name id in + let ty = tree_of_type_scheme decl.val_type in + let vd = + { oval_name = id; + oval_type = ty; + oval_prims = []; + oval_attributes = [] } + in + let vd = + match decl.val_kind with + | Val_prim p -> Primitive.print p vd + | _ -> vd + in + Osig_value vd + +let value_description id ppf decl = + !Oprint.out_sig_item ppf (tree_of_value_description id decl) + +(* Print a class type *) + +let method_type (_, kind, ty) = + match field_kind_repr kind, repr ty with + Fpresent, {desc=Tpoly(ty, tyl)} -> (ty, tyl) + | _ , ty -> (ty, []) + +let tree_of_metho sch concrete csil (lab, kind, ty) = + if lab <> dummy_method then begin + let kind = field_kind_repr kind in + let priv = kind <> Fpresent in + let virt = not (Concr.mem lab concrete) in + let (ty, tyl) = method_type (lab, kind, ty) in + let tty = tree_of_typexp sch ty in + remove_names tyl; + Ocsg_method (lab, priv, virt, tty) :: csil + end + else csil + +let rec prepare_class_type params = function + | Cty_constr (_p, tyl, cty) -> + let sty = Ctype.self_type cty in + if List.memq (proxy sty) !visited_objects + || not (List.for_all is_Tvar params) + || List.exists (deep_occur sty) tyl + then prepare_class_type params cty + else List.iter mark_loops tyl + | Cty_signature sign -> + let sty = repr sign.csig_self in + (* Self may have a name *) + let px = proxy sty in + if List.memq px !visited_objects then add_alias sty + else visited_objects := px :: !visited_objects; + let (fields, _) = + Ctype.flatten_fields (Ctype.object_fields sign.csig_self) + in + List.iter (fun met -> mark_loops (fst (method_type met))) fields; + Vars.iter (fun _ (_, _, ty) -> mark_loops ty) sign.csig_vars + | Cty_arrow (_, ty, cty) -> + mark_loops ty; + prepare_class_type params cty + +let rec tree_of_class_type sch params = + function + | Cty_constr (p', tyl, cty) -> + let sty = Ctype.self_type cty in + if List.memq (proxy sty) !visited_objects + || not (List.for_all is_Tvar params) + then + tree_of_class_type sch params cty + else + Octy_constr (tree_of_path p', tree_of_typlist true tyl) + | Cty_signature sign -> + let sty = repr sign.csig_self in + let self_ty = + if is_aliased sty then + Some (Otyp_var (false, name_of_type new_name (proxy sty))) + else None + in + let (fields, _) = + Ctype.flatten_fields (Ctype.object_fields sign.csig_self) + in + let csil = [] in + let csil = + List.fold_left + (fun csil (ty1, ty2) -> Ocsg_constraint (ty1, ty2) :: csil) + csil (tree_of_constraints params) + in + let all_vars = + Vars.fold (fun l (m, v, t) all -> (l, m, v, t) :: all) sign.csig_vars [] + in + (* Consequence of PR#3607: order of Map.fold has changed! *) + let all_vars = List.rev all_vars in + let csil = + List.fold_left + (fun csil (l, m, v, t) -> + Ocsg_value (l, m = Mutable, v = Virtual, tree_of_typexp sch t) + :: csil) + csil all_vars + in + let csil = + List.fold_left (tree_of_metho sch sign.csig_concr) csil fields + in + Octy_signature (self_ty, List.rev csil) + | Cty_arrow (l, ty, cty) -> + let lab = + string_of_label l + in + let ty = + if is_optional l then + match (repr ty).desc with + | Tconstr(path, [ty], _) when Path.same path Predef.path_option -> ty + | _ -> newconstr (Path.Pident(Ident.create "")) [] + else ty in + let tr = tree_of_typexp sch ty in + Octy_arrow (lab, tr, tree_of_class_type sch params cty) + +let class_type ppf cty = + reset (); + prepare_class_type [] cty; + !Oprint.out_class_type ppf (tree_of_class_type false [] cty) + +let tree_of_class_param param variance = + (match tree_of_typexp true param with + Otyp_var (_, s) -> s + | _ -> "?"), + if is_Tvar (repr param) then (true, true) else variance + +let class_variance = + List.map Variance.(fun v -> mem May_pos v, mem May_neg v) + +let tree_of_class_declaration id cl rs = + let params = filter_params cl.cty_params in + + reset (); + List.iter add_alias params; + prepare_class_type params cl.cty_type; + let sty = Ctype.self_type cl.cty_type in + List.iter mark_loops params; + + List.iter check_name_of_type (List.map proxy params); + if is_aliased sty then check_name_of_type (proxy sty); + + let vir_flag = cl.cty_new = None in + Osig_class + (vir_flag, Ident.name id, + List.map2 tree_of_class_param params (class_variance cl.cty_variance), + tree_of_class_type true params cl.cty_type, + tree_of_rec rs) + +let class_declaration id ppf cl = + !Oprint.out_sig_item ppf (tree_of_class_declaration id cl Trec_first) + +let tree_of_cltype_declaration id cl rs = + let params = List.map repr cl.clty_params in + + reset (); + List.iter add_alias params; + prepare_class_type params cl.clty_type; + let sty = Ctype.self_type cl.clty_type in + List.iter mark_loops params; + + List.iter check_name_of_type (List.map proxy params); + if is_aliased sty then check_name_of_type (proxy sty); + + let sign = Ctype.signature_of_class_type cl.clty_type in + + let virt = + let (fields, _) = + Ctype.flatten_fields (Ctype.object_fields sign.csig_self) in + List.exists + (fun (lab, _, _) -> + not (lab = dummy_method || Concr.mem lab sign.csig_concr)) + fields + || Vars.fold (fun _ (_,vr,_) b -> vr = Virtual || b) sign.csig_vars false + in + + Osig_class_type + (virt, Ident.name id, + List.map2 tree_of_class_param params (class_variance cl.clty_variance), + tree_of_class_type true params cl.clty_type, + tree_of_rec rs) + +let cltype_declaration id ppf cl = + !Oprint.out_sig_item ppf (tree_of_cltype_declaration id cl Trec_first) + +(* Print a module type *) + +let wrap_env fenv ftree arg = + let env = !printing_env in + set_printing_env (fenv env); + let tree = ftree arg in + set_printing_env env; + tree + +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) + | _ -> + ([], rem) + +let dummy = + { type_params = []; type_arity = 0; type_kind = Type_abstract; + type_private = Public; type_manifest = None; type_variance = []; + type_newtype_level = None; type_loc = Location.none; + type_attributes = []; + type_immediate = false; + type_unboxed = unboxed_false_default_false; + } + +let hide_rec_items = function + | Sig_type(id, _decl, rs) ::rem + when rs = Trec_first && not !Clflags.real_paths -> + let rec get_ids = function + Sig_type (id, _, Trec_next) :: rem -> + id :: get_ids rem + | _ -> [] + in + let ids = id :: get_ids rem in + set_printing_env + (List.fold_right + (fun id -> Env.add_type ~check:false (Ident.rename id) dummy) + ids !printing_env) + | _ -> () + +let rec tree_of_modtype ?(ellipsis=false) = function + | Mty_ident p -> + Omty_ident (tree_of_path p) + | Mty_signature sg -> + Omty_signature (if ellipsis then [Osig_ellipsis] + else tree_of_signature sg) + | Mty_functor(param, ty_arg, ty_res) -> + let res = + match ty_arg with None -> tree_of_modtype ~ellipsis ty_res + | Some mty -> + wrap_env (Env.add_module ~arg:true param mty) + (tree_of_modtype ~ellipsis) ty_res + in + Omty_functor (Ident.name param, + may_map (tree_of_modtype ~ellipsis:false) ty_arg, res) + | Mty_alias(_, p) -> + Omty_alias (tree_of_path p) + +and tree_of_signature sg = + wrap_env (fun env -> env) (tree_of_signature_rec !printing_env false) sg + +and tree_of_signature_rec env' in_type_group = function + [] -> [] + | item :: rem as items -> + let in_type_group = + match in_type_group, item with + true, Sig_type (_, _, Trec_next) -> true + | _, Sig_type (_, _, (Trec_not | Trec_first)) -> + set_printing_env env'; true + | _ -> set_printing_env env'; false + in + let (sg, rem) = filter_rem_sig item rem in + hide_rec_items items; + let trees = trees_of_sigitem item in + let env' = Env.add_signature (item :: sg) env' in + trees @ tree_of_signature_rec env' in_type_group rem + +and trees_of_sigitem = function + | Sig_value(id, decl) -> + [tree_of_value_description id decl] + | Sig_type(id, _, _) when is_row_name (Ident.name id) -> + [] + | Sig_type(id, decl, rs) -> + [tree_of_type_declaration id decl rs] + | Sig_typext(id, ext, es) -> + [tree_of_extension_constructor id ext es] + | Sig_module(id, md, rs) -> + let ellipsis = + List.exists (function ({txt="..."}, Parsetree.PStr []) -> true + | _ -> false) + md.md_attributes in + [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_type(id, decl, rs) -> + [tree_of_cltype_declaration id decl rs] + +and tree_of_modtype_declaration id decl = + let mty = + match decl.mtd_type with + | None -> Omty_abstract + | Some mty -> tree_of_modtype mty + in + Osig_modtype (Ident.name id, mty) + +and tree_of_module id ?ellipsis mty rs = + Osig_module (Ident.name id, tree_of_modtype ?ellipsis mty, tree_of_rec rs) + +let modtype ppf mty = !Oprint.out_module_type ppf (tree_of_modtype mty) +let modtype_declaration id ppf decl = + !Oprint.out_sig_item ppf (tree_of_modtype_declaration id decl) + +(* For the toplevel: merge with tree_of_signature? *) + +(* Refresh weak variable map in the toplevel *) +let refresh_weak () = + let refresh t name (m,s) = + if is_non_gen true (repr t) then + begin + TypeMap.add t name m, + StringSet.add name s + end + else m, s in + let m, s = + TypeMap.fold refresh !weak_var_map (TypeMap.empty ,StringSet.empty) in + named_weak_vars := s; + weak_var_map := m + +let print_items showval env x = + refresh_weak(); + let rec print showval env = function + | [] -> [] + | item :: rem as items -> + let (_sg, rem) = filter_rem_sig item rem in + hide_rec_items items; + let trees = trees_of_sigitem item in + List.map (fun d -> (d, showval env item)) trees @ + print showval env rem in + print showval env x + +(* Print a signature body (used by -i when compiling a .ml) *) + +let print_signature ppf tree = + fprintf ppf "@[%a@]" !Oprint.out_signature tree + +let signature ppf sg = + fprintf ppf "%a" print_signature (tree_of_signature sg) + +(* Print an unification error *) + +let same_path t t' = + let t = repr t and t' = repr t' in + t == t' || + match t.desc, t'.desc with + Tconstr(p,tl,_), Tconstr(p',tl',_) -> + let (p1, s1) = best_type_path p and (p2, s2) = best_type_path p' in + begin match s1, s2 with + Nth n1, Nth n2 when n1 = n2 -> true + | (Id | Map _), (Id | Map _) when Path.same p1 p2 -> + let tl = apply_subst s1 tl and tl' = apply_subst s2 tl' in + List.length tl = List.length tl' && + List.for_all2 same_type tl tl' + | _ -> false + end + | _ -> + false + +let type_expansion t ppf t' = + if same_path t t' + then begin add_delayed (proxy t); type_expr ppf t end + else + let t' = if proxy t == proxy t' then unalias t' else t' in + fprintf ppf "@[<2>%a@ =@ %a@]" type_expr t type_expr t' + +let type_path_expansion tp ppf tp' = + if Path.same tp tp' then path ppf tp else + fprintf ppf "@[<2>%a@ =@ %a@]" path tp path tp' + +let rec trace fst txt ppf = function + | (t1, t1') :: (t2, t2') :: rem -> + if not fst then fprintf ppf "@,"; + fprintf ppf "@[Type@;<1 2>%a@ %s@;<1 2>%a@] %a" + (type_expansion t1) t1' txt (type_expansion t2) t2' + (trace false txt) rem + | _ -> () + +let rec filter_trace keep_last = function + | (_, t1') :: (_, t2') :: [] when is_Tvar t1' || is_Tvar t2' -> + [] + | (t1, t1') :: (t2, t2') :: rem -> + let rem' = filter_trace keep_last rem in + if is_constr_row ~allow_ident:true t1' + || is_constr_row ~allow_ident:true t2' + || same_path t1 t1' && same_path t2 t2' && not (keep_last && rem' = []) + then rem' + else (t1, t1') :: (t2, t2') :: rem' + | _ -> [] + +let rec type_path_list ppf = function + | [tp, tp'] -> type_path_expansion tp ppf tp' + | (tp, tp') :: rem -> + fprintf ppf "%a@;<2 0>%a" + (type_path_expansion tp) tp' + type_path_list rem + | [] -> () + +(* Hide variant name and var, to force printing the expanded type *) +let hide_variant_name t = + match repr t with + | {desc = Tvariant row} as t when (row_repr row).row_name <> None -> + newty2 t.level + (Tvariant {(row_repr row) with row_name = None; + row_more = newvar2 (row_more row).level}) + | _ -> t + +let prepare_expansion (t, t') = + let t' = hide_variant_name t' in + mark_loops t; + if not (same_path t t') then mark_loops t'; + (t, t') + +let may_prepare_expansion compact (t, t') = + match (repr t').desc with + Tvariant _ | Tobject _ when compact -> + mark_loops t; (t, t) + | _ -> prepare_expansion (t, t') + +let print_tags ppf fields = + match fields with [] -> () + | (t, _) :: fields -> + fprintf ppf "`%s" t; + List.iter (fun (t, _) -> fprintf ppf ",@ `%s" t) fields + +let has_explanation t3 t4 = + match t3.desc, t4.desc with + Tfield _, (Tnil|Tconstr _) | (Tnil|Tconstr _), Tfield _ + | Tnil, Tconstr _ | Tconstr _, Tnil + | _, Tvar _ | Tvar _, _ + | Tvariant _, Tvariant _ -> true + | Tfield (l,_,_,{desc=Tnil}), Tfield (l',_,_,{desc=Tnil}) -> l = l' + | _ -> false + +let rec mismatch = function + (_, t) :: (_, t') :: rem -> + begin match mismatch rem with + Some _ as m -> m + | None -> + if has_explanation t t' then Some(t,t') else None + end + | [] -> None + | _ -> assert false + +let explanation unif t3 t4 ppf = + match t3.desc, t4.desc with + | Ttuple [], Tvar _ | Tvar _, Ttuple [] -> + fprintf ppf "@,Self type cannot escape its class" + | Tconstr (p, _, _), Tvar _ + when unif && t4.level < Path.binding_time p -> + fprintf ppf + "@,@[The type constructor@;<1 2>%a@ would escape its scope@]" + path p + | Tvar _, Tconstr (p, _, _) + when unif && t3.level < Path.binding_time p -> + fprintf ppf + "@,@[The type constructor@;<1 2>%a@ would escape its scope@]" + path p + | Tvar _, Tunivar _ | Tunivar _, Tvar _ -> + fprintf ppf "@,The universal variable %a would escape its scope" + type_expr (if is_Tunivar t3 then t3 else t4) + | Tvar _, _ | _, Tvar _ -> + let t, t' = if is_Tvar t3 then (t3, t4) else (t4, t3) in + if occur_in Env.empty t t' then + fprintf ppf "@,@[The type variable %a occurs inside@ %a@]" + type_expr t type_expr t' + else + fprintf ppf "@,@[This instance of %a is ambiguous:@ %s@]" + type_expr t' + "it would escape the scope of its equation" + | Tfield (lab, _, _, _), _ when lab = dummy_method -> + fprintf ppf + "@,Self type cannot be unified with a closed object type" + | _, Tfield (lab, _, _, _) when lab = dummy_method -> + fprintf ppf + "@,Self type cannot be unified with a closed object type" + | Tfield (l,_,_,{desc=Tnil}), Tfield (l',_,_,{desc=Tnil}) when l = l' -> + fprintf ppf "@,Types for method %s are incompatible" l + | (Tnil|Tconstr _), Tfield (l, _, _, _) -> + fprintf ppf + "@,@[The first object type has no field %s@]" l + | Tfield (l, _, _, _), (Tnil|Tconstr _) -> + fprintf ppf + "@,@[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@]" + (if t4.desc = Tnil then "first" else "second") + | Tvariant row1, Tvariant row2 -> + let row1 = row_repr row1 and row2 = row_repr row2 in + begin match + row1.row_fields, row1.row_closed, row2.row_fields, row2.row_closed with + | [], true, [], true -> + fprintf ppf "@,These two variant types have no intersection" + | [], true, (_::_ as fields), _ -> + fprintf ppf + "@,@[The first variant type does not allow tag(s)@ @[%a@]@]" + print_tags fields + | (_::_ as fields), _, [], true -> + fprintf ppf + "@,@[The second variant type does not allow tag(s)@ @[%a@]@]" + print_tags fields + | [l1,_], true, [l2,_], true when l1 = l2 -> + fprintf ppf "@,Types for tag `%s are incompatible" l1 + | _ -> () + end + | _ -> () + + +let warn_on_missing_def env ppf t = + match t.desc with + | Tconstr (p,_,_) -> + begin + try + ignore(Env.find_type p env : Types.type_declaration) + with Not_found -> + fprintf ppf + "@,@[%a is abstract because no corresponding cmi file was found \ + in path.@]" path p + end + | _ -> () + +let explanation unif mis ppf = + match mis with + None -> () + | Some (t3, t4) -> explanation unif t3 t4 ppf + +let ident_same_name id1 id2 = + if Ident.equal id1 id2 && not (Ident.same id1 id2) then begin + add_unique id1; add_unique id2 + end + +let rec path_same_name p1 p2 = + match p1, p2 with + Pident id1, Pident id2 -> ident_same_name id1 id2 + | Pdot (p1, s1, _), Pdot (p2, s2, _) when s1 = s2 -> path_same_name p1 p2 + | Papply (p1, p1'), Papply (p2, p2') -> + path_same_name p1 p2; path_same_name p1' p2' + | _ -> () + +let type_same_name t1 t2 = + match (repr t1).desc, (repr t2).desc with + Tconstr (p1, _, _), Tconstr (p2, _, _) -> + path_same_name (fst (best_type_path p1)) (fst (best_type_path p2)) + | _ -> () + +let rec trace_same_names = function + (t1, t1') :: (t2, t2') :: rem -> + type_same_name t1 t2; type_same_name t1' t2'; trace_same_names rem + | _ -> () + +let unification_error env unif tr txt1 ppf txt2 = + 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@;<1 2>%a@ \ + %t@;<1 2>%a\ + @]%a%t\ + @]" + txt1 (type_expansion t1) t1' + txt2 (type_expansion t2) t2' + (trace false "is not compatible with type") tr + (explanation unif mis); + if env <> Env.empty + then begin + warn_on_missing_def env ppf t1; + warn_on_missing_def env ppf t2 + end; + with exn -> + raise exn + +let report_unification_error ppf env ?(unif=true) + tr txt1 txt2 = + wrap_printing_env env (fun () -> unification_error env unif tr txt1 ppf txt2) +;; + +let super_type_expansion ~tag t ppf t' = + if same_path t t' then begin + Format.pp_open_tag ppf tag; + type_expr ppf t; + Format.pp_close_tag ppf (); + end else begin + let t' = if proxy t == proxy t' then unalias t' else t' in + fprintf ppf "@[<2>"; + Format.pp_open_tag ppf tag; + fprintf ppf "%a" type_expr t; + Format.pp_close_tag ppf (); + fprintf ppf "@ @{(defined as@}@ "; + Format.pp_open_tag ppf tag; + fprintf ppf "%a" type_expr t'; + Format.pp_close_tag 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 = + 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); + | _ -> () + with exn -> + raise exn + +let report_subtyping_error ppf env tr1 txt1 tr2 = + wrap_printing_env env (fun () -> + reset (); + let tr1 = List.map prepare_expansion tr1 + and tr2 = List.map prepare_expansion tr2 in + fprintf ppf "@[%a" (trace true (tr2 = []) txt1) tr1; + if tr2 = [] then fprintf ppf "@]" else + let mis = mismatch tr2 in + fprintf ppf "%a%t@]" + (trace false (mis = None) "is not compatible with type") tr2 + (explanation true mis)) + +let report_ambiguous_type_error ppf env (tp0, tp0') tpl txt1 txt2 txt3 = + wrap_printing_env env (fun () -> + reset (); + List.iter + (fun (tp, tp') -> path_same_name tp0 tp; path_same_name tp0' tp') + tpl; + match tpl with + [] -> assert false + | [tp, tp'] -> + fprintf ppf + "@[%t@;<1 2>%a@ \ + %t@;<1 2>%a\ + @]" + txt1 (type_path_expansion tp) tp' + txt3 (type_path_expansion tp0) tp0' + | _ -> + fprintf ppf + "@[%t@;<1 2>@[%a@]\ + @ %t@;<1 2>%a\ + @]" + txt2 type_path_list tpl + txt3 (type_path_expansion tp0) tp0') diff --git a/analysis/src/vendor/compiler-libs-406/printtyp.mli b/analysis/src/vendor/compiler-libs-406/printtyp.mli new file mode 100644 index 000000000..eef242ef2 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/printtyp.mli @@ -0,0 +1,96 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Printing functions *) + +open Format +open Types +open Outcometree + +val longident: formatter -> Longident.t -> unit +val ident: formatter -> Ident.t -> unit +val tree_of_path: Path.t -> out_ident +val path: formatter -> Path.t -> unit +val string_of_path: Path.t -> string +val raw_type_expr: formatter -> type_expr -> unit +val string_of_label: Asttypes.arg_label -> string + +val wrap_printing_env: Env.t -> (unit -> 'a) -> 'a + (* Call the function using the environment for type path shortening *) + (* This affects all the printing functions below *) + +val reset: unit -> unit +val mark_loops: type_expr -> unit +val reset_and_mark_loops: type_expr -> unit +val reset_and_mark_loops_list: type_expr list -> unit +val type_expr: formatter -> type_expr -> unit +val constructor_arguments: formatter -> constructor_arguments -> unit +val tree_of_type_scheme: type_expr -> out_type +val type_sch : formatter -> type_expr -> unit +val type_scheme: formatter -> type_expr -> unit +(* Maxence *) +val reset_names: unit -> unit +val type_scheme_max: ?b_reset_names: bool -> + formatter -> type_expr -> unit +(* End Maxence *) +val tree_of_value_description: Ident.t -> value_description -> out_sig_item +val value_description: Ident.t -> formatter -> value_description -> unit +val tree_of_type_declaration: + Ident.t -> type_declaration -> rec_status -> out_sig_item +val type_declaration: Ident.t -> formatter -> type_declaration -> unit +val tree_of_extension_constructor: + Ident.t -> extension_constructor -> ext_status -> out_sig_item +val extension_constructor: + Ident.t -> formatter -> extension_constructor -> unit +val tree_of_module: + Ident.t -> ?ellipsis:bool -> module_type -> rec_status -> out_sig_item +val modtype: formatter -> module_type -> unit +val signature: formatter -> signature -> unit +val tree_of_modtype_declaration: + Ident.t -> modtype_declaration -> out_sig_item +val tree_of_signature: Types.signature -> out_sig_item list +val tree_of_typexp: bool -> type_expr -> out_type +val modtype_declaration: Ident.t -> formatter -> modtype_declaration -> unit +val class_type: formatter -> class_type -> unit +val tree_of_class_declaration: + Ident.t -> class_declaration -> rec_status -> out_sig_item +val class_declaration: Ident.t -> formatter -> class_declaration -> unit +val tree_of_cltype_declaration: + Ident.t -> class_type_declaration -> rec_status -> out_sig_item +val cltype_declaration: Ident.t -> formatter -> class_type_declaration -> unit +val type_expansion: type_expr -> Format.formatter -> type_expr -> unit +val prepare_expansion: type_expr * type_expr -> type_expr * type_expr +val trace: + bool -> bool-> string -> formatter -> (type_expr * type_expr) list -> unit +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 +val report_ambiguous_type_error: + formatter -> Env.t -> (Path.t * Path.t) -> (Path.t * Path.t) list -> + (formatter -> unit) -> (formatter -> unit) -> (formatter -> unit) -> unit + +(* for toploop *) +val print_items: (Env.t -> signature_item -> 'a option) -> + Env.t -> signature_item list -> (out_sig_item * 'a option) list diff --git a/analysis/src/vendor/compiler-libs-406/string_map.ml b/analysis/src/vendor/compiler-libs-406/string_map.ml new file mode 100644 index 000000000..7a6dfd308 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/string_map.ml @@ -0,0 +1,157 @@ + +(* 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/src/vendor/compiler-libs-406/string_map.mli b/analysis/src/vendor/compiler-libs-406/string_map.mli new file mode 100644 index 000000000..58f7236c5 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/string_map.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 Map_gen.S with type key = string diff --git a/analysis/src/vendor/compiler-libs-406/subst.ml b/analysis/src/vendor/compiler-libs-406/subst.ml new file mode 100644 index 000000000..fb5f90194 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/subst.ml @@ -0,0 +1,491 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Substitutions *) + +open Misc +open Path +open Types +open Btype + +type type_replacement = + | Path of Path.t + | Type_function of { params : type_expr list; body : type_expr } + +module PathMap = Map.Make(Path) + +type t = + { types: type_replacement PathMap.t; + modules: Path.t PathMap.t; + modtypes: (Ident.t, module_type) Tbl.t; + for_saving: bool; + } + +let identity = + { types = PathMap.empty; + modules = PathMap.empty; + modtypes = Tbl.empty; + for_saving = false; + } + +let add_type_path id p s = { s with types = PathMap.add id (Path p) s.types } +let add_type id p s = add_type_path (Pident id) p s + +let add_type_function id ~params ~body s = + { s with types = PathMap.add id (Type_function { params; body }) s.types } + +let add_module_path id p s = { s with modules = PathMap.add id p s.modules } +let add_module id p s = add_module_path (Pident id) p s + +let add_modtype id ty s = { s with modtypes = Tbl.add id ty s.modtypes } + +let for_saving s = { s with for_saving = true } + +let loc s x = + if s.for_saving && not !Clflags.keep_locs then Location.none else x + +let remove_loc = + let open Ast_mapper in + {default_mapper with location = (fun _this _loc -> Location.none)} + +let is_not_doc = function + | ({Location.txt = "ocaml.doc"}, _) -> false + | ({Location.txt = "ocaml.text"}, _) -> false + | ({Location.txt = "doc"}, _) -> false + | ({Location.txt = "text"}, _) -> false + | _ -> true + +let attrs s x = + let x = + if s.for_saving && not !Clflags.keep_docs then + List.filter is_not_doc x + else x + in + if s.for_saving && not !Clflags.keep_locs + then remove_loc.Ast_mapper.attributes remove_loc x + else x + +let rec module_path s path = + try PathMap.find path s.modules + with Not_found -> + match path with + | Pident _ -> path + | Pdot(p, n, pos) -> + Pdot(module_path s p, n, pos) + | Papply(p1, p2) -> + Papply(module_path s p1, module_path s p2) + +let modtype_path s = function + Pident id as p -> + begin try + match Tbl.find id s.modtypes with + | Mty_ident p -> p + | _ -> fatal_error "Subst.modtype_path" + with Not_found -> p end + | Pdot(p, n, pos) -> + Pdot(module_path s p, n, pos) + | Papply _ -> + fatal_error "Subst.modtype_path" + +let type_path s path = + match PathMap.find path s.types with + | Path p -> p + | Type_function _ -> assert false + | exception Not_found -> + match path with + | Pident _ -> path + | Pdot(p, n, pos) -> + Pdot(module_path s p, n, pos) + | Papply _ -> + fatal_error "Subst.type_path" + +let type_path s p = + match Path.constructor_typath p with + | Regular p -> type_path s p + | Cstr (ty_path, cstr) -> Pdot(type_path s ty_path, cstr, nopos) + | LocalExt _ -> type_path s p + | Ext (p, cstr) -> Pdot(module_path s p, cstr, nopos) + +let to_subst_by_type_function s p = + match PathMap.find p s.types with + | Path _ -> false + | Type_function _ -> true + | exception Not_found -> false + +(* Special type ids for saved signatures *) + +let new_id = ref (-1) +let reset_for_saving () = new_id := -1 + +let newpersty desc = + decr new_id; + { desc = desc; level = generic_level; id = !new_id } + +(* ensure that all occurrences of 'Tvar None' are physically shared *) +let tvar_none = Tvar None +let tunivar_none = Tunivar None +let norm = function + | Tvar None -> tvar_none + | Tunivar None -> tunivar_none + | d -> d + +let ctype_apply_env_empty = ref (fun _ -> assert false) + +(* Similar to [Ctype.nondep_type_rec]. *) +let rec typexp s ty = + let ty = repr ty in + match ty.desc with + Tvar _ | Tunivar _ as desc -> + if s.for_saving || ty.id < 0 then + let ty' = + if s.for_saving then newpersty (norm desc) + else newty2 ty.level desc + in + save_desc ty desc; ty.desc <- Tsubst ty'; ty' + else ty + | Tsubst ty -> + ty + | Tfield (m, k, _t1, _t2) when not s.for_saving && m = dummy_method + && field_kind_repr k <> Fabsent && (repr ty).level < generic_level -> + (* do not copy the type of self when it is not generalized *) + ty +(* cannot do it, since it would omit substitution + | Tvariant row when not (static_row row) -> + ty +*) + | _ -> + let desc = ty.desc in + save_desc ty desc; + let tm = row_of_type ty in + let has_fixed_row = + not (is_Tconstr ty) && is_constr_row ~allow_ident:false tm in + (* Make a stub *) + let ty' = if s.for_saving then newpersty (Tvar None) else newgenvar () in + ty.desc <- Tsubst ty'; + ty'.desc <- + begin if has_fixed_row then + match tm.desc with (* PR#7348 *) + Tconstr (Pdot(m,i,pos), tl, _abbrev) -> + let i' = String.sub i 0 (String.length i - 4) in + Tconstr(type_path s (Pdot(m,i',pos)), tl, ref Mnil) + | _ -> assert false + else match desc with + | Tconstr (p, args, _abbrev) -> + let args = List.map (typexp s) args in + begin match PathMap.find p s.types with + | exception Not_found -> Tconstr(type_path s p, args, ref Mnil) + | Path _ -> Tconstr(type_path s p, args, ref Mnil) + | Type_function { params; body } -> + (!ctype_apply_env_empty params body args).desc + end + | Tpackage(p, n, tl) -> + Tpackage(modtype_path s p, n, List.map (typexp s) tl) + | Tobject (t1, name) -> + Tobject (typexp s t1, + ref (match !name with + None -> None + | Some (p, tl) -> + if to_subst_by_type_function s p + then None + else Some (type_path s p, List.map (typexp s) tl))) + | Tvariant row -> + let row = row_repr row in + let more = repr row.row_more in + (* We must substitute in a subtle way *) + (* Tsubst takes a tuple containing the row var and the variant *) + begin match more.desc with + Tsubst {desc = Ttuple [_;ty2]} -> + (* This variant type has been already copied *) + ty.desc <- Tsubst ty2; (* avoid Tlink in the new type *) + Tlink ty2 + | _ -> + let dup = + s.for_saving || more.level = generic_level || static_row row || + match more.desc with Tconstr _ -> true | _ -> false in + (* Various cases for the row variable *) + let more' = + match more.desc with + Tsubst ty -> ty + | Tconstr _ | Tnil -> typexp s more + | Tunivar _ | Tvar _ -> + save_desc more more.desc; + if s.for_saving then newpersty (norm more.desc) else + if dup && is_Tvar more then newgenty more.desc else more + | _ -> assert false + in + (* Register new type first for recursion *) + more.desc <- Tsubst(newgenty(Ttuple[more';ty'])); + (* Return a new copy *) + let row = + copy_row (typexp s) true row (not dup) more' in + match row.row_name with + | Some (p, tl) -> + Tvariant {row with row_name = + if to_subst_by_type_function s p + then None + else Some (type_path s p, tl)} + | None -> + Tvariant row + end + | Tfield(_label, kind, _t1, t2) when field_kind_repr kind = Fabsent -> + Tlink (typexp s t2) + | _ -> copy_type_desc (typexp s) desc + end; + ty' + +(* + Always make a copy of the type. If this is not done, type levels + might not be correct. +*) +let type_expr s ty = + let ty' = typexp s ty in + cleanup_types (); + ty' + +let label_declaration s l = + { + ld_id = l.ld_id; + ld_mutable = l.ld_mutable; + ld_type = typexp s l.ld_type; + ld_loc = loc s l.ld_loc; + ld_attributes = attrs s l.ld_attributes; + } + +let constructor_arguments s = function + | Cstr_tuple l -> + Cstr_tuple (List.map (typexp s) l) + | Cstr_record l -> + Cstr_record (List.map (label_declaration s) l) + +let constructor_declaration s c = + { + cd_id = c.cd_id; + cd_args = constructor_arguments s c.cd_args; + cd_res = may_map (typexp s) c.cd_res; + cd_loc = loc s c.cd_loc; + cd_attributes = attrs s c.cd_attributes; + } + +let type_declaration s decl = + let decl = + { type_params = List.map (typexp s) decl.type_params; + type_arity = decl.type_arity; + type_kind = + begin match decl.type_kind with + Type_abstract -> Type_abstract + | Type_variant cstrs -> + Type_variant (List.map (constructor_declaration s) cstrs) + | Type_record(lbls, rep) -> + Type_record (List.map (label_declaration s) lbls, rep) + | Type_open -> Type_open + end; + type_manifest = + begin + match decl.type_manifest with + None -> None + | Some ty -> Some(typexp s ty) + end; + type_private = decl.type_private; + type_variance = decl.type_variance; + type_newtype_level = None; + type_loc = loc s decl.type_loc; + type_attributes = attrs s decl.type_attributes; + type_immediate = decl.type_immediate; + type_unboxed = decl.type_unboxed; + } + in + cleanup_types (); + decl + +let class_signature s sign = + { csig_self = typexp s sign.csig_self; + csig_vars = + Vars.map (function (m, v, t) -> (m, v, typexp s t)) sign.csig_vars; + csig_concr = sign.csig_concr; + csig_inher = + List.map (fun (p, tl) -> (type_path s p, List.map (typexp s) tl)) + sign.csig_inher; + } + +let rec class_type s = + function + Cty_constr (p, tyl, cty) -> + Cty_constr (type_path s p, List.map (typexp s) tyl, class_type s cty) + | Cty_signature sign -> + Cty_signature (class_signature s sign) + | 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 = + { clty_params = List.map (typexp s) decl.clty_params; + clty_variance = decl.clty_variance; + clty_type = class_type s decl.clty_type; + clty_path = type_path s decl.clty_path; + clty_loc = loc s decl.clty_loc; + clty_attributes = attrs s decl.clty_attributes; + } + in + (* Do clean up even if saving: type_declaration may be recursive *) + cleanup_types (); + decl + +let class_type s cty = + let cty = class_type s cty in + cleanup_types (); + cty + +let value_description s descr = + { val_type = type_expr s descr.val_type; + val_kind = descr.val_kind; + val_loc = loc s descr.val_loc; + val_attributes = attrs s descr.val_attributes; + } + +let extension_constructor s ext = + let ext = + { ext_type_path = type_path s ext.ext_type_path; + ext_type_params = List.map (typexp s) ext.ext_type_params; + ext_args = constructor_arguments s ext.ext_args; + ext_ret_type = may_map (typexp s) ext.ext_ret_type; + ext_private = ext.ext_private; + ext_attributes = attrs s ext.ext_attributes; + ext_loc = if s.for_saving then Location.none else ext.ext_loc; } + in + cleanup_types (); + ext + +let rec rename_bound_idents s idents = function + [] -> (List.rev idents, s) + | Sig_type(id, _, _) :: sg -> + let id' = Ident.rename id in + rename_bound_idents (add_type id (Pident id') s) (id' :: idents) sg + | Sig_module(id, _, _) :: sg -> + let id' = Ident.rename id in + rename_bound_idents (add_module id (Pident id') s) (id' :: idents) sg + | Sig_modtype(id, _) :: sg -> + 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 -> + (* 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 + +let rec modtype s = function + Mty_ident p as mty -> + begin match p with + Pident id -> + begin try Tbl.find id s.modtypes with Not_found -> mty end + | Pdot(p, n, pos) -> + Mty_ident(Pdot(module_path s p, n, pos)) + | Papply _ -> + fatal_error "Subst.modtype" + end + | Mty_signature sg -> + Mty_signature(signature s sg) + | Mty_functor(id, arg, res) -> + let id' = Ident.rename id in + Mty_functor(id', may_map (modtype s) arg, + modtype (add_module id (Pident id') s) res) + | Mty_alias(pres, p) -> + Mty_alias(pres, module_path s p) + +and signature s sg = + (* Components of signature may be mutually recursive (e.g. type declarations + or class and type declarations), so first build global renaming + substitution... *) + let (new_idents, s') = rename_bound_idents s [] sg in + (* ... then apply it to each signature component in turn *) + List.map2 (signature_component s') sg new_idents + +and signature_component s comp newid = + match comp with + Sig_value(_id, d) -> + Sig_value(newid, value_description s d) + | Sig_type(_id, d, rs) -> + Sig_type(newid, type_declaration s d, rs) + | Sig_typext(_id, ext, es) -> + Sig_typext(newid, extension_constructor s ext, es) + | Sig_module(_id, d, rs) -> + 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_type(_id, d, rs) -> + Sig_class_type(newid, cltype_declaration s d, rs) + +and module_declaration s decl = + { + md_type = modtype s decl.md_type; + md_attributes = attrs s decl.md_attributes; + md_loc = loc s decl.md_loc; + } + +and modtype_declaration s decl = + { + mtd_type = may_map (modtype s) decl.mtd_type; + mtd_attributes = attrs s decl.mtd_attributes; + mtd_loc = loc s decl.mtd_loc; + } + +(* For every binding k |-> d of m1, add k |-> f d to m2 + and return resulting merged map. *) + +let merge_tbls f m1 m2 = + Tbl.fold (fun k d accu -> Tbl.add k (f d) accu) m1 m2 + +let merge_path_maps f m1 m2 = + PathMap.fold (fun k d accu -> PathMap.add k (f d) accu) m1 m2 + +let type_replacement s = function + | Path p -> Path (type_path s p) + | Type_function { params; body } -> + let params = List.map (typexp s) params in + let body = typexp s body in + Type_function { params; body } + +(* Composition of substitutions: + apply (compose s1 s2) x = apply s2 (apply s1 x) *) + +let compose s1 s2 = + { types = merge_path_maps (type_replacement s2) s1.types s2.types; + modules = merge_path_maps (module_path s2) s1.modules s2.modules; + modtypes = merge_tbls (modtype s2) s1.modtypes s2.modtypes; + for_saving = s1.for_saving || s2.for_saving; + } diff --git a/analysis/src/vendor/compiler-libs-406/subst.mli b/analysis/src/vendor/compiler-libs-406/subst.mli new file mode 100644 index 000000000..f81cb4da5 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/subst.mli @@ -0,0 +1,70 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Substitutions *) + +open Types + +type t + +(* + Substitutions are used to translate a type from one context to + another. This requires substituting paths for identifiers, and + possibly also lowering the level of non-generic variables so that + they are inferior to the maximum level of the new context. + + Substitutions can also be used to create a "clean" copy of a type. + Indeed, non-variable node of a type are duplicated, with their + levels set to generic level. That way, the resulting type is + well-formed (decreasing levels), even if the original one was not. +*) + +val identity: t + +val add_type: Ident.t -> Path.t -> t -> t +val add_type_path: Path.t -> Path.t -> t -> t +val add_type_function: + Path.t -> params:type_expr list -> body:type_expr -> t -> t +val add_module: Ident.t -> Path.t -> t -> t +val add_module_path: Path.t -> Path.t -> t -> t +val add_modtype: Ident.t -> module_type -> t -> t +val for_saving: t -> t +val reset_for_saving: unit -> unit + +val module_path: t -> Path.t -> Path.t +val type_path: t -> Path.t -> Path.t + +val type_expr: t -> type_expr -> type_expr +val class_type: t -> class_type -> class_type +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 +val modtype_declaration: t -> modtype_declaration -> modtype_declaration +val module_declaration: t -> module_declaration -> module_declaration +val typexp : t -> Types.type_expr -> Types.type_expr +val class_signature: t -> class_signature -> class_signature + +(* Composition of substitutions: + apply (compose s1 s2) x = apply s2 (apply s1 x) *) +val compose: t -> t -> t + +(* A forward reference to be filled in ctype.ml. *) +val ctype_apply_env_empty: + (type_expr list -> type_expr -> type_expr list -> type_expr) ref diff --git a/analysis/src/vendor/compiler-libs-406/syntaxerr.ml b/analysis/src/vendor/compiler-libs-406/syntaxerr.ml new file mode 100644 index 000000000..0bb55ab67 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/syntaxerr.ml @@ -0,0 +1,87 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, 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. *) +(* *) +(**************************************************************************) + +(* Auxiliary type for reporting syntax errors *) + +type error = + Unclosed of Location.t * string * Location.t * string + | Expecting of Location.t * string + | Not_expecting of Location.t * string + | Applicative_path of Location.t + | Variable_in_scope of Location.t * string + | Other of Location.t + | Ill_formed_ast of Location.t * string + | Invalid_package_type of Location.t * string + +exception Error of error +exception Escape_error + +let prepare_error = function + | Unclosed(opening_loc, opening, closing_loc, closing) -> + Location.errorf ~loc:closing_loc + ~sub:[ + Location.errorf ~loc:opening_loc + "This '%s' might be unmatched" opening + ] + ~if_highlight: + (Printf.sprintf "Syntax error: '%s' expected, \ + the highlighted '%s' might be unmatched" + closing opening) + "Syntax error: '%s' expected" closing + + | Expecting (loc, nonterm) -> + Location.errorf ~loc "Syntax error: %s expected." nonterm + | Not_expecting (loc, nonterm) -> + Location.errorf ~loc "Syntax error: %s not expected." nonterm + | Applicative_path loc -> + Location.errorf ~loc + "Syntax error: applicative paths of the form F(X).t \ + are not supported when the option -no-app-func is set." + | Variable_in_scope (loc, var) -> + Location.errorf ~loc + "In this scoped type, variable '%s \ + is reserved for the local type %s." + var var + | Other loc -> + Location.errorf ~loc "Syntax error" + | Ill_formed_ast (loc, s) -> + Location.errorf ~loc "broken invariant in parsetree: %s" s + | Invalid_package_type (loc, s) -> + Location.errorf ~loc "invalid package type: %s" s + +let () = + Location.register_error_of_exn + (function + | Error err -> Some (prepare_error err) + | _ -> None + ) + + +let report_error ppf err = + Location.report_error ppf (prepare_error err) + +let location_of_error = function + | Unclosed(l,_,_,_) + | Applicative_path l + | Variable_in_scope(l,_) + | Other l + | Not_expecting (l, _) + | Ill_formed_ast (l, _) + | Invalid_package_type (l, _) + | Expecting (l, _) -> l + + +let ill_formed_ast loc s = + raise (Error (Ill_formed_ast (loc, s))) diff --git a/analysis/src/vendor/compiler-libs-406/syntaxerr.mli b/analysis/src/vendor/compiler-libs-406/syntaxerr.mli new file mode 100644 index 000000000..319eb5794 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/syntaxerr.mli @@ -0,0 +1,37 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, 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. *) +(* *) +(**************************************************************************) + +(** Auxiliary type for reporting syntax errors *) + +open Format + +type error = + Unclosed of Location.t * string * Location.t * string + | Expecting of Location.t * string + | Not_expecting of Location.t * string + | Applicative_path of Location.t + | Variable_in_scope of Location.t * string + | Other of Location.t + | Ill_formed_ast of Location.t * string + | Invalid_package_type of Location.t * string + +exception Error of error +exception Escape_error + +val report_error: formatter -> error -> unit + (** @deprecated Use {!Location.error_of_exn}, {!Location.report_error}. *) + +val location_of_error: error -> Location.t +val ill_formed_ast: Location.t -> string -> 'a diff --git a/analysis/src/vendor/compiler-libs-406/tast_mapper.ml b/analysis/src/vendor/compiler-libs-406/tast_mapper.ml new file mode 100644 index 000000000..512132efe --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/tast_mapper.ml @@ -0,0 +1,611 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Alain Frisch, LexiFi *) +(* *) +(* 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 Typedtree + +(* TODO: add 'methods' for location, attribute, extension, + open_description, include_declaration, include_description *) + +type mapper = + { + case: mapper -> case -> case; + cases: mapper -> case list -> case list; + class_description: mapper -> class_description -> class_description; + + class_signature: mapper -> class_signature -> class_signature; + class_type: mapper -> class_type -> class_type; + class_type_declaration: mapper -> class_type_declaration -> + class_type_declaration; + class_type_field: mapper -> class_type_field -> class_type_field; + env: mapper -> Env.t -> Env.t; + expr: mapper -> expression -> expression; + extension_constructor: mapper -> extension_constructor -> + extension_constructor; + module_binding: mapper -> module_binding -> module_binding; + module_coercion: mapper -> module_coercion -> module_coercion; + module_declaration: mapper -> module_declaration -> module_declaration; + module_expr: mapper -> module_expr -> module_expr; + module_type: mapper -> module_type -> module_type; + module_type_declaration: + mapper -> module_type_declaration -> module_type_declaration; + package_type: mapper -> package_type -> package_type; + pat: mapper -> pattern -> pattern; + row_field: mapper -> row_field -> row_field; + object_field: mapper -> object_field -> object_field; + signature: mapper -> signature -> signature; + signature_item: mapper -> signature_item -> signature_item; + structure: mapper -> structure -> structure; + structure_item: mapper -> structure_item -> structure_item; + typ: mapper -> core_type -> core_type; + type_declaration: mapper -> type_declaration -> type_declaration; + type_declarations: mapper -> (rec_flag * type_declaration list) -> + (rec_flag * type_declaration list); + type_extension: mapper -> type_extension -> type_extension; + type_kind: mapper -> type_kind -> type_kind; + value_binding: mapper -> value_binding -> value_binding; + value_bindings: mapper -> (rec_flag * value_binding list) -> + (rec_flag * value_binding list); + value_description: mapper -> value_description -> value_description; + with_constraint: mapper -> with_constraint -> with_constraint; + } + +let id x = x +let tuple2 f1 f2 (x, y) = (f1 x, f2 y) +let tuple3 f1 f2 f3 (x, y, z) = (f1 x, f2 y, f3 z) +let opt f = function None -> None | Some x -> Some (f x) + +let structure sub {str_items; str_type; str_final_env} = + { + str_items = List.map (sub.structure_item sub) str_items; + str_final_env = sub.env sub str_final_env; + str_type; + } + +let class_infos sub f x = + {x with + ci_params = List.map (tuple2 (sub.typ sub) id) x.ci_params; + ci_expr = f x.ci_expr; + } + +let module_type_declaration sub x = + let mtd_type = opt (sub.module_type sub) x.mtd_type in + {x with mtd_type} + +let module_declaration sub x = + let md_type = sub.module_type sub x.md_type in + {x with md_type} + +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 structure_item sub {str_desc; str_loc; str_env} = + let str_env = sub.env sub str_env in + let str_desc = + match str_desc with + | Tstr_eval (exp, attrs) -> Tstr_eval (sub.expr sub exp, attrs) + | Tstr_value (rec_flag, list) -> + let (rec_flag, list) = sub.value_bindings sub (rec_flag, list) in + Tstr_value (rec_flag, list) + | Tstr_primitive v -> Tstr_primitive (sub.value_description sub v) + | Tstr_type (rec_flag, list) -> + let (rec_flag, list) = sub.type_declarations sub (rec_flag, list) in + Tstr_type (rec_flag, list) + | Tstr_typext te -> Tstr_typext (sub.type_extension sub te) + | Tstr_exception ext -> Tstr_exception (sub.extension_constructor sub ext) + | Tstr_module mb -> Tstr_module (sub.module_binding sub mb) + | 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 () -> Tstr_class () + | Tstr_class_type list -> + Tstr_class_type + (List.map (tuple3 id id (sub.class_type_declaration sub)) list) + | Tstr_include incl -> + Tstr_include (include_infos (sub.module_expr sub) incl) + | Tstr_open _ + | Tstr_attribute _ as d -> d + in + {str_desc; str_env; str_loc} + +let value_description sub x = + let val_desc = sub.typ sub x.val_desc in + {x with val_desc} + +let label_decl sub x = + let ld_type = sub.typ sub x.ld_type in + {x with ld_type} + +let constructor_args sub = function + | Cstr_tuple l -> Cstr_tuple (List.map (sub.typ sub) l) + | Cstr_record l -> Cstr_record (List.map (label_decl sub) l) + +let constructor_decl sub cd = + let cd_args = constructor_args sub cd.cd_args in + let cd_res = opt (sub.typ sub) cd.cd_res in + {cd with cd_args; cd_res} + +let type_kind sub = function + | Ttype_abstract -> Ttype_abstract + | Ttype_variant list -> Ttype_variant (List.map (constructor_decl sub) list) + | Ttype_record list -> Ttype_record (List.map (label_decl sub) list) + | Ttype_open -> Ttype_open + +let type_declaration sub x = + let typ_cstrs = + List.map + (tuple3 (sub.typ sub) (sub.typ sub) id) + x.typ_cstrs + in + let typ_kind = sub.type_kind sub x.typ_kind in + let typ_manifest = opt (sub.typ sub) x.typ_manifest in + let typ_params = List.map (tuple2 (sub.typ sub) id) x.typ_params in + {x with typ_cstrs; typ_kind; typ_manifest; typ_params} + +let type_declarations sub (rec_flag, list) = + (rec_flag, List.map (sub.type_declaration sub) list) + +let type_extension sub x = + let tyext_params = List.map (tuple2 (sub.typ sub) id) x.tyext_params in + let tyext_constructors = + List.map (sub.extension_constructor sub) x.tyext_constructors + in + {x with tyext_constructors; tyext_params} + +let extension_constructor sub x = + let ext_kind = + match x.ext_kind with + Text_decl(ctl, cto) -> + Text_decl(constructor_args sub ctl, opt (sub.typ sub) cto) + | Text_rebind _ as d -> d + in + {x with ext_kind} + +let pat sub x = + let extra = function + | Tpat_type _ + | Tpat_unpack as d -> d + | Tpat_open (path,loc,env) -> Tpat_open (path, loc, sub.env sub env) + | Tpat_constraint ct -> Tpat_constraint (sub.typ sub ct) + in + let pat_env = sub.env sub x.pat_env in + let pat_extra = List.map (tuple3 extra id id) x.pat_extra in + let pat_desc = + match x.pat_desc with + | Tpat_any + | Tpat_var _ + | Tpat_constant _ as d -> d + | Tpat_tuple l -> Tpat_tuple (List.map (sub.pat sub) l) + | Tpat_construct (loc, cd, l) -> + Tpat_construct (loc, cd, List.map (sub.pat sub) l) + | Tpat_variant (l, po, rd) -> Tpat_variant (l, opt (sub.pat sub) po, rd) + | Tpat_record (l, closed) -> + Tpat_record (List.map (tuple3 id id (sub.pat sub)) l, closed) + | Tpat_array l -> Tpat_array (List.map (sub.pat sub) l) + | Tpat_or (p1, p2, rd) -> + Tpat_or (sub.pat sub p1, sub.pat sub p2, rd) + | Tpat_alias (p, id, s) -> Tpat_alias (sub.pat sub p, id, s) + | Tpat_lazy p -> Tpat_lazy (sub.pat sub p) + in + {x with pat_extra; pat_desc; pat_env} + +let expr sub x = + let extra = function + | Texp_constraint cty -> + Texp_constraint (sub.typ sub cty) + | Texp_coerce (cty1, cty2) -> + Texp_coerce (opt (sub.typ sub) cty1, sub.typ sub cty2) + | Texp_open (ovf, path, loc, env) -> + Texp_open (ovf, path, loc, sub.env sub env) + | Texp_newtype _ as d -> d + | Texp_poly cto -> Texp_poly (opt (sub.typ sub) cto) + in + let exp_extra = List.map (tuple3 extra id id) x.exp_extra in + let exp_env = sub.env sub x.exp_env in + let exp_desc = + match x.exp_desc with + | Texp_ident _ + | Texp_constant _ as d -> d + | Texp_let (rec_flag, list, exp) -> + let (rec_flag, list) = sub.value_bindings sub (rec_flag, list) in + Texp_let (rec_flag, list, sub.expr sub exp) + | Texp_function { arg_label; param; cases; partial; } -> + Texp_function { arg_label; param; cases = sub.cases sub cases; + partial; } + | Texp_apply (exp, list) -> + Texp_apply ( + sub.expr sub exp, + List.map (tuple2 id (opt (sub.expr sub))) list + ) + | Texp_match (exp, cases, exn_cases, p) -> + Texp_match ( + sub.expr sub exp, + sub.cases sub cases, + sub.cases sub exn_cases, + p + ) + | Texp_try (exp, cases) -> + Texp_try ( + sub.expr sub exp, + sub.cases sub cases + ) + | Texp_tuple list -> + Texp_tuple (List.map (sub.expr sub) list) + | Texp_construct (lid, cd, args) -> + Texp_construct (lid, cd, List.map (sub.expr sub) args) + | Texp_variant (l, expo) -> + Texp_variant (l, opt (sub.expr sub) 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, sub.expr sub exp)) + fields + in + Texp_record { + fields; representation; + extended_expression = opt (sub.expr sub) extended_expression; + } + | Texp_field (exp, lid, ld) -> + Texp_field (sub.expr sub exp, lid, ld) + | Texp_setfield (exp1, lid, ld, exp2) -> + Texp_setfield ( + sub.expr sub exp1, + lid, + ld, + sub.expr sub exp2 + ) + | Texp_array list -> + Texp_array (List.map (sub.expr sub) list) + | Texp_ifthenelse (exp1, exp2, expo) -> + Texp_ifthenelse ( + sub.expr sub exp1, + sub.expr sub exp2, + opt (sub.expr sub) expo + ) + | Texp_sequence (exp1, exp2) -> + Texp_sequence ( + sub.expr sub exp1, + sub.expr sub exp2 + ) + | Texp_while (exp1, exp2) -> + Texp_while ( + sub.expr sub exp1, + sub.expr sub exp2 + ) + | Texp_for (id, p, exp1, exp2, dir, exp3) -> + Texp_for ( + id, + p, + sub.expr sub exp1, + sub.expr sub exp2, + dir, + sub.expr sub exp3 + ) + | Texp_send (exp, meth, expo) -> + Texp_send + ( + sub.expr sub exp, + meth, + opt (sub.expr sub) expo + ) + | Texp_new _ + | Texp_instvar _ as d -> d + | Texp_setinstvar _ + | Texp_override _ -> + assert false + | Texp_letmodule (id, s, mexpr, exp) -> + Texp_letmodule ( + id, + s, + sub.module_expr sub mexpr, + sub.expr sub exp + ) + | Texp_letexception (cd, exp) -> + Texp_letexception ( + sub.extension_constructor sub cd, + sub.expr sub exp + ) + | Texp_assert exp -> + Texp_assert (sub.expr sub exp) + | Texp_lazy exp -> + Texp_lazy (sub.expr sub exp) + | Texp_object () -> + Texp_object () + | Texp_pack mexpr -> + Texp_pack (sub.module_expr sub mexpr) + | Texp_unreachable -> + Texp_unreachable + | Texp_extension_constructor _ as e -> + e + in + {x with exp_extra; exp_desc; exp_env} + + +let package_type sub x = + let pack_fields = List.map (tuple2 id (sub.typ sub)) x.pack_fields in + {x with pack_fields} + +let signature sub x = + let sig_final_env = sub.env sub x.sig_final_env in + let sig_items = List.map (sub.signature_item sub) x.sig_items in + {x with sig_items; sig_final_env} + +let signature_item sub x = + let sig_env = sub.env sub x.sig_env in + let sig_desc = + match x.sig_desc with + | Tsig_value v -> + Tsig_value (sub.value_description sub v) + | Tsig_type (rec_flag, list) -> + let (rec_flag, list) = sub.type_declarations sub (rec_flag, list) in + Tsig_type (rec_flag, list) + | Tsig_typext te -> + Tsig_typext (sub.type_extension sub te) + | Tsig_exception ext -> + Tsig_exception (sub.extension_constructor sub ext) + | Tsig_module x -> + Tsig_module (sub.module_declaration sub x) + | Tsig_recmodule list -> + Tsig_recmodule (List.map (sub.module_declaration sub) list) + | Tsig_modtype 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_open _ + | Tsig_attribute _ as d -> d + in + {x with sig_desc; sig_env} + +let class_description sub x = + class_infos sub (sub.class_type sub) x + +let module_type sub x = + let mty_env = sub.env sub x.mty_env in + let mty_desc = + match x.mty_desc with + | Tmty_ident _ + | Tmty_alias _ as d -> d + | Tmty_signature sg -> Tmty_signature (sub.signature sub sg) + | Tmty_functor (id, s, mtype1, mtype2) -> + Tmty_functor ( + id, + s, + opt (sub.module_type sub) mtype1, + sub.module_type sub mtype2 + ) + | Tmty_with (mtype, list) -> + Tmty_with ( + sub.module_type sub mtype, + List.map (tuple3 id id (sub.with_constraint sub)) list + ) + | Tmty_typeof mexpr -> + Tmty_typeof (sub.module_expr sub mexpr) + in + {x with mty_desc; mty_env} + +let with_constraint sub = function + | Twith_type decl -> Twith_type (sub.type_declaration sub decl) + | Twith_typesubst decl -> Twith_typesubst (sub.type_declaration sub decl) + | Twith_module _ + | Twith_modsubst _ as d -> d + +let module_coercion sub = function + | Tcoerce_none -> Tcoerce_none + | Tcoerce_functor (c1,c2) -> + 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, 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', runtime_fields) + | Tcoerce_primitive pc -> + Tcoerce_primitive {pc with pc_env = sub.env sub pc.pc_env} + +let module_expr sub x = + let mod_env = sub.env sub x.mod_env in + let mod_desc = + match x.mod_desc with + | Tmod_ident _ as d -> d + | Tmod_structure st -> Tmod_structure (sub.structure sub st) + | Tmod_functor (id, s, mtype, mexpr) -> + Tmod_functor ( + id, + s, + opt (sub.module_type sub) mtype, + sub.module_expr sub mexpr + ) + | Tmod_apply (mexp1, mexp2, c) -> + Tmod_apply ( + sub.module_expr sub mexp1, + sub.module_expr sub mexp2, + sub.module_coercion sub c + ) + | Tmod_constraint (mexpr, mt, Tmodtype_implicit, c) -> + Tmod_constraint (sub.module_expr sub mexpr, mt, Tmodtype_implicit, + sub.module_coercion sub c) + | Tmod_constraint (mexpr, mt, Tmodtype_explicit mtype, c) -> + Tmod_constraint ( + sub.module_expr sub mexpr, + mt, + Tmodtype_explicit (sub.module_type sub mtype), + sub.module_coercion sub c + ) + | Tmod_unpack (exp, mty) -> + Tmod_unpack + ( + sub.expr sub exp, + mty + ) + in + {x with mod_desc; mod_env} + +let module_binding sub x = + let mb_expr = sub.module_expr sub x.mb_expr in + {x with mb_expr} + + +let class_type sub x = + let cltyp_env = sub.env sub x.cltyp_env in + let cltyp_desc = + match x.cltyp_desc with + | Tcty_signature csg -> Tcty_signature (sub.class_signature sub csg) + | Tcty_constr (path, lid, list) -> + Tcty_constr ( + path, + lid, + List.map (sub.typ sub) list + ) + | Tcty_arrow (label, ct, cl) -> + Tcty_arrow + (label, + sub.typ sub ct, + sub.class_type sub cl + ) + | Tcty_open (ovf, p, lid, env, e) -> + Tcty_open (ovf, p, lid, sub.env sub env, sub.class_type sub e) + in + {x with cltyp_desc; cltyp_env} + +let class_signature sub x = + let csig_self = sub.typ sub x.csig_self in + let csig_fields = List.map (sub.class_type_field sub) x.csig_fields in + {x with csig_self; csig_fields} + +let class_type_field sub x = + let ctf_desc = + match x.ctf_desc with + | Tctf_inherit ct -> + Tctf_inherit (sub.class_type sub ct) + | Tctf_val (s, mut, virt, ct) -> + Tctf_val (s, mut, virt, sub.typ sub ct) + | Tctf_method (s, priv, virt, ct) -> + Tctf_method (s, priv, virt, sub.typ sub ct) + | Tctf_constraint (ct1, ct2) -> + Tctf_constraint (sub.typ sub ct1, sub.typ sub ct2) + | Tctf_attribute _ as d -> d + in + {x with ctf_desc} + +let typ sub x = + let ctyp_env = sub.env sub x.ctyp_env in + let ctyp_desc = + match x.ctyp_desc with + | Ttyp_any + | Ttyp_var _ as d -> d + | Ttyp_arrow (label, ct1, ct2) -> + Ttyp_arrow (label, sub.typ sub ct1, sub.typ sub ct2) + | Ttyp_tuple list -> Ttyp_tuple (List.map (sub.typ sub) list) + | Ttyp_constr (path, lid, list) -> + Ttyp_constr (path, lid, List.map (sub.typ sub) list) + | Ttyp_object (list, closed) -> + Ttyp_object ((List.map (sub.object_field sub) list), closed) + | Ttyp_class (path, lid, list) -> + Ttyp_class + (path, + lid, + List.map (sub.typ sub) list + ) + | Ttyp_alias (ct, s) -> + Ttyp_alias (sub.typ sub ct, s) + | Ttyp_variant (list, closed, labels) -> + Ttyp_variant (List.map (sub.row_field sub) list, closed, labels) + | Ttyp_poly (sl, ct) -> + Ttyp_poly (sl, sub.typ sub ct) + | Ttyp_package pack -> + Ttyp_package (sub.package_type sub pack) + in + {x with ctyp_desc; ctyp_env} + + +let row_field sub = function + | Ttag (label, attrs, b, list) -> + Ttag (label, attrs, b, List.map (sub.typ sub) list) + | Tinherit ct -> Tinherit (sub.typ sub ct) + +let object_field sub = function + | OTtag (label, attrs, ct) -> + OTtag (label, attrs, (sub.typ sub ct)) + | OTinherit ct -> OTinherit (sub.typ sub ct) + + + +let value_bindings sub (rec_flag, list) = + (rec_flag, List.map (sub.value_binding sub) list) + +let cases sub l = + List.map (sub.case sub) l + +let case sub {c_lhs; c_guard; c_rhs} = + { + c_lhs = sub.pat sub c_lhs; + c_guard = opt (sub.expr sub) c_guard; + c_rhs = sub.expr sub c_rhs; + } + +let value_binding sub x = + let vb_pat = sub.pat sub x.vb_pat in + let vb_expr = sub.expr sub x.vb_expr in + {x with vb_pat; vb_expr} + +let env _sub x = x + +let default = + { + case; + cases; + class_description; + class_signature; + class_type; + class_type_declaration; + class_type_field; + env; + expr; + extension_constructor; + module_binding; + module_coercion; + module_declaration; + module_expr; + module_type; + module_type_declaration; + package_type; + pat; + row_field; + object_field; + signature; + signature_item; + structure; + structure_item; + typ; + type_declaration; + type_declarations; + type_extension; + type_kind; + value_binding; + value_bindings; + value_description; + with_constraint; + } diff --git a/analysis/src/vendor/compiler-libs-406/tast_mapper.mli b/analysis/src/vendor/compiler-libs-406/tast_mapper.mli new file mode 100644 index 000000000..4fd87b693 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/tast_mapper.mli @@ -0,0 +1,64 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Alain Frisch, LexiFi *) +(* *) +(* 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 Typedtree + +(** {1 A generic Typedtree mapper} *) + +type mapper = + { + case: mapper -> case -> case; + cases: mapper -> case list -> case list; + class_description: mapper -> class_description -> class_description; + class_signature: mapper -> class_signature -> class_signature; + class_type: mapper -> class_type -> class_type; + class_type_declaration: mapper -> class_type_declaration -> + class_type_declaration; + class_type_field: mapper -> class_type_field -> class_type_field; + env: mapper -> Env.t -> Env.t; + expr: mapper -> expression -> expression; + extension_constructor: mapper -> extension_constructor -> + extension_constructor; + module_binding: mapper -> module_binding -> module_binding; + module_coercion: mapper -> module_coercion -> module_coercion; + module_declaration: mapper -> module_declaration -> module_declaration; + module_expr: mapper -> module_expr -> module_expr; + module_type: mapper -> module_type -> module_type; + module_type_declaration: + mapper -> module_type_declaration -> module_type_declaration; + package_type: mapper -> package_type -> package_type; + pat: mapper -> pattern -> pattern; + row_field: mapper -> row_field -> row_field; + object_field: mapper -> object_field -> object_field; + signature: mapper -> signature -> signature; + signature_item: mapper -> signature_item -> signature_item; + structure: mapper -> structure -> structure; + structure_item: mapper -> structure_item -> structure_item; + typ: mapper -> core_type -> core_type; + type_declaration: mapper -> type_declaration -> type_declaration; + type_declarations: mapper -> (rec_flag * type_declaration list) -> + (rec_flag * type_declaration list); + type_extension: mapper -> type_extension -> type_extension; + type_kind: mapper -> type_kind -> type_kind; + value_binding: mapper -> value_binding -> value_binding; + value_bindings: mapper -> (rec_flag * value_binding list) -> + (rec_flag * value_binding list); + value_description: mapper -> value_description -> value_description; + with_constraint: mapper -> with_constraint -> with_constraint; + } + + +val default: mapper diff --git a/analysis/src/vendor/compiler-libs-406/tbl.ml b/analysis/src/vendor/compiler-libs-406/tbl.ml new file mode 100644 index 000000000..fa278b43b --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/tbl.ml @@ -0,0 +1,123 @@ +(**************************************************************************) +(* *) +(* 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 ('k, 'v) t = + Empty + | Node of ('k, 'v) t * 'k * 'v * ('k, 'v) t * int + +let empty = Empty + +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 bal l x d r = + let hl = height l and hr = height r in + if hl > hr + 1 then + match l with + | Node (ll, lv, ld, lr, _) when height ll >= height lr -> + create ll lv ld (create lr x d r) + | Node (ll, lv, ld, Node (lrl, lrv, lrd, lrr, _), _) -> + create (create ll lv ld lrl) lrv lrd (create lrr x d r) + | _ -> assert false + else if hr > hl + 1 then + match r with + | Node (rl, rv, rd, rr, _) when height rr >= height rl -> + create (create l x d rl) rv rd rr + | Node (Node (rll, rlv, rld, rlr, _), rv, rd, rr, _) -> + create (create l x d rll) rlv rld (create rlr rv rd rr) + | _ -> assert false + else + create l x d r + +let rec add x data = function + Empty -> + Node(Empty, x, data, Empty, 1) + | Node(l, v, d, r, h) -> + let c = compare 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 find x = function + Empty -> + raise Not_found + | Node(l, v, d, r, _) -> + let c = compare x v in + if c = 0 then d + else find x (if c < 0 then l else r) + +let rec find_str (x : string) = function + Empty -> + raise Not_found + | Node(l, v, d, r, _) -> + let c = compare x v in + if c = 0 then d + else find_str x (if c < 0 then l else r) + +let rec mem x = function + Empty -> false + | Node(l, v, _d, r, _) -> + let c = compare x v in + c = 0 || mem x (if c < 0 then l else r) + +let rec merge t1 t2 = + match (t1, t2) with + (Empty, t) -> t + | (t, Empty) -> t + | (Node(l1, v1, d1, r1, _h1), Node(l2, v2, d2, r2, _h2)) -> + bal l1 v1 d1 (bal (merge r1 l2) v2 d2 r2) + +let rec remove x = function + Empty -> + Empty + | Node(l, v, d, r, _h) -> + let c = compare x v in + if c = 0 then + 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 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) -> Node(map f l, v, f v d, map f 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)) + +open Format + +let print print_key print_data ppf tbl = + let print_tbl ppf tbl = + iter (fun k d -> fprintf ppf "@[<2>%a ->@ %a;@]@ " print_key k print_data d) + tbl in + fprintf ppf "@[[[%a]]@]" print_tbl tbl diff --git a/analysis/src/vendor/compiler-libs-406/tbl.mli b/analysis/src/vendor/compiler-libs-406/tbl.mli new file mode 100644 index 000000000..d23b959c7 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/tbl.mli @@ -0,0 +1,34 @@ +(**************************************************************************) +(* *) +(* 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 from any ordered type to any type. + We use the generic ordering to compare keys. *) + +type ('k, 'v) t + +val empty: ('k, 'v) t +val add: 'k -> 'v -> ('k, 'v) t -> ('k, 'v) t +val find: 'k -> ('k, 'v) t -> 'v +val find_str: string -> (string, 'v) t -> 'v +val mem: 'k -> ('k, 'v) t -> bool +val remove: 'k -> ('k, 'v) t -> ('k, 'v) t +val iter: ('k -> 'v -> unit) -> ('k, 'v) t -> unit +val map: ('k -> 'v1 -> 'v2) -> ('k, 'v1) t -> ('k, 'v2) t +val fold: ('k -> 'v -> 'acc -> 'acc) -> ('k, 'v) t -> 'acc -> 'acc + +open Format + +val print: (formatter -> 'k -> unit) -> (formatter -> 'v -> unit) -> + formatter -> ('k, 'v) t -> unit diff --git a/analysis/src/vendor/compiler-libs-406/typedtree.ml b/analysis/src/vendor/compiler-libs-406/typedtree.ml new file mode 100644 index 000000000..8aa47a14a --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/typedtree.ml @@ -0,0 +1,569 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Abstract syntax tree after typing *) + +open Misc +open Asttypes +open Types + +(* Value expressions for the core language *) + +type partial = Partial | Total + +type attribute = Parsetree.attribute +type attributes = attribute list + +type pattern = + { pat_desc: pattern_desc; + pat_loc: Location.t; + pat_extra : (pat_extra * Location.t * attribute list) list; + pat_type: type_expr; + mutable pat_env: Env.t; + pat_attributes: attribute list; + } + +and pat_extra = + | Tpat_constraint of core_type + | Tpat_type of Path.t * Longident.t loc + | Tpat_open of Path.t * Longident.t loc * Env.t + | Tpat_unpack + +and pattern_desc = + Tpat_any + | Tpat_var of Ident.t * string loc + | Tpat_alias of pattern * Ident.t * string loc + | Tpat_constant of constant + | Tpat_tuple of pattern list + | Tpat_construct of + Longident.t loc * constructor_description * pattern list + | Tpat_variant of label * pattern option * row_desc ref + | Tpat_record of + (Longident.t loc * label_description * pattern) list * + closed_flag + | Tpat_array of pattern list + | Tpat_or of pattern * pattern * row_desc option + | Tpat_lazy of pattern + +and expression = + { exp_desc: expression_desc; + exp_loc: Location.t; + exp_extra: (exp_extra * Location.t * attribute list) list; + exp_type: type_expr; + exp_env: Env.t; + exp_attributes: attribute list; + } + +and exp_extra = + | Texp_constraint of core_type + | Texp_coerce of core_type option * core_type + | Texp_open of override_flag * Path.t * Longident.t loc * Env.t + | Texp_poly of core_type option + | Texp_newtype of string + +and expression_desc = + Texp_ident of Path.t * Longident.t loc * Types.value_description + | Texp_constant of constant + | Texp_let of rec_flag * value_binding list * expression + | Texp_function of { arg_label : arg_label; param : Ident.t; + cases : case list; partial : partial; } + | Texp_apply of expression * (arg_label * expression option) list + | Texp_match of expression * case list * case list * partial + | Texp_try of expression * case list + | Texp_tuple of expression list + | Texp_construct of + Longident.t loc * constructor_description * expression list + | Texp_variant of label * expression option + | Texp_record of { + fields : ( Types.label_description * record_label_definition ) array; + representation : Types.record_representation; + extended_expression : expression option; + } + | Texp_field of expression * Longident.t loc * label_description + | Texp_setfield of + expression * Longident.t loc * label_description * expression + | Texp_array of expression list + | Texp_ifthenelse of expression * expression * expression option + | Texp_sequence of expression * expression + | Texp_while of expression * expression + | Texp_for of + Ident.t * Parsetree.pattern * expression * expression * direction_flag * + expression + | Texp_send of expression * meth * expression option + | 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 unit + | Texp_pack of module_expr + | Texp_unreachable + | Texp_extension_constructor of Longident.t loc * Path.t + +and meth = + Tmeth_name of string + +and case = + { + c_lhs: pattern; + c_guard: expression option; + c_rhs: expression; + } + +and record_label_definition = + | Kept of Types.type_expr + | Overridden of Longident.t loc * expression + +(* Value expressions for the class language *) + + + + + +(* Value expressions for the module language *) + +and module_expr = + { mod_desc: module_expr_desc; + mod_loc: Location.t; + mod_type: Types.module_type; + mod_env: Env.t; + mod_attributes: attribute list; + } + +and module_type_constraint = + Tmodtype_implicit +| Tmodtype_explicit of module_type + +and module_expr_desc = + Tmod_ident of Path.t * Longident.t loc + | Tmod_structure of structure + | Tmod_functor of Ident.t * string loc * module_type option * module_expr + | Tmod_apply of module_expr * module_expr * module_coercion + | Tmod_constraint of + module_expr * Types.module_type * module_type_constraint * module_coercion + | Tmod_unpack of expression * Types.module_type + +and structure = { + str_items : structure_item list; + str_type : Types.signature; + str_final_env : Env.t; +} + +and structure_item = + { str_desc : structure_item_desc; + str_loc : Location.t; + str_env : Env.t + } + +and structure_item_desc = + Tstr_eval of expression * attributes + | Tstr_value of rec_flag * value_binding list + | Tstr_primitive of value_description + | Tstr_type of rec_flag * type_declaration list + | Tstr_typext of type_extension + | Tstr_exception of extension_constructor + | Tstr_module of module_binding + | Tstr_recmodule of module_binding list + | Tstr_modtype of module_type_declaration + | Tstr_open of open_description + | 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 + +and module_binding = + { + mb_id: Ident.t; + mb_name: string loc; + mb_expr: module_expr; + mb_attributes: attribute list; + mb_loc: Location.t; + } + +and value_binding = + { + vb_pat: pattern; + vb_expr: expression; + vb_attributes: attributes; + vb_loc: Location.t; + } + +and module_coercion = + Tcoerce_none + | Tcoerce_structure of (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 + +and module_type = + { mty_desc: module_type_desc; + mty_type : Types.module_type; + mty_env : Env.t; + mty_loc: Location.t; + mty_attributes: attribute list; + } + +and module_type_desc = + Tmty_ident of Path.t * Longident.t loc + | Tmty_signature of signature + | Tmty_functor of Ident.t * string loc * module_type option * module_type + | Tmty_with of module_type * (Path.t * Longident.t loc * with_constraint) list + | Tmty_typeof of module_expr + | Tmty_alias of Path.t * Longident.t loc + +(* Keep primitive type information for type-based lambda-code specialization *) +and primitive_coercion = + { + pc_desc: Primitive.description; + pc_type: type_expr; + pc_env: Env.t; + pc_loc : Location.t; + pc_id : Ident.t; (*RE:Added *) + } + +and signature = { + sig_items : signature_item list; + sig_type : Types.signature; + sig_final_env : Env.t; +} + +and signature_item = + { sig_desc: signature_item_desc; + sig_env : Env.t; (* BINANNOT ADDED *) + sig_loc: Location.t } + +and signature_item_desc = + Tsig_value of value_description + | Tsig_type of rec_flag * type_declaration list + | Tsig_typext of type_extension + | Tsig_exception of extension_constructor + | Tsig_module of module_declaration + | Tsig_recmodule of module_declaration list + | Tsig_modtype of module_type_declaration + | Tsig_open of open_description + | Tsig_include of include_description + | Tsig_class of class_description list + | Tsig_class_type of class_type_declaration list + | Tsig_attribute of attribute + +and module_declaration = + { + md_id: Ident.t; + md_name: string loc; + md_type: module_type; + md_attributes: attribute list; + md_loc: Location.t; + } + +and module_type_declaration = + { + mtd_id: Ident.t; + mtd_name: string loc; + mtd_type: module_type option; + mtd_attributes: attribute list; + mtd_loc: Location.t; + } + +and open_description = + { + open_path: Path.t; + open_txt: Longident.t loc; + open_override: override_flag; + open_loc: Location.t; + open_attributes: attribute list; + } + +and 'a include_infos = + { + incl_mod: 'a; + incl_type: Types.signature; + incl_loc: Location.t; + incl_attributes: attribute list; + } + +and include_description = module_type include_infos + +and include_declaration = module_expr include_infos + +and with_constraint = + Twith_type of type_declaration + | Twith_module of Path.t * Longident.t loc + | Twith_typesubst of type_declaration + | Twith_modsubst of Path.t * Longident.t loc + +and core_type = +(* mutable because of [Typeclass.declare_method] *) + { mutable ctyp_desc : core_type_desc; + mutable ctyp_type : type_expr; + ctyp_env : Env.t; (* BINANNOT ADDED *) + ctyp_loc : Location.t; + ctyp_attributes: attribute list; + } + +and core_type_desc = + Ttyp_any + | Ttyp_var of string + | Ttyp_arrow of arg_label * core_type * core_type + | Ttyp_tuple of core_type list + | Ttyp_constr of Path.t * Longident.t loc * core_type list + | Ttyp_object of object_field list * closed_flag + | Ttyp_class of Path.t * Longident.t loc * core_type list + | Ttyp_alias of core_type * string + | Ttyp_variant of row_field list * closed_flag * label list option + | Ttyp_poly of string list * core_type + | Ttyp_package of package_type + +and package_type = { + pack_path : Path.t; + pack_fields : (Longident.t loc * core_type) list; + pack_type : Types.module_type; + pack_txt : Longident.t loc; +} + +and row_field = + Ttag of string loc * attributes * bool * core_type list + | Tinherit of core_type + +and object_field = + | OTtag of string loc * attributes * core_type + | OTinherit of core_type + +and value_description = + { val_id: Ident.t; + val_name: string loc; + val_desc: core_type; + val_val: Types.value_description; + val_prim: string list; + val_loc: Location.t; + val_attributes: attribute list; + } + +and type_declaration = + { typ_id: Ident.t; + typ_name: string loc; + typ_params: (core_type * variance) list; + typ_type: Types.type_declaration; + typ_cstrs: (core_type * core_type * Location.t) list; + typ_kind: type_kind; + typ_private: private_flag; + typ_manifest: core_type option; + typ_loc: Location.t; + typ_attributes: attribute list; + } + +and type_kind = + Ttype_abstract + | Ttype_variant of constructor_declaration list + | Ttype_record of label_declaration list + | Ttype_open + +and label_declaration = + { + ld_id: Ident.t; + ld_name: string loc; + ld_mutable: mutable_flag; + ld_type: core_type; + ld_loc: Location.t; + ld_attributes: attribute list; + } + +and constructor_declaration = + { + cd_id: Ident.t; + cd_name: string loc; + cd_args: constructor_arguments; + cd_res: core_type option; + cd_loc: Location.t; + cd_attributes: attribute list; + } + +and constructor_arguments = + | Cstr_tuple of core_type list + | Cstr_record of label_declaration list + +and type_extension = + { + tyext_path: Path.t; + tyext_txt: Longident.t loc; + tyext_params: (core_type * variance) list; + tyext_constructors: extension_constructor list; + tyext_private: private_flag; + tyext_attributes: attribute list; + } + +and extension_constructor = + { + ext_id: Ident.t; + ext_name: string loc; + ext_type: Types.extension_constructor; + ext_kind: extension_constructor_kind; + ext_loc: Location.t; + ext_attributes: attribute list; + } + +and extension_constructor_kind = + Text_decl of constructor_arguments * core_type option + | Text_rebind of Path.t * Longident.t loc + +and class_type = + { + cltyp_desc: class_type_desc; + cltyp_type: Types.class_type; + cltyp_env: Env.t; + cltyp_loc: Location.t; + cltyp_attributes: attribute list; + } + +and class_type_desc = + Tcty_constr of Path.t * Longident.t loc * core_type list + | Tcty_signature of class_signature + | Tcty_arrow of arg_label * core_type * class_type + | Tcty_open of override_flag * Path.t * Longident.t loc * Env.t * class_type + +and class_signature = { + csig_self: core_type; + csig_fields: class_type_field list; + csig_type: Types.class_signature; + } + +and class_type_field = { + ctf_desc: class_type_field_desc; + ctf_loc: Location.t; + ctf_attributes: attribute list; + } + +and class_type_field_desc = + | Tctf_inherit of class_type + | Tctf_val of (string * mutable_flag * virtual_flag * core_type) + | Tctf_method of (string * private_flag * virtual_flag * core_type) + | Tctf_constraint of (core_type * core_type) + | Tctf_attribute of attribute + + +and class_description = + class_type class_infos + +and class_type_declaration = + class_type class_infos + +and 'a class_infos = + { ci_virt: virtual_flag; + ci_params: (core_type * variance) list; + ci_id_name: string loc; + ci_id_class: Ident.t; + ci_id_class_type: Ident.t; + ci_id_object: Ident.t; + ci_id_typehash: Ident.t; + ci_expr: 'a; + ci_decl: Types.class_declaration; + ci_type_decl: Types.class_type_declaration; + ci_loc: Location.t; + ci_attributes: attribute list; + } + +(* Auxiliary functions over the a.s.t. *) + +let iter_pattern_desc f = function + | Tpat_alias(p, _, _) -> f p + | Tpat_tuple patl -> List.iter f patl + | Tpat_construct(_, _, patl) -> List.iter f patl + | Tpat_variant(_, pat, _) -> may f pat + | Tpat_record (lbl_pat_list, _) -> + List.iter (fun (_, _, pat) -> f pat) lbl_pat_list + | Tpat_array patl -> List.iter f patl + | Tpat_or(p1, p2, _) -> f p1; f p2 + | Tpat_lazy p -> f p + | Tpat_any + | Tpat_var _ + | Tpat_constant _ -> () + +let map_pattern_desc f d = + match d with + | Tpat_alias (p1, id, s) -> + Tpat_alias (f p1, id, s) + | Tpat_tuple pats -> + Tpat_tuple (List.map f pats) + | Tpat_record (lpats, closed) -> + Tpat_record (List.map (fun (lid, l,p) -> lid, l, f p) lpats, closed) + | Tpat_construct (lid, c,pats) -> + Tpat_construct (lid, c, List.map f pats) + | Tpat_array pats -> + Tpat_array (List.map f pats) + | Tpat_lazy p1 -> Tpat_lazy (f p1) + | Tpat_variant (x1, Some p1, x2) -> + Tpat_variant (x1, Some (f p1), x2) + | Tpat_or (p1,p2,path) -> + Tpat_or (f p1, f p2, path) + | Tpat_var _ + | Tpat_constant _ + | Tpat_any + | Tpat_variant (_,None,_) -> d + +(* List the identifiers bound by a pattern or a let *) + +let idents = ref([]: (Ident.t * string loc) list) + +let rec bound_idents pat = + match pat.pat_desc with + | Tpat_var (id,s) -> idents := (id,s) :: !idents + | Tpat_alias(p, id, s ) -> + bound_idents p; idents := (id,s) :: !idents + | Tpat_or(p1, _, _) -> + (* Invariant : both arguments binds the same variables *) + bound_idents p1 + | d -> iter_pattern_desc bound_idents d + +let pat_bound_idents pat = + idents := []; + bound_idents pat; + let res = !idents in + idents := []; + List.map fst res + +let rev_let_bound_idents_with_loc bindings = + idents := []; + List.iter (fun vb -> bound_idents vb.vb_pat) bindings; + let res = !idents in idents := []; res + +let let_bound_idents_with_loc pat_expr_list = + List.rev(rev_let_bound_idents_with_loc pat_expr_list) + +let rev_let_bound_idents pat = List.map fst (rev_let_bound_idents_with_loc pat) +let let_bound_idents pat = List.map fst (let_bound_idents_with_loc pat) + +let alpha_var env id = List.assoc id env + +let rec alpha_pat env p = match p.pat_desc with +| Tpat_var (id, s) -> (* note the ``Not_found'' case *) + {p with pat_desc = + try Tpat_var (alpha_var env id, s) with + | Not_found -> Tpat_any} +| Tpat_alias (p1, id, s) -> + let new_p = alpha_pat env p1 in + begin try + {p with pat_desc = Tpat_alias (new_p, alpha_var env id, s)} + with + | Not_found -> new_p + end +| d -> + {p with pat_desc = map_pattern_desc (alpha_pat env) d} + +let mkloc = Location.mkloc +let mknoloc = Location.mknoloc diff --git a/analysis/src/vendor/compiler-libs-406/typedtree.mli b/analysis/src/vendor/compiler-libs-406/typedtree.mli new file mode 100644 index 000000000..fac00f225 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/typedtree.mli @@ -0,0 +1,616 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(** Abstract syntax tree after typing *) + + +(** By comparison with {!Parsetree}: + - Every {!Longindent.t} is accompanied by a resolved {!Path.t}. + +*) + +open Asttypes +open Types + +(* Value expressions for the core language *) + +type partial = Partial | Total + +(** {1 Extension points} *) + +type attribute = Parsetree.attribute +type attributes = attribute list + +(** {1 Core language} *) + +type pattern = + { pat_desc: pattern_desc; + pat_loc: Location.t; + pat_extra : (pat_extra * Location.t * attributes) list; + pat_type: type_expr; + mutable pat_env: Env.t; + pat_attributes: attributes; + } + +and pat_extra = + | Tpat_constraint of core_type + (** P : T { pat_desc = P + ; pat_extra = (Tpat_constraint T, _, _) :: ... } + *) + | Tpat_type of Path.t * Longident.t loc + (** #tconst { pat_desc = disjunction + ; pat_extra = (Tpat_type (P, "tconst"), _, _) :: ...} + + where [disjunction] is a [Tpat_or _] representing the + branches of [tconst]. + *) + | Tpat_open of Path.t * Longident.t loc * Env.t + | Tpat_unpack + (** (module P) { pat_desc = Tpat_var "P" + ; pat_extra = (Tpat_unpack, _, _) :: ... } + *) + +and pattern_desc = + Tpat_any + (** _ *) + | Tpat_var of Ident.t * string loc + (** x *) + | Tpat_alias of pattern * Ident.t * string loc + (** P as a *) + | Tpat_constant of constant + (** 1, 'a', "true", 1.0, 1l, 1L, 1n *) + | Tpat_tuple of pattern list + (** (P1, ..., Pn) + + Invariant: n >= 2 + *) + | Tpat_construct of + Longident.t loc * constructor_description * pattern list + (** C [] + C P [P] + C (P1, ..., Pn) [P1; ...; Pn] + *) + | Tpat_variant of label * pattern option * row_desc ref + (** `A (None) + `A P (Some P) + + See {!Types.row_desc} for an explanation of the last parameter. + *) + | Tpat_record of + (Longident.t loc * label_description * pattern) list * + closed_flag + (** { l1=P1; ...; ln=Pn } (flag = Closed) + { l1=P1; ...; ln=Pn; _} (flag = Open) + + Invariant: n > 0 + *) + | Tpat_array of pattern list + (** [| P1; ...; Pn |] *) + | Tpat_or of pattern * pattern * row_desc option + (** P1 | P2 + + [row_desc] = [Some _] when translating [Ppat_type _], + [None] otherwise. + *) + | Tpat_lazy of pattern + (** lazy P *) + +and expression = + { exp_desc: expression_desc; + exp_loc: Location.t; + exp_extra: (exp_extra * Location.t * attributes) list; + exp_type: type_expr; + exp_env: Env.t; + exp_attributes: attributes; + } + +and exp_extra = + | Texp_constraint of core_type + (** E : T *) + | Texp_coerce of core_type option * core_type + (** E :> T [Texp_coerce (None, T)] + E : T0 :> T [Texp_coerce (Some T0, T)] + *) + | Texp_open of override_flag * Path.t * Longident.t loc * Env.t + (** let open[!] M in [Texp_open (!, P, M, env)] + where [env] is the environment after opening [P] + *) + | Texp_poly of core_type option + (** Used for method bodies. *) + | Texp_newtype of string + (** fun (type t) -> *) + +and expression_desc = + Texp_ident of Path.t * Longident.t loc * Types.value_description + (** x + M.x + *) + | Texp_constant of constant + (** 1, 'a', "true", 1.0, 1l, 1L, 1n *) + | Texp_let of rec_flag * value_binding list * expression + (** let P1 = E1 and ... and Pn = EN in E (flag = Nonrecursive) + let rec P1 = E1 and ... and Pn = EN in E (flag = Recursive) + *) + | Texp_function of { arg_label : arg_label; param : Ident.t; + cases : case list; partial : partial; } + (** [Pexp_fun] and [Pexp_function] both translate to [Texp_function]. + See {!Parsetree} for more details. + + [param] is the identifier that is to be used to name the + parameter of the function. + + partial = + [Partial] if the pattern match is partial + [Total] otherwise. + *) + | Texp_apply of expression * (arg_label * expression option) list + (** E0 ~l1:E1 ... ~ln:En + + The expression can be None if the expression is abstracted over + this argument. It currently appears when a label is applied. + + For example: + let f x ~y = x + y in + f ~y:3 + + The resulting typedtree for the application is: + Texp_apply (Texp_ident "f/1037", + [(Nolabel, None); + (Labelled "y", Some (Texp_constant Const_int 3)) + ]) + *) + | Texp_match of expression * case list * case list * partial + (** match E0 with + | P1 -> E1 + | P2 -> E2 + | exception P3 -> E3 + + [Texp_match (E0, [(P1, E1); (P2, E2)], [(P3, E3)], _)] + *) + | Texp_try of expression * case list + (** try E with P1 -> E1 | ... | PN -> EN *) + | Texp_tuple of expression list + (** (E1, ..., EN) *) + | Texp_construct of + Longident.t loc * constructor_description * expression list + (** C [] + C E [E] + C (E1, ..., En) [E1;...;En] + *) + | Texp_variant of label * expression option + | Texp_record of { + fields : ( Types.label_description * record_label_definition ) array; + representation : Types.record_representation; + extended_expression : expression option; + } + (** { l1=P1; ...; ln=Pn } (extended_expression = None) + { E0 with l1=P1; ...; ln=Pn } (extended_expression = Some E0) + + Invariant: n > 0 + + If the type is { l1: t1; l2: t2 }, the expression + { E0 with t2=P2 } is represented as + Texp_record + { fields = [| l1, Kept t1; l2 Override P2 |]; representation; + extended_expression = Some E0 } + *) + | Texp_field of expression * Longident.t loc * label_description + | Texp_setfield of + expression * Longident.t loc * label_description * expression + | Texp_array of expression list + | Texp_ifthenelse of expression * expression * expression option + | Texp_sequence of expression * expression + | Texp_while of expression * expression + | Texp_for of + Ident.t * Parsetree.pattern * expression * expression * direction_flag * + expression + | Texp_send of expression * meth * expression option + | 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 unit + | Texp_pack of module_expr + | Texp_unreachable + | Texp_extension_constructor of Longident.t loc * Path.t + +and meth = + Tmeth_name of string + +and case = + { + c_lhs: pattern; + c_guard: expression option; + c_rhs: expression; + } + +and record_label_definition = + | Kept of Types.type_expr + | Overridden of Longident.t loc * expression + + + +(* Value expressions for the module language *) + +and module_expr = + { mod_desc: module_expr_desc; + mod_loc: Location.t; + mod_type: Types.module_type; + mod_env: Env.t; + mod_attributes: attributes; + } + +(** Annotations for [Tmod_constraint]. *) +and module_type_constraint = + | Tmodtype_implicit + (** The module type constraint has been synthesized during typechecking. *) + | Tmodtype_explicit of module_type + (** The module type was in the source file. *) + +and module_expr_desc = + Tmod_ident of Path.t * Longident.t loc + | Tmod_structure of structure + | Tmod_functor of Ident.t * string loc * module_type option * module_expr + | Tmod_apply of module_expr * module_expr * module_coercion + | Tmod_constraint of + module_expr * Types.module_type * module_type_constraint * module_coercion + (** ME (constraint = Tmodtype_implicit) + (ME : MT) (constraint = Tmodtype_explicit MT) + *) + | Tmod_unpack of expression * Types.module_type + +and structure = { + str_items : structure_item list; + str_type : Types.signature; + str_final_env : Env.t; +} + +and structure_item = + { str_desc : structure_item_desc; + str_loc : Location.t; + str_env : Env.t + } + +and structure_item_desc = + Tstr_eval of expression * attributes + | Tstr_value of rec_flag * value_binding list + | Tstr_primitive of value_description + | Tstr_type of rec_flag * type_declaration list + | Tstr_typext of type_extension + | Tstr_exception of extension_constructor + | Tstr_module of module_binding + | Tstr_recmodule of module_binding list + | Tstr_modtype of module_type_declaration + | Tstr_open of open_description + | 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 + +and module_binding = + { + mb_id: Ident.t; + mb_name: string loc; + mb_expr: module_expr; + mb_attributes: attributes; + mb_loc: Location.t; + } + +and value_binding = + { + vb_pat: pattern; + vb_expr: expression; + vb_attributes: attributes; + vb_loc: Location.t; + } + +and module_coercion = + Tcoerce_none + | Tcoerce_structure of (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 + +and module_type = + { mty_desc: module_type_desc; + mty_type : Types.module_type; + mty_env : Env.t; + mty_loc: Location.t; + mty_attributes: attributes; + } + +and module_type_desc = + Tmty_ident of Path.t * Longident.t loc + | Tmty_signature of signature + | Tmty_functor of Ident.t * string loc * module_type option * module_type + | Tmty_with of module_type * (Path.t * Longident.t loc * with_constraint) list + | Tmty_typeof of module_expr + | Tmty_alias of Path.t * Longident.t loc + +and primitive_coercion = + { + pc_desc: Primitive.description; + pc_type: type_expr; + pc_env: Env.t; + pc_loc : Location.t; + pc_id : Ident.t; + } + +and signature = { + sig_items : signature_item list; + sig_type : Types.signature; + sig_final_env : Env.t; +} + +and signature_item = + { sig_desc: signature_item_desc; + sig_env : Env.t; (* BINANNOT ADDED *) + sig_loc: Location.t } + +and signature_item_desc = + Tsig_value of value_description + | Tsig_type of rec_flag * type_declaration list + | Tsig_typext of type_extension + | Tsig_exception of extension_constructor + | Tsig_module of module_declaration + | Tsig_recmodule of module_declaration list + | Tsig_modtype of module_type_declaration + | Tsig_open of open_description + | Tsig_include of include_description + | Tsig_class of class_description list + | Tsig_class_type of class_type_declaration list + | Tsig_attribute of attribute + +and module_declaration = + { + md_id: Ident.t; + md_name: string loc; + md_type: module_type; + md_attributes: attributes; + md_loc: Location.t; + } + +and module_type_declaration = + { + mtd_id: Ident.t; + mtd_name: string loc; + mtd_type: module_type option; + mtd_attributes: attributes; + mtd_loc: Location.t; + } + +and open_description = + { + open_path: Path.t; + open_txt: Longident.t loc; + open_override: override_flag; + open_loc: Location.t; + open_attributes: attribute list; + } + +and 'a include_infos = + { + incl_mod: 'a; + incl_type: Types.signature; + incl_loc: Location.t; + incl_attributes: attribute list; + } + +and include_description = module_type include_infos + +and include_declaration = module_expr include_infos + +and with_constraint = + Twith_type of type_declaration + | Twith_module of Path.t * Longident.t loc + | Twith_typesubst of type_declaration + | Twith_modsubst of Path.t * Longident.t loc + +and core_type = + { mutable ctyp_desc : core_type_desc; + (** mutable because of [Typeclass.declare_method] *) + mutable ctyp_type : type_expr; + (** mutable because of [Typeclass.declare_method] *) + ctyp_env : Env.t; (* BINANNOT ADDED *) + ctyp_loc : Location.t; + ctyp_attributes: attributes; + } + +and core_type_desc = + Ttyp_any + | Ttyp_var of string + | Ttyp_arrow of arg_label * core_type * core_type + | Ttyp_tuple of core_type list + | Ttyp_constr of Path.t * Longident.t loc * core_type list + | Ttyp_object of object_field list * closed_flag + | Ttyp_class of Path.t * Longident.t loc * core_type list + | Ttyp_alias of core_type * string + | Ttyp_variant of row_field list * closed_flag * label list option + | Ttyp_poly of string list * core_type + | Ttyp_package of package_type + +and package_type = { + pack_path : Path.t; + pack_fields : (Longident.t loc * core_type) list; + pack_type : Types.module_type; + pack_txt : Longident.t loc; +} + +and row_field = + Ttag of string loc * attributes * bool * core_type list + | Tinherit of core_type + +and object_field = + | OTtag of string loc * attributes * core_type + | OTinherit of core_type + +and value_description = + { val_id: Ident.t; + val_name: string loc; + val_desc: core_type; + val_val: Types.value_description; + val_prim: string list; + val_loc: Location.t; + val_attributes: attributes; + } + +and type_declaration = + { + typ_id: Ident.t; + typ_name: string loc; + typ_params: (core_type * variance) list; + typ_type: Types.type_declaration; + typ_cstrs: (core_type * core_type * Location.t) list; + typ_kind: type_kind; + typ_private: private_flag; + typ_manifest: core_type option; + typ_loc: Location.t; + typ_attributes: attributes; + } + +and type_kind = + Ttype_abstract + | Ttype_variant of constructor_declaration list + | Ttype_record of label_declaration list + | Ttype_open + +and label_declaration = + { + ld_id: Ident.t; + ld_name: string loc; + ld_mutable: mutable_flag; + ld_type: core_type; + ld_loc: Location.t; + ld_attributes: attributes; + } + +and constructor_declaration = + { + cd_id: Ident.t; + cd_name: string loc; + cd_args: constructor_arguments; + cd_res: core_type option; + cd_loc: Location.t; + cd_attributes: attributes; + } + +and constructor_arguments = + | Cstr_tuple of core_type list + | Cstr_record of label_declaration list + +and type_extension = + { + tyext_path: Path.t; + tyext_txt: Longident.t loc; + tyext_params: (core_type * variance) list; + tyext_constructors: extension_constructor list; + tyext_private: private_flag; + tyext_attributes: attributes; + } + +and extension_constructor = + { + ext_id: Ident.t; + ext_name: string loc; + ext_type : Types.extension_constructor; + ext_kind : extension_constructor_kind; + ext_loc : Location.t; + ext_attributes: attributes; + } + +and extension_constructor_kind = + Text_decl of constructor_arguments * core_type option + | Text_rebind of Path.t * Longident.t loc + +and class_type = + { + cltyp_desc: class_type_desc; + cltyp_type: Types.class_type; + cltyp_env: Env.t; + cltyp_loc: Location.t; + cltyp_attributes: attributes; + } + +and class_type_desc = + Tcty_constr of Path.t * Longident.t loc * core_type list + | Tcty_signature of class_signature + | Tcty_arrow of arg_label * core_type * class_type + | Tcty_open of override_flag * Path.t * Longident.t loc * Env.t * class_type + +and class_signature = { + csig_self : core_type; + csig_fields : class_type_field list; + csig_type : Types.class_signature; + } + +and class_type_field = { + ctf_desc: class_type_field_desc; + ctf_loc: Location.t; + ctf_attributes: attributes; + } + +and class_type_field_desc = + | Tctf_inherit of class_type + | Tctf_val of (string * mutable_flag * virtual_flag * core_type) + | Tctf_method of (string * private_flag * virtual_flag * core_type) + | Tctf_constraint of (core_type * core_type) + | Tctf_attribute of attribute + + +and class_description = + class_type class_infos + +and class_type_declaration = + class_type class_infos + +and 'a class_infos = + { ci_virt: virtual_flag; + ci_params: (core_type * variance) list; + ci_id_name : string loc; + ci_id_class: Ident.t; + ci_id_class_type : Ident.t; + ci_id_object : Ident.t; + ci_id_typehash : Ident.t; + ci_expr: 'a; + ci_decl: Types.class_declaration; + ci_type_decl : Types.class_type_declaration; + ci_loc: Location.t; + ci_attributes: attributes; + } + +(* Auxiliary functions over the a.s.t. *) + +val iter_pattern_desc: (pattern -> unit) -> pattern_desc -> unit +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 + +val mknoloc: 'a -> 'a Asttypes.loc +val mkloc: 'a -> Location.t -> 'a Asttypes.loc + +val pat_bound_idents: pattern -> Ident.t list diff --git a/analysis/src/vendor/compiler-libs-406/typedtreeIter.ml b/analysis/src/vendor/compiler-libs-406/typedtreeIter.ml new file mode 100644 index 000000000..e674d200a --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/typedtreeIter.ml @@ -0,0 +1,600 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Thomas Gazagnaire (OCamlPro), Fabrice Le Fessant (INRIA Saclay) *) +(* *) +(* Copyright 2007 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. *) +(* *) +(**************************************************************************) + +(* +TODO: + - 2012/05/10: Follow camlp4 way of building map and iter using classes + and inheritance ? +*) + +open Asttypes +open Typedtree + +module type IteratorArgument = sig + + val enter_structure : structure -> unit + val enter_value_description : value_description -> unit + val enter_type_extension : type_extension -> unit + val enter_extension_constructor : extension_constructor -> unit + val enter_pattern : pattern -> unit + val enter_expression : expression -> unit + val enter_package_type : package_type -> unit + val enter_signature : signature -> unit + val enter_signature_item : signature_item -> unit + val enter_module_type_declaration : module_type_declaration -> unit + val enter_module_type : module_type -> unit + val enter_module_expr : module_expr -> unit + val enter_with_constraint : with_constraint -> unit + val enter_class_signature : class_signature -> 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_structure_item : structure_item -> unit + + + val leave_structure : structure -> unit + val leave_value_description : value_description -> unit + val leave_type_extension : type_extension -> unit + val leave_extension_constructor : extension_constructor -> unit + val leave_pattern : pattern -> unit + val leave_expression : expression -> unit + val leave_package_type : package_type -> unit + val leave_signature : signature -> unit + val leave_signature_item : signature_item -> unit + val leave_module_type_declaration : module_type_declaration -> unit + val leave_module_type : module_type -> unit + val leave_module_expr : module_expr -> unit + val leave_with_constraint : with_constraint -> unit + val leave_class_signature : class_signature -> 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_structure_item : structure_item -> unit + + val enter_bindings : rec_flag -> unit + val enter_binding : value_binding -> unit + val leave_binding : value_binding -> unit + val leave_bindings : rec_flag -> unit + + val enter_type_declarations : rec_flag -> unit + val enter_type_declaration : type_declaration -> unit + val leave_type_declaration : type_declaration -> unit + val leave_type_declarations : rec_flag -> unit + + end + +module MakeIterator(Iter : IteratorArgument) : sig + + val iter_structure : structure -> unit + val iter_signature : signature -> unit + val iter_structure_item : structure_item -> unit + val iter_signature_item : signature_item -> unit + val iter_expression : expression -> unit + val iter_module_type : module_type -> unit + val iter_pattern : pattern -> unit + + end = struct + + let may_iter f v = + match v with + None -> () + | Some x -> f x + + + let rec iter_structure str = + Iter.enter_structure str; + List.iter iter_structure_item str.str_items; + Iter.leave_structure str + + + and iter_binding vb = + Iter.enter_binding vb; + iter_pattern vb.vb_pat; + iter_expression vb.vb_expr; + Iter.leave_binding vb + + and iter_bindings rec_flag list = + Iter.enter_bindings rec_flag; + List.iter iter_binding list; + Iter.leave_bindings rec_flag + + and iter_case {c_lhs; c_guard; c_rhs} = + iter_pattern c_lhs; + may_iter iter_expression c_guard; + iter_expression c_rhs + + and iter_cases cases = + List.iter iter_case cases + + and iter_structure_item item = + Iter.enter_structure_item item; + begin + match item.str_desc with + Tstr_eval (exp, _attrs) -> iter_expression exp + | Tstr_value (rec_flag, list) -> + iter_bindings rec_flag list + | Tstr_primitive vd -> iter_value_description vd + | Tstr_type (rf, list) -> iter_type_declarations rf list + | Tstr_typext tyext -> iter_type_extension tyext + | Tstr_exception ext -> iter_extension_constructor ext + | Tstr_module x -> iter_module_binding x + | Tstr_recmodule list -> List.iter iter_module_binding list + | Tstr_modtype mtd -> iter_module_type_declaration mtd + | Tstr_open _ -> () + | Tstr_class () -> () + | Tstr_class_type list -> + List.iter + (fun (_, _, ct) -> iter_class_type_declaration ct) + list + | Tstr_include incl -> iter_module_expr incl.incl_mod + | Tstr_attribute _ -> + () + end; + Iter.leave_structure_item item + + and iter_module_binding x = + iter_module_expr x.mb_expr + + and iter_value_description v = + Iter.enter_value_description v; + iter_core_type v.val_desc; + Iter.leave_value_description v + + and iter_constructor_arguments = function + | Cstr_tuple l -> List.iter iter_core_type l + | Cstr_record l -> List.iter (fun ld -> iter_core_type ld.ld_type) l + + and iter_constructor_declaration cd = + iter_constructor_arguments cd.cd_args; + option iter_core_type cd.cd_res; + + and iter_type_parameter (ct, _v) = + iter_core_type ct + + and iter_type_declaration decl = + Iter.enter_type_declaration decl; + List.iter iter_type_parameter decl.typ_params; + List.iter (fun (ct1, ct2, _loc) -> + iter_core_type ct1; + iter_core_type ct2 + ) decl.typ_cstrs; + begin match decl.typ_kind with + Ttype_abstract -> () + | Ttype_variant list -> + List.iter iter_constructor_declaration list + | Ttype_record list -> + List.iter + (fun ld -> + iter_core_type ld.ld_type + ) list + | Ttype_open -> () + end; + option iter_core_type decl.typ_manifest; + Iter.leave_type_declaration decl + + and iter_type_declarations rec_flag decls = + Iter.enter_type_declarations rec_flag; + List.iter iter_type_declaration decls; + Iter.leave_type_declarations rec_flag + + and iter_extension_constructor ext = + Iter.enter_extension_constructor ext; + begin match ext.ext_kind with + Text_decl(args, ret) -> + iter_constructor_arguments args; + option iter_core_type ret + | Text_rebind _ -> () + end; + Iter.leave_extension_constructor ext; + + and iter_type_extension tyext = + Iter.enter_type_extension tyext; + List.iter iter_type_parameter tyext.tyext_params; + List.iter iter_extension_constructor tyext.tyext_constructors; + Iter.leave_type_extension tyext + + and iter_pattern pat = + Iter.enter_pattern pat; + List.iter (fun (cstr, _, _attrs) -> match cstr with + | Tpat_type _ -> () + | Tpat_unpack -> () + | Tpat_open _ -> () + | Tpat_constraint ct -> iter_core_type ct) pat.pat_extra; + begin + match pat.pat_desc with + Tpat_any -> () + | Tpat_var _ -> () + | Tpat_alias (pat1, _, _) -> iter_pattern pat1 + | Tpat_constant _ -> () + | Tpat_tuple list -> + List.iter iter_pattern list + | Tpat_construct (_, _, args) -> + List.iter iter_pattern args + | Tpat_variant (_, pato, _) -> + begin match pato with + None -> () + | Some pat -> iter_pattern pat + end + | Tpat_record (list, _closed) -> + List.iter (fun (_, _, pat) -> iter_pattern pat) list + | Tpat_array list -> List.iter iter_pattern list + | Tpat_or (p1, p2, _) -> iter_pattern p1; iter_pattern p2 + | Tpat_lazy p -> iter_pattern p + end; + Iter.leave_pattern pat + + and option f x = match x with None -> () | Some e -> f e + + and iter_expression exp = + Iter.enter_expression exp; + List.iter (function (cstr, _, _attrs) -> + match cstr with + Texp_constraint ct -> + iter_core_type ct + | Texp_coerce (cty1, cty2) -> + option iter_core_type cty1; iter_core_type cty2 + | Texp_open _ -> () + | Texp_poly cto -> option iter_core_type cto + | Texp_newtype _ -> ()) + exp.exp_extra; + begin + match exp.exp_desc with + Texp_ident _ -> () + | Texp_constant _ -> () + | Texp_let (rec_flag, list, exp) -> + iter_bindings rec_flag list; + iter_expression exp + | Texp_function { cases; _ } -> + iter_cases cases + | Texp_apply (exp, list) -> + iter_expression exp; + List.iter (fun (_label, expo) -> + match expo with + None -> () + | Some exp -> iter_expression exp + ) list + | Texp_match (exp, list1, list2, _) -> + iter_expression exp; + iter_cases list1; + iter_cases list2; + | Texp_try (exp, list) -> + iter_expression exp; + iter_cases list + | Texp_tuple list -> + List.iter iter_expression list + | Texp_construct (_, _, args) -> + List.iter iter_expression args + | Texp_variant (_label, expo) -> + begin match expo with + None -> () + | Some exp -> iter_expression exp + end + | Texp_record { fields; extended_expression; _ } -> + Array.iter (function + | _, Kept _ -> () + | _, Overridden (_, exp) -> iter_expression exp) + fields; + begin match extended_expression with + None -> () + | Some exp -> iter_expression exp + end + | Texp_field (exp, _, _label) -> + iter_expression exp + | Texp_setfield (exp1, _, _label, exp2) -> + iter_expression exp1; + iter_expression exp2 + | Texp_array list -> + List.iter iter_expression list + | Texp_ifthenelse (exp1, exp2, expo) -> + iter_expression exp1; + iter_expression exp2; + begin match expo with + None -> () + | Some exp -> iter_expression exp + end + | Texp_sequence (exp1, exp2) -> + iter_expression exp1; + iter_expression exp2 + | Texp_while (exp1, exp2) -> + iter_expression exp1; + iter_expression exp2 + | Texp_for (_id, _, exp1, exp2, _dir, exp3) -> + iter_expression exp1; + iter_expression exp2; + iter_expression exp3 + | Texp_send (exp, _meth, expo) -> + iter_expression exp; + begin + match expo with + None -> () + | Some exp -> iter_expression exp + end + | Texp_new _ + | Texp_instvar _ + | Texp_setinstvar _ + | Texp_override _ -> () + | Texp_letmodule (_id, _, mexpr, exp) -> + iter_module_expr mexpr; + iter_expression exp + | Texp_letexception (cd, exp) -> + iter_extension_constructor cd; + iter_expression exp + | Texp_assert exp -> iter_expression exp + | Texp_lazy exp -> iter_expression exp + | Texp_object () -> + () + | Texp_pack (mexpr) -> + iter_module_expr mexpr + | Texp_unreachable -> + () + | Texp_extension_constructor _ -> + () + end; + Iter.leave_expression exp; + + and iter_package_type pack = + Iter.enter_package_type pack; + List.iter (fun (_s, ct) -> iter_core_type ct) pack.pack_fields; + Iter.leave_package_type pack; + + and iter_signature sg = + Iter.enter_signature sg; + List.iter iter_signature_item sg.sig_items; + Iter.leave_signature sg; + + and iter_signature_item item = + Iter.enter_signature_item item; + begin + match item.sig_desc with + Tsig_value vd -> + iter_value_description vd + | Tsig_type (rf, list) -> + iter_type_declarations rf list + | Tsig_exception ext -> + iter_extension_constructor ext + | Tsig_typext tyext -> + iter_type_extension tyext + | Tsig_module md -> + iter_module_type md.md_type + | Tsig_recmodule list -> + List.iter (fun md -> iter_module_type md.md_type) list + | Tsig_modtype mtd -> + 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_type list -> + List.iter iter_class_type_declaration list + | Tsig_attribute _ -> () + end; + Iter.leave_signature_item item; + + and iter_module_type_declaration mtd = + Iter.enter_module_type_declaration mtd; + begin + match mtd.mtd_type with + | None -> () + | Some mtype -> iter_module_type mtype + end; + Iter.leave_module_type_declaration mtd + + + 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; + List.iter iter_type_parameter cd.ci_params; + iter_class_type cd.ci_expr; + Iter.leave_class_type_declaration cd; + + and iter_module_type mty = + Iter.enter_module_type mty; + begin + match mty.mty_desc with + Tmty_ident _ -> () + | Tmty_alias _ -> () + | Tmty_signature sg -> iter_signature sg + | Tmty_functor (_, _, mtype1, mtype2) -> + Misc.may iter_module_type mtype1; iter_module_type mtype2 + | Tmty_with (mtype, list) -> + iter_module_type mtype; + List.iter (fun (_path, _, withc) -> + iter_with_constraint withc + ) list + | Tmty_typeof mexpr -> + iter_module_expr mexpr + end; + Iter.leave_module_type mty; + + and iter_with_constraint cstr = + Iter.enter_with_constraint cstr; + begin + match cstr with + Twith_type decl -> iter_type_declaration decl + | Twith_module _ -> () + | Twith_typesubst decl -> iter_type_declaration decl + | Twith_modsubst _ -> () + end; + Iter.leave_with_constraint cstr; + + and iter_module_expr mexpr = + Iter.enter_module_expr mexpr; + begin + match mexpr.mod_desc with + Tmod_ident _ -> () + | Tmod_structure st -> iter_structure st + | Tmod_functor (_, _, mtype, mexpr) -> + Misc.may iter_module_type mtype; + iter_module_expr mexpr + | Tmod_apply (mexp1, mexp2, _) -> + iter_module_expr mexp1; + iter_module_expr mexp2 + | Tmod_constraint (mexpr, _, Tmodtype_implicit, _ ) -> + iter_module_expr mexpr + | Tmod_constraint (mexpr, _, Tmodtype_explicit mtype, _) -> + iter_module_expr mexpr; + iter_module_type mtype + | Tmod_unpack (exp, _mty) -> + iter_expression exp +(* iter_module_type mty *) + end; + Iter.leave_module_expr mexpr; + + + and iter_class_type ct = + Iter.enter_class_type ct; + begin + match ct.cltyp_desc with + Tcty_signature csg -> iter_class_signature csg + | Tcty_constr (_path, _, list) -> + List.iter iter_core_type list + | Tcty_arrow (_label, ct, cl) -> + iter_core_type ct; + iter_class_type cl + | Tcty_open (_, _, _, _, e) -> + iter_class_type e + end; + Iter.leave_class_type ct; + + and iter_class_signature cs = + Iter.enter_class_signature cs; + iter_core_type cs.csig_self; + List.iter iter_class_type_field cs.csig_fields; + Iter.leave_class_signature cs + + + and iter_class_type_field ctf = + Iter.enter_class_type_field ctf; + begin + match ctf.ctf_desc with + Tctf_inherit ct -> iter_class_type ct + | Tctf_val (_s, _mut, _virt, ct) -> + iter_core_type ct + | Tctf_method (_s, _priv, _virt, ct) -> + iter_core_type ct + | Tctf_constraint (ct1, ct2) -> + iter_core_type ct1; + iter_core_type ct2 + | Tctf_attribute _ -> () + end; + Iter.leave_class_type_field ctf + + and iter_core_type ct = + Iter.enter_core_type ct; + begin + match ct.ctyp_desc with + Ttyp_any -> () + | Ttyp_var _ -> () + | Ttyp_arrow (_label, ct1, ct2) -> + iter_core_type ct1; + iter_core_type ct2 + | Ttyp_tuple list -> List.iter iter_core_type list + | Ttyp_constr (_path, _, list) -> + List.iter iter_core_type list + | Ttyp_object (list, _o) -> + List.iter iter_object_field list + | Ttyp_class (_path, _, list) -> + List.iter iter_core_type list + | Ttyp_alias (ct, _s) -> + iter_core_type ct + | Ttyp_variant (list, _bool, _labels) -> + List.iter iter_row_field list + | Ttyp_poly (_list, ct) -> iter_core_type ct + | Ttyp_package pack -> iter_package_type pack + end; + Iter.leave_core_type ct + + and iter_row_field rf = + match rf with + Ttag (_label, _attrs, _bool, list) -> + List.iter iter_core_type list + | Tinherit ct -> iter_core_type ct + + and iter_object_field ofield = + match ofield with + OTtag (_, _, ct) | OTinherit ct -> iter_core_type ct + + end + +module DefaultIteratorArgument = struct + + let enter_structure _ = () + let enter_value_description _ = () + let enter_type_extension _ = () + let enter_extension_constructor _ = () + let enter_pattern _ = () + let enter_expression _ = () + let enter_package_type _ = () + let enter_signature _ = () + let enter_signature_item _ = () + let enter_module_type_declaration _ = () + let enter_module_type _ = () + let enter_module_expr _ = () + let enter_with_constraint _ = () + let enter_class_signature _ = () + + let enter_class_description _ = () + let enter_class_type_declaration _ = () + let enter_class_type _ = () + let enter_class_type_field _ = () + let enter_core_type _ = () + let enter_structure_item _ = () + + + let leave_structure _ = () + let leave_value_description _ = () + let leave_type_extension _ = () + let leave_extension_constructor _ = () + let leave_pattern _ = () + let leave_expression _ = () + let leave_package_type _ = () + let leave_signature _ = () + let leave_signature_item _ = () + let leave_module_type_declaration _ = () + let leave_module_type _ = () + let leave_module_expr _ = () + let leave_with_constraint _ = () + let leave_class_signature _ = () + + let leave_class_description _ = () + let leave_class_type_declaration _ = () + let leave_class_type _ = () + let leave_class_type_field _ = () + let leave_core_type _ = () + let leave_structure_item _ = () + + let enter_binding _ = () + let leave_binding _ = () + + let enter_bindings _ = () + let leave_bindings _ = () + + let enter_type_declaration _ = () + let leave_type_declaration _ = () + + let enter_type_declarations _ = () + let leave_type_declarations _ = () +end diff --git a/analysis/src/vendor/compiler-libs-406/typedtreeIter.mli b/analysis/src/vendor/compiler-libs-406/typedtreeIter.mli new file mode 100644 index 000000000..4d1afa633 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/typedtreeIter.mli @@ -0,0 +1,88 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Thomas Gazagnaire (OCamlPro), Fabrice Le Fessant (INRIA Saclay) *) +(* *) +(* Copyright 2007 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 Typedtree + + +module type IteratorArgument = sig + val enter_structure : structure -> unit + val enter_value_description : value_description -> unit + val enter_type_extension : type_extension -> unit + val enter_extension_constructor : extension_constructor -> unit + val enter_pattern : pattern -> unit + val enter_expression : expression -> unit + val enter_package_type : package_type -> unit + val enter_signature : signature -> unit + val enter_signature_item : signature_item -> unit + val enter_module_type_declaration : module_type_declaration -> unit + val enter_module_type : module_type -> unit + val enter_module_expr : module_expr -> unit + val enter_with_constraint : with_constraint -> unit + val enter_class_signature : class_signature -> 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_structure_item : structure_item -> unit + + + val leave_structure : structure -> unit + val leave_value_description : value_description -> unit + val leave_type_extension : type_extension -> unit + val leave_extension_constructor : extension_constructor -> unit + val leave_pattern : pattern -> unit + val leave_expression : expression -> unit + val leave_package_type : package_type -> unit + val leave_signature : signature -> unit + val leave_signature_item : signature_item -> unit + val leave_module_type_declaration : module_type_declaration -> unit + val leave_module_type : module_type -> unit + val leave_module_expr : module_expr -> unit + val leave_with_constraint : with_constraint -> unit + val leave_class_signature : class_signature -> 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_structure_item : structure_item -> unit + + val enter_bindings : rec_flag -> unit + val enter_binding : value_binding -> unit + val leave_binding : value_binding -> unit + val leave_bindings : rec_flag -> unit + + val enter_type_declarations : rec_flag -> unit + val enter_type_declaration : type_declaration -> unit + val leave_type_declaration : type_declaration -> unit + val leave_type_declarations : rec_flag -> unit + +end + +module MakeIterator : + functor (Iter : IteratorArgument) -> + sig + val iter_structure : structure -> unit + val iter_signature : signature -> unit + val iter_structure_item : structure_item -> unit + val iter_signature_item : signature_item -> unit + val iter_expression : expression -> unit + val iter_module_type : module_type -> unit + val iter_pattern : pattern -> unit + end + +module DefaultIteratorArgument : IteratorArgument diff --git a/analysis/src/vendor/compiler-libs-406/types.ml b/analysis/src/vendor/compiler-libs-406/types.ml new file mode 100644 index 000000000..9489b1215 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/types.ml @@ -0,0 +1,340 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(* Representation of types and declarations *) + +open Asttypes + +(* Type expressions for the core language *) + +type type_expr = + { mutable desc: type_desc; + mutable level: int; + id: int } + +and type_desc = + Tvar of string option + | Tarrow of arg_label * type_expr * type_expr * commutable + | Ttuple of type_expr list + | Tconstr of Path.t * type_expr list * abbrev_memo ref + | Tobject of type_expr * (Path.t * type_expr list) option ref + | Tfield of string * field_kind * type_expr * type_expr + | Tnil + | Tlink of type_expr + | Tsubst of type_expr (* for copying *) + | Tvariant of row_desc + | Tunivar of string option + | Tpoly of type_expr * type_expr list + | Tpackage of Path.t * Longident.t list * type_expr list + +and row_desc = + { row_fields: (label * row_field) list; + row_more: type_expr; + row_bound: unit; + row_closed: bool; + row_fixed: bool; + row_name: (Path.t * type_expr list) option } + +and row_field = + Rpresent of type_expr option + | Reither of bool * type_expr list * bool * row_field option ref + (* 1st true denotes a constant constructor *) + (* 2nd true denotes a tag in a pattern matching, and + is erased later *) + | Rabsent + +and abbrev_memo = + Mnil + | Mcons of private_flag * Path.t * type_expr * type_expr * abbrev_memo + | Mlink of abbrev_memo ref + +and field_kind = + Fvar of field_kind option ref + | Fpresent + | Fabsent + +and commutable = + Cok + | Cunknown + | Clink of commutable ref + +module TypeOps = struct + type t = type_expr + let compare t1 t2 = t1.id - t2.id + let hash t = t.id + let equal t1 t2 = t1 == t2 +end + +(* Maps of methods and instance variables *) + +module OrderedString = + struct type t = string let compare (x:t) y = compare x y end +module Meths = Map.Make(OrderedString) +module Vars = Meths + +(* Value descriptions *) + +type value_description = + { val_type: type_expr; (* Type of the value *) + val_kind: value_kind; + val_loc: Location.t; + val_attributes: Parsetree.attributes; + } + +and value_kind = + Val_reg (* Regular value *) + | Val_prim of Primitive.description (* Primitive *) + +(* Variance *) + +module Variance = struct + type t = int + type f = May_pos | May_neg | May_weak | Inj | Pos | Neg | Inv + let single = function + | May_pos -> 1 + | May_neg -> 2 + | May_weak -> 4 + | Inj -> 8 + | Pos -> 16 + | Neg -> 32 + | Inv -> 64 + let union v1 v2 = v1 lor v2 + let inter v1 v2 = v1 land v2 + let subset v1 v2 = (v1 land v2 = v1) + let set x b v = + if b then v lor single x else v land (lnot (single x)) + let mem x = subset (single x) + let null = 0 + let may_inv = 7 + let full = 127 + let covariant = single May_pos lor single Pos lor single Inj + let swap f1 f2 v = + let v' = set f1 (mem f2 v) v in set f2 (mem f1 v) v' + let conjugate v = swap May_pos May_neg (swap Pos Neg v) + let get_upper v = (mem May_pos v, mem May_neg v) + let get_lower v = (mem Pos v, mem Neg v, mem Inv v, mem Inj v) +end + +(* Type definitions *) + +type type_declaration = + { type_params: type_expr list; + type_arity: int; + type_kind: type_kind; + type_private: private_flag; + type_manifest: type_expr option; + type_variance: Variance.t list; + type_newtype_level: (int * int) option; + type_loc: Location.t; + type_attributes: Parsetree.attributes; + type_immediate: bool; + type_unboxed: unboxed_status; + } + +and type_kind = + Type_abstract + | Type_record of label_declaration list * record_representation + | Type_variant of constructor_declaration list + | Type_open + +and record_representation = + Record_regular (* All fields are boxed / tagged *) + | Record_float (* All fields are floats *) + | Record_unboxed of bool (* Unboxed single-field record, inlined or not *) + | Record_inlined of {tag : int; name : string; num_nonconsts : int} (* Inlined record *) + | Record_extension (* Inlined record under extension *) + +and label_declaration = + { + ld_id: Ident.t; + ld_mutable: mutable_flag; + ld_type: type_expr; + ld_loc: Location.t; + ld_attributes: Parsetree.attributes; + } + +and constructor_declaration = + { + cd_id: Ident.t; + cd_args: constructor_arguments; + cd_res: type_expr option; + cd_loc: Location.t; + cd_attributes: Parsetree.attributes; + } + +and constructor_arguments = + | Cstr_tuple of type_expr list + | Cstr_record of label_declaration list + +and unboxed_status = + { + unboxed: bool; + default: bool; (* False if the unboxed field was set from an attribute. *) + } + +let unboxed_false_default_false = {unboxed = false; default = false} +let unboxed_false_default_true = {unboxed = false; default = true} +let unboxed_true_default_false = {unboxed = true; default = false} +let unboxed_true_default_true = {unboxed = true; default = true} + +type extension_constructor = + { ext_type_path: Path.t; + ext_type_params: type_expr list; + ext_args: constructor_arguments; + ext_ret_type: type_expr option; + ext_private: private_flag; + ext_loc: Location.t; + ext_attributes: Parsetree.attributes; } + +and type_transparence = + Type_public (* unrestricted expansion *) + | Type_new (* "new" type *) + | Type_private (* private type *) + +(* Type expressions for the class language *) + +module Concr = Set.Make(OrderedString) + +type class_type = + Cty_constr of Path.t * type_expr list * class_type + | Cty_signature of class_signature + | Cty_arrow of arg_label * type_expr * class_type + +and class_signature = + { csig_self: type_expr; + csig_vars: + (Asttypes.mutable_flag * Asttypes.virtual_flag * type_expr) Vars.t; + csig_concr: Concr.t; + csig_inher: (Path.t * type_expr list) list } + +type class_declaration = + { cty_params: type_expr list; + mutable cty_type: class_type; + cty_path: Path.t; + cty_new: type_expr option; + cty_variance: Variance.t list; + cty_loc: Location.t; + cty_attributes: Parsetree.attributes; + } + +type class_type_declaration = + { clty_params: type_expr list; + clty_type: class_type; + clty_path: Path.t; + clty_variance: Variance.t list; + clty_loc: Location.t; + clty_attributes: Parsetree.attributes; + } + +(* Type expressions for the module language *) + +type module_type = + Mty_ident of Path.t + | Mty_signature of signature + | Mty_functor of Ident.t * module_type option * module_type + | Mty_alias of alias_presence * Path.t + +and alias_presence = + | Mta_present + | Mta_absent + +and signature = signature_item list + +and signature_item = + Sig_value of Ident.t * value_description + | Sig_type of Ident.t * type_declaration * rec_status + | 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_type of Ident.t * class_type_declaration * rec_status + +and module_declaration = + { + md_type: module_type; + md_attributes: Parsetree.attributes; + md_loc: Location.t; + } + +and modtype_declaration = + { + mtd_type: module_type option; (* Note: abstract *) + mtd_attributes: Parsetree.attributes; + mtd_loc: Location.t; + } + +and rec_status = + Trec_not (* first in a nonrecursive group *) + | Trec_first (* first in a recursive group *) + | Trec_next (* not first in a recursive/nonrecursive group *) + +and ext_status = + Text_first (* first constructor of an extension *) + | Text_next (* not first constructor of an extension *) + | Text_exception (* an exception *) + + +(* Constructor and record label descriptions inserted held in typing + environments *) + +type constructor_description = + { cstr_name: string; (* Constructor name *) + cstr_res: type_expr; (* Type of the result *) + cstr_existentials: type_expr list; (* list of existentials *) + cstr_args: type_expr list; (* Type of the arguments *) + cstr_arity: int; (* Number of arguments *) + cstr_tag: constructor_tag; (* Tag for heap blocks *) + cstr_consts: int; (* Number of constant constructors *) + cstr_nonconsts: int; (* Number of non-const constructors *) + cstr_normal: int; (* Number of non generalized constrs *) + cstr_generalized: bool; (* Constrained return type? *) + cstr_private: private_flag; (* Read-only constructor? *) + cstr_loc: Location.t; + cstr_attributes: Parsetree.attributes; + cstr_inlined: type_declaration option; + } + +and constructor_tag = + Cstr_constant of int (* Constant constructor (an int) *) + | Cstr_block of int (* Regular constructor (a block) *) + | Cstr_unboxed (* Constructor of an unboxed type *) + | Cstr_extension of Path.t * bool (* Extension constructor + true if a constant false if a block*) + +let equal_tag t1 t2 = + match (t1, t2) with + | Cstr_constant i1, Cstr_constant i2 -> i2 = i1 + | Cstr_block i1, Cstr_block i2 -> i2 = i1 + | Cstr_unboxed, Cstr_unboxed -> true + | Cstr_extension (path1, b1), Cstr_extension (path2, b2) -> + Path.same path1 path2 && b1 = b2 + | (Cstr_constant _|Cstr_block _|Cstr_unboxed|Cstr_extension _), _ -> false + +let may_equal_constr c1 c2 = match c1.cstr_tag,c2.cstr_tag with +| Cstr_extension _,Cstr_extension _ -> c1.cstr_arity = c2.cstr_arity +| tag1,tag2 -> equal_tag tag1 tag2 + +type label_description = + { lbl_name: string; (* Short name *) + lbl_res: type_expr; (* Type of the result *) + lbl_arg: type_expr; (* Type of the argument *) + lbl_mut: mutable_flag; (* Is this a mutable field? *) + lbl_pos: int; (* Position in block *) + lbl_all: label_description array; (* All the labels in this type *) + lbl_repres: record_representation; (* Representation for this record *) + lbl_private: private_flag; (* Read-only field? *) + lbl_loc: Location.t; + lbl_attributes: Parsetree.attributes; + } diff --git a/analysis/src/vendor/compiler-libs-406/types.mli b/analysis/src/vendor/compiler-libs-406/types.mli new file mode 100644 index 000000000..825b94586 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/types.mli @@ -0,0 +1,486 @@ +(**************************************************************************) +(* *) +(* 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. *) +(* *) +(**************************************************************************) + +(** {0 Representation of types and declarations} *) + +(** [Types] defines the representation of types and declarations (that is, the + content of module signatures). + + CMI files are made of marshalled types. +*) + +(** Asttypes exposes basic definitions shared both by Parsetree and Types. *) +open Asttypes + +(** Type expressions for the core language. + + The [type_desc] variant defines all the possible type expressions one can + find in OCaml. [type_expr] wraps this with some annotations. + + The [level] field tracks the level of polymorphism associated to a type, + guiding the generalization algorithm. + Put shortly, when referring to a type in a given environment, both the type + and the environment have a level. If the type has an higher level, then it + can be considered fully polymorphic (type variables will be printed as + ['a]), otherwise it'll be weakly polymorphic, or non generalized (type + variables printed as ['_a]). + See [http://okmij.org/ftp/ML/generalization.html] for more information. + + Note about [type_declaration]: one should not make the confusion between + [type_expr] and [type_declaration]. + + [type_declaration] refers specifically to the [type] construct in OCaml + language, where you create and name a new type or type alias. + + [type_expr] is used when you refer to existing types, e.g. when annotating + the expected type of a value. + + Also, as the type system of OCaml is generative, a [type_declaration] can + have the side-effect of introducing a new type constructor, different from + all other known types. + Whereas [type_expr] is a pure construct which allows referring to existing + types. + + Note on mutability: TBD. + *) +type type_expr = + { mutable desc: type_desc; + mutable level: int; + id: int } + +and type_desc = + | Tvar of string option + (** [Tvar (Some "a")] ==> ['a] or ['_a] + [Tvar None] ==> [_] *) + + | Tarrow of arg_label * type_expr * type_expr * commutable + (** [Tarrow (Nolabel, e1, e2, c)] ==> [e1 -> e2] + [Tarrow (Labelled "l", e1, e2, c)] ==> [l:e1 -> e2] + [Tarrow (Optional "l", e1, e2, c)] ==> [?l:e1 -> e2] + + See [commutable] for the last argument. *) + + | Ttuple of type_expr list + (** [Ttuple [t1;...;tn]] ==> [(t1 * ... * tn)] *) + + | Tconstr of Path.t * type_expr list * abbrev_memo ref + (** [Tconstr (`A.B.t', [t1;...;tn], _)] ==> [(t1,...,tn) A.B.t] + The last parameter keep tracks of known expansions, see [abbrev_memo]. *) + + | Tobject of type_expr * (Path.t * type_expr list) option ref + (** [Tobject (`f1:t1;...;fn: tn', `None')] ==> [< f1: t1; ...; fn: tn >] + f1, fn are represented as a linked list of types using Tfield and Tnil + constructors. + + [Tobject (_, `Some (`A.ct', [t1;...;tn]')] ==> [(t1, ..., tn) A.ct]. + where A.ct is the type of some class. + + There are also special cases for so-called "class-types", cf. [Typeclass] + and [Ctype.set_object_name]: + + [Tobject (Tfield(_,_,...(Tfield(_,_,rv)...), + Some(`A.#ct`, [rv;t1;...;tn])] + ==> [(t1, ..., tn) #A.ct] + [Tobject (_, Some(`A.#ct`, [Tnil;t1;...;tn])] ==> [(t1, ..., tn) A.ct] + + where [rv] is the hidden row variable. + *) + + | Tfield of string * field_kind * type_expr * type_expr + (** [Tfield ("foo", Fpresent, t, ts)] ==> [<...; foo : t; ts>] *) + + | Tnil + (** [Tnil] ==> [<...; >] *) + + | Tlink of type_expr + (** Indirection used by unification engine. *) + + | Tsubst of type_expr (* for copying *) + (** [Tsubst] is used temporarily to store information in low-level + functions manipulating representation of types, such as + instantiation or copy. + This constructor should not appear outside of these cases. *) + + | Tvariant of row_desc + (** Representation of polymorphic variants, see [row_desc]. *) + + | Tunivar of string option + (** Occurrence of a type variable introduced by a + forall quantifier / [Tpoly]. *) + + | Tpoly of type_expr * type_expr list + (** [Tpoly (ty,tyl)] ==> ['a1... 'an. ty], + where 'a1 ... 'an are names given to types in tyl + and occurrences of those types in ty. *) + + | Tpackage of Path.t * Longident.t list * type_expr list + (** Type of a first-class module (a.k.a package). *) + +(** [ `X | `Y ] (row_closed = true) + [< `X | `Y ] (row_closed = true) + [> `X | `Y ] (row_closed = false) + [< `X | `Y > `X ] (row_closed = true) + + type t = [> `X ] as 'a (row_more = Tvar a) + type t = private [> `X ] (row_more = Tconstr (t#row, [], ref Mnil) + + And for: + + let f = function `X -> `X -> | `Y -> `X + + the type of "f" will be a [Tarrow] whose lhs will (basically) be: + + Tvariant { row_fields = [("X", _)]; + row_more = + Tvariant { row_fields = [("Y", _)]; + row_more = + Tvariant { row_fields = []; + row_more = _; + _ }; + _ }; + _ + } + +*) +and row_desc = + { row_fields: (label * row_field) list; + row_more: type_expr; + row_bound: unit; (* kept for compatibility *) + row_closed: bool; + row_fixed: bool; + row_name: (Path.t * type_expr list) option } + +and row_field = + Rpresent of type_expr option + | Reither of bool * type_expr list * bool * row_field option ref + (* 1st true denotes a constant constructor *) + (* 2nd true denotes a tag in a pattern matching, and + is erased later *) + | Rabsent + +(** [abbrev_memo] allows one to keep track of different expansions of a type + alias. This is done for performance purposes. + + For instance, when defining [type 'a pair = 'a * 'a], when one refers to an + ['a pair], it is just a shortcut for the ['a * 'a] type. + This expansion will be stored in the [abbrev_memo] of the corresponding + [Tconstr] node. + + In practice, [abbrev_memo] behaves like list of expansions with a mutable + tail. + + Note on marshalling: [abbrev_memo] must not appear in saved types. + [Btype], with [cleanup_abbrev] and [memo], takes care of tracking and + removing abbreviations. +*) +and abbrev_memo = + | Mnil (** No known abbreviation *) + + | Mcons of private_flag * Path.t * type_expr * type_expr * abbrev_memo + (** Found one abbreviation. + A valid abbreviation should be at least as visible and reachable by the + same path. + The first expression is the abbreviation and the second the expansion. *) + + | Mlink of abbrev_memo ref + (** Abbreviations can be found after this indirection *) + +and field_kind = + Fvar of field_kind option ref + | Fpresent + | Fabsent + +(** [commutable] is a flag appended to every arrow type. + + When typing an application, if the type of the functional is + known, its type is instantiated with [Cok] arrows, otherwise as + [Clink (ref Cunknown)]. + + When the type is not known, the application will be used to infer + the actual type. This is fragile in presence of labels where + there is no principal type. + + Two incompatible applications relying on [Cunknown] arrows will + trigger an error. + + let f g = + g ~a:() ~b:(); + g ~b:() ~a:(); + + Error: This function is applied to arguments + in an order different from other calls. + This is only allowed when the real type is known. +*) +and commutable = + Cok + | Cunknown + | Clink of commutable ref + +module TypeOps : sig + type t = type_expr + val compare : t -> t -> int + val equal : t -> t -> bool + val hash : t -> int +end + +(* Maps of methods and instance variables *) + +module Meths : Map.S with type key = string +module Vars : Map.S with type key = string + +(* Value descriptions *) + +type value_description = + { val_type: type_expr; (* Type of the value *) + val_kind: value_kind; + val_loc: Location.t; + val_attributes: Parsetree.attributes; + } + +and value_kind = + Val_reg (* Regular value *) + | Val_prim of Primitive.description (* Primitive *) + +(* Variance *) + +module Variance : sig + type t + type f = May_pos | May_neg | May_weak | Inj | Pos | Neg | Inv + val null : t (* no occurrence *) + val full : t (* strictly invariant *) + val covariant : t (* strictly covariant *) + val may_inv : t (* maybe invariant *) + val union : t -> t -> t + val inter : t -> t -> t + val subset : t -> t -> bool + val set : f -> bool -> t -> t + val mem : f -> t -> bool + val conjugate : t -> t (* exchange positive and negative *) + val get_upper : t -> bool * bool (* may_pos, may_neg *) + val get_lower : t -> bool * bool * bool * bool (* pos, neg, inv, inj *) +end + +(* Type definitions *) + +type type_declaration = + { type_params: type_expr list; + type_arity: int; + type_kind: type_kind; + type_private: private_flag; + type_manifest: type_expr option; + type_variance: Variance.t list; + (* covariant, contravariant, weakly contravariant, injective *) + type_newtype_level: (int * int) option; + (* definition level * expansion level *) + type_loc: Location.t; + type_attributes: Parsetree.attributes; + type_immediate: bool; (* true iff type should not be a pointer *) + type_unboxed: unboxed_status; + } + +and type_kind = + Type_abstract + | Type_record of label_declaration list * record_representation + | Type_variant of constructor_declaration list + | Type_open + +and record_representation = + Record_regular (* All fields are boxed / tagged *) + | Record_float (* All fields are floats *) + | Record_unboxed of bool (* Unboxed single-field record, inlined or not *) + | Record_inlined of { tag : int ; name : string; num_nonconsts : int} (* Inlined record *) + | Record_extension (* Inlined record under extension *) + +and label_declaration = + { + ld_id: Ident.t; + ld_mutable: mutable_flag; + ld_type: type_expr; + ld_loc: Location.t; + ld_attributes: Parsetree.attributes; + } + +and constructor_declaration = + { + cd_id: Ident.t; + cd_args: constructor_arguments; + cd_res: type_expr option; + cd_loc: Location.t; + cd_attributes: Parsetree.attributes; + } + +and constructor_arguments = + | Cstr_tuple of type_expr list + | Cstr_record of label_declaration list + +and unboxed_status = private + (* This type must be private in order to ensure perfect sharing of the + four possible values. Otherwise, ocamlc.byte and ocamlc.opt produce + different executables. *) + { + unboxed: bool; + default: bool; (* True for unannotated unboxable types. *) + } + +val unboxed_false_default_false : unboxed_status +val unboxed_false_default_true : unboxed_status +val unboxed_true_default_false : unboxed_status +val unboxed_true_default_true : unboxed_status + +type extension_constructor = + { + ext_type_path: Path.t; + ext_type_params: type_expr list; + ext_args: constructor_arguments; + ext_ret_type: type_expr option; + ext_private: private_flag; + ext_loc: Location.t; + ext_attributes: Parsetree.attributes; + } + +and type_transparence = + Type_public (* unrestricted expansion *) + | Type_new (* "new" type *) + | Type_private (* private type *) + +(* Type expressions for the class language *) + +module Concr : Set.S with type elt = string + +type class_type = + Cty_constr of Path.t * type_expr list * class_type + | Cty_signature of class_signature + | Cty_arrow of arg_label * type_expr * class_type + +and class_signature = + { csig_self: type_expr; + csig_vars: + (Asttypes.mutable_flag * Asttypes.virtual_flag * type_expr) Vars.t; + csig_concr: Concr.t; + csig_inher: (Path.t * type_expr list) list } + +type class_declaration = + { cty_params: type_expr list; + mutable cty_type: class_type; + cty_path: Path.t; + cty_new: type_expr option; + cty_variance: Variance.t list; + cty_loc: Location.t; + cty_attributes: Parsetree.attributes; + } + +type class_type_declaration = + { clty_params: type_expr list; + clty_type: class_type; + clty_path: Path.t; + clty_variance: Variance.t list; + clty_loc: Location.t; + clty_attributes: Parsetree.attributes; + } + +(* Type expressions for the module language *) + +type module_type = + Mty_ident of Path.t + | Mty_signature of signature + | Mty_functor of Ident.t * module_type option * module_type + | Mty_alias of alias_presence * Path.t + +and alias_presence = + | Mta_present + | Mta_absent + +and signature = signature_item list + +and signature_item = + Sig_value of Ident.t * value_description + | Sig_type of Ident.t * type_declaration * rec_status + | 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_type of Ident.t * class_type_declaration * rec_status + +and module_declaration = + { + md_type: module_type; + md_attributes: Parsetree.attributes; + md_loc: Location.t; + } + +and modtype_declaration = + { + mtd_type: module_type option; (* None: abstract *) + mtd_attributes: Parsetree.attributes; + mtd_loc: Location.t; + } + +and rec_status = + Trec_not (* first in a nonrecursive group *) + | Trec_first (* first in a recursive group *) + | Trec_next (* not first in a recursive/nonrecursive group *) + +and ext_status = + Text_first (* first constructor in an extension *) + | Text_next (* not first constructor in an extension *) + | Text_exception + + +(* Constructor and record label descriptions inserted held in typing + environments *) + +type constructor_description = + { cstr_name: string; (* Constructor name *) + cstr_res: type_expr; (* Type of the result *) + cstr_existentials: type_expr list; (* list of existentials *) + cstr_args: type_expr list; (* Type of the arguments *) + cstr_arity: int; (* Number of arguments *) + cstr_tag: constructor_tag; (* Tag for heap blocks *) + cstr_consts: int; (* Number of constant constructors *) + cstr_nonconsts: int; (* Number of non-const constructors *) + cstr_normal: int; (* Number of non generalized constrs *) + cstr_generalized: bool; (* Constrained return type? *) + cstr_private: private_flag; (* Read-only constructor? *) + cstr_loc: Location.t; + cstr_attributes: Parsetree.attributes; + cstr_inlined: type_declaration option; + } + +and constructor_tag = + Cstr_constant of int (* Constant constructor (an int) *) + | Cstr_block of int (* Regular constructor (a block) *) + | Cstr_unboxed (* Constructor of an unboxed type *) + | Cstr_extension of Path.t * bool (* Extension constructor + true if a constant false if a block*) + +(* Constructors are the same *) +val equal_tag : constructor_tag -> constructor_tag -> bool + +(* Constructors may be the same, given potential rebinding *) +val may_equal_constr : + constructor_description -> constructor_description -> bool + +type label_description = + { lbl_name: string; (* Short name *) + lbl_res: type_expr; (* Type of the result *) + lbl_arg: type_expr; (* Type of the argument *) + lbl_mut: mutable_flag; (* Is this a mutable field? *) + lbl_pos: int; (* Position in block *) + lbl_all: label_description array; (* All the labels in this type *) + lbl_repres: record_representation; (* Representation for this record *) + lbl_private: private_flag; (* Read-only field? *) + lbl_loc: Location.t; + lbl_attributes: Parsetree.attributes; + } diff --git a/analysis/src/vendor/compiler-libs-406/warnings.ml b/analysis/src/vendor/compiler-libs-406/warnings.ml new file mode 100644 index 000000000..ffab86062 --- /dev/null +++ b/analysis/src/vendor/compiler-libs-406/warnings.ml @@ -0,0 +1,706 @@ +(**************************************************************************) +(* *) +(* 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 *) + | 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 *) + | 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 *) + | Assignment_to_non_mutable_value (* 59 *) + | Unused_module of string (* 60 *) + | Unboxable_type_in_prim_decl of string (* 61 *) + | 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 + | 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 + | 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 + | Fragile_literal_pattern -> 52 + | Misplaced_attribute _ -> 53 + | Duplicated_attribute _ -> 54 + | Inlining_impossible _ -> 55 + | Unreachable_case -> 56 + | Ambiguous_pattern _ -> 57 + | Assignment_to_non_mutable_value -> 59 + | Unused_module _ -> 60 + | Unboxable_type_in_prim_decl _ -> 61 + | 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 = 109 +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 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} + + + +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,\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 "" -> + "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 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 -> + 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." + ] + | 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 -> + begin match !Config.syntax_kind with + | `ml -> + "all the fields are explicitly listed in this record:\n\ + the 'with' clause is useless." + | `reason | `rescript -> + "All the fields are already explicitly listed in this record. You can remove the `...` spread." + end + | 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_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" + | 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 + | 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." + + | 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 w with + | Name_out_of_scope _ (* 40 *) + | Disambiguated_name _ (* 42 *) + | Unboxable_type_in_prim_decl _ (* 61 *) -> `Inactive + (* TODO: we could simplify the code even more *) + | _ -> + 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 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"; + + 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" + ] +;; + +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 +;; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c9ddf5fab..be0c4a9bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "devDependencies": { "@types/node": "^14.14.41", "@types/vscode": "1.55.0", - "reanalyze": "^2.16.0", "typescript": "^4.2.4" }, "engines": { @@ -30,16 +29,6 @@ "integrity": "sha512-49hysH7jneTQoSC8TWbAi7nKK9Lc5osQNjmDHVosrcU8o3jecD9GrK0Qyul8q4aGPSXRfNGqIp9CBdb13akETg==", "dev": true }, - "node_modules/reanalyze": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/reanalyze/-/reanalyze-2.16.0.tgz", - "integrity": "sha512-6LXzV/JNgXKZ31UL1C0SMCQi6t0rcEEN4wlOZtBlAndrVWr9ZzopjEKjj/bsdCWZBRtNNS0Naojh0IhnkZpXjA==", - "dev": true, - "hasInstallScript": true, - "bin": { - "reanalyze": "reanalyze.exe" - } - }, "node_modules/typescript": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", @@ -67,12 +56,6 @@ "integrity": "sha512-49hysH7jneTQoSC8TWbAi7nKK9Lc5osQNjmDHVosrcU8o3jecD9GrK0Qyul8q4aGPSXRfNGqIp9CBdb13akETg==", "dev": true }, - "reanalyze": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/reanalyze/-/reanalyze-2.16.0.tgz", - "integrity": "sha512-6LXzV/JNgXKZ31UL1C0SMCQi6t0rcEEN4wlOZtBlAndrVWr9ZzopjEKjj/bsdCWZBRtNNS0Naojh0IhnkZpXjA==", - "dev": true - }, "typescript": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", diff --git a/package.json b/package.json index b17f237e9..4a3c2ef3c 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,6 @@ "devDependencies": { "@types/node": "^14.14.41", "@types/vscode": "1.55.0", - "reanalyze": "^2.16.0", "typescript": "^4.2.4" } } diff --git a/server/package-lock.json b/server/package-lock.json index 728048312..4d57598a0 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -56,7 +56,6 @@ "dependencies": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.3.1", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1",