This repository contains the 'Bhasha' language compiler developed as part of Compiler Construction course, BITS Pilani.
The tokens and grammar of the language is provided in the pdf.
This file contains the lexer, which generates lexemes for use by parser and other components.
This file contains the code for the parser, which works on the output of the lexer and generates the parse tree. The AST is then generated from the parse tree based on some common heuristics.
This file contains the symbol table. It stores information about various tokens (data type, point of initialization, scope, last reference etc.). This is then used for type checking.
This file contains the code which generates the .asm assembly file from the lexer output.
These are text files containing the test cases for various phases of the compiler, including lexer, parser and assembly code generation.