= LangScan * http://gonzui.sourceforge.net/langscan/index.html.en * Gem version * http://github.com/mallowlabs/langscan == DESCRIPTION: program analyzer for source code search engine == FEATURES/PROBLEMS: * Support Languages * C * C++ * C# * Java * JavaScript * Ruby * Python * PHP * Perl * Objective Caml * Brainfuck * CSS * Shell Script * Emacs Lisp * Scheme * Plain Text * Io * Lua * Eiffel == SYNOPSIS: === Example1 % cat -n hello.c 1 #include 2 3 int main(int argc, char **argv) 4 { 5 printf("Hello World.\n"); 6 return 0; 7 } % ruby -rlangscan/c -e 'LangScan::C.scan(ARGF.readlines.join) {|f| p f}' < hello.c # # # # # # # ... === Example2 % cat -n display_fundef.rb 1 require 'langscan' 2 3 # display all function definitions. 4 ARGV.each {|arg| 5 next unless scanner = LangScan.choose(arg) 6 scanner.scan(File.open(arg).readlines.join) {|f| 7 if f.type == :fundef 8 puts f.text 9 end 10 } 11 } % ruby display_fundef.rb hello.c main == REQUIREMENTS: * Ruby 1.8.2+ * Perl + PPI module (for source codes written in Perl) * OCaml (for source codes written in OCaml) == INSTALL: * sudo gem install langscan == LICENSE: Copyright (C) 2004-2005 Satoru Takabayashi All rights reserved. This is free software with ABSOLUTELY NO WARRANTY. You can redistribute it and/or modify it under the terms of the GNU General Public License version 2. == AUTHORS: see 'AUTHORS.txt'