Hacking Cebollita

Basic requirements include JDK1.4 or better, jikes (a fast, free, open-source Java compiler from IBM), and access to GNU tools like make and BASH.

Certainly, you may be able to get the software built relying on the DOS shell and only the JDK, but then you enjoy pain more than I do.

Here are some sketchy notes for hacking the Cebollita system:

  1. Get bash working. If you're on a UNIX system, this shouldn't be hard. For Windows people, try Cygwin -- it really works.
  2. Get the lex and yacc jar files from the download page (they are called jlex.jar and cup.jar). Add them to your classpath.
  3. Add the name of the directory you're working in to your classpath.
  4. Use the provided make file (try "make").

The Package Structure

Right now, there are just four interesting packages:
comp
Contains the grammar files for building C-- lexer and parser (courtesey of JLex and CUP). Also contains Java files relating to AST nodes and code generation. The goal of this module is to be able to transform a single C-- file into a MIPS assembly file.
asm
Contains the grammar files for building a MIPS assembly code lexer and parser (courtesey of JLex and CUP). Also contains Java files relating to the representation of an assembly-code file; machine code generation; object file representation; and linking.
sim
Contains a MIPS simulator.
util
Contains basic utility code.
From here, it's probably time to wander over to the JavaDocs for more info on the structure of the code.