My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
DownloadAndMake  
An explanation of how to download and make Kitsch.
Updated Mar 1, 2009 by apangb...@gmail.com

Downloading

Kitsch is hosted by Google Code, which provides an SVN repository. Read-only access to the repository is available to anyone, and this is the simplest way to get a hold of Kitsch. If you have SVN installed, to download Kitsch from the command line, run:

svn checkout http://kitsch.googlecode.com/svn/trunk/ kitsch-read-only

There are also a variety of programs available to hook up SVN to an IDE; Google Code itself has more details.

Milestones

Milestone releases for the RIT Compiler Design 4005-711 course can be found at the Downloads page.

Milestone #1 : Language Recognizer

Milestone #2 : Language Interpeter

Milestone #3 : Language Compiler

Milestone #4 : Multiple Types

Milestone #5 : Functions

Milestone #6 : Arrays

Project Layout

After downloading, the directory structure of Kitsch is as follows:

  • '/doc/' - Information about the language itself and code samples
  • '/src/' - Contains the grammar and interpreter code
  • '/bin/' - Contains .class files after compilation
  • '/tests/ -Contains regression tests and an automated testing script

Making Kitsch

From the kitsch directory, simply run make to make to compile the parser and interpreter (requires gnumake and javac). After doing so, the test suite can be run to make sure everything worked by running make test (requires gnumake and python).

$ make

Running the Interpreter

After Kitsch has been compiled, it lives in the bin/ directory. To run the interpreter,

$ cd bin
$ java Evaluator srcfile

where srcfile is a Kitsch source file. By convention, Kitsch source files end in a ".k" extension - but this is not enforced by the interpreter.

Running the Compiler

To run the compiler

$ cd bin
$ java Compiler someInputFile.k

Running the Virtual Machine

The virtual machine is a simple python script that resides in the /src directory of Kitsch. When make is run, the script is copied to the /bin folder.

$ python bin/vm.py
Usage: python vm.py <input file>
       Use '-' if input file is standard-in

The virtual machine requires an input file to be specified. If you want the VM to interpret input from stdin, specify - as the input file.

If the script is given execute priviledges on a UNIX system, it can be invoked like a shell script or perl script with ./bin/vm.py

$ ./bin/vm.py someProgram.ko

Running Regression Tests

Kitsch includes a regression testing suite to verify its own functionality The testing suite utilizes Python. A run_tests.py file resides in the /tests folder, however the easiest way to run the tests is using make

From the top level of the kitsch directory...

$ make
$ make test

This will automatically run all the tests in the /tests/ directory (and its sub-directories)

As of milestone #3, the testing suite runs all tests with both the Interpreter and the Compiler + Virtual Machine.

Powered by Google Project Hosting