mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 21:03:04 +00:00
Let symbols have a location.
* src/symtab.h, src/symtab.c (symbol_t): Location is a new member. (getsym): Adjust. Adjust all callers. * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at): Use location_t, not int. * src/symtab.c (symbol_check_defined): Take advantage of the location. * tests/regression.at (Invalid inputs): Adjust.
This commit is contained in:
@@ -336,7 +336,7 @@ rhs:
|
||||
symbol:
|
||||
ID { $$ = $1; }
|
||||
| string_as_id { $$ = $1; }
|
||||
| CHARACTER { $$ = getsym ($1); }
|
||||
| CHARACTER { $$ = getsym ($1, @1); }
|
||||
;
|
||||
|
||||
action:
|
||||
@@ -348,7 +348,7 @@ action:
|
||||
string_as_id:
|
||||
STRING
|
||||
{
|
||||
$$ = getsym ($1);
|
||||
$$ = getsym ($1, @1);
|
||||
symbol_class_set ($$, token_sym);
|
||||
}
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user