d: improve the example

* examples/d/calc.y: Exit with failure on errors.
Remove useless operators (=, !) meant for the test suite.
Add unary + for symmetry.
* examples/d/calc.test: Adjust expectations.
This commit is contained in:
Akim Demaille
2019-02-23 11:35:26 +01:00
parent 661bbacfc7
commit 575b814119
2 changed files with 15 additions and 24 deletions

View File

@@ -23,4 +23,4 @@ run 0 7
cat >input <<EOF
1 + 2 * * 3
EOF
run 0 "err: syntax error, unexpected *, expecting - or ! or ( or number"
run 1 "err: syntax error, unexpected *, expecting + or - or ( or number"