SinghCoder/Compiler-Construction ↗
Created Feb 12, 2021 · View the SinghCoder/Compiler-Construction repository page
Compiler in C for a custom language
Want this for your repo?
Render a free sample of any GitHub repo in seconds.
Contributors
7
Lines of Code
1,048
From
Feb 3, 2020
To
Jul 14, 2020
About SinghCoder/Compiler-Construction
This is a compiler implementation for a custom programming language written in C as a coursework project for CS F363 at BITS Pilani. The compiler supports a variety of language features including static variable scoping, multiple statement types (assignment, I/O, loops, conditionals, function calls), the ability to return multiple values from functions, arithmetic and boolean expressions, and strong typing. The project includes a complete compiler pipeline with lexical analysis, parsing, semantic analysis, and code generation.
The compiler generates assembly code compatible with NASM version 2.14.02, allowing compiled programs to be assembled and executed. It includes tools for visualizing both the parse tree and abstract syntax tree through an external tree visualizer tool, as well as the ability to generate and view intermediate representations of code. The repository contains sample test cases and programs demonstrating various language features, from simple programs to more complex ones like binary search on dynamic arrays.
The project has some known limitations regarding how dynamic array input variables and their ranges are handled in the symbol table, which can cause issues with multiple dynamic arrays sharing the same range specifications. The implementation was developed by a team of five contributors and includes visualization of the project's commit history alongside documentation of the language specifications and compiler design decisions.



