a simple calculator for Parser practice
go build
./calc
simple calculator:
- type 'exit' to exit
- support integer and floating number
- support '+', '-', '*', '/' and parentheses
- the result is double float value
- example: '1.5 + 2 * (-1 - 2.2) / 10', the result is 0.860000
1 + 2
= 3.000000
1.5 + 2 * (-1 - 2.2) / 10
= 0.860000