Skip to main content

Idl grammar for tree-sitter

Project description

tree-sitter-idl

Crates.io Version PyPI - Version NPM - Version

OMG IDL 4.2(with XTypes extension) grammar for tree-sitter.

current state

IDL v4.2:

  • 7.3 Preprocessing(partial)
  • 7.4.1 Building Block Core Data Types
  • 7.4.2 Building Block Any
  • 7.4.3 Building Block Interfaces – Basic
  • 7.4.4 Building Block Interfaces – Full
  • 7.4.5 Building Block Value Types
  • 7.4.6 Building Block CORBA-Specific – Interfaces
  • 7.4.7 Building Block CORBA-Specific – Value Types
  • 7.4.8 Building Block Components – Basic
  • 7.4.9 Building Block Components – Homes
  • 7.4.10 Building Block CCM-Specific
  • 7.4.11 Building Block Components – Ports and Connectors
  • 7.4.12 Building Block Template Modules
  • 7.4.13 Building Block Extended Data-Types
  • 7.4.14 Building Block Anonymous Types
  • 7.4.15 Building Block Annotations
  • 7.4.16 Relationships between the Building Blocks
  • 8 Standardized Annotations

DDS-XTypes v1.3:

  • 7.3.1.2.3 Alternative Annotation Syntax
  • 7.3.1.2.1 Built-in Annotations

DDS-RPC v1.0:

  • 7.3.1 Service Definition in IDL
  • 7.5.1.2.1 Annotations for the Enhanced Service Mapping
  • 7.4.2.2 Specifying Topic Names using Annotations

extends

allow merge case

union A switch(long) {
    case 1:
    case 2: //< allow
    case 3:
        u8 a;
};

allow using simple_type_spec in template parameter

module MyTemplate <typename T, struct S, long m> {
                                      //  ^ allow
};

allow custom prop appears in value_box_def

custom valuetype A a; // value_box_def
// ^ extend grammar

allow omit param_attribute

interface A {
    void f(uint8 b);
};

allow rust style oct number

const u8 A = 0o3;

allow binary number

const u8 A = 0b010101;

allow octet in typedef_spec

union A switch(octet) {};
//              ^ allow

allow comma at last of enumator

enum A {
    A,
//   ^ allow
};

bitmask A {
    @position(0) a,
//                ^ allow
};

allow ignore 'name='

@DDSRequestTopic("RobotRequestTopic")
//               ^ allow ignore `name=`
interface RobotControl {
    void command(Command com);
};

allow ignore '=xx' in annotation

@derive(Debug, Clone)
//           ^allow ignore "="
struct Hello {};

allow comma-separated positional args in custom annotation

@Annotation("aaa", "bbb")
//                ^ allow extend syntax
struct Hello {};

support template type

struct Hello {
    option<string> c;
    option2<string, uint16> c;
    option3<string, uint16, sequence<string>> c;
};

optional comma

struct Hello {
    option<string> c;
    option2<string, uint16> c;
    option3<string, uint16, sequence<string>> c;
} // ;
//   ^ optional

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_idl-3.18.0.tar.gz (144.0 kB view details)

Uploaded Source

Built Distributions

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

tree_sitter_idl-3.18.0-cp38-abi3-win_amd64.whl (95.1 kB view details)

Uploaded CPython 3.8+Windows x86-64

tree_sitter_idl-3.18.0-cp38-abi3-musllinux_1_2_x86_64.whl (103.9 kB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ x86-64

tree_sitter_idl-3.18.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (148.1 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

tree_sitter_idl-3.18.0-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (112.2 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

tree_sitter_idl-3.18.0-cp38-abi3-macosx_11_0_arm64.whl (95.4 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

tree_sitter_idl-3.18.0-cp38-abi3-macosx_10_9_x86_64.whl (89.8 kB view details)

Uploaded CPython 3.8+macOS 10.9+ x86-64

File details

Details for the file tree_sitter_idl-3.18.0.tar.gz.

File metadata

  • Download URL: tree_sitter_idl-3.18.0.tar.gz
  • Upload date:
  • Size: 144.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tree_sitter_idl-3.18.0.tar.gz
Algorithm Hash digest
SHA256 1c9521fa5570f2e4a118dcf33b7947c050852a21e3ac530a75791de904365d96
MD5 3ab9f79019d2729563d20afda8a09092
BLAKE2b-256 811d2f5bdd57d12d518a14df44aa246e29769bf1ef1e60620ad57851d45a6148

See more details on using hashes here.

File details

Details for the file tree_sitter_idl-3.18.0-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_idl-3.18.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 56baf051474debb9953e6b75e39161d207d2966552aab99a5945c4da72482dcc
MD5 34fd7c8da69fbdd337848b301138be39
BLAKE2b-256 696ac93488929d6313879fe45476ae13fcdc0e895cad38e418bfc87f645b0ade

See more details on using hashes here.

File details

Details for the file tree_sitter_idl-3.18.0-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_idl-3.18.0-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 72b56886a5a7a76dbdc54e82faf7d132cd3ba01dfb26fa89fc575f3c8ad4c9a0
MD5 91020ef2146067ff1d522c2eb01a1820
BLAKE2b-256 4005d5cf4e0343a49321c52aec28116f6c836027a150c0b6434b101a5d44199e

See more details on using hashes here.

File details

Details for the file tree_sitter_idl-3.18.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_idl-3.18.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4ec9958dd2a3c231707c39513d627fe3c612cfa77fd44c4ee61b582867770a24
MD5 b1592d1d379ab7305b204bca2d4a3984
BLAKE2b-256 c094196239075f2b961b367958935656df9454f2253894fc8724e12ad00747fb

See more details on using hashes here.

File details

Details for the file tree_sitter_idl-3.18.0-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_idl-3.18.0-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0452620ee3698f709225574145acf20bb9e76605c20b8b08ddd4fbdc2a0726f0
MD5 08b8865a4206cc3bb2cded08b4f84346
BLAKE2b-256 2cbe34a8a6fd334d0ad77c9791bc77c598f4a9fdc1b09f3716449e4a6c6d58c1

See more details on using hashes here.

File details

Details for the file tree_sitter_idl-3.18.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_idl-3.18.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3081ca6b2594d6a04df46192bbbb4f81da234968019b9ce05b91fc2ac6decae9
MD5 dce38a66b0f081463a5ec86c43fe6a30
BLAKE2b-256 de788a36bca49c833d191a62e18d86df068966af37f9d5c8d5f9d9862f7c444c

See more details on using hashes here.

File details

Details for the file tree_sitter_idl-3.18.0-cp38-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_idl-3.18.0-cp38-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 12b4e88e3ce04a0940e1346cc3a56168eef24eb91aefee79c98583ae49b2ab44
MD5 bc7aea6947d9a7cb1f1239e906ba058f
BLAKE2b-256 5d6b8c48f6dc9f65e6a4016435e3a69dc399fb1424209da19560dc81b364b12e

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