examples: fixes in lexcalc

* examples/c/lexcalc/parse.y: Formatting/comment changes.
(line): Don't return a value.
Print the result here, which avoids printing a value for lines with an
error.
(yyerror): Be sure to increment the pointed, not the pointer...
* examples/c/lexcalc/lexcalc.test: Check errors.
* examples/c/lexcalc/local.mk: Fix a dependency.
This commit is contained in:
Akim Demaille
2019-02-16 13:18:31 +01:00
parent 0782ed3274
commit 0adda755a2
3 changed files with 17 additions and 12 deletions

View File

@@ -25,3 +25,8 @@ cat >input <<EOF
EOF
run 0 9
run -noerr 0 9 -p
cat >input <<EOF
(1+2) *
EOF
run 1 'err: syntax error, unexpected end-of-line, expecting ( or number'