Experiences in building C++ front end

Fuqing Yang, Hong Mei, Wanghong Yuan, Qiong Wu, Yao Guo · ACM SIGPLAN Notices · 1998

It is difficult, if not impossible, for the code analyzers to employ front end from compilers, because these front ends extract different program information using different strategy. This paper describes our experiences in building C++ front end as a part of code analysis toolset. The front end customizes the lexical analyzer incorporating a special preprocessing technique to accurately associate program entities with physical source code location. To support analysis of different C++ languages, the front end employs YACC to generate the parser, and uses token lookahead technique to disambiguate C++ grammar for YACC.

Read the paper · More papers on PaperTik