"SilentBob" is a tool to help a programmer/team manager to digest and comprehend either a simple program or a big source code tree based on the source code by presenting the code in a searcheable and tagged way. It helps to speed up the learning curve and to make it more convenient to get hands on a code from somebody, or also is convenient to browse your own projects. It includes functionality from such tools as: ctags, cscope and ctree, but it is faster than any of them, and is offering the features in one package. In some way it can be viewed as a superset of ctags, cscope and ctree.
If you don't know what it does:
It simply creates special file named tags (or ctags), which stores information about some source files.
Mostly it is used to browse large source projects like:
OS kernels, sendmail, apache and other big projects.
This file contains "Addresses" of all functions, structures, macros, etc. "Address" means file name + string number (or regular expression, using which an appropriate string can be located). The tags file, in Vim for example, can
be used to evaluate ":tag
Also a very useful program. It doesn't create a file described above, but can perform lookups and has some additional features. It has:
In theory, it should have shown all of the above information and several layers "lower". But in practice, I couldn't make it work.
In SilentBob these problems are absent. The application uses a custom preprocessor (written by me) rather than the regexps.
The preprocessor mentioned above is called "THE_TT" and placed in
Actually it's operation is quite simple: it removes all "extras" from C/C++ source. It removes/minimizes all variants of C code notations, removes all extra space symbols and comments, adds additional spaces where it's necessary (for example, before brackets). THE_TT allows to take some part of code and exactly (about 99%) tell you what is it, using minimum of checks. All this works quite fast (for example, 1.6 GHz processor, 256 Mb of RAM - works excellent), which allows to do many interesting things. As far as I know, such kind of code usually is written only to compilers and isn't used for other things, what, as for my view, isn't good enough.
Next SilentBob's level - "t_op", "what_is_this" and alike functions. First of them simply allows to enumerate all "operators" of source code, second - checks, what kind of operator do we met. Actually, "what_is_this" isn't quite enough for all, so some additional functions exists... Now, THE_TT and t_op are two separate parts of program. In future I plan to unite them...
It took me about one month to develop current version (1.0-rc1) and two months for testing, finding out bugs, etc.
sf.net project : link
© Oleg Puchinin 2006-2007
contact: graycardinalster at gmail dot com