An algorithm for expression positions recovering in the source code of Cloud Sisal programs
Article's languageRussian
Abstract
This paper presents an algorithm for recovering positions of expressions in source code Cloud Sisal programs. The relevance of this study is due to the importance of accurately mapping abstract nodes of the syntax tree to corresponding fragments of source code for creating development tools such as a source code editor, a visual debugger, and error diagnostic utilities. The proposed approach addresses the problem of incomplete positional information in the output of syntactic parsers, when it is difficult to modify existing tools. The paper describes a developed three-phase algorithm, which includes the stages of token sequence reconstruction, token position calculation, and abstract syntax tree node position calculation. The algorithm's asymptotic time complexity is linear relative to the input size and does not exceed O(n), where n is the number of characters in the source program.
UDK004.4'4
Issue
# 29,
Pages125-136
File
gordeevds_lexeme_position_algorithm_ru_update3.pdf
(275.37 KB)
Bibliographic reference
Gordeev, D. An algorithm for expression positions recovering in the source code of Cloud Sisal programs. System Informatics 2025, 29, 125-136. https://doi.org/.