# Chapter 11: INTERPRETERS

| ## 11-1: Introduction to Interpreters |

Electric has built in interpretive languages that provide great power in design. The TCL interpreter is a graphical user-interface language. The Lisp interpreter implements a Scheme Lisp dialect. The Java interpreter connects with the Java Virtual Machine.

Note, however, that because of copyright restrictions, these interpreters are not part of the standard GNU distribution and must be obtained separately. The Lisp source code are available from Static Free Software. The Java interpreter is available from Sun. The TCL interpreter is available from ActiveState. For more details, see the installation instructions for UNIX (Section 1-3), Macintosh (Section 1-4), and Windows (Section 1-5).

The Interpretive Language command of the Windows menu shows the language choices available: TCL..., LISP... and/or Java... Once these commands are issued, you are in direct communication with the interpreter and may type arbitrary expressions in the messages window. When done with an interpretive session, type Ctrl-D to return to Electric (hold the control key and type "D"). On Windows systems, type ESC.

The Java interpreter has two options, invoked with the Java Options... subcommand of the Interpretive Language command of the Windows menu. You can choose to disable the Java compiler, forcing interpretation at each step (useful when debugging). You can also choose to disable Java evaluation completely, causing all expressions to appear in their "source" form (this is useful when documenting code: the expressions will appear in the place of their evaluated values). |

Besides basic expressions in the language, it is possible to examine and modify the Electric database. Special language extensions exist for doing this. For more information, see the following sections on Lisp (Section 11-2), TCL (Section 11-3), and Java (Section 11-4).

Another way to make use of the interpretive languages is to place code on nonlayout text, cell parameters, and attributes on Electric objects. In the Define subcommand of the Attributes... command of the Info menu, and in the Get Info command when text is selected, Change the "Not CODE" popup entry to "TCL", "LISP", or "JAVA" and type the code in the "Value" field.

| Previous |  |  | Table of Contents |  | Next |