jzero 0.1.1

A compiler and bytecode VM for the Jzero language (a subset of Java)
Documentation

jzero

A compiler and bytecode VM for Jzero — a small subset of Java.

Jzero supports classes, methods, control flow, basic types (int, double, boolean, String), arrays, string concatenation, and System.out.println.

Quick start

use jzero::Compiler;

let output = Compiler::new()
    .source("public class hello {
        public static void main(String argv[]) {
            System.out.println(\"hello, jzero!\");
        }
    }")
    .run(&[])
    .unwrap();

assert_eq!(output.stdout, "hello, jzero!\n");

Pipeline

source code
    → parse_tree()       [jzero-parser]
    → analyze()          [jzero-semantic]
    → generate()         [jzero-codegen]  → TAC IR
    → compile_bytecode() [jzero-codegen]  → .j0 binary
    → run()              [jzero-vm]       → stdout