From 1f8c64065e3ff79b47ed92bb9e207966638db7da Mon Sep 17 00:00:00 2001 From: Ajani Bilby <11359344+AjaniBilby@users.noreply.github.com> Date: Sun, 16 Jul 2023 13:46:31 +1000 Subject: [PATCH] ~NPM quick patch --- .npmignore | 4 ++++ docs/source/changelog.md | 5 +++++ package.json | 2 +- readme.md | 8 ++++++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.npmignore b/.npmignore index 1668640..0f6fbda 100644 --- a/.npmignore +++ b/.npmignore @@ -1,6 +1,10 @@ * !bin/* +!bin/artifacts/* +!bin/legacy/* +!bin/lib/* +!bin/wasm/* !dist/* !changelog.md !package.json diff --git a/docs/source/changelog.md b/docs/source/changelog.md index ae96bdd..0d078b1 100644 --- a/docs/source/changelog.md +++ b/docs/source/changelog.md @@ -1,5 +1,10 @@ # Changelog +## Version 4.0.1 + +### Fixes: + - [x] NPM didn't include some critical files for some reason... + ## Version 4.0.0 ### Additions diff --git a/package.json b/package.json index 0bc6099..912987f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bnf-parser", - "version": "4.0.0", + "version": "4.0.1", "description": "Deterministic BNF compiler/parser", "homepage": "https://bnf-parser.ajanibilby.com", "main": "./bin/index.js", diff --git a/readme.md b/readme.md index 9e49b37..d1ed0e0 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,5 @@ # BNF-Parser -[![Reflection Test](https://github.com/AjaniBilby/BNF-parser/actions/workflows/npm-load-check.yml/badge.svg?branch=master)](https://github.com/AjaniBilby/BNF-parser/actions/workflows/npm-load-check.yml) [![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) 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. @@ -10,8 +9,13 @@ Compile your bnfs down to WebAssembly for maximum parsing speed; with generated program ::= %w* statement+ ; block ::= %("block" w+) ...name %(w* "{" w*) seq_stmt* %("}" w*) ; ``` +```bash +npx bnf-compile ./syntax.bnf +``` ```ts -const tree = syntax.program(input).root; +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 ```