# MiniC_Compiler **Repository Path**: alexbeng/MiniC_Compiler ## Basic Information - **Project Name**: MiniC_Compiler - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-05-22 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MiniC to UCode Compiler ### About project This is a MiniC compiler project using JAVA Antlr which generates UCode of IR. ### Contents #### Simple pointer function ``` C void swap(int *a, int *b) { int temp; temp = *a; *a = *b; *b = temp; } void main() { int a = 5; int b = 10; swap(&a, &b); write(a); write(b); } ``` #### Compile error detection > - Use of undeclared identifier
> - Non-void function should return a value
> - Void function should not return a value
> - Initializing 'int' with an expression of incompatible type 'void'
#### Make control flow graph #### Optimize unreachable code elimination(with Mark & Sweep Algorithm) ### Author [Minho Kim](https://github.com/ISKU), [Yoonjae Cho](https://github.com/Yoon-jae)