Fast Parse
dmd
Fast Parse | dmd | |
---|---|---|
4 | 147 | |
1,076 | 2,893 | |
0.2% | 0.4% | |
4.6 | 9.9 | |
21 days ago | 2 days ago | |
Scala | D | |
MIT License | Boost Software License 1.0 |
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.
Fast Parse
-
How do I remove the forward reference error in my parser? (20 lines)
Perhaps use Li Haoyi's fastparse instead? https://github.com/com-lihaoyi/fastparse
-
Parse slightly dirty, poorly escaped XML
You might want to adapt Li Haoyi’s XML parser for fastparse.
-
-🎄- 2021 Day 18 Solutions -🎄-
Mostly a mess of pattern matching. I really need to make some generic tree utilities. Haven't been able to find a decent parser combinator that works in Scala 3 (I usually use fastparse which depends heavily on Scala 2 macros, and scala-parser-combinators works in Scala 3, but I've had a lot of trouble getting it to not be too greedy), so I used the state monad from cats to parse at the bottom of the file, which I think turned out fairly nice.
-
Parser generators vs. handwritten parsers: surveying major languages in 2021
Agreed! I would say that parser combinators are the sweet spot and the right choice in most cases.
Scala has them as well, e.g.: https://com-lihaoyi.github.io/fastparse/
And the good thing is, you don't have to learn a completely new language/syntax, you can use the host language's syntax and you have full IDE support as well.
dmd
- A History of C Compilers – Part 1: Performance, Portability and Freedom
- D2 Playground
-
DMD Compiler as a Library: A Call to Arms
Here's the pipeline spitting out the same error as on my macbook did.
https://github.com/dlang/dmd/actions/runs/8023469412/job/219...
-
My favourite Git commit (2019)
Not completely on topic (if you read TFA) but my favorite Git commit is by compiler badass and HN frequenter, where he checks in an entire C compiler to the D language repo:
https://github.com/dlang/dmd/pull/12507
https://news.ycombinator.com/item?id=27102584
-
The C Bounded Model Checker: Criminally Underused
A new generated code alone is 4000 lines long [1]. The actual code added is just 2000 lines, and some are used to pay debts, I mean, to make a proper code generator (which can be alternatively written in a simpler scripting langauge). In any case it is never comparable to the entier C parser proper.
[1] https://github.com/dlang/dmd/pull/15307/files#diff-3677bcc89...
-
OpenD, a D language fork that is open to your contributions
D is completely opensource already (https://github.com/dlang/dmd). The "open" of OpenD is just ADR saying that OpenD will be more open to new language features than D has historically been.
-
The OpenD Programming Language (fork of D)
The reference compiler, DMD, is open source: https://github.com/dlang/dmd
But they don't accept just any Pull Request or features the community submits, understandably. There's a process called DIP for language improvements: https://github.com/dlang/DIPs/blob/master/DIPs/README.md
However, by some accounts, it's really hard to get anything through.
Given D already has so many feature, I find that to be a good thing , to be honest, by not everyone agrees, of course.
- Odin Programming Language
- D Programming Language
What are some alternatives?
Parboiled2 - A macro-based PEG parser generator for Scala 2.10+
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
Scala Parser Combinators - simple combinator-based parsing for Scala. formerly part of the Scala standard library, now a separate community-maintained module
ldc - The LLVM-based D Compiler.
atto - friendly little parsers
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
Scopt - command line options parsing for Scala
dextool - Suite of C/C++ tooling built on LLVM/Clang
Kaitai Struct - Kaitai Struct: declarative language to generate binary data parsers in C++ / C# / Go / Java / JavaScript / Lua / Nim / Perl / PHP / Python / Ruby
Odin - Odin Programming Language
decline - A composable command-line parser for Scala.
llvm-project - The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.