We present a novel concept of universal text preprocessing and text-embedded programming (PTEP). Preprocessing and text-embedded programming has been widely used in programming languages and frameworks in a fragmented and mutually isolated way. The PTEP ideas can be found in the implementation of the \TeX\ typesetting system; they are prominent in PHP and similar web languages, and finally they are used in the Jupyter data science framework. This paper presents this area of research and related work in a more unified framework, and we describe the implemented system Starfish that satisfies the following novel principles of PTEP: universality, update and replace modes, flexiblity, configurability, and transparency. We describe the operating model and design of Starfish, which is an open-source system implementing universal preprocessing and text-embedded programming in Perl. The system is transparent and its design allows direct implementation in other programming languages as well.
翻译:我们提出了一个通用文本预处理和文本编集编程的新概念。预处理和文本编程以支离破碎和相互孤立的方式在编程语言和框架中被广泛使用。PTEP的想法可以在实施\TeX\排版系统中找到;这些想法在PHP和类似的网络语言中占有突出地位,最后在Jupyter数据科学框架中被使用。本文在一个更加统一的框架内介绍了这一研究领域和相关工作。我们描述了符合PTEP以下新颖原则的已实施的系统“星辰”:普遍性、更新和替换模式、灵活性、兼容性和透明度。我们描述了Starfish的操作模式和设计,这是一个在Perl实施通用的预处理和文本编集编程的开放源码系统。该系统是透明的,其设计允许在其他编程语言中直接实施。