A compiler for the Orilla programming language, written in Rust. Orillac compiles Orilla source code to native object files using Cranelift for code generation.
- Lexical Analysis: Token-based lexer for Orilla source code
- Parsing: AST generation from parsed tokens
- Type Checking: Static type analysis with error reporting
- Code Generation: Native object file generation via Cranelift
Ola supports modern programming constructs including:
- Functions with type annotations
- Pattern matching (
matchexpressions) - Option types (
Some/None) - Conditional expressions
- Type inference
cargo build --release# Compile a .ola file (defaults to test.ola)
cargo run -- test.ola
# Specify a target triple
cargo run -- test.ola --target x86_64-unknown-linux-gnuThe compiler generates an output.o object file that can be linked with GCC:
# Windows
gcc -nostdlib output.o -lgcc -lmsvcrt -o output.exe
# Linux/macOS
gcc output.o -o outputsrc/lexer.rs- Lexical analysissrc/parser.rs- Syntax parsing and AST constructionsrc/typecheck.rs- Type checking and validationsrc/codegen.rs- Code generation using Craneliftsrc/types.rs- Type system definitionssrc/error.rs- Error handling and reporting
cargo testcranelift-codegen- Code generation backendcranelift-frontend- IR constructioncranelift-module- Module managementcranelift-object- Object file generationtarget-lexicon- Target triple parsing