Last update April 6, 2012

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.)

Table of contents of this page
Projects   
ALLPaGeD   
ANTLR-D   
BCD   
Bindings   
Bud   
Dbuild   
ddepcheck   
DDoc   
DeeWraptor   
Dflect   
DGrammar   
Dimple   
Digc   
Dmake   
DMD Front End Starter Kit (DMDFE)   
DParser   
Enki   
Goldie   
H2D   
HaxeD   
The Language Machine   
Lemonade   
lr-lalr   
Molt   
Ragel State Machine Compiler   
spiritd   
Related Wiki Pages   


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.)
(adapted from ALLPaGeD v0.1 release and ALLPaGeD v0.2 release)

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    

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    

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    

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".

  1. a D port of the DMD front end that exists as a full project at DsourceOrg called " DParser"
  2. a D template-based parser that exists as a sub-project of the Scrapple project

Enki    

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    

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    

lr-lalr    

Molt    

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
FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: April 6, 2012 15:13 (diff))