Abstract:To avoid the overload with details of the manual audit, this paper builds a compiler of C by using two important tools LEX and YACC of UNIX. It adds ourown code to output the relation of function invoked or invoking, while processing the lexical analysis and syntax analysis. Furthermore, the relation table will be put in the database so that it can be listed, queried and counted to maintain the source code.