tree-sitter-zeek


Nametree-sitter-zeek JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryZeek grammar for tree-sitter
upload_time2024-06-19 15:27:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords incremental parsing tree-sitter zeek
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tree-sitter-zeek

[![Tests](https://github.com/zeek/tree-sitter-zeek/actions/workflows/test.yaml/badge.svg)](https://github.com/zeek/tree-sitter-zeek/actions/workflows/test.yaml)

A [Zeek](https://zeek.org) grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter).

## Background

This grammar parses scripts written in the [Zeek scripting
language](https://docs.zeek.org/en/master/script-reference/index.html).

The goal of this grammar is to facilitate tooling around Zeek
scripts. For that reason, its structure resembles Zeek's grammar but differs in
a number of ways. For example, it tracks newlines explicitly and relies more
strongly on precedence and associativity to resolve ambiguities. Like Zeek's
parser, this one currently doesn't name symbols deeply: for example, the grammar
features an `expr` rule that covers any kind of expression, but the choices
aren't currently broken down into, say, `addition_expr`, `or_expr`, and
similars.

## Usage

To use the generated parser directly (e.g. via any of tree-sitter's
[language bindings](https://tree-sitter.github.io/tree-sitter/#language-bindings)),
clone this repository recursively. We maintain a separate
[git repository](https://github.com/zeek/tree-sitter-zeek-src)
to track generated sources. You do not need the tree-sitter CLI
to use those sources in your tooling, but you'll likely want it
anyway to explore the parser. For example, `tree-sitter parse <script>`
produces the script's syntax tree, and `tree-sitter highlight <script>`
shows syntax-highlighted sources.

## Building the parser

- Install [tree-sitter](https://tree-sitter.github.io/tree-sitter/creating-parsers#installation) on your machine.
- Generate the parser: run `tree-sitter generate`.

## Testing

There's currently no `tree-sitter test` testsuite. Instead, a test driver runs
the parser on every Zeek script in the Zeek distribution, reporting any
errors. For CI, a Github Action workflow additionally clones the Zeek tree prior
to running this test, to ensure that those Zeek scripts are available.

## Releasing a new version

To release a new version update the version number in the following ecosystem-specific files:

- `package.json`: key `version`
  - `package-lock.json`: update `package.json` and run `npm install` to update the lock file.
- `pyproject.toml`: key `project.version`
- `Cargo.toml`: key `package.version`

Once all versions are consistently updated create a version tag `vX.Y.Z` and
push it. We trigger automatic publishing of releases for all tags.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tree-sitter-zeek",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "incremental, parsing, tree-sitter, zeek",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/7a/88/d61cc009884d67b5046cf7462ddc39f673f86f085632a65b031f456be56d/tree-sitter-zeek-0.1.1.tar.gz",
    "platform": null,
    "description": "# tree-sitter-zeek\n\n[![Tests](https://github.com/zeek/tree-sitter-zeek/actions/workflows/test.yaml/badge.svg)](https://github.com/zeek/tree-sitter-zeek/actions/workflows/test.yaml)\n\nA [Zeek](https://zeek.org) grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter).\n\n## Background\n\nThis grammar parses scripts written in the [Zeek scripting\nlanguage](https://docs.zeek.org/en/master/script-reference/index.html).\n\nThe goal of this grammar is to facilitate tooling around Zeek\nscripts. For that reason, its structure resembles Zeek's grammar but differs in\na number of ways. For example, it tracks newlines explicitly and relies more\nstrongly on precedence and associativity to resolve ambiguities. Like Zeek's\nparser, this one currently doesn't name symbols deeply: for example, the grammar\nfeatures an `expr` rule that covers any kind of expression, but the choices\naren't currently broken down into, say, `addition_expr`, `or_expr`, and\nsimilars.\n\n## Usage\n\nTo use the generated parser directly (e.g. via any of tree-sitter's\n[language bindings](https://tree-sitter.github.io/tree-sitter/#language-bindings)),\nclone this repository recursively. We maintain a separate\n[git repository](https://github.com/zeek/tree-sitter-zeek-src)\nto track generated sources. You do not need the tree-sitter CLI\nto use those sources in your tooling, but you'll likely want it\nanyway to explore the parser. For example, `tree-sitter parse <script>`\nproduces the script's syntax tree, and `tree-sitter highlight <script>`\nshows syntax-highlighted sources.\n\n## Building the parser\n\n- Install [tree-sitter](https://tree-sitter.github.io/tree-sitter/creating-parsers#installation) on your machine.\n- Generate the parser: run `tree-sitter generate`.\n\n## Testing\n\nThere's currently no `tree-sitter test` testsuite. Instead, a test driver runs\nthe parser on every Zeek script in the Zeek distribution, reporting any\nerrors. For CI, a Github Action workflow additionally clones the Zeek tree prior\nto running this test, to ensure that those Zeek scripts are available.\n\n## Releasing a new version\n\nTo release a new version update the version number in the following ecosystem-specific files:\n\n- `package.json`: key `version`\n  - `package-lock.json`: update `package.json` and run `npm install` to update the lock file.\n- `pyproject.toml`: key `project.version`\n- `Cargo.toml`: key `package.version`\n\nOnce all versions are consistently updated create a version tag `vX.Y.Z` and\npush it. We trigger automatic publishing of releases for all tags.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Zeek grammar for tree-sitter",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/tree-sitter/tree-sitter-zeek"
    },
    "split_keywords": [
        "incremental",
        " parsing",
        " tree-sitter",
        " zeek"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26af242ce10aa3bd681b7ad9a7dd9a5e9a31b4d750dc892f03acf49844981be8",
                "md5": "2de0221c857fbb35fe7675c7bb721e18",
                "sha256": "881c6a50746368e8b5ccc742155c563c1561b7d02939bbfe60867878a1026a5b"
            },
            "downloads": -1,
            "filename": "tree_sitter_zeek-0.1.1-cp38-abi3-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "2de0221c857fbb35fe7675c7bb721e18",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 82087,
            "upload_time": "2024-06-19T15:27:07",
            "upload_time_iso_8601": "2024-06-19T15:27:07.739576Z",
            "url": "https://files.pythonhosted.org/packages/26/af/242ce10aa3bd681b7ad9a7dd9a5e9a31b4d750dc892f03acf49844981be8/tree_sitter_zeek-0.1.1-cp38-abi3-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "528cafa17e2ef4f580fa0d6cf6e934547429c82a04d49c5f66c8c02916538298",
                "md5": "5639dcfe0179307dbca8f5391265db59",
                "sha256": "54e3de7d06b4d5c6fb3384b75010c813455f4f83f4e2a4323f5c8ede98dc5bed"
            },
            "downloads": -1,
            "filename": "tree_sitter_zeek-0.1.1-cp38-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "5639dcfe0179307dbca8f5391265db59",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 89120,
            "upload_time": "2024-06-19T15:27:09",
            "upload_time_iso_8601": "2024-06-19T15:27:09.094493Z",
            "url": "https://files.pythonhosted.org/packages/52/8c/afa17e2ef4f580fa0d6cf6e934547429c82a04d49c5f66c8c02916538298/tree_sitter_zeek-0.1.1-cp38-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1dc734fed2ffa1bfb014e7447706eefd33b1f7f34ecd54237afd476ef4f9679e",
                "md5": "4389ee993c719db14f81e5adecd5be5c",
                "sha256": "75d5490a5424af8f6e165fd045b3b590fb379c9624be57ce43ec2c446833ee91"
            },
            "downloads": -1,
            "filename": "tree_sitter_zeek-0.1.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "4389ee993c719db14f81e5adecd5be5c",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 132399,
            "upload_time": "2024-06-19T15:27:12",
            "upload_time_iso_8601": "2024-06-19T15:27:12.391525Z",
            "url": "https://files.pythonhosted.org/packages/1d/c7/34fed2ffa1bfb014e7447706eefd33b1f7f34ecd54237afd476ef4f9679e/tree_sitter_zeek-0.1.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d42f12ffc707af4ec8cb5b7d6a21bc02f4f974cfc37af3e5bf9a15f51666dccc",
                "md5": "0147ea68316568e856542b7e4c21c5cd",
                "sha256": "b2ac5d8b679cdaf9ed753a1520ab99e3988e1b7a1c0aa30a586377859eadca66"
            },
            "downloads": -1,
            "filename": "tree_sitter_zeek-0.1.1-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "0147ea68316568e856542b7e4c21c5cd",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 97561,
            "upload_time": "2024-06-19T15:27:14",
            "upload_time_iso_8601": "2024-06-19T15:27:14.590662Z",
            "url": "https://files.pythonhosted.org/packages/d4/2f/12ffc707af4ec8cb5b7d6a21bc02f4f974cfc37af3e5bf9a15f51666dccc/tree_sitter_zeek-0.1.1-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c5fe7a31df1cf2c9b3a6b5ce73457b67109440cdf7962e52239d62c19944215",
                "md5": "449508e55f392d9e80310017279b12c6",
                "sha256": "8c854c95580412d0bf04614be5bdc5f73449040bada9865ef3864326b9b64029"
            },
            "downloads": -1,
            "filename": "tree_sitter_zeek-0.1.1-cp38-abi3-musllinux_1_2_aarch64.whl",
            "has_sig": false,
            "md5_digest": "449508e55f392d9e80310017279b12c6",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 91303,
            "upload_time": "2024-06-19T15:27:17",
            "upload_time_iso_8601": "2024-06-19T15:27:17.828535Z",
            "url": "https://files.pythonhosted.org/packages/6c/5f/e7a31df1cf2c9b3a6b5ce73457b67109440cdf7962e52239d62c19944215/tree_sitter_zeek-0.1.1-cp38-abi3-musllinux_1_2_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ccf94009d6207b5967983c6ae75c0e79b6f072b83a8e34d6eac3d7782b749895",
                "md5": "ad8f916a6f2c2a1fa4f2e7864dad6989",
                "sha256": "110ce0c59a4ee0694771b3cc5e1070d7f4efc9ef60de02e6203f6077992c1cdf"
            },
            "downloads": -1,
            "filename": "tree_sitter_zeek-0.1.1-cp38-abi3-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "ad8f916a6f2c2a1fa4f2e7864dad6989",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 91618,
            "upload_time": "2024-06-19T15:27:20",
            "upload_time_iso_8601": "2024-06-19T15:27:20.973024Z",
            "url": "https://files.pythonhosted.org/packages/cc/f9/4009d6207b5967983c6ae75c0e79b6f072b83a8e34d6eac3d7782b749895/tree_sitter_zeek-0.1.1-cp38-abi3-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2d69228fe2e2c7478f088dd5b7b56380684012fd82223b95e3c4b01d16e64c5e",
                "md5": "b6d9b1276a7685246a1fc6360bd8d837",
                "sha256": "2e194d44172543a7f28cbd2293839a6d9072d831c23ece7c034b86badebee65a"
            },
            "downloads": -1,
            "filename": "tree_sitter_zeek-0.1.1-cp38-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "b6d9b1276a7685246a1fc6360bd8d837",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 85976,
            "upload_time": "2024-06-19T15:27:22",
            "upload_time_iso_8601": "2024-06-19T15:27:22.373092Z",
            "url": "https://files.pythonhosted.org/packages/2d/69/228fe2e2c7478f088dd5b7b56380684012fd82223b95e3c4b01d16e64c5e/tree_sitter_zeek-0.1.1-cp38-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7a88d61cc009884d67b5046cf7462ddc39f673f86f085632a65b031f456be56d",
                "md5": "e267b9c7c0a4b8ff2bff28cb2927ba1b",
                "sha256": "946710d3f9116e2a23d1618ac3a2ec72167d76612a37d02e3c0dc515a8bd79d1"
            },
            "downloads": -1,
            "filename": "tree-sitter-zeek-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e267b9c7c0a4b8ff2bff28cb2927ba1b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 199678,
            "upload_time": "2024-06-19T15:27:24",
            "upload_time_iso_8601": "2024-06-19T15:27:24.862325Z",
            "url": "https://files.pythonhosted.org/packages/7a/88/d61cc009884d67b5046cf7462ddc39f673f86f085632a65b031f456be56d/tree-sitter-zeek-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-19 15:27:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tree-sitter",
    "github_project": "tree-sitter-zeek",
    "github_not_found": true,
    "lcname": "tree-sitter-zeek"
}
        
Elapsed time: 0.28372s