{"title":"将XML元素从预处理代码重定位到未处理代码","authors":"Anthony Cox, C. Clarke","doi":"10.1109/WPC.2002.1021344","DOIUrl":null,"url":null,"abstract":"Transformations performed on source code by a preprocessor complicate the accurate reporting 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.","PeriodicalId":210649,"journal":{"name":"Proceedings 10th International Workshop on Program Comprehension","volume":"79 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2002-06-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"15","resultStr":"{\"title\":\"Relocating XML elements from preprocessed to unprocessed code\",\"authors\":\"Anthony Cox, C. Clarke\",\"doi\":\"10.1109/WPC.2002.1021344\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Transformations performed on source code by a preprocessor complicate the accurate reporting 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.\",\"PeriodicalId\":210649,\"journal\":{\"name\":\"Proceedings 10th International Workshop on Program Comprehension\",\"volume\":\"79 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2002-06-27\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"15\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings 10th International Workshop on Program Comprehension\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/WPC.2002.1021344\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings 10th International Workshop on Program Comprehension","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/WPC.2002.1021344","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Relocating XML elements from preprocessed to unprocessed code
Transformations performed on source code by a preprocessor complicate the accurate reporting 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.