Parsing C++ Despite Missing Declarations

  • Authors:
  • Gregory Knapen;Bruno Laguë;Michel Dagenais;Ettore Merlo

  • Affiliations:
  • -;-;-;-

  • Venue:
  • IWPC '99 Proceedings of the 7th International Workshop on Program Comprehension
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper addresses the problem of parsing a C++ software system that is known to compile correctly, but for which some header files are unavailable. A C++ program file typically depends on numerous included header files from the same system, a third party library, or the operating system standard libraries. It is not possible with a conventional parser to analyze C++ source code without obtaining the complete environment where the program is to be compiled. This paper studies the parsing ambiguities resulting from missing header files and proposes a special parser which uses additional rules and type inference in order to determine the missing declarations. This new parser has achieved 100% accuracy on a large system with numerous missing header files.