This is Complier for Simple Integer Language which supports different features like
- Built in error and sytax checking
- Different Data Types like
int,string,arrays,etc - Conditional Loops
- Functions
-
sim-2is a machine simulator which we use to run the compiled code.$ cd sim-2 $ makethis generates the
simfile which is our machine simulator, -
Now we need to compile our
SILCCompiler$ cd .. $ makethis generates the file
interpreterwhich is executables for ourSILCcompiler -
Now run these following commands to check the error and syntachecking feature
$ ./interpreter bubble_sort.silc
$ ./interpreter array_test.silc
-
And now to generate the machine code run following command
$ ./interpreter program.silc
this generates the file
program.simthis is compiled machine code of the fileprogram.silc. To run this compiled file onsim-2machine use the command$ sim-2/sim program.sim
SILC compiler uses a number of open source projects to work properly:
- [C++] - For compiler design logic
- [Lex] - Generates lexical analyzers. Lex is commonly used with the yacc parser generator
- [YACC] - It is Compiler Compiler
- [markdown-it] - Markdown parser done right. Fast and easy to extend.
MIT