March 17, 2003

Newest Source Code - March 17

This is everything. It loads files, it parses them, it adds the comments.

An explanation about parser:
1. First parseFile(File, File) is called. This opens the files... but the input file is actually completely read into the string fileString. fileIndex is the pointer to where the simulated reader is (you'll have to trace the code to get a feel for it... there are functions readChar, prevewChar, readString to help you).
2. Next dataMine() is called. This first reads in any pre-comments the file may have (comments at the top of the code before any other code). Then it loops through all the functions and reads in comments. Look at the FunctionData class to see how this is stored. The comments before and inside the function are added to the FunctionData (the name of the function is discovered in the middle of this, and after that it uses braces to find the end of the function).

Please trace through the code to see what is happening. Included is fork.c, from the linux kernel, that I used to test it out.

Download file

Posted by Matt Quigley at March 17, 2003 07:36 PM
Comments
Post a comment