Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iaguirre88/parse_string_calculator
Using Erlang parse tools to evaluate a string math expression and calculate its value
https://github.com/iaguirre88/parse_string_calculator
elixir erlang leex parser yecc
Last synced: 12 days ago
JSON representation
Using Erlang parse tools to evaluate a string math expression and calculate its value
- Host: GitHub
- URL: https://github.com/iaguirre88/parse_string_calculator
- Owner: iaguirre88
- Created: 2019-03-29T01:06:41.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-11T23:57:41.000Z (almost 5 years ago)
- Last Synced: 2024-11-13T15:44:22.787Z (2 months ago)
- Topics: elixir, erlang, leex, parser, yecc
- Language: Elixir
- Homepage:
- Size: 95.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Calculator
**Slides**: https://iaguirre88.github.io/parse_string_calculator/
Simple toy app to test [yecc](http://erlang.org/doc/man/yecc.html) and
[leex](http://erlang.org/doc/man/leex.html).It takes a string with a basic math expresion representation and parses it to
get its result. Currently it only supports `+`, `*` and `parentheses`.## Example inputs
* `"1"`
* `"3+2"`
* `"3*2+1"`
* `"(1)"`
* `"3 * (2 + 1)"`
* `"3 * (2 + 1 + 5 * (3+2))"`