Skip to content

A mini project for understanding Compiler Design (2015)

Notifications You must be signed in to change notification settings

SachinGanesh/CompilerDesign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CompilerDesign

A mini project for understanding the science of building Compiler; (Compiler Design) (VTU - BE - 6th Semester) (2015)

I built this project to understand the structure of a compiler. I have completed only first (Lexical Analyzer) out of the 7 phases of Compiler Design. Feel free to clone this project and complete it if you are interested.

Lexical Analysis

------- The first phase of compiler works as a text scanner. This phase scans the source code as a stream of characters and converts it into meaningful lexemes. Lexical analyzer represents these lexemes in the form of tokens as: ``` ```

Symbol Table & String table will also be genererated along with lexemes.

Sample Input

Give any C program snippet as input

int a = b + c;

Output lexemes:

<KEYWORD,int>  <IDENTIFIER,a>  <OPERATOR,=>  <IDENTIFIER,b>  <OPERATOR,+>  <IDENTIFIER,c> 

Screenshots

About

A mini project for understanding Compiler Design (2015)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published