01 / Context
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.
02 / Solution
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
03 / Contribution
My role
Language design and compiler implementation
04 / Implementation
Technology and decisions
- Java
- ANTLR 4
- Bytecode
- Stack VM
05 / Outcome and status
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.