The commonly available software metrics-extraction tools for C/C++ depend on commercial preprocessors to preprocess the source file before being input into the analyzers. The following paper introduces a Java compiler generator called JavaCC and the application of the generator to develop a Java-based preprocessor for C/C++. Some technical features to the development of preprocessor are also mentioned, such as (1) handling of rescanning in preprocessing with LL(k) parsers, (2) managing conditional compiling with the state-based features of the lexical analyzer in JavaCC, and (3) resolving macro replacement and expansion with parsers.
Succi G, Wong R (1999). The Application of JavaCC to Develop a C/C++ Preprocessor. APPLIED COMPUTING REVIEW, 7, 11-18.
The Application of JavaCC to Develop a C/C++ Preprocessor
Succi G;
1999
Abstract
The commonly available software metrics-extraction tools for C/C++ depend on commercial preprocessors to preprocess the source file before being input into the analyzers. The following paper introduces a Java compiler generator called JavaCC and the application of the generator to develop a Java-based preprocessor for C/C++. Some technical features to the development of preprocessor are also mentioned, such as (1) handling of rescanning in preprocessing with LL(k) parsers, (2) managing conditional compiling with the state-based features of the lexical analyzer in JavaCC, and (3) resolving macro replacement and expansion with parsers.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.