Peg

Top 23 Peg Open-Source Projects

  • ohm

    A library and language for building parsers, interpreters, compilers, etc.

  • Project mention: Ohm: A library and language for building parsers, interpreters, compilers, etc. | news.ycombinator.com | 2023-10-31

    Building 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.

  • PEG.js

    PEG.js: Parser generator for JavaScript

  • Project mention: Peg.js: Parser Generator for JavaScript | news.ycombinator.com | 2023-11-24
  • 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.

    InfluxDB logo
  • pest

    The Elegant Parser (by pest-parser)

  • Project mention: nom > regex | /r/rust | 2023-12-06

    And some related parser tools: - https://github.com/kevinmehall/rust-peg - https://github.com/pest-parser/pest - https://github.com/lalrpop/lalrpop

  • chumsky

    Write expressive, high-performance parsers with ease.

  • Project mention: Lezer: A Parsing System for CodeMirror, Inspired by Tree-Sitter | news.ycombinator.com | 2024-03-24

    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

  • PEGTL

    Parsing Expression Grammar Template Library

  • Project mention: Show HN: Matcheroni, a tiny C++20 header library for building lexers/parsers | news.ycombinator.com | 2023-07-06

    Very 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

  • rust-peg

    Parsing Expression Grammar (PEG) parser generator for Rust

  • Project mention: nom > regex | /r/rust | 2023-12-06

    And some related parser tools: - https://github.com/kevinmehall/rust-peg - https://github.com/pest-parser/pest - https://github.com/lalrpop/lalrpop

  • cpp-peglib

    A single file C++ header-only PEG (Parsing Expression Grammars) library

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • peggy

    Peggy: Parser generator for JavaScript

  • Project mention: Peggy: Parser Generator for JavaScript | news.ycombinator.com | 2023-11-24
  • pom

    PEG parser combinators using operator overloading without macros.

  • npeg

    PEGs for Nim, another take

  • Project mention: Pratt Parsers: Expression Parsing Made Easy | news.ycombinator.com | 2024-01-20

    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

  • packcc

    A parser generator for C

  • Project mention: A glimpse into the universe where Windows died with the 1980s | news.ycombinator.com | 2024-03-12

    There 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

  • mad

    ⚡ MAD: Managing Application Dependencies LING/UNIX (by synrc)

  • 3bmd

    markdown processor in CL using esrap parser

  • myna-parser

    Myna Parsing Library

  • parson

    Yet another PEG parser combinator library and DSL (by darius)

  • rekex

    PEG parser generator for Java 17 - grammar as algebraic datatypes

  • PeppaPEG

    PEG Parser in ANSI C

  • awesome-pest

    A curated list of resources, projects, and tools using or for the pest parser generator in Rust

  • GIFT-grammar-PEG.js

    Development of PEG grammar to support GIFT (quiz) format

  • raabro

    a Ruby PEG parser library

  • peginator

    PEG parser generator for creating ASTs in Rust

  • PEG.jl

    Define a Parsing Expression Grammar via a macro and abuse of Julia syntax.

  • arborist

    Arborist is a PEG parser that supports left-associative left recursion (by davidkellis)

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Peg related posts

  • A glimpse into the universe where Windows died with the 1980s

    2 projects | news.ycombinator.com | 12 Mar 2024
  • Pratt Parsers: Expression Parsing Made Easy

    6 projects | news.ycombinator.com | 20 Jan 2024
  • nom > regex

    10 projects | /r/rust | 6 Dec 2023
  • Peggy: Parser Generator for JavaScript

    1 project | news.ycombinator.com | 24 Nov 2023
  • Peg.js: Parser Generator for JavaScript

    1 project | news.ycombinator.com | 24 Nov 2023
  • Ohm: A library and language for building parsers, interpreters, compilers, etc.

    6 projects | news.ycombinator.com | 31 Oct 2023
  • Jasmine, A rust-like programming language that compiles to Java

    2 projects | /r/ProgrammingLanguages | 31 Aug 2023
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 5 May 2024
    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 →

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
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com