peggy
lezer
Our great sponsors
peggy | lezer | |
---|---|---|
8 | 2 | |
806 | 29 | |
7.7% | - | |
8.9 | 4.6 | |
23 days ago | 4 months ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
peggy
- Peggy: Parser Generator for JavaScript
- GitHub - peggyjs/peggy: Peggy: Parser generator for JavaScript
- Peggy: Maintained fork of PEG.js parser generator
-
Creating a custom parser with PEGJS
The PEG.js project got taken over by a new maintainer who locked everyone else out, never shipped a release, and then ignored repeated requests to transfer the project back to the community. So the community forked it to a new project - Peggy, which is where ongoing development happens: https://github.com/peggyjs/peggy
-
How to make your own programming language in JavaScript
NOTE: The original PEG.js project is not maintained anymore, but there is a new fork, Peggy that is maintained and it's backward compatible with PEG.js so it will be easy to switch.
-
Show HN: DTL: a language and JavaScript lib to transform and manipulate data
Thanks. Yes, DTL's core textual syntax is described with PEG. I make use of the Peggy (https://peggyjs.org/) PEG processor to build up the AST that is used to actually process DTL.
There are C based PEG processors, which I've looked at once or twice also, but I haven't sat down to try to convert it. Mostly out of a desire to get the existing module to work well. A working module for one language is better than a partially working module for multiple. :P
-
Parsing in JavaScript: all the tools and libraries you can use
hmm this article is a bit outdated; peg.js (mentioned in the article) has been discountined for a few years now; recently the project was picked up by another team under the name peggy.js https://github.com/peggyjs/peggy
lezer
-
Lezer: A Parsing System for CodeMirror, Inspired by Tree-Sitter
I attempted to use this but was disheartened but the fact that it doesn't statically type node names. Tree Sitter doesn't either but it has much more of an excuse given that it targets C.
https://github.com/lezer-parser/lezer/issues/8
The dev seems mildly hostile to outside involvement too, so I moved on. These days I use Chumsky which is Rust rather than Typescript, but also way more awesome, if you can deal with the often incomprehensible compilation errors at least!
https://github.com/zesterer/chumsky
-
Parsing in JavaScript: all the tools and libraries you can use
Treesitter is not JS (although the Wasm version can be used from JS). Lezer (https://github.com/lezer-parser/lezer) is similar (it was inspired by Treesitter) and is written in TS.
What are some alternatives?
PEG.js - PEG.js: Parser generator for JavaScript
tamcher
ohm - A library and language for building parsers, interpreters, compilers, etc.
code-mirror-custom-element - CodeMirror 6 as a custom element (web component)
esprima - ECMAScript parsing infrastructure for multipurpose analysis
codemirror-elements - A set of CodeMirror custom HTML elements
purescript - A strongly-typed language that compiles to JavaScript
generator - Parser generator for the lezer incremental parser
lens-toml-parser - Lenses for toml-parser
jquery.terminal - jQuery Terminal Emulator - JavaScript library for creating web-based terminals with custom commands
toml-parser - Haskell parser and printer for the TOML 1.0.0 file format
terser - 🗜 JavaScript parser, mangler and compressor toolkit for ES6+