Skip to content

A simple C-like compiler front-end, which can compile the source program into three address intermediate code.

Notifications You must be signed in to change notification settings

zhangjunhui6/compiler-frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compiler Frontend

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.

Install

git clone https://github.com/zhangjunhui6/compiler-frontend

Usage

Open and run with visual studio 2019 / 2022 on Windows system

Demo

About

A simple C-like compiler front-end, which can compile the source program into three address intermediate code.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published