Python parser for cross references

holger krekel pyth at devel.trillke.net
Thu Sep 5 02:22:33 CEST 2002


Howard Lightstone wrote:
> I would like to use Source Navigator to (re)examine a largish application.
> It parses the C, C++,assembly and Python jobs I am working right now and 
> has outputs that *statisfy* the naive QA people who think tables and 
> diagrams are *documentation*.
> 
> The Python parser for it was written by Thomas Heller (thank you very 
> much).
> 
> However, it does not emit cross reference information.  Of course, I first 
> thought "why not just add one?".  I can see why Mr. Heller did not.
> 
> A cross reference parser has to track scope....and determine function calls 
> within argument lists.....and track just 'name' references which are passed 
> around...and on and on.
> Is there a (C) parser for Python around which does a "just-good-enough" 
> parsing job to be adapted for this?

I don't think you could do this with a parser. 

It requires getting type information and that is only possible if
you run a program.  You probably would have to trace a program 
to get information which names refer to which object type(s).

regards,

    holger





More information about the Python-list mailing list