{"library":"bnf-parser","type":"library","category":null,"description":"bnf-parser is a deterministic compiler/parser library for Backus-Naur Form (BNF) grammars, currently at version 4.1.3. It differentiates itself by compiling BNF definitions directly into WebAssembly modules, enabling high-performance parsing. This compilation process also generates TypeScript type definitions for the resulting Abstract Syntax Tree (AST), making it easier to work with parsed outputs in type-safe environments. The compiled WebAssembly artifacts are platform-agnostic, capable of running wherever `WebAssembly.Instance()` is supported, and are bundled into a single JavaScript file for easy integration with bundlers. The library primarily functions as a `devDependency`, with its `bnf-compile` CLI tool generating standalone parser artifacts that do not require `bnf-parser` as a runtime dependency. Releases appear to be frequent, with several patch versions addressing memory management, compatibility, and bug fixes since the major v4.0.0 release.","language":"javascript","status":"active","version":"4.1.3","tags":["javascript","ast","bnf","compile","parse","typescript","webpack ready","precompiled","webassembly"],"last_verified":"Wed May 27","install":[{"cmd":"npm install bnf-parser","imports":["import * as syntax from './bnf/your_syntax_name.js';","import { Parse_Program } from './bnf/your_syntax_name.js';","import { Parse } from 'bnf-parser/legacy';"]},{"cmd":"yarn add bnf-parser","imports":[]},{"cmd":"pnpm add bnf-parser","imports":[]}],"homepage":"https://bnf-parser.ajanibilby.com","github":"https://github.com/AjaniBilby/BNF-parser","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/bnf-parser","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/bnf-parser/compatibility"}}