Setup & Downloads

Setup and Downloads

Students using the tools in the lab don't need to worry about the below -- it's just for people who want to work at home!

The following is definitely not an idiot-proof installation. It assumes the user is willing to do a bit of fiddling to get everything working right.

  1. The system requires JDK1.4 or better. If it's not installed, you'll need to download and install it. It might work with older versions, but we make no guarantees.
  2. Create a directory (call it "ceb"). This directory will hold the installation.
  3. Download the following three files: jlex.jar, cup.jar, and cebollita.[VERSION].[TIMESTAMP].jar, from the following location: Download. Put them into the above directory. Name it something sane, like cebollita.jar. NOTE: If the minor version number is odd, then you will be downloading the latest, experimental version of the software. If you want a stable version, go for something like cebollita.1-2.[TIMESTAMP].jar.
  4. jlex.jar and cup.jar are libraries required by the various parsers of the system. They do not need to be unpacked, but need to be added to the Java CLASSPATH. (See below).
  5. If you just want to run/use the tools, add the cebollita jar file to your CLASSPATH. You should be good to go now.
  6. If you want to actually hack the Java source code that implements the toolkit, do the following:
    1. Unpack the cebollita jar file. Something like: jar xf cebollita.jar should do the trick.
    2. You'll also need to add your installation directory name to your CLASSPATH (rather than the cebollita jar file).


Setting environment variables differs from system to system, but here's a basic guide. If you only want to run/use the tools, you just need to add the three jar file names to your CLASSPATH. If you want to do development, you'll need to unpack the cebollita jar, and add its directory name to your CLASSPATH.
Easiest to set them in the System Properties Control Panel (under "Advanced"). Under "Environment Variables" either edit or create a new variable called CLASSPATH. C:\ceb\cebollita.jar;C:\ceb\cup.jar;C:\ceb\jlex.jar.
Easiest to set them in your shell RC file. If you use BASH, adding these lines to your .bashrc will do the trick (assuming Cebollita was installed to /usr/local/ceb):
export CEBHOME=/usr/local/ceb
export CLASSPATH=$CEBHOME/cebollita.jar:$CEBHOM/jlex.jar:$CEBHOME/cup.jar:$CLASSPATH
I have no idea, but I guess it can be made to work in OS X.

There are a bunch of test C-- programs in a directory called tests.