Synopsis Tutorial

Stefan Seefeld

Version 0.10


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
Emulating A Compiler
Using Comments For Documentation
3. Scripting And Extending Synopsis
The ASG
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
The Python Parser
The IDL Parser
The Cpp Parser
The C Parser
The Cxx Parser
The Linker
Comment Processors
Comment Filters
Comment Translators
Transformers
The Dump Formatter
The DocBook Formatter
The Dot Formatter
The HTML Formatter
The SXR Formatter
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
C.1. C++ code snippet using Javadoc-style comments.
C.2. C++ code snippet using ReST-style comments.