Awesome
C-Interpreter
Coded an interpreter for a subset of C language in C language itself by taking reference from a brilliant book for C programming namely " C FOURTH EDITION" by Herbert Schildt.
Implemented several important features of C programming language such as pointers, structs, enum, type checking etc.
Interprets the following features of C:-
•Parameterized functions with local variables.
•Recursion.
•The if statement.
•The do-while, while, and for loops.
•Local and global variables of type int and char.
•Function parameters of type int and char.
•Integer and character constants.
•String constants (limited implementation).
•The return statement, both with and without a value.
•A limited number of standard library functions.
•These operators: +, –, , /, %, <, >, <=, >=, ==, !=, unary –, and unary + •Functions returning integers. •/ . . . */-style comments.
Constraints:-
•The code blocks of if, while, do, and for must surrounded by beginning and ending curly braces.Single statement can't be used.
•Prototypes are not supported. All functions are assumed to return an integer type (char return types are allowed, but elevated to int).
•No parameter type checking is performed.
•All local variables must be declared at the start of a function, immediately after the opening brace.