rpn-calculator
rpn-calculator
This project is a calculator that can parse both RPN and infix expressions. It uses the shunting yard algorithm to transpile infix expressions into RPN expressions. Then, it uses a stack machine to get the result of the RPN expression.
Getting Started
These are the steps to quickly deploy this app.
Prerequisites
The programming language used for this project is Crystal, which means an Linux environment is needed in order to compile the code. Readline and PCRE have to be installed to the Linux environment as well in order to compile the code.
Installing
Refer to the Development section for more information. Binary releases will be added in the future to the GitHub repo.
Usage
TODO: Write usage instructions here So far, only REPL is supported for the calculator. Support for command-line arguments is planned.
Development
After checking out the repo, run shards install
to install the necessary dependencies. Then, run crystal spec
to run the tests.
git clone https://github.com/Afront/Project-Pebbles.git
cd Project-Pebbles/rpn-calculator
shards install
crystal build
./bin/crystal
Contributing
- Fork it (https://github.com/your-github-user/rpn-calculator/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
License
This project is dual-licensed under Apache 2.0 and the MIT license.
rpn-calculator
- 0
- 0
- 0
- 0
- 2
- over 4 years ago
- February 1, 2020
Apache License 2.0
Sat, 23 Nov 2024 20:05:56 GMT