mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 13:53:03 +00:00
* src/location.h (boundary): Note that a line or column equal
to INT_MAX indicates an overflow.
* src/scan-gram.l: Include verify.h. Don't include get-errno.h.
(rule_length_overflow, increment_rule_length, add_column_width):
New functions.
(<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
(<SC_BRACED_CODE>"}"):
Use increment_rule_length rather than incrementing it by hand.
(adjust_location, handle_syncline): Diagnose overflow.
(handle_action_dollar, handle_action_at):
Fix bug with monstrosities like $-2147483648.
Remove now-unnecessary checks.
(scan_integer): Verify assumptions and remove now-unnecessary checks.
(convert_ucn_to_byte): Verify assumptions.
(handle_syncline): New arg LOC. All callers changed.
Don't store through a value derived from char const * pointer.
This commit is contained in:
@@ -29,11 +29,13 @@ typedef struct
|
||||
/* The name of the file that contains the boundary. */
|
||||
uniqstr file;
|
||||
|
||||
/* The (origin-1) line that contains the boundary. */
|
||||
/* The (origin-1) line that contains the boundary.
|
||||
If this is INT_MAX, the line number has overflowed. */
|
||||
int line;
|
||||
|
||||
/* The (origin-1) column just after the boundary. This is neither a
|
||||
byte count, nor a character count; it is a column count. */
|
||||
byte count, nor a character count; it is a column count.
|
||||
If this is INT_MAX, the column number has overflowed. */
|
||||
int column;
|
||||
|
||||
} boundary;
|
||||
|
||||
Reference in New Issue
Block a user