This is a Java applet running an interpret of a small programming language which permits to access to the graphic features of Java from the HTML source.

The source is transmitted as parameter to the applet.

Here is an example of code to be inserted into a HTML file :

and here is the result :

Here are other examples of use :

The applet consists of the following Java classes :

Installation

Copy the files expr.class, entree.class, interp.class, iaFrame.class and intaplet.class to the directory of your web site where you put your HTML files. To download them click on the file names.

Here are the Java sources of the applet :

expr.java Download expr.class

entree.java : Download entree.class

interp.java Download interp.class

iaFrame.java Download iaFrame.class

intaplet.java Download intaplet.class

Console interpret : interpret.java Download interpret.class

The following parameters may be transmitted to the applet, containing the source codes of the corresponding programs :

This language uses a stack to transmit arguments to the functions, like Forth or RPL.

A running process is represented by a context (CTX program stack args ext) where args is used by functions to store their arguments, which are recalled with their number. The internal representation of function is similar to De Brujn's lambda calculus but the compiler converts a definition with named variables like in Church's lambda calculus ^x body into the internal form (LDB body).

A program is a sequence of instructions (SEQ x1 (SEQ x2 ... (SEQ xn-1 xn))) which can also be written ; x1; x2 ... ; xn-1 xn or {x1 x2 ... xn-1 xn } or [xn xn-1 ... x2 x1] which permits to white function calls in prefixed form [f x1 ... xn] instead of the postfixed form ;xn ... ;x1 f.

The data type are :

Here are the instructions of the language :