xtext can easily create DSL, but how to create API document of DSL?
I created a DSL by xtext and write some library using this DSL. Then I want to publish my library, but how to generate API documentation for this library?
If I use some general programming language to write my library, there are many tools which can generate API document automatically. (eg: sandcastle, doxygen, ...)
So, is there any tools which can generate API document automatically?
Ideally, it can scan DSL source code and generate API document from DSL interface and comments automatically. The document generated is a form of html or chm, and suport symbol search.
assume that you have already a generator to create the sourcecode.
So what about to add another pass through the AST to generate the API for this sourcecode with
I can pass through the AST to generate some text (eg: extracting function name, params, comments,...), the text maybe a html.
But how to create high quality API documentation from these information?
Because I am not very familiar with HTML and CSS.
Ideally, I wish I only need to generate a xml/json/markdown which represent a document structure, some tool can read this file and generate beautiful API documentation automatically. The generated document can support symbol search and navigation.
If you have simple layout requirements you can autogenerate a *.textile or equivalent. You can re-use the Mylyn Wikitext/DocBook support to render in a variety of formats.
If you really want quality documentation then autogenerate Latex.
What you said is how to generate from scratch.
But what I really want is template.
For example, in MSDN we found in System Namespace types is classified to following categories: "Class Structures Interfaces Delegates and Enumerations". But If I have more categories in my DSL?
Can I generate document like MSDN, but not hack their tools (eg: sandcastle).