Back to work

Personal Project • Compilers

Olhanense Compiler

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

Role
Language design and compiler implementation
Year
2026

Need and objective

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.

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

What was built

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.

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

My role

Language design and compiler implementation

Technology and decisions

  • Java
  • ANTLR 4
  • Bytecode
  • Stack VM

What exists today

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

Have a similar project in mind?

Discuss your project