Skip to content

A fully functional front-end of the compiler for a custom programming language, similar to C. Built parser, scanner, abstract syntax tree, interpreter for generating intermediate representation (LLVM IR) code for an input code file.

License

Notifications You must be signed in to change notification settings

ssumukh/custom-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Compiler for a C-like language

A fully functional front-end of the compiler for a custom programming language, similar to C.

Built parser, scanner, abstract syntax tree, interpreter for generating intermediate representation (LLVM IR) code for an input code file.

The language design for the language is in this file, where the grammar is explained in details, with the data types and operations, both unary and binary, supported; output format; control statements; and function declarations, along with semantic analysis.

Sample codes in this language can be found in this directory.

Requirements:

flex

bison

How to run:

Navigate to the srcCde directory

Run make command. This should create an executable named parser

To get the IR for any of the example codes added in the exmpleCdes directory, do the following:

./parser ../exmplCdes/<file name>

The IR will be printed onto the STDOUT

TODO:

Improve readme

About

A fully functional front-end of the compiler for a custom programming language, similar to C. Built parser, scanner, abstract syntax tree, interpreter for generating intermediate representation (LLVM IR) code for an input code file.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published