A simple C-like compiler front-end, which can compile the source program into three address intermediate code.
The project is implemented with C++ language, including lexical scanner, LR syntax parser, semantic analysis and intermediate code generation.
- Lexical Scanner: include character input processing, token recognition, symbol table processing, error processing and token output functions.
- LR Syntax Parser: use custom grammar, include state generation processing, analysis table construction, analysis stack processing, error processing and general control program.
- Semantic Analysis and Intermediate Code Generation: achieve grammar guided translation.
git clone https://github.com/zhangjunhui6/compiler-frontend
Open and run with visual studio 2019 / 2022 on Windows system