A library or program or utility or something like that is needed so that you can determine, having the source code of a program, which methods (functions and procedures) this source code file uses. In addition, among them are those that:

  1. implemented by the programmer himself
  2. NOT implemented by the programmer himself (imported from other libraries or namespaces)

The source code can be written in:

  • C # (.NET platform)
  • C ++ (GNU C ++ 4.4.0)
  • C ++ (.NET platform)
  • Pascal (Free Pascal 2.2.4)
  • Delphi 7
  • Java 1.6

It is necessary that the code be analyzed (well, or at least all the methods were found) and the result recorded in some file, which could then be opened in its program for further analysis. Those. There is a project to which you need to "privatit" this utility or library or program.

Is there such a thing? And if not, then how best to implement the mechanism of parsing the code yourself?

  • For C ++ it is easier to compile, run nm on .o and parse its output. For Delphi / Pascal, you can probably dig in this direction too. The functions implemented by the programmer himself will be defined in these .o - avp

2 answers 2

You are not Exuberant Ctags , naparu with auxiliary tools are looking for, the case?

Upd: Although probably not, if only partially. It will not cover the whole range of languages. You can, however, for each language or two on the ready-made tool to pick up and make over this wrapper.

  • Just a great option! Thank! But how else to find out those methods that are CALLED in the code? - megacoder
  • The second link mentions cscope for C; for other languages, you need to find your own solutions, alas. This is exactly about the "upd" in the answer. - drdaeman

See source navigator ng . A tool for working with source codes. Predifined parsers for C / C ++ / Java / Tcl / php / Cobol / Fortran