Made for Southeast University’s Special Topics in Compiler Principles course, our team of three developed a compiler with Lex, Yacc, and an intermediate code generation module in C++. I was responsible for the intermediate code generation module of the system. A typical compiler is divided into several stages, including lexical analysis, syntax analysis, semantic analysis, optimization, and target code generation. The intermediate code generation module typically resides between the optimization and target code generation stages, and it is responsible for generating a machine-independent code representation, which is then used for further optimization and code generation.The main functionalities implemented include defining semantic rules, symbol table generation and management, quadruple generation, temporary variable and memory management, and label backpatching. The core code and detailed explanation of these functionalities can be found in the project’s README file.