Skip to main content

Idl grammar for tree-sitter

Project description

tree-sitter-idl

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

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.11.0.tar.gz (124.6 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.11.0-cp38-abi3-win_arm64.whl (83.3 kB view details)

Uploaded CPython 3.8+Windows ARM64

tree_sitter_idl-3.11.0-cp38-abi3-win_amd64.whl (85.9 kB view details)

Uploaded CPython 3.8+Windows x86-64

tree_sitter_idl-3.11.0-cp38-abi3-musllinux_1_2_x86_64.whl (94.7 kB view details)

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

tree_sitter_idl-3.11.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (135.3 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

tree_sitter_idl-3.11.0-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (102.1 kB view details)

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

tree_sitter_idl-3.11.0-cp38-abi3-macosx_11_0_arm64.whl (85.5 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

tree_sitter_idl-3.11.0-cp38-abi3-macosx_10_9_x86_64.whl (80.9 kB view details)

Uploaded CPython 3.8+macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for tree_sitter_idl-3.11.0.tar.gz
Algorithm Hash digest
SHA256 9e5803df92ab63a15302a127a557a9c4ed7fe71f3c735e888b8e8bd4d4d76748
MD5 e6c27ae6f7a4df20408385cc765cca19
BLAKE2b-256 bd2e7699f2c3dcd04a026452d95557de0991c909f7a60ac89d4b92bfa62e4aca

See more details on using hashes here.

File details

Details for the file tree_sitter_idl-3.11.0-cp38-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_idl-3.11.0-cp38-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 47ed4fbbd3f1eb6cbd782183833fd51ba05a1ca055230e6e2bb074ab04d2d3b1
MD5 00d793db6739a8cc8f9765b4fbfac280
BLAKE2b-256 a1d7ecd7ae3e1eb80606818a0b3a5d4a640a564726cbd600f9b506720010a12b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_idl-3.11.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e6e24677bd97ee86eae084245e8e77439c96680c16b203668545588a1eb618c8
MD5 f87a3c268135ca1014da495caad73ab1
BLAKE2b-256 1ef78cef377394346feaf316de424dac0e36f1680d045b771152396b87d29474

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_idl-3.11.0-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0f96ff06a89ec31da4d30f5bf8372d2eec760826ce2dbf5cbed76ba8d6ec574f
MD5 a968d6791499751c75f289cec99a2a30
BLAKE2b-256 ef0ba3d25f79f84eb8022cb0a525b08d30ecc488d62d9d0821e5c6b126a834a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_idl-3.11.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 688613c49252f13a27ce4cfbfab393744f89ff4fb8b4de49ebae641ceb47a55d
MD5 d97bd6a50a6153bc30d477f03837952b
BLAKE2b-256 85b51d3367fa5361ef3d82d0ade000ef992fc5906122f3462240d947b55d3316

See more details on using hashes here.

File details

Details for the file tree_sitter_idl-3.11.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.11.0-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e368a99e95ace5b802e2a7ac6d293b133d391654f031e4a3fa33eabba4f8c1e2
MD5 0afd1d646864c971abaf798f25da150a
BLAKE2b-256 55824be040c551f89689cd4a61470e872bde23350a7c516aa82d28fc00ce3bde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_idl-3.11.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0b388f9f1c9b2668e1db59afb3478398a296f60e31d8da6d5b760170972aaa86
MD5 0c4b55957062ec31d9ade18db28ed7f8
BLAKE2b-256 b6b0cb4fd1b927b06f1a6350efd0c679e2cb5285d9feed71d40231b610a2b9df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_idl-3.11.0-cp38-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c69e604cf82c54d12b3205a37bce6dbd7bd78aa87f4136d415e05637447fbd6d
MD5 9d448ab749f459342db963c2f6ab178a
BLAKE2b-256 b52fd590c5496ff4a867297c33a2fafe0a411acae99755ee4d4bffd95ab86e8d

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