Idol is an object-oriented preprocessor for Version 8+ Icon. It is a front-end for icont(1) ; typically one invokes idol on a source file (extension .iol) which is translated into an Icon source file (extension .icn) which is translated into a file suitable for interpretation by the Icon interpreter.
On systems with directories, Idol typically stores its generated class library code in a separate directory from the source code. If the environment variable IDOLENV is defined, Idol uses this directory for generated code. If no IDOLENV is defined, Idol creates a subdirectory named idolcode.env, and removes it after successful compilation if the creation occured for a single source file.
Producing an executable is skipped when the first file on the list contains only classes and no Icon entities. Idol uses an Icon translator selected by the environment variable ICONT, if it is present.
The -c option suppresses the linking phase normally done by Icont.
The
-t
option suppresses
all
translation by
Icont;
it is useful on systems for which Icon does not support the
system\)
function.
The -s option suppresses removal of .icn files after translation by Icont; normally they are deleted after a successful translation.
The -quiet option suppresses most Idol-specific console messages.
The -strict option causes Idol to generate code which is paranoid about ensuring encapsulation.
The -ic option causes Idol to generate code that is Icon-compatible. The code will be slightly slower, but allows method invocation using a traditional Icon procedure call. Such procedure calls are of the form class_method(o,args...). Inherited methods cannot currently be so invoked, the class that defines the method must be explicitly named in the procedure call.
The -version option causes Idol to print out its version and date of creation, and then exit.
The second and following files on the command line may include extensions .icn , .u1 , and .cl. The first two Idol treats as Icon source code which should be translated and linked into the resulting executable. Files with extension .cl are treated as class names which are linked into the resulting executable. Class names are case sensitive; Deque.cl is a different class than deque.cl. If the operating system does not support case sensitive filenames, such class names will not coexist peacefully.
Clinton Jeffery, cjeffery@cs.arizona.edu
idol The Idol translator itself.
prog.iol Idol source files
prog.icn Icon code (non-classes) from prog.iol
idolcode.env/i_object.* Icon code for the Idol object type
idolcode.env/classname.icn Icon files generated for each class
idolcode.env/classname.u[12] Translated class files
idolcode.env/classname Class specification/interface
"Programming in Idol: An Object Primer"
(U of Arizona Dept of CS Technical Report #90-10)
serves as a user's guide and reference manual for Idol