This file is part of Bison, the GNU Compiler Compiler.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA
-*/
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
%option debug nodefault nounput noyywrap never-interactive
%option prefix="code_" outfile="lex.yy.c"
obstack_sgrow (&obstack_for_string, "]b4_dollar_dollar[");
self->is_value_used = true;
}
- "@$" obstack_sgrow (&obstack_for_string, "]b4_at_dollar[");
+ "@$" {
+ obstack_sgrow (&obstack_for_string, "]b4_at_dollar[");
+ locations_flag = true;
+ }
}
obstack_fgrow1 (&obstack_for_string,
"]b4_lhs_value([%s])[", type_name);
- rule->used = true;
+ rule->action_props.is_value_used = true;
}
else
{
"]b4_rhs_value(%d, %d, [%s])[",
effective_rule_length, n, type_name);
if (n > 0)
- symbol_list_n_get (effective_rule, n)->used = true;
+ symbol_list_n_get (effective_rule, n)->action_props.is_value_used =
+ true;
}
else
complain_at (dollar_loc, _("integer out of range: %s"), quote (text));
/* Reclaim Flex's buffers. */
yylex_destroy ();
}
-
-char const *
-translate_rule_action (symbol_list *rule)
-{
- code_props cp;
- code_props_rule_action_init (&cp, rule->action, rule->action_location, rule);
- code_props_translate_code (&cp);
- return cp.code;
-}