/* // /// FILE: README.chaimsCompiler /// /// DESCRIPTION: This file describes how to use the chaims compiler located in /// /db/8/ftp/www/CHAIMS/Compiler /// /// AUTHOR: Woody Pollack /// CREATED: 6/22/98 whp /// MODIFIED: 6/30/98 whp // */ Brief Description ============================================================================== The compiler takes a program written in the CHAIMS language and converts it into a C, C++ or JAVA program. The compiler parses the input program line-by-line, writing appropriate lines of code to the correct output file. Primitives Recognized by chaimsCompiler v1.0 ============================================================================== Currently (June 1998), the compiler "recognizes" the following CHAIMS primitives: SETUP, SETATTRIBUTES,INVOKE, EXAMINE EXTRACT, GETATTRIBUTES, GETPARAMS, TERMINATE. Any other primitives you provide it will give you an error. The compiler is currently supported only with CORBA and JAVA (RMI). What the compiler does when it encounters primitives in the megaprogram ============================================================================== For all primitives except for SETUP, the compiler simply writes the command to the output client. For all commands that require blob passing to the megamodules (INVOKE, SETATTRIBUTES), the compiler parses the arguments to be sent and fills up a datablob with this information. For the SETUP call, the compiler does a few added steps. It first checks the repository. This repository is currently a text file (repository.txt) that stores megamodule-specific information. See the file README.repository in the repository directory for information about the repository. Once the repository has been consulted, the compiler will generate the binding information for the clients to connect to the megamodule. A SETUP call will also result in the compiler writing header information to the client's header file (only for DCE and CORBA, JAVA does not generate a header file). The information written is the megamodule specific header file (like io.h) as well as other general purpose headers (stdlib.h). Once the header has been written, the SETUP call is written to the client. Currently, for DCE and CORBA implementations, the SETUP call is commented out, by the compiler, in the generated client file, since SETUP has no real functionality.