{"id":20777602,"url":"https://github.com/semgrep/ocaml-tree-sitter-languages","last_synced_at":"2026-04-13T11:32:32.313Z","repository":{"id":38257575,"uuid":"381188986","full_name":"semgrep/ocaml-tree-sitter-languages","owner":"semgrep","description":"Generate OCaml parsers from tree-sitter parsers","archived":false,"fork":false,"pushed_at":"2023-04-05T02:02:26.000Z","size":1401,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":17,"default_branch":"main","last_synced_at":"2026-02-04T08:53:21.076Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/semgrep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-28T23:53:04.000Z","updated_at":"2025-10-25T07:24:50.000Z","dependencies_parsed_at":"2025-01-18T08:25:54.750Z","dependency_job_id":"37186e1c-54cd-4579-b60c-889478039ce6","html_url":"https://github.com/semgrep/ocaml-tree-sitter-languages","commit_stats":null,"previous_names":["semgrep/ocaml-tree-sitter-languages","returntocorp/ocaml-tree-sitter-languages"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/semgrep/ocaml-tree-sitter-languages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semgrep%2Focaml-tree-sitter-languages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semgrep%2Focaml-tree-sitter-languages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semgrep%2Focaml-tree-sitter-languages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semgrep%2Focaml-tree-sitter-languages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semgrep","download_url":"https://codeload.github.com/semgrep/ocaml-tree-sitter-languages/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semgrep%2Focaml-tree-sitter-languages/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31751363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T13:16:15.079Z","updated_at":"2026-04-13T11:32:32.292Z","avatar_url":"https://github.com/semgrep.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"ocaml-tree-sitter-languages\n==\n\n[![CircleCI](https://circleci.com/gh/returntocorp/ocaml-tree-sitter-languages.svg?style=svg)](https://circleci.com/gh/returntocorp/ocaml-tree-sitter-languages)\n\nGenerate OCaml parsers based on\n[tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammars.\n\nRelated ocaml-tree-sitter repositories:\n* [ocaml-tree-sitter-core](https://github.com/returntocorp/ocaml-tree-sitter-core): provides the code generator that\n  takes a tree-sitter grammar and produces an OCaml library from it.\n* **ocaml-tree-sitter-languages**: this repo; community repository\n  that has scripts for building and publishing OCaml libraries for\n  parsing a variety of programming languages. It's a simplified version of\n  ocaml-tree-sitter-semgrep.\n* [ocaml-tree-sitter-semgrep](https://github.com/returntocorp/ocaml-tree-sitter-semgrep): same as\n  ocaml-tree-sitter-languages but extends each language with\n  constructs specific to\n  [semgrep](https://github.com/returntocorp/semgrep) patterns.\n\nContributing\n--\n\n### Development setup\n\n1. Make sure you have at least 6 GiB of free memory. More will be\n   needed for some of the grammars.\n2. Install the following tools:\n   * git\n   * GNU make\n   * pkg-config: manages the installation of tree-sitter's runtime library\n   * Node.js: JavaScript interpreter used to translate a grammar to json\n   * cargo: Rust compiler used to build `tree-sitter`\n   * [opam](https://opam.ocaml.org/doc/Install.html): OCaml package manager\n3. Run `opam init`, `opam switch create 4.12.0` to install a recent\n   version of OCaml.\n4. Install [ocaml dev tools for your favorite\n   editor](https://github.com/janestreet/install-ocaml):\n   typically `opam install merlin` + some plugin for your editor.\n5. Install `pre-commit` with `pip3 install pre-commit` and run\n   `pre-commit install` to set up the pre-commit hook.\n   This will re-indent code in a consistent fashion each time you call\n   `git commit`.\n6. Check out the [extra instructions for MacOS](https://github.com/returntocorp/ocaml-tree-sitter-core/blob/main/doc/macos.md).\n\nSee the Makefile for the available targets. Get started with:\n```\nmake setup  # needs root access to install libtree-sitter\n```\n\nThen build and install the OCaml code generator (core):\n```\nmake \u0026\u0026 make install\n```\n\n### Testing a language\n\nSay you want to build and test support for kotlin, you would run this:\n\n```\n$ cd lang\n$ ./test-lang kotlin\n```\n\nFor details, see [How to upgrade the grammar for a\nlanguage](doc/updating-a-grammar.md).\n\n### Adding a new language\n\nSee [How to add support for a new language](doc/adding-a-language.md).\n\nDocumentation\n--\n\nWe have limited [documentation](doc) which is mostly targeted at\nearly contributors. It's growing organically based on demand, so don't\nhesitate to [file an issue](https://github.com/returntocorp/ocaml-tree-sitter/issues)\nexplaining what you're trying to do.\n\nLicense\n--\n\nocaml-tree-sitter is free software with contributors from multiple\norganizations. The project is driven by [r2c](https://github.com/returntocorp).\n\n- OCaml code developed specifically for this project is\n  distributed under the terms of the [GNU GPL v3](LICENSE).\n- The OCaml bindings to tree-sitter's C API were created by Bryan\n  Phelps as part of the reason-tree-sitter project.\n- The tree-sitter grammars for major programming languages are\n  external projects. Each comes with its own license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemgrep%2Focaml-tree-sitter-languages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemgrep%2Focaml-tree-sitter-languages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemgrep%2Focaml-tree-sitter-languages/lists"}