← Back to work
Personal Project • Compilers2026

Olhanense Compiler

“A programming language inspired by the dialect of Olhão, with a multi-phase compiler and stack-based virtual machine.”

RoleLanguage design and compiler implementation
Year2026
Technologies
JavaANTLR 4BytecodeStack VM

Overview

Olhanense replaces traditional keywords with regional Algarve expressions while retaining a real compiler pipeline. .moh files pass through lexing, parsing, semantic analysis, bytecode generation and execution in a custom VM.

The Challenge

Keeping the syntax expressive and culturally distinctive while making the type system, semantic errors and execution predictable.

Approach & Architecture

The ANTLR grammar feeds a Java pipeline with a symbol table, type checker, code-generation visitor and a VM built around an operand stack, constant pool and exception handlers.

Key Features

  • ANTLR 4 generated lexer and parser
  • Type inference and semantic validation
  • Bytecode generation
  • Stack-based virtual machine with exception support

Technical & Ethical Notes

The compiler and VM are functional. The web playground and editor extensions remain future ideas and are not part of the current implementation.