[Python-Dev] AST mining (was Re: Direction of PyChecker)
David Goodger
dgoodger@bigfoot.com
Tue, 14 Aug 2001 00:44:52 -0400
>From the PyChecker AST discussion, it seems we may have a common goal. For
the Docstring Processing System, I am looking into gleaning information from
the abstract syntax tree. From the working notes, under "Docstring
Extractor":
We need code that scans a parsed Python module, and returns an
ordered tree containing the names, docstrings (including
additional docstrings), and additional info (in parentheses below)
of all of the following objects:
- packages
- modules
- module attributes (+ values)
- classes (+ inheritance)
- class attributes (+ values)
- instance attributes (+ values)
- methods (+ formal parameters)
- functions (+ formal parameters)
In order to evaluate interpreted text cross-references, namespaces
for each of the above will also be required.
I'd be very interested in pooling efforts to make this easier. I know almost
nothing about ASTs now, but that could change in a hurry :-).
--
David Goodger dgoodger@bigfoot.com Open-source projects:
- Python Docstring Processing System: http://docstring.sourceforge.net
- reStructuredText: http://structuredtext.sourceforge.net
- The Go Tools Project: http://gotools.sourceforge.net