An open API service indexing awesome lists of open source software.

https://github.com/adwaith-rajesh/c_eval

An overly complicated expression evaluation in C.
https://github.com/adwaith-rajesh/c_eval

Last synced: 12 months ago
JSON representation

An overly complicated expression evaluation in C.

Awesome Lists containing this project

README

          

# c_eval

An overly complicated expression evaluation in C.

My first attempt at making a proper C project

### Why ?

Why Not?. I'm bored, I've nothing to do. And a project like this is one hell of a learning experience.

### Build and Run

Make sure that you've a c compiler GCC or clang

#### Clone the repo and build the exe

```commandline
git clone https://github.com/Adwaith-Rajesh/c_eval.git
```

```commandline
cd c_eval
gcc nobuild.c -o ./nobuild
./nobuild
```

#### Now try evaluating an expression

```commandline
chmod +x run.sh
./run.sh '( 3.56 * ( 20 * 3 ) + 1 )'
```

```
214.600000
```

> make sure to leave space between operators and operands

#### Bye....