- Group Members:
- 2017A7PS0096P - Sahil Dubey
- 2017A7PS0105P - Rohit Milind Rajhans
- 2017A7PS0109P - Saujas Adarkar
- run
make
to compile the code and generate executable - run the file compiler as pass input test case and output filename as parameters
Example:./compiler testcase.txt code.asm
- To compile the
code.asm
:nasm -f elf64 code.asm -o code.o && gcc -no-pie -o exe code.o -lc
ormake executable
- To execute run:
./exe
- Lexer analyzes input stream and creates tokens
- Grammar is read from
grammar.txt
- First and follow set are computed automatically from the grammar
- Parse Table generated based on the rules
- Parser generates a parse tree of the token stream with the help of parse table
- Error recovery has been implemented
- AST is generated from the parse tree and through the grammar
- Symbol table is populated with the help of AST
- Semantic checks have been applied and all the errors are reported
- Intermediate code is generated in the form tuples
- Assembly code is generated and stored is
code.asm