Developed a full-featured compiler for the Pascal programming language as part of an advanced compiler design course. The project encompassed the complete compiler pipeline, including:
- Lexical Analysis: Designed a lexer to tokenize source code into keywords, identifiers, and operators.
- Parsing: Built a parser to construct abstract syntax trees (ASTs) from tokenized input.
- Semantic Analysis: Implemented type checking and code generation for arrays, pointers, and records.
- Optimization: Applied graph theory and set theory to optimize the generated code for efficiency.
- Code Generation: Produced executable machine code for hardware-level execution.