BNF-parser

Deterministic BNF compiler/parser

MIT License

Downloads
42.7K
Stars
8
BNF-parser - v4.1.1 Latest Release

Published by AjaniBilby 10 months ago

Fixes:

  • Fixed an issue where wasm memory usage exceeded predicted usage - the module now checks if it's about to run out of memory on the start of every rule being parsed. (PR #17)

Full Changelog: https://github.com/AjaniBilby/BNF-parser/compare/v4.1.0...v4.1.1

BNF-parser - v4.1.0

Published by AjaniBilby about 1 year ago

Added:

  • Added the optional extra argument for an output dir to the cli

Full Changelog: https://github.com/AjaniBilby/BNF-parser/compare/v4.0.7...v4.1.0

BNF-parser - Version 4.0.7

Published by AjaniBilby about 1 year ago

Fixes:

  • Slightly altered the import of shared.js from [syntax].js to handle better with Deno compatibility

Full Changelog: https://github.com/AjaniBilby/BNF-parser/compare/v4.0.6...v4.0.7

BNF-parser - Version 4.0.6

Published by AjaniBilby about 1 year ago

Fixes:

  • References generated on successful pass not having the correct start reference

Full Changelog: https://github.com/AjaniBilby/BNF-parser/compare/v4.0.5...v4.0.6

BNF-parser - Version 4.0.5

Published by AjaniBilby over 1 year ago

Fixes:

  • Hexadecimal characters weren't encoding correctly (\x6b == k)
  • Reduced changes of wasm infinitely allocating to basically zero (as long as you don't try and parse an infinite string)
  • CLI doesn't crash when given an invalid starting path
  • Removed small chance matching could be attempted in the 0-7byte gap after the input string and before the heap starts

Changes:

  • CLI now has coloured outputs
  • Binaryen now validates modules after compilation to expose any potential errors in the build chain
  • A lot more automated tests to ensure past errors do not occur again, and to prevent some future ones

Full Changelog: https://github.com/AjaniBilby/BNF-parser/compare/v4.0.4...v4.0.5

BNF-parser - Version 4.0.4

Published by AjaniBilby over 1 year ago

Version 4.0.4

Fixes:

  • Memory over growth: Available memory kept growing after every single parse
  • Better error handling for bnf-compile when given a bad directory

Version 4.0.3

Additions:

  • _Literal helper type in compiled artifacts

Full Changelog: https://github.com/AjaniBilby/BNF-parser/compare/v4.0.2...v4.0.4

BNF-parser - Version 4.0.2

Published by AjaniBilby over 1 year ago

Fixes:

  • More consistent formatting for generated artifacts
  • More concise types for repetitions (i.e. one to many will always have at least one element according to the type)
  • Consistent file formatting (everything is LF now)

Changes:

  • Changed to MIT license from ISC

Full Changelog: https://github.com/AjaniBilby/BNF-parser/compare/v4.0.1...v4.0.2

BNF-parser - v4.0.1

Published by AjaniBilby over 1 year ago

Version 4.0.1

NPM stuffed up and didn't include all of the package files....

Full Changelog: https://github.com/AjaniBilby/BNF-parser/compare/v4.0.0...v4.0.1

BNF-parser - v4.0.0

Published by AjaniBilby over 1 year ago

Version 4.0.0

Additions

  • Compile BNFs down to WebAssembly
  • Generate type definitions for the syntax tree of a given BNF
  • Now able to represent characters by char code using hexadecimal in literals (wasm only) \x41

Changes:

  • All previous APIs moved under the legacy namespace
  • Changed package type to module

Fixes:

  • Count not working when applied directly to a range (i.e. "a"->"z"+)

Full Changelog: https://github.com/AjaniBilby/BNF-parser/compare/v3.1.4...v4.0.0

BNF-parser - v3.1.4

Published by AjaniBilby over 1 year ago

Full Changelog: https://github.com/AjaniBilby/BNF-parser/compare/v3.1.3...v3.1.4

Tweaks:

  • Added extra test case Sequalize
  • Clarified readme documentation further
  • Synced up some documentation inconsistencies between NPM and Github
  • Fixed typo in previous version number's changelog
  • Got ChatGPT-4 to read my homework (read over the readme and helped clarify a few things)
BNF-parser - v3.1.3

Published by AjaniBilby over 1 year ago

Full Changelog: https://github.com/AjaniBilby/BNF-parser/compare/v3.1.2...v3.1.3

Fixes:

  • Fixed missing bound check on getting reach of a SyntaxNode

Tweaks:

  • Clarified readme documentation
BNF-parser - v3.1.2

Published by AjaniBilby over 1 year ago

Version 3.1.2

Fixes:

  • Updated readme to clarify behaviour of select statements

Full Changelog: https://github.com/AjaniBilby/BNF-parser/compare/v3.1.1...v3.1.2

BNF-parser - v3.1.1

Published by AjaniBilby almost 2 years ago

Version 3.1.1

What's Changed

Full Changelog: https://github.com/AjaniBilby/BNF-parser/compare/v3.1.0...v3.1.1

BNF-parser - v3.1.0

Published by AjaniBilby almost 2 years ago

Version 3.1.0

Pull request #5

Added:

  • Documentation dictating the syntax tree structure generated

Changes:

  • Updates to test case logging
  • New internal string parsing method
  • Rearranged documentation
  • Runtime type check on Compile for non TS users
  • Restructured output Syntax tree to make the layout more stable over BNF changes.