mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
examples: d: demonstrate location tracking
* examples/d/calc/calc.y: Track locations. * examples/d/calc/calc.test: Check locations.
This commit is contained in:
committed by
Akim Demaille
parent
8032dde383
commit
6e1d83c8a8
@@ -33,4 +33,19 @@ run 0 5
|
||||
cat >input <<EOF
|
||||
1 + 2 * * 3
|
||||
EOF
|
||||
run 1 "err: syntax error, unexpected *, expecting + or - or ( or number"
|
||||
run 1 "err: 1.9: syntax error, unexpected *, expecting + or - or ( or number"
|
||||
|
||||
cat >input <<EOF
|
||||
1111 + 1111 2222
|
||||
EOF
|
||||
run 1 "err: 1.13-16: syntax error, unexpected number"
|
||||
|
||||
cat >input <<EOF
|
||||
1 +
|
||||
EOF
|
||||
run 1 "err: 1.4-2.0: syntax error, unexpected end of line, expecting + or - or ( or number"
|
||||
|
||||
cat >input <<EOF
|
||||
99 009
|
||||
EOF
|
||||
run 1 "err: 1.4-6: syntax error, unexpected number"
|
||||
|
||||
Reference in New Issue
Block a user