Synopsis provides multiple representations of the parsed code, on different levels of granularity. Some of them are exposed using Python, some using C++.


Synopsis contains two basic parts: A C++ library, providing an API to parse and analyze C and C++ source files, as well as a Python package to parse and analyze IDL, C, C++, and Python code. While the former provides fine-grained access to the low-level representations such as Parse Tree and Symbol Table, the latter operates on an Abstract Semantic Graph.

Most of the Processorclasses from the Python API are written in pure Python, but some (notably the parser classes) are actual extension modules that use the low-level APIs from the C++ API.

Code Layout

Following the hybrid nature of the project, the source layout has two more or less separate root directories. Synopsis/ provides the Synopsis Python package, while src/ contains the sources for the C++ API.