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.25.2.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.25.2-cp310-abi3-macosx_11_0_arm64.whl (957.4 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: tree_sitter_iml-0.25.2.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.25.2.tar.gz
Algorithm Hash digest
SHA256 74c16612b41362fcbf8c42a77dca8a8d85c3784bb1acf1e1b57acee0aa0eff34
MD5 b01098c05f945670fa2fd290163420cd
BLAKE2b-256 22ec9bc96aa94db6656cbed3c911fdd2a99693cdd165bc94e22ecc4bc8136c2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_iml-0.25.2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4aefa2a6c4502ddf1e6159ef6c3543aac73990801be6aabe2ac3fcdb53dc196d
MD5 4f350b365806c468b3366ee2ee54c7a9
BLAKE2b-256 2036f11162aa3f290f807ace028d0b9b6b99d4045b3920d1fa98422d9a8fe906

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