The srcml command-line program is now installed. Consult the man page (man srcml
) for more information. Example usage:
# Convert from a source file to srcML
srcml main.cpp -o main.cpp.xml
# Convert from srcML back to source code
srcml main.cpp.xml -o main.cpp
# Convert a code fragment to srcML
srcml --text="int a = b;" -l C++ -o fragment.cpp.xml
# Convert entire project to srcML
srcml --verbose project -o project.xml
If you installed the Development package, you can write applications directly using libsrcml. The package includes:
srcml.h
Include filelibsrcml.a
Static library