Parsifal Software


XIDEK
Extensible Interpreter Development Kit


Directory Structure

Overview

The XIDEK kit contains source files, test files, and documentation files plus make files for six different compilers. Note that in many cases you will find subdirectories that have a base directory and a number of other directories called array, function, etc. These other directories simply relate to extensions of the baseline interpreters and may be ignored initially. For additional information see Organization of the Code, Compiling and Linking.

Source files: are located in the following directory trees:

  • driver
    contains the common demo driver program used by all the interpreters in the kit. See Main Program.
  • cll, pll
    contain parser source code for the two baseline languages, CLL and PLL,supported by the kit. Each of these directories contains five subdirectories, base, array, struct, function and combine, for the baseline parsers and the example extensions. Note that there is no subdirectory for the complex arithmetic extensions, since it uses the same parsers as the baseline implementations.
  • support
    contains support modules for the two baseline languages, CLL and PLL,supported by the kit. Each of these directories contains subdirectories for the baseline implementations and for the extension interpreters.
  • agclib1
    contains the agclib1 class library.
Test files: are found in the test directory, whose subdirectories, cll and pll, contain test files for each of the baseline languages. Note that since all four interpreter architectures implemented in the kit are functionally equivalent, one set of test files suffices.

Documentation files: are in the doc directory. The table of contents is found in toc.htm.

Make files: Makefiles for six different win32 or linux compilers can be found in the msvc, gcc, borland, watcom, vacpp and intel directories. Each of these directories has two subdirectories, cll and pll for each of the two baseline languages. The cll and pll directories, in turn, contain directories for the baseline interpreters and each of the extensions.

For additional information see Organization of the Code, Compiling and Linking.


Detailed Directory Structure

The directory structure is reproduced below with comments about the individual directories; note that for the various compilers the subdirectory layout is the same and that make files have been provided at each level of the subdirectory structure.
  • doc
    Contains all of the documentation files in HTML format.
  • driver
    Contains the common demonstration driver program used by all of the interpreters. See Main Program.
  • support
    Contains code used to support the interpreters in the kit. The same support files are used for both the CLL and PLL languages.
    • base
      Contains the support code for the baseline interpreters. The files are as follows:
      • opcodes.h
        Opcode definitions, used only by the bytecode and abstract syntax tree interpreters.
      • comdefs.h, comdefs.cpp
        Common definitions, used by all of the interpreters.
      • bcidefs.h, bcidefs.cpp
        Bytecode definitions, used by the bytecode interpreters.
      • astdefs.h, astdefs.cpp
        Abstract syntax tree definitions, used by the abstract syntax tree interpreters.
      • astxi.h, astxi.cpp
        These files define an interpreter that works by walking an abstract syntax tree and executing the script as it walks the tree. This module can be linked with either the CLL or the PLL version of the abstract syntax tree parser, to create either a CLL interpreter or a PLL interpreter.
      • astci.h, astci.cpp
        These files define an interpreter that works by walking an abstract syntax tree and compiling bytecode for later execution. This module can be linked with either the CLL or the PLL version of the abstract syntax tree parser, to create either a CLL interpreter or a PLL interpreter.
    • complex
      Contains variants of the baseline support files which have been modified to support complex arithmetic. In fact, it was necessary to modify only comdefs.h and comdefs.cpp.
    • array
      Contains variants of the baseline support files which have been modified to support arrays and subscripts.
    • struct
      Contains variants of the baseline support files which have been modified to support structures and objects.
    • function
      Contains variants of the baseline support files which have been modified to support function definitions.
    • combine
      Contains variants of the baseline support files which have been modified to support all of the three preceding extensions, i.e., arrays, structures and functions.
  • cll
    The cll directory contains the language specific files which are used in the CLL language interpreters. The base subdirectory contains the language specific files for the baseline CLL interpreters. The remaining directories contain these files as modified for specific extensions. Note that there is no complex directory, since the complex extension does not require any language specific modifications.
    • base
      Contains the CLL language specific files for the baseline interpreters. These files are as follows:
    • array
      Contains variants of the baseline language specific files modified to support arrays and subscripts.
    • struct
      Contains variants of the baseline language specific files modified to support structures and objects.
    • function
      Contains variants of the baseline language specific files modified to support local function definitions.
    • combine
      Contains variants of the baseline language specific files containing the combined modifications for arrays, structures and functions.
  • pll
    The pll directory contains the language specific files which are used in the CLL language interpreters. The layout of the pll directory is identical to that of the cll directory.
  • agclib1
    This directory contains the AGCLIB1 template class library. Documentation may be found here.
  • test
    This directory contains simple test script files in two subdirectories, one for each language. The test files have the extension scf. The make files supplied with XIDEK use these script files to run tests on the interpreters, using the demo.cpp program in the driver directory. The test output files in the subdirectories (with extensions r2, r2x, etc.) are compared to the actual output produced by the interpreters.
    • cll
      This directory contains example script files in the cll language, with the extension scf. In order to avoid having to sort through mismatches in output comparisons, there unfortunately have to be four sets of script output files, with extensions r2, r3, r2x and r3x. This is because the C library printf functions supplied with various compilers do not agree on the number of digits to use in the exponent field of E format output: some use 2 digits and some use 3 digits. Also, the interpreters that implement complex arithmetic always have the complex unit, i, defined, so that the demo program output for these interpreters always lists the variable i. The make files are all set up to compare results to the right set of files so that unless an error has been introduced into an interpreter, there will be no mismatches in the output comparisons.
    • pll
      The files in this directory correspond exactly to those in the cll directory, with the exception only that the script files use the pll language.
  • msvc
    This directory and its subdirectories contain make files for use with the Microsoft Visual C++ compiler. To make and test all 48 interpreters, cd to this directory and type nmake. To delete all object files, executables, and test result files, type nmake clean.
    • cll
      To make and test all 24 CLL interpreters, cd to this directory and type nmake.
      • base
        To make and test all four baseline CLL interpreters, cd to this directory and type nmake. It is also possible to make a single interpreter by naming it on the command line, e.g., nmake dxi.exe.
      • complex
        To make and test all four complex CLL interpreter extensions, cd to this directory and type nmake. It is also possible to make a single interpreter by naming it on the command line, e.g., nmake dxi.exe.
      • array
        To make and test all four array and subscript CLL interpreter extensions, cd to this directory and type nmake. It is also possible to make a single interpreter by naming it on the command line, e.g., nmake dxi.exe.
      • struct
        To make and test all four structures and objects CLL interpreter extensions, cd to this directory and type nmake. It is also possible to make a single interpreter by naming it on the command line, e.g., nmake dxi.exe.
      • function
        To make and test all four local function CLL interpreter extensions, cd to this directory and type nmake. It is also possible to make a single interpreter by naming it on the command line, e.g., nmake dxi.exe.
      • combine
        To make and test all four combination CLL interpreter extensions, cd to this directory and type nmake. It is also possible to make a single interpreter by naming it on the command line, e.g., nmake dxi.exe.
    • pll The layout of the pll subdirectory is identical to that of the cll directory. The difference is that the make files create PLL interpreters.
  • gcc
    The gcc directory contains make files to make and test the example interpreters on a *nix system, using the gcc compiler. The layout of subdirectories is the same as the msvc directory.
  • borland
    The borland directory contains make files to make and test the example interpreters using a Borland C++ compiler. The layout of subdirectories is the same as the msvc directory.
  • watcom
    The watcom directory contains make files to make and test the example interpreters using a Watcom C++ compiler. The layout of subdirectories is the same as the msvc directory.
  • vacpp
    The vacpp directory contains make files to make and test the example interpreters using the IBM Visual Age for C++ compiler. The layout of subdirectories is the same as the msvc directory.
  • intel
    The intel directory contains make files to make and test the example interpreters on a Linux system, using the intel C++ compiler. The layout of subdirectories is the same as the msvc directory.


Table of Contents | Parsifal Software Home Page


XIDEK
Extensible Interpreter Development Kit
Copyright © 1997-2002, Parsifal Software.
All Rights Reserved.