Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > dd7a95aabe1c049ac9f84beede8143d3 > files > 1973

synopsis-doc-0.12-4.fc14.i686.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Python Parser</title><link rel="stylesheet" href="synopsis.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="index.html" title="Synopsis Tutorial" /><link rel="up" href="processors.html" title="Chapter 4. Processor Design" /><link rel="prev" href="processors.html" title="Chapter 4. Processor Design" /><link rel="next" href="idl-parser.html" title="The IDL Parser" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The Python Parser</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="processors.html">Prev</a> </td><th width="60%" align="center">Chapter 4. Processor Design</th><td width="20%" align="right"> <a accesskey="n" href="idl-parser.html">Next</a></td></tr></table></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="python-parser"></a>The Python Parser</h2></div></div></div><p>The Python parser expects Python source files as input, and compiles them into
        an Abstract Semantic Graph. Note that directory names are valid input, too, if they
        correspond to Python packages, i.e. have an <code class="filename">__init__.py</code> file in them.
        At this time, this compilation is based purely on static
        analysis (parsing), and no runtime-inspection of the code is involved.</p><p>This obviously is obviously only of limitted use if objects change at runtime.</p><p>The found docstrings are identified and attached to their corresponding objects.
        If a <code class="varname">docformat</code> specifier is provided (either in terms of a 
        <code class="varname">__docformat__</code> variable embedded into the Python source or the definition
        of the parser's <code class="varname">default_docformat</code> parameter, this format is used to
        parse and format the given docstrings.</p><p>Here are the available Python-Parser parameters:</p><div class="variablelist"><dl><dt><span class="term">primary_file_only</span></dt><dd><p>If false, in addition to the primary python file imported modules are parsed,
              too, if they are found.</p></dd><dt><span class="term">base_path</span></dt><dd><p>A prefix (directory) to strip off of the Python code filename.</p></dd><dt><span class="term">sxr_prefix</span></dt><dd><p>If this variable is defined, it points to a directory within which
              the parser will store cross-referenced source code. This information may
              be used to render the source code with cross-references during formatting.</p></dd><dt><span class="term">default_docformat</span></dt><dd><p>Specify the doc-string format for the given python file. By default doc-strings
               are interpreted as plaintext, though other popular markup formats exist, such as
               ReStructuredText (<code class="varname">rst</code>), or JavaDoc (<code class="varname">javadoc</code>)
            </p></dd></dl></div></div><div class="navfooter"><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="processors.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="processors.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="idl-parser.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 4. Processor Design </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> The IDL Parser</td></tr></table></div></body></html>