Parsing Minimization when Extracting Information from Code in the Presence of Conditional Compilation
نویسندگان
چکیده
Exploring and understanding a software system requires extracting meaningful information from it. This in turn involves syntactical analysis of source code, an activity that can be complicated by the use of conditional compilation. In this paper, we discuss difficulties when parsing code with conditional compilation. We argue that the effective way to ensure the extraction of all meaningful information from a source file is to parse a set of versions of that file defined by conditional compilation. We then describe a heuristic-based approach to minimize the amount of parsing.
منابع مشابه
Minimizing Parsing when Extracting Information from Code in the Presence of Conditional Compilation
Exploring and understanding a software system require parsing its source code to extract necessary information. This task is complicated by the use of conditional compilation, a means o ered by several programming languages for selective compilation of source code based on conditions. In this paper, we discuss the di culties in parsing code with conditional compilation. We argue that the e ecti...
متن کاملParsing All of C by Taming the Preprocessor NYU CS Technical Report TR 2011 - 939
Given the continuing popularity of C for building large-scale programs, such as Linux, Apache, and Bind, it is critical to provide effective tool support, including, for example, code browsing, bug finding, and automated refactoring. Common to all such tools is a need to parse C. But C programs contain not only the C language proper but also preprocessor invocations for file inclusion (#include...
متن کاملبررسی مقایسهای تأثیر برچسبزنی مقولات دستوری بر تجزیه در پردازش خودکار زبان فارسی
In this paper, the role of Part-of-Speech (POS) tagging for parsing in automatic processing of the Persian language is studied. To this end, the impact of the quality of POS tagging as well as the impact of the quantity of information available in the POS tags on parsing are studied. To reach the goals, three parsing scenarios are proposed and compared. In the first scenario, the parser assigns...
متن کاملIdentification and Removal of Program Slice Criteria for Code Size Reduction in Embedded Systems
Code shrinking is a technique for reducing the size of a software system by detecting and eliminating unused features. It is a static approach that is limited to information known at build time. We demonstrate how to extend code shrinking to take dynamic behavior into account. Our technique, Slice Criteria Identification and REmoval (SCIRE), combines conditional compilation and code shrinking t...
متن کاملTranslation of Conditional Compilation
This paper describes how to translate the compiler directives for conditional compilation in automated source-to-source translation between high-level programming languages. The directives for conditional compilation of the source language are translated into the corresponding directives of the target language, and the source program text of each branch of conditional compilation is translated ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1998