/CInterpreter

Small C interpreter written in Python from scratch. Project was written as a part of course Compiler Construction at The Faculty Of Computer Science.

Primary LanguagePythonMIT LicenseMIT

CInterpreter

CInterpreter is a very small C interpreter written in Python from scratch. Project was written as a part of course Compiler Construction at The Faculty Of Computer Science.

Interpreter was designed and written by me, without using additional libraries. You can easily rewrite this to any other language. With this interpreter you can execute codes like following:

Setup

Prerequsite:
- Install python3.5 or later, preferably use a virtualenv.

Running interpreter

To execute c program, run python3 __main__.py -f <file>.

For example, to run the example1:

cd CInterpreter
python3 __main__.py -f example1.c