This utility parses source files and constructs diagrams for each interesting function found. This diagram shows the basic blocks of that function making it easier to understand what the code is doing. Also, this can help in refactoring.
It is written in Python and requires PLY to be installed. On Ubuntu, the
python-ply package is enough. the diagrams are created using DOT, thus
graphviz has to be installed too.
ixcode without arguments a short usage will be given. Full usage is
given by passing
A run needs at least the name of the file to be parsed. The user can supply a list of interesting functions, only them would be graphed later.
./ixcode.py test/simple.c -o outdir
-d argument only when writing a new grammar.
- Some diagrams are hard to understand without using colors. It is a DOT limitation though.
- This tool assumes that the code compiles successfully. It uses a more permissive grammar than C's and may give wrong results if the code is not legal.
- C grammar is incomplete
- Parse enums, structs and unions, finish C grammar
- Parse and graph
- Add a config file for colors
- Add support for Python too.
- Add regexp support for function matching
- Create a more interesting presentation for the tool.
- Prepare for ROSEdu CDL
- Make this list into a GitHub issues series.