Nordic Journal of Computing Bibliography

Maarit Harsu. Translation of Conditional Compilation. Nordic Journal of Computing, 6(1):93-109, Spring 1999.

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 into the corresponding target program text. Such translation raises a problem in conventional parsing because the source text is not a continuous stream of tokens of a legal program but rather a sequence of fragments that must be combined in certain ways to obtain one of several possible alternative programs. As a solution to this problem, a parsing technique is introduced which is able to cope with such input if certain reasonable conditions are satisfied.

Categories and Subject Descriptors: D.3.4 [Programming Languages]: Processors

Additional Key Words and Phrases: source-to-source translation, language conversion, conditional compilation, parsing

Selected references


  • Nordic Journal of Computing homepage
  • Bibliography top level
  • Nordic Journal of Computing Author Index
  • Search the HBP database