Skip to content

Here you will find a minimal interpreter written in C (which I used in an embedded systems console based project).

Notifications You must be signed in to change notification settings

Masihtabaei/cobin-minimal-interpreter-in-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cobin - A Minimal Interpreter Written in C

Technologies Used

C Static Badge Git GitHub

General Information

Here you will find a minimal interpreter written in C (which I used in an embedded systems console based project). It supports basic arithmetic operations (number + number | number - number | number * number | number / number [only integer divisions]) for positive numbers and can get used to raise a number to a positive exponent (number ** exponent). In addition it supports an unlimited number of brackets which can get nested in an arbitrary way.

I created this interpreter over the night in summer of 2023 for using in one of my embedded systems projects. I called it cobin. cobin is a partial blend (Coburg [name of a small city located in Bavaria in Southern Germany] + Interpreter ) Feel free to extend/adjust this project so that it meets your goals.

Usage/Example

Just run the project in Code::Blocks. Then you can enter your expressions which then get evaluated instantly (similar to interactive mode in Python).

Image

cobin-image

About

Here you will find a minimal interpreter written in C (which I used in an embedded systems console based project).

Resources

Stars

Watchers

Forks

Languages