All projects
Pascal-to-MIPS Compiler

Pascal-to-MIPS Compiler

Java/ATCS coursework
Built
2024-09-01
Stack
Java
Context
ATCS coursework
Overview

A complete compiler implementation for a Pascal-like language written in Java. Features a scanner for lexical analysis (tokens, operators, identifiers, numbers, comments), a recursive descent parser that builds an abstract syntax tree (AST), and a code generator that emits MIPS assembly with proper register management, stack operations, and procedure handling. Supports variables, procedures with parameters, control flow (IF/WHILE/FOR), and expressions with proper operator precedence.