-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Build Your Own Programming Language
By :

The Unicon IDE only supports Unicon. The CVE collaborative virtual environment extends the Unicon IDE to include support for Java and C/C++. This section discusses the issues involved in adding a new language (in our case, Java, standing in for Jzero). In a perfect world, this would involve replacing various bits of hard-wired Unicon-specific code with a data structure that handles the language-specific parts. CVE is not perfect but embodies some of this ideal.
CVE is larger and more complex than the Unicon IDE. The code for the IDE lives in CVE's src/ide
subdirectory, but its GUI is integrated into a larger client application whose code lives in src/client
.
In CVE, a variable named projecttype
was added that indicates the language that the user's current program is written in. In some places, the IDE's multi-language support handles language-specific details with if
statements, such as the following example:
if projecttype == "Java...