Hacker GitHub

← All repos

dlang-community/Pegged

View on GitHub ↗ ★ 549 D

A Parsing Expression Grammar (PEG) module, using the D programming language.

11 mentions on Hacker News by 11 people: 1 story, 10 comments · first 2014-02-24 · latest 2023-06-19

Mentions per year 11 mentions · busiest year 2014 (2)
20082026
  1. Here's a parser generator that uses metaprogramming in D to run it at compile time: https://github.com/PhilippeSigaud/Pegged
    comment by WalterBright · 2023-06-19 · in Metaprogramming in Zig and parsing CSS
  2. …algorithms can be tuned on a speed/size tradeoff and backoff when struggling to compress). https://github.com/PhilippeSigaud/Pegged is a D library that generates a parser generator for you based on a grammar (string) at compile time.
  3. This is what's called left-recursion, and there's indeed a way to deal with it in PEG parsers: https://github.com/PhilippeSigaud/Pegged/wiki/Left-Recursion .
  4. This is an excellent Packrat parser library in the D language: https://github.com/PhilippeSigaud/Pegged If you want to understand the compile-time techniques available in D language that are being used by the Pegged library this is a handy…
  5. …what I kept working on until I figured out something that seemed to work. Later on, I ran across https://github.com/PhilippeSigaud/Pegged/wiki/Left-Recursion , which describes Sergio Medeiros' technique at a high level. One of the nice…
  6. I've written a couple parsers in D using https://github.com/PhilippeSigaud/Pegged and they seem pretty fast and easy to verify. Of course since it generates a lot of code at compile time, you can end up with somewhat slow builds.
  7. …a library that lets you build an entire grammar of your choice and evaluate it at compile time: https://github.com/PhilippeSigaud/Pegged Nim's metaprogramming seems quite similar, and I sometimes wonder if perhaps it took some inspiration…
  8. Pegged - PEG generator implemented in the D programming language https://github.com/PhilippeSigaud/Pegged , works in run-time or compile-time
    comment by skocznymroczny · 2017-06-21 · in What the heck is a parser-combinator?
  9. …in D without external tool, with just regular meta-programming: - generating parsers from grammar https://github.com/PhilippeSigaud/Pegged - embedding files as array of bytes: ubyte[] = import("file.jpeg"); - protobuf files at…
    comment by p0nce · 2014-09-15 · in Channels Are Not Enough
  10. …regex libraries are. There actually is a really powerful parser generator for D by Philippe Sigaud: https://github.com/PhilippeSigaud/Pegged It's much more pleasant to use than something like Boost Spirit. Somewhat relatedly, D's standard…