Relocating XML Elements from Preprocessed to Unprocessed Code

  • Authors:
  • Anthony Cox;Charles Clarke

  • Affiliations:
  • -;-

  • Venue:
  • IWPC '02 Proceedings of the 10th International Workshop on Program Comprehension
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

Transformations performed on source code by a preprocessor complicate the accuratereporting of information extracted to support program comprehension. Differences between the file input to the preprocessor and the output seen by parser-based analyzers creates a need for techniques to back-locate extracted information. To correctly map analysis results back to the preprocessor input files requires a record of the substitutions performed by the preprocessor. This record takes the form of a list, for each character, of the directives responsible for the character's inclusion in the preprocessor's output. We have developed algorithms to utilize the substitution history for the start and end tags of an XML element to correctly place the element in the unprocessed source. The use of substitution histories ensures that element relocation produces well-formed XML.