mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 01:03:04 +00:00
In the grammar scanner, STRING_FINISH unclosed constructs and return
them to the parser in order to improve error messages.
* src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
SC_BRACED_CODE, SC_PROLOGUE): Implement.
* tests/input.at (Unclosed constructs): New test case.
* tests/regression.at (Invalid inputs): Update now that unclosed %{ is
seen.
* src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
unused global.
This commit is contained in:
@@ -398,6 +398,7 @@ input.y:5.1-17: invalid directive: `%a-does-not-exist'
|
||||
input.y:6.1: invalid character: `%'
|
||||
input.y:6.2: invalid character: `-'
|
||||
input.y:7.1-8.0: missing `%}' at end of file
|
||||
input.y:7.1-8.0: syntax error, unexpected %{...%}
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
Reference in New Issue
Block a user