{"id":25692308,"url":"https://github.com/calico32/ebnf-language-support","last_synced_at":"2026-04-24T20:31:45.124Z","repository":{"id":115908791,"uuid":"601212917","full_name":"calico32/ebnf-language-support","owner":"calico32","description":"Extended Backus-Naur Form (EBNF) support for VSCode","archived":false,"fork":false,"pushed_at":"2025-09-15T15:41:28.000Z","size":1656,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-15T16:30:36.336Z","etag":null,"topics":["ebnf","extended-bnf","extension","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/calico32.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-13T15:47:27.000Z","updated_at":"2025-09-15T15:41:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"3def3227-14db-4082-9b2c-4fe817ebcde5","html_url":"https://github.com/calico32/ebnf-language-support","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/calico32/ebnf-language-support","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calico32%2Febnf-language-support","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calico32%2Febnf-language-support/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calico32%2Febnf-language-support/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calico32%2Febnf-language-support/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/calico32","download_url":"https://codeload.github.com/calico32/ebnf-language-support/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calico32%2Febnf-language-support/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32239488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ebnf","extended-bnf","extension","vscode","vscode-extension"],"created_at":"2025-02-24T23:08:49.060Z","updated_at":"2026-04-24T20:31:45.118Z","avatar_url":"https://github.com/calico32.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EBNF Language Support\n\nThis extension adds support for an EBNF-like syntax ([Extended Backus-Naur Form](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form)) to Visual Studio Code.\n\n![Screenshot](./assets/screenshot.png)\n\n## Table of Contents\n\n- [EBNF Language Support](#ebnf-language-support)\n  - [Table of Contents](#table-of-contents)\n  - [Features](#features)\n  - [Roadmap](#roadmap)\n  - [EBNF Syntax](#ebnf-syntax)\n  - [Comments](#comments)\n  - [Rules](#rules)\n    - [Rule Names](#rule-names)\n  - [Expressions](#expressions)\n    - [Literals](#literals)\n    - [Special Cases](#special-cases)\n    - [Groups](#groups)\n    - [Ranges](#ranges)\n    - [Concatenation](#concatenation)\n    - [Alternation](#alternation)\n    - [Exclusion](#exclusion)\n    - [\"One or more\"](#one-or-more)\n\n## Features\n\n- Syntax highlighting + semantic highlighting\n- Basic error checking\n  - Syntax errors\n  - Undefined symbols\n  - Duplicate symbols\n- Go to definition\n- Find all references\n- Document symbols (go to symbol, outline)\n- Basic code completion\n  - Rule names\n- Hover information\n  - Rule name and definition\n- Code folding\n\n## Roadmap\n\n- Railroad diagram generation\n\n## EBNF Syntax\n\nThis extension implements a simple and strict-ish version of EBNF. The syntax is defined in itself in [ebnf.ebnf](./ebnf.ebnf).\n\nThe dialect implemented mostly follows the [ISO/IEC 14977](https://www.iso.org/standard/26153.html) standard, with some extensions for clarity and convenience.\n\n## Comments\n\nComments are defined using the `(*` and `*)` delimiters.\n\n## Rules\n\nRules are defined using the assignment operator `=`. The left-hand side is the rule name, and the right-hand side is an _expression_. Rules must end with a semicolon `;`.\n\n### Rule Names\n\nRule names can start with any letter, number, or an underscore. They can also contain a hyphen, but not at the beginning. Rule names are case-sensitive.\n\n## Expressions\n\nExpressions are made up of _terms_ and _operators_. Terms are either literals, references to other rules (by name), special cases, groups, or ranges. Operators are used to combine terms into more complex expressions.\n\n### Literals\n\nLiterals are enclosed in single quotes or double quotes. They can contain any character except for the quote character used to enclose them. No escaping is considered, so you can't use a single quote inside a single-quoted literal, or a double quote inside a double-quoted literal. How to interpret sequences like `\\n` is up to the reader. Both literals and special cases can be multiline.\n\n### Special Cases\n\nSpecial cases are used to describe content that cannot be easily expressed using the other terms. They are enclosed in question marks `?`, and can have multiple lines.\n\n```ebnf\n? any character ?\n? valid UTF-8 ?\n```\n\n### Groups\n\nThere are three different types of groups:\n\n- Parentheses (_group_) are only used to group terms together.\n- Brackets (_optional_) indicate that the content inside is optional, i.e. it can appear zero or one times.\n- Braces (_repetition_) indicate that the content inside can appear zero or more times.\n\n### Ranges\n\nRanges are used to define a set a contiguous characters. They are composed of two strings joined by two dots `..`.\n\nRanges have no specific definition of what a range \"is\". It should be obvious what the range should represent. For example, a range of `\"A\"..\"Z\"` is probably a set of uppercase letters, while a range of `\"0\"..\"9\"` is probably a set of digits.\n\n### Concatenation\n\nConcatenation can be defined using the comma `,` operator between terms or by juxtaposition of terms.\n\nIt does not define what whitespace is allowed between terms; it is assumed that the reader knows what is and isn't allowed.\n\n```ebnf\n\"A\", \"B\", \"C\" (* probably \"ABC\" *)\n\"fn\" name \"()\" (* probably \"fn foo()\" *)\n```\n\n### Alternation\n\nThe alternation operator is the pipe `|`. It is used to define a set of possible choices for a term.\n\n```ebnf\n\"A\" | \"B\" | \"C\" (* \"A\", \"B\", or \"C\" *)\n\"A\", ( \"B\" | \"C\" ) (* \"AB\" or \"AC\" *)\n```\n\n### Exclusion\n\nThe exclusion operator is the caret `-`. It is used to define a set of possible choices for a term, but excludes one or more of them.\n\n```ebnf\nletter = \"A\"..\"Z\" ;\nnot_z = letter - \"Z\" ; (* \"A\"..\"Y\" *)\n```\n\n### \"One or more\"\n\nThe postfix operators `+` and `-` modify the preceding term to indicate that it occurs \"one or more\" times. The following forms are equivalent:\n\n```ebnf\nmany-as = { \"a\" }+ ; (* \"a\", \"aa\", \"aaa\", ... but not \"\" *)\nmany-as = { \"a\" }- ;\nmany-as = { \"a\" } - '' ;\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e The `-` operator is also valid as an infix oerator (see\n\u003e [Exclusion](#exclusion)). Thus, when another term follows a unary `-`, it will\n\u003e be interpreted as an exclusion instead of a concatenation. Adding a comma\n\u003e directly after a unary `-` can be used to disambiguate this case, but can\n\u003e be confusing and error-prone:\n\u003e\n\u003e ```ebnf\n\u003e ooof = { \"o\" }-, \"f\" ;\n\u003e ```\n\u003e\n\u003e Usage of `-` as a postfix operator is therefore discouraged. Using `+`, although\n\u003e not part of ISO/IEC 14977, is recommended instead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalico32%2Febnf-language-support","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalico32%2Febnf-language-support","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalico32%2Febnf-language-support/lists"}