A recursive-descent parser in C, that evaluates arithmetic expressions
$ gcc parser.c -o parser
$ parser
> 3+9
12
> 10 * 4 * 2 * 3 / 8
30
> 5 - - - + - (3 + 4) - +2
10
> 2^10
1024
- addition
- subtraction
- single-digit numbers
- multi-digit numbers
- multiplication
- division
- negation
- parentheses
- exponentiation
- floating point
- error handling