Synopsis Tutorial

Stefan Seefeld

Version 0.9


Table of Contents

1. Introduction
Inspecting code
Internal representations
Documenting source code
The synopsis processing pipeline
2. Using the synopsis tool
Option handling
Parsing source code
Using comments for documentation
3. Scripting and extending synopsis
The AST
The Processor class
Composing a pipeline
Writing your own synopsis script
Importing all desired processors
Composing new processors
Defining new processors
Exposing the commands
4. Processor design
Python Parser
IDL Parser
Cpp Parser
C Parser
Cxx Parser
Linker
Comment Parsers
Dump Formatter
ASCII Formatter
Docbook Formatter
Dot Formatter
HTML Formatter
SXR Formatter
5. Extending synopsis with the C++ API
A. Description of program options for the synopsis executable
B. Listing of some Processors and their parameters
Synopsis.Parsers.Python.Parser
Synopsis.Parsers.IDL.Parser
Synopsis.Parsers.Cpp.Parser
Synopsis.Parsers.C.Parser
Synopsis.Parsers.Cxx.Parser
Synopsis.Processors.Linker
Synopsis.Processors.MacroFilter
Synopsis.Processors.Comments.Filter
Synopsis.Processors.Comments.Translator
Synopsis.Formatters.Dot.Formatter
Synopsis.Formatters.Dump.Formatter
Synopsis.Formatters.Docbook.Formatter
Synopsis.Formatters.Texinfo.Formatter
Synopsis.Formatters.HTML.Formatter
Synopsis.Formatters.SXR.Formatter
C. Supported documentation markup
Javadoc
Restructured Text

List of Examples

1.1. Typical C++ code documentation
1.2. Python code documentation