-
21
pages
-
English
-
Documents
Description
Open C++ TutorialShigeru ChibaInstitute of Information Science and ElectronicsUniversity of Tsukubachiba@is.tsukuba.ac.jpCopyrightc 1998 by Shigeru Chiba. All Rights Reserved.1 IntroductionOpenC++ is an extensible language based on C++. The extended features of are specified by a meta level program given at compile time. For dis tinction, regular programs written in OpenC++ are called base level programs. Ifno meta level program is given, OpenC++ is identical to regular C++.The meta level program extends OpenC++ through the interface called theOpenC++ MOP. The OpenC++ compiler consists of three stages: preprocessor,source to source translator from OpenC++ to C++, and the back end C++ com piler. The OpenC++ MOP is an interface to control the translator at the secondstage. It allows to specify how an extended feature of OpenC++ is translated intoregular C++ code.An extended feature of OpenC++ is supplied as an add on software for thecompiler. The add on software consists of not only the meta level program but alsoruntime support code. The runtime support code provides classes and functionsused by the base level program translated into C++. The base level program inOpenC++ is first translated into C++ according to the meta level program. Thenit is linked with the runtime support code to be executable code. This flow isillustrated by Figure 1.The meta level program is also written in OpenC++ since OpenC++ is a self reflective language. It defines new ...
-
Publié par
-
Langue
English