sehe / qi-extended-parser-evaluator

Example for https://stackoverflow.com/a/60846101/85371, gotten a little out of hand
0 stars 1 forks source link

Merge branch Issue2 (fixes issue #2) #4

Closed sehe closed 2 years ago

sehe commented 2 years ago

Includes reproducer which should be running cleanly:

./test.exe issue
issue#2
-----------------------
"x" OK: x
Outcome: null
----------------------
"3*4" OK: 3 * 4
Outcome: 12
----------------------
"f(1,2,3)" OK: f(1, 2, 3)
Outcome: 70.35
----------------------
"x := y" OK: x := y
Outcome: null
----------------------
"x := 10" OK: x := 10
Outcome: 10
----------------------
"x " OK: x
Outcome: 10
----------------------
"3 " OK: 3
Outcome: 3
----------------------
"3*4 " OK: 3 * 4
Outcome: 12
----------------------
"f(1,2,3) " OK: f(1, 2, 3)
Outcome: 70.35
----------------------
"x := y " OK: x := y
Outcome: null
----------------------
"x := 10 " OK: x := 10
Outcome: 10
----------------------