Rapidly implementing languages to compile as C++ without crafting a compiler

  • Authors:
  • Anthony Savidis

  • Affiliations:
  • Institute of Computer Science, Foundation for Research and Technology—Hellas, Heraklion, Crete, GR-70013, Greece

  • Venue:
  • Software—Practice & Experience
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a heuristic implementation method for programming languages that is appropriate when the following requirements or conditions are met: (a) there is a need for very rapid development of a language with significant performance demands, while exploiting a comprehensive host language and-or library; (b) need of customized runtime execution environment supporting of execution tracing and visualization instruments; (c) the facilitation of hybrid code exists, such as mixing with the native language, and there is the potential for allowing multiple languages to be deployed concurrently in the same program. This may account for a wide range of domain-specific languages such as learning-oriented, scripting, assembly style, data manipulation, rule-based, or event languages. The proposed technique is presented for the C++ language, supporting the development of languages whose source programs compile as C++ code. The software architecture shifts from the tradition of lexical analysis, syntax-directed translation and code generation, and we propose a complementary, conditionally advantageous, heuristic development paradigm. The method has been applied to the development of a high-level imperative language, an assembly language and a functional language, which are all currently deployed for teaching purposes. Copyright © 2007 John Wiley & Sons, Ltd.