Compiling gbeta, Creating Variants


 

If you have downloaded the soure code, and you have access to a Mjolner BETA System compiler, you can compile the interpreter, and hence you can perform language design experiments with it. Since I'd enjoy cooperating about such endeavors, don't hesitate to ask me if you experience problems in doing so!

Assuming you have installed gbeta in your home directory, you can compile the interpreter like this:

cd $HOME/gbeta-0.9/src/main
beta -lq gbeta

This will take some time. The binary created by this compilation must be moved to the bin directory of your gbeta installation, and it must be named in a way which shows what platform it belongs to, i.e. you must execute one of the following commands:

On Linux:

mv gbeta ../../bin/gbeta-0.9-i386-linux-elf-bin

On Sun:

mv gbeta ../../bin/gbeta-0.9-sparc-sun-solaris2.5-bin

On HP:

mv gbeta ../../bin/gbeta-0.9-hppa1.1-hp-hpux9-bin

On the SGI platform it is necessary to move a number of auxiliary dynamically loaded libraries, in order to ensure that the dynamic link process succeeds:

mv gbeta ../../bin/gbeta-0.9-mips-sgi-irix6-bin
mv sgi/gbeta*..so ../../bin

That's it! Now you can try out your new interpreter, to see if your installation is basically sound.

Creating Variants

Of course there could be myriads of different ways to modify gbeta. If you want to experiment with the grammar of the language, you need the dogram tool which is delivered with the Mjolner BETA System. This tool will generate grammar tables from your customized version of the involved grammars, and the interpreter cannot use a changed grammar without having these generated files. After having generated the new grammar files, you must adjust a few paths in the generated files. These paths are generated on the assumption that the meta-programming system is located within a standard Mjolner installation, and in this case you must use the patched version of the meta-programming system which is included in the gbeta source distribution (thanks to Mjolner Informatics for allowing this). The script bin/dogrammar will help you getting this right.

Changing the grammar of the language is of course potentially a very deep change which requires a lot of changes to the static analysis and run-time system of gbeta. Don't hesitate to tell me about your adventures if you are doing such things!

 


Signed by: eernst@cs.auc.dk. Last Modified: 3-Jul-01