{"id":16987661,"url":"https://github.com/ajanibilby/bnf-parser","last_synced_at":"2025-08-11T15:10:32.010Z","repository":{"id":133364370,"uuid":"261141979","full_name":"AjaniBilby/BNF-parser","owner":"AjaniBilby","description":"Deterministic BNF compiler/parser","archived":false,"fork":false,"pushed_at":"2024-09-26T16:25:33.000Z","size":1855,"stargazers_count":11,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T02:38:33.764Z","etag":null,"topics":["bnf","compiler","javascript","parser","typescript"],"latest_commit_sha":null,"homepage":"http://bnf-parser.ajanibilby.com/","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/AjaniBilby.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}},"created_at":"2020-05-04T10:20:22.000Z","updated_at":"2025-01-28T06:31:47.000Z","dependencies_parsed_at":"2024-02-20T04:29:46.247Z","dependency_job_id":"f8cc990d-f68b-4d2d-bb5d-76ae0cd650a7","html_url":"https://github.com/AjaniBilby/BNF-parser","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/AjaniBilby/BNF-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AjaniBilby%2FBNF-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AjaniBilby%2FBNF-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AjaniBilby%2FBNF-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AjaniBilby%2FBNF-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AjaniBilby","download_url":"https://codeload.github.com/AjaniBilby/BNF-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AjaniBilby%2FBNF-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269908724,"owners_count":24494595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bnf","compiler","javascript","parser","typescript"],"created_at":"2024-10-14T02:50:27.341Z","updated_at":"2025-08-11T15:10:31.990Z","avatar_url":"https://github.com/AjaniBilby.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BNF-Parser \u003c!-- no toc --\u003e\n\n[![Test](https://github.com/AjaniBilby/BNF-parser/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/AjaniBilby/BNF-parser/actions/workflows/test.yml)\n\nCompile your bnfs down to WebAssembly for maximum parsing speed; with generated type definitions to make using the syntax tree outputs a breeze. The compiled output from this library is platform agnostic, so it can run anywhere `new WebAssembly.Instance()` is a valid function. It bundles the WebAssembly module inside of a single js file so it can be easily incorporated into any bundler. The type definitions for a given bnf are just that, a definitions file - so if you don't want to use typescript or type hints you can go wild by ignoring it.\n\n\n```bnf\nprogram ::= chunk+ ;\nchunk ::= \"a\"+ \"b\"+ ;\n```\n```bash\nnpx bnf-compile ./syntax.bnf\n```\n```ts\nimport * as syntax from \"./bnf/syntax.js\";\n\nconst tree    = syntax.Parse_Program(\"abbaabab\").root;\nconst chunk   = program.value[0]; // typescript knows this this **will** be of type `Term_Chunk`\nconst firstBs = program.value[1];\nconst bCount: number = firstBs.value.length; // typescript knows this **will** be a number\n```\n\n**Built to be a devDependency** - if you use the included cli tool to generate your syntax parser you don't need to include this library as your dependency, you can just import those artifacts.\n\n## Documentation\n\nSee [https://bnf-parser.ajanibilby.com/](https://bnf-parser.ajanibilby.com/)\n\n## API\n\nSee [https://bnf-parser.ajanibilby.com/api](https://bnf-parser.ajanibilby.com/api)\n\n## BNF Syntax\n\nSee [https://bnf-parser.ajanibilby.com/api](https://bnf-parser.ajanibilby.com/syntax)\n\n## Try it Online\n\nTry it in your browser [https://bnf-parser.ajanibilby.com/test](https://bnf-parser.ajanibilby.com/test)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajanibilby%2Fbnf-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajanibilby%2Fbnf-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajanibilby%2Fbnf-parser/lists"}