ramisa2108 / C-Compiler

Front end of a compiler for a subset of the C Language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C-Compiler

Implementation of the front end of a compiler for a subset of C language.

Components

  • Symbol Table

    • Written in C++.
    • Produces a hash table for mapping variables used in the source program to tokens.
  • Lexical Analyzer / Scanner

    • Written in flex.
    • Generates tokens from lexemes and reports lexical errors.
  • Syntax and Semantic Analyzer / Parser

    • Written in yacc / bison.
    • Parses the tokens generated by the scanner according to specified grammar rules.
    • Reports syntax and semantic errors.
    • Takes actions for error recovery for some syntax errors.
  • Intermediate Code Genarator

    • Produces intel 8086 assembly language code from source C code.
    • Optimizes the assembly code.

About

Front end of a compiler for a subset of the C Language.


Languages

Language:Yacc 56.6%Language:C++ 27.8%Language:Lex 14.0%Language:C 0.9%Language:Shell 0.7%