https://github.com/kotlk/precedence_climbing
Simple C++ program implementing precedence climbing algorithm.
https://github.com/kotlk/precedence_climbing
c cpp parsing
Last synced: about 2 months ago
JSON representation
Simple C++ program implementing precedence climbing algorithm.
- Host: GitHub
- URL: https://github.com/kotlk/precedence_climbing
- Owner: KOTlK
- License: mit
- Created: 2025-06-09T16:17:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-25T05:17:14.000Z (about 1 year ago)
- Last Synced: 2025-06-25T06:27:15.577Z (about 1 year ago)
- Topics: c, cpp, parsing
- Language: C
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# precedence_climbing
Source : https://eli.thegreenplace.net/2012/08/02/parsing-expressions-by-precedence-climbing
Simple C++ (mostly C) console program for parsing math expressions.
Operates in signed 32-bit integer range.
Handles binary operators (+, -, *, /, ^, %), parentheses and unary minus.
Sample expression: -5 + 3 * -(2 ^ 4) / (7 % 3) - -(-8 * 2) + 10 / -2)