It is part of the token parser, similar to the source code analyser, but skip the part on turning out the object code like a compiler. Instead it produces the source code. Furthermore, some compiler also produce the assembly code.
What about the tools that helps to browser source code like ctags and cscope? They also implement some of the functionalites too.
https://www.carlosag.net/tools/codetranslator/
https://github.com/ivmai/JCGO bacon Basic to C toba
https://www.reddit.com/r/csharp/comments/49daud/converting_this_from_java_to_c/
https://en.wikipedia.org/wiki/Translator_(computing)
- select the files to be added.
find . -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" > cscope.files
cscope -q -R -b -i cscope.files
cscope -d
#!/bin/bash
LNX="."
echo "Finding relevant source files..."
find $LNX \
-path "$LNX/arch/*" ! -path "$LNX/arch/x86*" -prune -o \
-path "$LNX/include/asm-*" ! -path "$LNX/include/asm-generic*" \
! -path "$LNX/include/asm-x86*" -prune -o \
-path "$LNX/tmp*" -prune -o \
-path "$LNX/Documentation*" -prune -o \
-path "$LNX/scripts*" -prune -o \
-name "*.[chxsS]" -print > $LNX/cscope.files
echo "Building cscope database..."
time cscope -q -k -b -i cscope.files
exit 0
- -C disables case-sensitive search (this can also be toggled from within Cscope with Ctrl-c).
- -p4 causes Cscope to prepend the directories (up to 4) leading to a source file in your tree when displaying its results.
- Pressing Ctrl-b allows you to search for previous search terms again.
Reference: https://courses.cs.washington.edu/courses/cse451/12sp/tutorials/tutorial_cscope.html