Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/daringcuteseal/cpp-shunting-calc

Basic calculator implementation in C++ with the Shunting Yard algorithm.
https://github.com/daringcuteseal/cpp-shunting-calc

calculator infix-to-postfix shunting-yard shunting-yard-algorithm

Last synced: about 1 month ago
JSON representation

Basic calculator implementation in C++ with the Shunting Yard algorithm.

Awesome Lists containing this project

README

        

# Shunting-Yard Calculator

This project is a basic implementation of the [Shunting-Yard algorithm](https://en.wikipedia.org/wiki/Shunting_yard_algorithm) which is used to parse an infix notation input and turn it into a list of tokens arranged with the [Postfix notation](https://en.wikipedia.org/wiki/Reverse_Polish_notation). The postfix tokens would then be evaluated using a stack-based algorithm.

P.S this is for my school assignment.

# Implemented Features

- Precedence respect
- Operators: `+`, `-`, `/`, `*`
- Parenthesis support
- Floating-point numbers support
- Simple REPL

# Building and Running

```
git clone https://github.com/DaringCuteSeal/cpp-shunting-calc calculator
cd calculator
make
```

Then run the `calculator` executable.

# License

Licensed under the MIT license.