Attach actions to rules, instead of pre-outputting them to

actions_obstack.
* src/gram.h (rule_t): action and action_line are new members.
* src/reader.c (symbol_list): Likewise.
(copy_action): Save the actions within the rule.
(packgram): Save them in rule_table.
* src/output.c (actions_output): New.
(output_parser): Use it on `%%actions'.
(output_rule_data): Don't free rule_table.
(output): Do it.
(prepare): Don't save the `action' muscle.
* src/bison.simple: s/%%action/%%actions/.
This commit is contained in:
Akim Demaille
2001-12-15 14:14:30 +00:00
parent 51576fb3c6
commit 3f96f4dc41
6 changed files with 62 additions and 29 deletions

View File

@@ -50,13 +50,13 @@ typedef struct bucket
short prec;
associativity assoc;
short user_token_number;
/* Points to the other in the identifier-symbol pair for an
alias. Special value SALIAS in the identifier half of the
identifier-symbol pair for an alias. */
struct bucket *alias;
symbol_class class;
}
bucket;
} bucket;
extern bucket *firstsymbol;