Synopsis is a documentation extraction tool. Its modular design allows multiple parsers, formatters, and an extendable Linker between the two. It allows intermediate storage of the parsed data, which means you can use Makefiles to incrementally update documentation as your program develops.

The syntax for running synopsis is generally:

    synopsis -p parser -Wp,parser,options -o file.syn file.idl

    synopsis -f formatter -Wf,formatter,options -o output file1.syn file2.syn

These two steps parse an input file and save the generated AST (abstract syntax tree) to a .syn file. Then the saved AST is loaded, probably from more than one file, and passed to the formatter to generate output. You can combine both these steps if you wish, but it is generally better to use the intermediate .syn storage to allow incremental updates.

Some formatters, ie HTML, allow storage of a list of links (Table Of Contents - TOC) which may be used by other parts of the project to link between languages or even between websites. You could provide a .toc file on your website, and other people using your library can use it to link their documentation directly to your site.

Passing options to the parser or formatter follows a similar convention to gcc -- they are specified as a comma-separated list of options in the appropriate -W option (see above). The best way to pass options though is to use a config file, specified with the -c option. See Config for more information on this powerful tool.

For further information about the various parsers, formatters and the linker, see:

Prev | Up | Next Parsers

Synopsis Documentation. Copyright (c) 2001 by Stephen Davies