This is my implementation of a compiler for the Eta Programming Language for CS4120.
Before you begin, ensure you have the following prerequisites installed:
- Rust: If you haven't installed Rust, you can do so by following the instructions at rustup.rs.
-
Clone this repository to your local machine:
-
Build the project using Cargo:
cargo build --release
or run the
etac-build
script provided.
Example .eta
files can be located in the tests
directory.
Eta source code can be compiled using the following command:
etac [OPTIONS] <SOURCE FILES>
Arguments:
<SOURCE FILES> Source files to perform analysis on (can specify multiple)
Options:
--help Print help
--lex Generate output from lexical analysis
--parse Generate output from syntactic analysis
--typecheck Generate output from semantic analysis
--irgen Generate intermediate code
--irrun Generate and interpret intermediate code
-D Place generated diagnostic files in directory relative to path
-d Place generated assembly output files in directory relative to path
-sourcepath Specify directory where to find input source files
-libpath Specify directory where to find library interface files
-O Disable Optimizations
-target Specify the operating system for which to generate code
-report-opts Print out the optimizations that are supported by this compiler