Parsing System (v0.7)
|
Calculator StaticA simple arithmetic calculator utilizing a calculator grammar. Demonstrates how to use Goldie's static-style. Sample run:>goldie-calculatorStatic
Calculator
Enter an arithmetic expression ('exit' to exit)
calculator>2+2*20
42.00000
calculator>(1-3) / 2
-1.00000
calculator>10
10.00000
calculator>12 {;[ 456 qwf
(1:4): Syntax Error: '{;['
(1:12): Syntax Error: 'qwf'
2 Error(s)
calculator>2 + * 7
(1:5): Unexpected *: '*'
calculator>-10 * -20
200.00000
calculator>exit
|