Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

A compiler for a custom subset of the C programming language, Simple C. I originally wrote each of the six phases as part of my Formal Language Theory & Compiler Construction (COEN 175) lab at Santa Clara University in Spring 2019.

connerdavis47/simple-c-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-c-compiler

Overview

Simple C is a subset of the C programming language. That is, all Simple C programs are valid C programs. Simple C uses a recursive descent parser that moves from left-to-right, and performs the leftmost derivation. In other words, the Simple C parser is an LL(k) parser.

The Simple C compiler generates valid assembly code exclusively for 64-bit Intel machines running the Linux operating system.

Phase 1

Lexical analyzer

Phase 2

Recursive descent parser for entire Simple C language

Phase 3

Scope and symbol table with rudimentary type checking

Phase 4

Type checking for entire Simple C language

Phase 5

Storage allocation for functions and rudimentary code generation

Phase 6

Code generation for entire Simple C language

About

A compiler for a custom subset of the C programming language, Simple C. I originally wrote each of the six phases as part of my Formal Language Theory & Compiler Construction (COEN 175) lab at Santa Clara University in Spring 2019.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published