procedure main( args ) write(&version) every write(&features) end
Input: Your program should take take as input command line arguments the names of source file(s) of interest.
Output: Your program should write a JSON file containing a "dictionary" whose keys are filenames, and whose values are a dictionary whose keys are function or class names. If the object is a function, per Hirose the dictionary value should be a list of the names of functions called. If the object is a class, the value should be a dictionary whose keys are member function names and whose values are are a list of names of functions called by that member function.
Example #1: for a "hello, world" program named hello.icn, the program
would be invoked as hirose hello.icn
and the output might
look like:
{"hello.icn" : {"main" : ["write"]} }
Example #2: for a program with modules a.cpp, b.cpp, and c.cpp, with a.cpp containing a() which calls b() in b.cpp, which calls c() in c.cpp, the output might look like:
{"a.cpp": {"a" : ["b"]}, "b.cpp": {"b" : ["c"]}, "c.cpp": {"c" : []} }
Example #3: for the "Linked Robots" program from chapter 7 of Terence Soule's "A Project Based Introduction to C++", a larger C++ example that contains a class might look like:
{"main.cpp": {"main" : ["robot", "linkedlist::insert", "linkedlist::print", "linkedlist::turnLeft", "linkedlist::remove"]}, "node.h": {}, "linkedlist.h": {"linkedlist" : {"linkedlist": [], "insert" : ["node::set_data", "node::set_next"], "print": [], "turnLeft": [], "remove": ["node::get_data", "robot::getID", "node::get_next", "node::remove_data", "node::remove"] } } }