Package yagdoc :: Module scanner
[show private | hide private]
[frames | no frames]

Module yagdoc.scanner

Scanning individual declarations in the parse tree.
Classes
Declaration One documentable declaration.
Scanner Declaration scanner.
Tree Expanded parse tree branch.

Exceptions
AnonymousError Declaration has no top-level name
EnumValueClashError Multiple definitions of an enum value
NameClashError Multiple definition of symbol
ScannerError Base class for scanner exceptions
TypeStructMergeError Failed to merge struct and typedef

Function Summary
  classify_macros(decls)
Classify macros.
  find_name(tree, tokens, level)
Find the name of a declaration from its unexpanded parse tree.

Function Details

classify_macros(decls)

Classify macros.

Heuristically sets Declaration.macro_kind field of macro declarations to 'prototype' (function-like), 'typedef' (data structure), or 'constant' (anything else).

This is not a Scanner method to make it applicable on larger declaration sets than one scanner typically contains.
Parameters:
decls - Declarations.
           (type=dict of Declaration)

find_name(tree, tokens, level=0)

Find the name of a declaration from its unexpanded parse tree.
Parameters:
tree - Parse tree in simpleparser.parse form as produced by parser.Parser.
           (type=list of (node, start, end, subtree) nodes)
tokens - Token soup corresponding to tree from parser.Parser.
           (type=list of tokens)
level - Used internally for recursion into function-like types. Should be ignored.
           (type=int)

Generated by Epydoc 2.1 on Fri Oct 5 00:36:53 2007 http://epydoc.sf.net