Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 1.6 KB

File metadata and controls

53 lines (33 loc) · 1.6 KB

rust-decaf

This repository is an implementation of the Decaf programming language, created as part of MIT's 6.035 (Computer Language Engineering) course. The Decaf language and course materials can be found at the 6.035 course website.

About

Decaf is a simplified Java-like language designed for educational purposes. This project represents a Rust-based implementation of the Decaf language, including its parser, semantic analysis, and code generation components.

Features

  • Lexical analysis (tokenization)
  • Parsing of Decaf source code
  • Semantic analysis (type checking, symbol tables, etc.)
  • Intermediate representation and code generation

Getting Started

Prerequisites

  • Rust toolchain (latest stable recommended). Install via rustup.

Building

Clone the repository and build with Cargo:

git clone https://github.com/m04f/rust-decaf.git
cd rust-decaf
cargo build

Running

You can run the Decaf compiler with:

cargo run -- decafcc

Project Structure

  • src/ - Rust source code for the Decaf implementation
  • tests/ - Test cases for language features
  • Other files and directories follow standard Rust project layout

References


If you are interested in a more refined or alternative implementation, see the rewrite at decafc.