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 {};

support template type

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

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.16.0.tar.gz (129.4 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.16.0-cp38-abi3-win_amd64.whl (88.4 kB view details)

Uploaded CPython 3.8+Windows x86-64

tree_sitter_idl-3.16.0-cp38-abi3-musllinux_1_2_x86_64.whl (98.1 kB view details)

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

tree_sitter_idl-3.16.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (138.2 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

tree_sitter_idl-3.16.0-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (105.7 kB view details)

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

tree_sitter_idl-3.16.0-cp38-abi3-macosx_11_0_arm64.whl (88.5 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

tree_sitter_idl-3.16.0-cp38-abi3-macosx_10_9_x86_64.whl (83.7 kB view details)

Uploaded CPython 3.8+macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for tree_sitter_idl-3.16.0.tar.gz
Algorithm Hash digest
SHA256 6c0a24c512611680a77a642c4bce3f761ca8c84455f6a5b5d965e9255ce1246e
MD5 4f04eb4d6ee6967dccd2eff40683467f
BLAKE2b-256 b4b65367fb54e994f5706c0ba88d4d0abb5bf2bd7c71c7058074258b233d9605

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_idl-3.16.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 ab10d7fba9e8fd65d94522102ddefcdac6b31513c2325b781941b089d49702bb
MD5 a34da76fc7b3df8b13220cbc7d3fc51b
BLAKE2b-256 cfa4025670dfdc7828926c56505b23ca06975cf56b5590ae22f8cc5350647b49

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_idl-3.16.0-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a9f78e8c0eb1419534b50eaba035843098618f7e8337bf0ab17c3a4c72676590
MD5 b2af9ff0e25d09f2909a12baa9ef9175
BLAKE2b-256 182fa3b7a5897cd64bbd32dd1aaf67bbd741ef7ffce8fed9501ef80cd5185ce8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_idl-3.16.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7dc1471c63bedaf0478c41c1b503233d759fae31815d74bdfe352ab8e475dcad
MD5 3d4af06467a54d2aa4e74a5f7e0762f3
BLAKE2b-256 b546b3aff3ee13899785ce59e0c0ba9d2728ffad839a48ea42b539ff6cad88c6

See more details on using hashes here.

File details

Details for the file tree_sitter_idl-3.16.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.16.0-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bc523e21975067b3082d314ceef952ddb6410e92085a6ce919ef648ad782e314
MD5 6f375531508bb41fc1f7d6615a245610
BLAKE2b-256 afc7212349739ed690509a20a143b930324c43ac801296a15e5868b53f3919c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_idl-3.16.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b875267d1d6689f151f1a5963b14e7f87e844386427254f2386f9a860ea56ca4
MD5 586f5797457753fce341d666f8e2efd0
BLAKE2b-256 b72258b19d0fe498e16ef3a64ca3f42ce3bec0491021f6cfc4524141d30a3037

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_idl-3.16.0-cp38-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 eff7b82ec926fe130d5366f6ba06bb2eddb11d956927e00466cbf1300b1edfa6
MD5 912e9a20b0ed9dbd6d78ac37c9cf5369
BLAKE2b-256 30c202c1b359ae1ca20884843a6c316bf669ec690b82615ea261e29d027bd900

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