A program designed to parse source code for a custom language (can be seen in t1.txt to t6.txt). The syntax and semantics of the source code are analysed for correctness using parse tree creation and type expression table formation. Any errors in the source code are displayed with line numbers.
Instructions to use the program:
make allto compile the code intooutput../output inputcode.txtto run the code, put the source code ininputcode.txt(name can be changed) and grammar ingrammar.txt(should be right associative, and unambiguous).make cleanto remove all.ofiles.
- The driving code including the 
mainfunction is indriver.c. - All data structure definitions are in 
customcompiler.h. - The grammar is in 
grammar.txtin a format that can be parsed by the program. - Sample source code for testing the compiler is in 
t1.txttot6.txt.