Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. D
  3. libdparse

libdparse

BSL-1.0Dv0.25.1

A library for lexing and parsing D programming language source code, enabling syntax analysis and tooling.

Visit WebsiteGitHubGitHub
125 stars65 forks0 contributors

What is libdparse?

libdparse is a library for lexing and parsing D programming language source code. It provides tokenization and abstract syntax tree generation capabilities, enabling developers to build tools that analyze, transform, or validate D code. The library serves as a foundational component for D language tooling ecosystems.

Target Audience

D language tool developers, compiler engineers, and those building IDE integrations, linters, or code formatters for the D programming language.

Value Proposition

Developers choose libdparse because it is a community-maintained, specialized parsing library for D that offers accurate AST generation and a flexible visitor pattern, making it easier to implement custom code analysis without building a parser from scratch.

Overview

Library for lexing and parsing D source code

Use Cases

Best For

  • Building custom linters for D codebases
  • Implementing D source code formatters or beautifiers
  • Creating IDE plugins with syntax highlighting and code navigation
  • Developing static analysis tools for D programs
  • Generating documentation from D source code
  • Writing refactoring tools for D projects

Not Ideal For

  • Projects that need to parse D code with deprecated features like class allocators and deallocators
  • Windows-only development teams due to unsupported testing on that platform
  • Applications requiring 100% compliance with the official D grammar without any parsing discrepancies

Pros & Cons

Pros

Configurable Lexical Analysis

Offers configurable lexer settings for tokenizing D source code, allowing customization based on tool requirements, as highlighted in the lexical analysis feature.

Reliable AST Generation

Uses a rollback allocator to generate abstract syntax trees from token streams, providing a stable foundation for code analysis and transformation, as described in the parser functionality.

Flexible Visitor Pattern

Implements an ASTVisitor class that simplifies traversing and inspecting parsed code structures, demonstrated in the example with custom visitor implementation.

Comprehensive Grammar Documentation

Includes automatically generated HTML documentation of the D grammar, aiding developers in understanding and implementing parsers without manual reference.

Cons

Platform Limitations

Testing is not supported on Windows, as stated in the README, which can hinder development and validation for cross-platform tools.

Grammar Inconsistencies

Has known differences with the official D grammar, such as in static array initialization syntax, potentially causing parsing errors in edge cases, as noted in the differences section.

Missing Deprecated Syntax

Does not support deprecated D features like class allocators and deallocators, limiting its use for analyzing legacy codebases, as admitted in the unsupported syntax list.

Frequently Asked Questions

Quick Stats

Stars125
Forks65
Contributors0
Open Issues21
Last commit5 months ago
CreatedSince 2014

Tags

#parsing#d#d-language#syntax-tree#dlang#language-tooling#compiler-tools#ast#abstract-syntax-tree#visitor-pattern#parser#static-analysis

Built With

D
D

Links & Resources

Website

Included in

D748
Auto-fetched 1 day ago

Related Projects

PeggedPegged

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

Stars549
Forks68
Last commit1 year ago
ctpgctpg

Compile-Time Parser Generator in D programming language.

Stars45
Forks2
Last commit11 years ago
Mono-D's DParserMono-D's DParser

Parser & Resolver & Abstract Completion library for D

Stars30
Forks7
Last commit6 years ago
Martin Nowak's LexerMartin Nowak's Lexer

lexer generator

Stars14
Forks2
Last commit12 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub