Abstract:This article utilizes G++ (GCC) feature, extracts its front-end language analysis part, researches its front-end preliminarily, and restructs the independent application programme to analyze the input source code and produce the report. The purpose of code analysis is to supply the statistical information, the structure information, even the deeper level's pattern information of code for programmers, to help them understand and master the structure, the frame and the pattern of programme well, so as to provide reference of improving and restructuring code.