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
20082026
-
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 -
…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.
comment by mhh__ · 2023-05-29 · in C++17’s useful features for embedded systems -
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 .
comment by sleavey · 2021-03-27 · in Ohm – A library and language for building parsers, interpreters, compilers, etc. -
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…
comment by teleforce · 2020-11-16 · in Packrat Parsing: Simple, Powerful, Lazy, Linear Time [pdf] -
…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…
comment by davidkellis · 2020-01-29 · in Ask HN: What interesting problems are you working on? -
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.
comment by anaphor · 2019-09-14 · in Show HN: PyCParser, C parser and interpreter in Python -
…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…
comment by jordigh · 2018-10-14 · in Why Zig When There Is Already CPP, D, and Rust? (2017) -
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? -
…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 -
…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…
comment by eco · 2014-02-24 · in Facebook Open Sources flint, a C++ linter written in D