mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
scanner: reintroduce unput for missing end tokens
Unput was no longer used since a POSIX-compatiblity issue with Flex 2.5.31,
which has been adressed in newer versions of Flex. See this discussion:
<http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00029.html>
This partially reverts commit aa4180418f.
* src/scan-gram.l (unexpected_end): Here.
* tests/input.at: Adjust for new order of error reports.
This commit is contained in:
@@ -1469,12 +1469,22 @@ start: '
|
||||
]])
|
||||
AT_CHECK([[$PERL -e "print 'start: \'';" >> empty.y || exit 77]])
|
||||
|
||||
AT_BISON_CHECK([empty.y], [1], [],
|
||||
AT_BISON_CHECK([-fcaret empty.y], [1], [],
|
||||
[[empty.y:2.8-9: warning: empty character literal [-Wother]
|
||||
empty.y:3.8-4.0: warning: empty character literal [-Wother]
|
||||
start: '';
|
||||
^^
|
||||
empty.y:3.8-4.0: error: missing "'" at end of line
|
||||
empty.y:4.8: warning: empty character literal [-Wother]
|
||||
start: '
|
||||
^
|
||||
empty.y:3.8-4.0: warning: empty character literal [-Wother]
|
||||
start: '
|
||||
^
|
||||
empty.y:4.8: error: missing "'" at end of file
|
||||
start: '
|
||||
^
|
||||
empty.y:4.8: warning: empty character literal [-Wother]
|
||||
start: '
|
||||
^
|
||||
]])
|
||||
|
||||
AT_DATA([two.y],
|
||||
@@ -1486,10 +1496,10 @@ AT_CHECK([[$PERL -e "print 'start: \'ab';" >> two.y || exit 77]])
|
||||
|
||||
AT_BISON_CHECK([two.y], [1], [],
|
||||
[[two.y:2.8-11: warning: extra characters in character literal [-Wother]
|
||||
two.y:3.8-4.0: warning: extra characters in character literal [-Wother]
|
||||
two.y:3.8-4.0: error: missing "'" at end of line
|
||||
two.y:4.8-10: warning: extra characters in character literal [-Wother]
|
||||
two.y:3.8-4.0: warning: extra characters in character literal [-Wother]
|
||||
two.y:4.8-10: error: missing "'" at end of file
|
||||
two.y:4.8-10: warning: extra characters in character literal [-Wother]
|
||||
]])
|
||||
|
||||
AT_DATA([three.y],
|
||||
@@ -1501,10 +1511,10 @@ AT_CHECK([[$PERL -e "print 'start: \'abc';" >> three.y || exit 77]])
|
||||
|
||||
AT_BISON_CHECK([three.y], [1], [],
|
||||
[[three.y:2.8-12: warning: extra characters in character literal [-Wother]
|
||||
three.y:3.8-4.0: warning: extra characters in character literal [-Wother]
|
||||
three.y:3.8-4.0: error: missing "'" at end of line
|
||||
three.y:4.8-11: warning: extra characters in character literal [-Wother]
|
||||
three.y:3.8-4.0: warning: extra characters in character literal [-Wother]
|
||||
three.y:4.8-11: error: missing "'" at end of file
|
||||
three.y:4.8-11: warning: extra characters in character literal [-Wother]
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
Reference in New Issue
Block a user