| Version 1.9 Build 803
|
|
Next: Language and Comment Elements
Up: Document Generation
Previous: Document Generation
The introduction of a structuring language for comments implies a mixing
at some level of the language being documented and the language in which
the documentation is expressed. This mixing can happen in one of three
ways:
- Provide a system which can integrate the languages at a level higher than
the file level. In this way, the system would provide mechanism to edit
code where the code would be brought up in the programmers favorite
editor, but the documentation would be brought up in a SGML editor. This
gives the best of both worlds. A text editor is used for code, but a more
powerful WYSIWYG editor can be used to construct the documentation.
- Provide a system where the code is described as part of the documentation
system. In this system, the code is extracted from the documentation for
compilation purposes. This is the literate programming environment
envisioned by Knuth.
- Provide a system where the structure of the documentation is described
inside of comments in the source code, and then the whole thing is
massaged into a useful shape by a processor which turns the code/comment
combination into a nice document.
Of these three alternatives I think the first is the cleanest, and it
could be the most programmer friendly. However, it also involves the
most work, especially if it is to be truly programmer friendly. It involves
much more work than the latter two options. In addition, it would require
a great deal of trial and error to arrive at a system which was flexible
enough to be used for serious development. The second choice seems nice
in theory, but I fear that this ``literary'' nature of development is
quite foreign to many developers. The extra processing of turning
documentation into code could also add too much extra time in the
edit-compile-debug loop for it to be useful in practice. Thus, the
third alternative was chosen. It has the advantage that the source is
always kept in a state which can be compiled.
Reference documents will be assembled out of the
documentation in the comments and the information extracted directly
from the source code. This mixing of source code objects and comment
objects in the same place requires a processor to mesh the two
languages and rearrange the derived SGML objects into a coherent
reference document.
Next: Language and Comment Elements
Up: Document Generation
Previous: Document Generation
Contents
Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc.,
Washington, D.C.
Return to AIPS++ Home Page
2004-08-30