Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →
Top 23 Peg Open-Source Projects
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
awesome-pest
A curated list of resources, projects, and tools using or for the pest parser generator in Rust
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Project mention: Ohm: A library and language for building parsers, interpreters, compilers, etc. | news.ycombinator.com | 2023-10-31Building an interpreter or a compiler from a grammar is an interesting idea. I can't immediately see how to go about it - the grammar would need to match on SSA or similar.
The examples have a lisp-like interpreter at https://github.com/ohmjs/ohm/blob/main/examples/simple-lisp/... which definitely uses a grammar for parsing and might use a generic AST representation.
Will have to think more - a grammar might be a worthwhile way to specify a nanopass style compiler pipeline.
And some related parser tools: - https://github.com/kevinmehall/rust-peg - https://github.com/pest-parser/pest - https://github.com/lalrpop/lalrpop
Project mention: Lezer: A Parsing System for CodeMirror, Inspired by Tree-Sitter | news.ycombinator.com | 2024-03-24I 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
Project mention: Show HN: Matcheroni, a tiny C++20 header library for building lexers/parsers | news.ycombinator.com | 2023-07-06Very cool, and I like the name!
I'd be interested in reading about how Matcheroni compares with PEGTL and Lexy.
https://github.com/taocpp/PEGTL
And some related parser tools: - https://github.com/kevinmehall/rust-peg - https://github.com/pest-parser/pest - https://github.com/lalrpop/lalrpop
Ha, nice to see this on HN: this article was pretty helpful to me to understand the concept a few years back when extending my PEG parsing library [1] with a Pratt parser; this mitigates the problem of PEG parsers not allowing left recursion and allows for a much more concise notation of grammars with operator precedence. Thank you Bob:
1. https://github.com/zevv/npeg
Project mention: A glimpse into the universe where Windows died with the 1980s | news.ycombinator.com | 2024-03-12There are languages with perfectly clean grammars which can't be parsed by yacc because they aren't LALR(1).
I agree that a command processor should have a grammar that can be expressed in a well-known formalism, and its parser generated by a parser generator.
I agree that both POSIX shell and CMD.EXE are flawed because that isn't true.
What I'm disagreeing with, is that it is important that the grammar formalism be LALR(1) in particular, and that the parser generator be yacc in particular.
Suppose I have a Packrat parser generator. [0] And my command processor has a nice clean PEG grammar. And I use the Packrat parser generator to generate the parser of my command processor. That grammar quite possibly isn't LALR(1), and hence yacc in particular won't be able to generate a parser for it. But what's the problem with that? If it is a problem at all, it is a very different problem than the problem that CMD.EXE and POSIX shell have
[0] e.g. https://github.com/arithy/packcc
Peg related posts
-
A glimpse into the universe where Windows died with the 1980s
-
Pratt Parsers: Expression Parsing Made Easy
-
nom > regex
-
Peggy: Parser Generator for JavaScript
-
Peg.js: Parser Generator for JavaScript
-
Ohm: A library and language for building parsers, interpreters, compilers, etc.
-
Jasmine, A rust-like programming language that compiles to Java
-
A note from our sponsor - InfluxDB
www.influxdata.com | 5 May 2024
Index
What are some of the best open-source Peg projects? This list will help you:
Project | Stars | |
---|---|---|
1 | ohm | 4,882 |
2 | PEG.js | 4,755 |
3 | pest | 4,370 |
4 | chumsky | 3,334 |
5 | PEGTL | 1,869 |
6 | rust-peg | 1,388 |
7 | cpp-peglib | 835 |
8 | peggy | 808 |
9 | pom | 484 |
10 | npeg | 321 |
11 | packcc | 317 |
12 | mad | 172 |
13 | 3bmd | 79 |
14 | myna-parser | 77 |
15 | parson | 57 |
16 | rekex | 53 |
17 | PeppaPEG | 53 |
18 | awesome-pest | 43 |
19 | GIFT-grammar-PEG.js | 36 |
20 | raabro | 35 |
21 | peginator | 29 |
22 | PEG.jl | 26 |
23 | arborist | 17 |
Sponsored