Skip to content

Commit 1f8c640

Browse files
committed
~NPM quick patch
1 parent 2187c50 commit 1f8c640

4 files changed

Lines changed: 16 additions & 3 deletions

File tree

.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
*
22

33
!bin/*
4+
!bin/artifacts/*
5+
!bin/legacy/*
6+
!bin/lib/*
7+
!bin/wasm/*
48
!dist/*
59
!changelog.md
610
!package.json

docs/source/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## Version 4.0.1
4+
5+
### Fixes:
6+
- [x] NPM didn't include some critical files for some reason...
7+
38
## Version 4.0.0
49

510
### Additions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bnf-parser",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "Deterministic BNF compiler/parser",
55
"homepage": "https://bnf-parser.ajanibilby.com",
66
"main": "./bin/index.js",

readme.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# BNF-Parser <!-- no toc -->
22

3-
[![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)
43
[![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)
54

65
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
109
program ::= %w* statement+ ;
1110
block ::= %("block" w+) ...name %(w* "{" w*) seq_stmt* %("}" w*) ;
1211
```
12+
```bash
13+
npx bnf-compile ./syntax.bnf
14+
```
1315
```ts
14-
const tree = syntax.program(input).root;
16+
import * as syntax from "syntax.js";
17+
18+
const tree = syntax.Parse_Program(input).root;
1519
const block = program.value[0];
1620
const name: string = block.value[0]; // typescript knows this **will** be a string
1721
```

0 commit comments

Comments
 (0)