Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/daringcuteseal/cpp-shunting-calc
- Owner: DaringCuteSeal
- License: mit
- Created: 2024-03-10T04:01:49.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-03-10T06:58:46.000Z (9 months ago)
- Last Synced: 2024-03-11T07:36:31.118Z (8 months ago)
- Topics: calculator, infix-to-postfix, shunting-yard, shunting-yard-algorithm
- Language: C++
- Homepage:
- Size: 231 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.