Change the handling of @s so that they behave exactly like $s.
authorAkim Demaille <akim@epita.fr>
Fri, 17 Mar 2000 11:30:24 +0000 (11:30 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 17 Mar 2000 11:30:24 +0000 (11:30 +0000)
commit6666f98f4f1997c1325197e6ecdf98d4227c849e
tree8a6bfb530ce966d31e11b6607dce528f9937a304
parent41aca2e038810d45e67d0348f3ca91ac6e0f0ff3
Change the handling of @s so that they behave exactly like $s.
There is now a pseudo variable @$ (readble and writable), location
of the lhs of the rule (by default ranging from the location of
the first symbol of the rhs, to the location of the last symbol,
or, if the rhs is empty, YYLLOC).

* src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
yyval.
(yyparse): When providing a default semantic action, provide a
default location action.
(after the $): No longer change `*YYLSP', just stack YYLOC the
same way you stack YYVAL.
* src/reader.c (read_declarations): Use warns.
(copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
(copy_action, case '@'): Likewise.
Use a standard error message, to save useless work from
translators.
ChangeLog
src/bison.s1
src/bison.simple
src/reader.c