Installation

System Requirements

  • Operating System: Linux, macOS, or BSD (POSIX-compliant)
  • Compiler: GCC or Clang with C11 support
  • Libraries: pthread, math library (libm)
  • Build Tools: GNU Make

Building from Source

Clone the Repository

git clone https://github.com/retoor/rava2.git
cd rava2

Build the Interpreter

make

This creates the rava2 executable with optimizations enabled (-O2).

Debug Build

make debug

Creates a debug build with symbols and no optimizations for development.

Verify Installation

./rava2 --version
./rava2 examples/01_hello_world.java

Command Line Options

Option Description
-h, --help Display help message
-v, --version Show version information
-d, --debug Enable debug output
-t, --tokens Print tokens and exit
-a, --ast Print AST and exit

Running Programs

./rava2 MyProgram.java

Rava2 expects a Main class with a public static void main(String[] args) method as the entry point.

System Installation

sudo make install

Installs rava2 to /usr/local/bin/ for system-wide access.

Running Tests

make test        # Run all example programs
make valgrind    # Memory leak detection
make check       # Static analysis with cppcheck