Ddoc
   HOME

TheInfoList



OR:

Ddoc is a compiler-embedded documentation generator and associated syntax, for the
D programming language D, also known as dlang, is a multi-paradigm system programming language created by Walter Bright at Digital Mars and released in 2001. Andrei Alexandrescu joined the design and development effort in 2007. Though it originated as a re-engineer ...
, designed by
Walter Bright Walter G. Bright is an American computer programmer who created the D programming language, the Zortech C++ compiler, and the ''Empire'' computer game. Early life and education Bright is the son of the United States Air Force pilot Charles D. ...
. 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 ( ) is a documentation generator and static analysis tool for software source trees. When used as a documentation generator, Doxygen extracts information from specially-formatted comments within the code. When used for analysis, Doxyge ...
and
Javadoc Javadoc (originally cased JavaDoc) is a documentation generator created by Sun Microsystems for the Java language (now owned by Oracle Corporation) for generating API documentation in HTML format from Java source code. The HTML format is used for ...
. 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 The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaSc ...
. 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 Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable ...
and
XHTML Extensible HyperText Markup Language (XHTML) is part of the family of XML markup languages. It mirrors or extends versions of the widely used HyperText Markup Language (HTML), the language in which Web pages are formulated. While HTML, prior ...
.


Compiler options

Several compiler options are available to cause the dmd D compiler to output an HTML documentation file: * generate documentation - output will be the same name as the D source file, with the ".d" extension replaced with ".html". * write documentation file to directory, output filename is the same as from the -D option. * write documentation file to filename (does not automatically append .html extension)


External links


Ddoc specificationCandyDoc - set of advanced macros for Ddoc
{{programming-software-stub Free documentation generators