https://github.com/cycloctane/cyclocalc
Simple math expression evaluator written in C99. Based on Pratt Parsing.
https://github.com/cycloctane/cyclocalc
algorithms ast c parser
Last synced: 8 months ago
JSON representation
Simple math expression evaluator written in C99. Based on Pratt Parsing.
- Host: GitHub
- URL: https://github.com/cycloctane/cyclocalc
- Owner: Cycloctane
- License: mit
- Created: 2025-06-01T02:46:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-24T16:44:11.000Z (10 months ago)
- Last Synced: 2025-08-24T21:03:02.331Z (10 months ago)
- Topics: algorithms, ast, c, parser
- Language: C
- Homepage:
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## cyclocalc
Simple mathematical expression evaluator based on Pratt Parsing.
Supported operators:
- Arithmetic: `+ - * / %`
- Bitwise: `| & ^ << >>`
- Parentheses: `( )`
### build
```bash
make cyclocalc
```
### usage
```bash
./cyclocalc "6 * (3 + 4)"
```
repl:
```
$ ./cyclocalc
(calc)> 6 * (3 + 4)
42
(calc)>
```