Ddoc
Encyclopedia
Ddoc is the embedded documentation generator
Documentation generator
A documentation generator is a programming tool that generates documentation intended for programmers or end users , or both, from a set of specially commented source code files, and in some cases, binary files....

 for the D programming language designed by Walter Bright
Walter Bright
Walter Bright is a computer programmer known for being the designer of the D programming language. He was also the main developer of the first C++ compiler that translated directly to object without going via C, Zortech C++ . Before the C++ compiler, he developed the Datalight C compiler, also...

. Its emphasis is on being able to write documentation in code comments in a natural style, minimizing the need for embedded markup and thus improving the legibility of the code comments. It is similar in concept to Doxygen
Doxygen
Doxygen is a documentation generator for multiple programming languages.Doxygen is a tool for writing software reference documentation. The documentation is written within code, and is thus relatively easy to keep up to date...

 and Javadoc
Javadoc
Javadoc is a documentation generator from Sun Microsystems for generating API documentation in HTML format from Java source code.The "doc comments" format used by Javadoc is the de facto industry standard for documenting Java classes. Some IDEs, such as Netbeans and Eclipse automatically generate...

.

Code comments are associated with symbols in the code, and Ddoc uses the semantic and syntactic information available from the D compiler to fill in routine information such as parameters and return types automatically.

The code comments and symbol table information are processed by Ddoc into an internal structured format. Each of these structures corresponds to a template expressed as a macro. The template macros convert the structured format into another set of macros that express the markup. The latter set of markup macros are expanded to produce, by default, HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

.

Both the template macros and the markup macros can be overridden by the user, and can be applied via external files analogous to HTML style sheets. The template macros can be changed to customize the high level formatting, and the markup macros can be altered to produce other output forms such as XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 and XHTML
XHTML
XHTML is a family of XML markup languages that mirror or extend versions of the widely-used Hypertext Markup Language , the language in which web pages are written....

.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK