Semantic C code indexing and query tool

Semantic C code indexing and query tool

Daniel Shahaf d.s at daniel.shahaf.name
Mon May 14 10:35:36 IDT 2012


Baruch Siach wrote on Mon, May 14, 2012 at 07:34:56 +0300:
> Hi linux-il,
> 
> I'm looking for a tool that can do semantic search is a body of C code.  
> Example query: "give me all references to field y in struct x defined in file 
> z.h". I would prefer an open source, command line driven tool. C++ support is 
> an advantage. Does such a tool exist?
> 

exuberant ctags.  Support for C/C++ struct members is enabled by default
(see `--list-kinds` output).

ctags \
        --extra=+fq --fields=+S \
        --c-kinds=+p --c++-kinds=+p --langmap=c:+.h \
        --regex-c='/ERRDEF\((.*),/\1/e/' \
        --langmap=sql:.sql.sql3 \
        -R "$@"


> baruch
> 
> -- 
>      http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
>    - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
> 
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il



More information about the Linux-il mailing list