Grammar Parsers
There are many projects that either parse D, or are generic parsers written in D. This page is intended for language grammar parsers, such as programs that parse C, C++, Java, and/or D. XML-libraries should be listed on a separate page (such as XML Libraries).
(The project list has been alphabetized to make it easier to find a project.)
Projects
ALLPaGeD
- Author: Jascha Wetzel
- Download: http://apaged.mainia.de/
- Description: an Attributed LL(*) Parser Generator for D
- Origin: side product of refactoring and extending Ddbg's expressions
- Notes:
- Has ability to do full semantic analysis for all grammars (that is, compute inherited and synthetic attributes for all non-cyclic attributed grammars).
- Very intuitive curly-brace style syntax that nicely wraps the D code you can write for the semantic actions
- Whitespace is customizable.
- Added a non-validating XML parser as an example. (It's actually usable if you need something simple.)
ANTLR-D
- Description: ANTLR is a lexer and parser generator for LL(k) grammars. It is written in Java and can generate lexers and parsers in (as of version 2.7.7) Java, C++, C# and Python. ANTLR-D is a modification which adds the possibility to generate D code as well.
- Project Page
- Initial announcement (contains wrong URL!)
BCD
- Description: BCD stands for Bindings to C[++] in D. Its most notable component is bcd.gen, which generates C or C++ bindings from .h files. Generated C++ bindings replicate the API of the underlying C++ code, but have a C layer as a gobetween, therefore requir both a D compiler and a C++ compiler. Generated C bindings are simply extern (C)'s and structs, and therefore only require a D compiler.
- Project Page
- Forum
- Initial announcement
Bindings
- Description: A bindings collection for D. Contains a D language parser and lexer.
- Files: demangle.d, dfilter.d, dlexer.d, dparse.d, dsymextract.d, dtypes.d).
- Project Page
Bud
- Description: Bud (formerly known as "Build") extends the work done by Dmake and Dbuild. It is a replacement for these tools. Build analyzes source files to determine how and when they need to be compiled and linked. Build can create libraries or executables. It removes the need for makefiles for D programs.
- Project Page
- Documentation
Dbuild
- Status: "mothballed" due to the quality of "vastly superior" Bud (formerly known as "Build") ( DsourceTopic:497)
- Description: Dbuild is an attempt at a comprehensive build solution for D. It makes use of embedded pragma() statements in d code to determine how files are built, linked and processed. It accomplishes this by way of an implementation of Boost::Spirit in D ( http://svn.dsource.org/projects/dsp/trunk/misc/dbuild/parser/).
- Project
- Download (dead link)
ddepcheck
- Description: ddepcheck finds the import dependencies of a D source file. The dependencies can be printed in the format used for dependencies by make, or in a 'propriety' format. The parsing is rather hackish, just searching for statements/keywords that are of relevance. The search is governed by switches; Phobos is blocked out by default, search paths can be added for external libraries, version and debug identifiers can be added, or version/debug checking can be turned off.
- Download
DDoc
- Description: Documentation Generation for D
- Project Page
- Forum
DeeWraptor
- Description: A Dee Wrapper Generator for C++. DeeWraptor is a set of Python scripts to generate a wrapper arround C++ libraries for the Digital Mars D programming language. It uses gccxml to retrieve an xml analysis tree and generate wrapping code. So far, I've managed to port a reduced set of the fltk library with it. Actually, I coded it especially to be able to port this library (from the project page).
- Project Page
- Initial announcement
Dflect
- Description: The dflect program consists of the Digital Mars D compiler front end modified to generate metadata about classes and modules. A sample test.d and the generated testinfo.d are included.
- Project Page
DGrammar
- Description: Grammar compiler/compiler for D which uses syntax like yacc - fully OOP
- Project Page
- Forum
Dimple
- Description: Dimple ("D import-list explorer") extracts import declarations from D source files and builds a dependency graph for visualization.
- Wiki Page: Dimple
Digc
- Description: digc is a compiler manager for the dmd compiler for D. It simplifies all tasks, makes distributing libraries a snap (and if you don't want to distribute your source, it protects it), and turns DLL creation in Windows from an exercise in obfuscated frustration into a seven-letter command-line parameter.
- Project Page
Dmake
- Description: dmake is a small commandline utility (less than 900 lines of D) that can be used to build applications and to develop freely within a system of unified source trees without thinking about library or project borders. Basically you enter "dmake mainsource" and dmake does the rest, it analyzes all import statements recursively and passes all necessary files to dmd to compile and/or link.
- Wiki Page: Dmake
DMD Front End Starter Kit (DMDFE)
- Description: The dmdfe program consists of the Digital Mars D compiler front end with the backend hooks stubbed out. The goal is to make it easy to write tools that can parse and do basic semantics analysis on D code. The pre-built dmdfe program prints debugging information to the command window as it parses and performs the semantics analysis. A sample D file "mandel.d" is included to experiment with. Based on DMD version 0.121. (from home page)
- Project Page
- Original Project Page (now down)
- Initial announcement
DParser
Two different projects go by the name "DParser".
- a D port of the DMD front end that exists as a full project at DsourceOrg called " DParser"
- a D template-based parser that exists as a sub-project of the Scrapple project
Enki
- Description: Enki is a frontend parser generator that uses an annotated EBNF syntax to produce .d sourcefiles.
- Project Page
- Initial announcement
- Version 1.1
Goldie
- Description: Goldie is a series of flexible open-source parsing tools, including a D2 parsing library called GoldieLib?. It's compatible with GOLD Parser Builder and can be used together with it, but does not require it. In fact, Goldie can be used as a cross-platform, shell-scripting-compatible alternative to GOLD Parser Builder.
- Project Page
- Forum
H2D
- Description: .h to .d conversion tool.
- Project Page
- Forum
HaxeD
- Description: Aims to compile Haxe code to D. Currently in its very early stages.
- Project Page
The Language Machine
- Description: The Language Machine is a toolkit for language and grammar which includes as an example a d-to-d translator implemented as frontend+backend rulesets in the lmn metalanguage. The d-to-d translator was written as a way of testing the toolkit and to investigate ways of compiling rules in the lmn language. The language machine consists of a shared library written in D, a minimal main program and compilers for the lmn metalanguage. The toolkit directly implements unrestricted analytic grammars - that is to say grammars where rules go from the sentences to the grammar and the rules are unrestricted in the Chomsky sense - both sides of any length, either side empty.
- Project Page
Lemonade
- Description: An Lalr Parser Generator for "D". Based on Lemon 1.0.
- Initial announcement
- Lemon parser generator for D V 0.01
- Compiling Lemonade on Ubuntu
- D example Scanner using re2c. (It can be used e.g. together with Lemonade.)
- Created a project for lemonade on Berlios
- project info
- webpage (not available yet?)
lr-lalr
- Description: A generic lr-lalr parser.
- Project Page
- Forum
- Downloads
Molt
- Description: A Java to D source-code converter.
- Project Page
- Forum
Ragel State Machine Compiler
- Description: "Ragel compiles finite state machines from regular languages into executable C, C++, Objective-C, or D code."
- Webpage
spiritd
- Description: A port of the boost::spirit::classic (c++) parser library to the D language. spiritd is a template meta library which allows convenient in-code creation of parsers for complex grammars.
- GitHub page
Related Wiki Pages
See also:
FolderProjects