Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
bnf-parser
Advanced tools
Compile 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.
program ::= %w* statement+ ;
block ::= %("block" w+) ...name %(w* "{" w*) seq_stmt* %("}" w*) ;
npx bnf-compile ./syntax.bnf
import * as syntax from "syntax.js";
const tree = syntax.Parse_Program(input).root;
const block = program.value[0];
const name: string = block.value[0]; // typescript knows this **will** be a string
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.
See https://bnf-parser.ajanibilby.com/
See https://bnf-parser.ajanibilby.com/api
See https://bnf-parser.ajanibilby.com/api
Try it in your browser https://bnf-parser.ajanibilby.com/test
FAQs
Deterministic BNF compiler/parser
The npm package bnf-parser receives a total of 10,143 weekly downloads. As such, bnf-parser popularity was classified as popular.
We found that bnf-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.