The parsing engines in our static analysis products are proprietary – developed in-house by PRQA engineers and language experts – and we enhance their capabilities and performance through continuous refinement and improvement. This approach of developing parsing components from scratch is the only certain way to provide leading edge analysis and user language advice from pre-processor through to in-depth semantic stages, and encompassing all the language complexities in-between.
Furthermore, each parsing engine for the C and C++ languages is separate, reflecting the unique static analysis requirements of each environment. The two languages, even within their shared subset of common features, have subtle but significant differences in semantic behavior. In addition, modern industrial-scale C development environments need to handle a wide range of compiler extensions. Similarly, modern C++ development environments have equally challenging needs, from supporting an extensive array of libraries to handling the new language features in C++11 alongside historical compiler dialects.
Of course, we recognize that bundling the parsing engine for C and C++ together would greatly reduce our development efforts, but our experience shows that a common parser significantly impacts the fidelity of the output. In comparison, the approach adopted by many other static analysis suppliers is to use an “off-the-shelf” parser (eg EDG) and use the one common parser to analyze both C and C++. In some cases, the parsing engine is stretched further to cover other languages such as Java and C#. This abstraction and the generic nature of the subsequent analysis ignores the nuances of each specific language and further blunts the fidelity of the output.