Parsing other languages -> function map

Discussion in 'Python' started by Richard Shea, Jul 20, 2004.

  1. Richard Shea

    Richard Shea Guest

    Hi - [This is a Python question - bear with me !] I've got quite a
    number of PHP scripts which include many functions which call each
    other. I'm interested in having a means to determine which function
    gets called from which other functions.

    I feel I could do this using Python without too much pain (although
    the output of the raw data will be a bit more tricky) but before I
    started I wondered if anyone here could suggest an existing code base
    which would give me a flying start ? I've had a look in Parnassus but
    there's nothing very obvious there.

    I feel sure my requirement is an instance of a much more general
    requirement which has probably been solved many times over.

    Be interested to hear from anyone with bright ideas.

    thanks

    richard shea.
     
    Richard Shea, Jul 20, 2004
    #1
    1. Advertising

  2. Richard Shea

    Steve Guest

    Hi Richard,

    On 19 Jul 2004 17:52:32 -0700, Richard Shea <> wrote:
    > Hi - [This is a Python question - bear with me !] I've got quite a
    > number of PHP scripts which include many functions which call each
    > other. I'm interested in having a means to determine which function
    > gets called from which other functions.


    I use cscope ( http://cscope.sourceforge.net/ ) for most of my
    code browsing (actually cscope+the cscope_maps.vim plugin). Although
    it was designed for looking at C code, due to the fact that it's
    parsing is more text oriented rather than specific to any language, it
    does a great job with python. I suggest you give it a spin with php
    code and see how things work.

    At a tangential thread, the idea of a tool like cscope which can
    support different languages using a plugin mechanism is really
    appealing. There always are things like source-navigator (
    http://sourcenav.sourceforge.net/ ) , but that is more of an IDE
    including the kitchen-sink, which I personally do not like. It'd be
    cool to have a tool that just does one thing and does it properly,
    also, the coolness factor increases tremendously when the output can
    be obtained at stdout because we can then write a nice lil' plugin for
    our editor and instantly gloat that the _other_ editor cannot do this
    :).
    I'd be interested in writing one up if there is someone out there
    who could help out with the design and stuff. (pyscope anyone ?)


    Regards
    Steve
     
    Steve, Jul 20, 2004
    #2
    1. Advertising

  3. Richard Shea

    Miki Tebeka Guest

    Hello Richard,

    > Hi - [This is a Python question - bear with me !] I've got quite a
    > number of PHP scripts which include many functions which call each
    > other. I'm interested in having a means to determine which function
    > gets called from which other functions.
    >
    > I feel I could do this using Python without too much pain (although
    > the output of the raw data will be a bit more tricky) but before I
    > started I wondered if anyone here could suggest an existing code base
    > which would give me a flying start ? I've had a look in Parnassus but
    > there's nothing very obvious there.

    pychecker (http://pychecker.sourceforge.net/) has an option to check for
    unreachable code (-8).

    HTH.
    Bye.
    --
    ------------------------------------------------------------------------
    Miki Tebeka <>
    http://tebeka.spymac.net
    The only difference between children and adults is the price of the toys
     
    Miki Tebeka, Jul 20, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave Rudolf
    Replies:
    6
    Views:
    1,278
    Mark Thornton
    Jan 14, 2004
  2. =?iso-8859-1?B?bW9vcJk=?=

    Use Java classes in other languages

    =?iso-8859-1?B?bW9vcJk=?=, Nov 22, 2005, in forum: Java
    Replies:
    3
    Views:
    337
    Jeffrey Schwab
    Nov 22, 2005
  3. =?iso-8859-1?B?bW9vcJk=?=

    Compilers migrate other languages to JVM?

    =?iso-8859-1?B?bW9vcJk=?=, Mar 1, 2006, in forum: Java
    Replies:
    1
    Views:
    406
    Chris Uppal
    Mar 1, 2006
  4. Mike
    Replies:
    1
    Views:
    1,159
    Patrick TJ McPhee
    Nov 21, 2003
  5. Diego
    Replies:
    2
    Views:
    151
    Stefan Rusterholz
    Aug 16, 2008
Loading...

Share This Page