code indexer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin Collins

    code indexer

    Hi,

    I posted this message a few days ago in comp.unix.shell and got zero
    responses. Can anyone here point me in the right direction?

    Thanks,

    Kevin
    -----

    Hi,

    does anyone know of a tool I can use to create an index / search
    engine for source code (ksh, sh, bash, perl, tcl, expect, awk, C,
    java, etc)?

    I'm thinking of something that would generate an index based on
    keywords, "text", operators, functions, etc... I'm sure I can't be the
    1st person to want something like this and I don't want to re-invent
    the wheel.

    I've looked at Exhuberant Ctags and its not quite what I need, but its
    in the general vicinity.

    I suspect that I could somehow use ViM syntax-highlighting to produce
    indices on a file-by-file basis somehow since it knows all the "stuff"
    I want to index for all those languages (it needs to for the
    highlighting).

    Any ideas?

    Thanks,

    Kevin
  • Kris Wempa

    #2
    Re: code indexer

    You can pretty much use any language that can build a parser for each of the
    languages you want to do that for. I used a program called 'cscope' which
    did something like that for C. You could type in a symbol and what you were
    specifically looking for (definition, prototype, instance, etc.) and it
    would search an entire directory structure for it. Your problem however is
    far more complicated since you want it to apply to multiple languages.
    Therefore, you would basically need a builtin parser for EACH language. I
    would recommend getting the source code to one of the newer editors such as
    the 'vim' that comes with Linux. This tool changes the color of your text,
    depending on what type of file you are editing. It seems understand quite a
    few languages and does a surprisingly good job. So far, it's worked on
    HTML, C, Perl, C++, shell scripts and .conf files.

    Kris

    "Kevin Collins" <spamtotrash@to omuchfiction.co m> wrote in message
    news:a6882f32.0 309260942.3a551 8e5@posting.goo gle.com...[color=blue]
    > Hi,
    >
    > I posted this message a few days ago in comp.unix.shell and got zero
    > responses. Can anyone here point me in the right direction?
    >
    > Thanks,
    >
    > Kevin
    > -----
    >
    > Hi,
    >
    > does anyone know of a tool I can use to create an index / search
    > engine for source code (ksh, sh, bash, perl, tcl, expect, awk, C,
    > java, etc)?
    >
    > I'm thinking of something that would generate an index based on
    > keywords, "text", operators, functions, etc... I'm sure I can't be the
    > 1st person to want something like this and I don't want to re-invent
    > the wheel.
    >
    > I've looked at Exhuberant Ctags and its not quite what I need, but its
    > in the general vicinity.
    >
    > I suspect that I could somehow use ViM syntax-highlighting to produce
    > indices on a file-by-file basis somehow since it knows all the "stuff"
    > I want to index for all those languages (it needs to for the
    > highlighting).
    >
    > Any ideas?
    >
    > Thanks,
    >
    > Kevin[/color]


    Comment

    Working...