Skip to main content

IML (Imandra Modeling Language) grammar for tree-sitter

Project description

tree-sitter-iml

This module provides IML (Imandra Modeling Language) grammars for the [tree-sitter][] parsing library. It's based on the tree-sitter-ocaml grammar.

Installation

pip install tree-sitter-iml

You will probably also need the [tree-sitter binding][tree-sitter binding].

pip install tree-sitter

Usage

Load the grammar as a Language object:

import tree_sitter_iml
from tree_sitter import Language, Parser

language_iml = Language(tree_sitter_iml.language_iml())

Create a Parser and configure it to use the language:

parser = Parser(language_iml)

Parse some source code:

tree = parser.parse(iml_code)

Use language_iml() for IML files, language_ocaml() for OCaml files, language_ocaml_interface() to parse interface files (with .mli extension), and language_ocaml_type() to parse type signatures.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tree_sitter_iml-0.26.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tree_sitter_iml-0.26.0-cp310-abi3-macosx_11_0_arm64.whl (958.3 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file tree_sitter_iml-0.26.0.tar.gz.

File metadata

  • Download URL: tree_sitter_iml-0.26.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for tree_sitter_iml-0.26.0.tar.gz
Algorithm Hash digest
SHA256 cb49f123917c89a662f1a1d1477e06427c05a1aa24af5b88a87550d051c84094
MD5 cad11b1e75bab0cdda944fbbfb7a1051
BLAKE2b-256 e4b7b2f87e2e4ddd37fe84a9ccb43435fd3cf8d89a4137048dfcfcaa483b5d27

See more details on using hashes here.

File details

Details for the file tree_sitter_iml-0.26.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_iml-0.26.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b316f1bf8207c7fa478f73e1b8568b503c2e1659effd1fb4d2c2b8fbe0af7f84
MD5 755d6ac65dd8e900d081e07ecaa62508
BLAKE2b-256 66d97e887a48acc97ff5f8a739e7feb06b803f8849c005432aa510c85a756cfe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page